Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify linux fpm platform so packages are always created properly #94

Merged
merged 1 commit into from Nov 8, 2016

Conversation

@jessecarbon
Copy link
Contributor

@jessecarbon jessecarbon commented Nov 4, 2016

I noticed this when building on OSX. Without these additional configs, RPM/DEBs were built for darwin, resulting in package collector-sidecar-0.0.9_cb1-1.x86_64 is intended for a darwin operating system when installing the resulting RPM on Linux.

This change results in fpm-cook passing --rpm-os linux to fpm, see https://github.com/jordansissel/fpm/wiki:

    --rpm-os OS                   (rpm only) The operating system to target this rpm for. You want to set this to 'linux' if you are using fpm on OS X, for example

Which results in "--target","x86_64-unknown-linux" being passed to rpmbuild, as well as the additional logging:

===> [FPM] Building target platforms: x86_64-unknown-linux {}

The ability to pass fpm attributes in fpm-cookery was added here.

Seems like explicitly specifying this doesn't hurt anything and is necessary for building on OSX (at least it was for me).

Without this, RPM/DEBs are built for darwin when building on MacOS/OSX,
resulting in "package collector-sidecar-0.0.9_cb1-1.x86_64 is intended
for a darwin operating system" when installing.
@mariussturm
Copy link
Member

@mariussturm mariussturm commented Nov 8, 2016

I never tried to build Linux packages on OSX but good catch! Thanks!

@mariussturm mariussturm merged commit 5e57716 into Graylog2:master Nov 8, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@bernd
Copy link
Member

@bernd bernd commented Nov 8, 2016

I never tried to build Linux packages on OSX but good catch! Thanks!

Yeah, this is not really supported with fpm-cookery. 😉

@jessecarbon
Copy link
Contributor Author

@jessecarbon jessecarbon commented Nov 8, 2016

Yeah, this is not really supported with fpm-cookery. 😉

Seems to work fine!

jessecarbon added a commit to jessecarbon/collector-sidecar that referenced this pull request Dec 2, 2016
… (Graylog2#94)

Without this, RPM/DEBs are built for darwin when building on MacOS/OSX,
resulting in "package collector-sidecar-0.0.9_cb1-1.x86_64 is intended
for a darwin operating system" when installing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants