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

apparmor: make apparmor cross-compile #63999

Merged
merged 1 commit into from Jul 5, 2019

Conversation

dingxiangfei2009
Copy link
Contributor

Motivation for this change

apparmor assumes that the archiver always has no target platform prefix, which is not true when cross compiling. This PR fixes this, so that apparmor-parser in particular will cross compile.

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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Jul 3, 2019

Has this been reported upstream?

@dingxiangfei2009
Copy link
Contributor Author

@FRidh unfortunately, no. I will try to, though.

@dingxiangfei2009
Copy link
Contributor Author

@FRidh cross referenced here: https://gitlab.com/apparmor/apparmor/issues/41

@joachifm
Copy link
Contributor

joachifm commented Jul 4, 2019

Please change the target branch to staging.

@dingxiangfei2009 dingxiangfei2009 changed the base branch from master to staging July 5, 2019 04:58
@dingxiangfei2009
Copy link
Contributor Author

dingxiangfei2009 commented Jul 5, 2019

@joachifm Okay

When do we make pull request to staging instead?

@joachifm
Copy link
Contributor

joachifm commented Jul 5, 2019

@dingxiangfei2009 for changes that incur massive rebuilds, to avoid unduly delaying channels built from master.

@joachifm
Copy link
Contributor

joachifm commented Jul 5, 2019

@GrahamcOfBorg build systemd apparmor-parser

@joachifm joachifm merged commit 066491c into NixOS:staging Jul 5, 2019
@joachifm
Copy link
Contributor

joachifm commented Jul 5, 2019

Thank you

@dingxiangfei2009 dingxiangfei2009 deleted the appamor-cross-compile branch July 7, 2019 16:40
kensington pushed a commit to kensington/apparmor that referenced this pull request Aug 4, 2019
When cross compiling apparmor-parser, Makefile will use ar for
creating the static library. However, ar produces libraries on
the build platform. The right ar could be prefixed with the target
platform triples.

Signed-off-by: Xiang Fei Ding <dingxiangfei2009@gmail.com>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Ref: NixOS/nixpkgs#63999
Bug: https://gitlab.com/apparmor/apparmor/issues/41
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