Your message dated Mon, 28 Jan 2019 09:04:58 +0000
with message-id <e1go2qg-0004ky...@fasolo.debian.org>
and subject line Bug#919705: fixed in apparmor 2.13.2-5
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-5

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: Mon, 28 Jan 2019 08:29:19 +0000
Source: apparmor
Architecture: source
Version: 2.13.2-5
Distribution: unstable
Urgency: medium
Maintainer: Debian AppArmor Team <pkg-apparmor-t...@lists.alioth.debian.org>
Changed-By: intrigeri <intrig...@debian.org>
Closes: 919705
Changes:
 apparmor (2.13.2-5) unstable; urgency=medium
 .
   * Really move libapparmor.so unversioned symlink to /lib/<triplet>
     (Closes: #919705).
   * Add Lintian override for dev-pkg-without-shlib-symlink: arguably
     a false positive (see #843932).
   * Add Lintian override for uses-dpkg-database-directly: false positive.
   * Declare compliance with Standards-Version 4.3.0.
   * autopkgtests:
     - Test compiling many more profiles:
       - all profiles that apparmor-profiles-extra ships in enforce mode
       - the profiles shipped by bind9, cups-browsed, haveged,
         libreoffice-common, man-db, ntp, onioncircuits, tcpdump, thunderbird,
         and tor
       - another profile shipped by libvirt-daemon-system
     - Declare that the compile-policy test is not superficial anymore.
     - Make the parser verbose in the compile-policy test.
Checksums-Sha1:
 4282b0a7c532d5ea78dfe7bcff261a1285eff64a 3363 apparmor_2.13.2-5.dsc
 a5544ad51b07225d4ea79e1e0b0f53a917d1ef1d 96476 apparmor_2.13.2-5.debian.tar.xz
 c63ba042382cbc8d6eb17ffbd55b0ff7811b65f7 12623 
apparmor_2.13.2-5_amd64.buildinfo
Checksums-Sha256:
 ba205663d03e614c19f3fafd8566d1fba9363cd18b49dcd248c7a890808b4747 3363 
apparmor_2.13.2-5.dsc
 ef40e6ca99267ce23ef831c5d48b80d4acefbf158aa89d1bed6c932d34d9e92d 96476 
apparmor_2.13.2-5.debian.tar.xz
 debeb6956c81ed933cb00e9d1a7bed72854c689675f5ed96d5720040af6a4e34 12623 
apparmor_2.13.2-5_amd64.buildinfo
Files:
 96312d71f6161bdca4d5be2ec367275d 3363 admin optional apparmor_2.13.2-5.dsc
 8d13e94b7d8cf1a1c39b78169dd8f813 96476 admin optional 
apparmor_2.13.2-5.debian.tar.xz
 53117aeee75f4f53b2ca4fca52ab7b2d 12623 admin optional 
apparmor_2.13.2-5_amd64.buildinfo

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

iQIzBAEBCgAdFiEEcMAxqZeuB0p8dimNy2kI2AAOzf4FAlxOwTEACgkQy2kI2AAO
zf5YRhAAntkRaUjihs7JuOfRVz05PkCVRnrj4TN0Ngb34YnlKLaIdxecgWKVaYLb
zmRLv+D9G+aU6lpMc3fYUBc+SjpSePSINQGOYEsj1CSdyne+w3wYdBUohjA36bDu
77zQyawWrAXcmcCGXYiBUrUZVbuwsIG4YwmOlnGCY42Npx+ZW80AaVETrmp6Nbs+
BtwK7UkNaBmfRb3nSX2pW/4uEn447TTRmmnhyosf/wCzsTef6ekWlR3zdRnHQlSO
AboOKdx5+XL+PM1ENL/FmEfFexkWWd7rC75i1r6VSER0BFMIK1P7XwkzopnQ0ROc
+/hh11EKwnY5pHPrnuScJPelfsM3McS40nlmuBpSFjfPy4GYC5PRzb6hDxcu37ik
ZKF8b9uRAd2rLZKvzFAKSoT3a95sRu3UnlM40G7rcg3Gb3sK71QCrPE7EzCpO5MI
j+55S8IfqVi7fuIoiBmEWrb+AAXqVOb/KsjKRP1uSy1E65ie8kIg6LmYF+cnQ1jk
/mEW0p9rqiDk3+OWDpyh5AJovGQyzGHTHwftCeQj+dLSxfAYwFLEsbVDABnRxEHF
mtJMcCClMuzFappubIt5xCghORmcx+YaK3gAI3MDX15OfQtPbR4bc0nDV+BpnoG2
FbYzQdo55YiOkmm8fgWEanLw296flY9Kh5kQl+uatmQcuXUbvlw=
=WZNQ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to