bash, perl and python are all shebangs used by the test scripts
hence they're moved to `nativeCheckInputs` so that they can be on PATH.
runtimeShellPackage is added to `buildInputs` to fix the shebang
in $out/lib/apparmor/rc.apparmor.function. prior to this, its `#!/bin/sh`
shebang was being patched via the bash from `checkInputs`. that's flimsy
as it relies on `doCheck == true` (which is false e.g. when cross
compiling). instead, provide a shell in `buildInputs` to ensure patching
of `#!/bin/sh` in runtime scripts.
Replaces the dynamic lookup of the aa-status path with the full Nix
derivation path. This change also fixes issues with the use of which
causing POSIX shell incompatibilities.
Upstream release: https://gitlab.com/apparmor/apparmor/-/releases/v4.1.0
Notable changes made to the packaging:
- apparmor-kernel-patches: drop. This was outdated and unused, and wouldn't even apply to any kernel anymore.
- aa-teardown: migrate to writeShellAPplication
- apparmor-*: migrate to by-name
- apparmor-*: enable checks and actually run checks
- libapparmor: test python module imports correctly
- libapparmor: no seperate $python output (makes no sense)