Your message dated Sun, 27 Jan 2019 18:04:28 +0000
with message-id <e1gnone-000hdo...@fasolo.debian.org>
and subject line Bug#919705: fixed in apparmor 2.13.2-4
has caused the Debian Bug report #919705,
regarding move libapparmor.so to /lib/<triplet>
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
919705: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919705
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libapparmor-dev
Version: 2.13.2-3
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap
Control: affects -1 + src:libvirt

I tried cross building libvirt. It still has a few issues, but one of
the issues is that it fails to find libapparmor (not immediately
visible). In the end, I was able to reduce the libvirt's check to the
following command:

echo 'main(){return aa_change_profile();}' | $CC -x c - -o /dev/null -lapparmor

If $CC is a native compiler, it just works. If $CC is a cross compiler
(e.g. for arm64), you get an error:

/usr/lib/gcc-cross/aarch64-linux-gnu/8/../../../../aarch64-linux-gnu/bin/ld: 
/lib/aarch64-linux-gnu/libapparmor.a(kernel.o): in function 
`aa_query_label@@APPARMOR_2.9':
(.text+0x1248): undefined reference to `pthread_once'

What you can see here is that for some reason gcc is preferring the
static library over the dynamic one. So I started looking and compared
$CC -print-search-dirs. Indeed, for native toolchains /usr/lib/<triplet>
comes before /lib/<triplet>. For Debian's cross toolchains, this order
is reversed for some reason. I'm not sure whether that's a bug in the
cross toolchains. However, it causes gcc to prefer the static library
over the dynamic one.

I've concluded that regardless of whether this is a bug in gcc, it is a
bug in libapparmor-dev. I think that putting static and dynamic
libraries in different directories is a recipe for breakage. You really
should put them in the same directory. That can be either /lib/<triplet>
or /usr/lib/<triplet>. Implementing the former is easier so that's what
my patch does. Would you be so kind and fix this on the apparmor side?

Helmut
diff --minimal -Nru apparmor-2.13.2/debian/changelog 
apparmor-2.13.2/debian/changelog
--- apparmor-2.13.2/debian/changelog    2019-01-01 19:03:54.000000000 +0100
+++ apparmor-2.13.2/debian/changelog    2019-01-18 19:48:04.000000000 +0100
@@ -1,3 +1,10 @@
+apparmor (2.13.2-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move libapparmor.so to /lib/<triplet>. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 18 Jan 2019 19:48:04 +0100
+
 apparmor (2.13.2-3) unstable; urgency=medium
 
   * Update upstream MR!252 backport to fix initscript (Closes: #917874)
diff --minimal -Nru apparmor-2.13.2/debian/rules apparmor-2.13.2/debian/rules
--- apparmor-2.13.2/debian/rules        2019-01-01 19:03:54.000000000 +0100
+++ apparmor-2.13.2/debian/rules        2019-01-18 19:48:01.000000000 +0100
@@ -176,7 +176,7 @@
        # Create unversioned link in /usr to the shared library
        MY_DSO=$$(basename $$(readlink 
$(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libapparmor.so)); \
        ln -sf /lib/$(DEB_HOST_MULTIARCH)/$${MY_DSO} \
-           $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libapparmor.so
+           $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libapparmor.so
 
 override_dh_installinit:
        dh_installinit --no-start --no-restart-on-upgrade --error-handler=true

--- End Message ---
--- Begin Message ---
Source: apparmor
Source-Version: 2.13.2-4

We believe that the bug you reported is fixed in the latest version of
apparmor, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 919...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
intrigeri <intrig...@debian.org> (supplier of updated apparmor package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 27 Jan 2019 17:07:34 +0000
Source: apparmor
Architecture: source
Version: 2.13.2-4
Distribution: unstable
Urgency: medium
Maintainer: Debian AppArmor Team <pkg-apparmor-t...@lists.alioth.debian.org>
Changed-By: intrigeri <intrig...@debian.org>
Closes: 919705 919775
Changes:
 apparmor (2.13.2-4) unstable; urgency=medium
 .
   * Move libapparmor.so unversioned symlink to /lib/<triplet> (Closes: 
#919705).
   * New patches, cherry-picked from upstream:
     - Make tunables/share play well with aliases.
     - Fix access to /usr/share/drirc.d.conf (Closes: #919775).
     - Fix access to the default paths used by dehydrated in Debian.
     - Support new font configuration paths.
     - Support libvirt named profile.
     - Fix access to /etc/alsa/conf.d/.
   * autopkgtests: test compiling more profiles shipped by other packages.
   * Patch the dnsmasq profile to fix ptrace and signal communication
     with libvirtd.
Checksums-Sha1:
 f0cc1f6cfb733467f6cc2870ef7f18d16cfdbff4 3258 apparmor_2.13.2-4.dsc
 36dfe22c9e0ae31142882543b52e831ed926a739 95876 apparmor_2.13.2-4.debian.tar.xz
 94e6495972c00b7c59677195da4ed88bffd3dd86 12631 
apparmor_2.13.2-4_amd64.buildinfo
Checksums-Sha256:
 dab08b67dc9cfee9e37e385c6867bd71cb2c5f4881665ae6cefd53e756a2918a 3258 
apparmor_2.13.2-4.dsc
 194b93a15e0be99f684092616c79e3028b7f777c2740c508e5773f3434a5e6e5 95876 
apparmor_2.13.2-4.debian.tar.xz
 c2c1f795be71cedaa2b44b24585467483e58851e8837596adbc866633889b41e 12631 
apparmor_2.13.2-4_amd64.buildinfo
Files:
 fef2dcc1c7428e3f1eb3cd2f22c8c22c 3258 admin optional apparmor_2.13.2-4.dsc
 c9f058b75cc7ea8bd95090b8bd0b0505 95876 admin optional 
apparmor_2.13.2-4.debian.tar.xz
 38d2a236cce6843e4fc011322d2d6853 12631 admin optional 
apparmor_2.13.2-4_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcMAxqZeuB0p8dimNy2kI2AAOzf4FAlxN8cwACgkQy2kI2AAO
zf6V8Q//b/v0oblhxCahCI/eLbiQZZVUX8z9ioKYloyM0Jf6hdIJAbsJi0is1OFT
DuHVVtnxso3fxZqxWXc4JOIUrA5f54QmdPPQXsPZ2cXTE2o2l/m9ihGlqYmmgxAN
mmDaSWr1kx4zRqWylfa4OVEyS+0+DxHb5mqk8Xu+2L7tr9xtbd3FW2gJZxkLX4I2
ODUbkuA7jGIHS8RQbBNFhu22V6Et2ipA8/lZJH5VXJMfc03/I8Et4HF9z6o8g5HC
ggU39Axu8YsbeC1hrRi8y3RQEzWg5+bOa1cmcLgvRVljIz3Ayusu7mutw+p/v4Fr
Z+WkcLLC7cY827sFQg263ydqJROfWques1Q92QZL7G9he7juzP+9SZcSM73A+CUu
ZNIRm57aSnk+p+ny9GGRjgpqp618D2uOhDkMKNL4++300fmqgd549h3SL8hRcSOR
L9TKb0Gzn73xyzelypZfiSXXUwHkn+c1HxdLcZii+zVqjN+p3jXxhdKIGyninjBh
BtR9kwbC2tuJhjljWpGGxX7gK7weOtSBlr0GFmyNWHa1R98xPTWeNUnBr/8vqSqg
boSNXdJDLOHXSVftZ2YxRH6oOwmksdKZ9bZrGtdc4VpvzCEIzSJciVUwIr6iZpXS
T7l9vTuKcAs4P/vV+uNW8eNEnKK/IQOF0UgqyQbRZOXANfBjgIk=
=1xGM
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to