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

openbsm: fix linux build #46475

Merged
merged 1 commit into from Sep 10, 2018
Merged

openbsm: fix linux build #46475

merged 1 commit into from Sep 10, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 10, 2018

Motivation for this change

See https://hydra.nixos.org/build/80705916

To fix the linux build the patch bsm-add-audit_token_to_pid.patch
mustn't be applied during Linux builds, only for Darwin as it's an
Apple-only fix.

The compiler failure occurred because audit_token_t is part of
<mach/mach.h> which is not available on Linux.

Addresses #45960

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

See https://hydra.nixos.org/build/80705916

To fix the linux build the patch `bsm-add-audit_token_to_pid.patch`
mustn't be applied during Linux builds, only for Darwin as it's an
Apple-only fix.

The compiler failure occurred because `audit_token_t` is part of
`<mach/mach.h>` which is not available on Linux.

Addresses NixOS#45960
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: openbsm

Partial log (click to expand)

shrinking /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/sbin/auditreduce
shrinking /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/sbin/auditfilterd
shrinking /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/lib/libbsm.so.0.0.0
shrinking /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/lib/auditfilter_noop.so.0.0.0
gzipping man pages under /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/share/man/
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/lib  /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/sbin
patching script interpreter paths in /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1
checking for references to /build in /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1...
moving /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/sbin/* to /nix/store/65msy3qq199f18ridh1kah9s6wlqrcwv-openbsm-1.1/bin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: openbsm

Partial log (click to expand)

shrinking /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/sbin/auditfilterd
shrinking /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/lib/auditfilter_noop.so.0.0.0
shrinking /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/lib/libbsm.so.0.0.0
gzipping man pages under /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/share/man/
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/lib  /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/sbin
patching script interpreter paths in /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1
checking for references to /build in /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1...
moving /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/sbin/* to /nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1/bin
/nix/store/mm83y7h8j3751z75j8c0042z57cg6y62-openbsm-1.1

@timokau
Copy link
Member

timokau commented Sep 10, 2018

Thanks!

@timokau timokau merged commit d4b0419 into NixOS:master Sep 10, 2018
@Ma27 Ma27 deleted the fix-openbsm branch September 10, 2018 12:32
@Ma27
Copy link
Member Author

Ma27 commented Sep 10, 2018

@timokau this fixes a Hydra failure for 18.09. Would you mind backporting this? :)

@timokau
Copy link
Member

timokau commented Sep 10, 2018

Of course, I forgot. Thanks for the reminder :)
cde1ede

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants