Source: apparmor
Version: 2.8.0-5.1
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)

Hi,

the attached patch makes apparmor build on x32.
I did not see how I could use autoconf for this,
so the architecture check is currently hardcoded,
and will likely have to be extended e.g. by arm64
later.

Please apply.

-- System Information:
Debian Release: jessie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
diff -Nru apparmor-2.8.0/debian/changelog apparmor-2.8.0/debian/changelog
--- apparmor-2.8.0/debian/changelog	2014-06-05 13:08:55.000000000 +0200
+++ apparmor-2.8.0/debian/changelog	2014-09-03 14:15:59.000000000 +0200
@@ -1,3 +1,9 @@
+apparmor (2.8.0-5.1+x32.1) unreleased; urgency=medium
+
+  * Work around lack of sysctl(2) on x32
+
+ -- Thorsten Glaser <t...@mirbsd.de>  Wed, 03 Sep 2014 14:15:42 +0200
+
 apparmor (2.8.0-5.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru apparmor-2.8.0/debian/patches/series apparmor-2.8.0/debian/patches/series
--- apparmor-2.8.0/debian/patches/series	2013-12-27 00:20:06.000000000 +0100
+++ apparmor-2.8.0/debian/patches/series	2014-09-03 14:13:43.000000000 +0200
@@ -38,3 +38,4 @@
 0037-easyprof-sdk-pt2.patch
 r2240-find-libs.patch
 r2247-fix-bison3.patch
+x32.patch
diff -Nru apparmor-2.8.0/debian/patches/x32.patch apparmor-2.8.0/debian/patches/x32.patch
--- apparmor-2.8.0/debian/patches/x32.patch	1970-01-01 01:00:00.000000000 +0100
+++ apparmor-2.8.0/debian/patches/x32.patch	2014-09-03 14:15:40.000000000 +0200
@@ -0,0 +1,14 @@
+--- a/parser/parser_main.c
++++ b/parser/parser_main.c
+@@ -38,7 +38,11 @@
+ 
+ #include <unistd.h>
+ #include <limits.h>
++#if (!(defined(__x86_64__) && defined(__ILP32__)))
++/* x32 has no sysctl support */
++/*XXX better autoconf this */
+ #include <sys/sysctl.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ 

Reply via email to