[pkg-apparmor] Bug#984582: apparmor FTCBFS: many different reasons
Helmut Grohne
helmut at subdivi.de
Mon Oct 18 15:45:31 BST 2021
Control: tags -1 + patch
intrigeri asked me to split this into merge requests and update the bug.
On Fri, Mar 05, 2021 at 01:07:45PM +0100, Helmut Grohne wrote:
> 1. Build-Depends are a problem. perl is not installable for the host
> architecture. perl is used here to build a perl extension. As such it
> should instead depend on perl-xs-dev (which currently is a virtual
> package). We're in the process of transitioning all perl extensions
> to this dependency and apparmor is till missing. Simple, right?
Since the perl bindings are gone, what is left is dropping the perl
dependency (as perl-base is essential):
https://salsa.debian.org/apparmor-team/apparmor/-/merge_requests/19
> 2. Build-Depends: python3 is not installable either. The usual way here
> is to replace python(.*)-dev with libpython\1-dev, python\1-dev:any
> and annotating the interpreter dependencies :any.
https://salsa.debian.org/apparmor-team/apparmor/-/merge_requests/20
> 3. The PERL_VENDORARCH variable is computed for the build architecture.
> The snippet is common to many perl extensions and the replacement is
> not nice. We're in the process of moving this to a more central
> place, but in the mean time please include the snippet from the
> attached patch to mae it use the host's perl config.
Obsolete due to perl bindings being removed.
> 4. Then it uses AC_CHECK_FILE to locate a header. Bad idea.
> AC_CHECK_FILE is for host files, not for build files. Please use test
> -e instead.
https://gitlab.com/apparmor/apparmor/-/merge_requests/728 is included in
Debian already.
> 5. In the end, I couldn't figure out how to make the perl extension
> cross buildable. Instead, I offer the addition of a noperl build
> profile to make any progress here.
Obsolete due to perl bindings being removed.
> 6. The configure script assumes that $PYTHON-config is right.
> Unfortunately, the Python interpreter is not usually prefixed with a
> triplet whereas the -config tool is. Thus we get the build
> architecture python-config here, but we should use the host one.
> AC_PATH_TOOL is required here.
https://gitlab.com/apparmor/apparmor/-/merge_requests/729 is included in
Debian already.
> 7. It fails linking -lz. This is an issue with python3.9 actually and
> reported separately as #984580.
Has been fixed in the Python packaging.
However, we have a new issue.
8. The binutils and parser subdirectories are built with plain make and
thus lack cross tool invocations. The obvious solution is using
dh_auto_build. Also changehat/mod_apparmor is implicitly built by
make install and thus affected by the same problem.
https://salsa.debian.org/apparmor-team/apparmor/-/merge_requests/21
And once you include those three merge requests, cross building apparmor
should just work.
Helmut
More information about the pkg-apparmor-team
mailing list