Cannot compile on raspberry

Bug #1503923 reported by Mario G
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
New
Undecided
Unassigned

Bug Description

Hi,

When trying to compile apparmor 2.9.2 or 2.10 in a raspberry, it gives some errors when any profile is not created (when I have not the profile application installed, like apache2). Error is in the "make check" phase of the "parser" directory.

---------
Error example:

$ fakeroot debian/rules binary

# Fix rpath in pam_apparmor.so
chrpath -d /home/pi/apparmor/apparmor-2.9.2/debian/tmp/lib/security/pam_apparmor.so
# Profiles
# We'd like to keep site.local from being a conffile
rm ./profiles/apparmor.d/tunables/xdg-user-dirs.d/site.local
rm: can't delete «./profiles/apparmor.d/tunables/xdg-user-dirs.d/site.local»: No such file
debian/rules:79: recipe for target 'override_dh_auto_install' failed
make[1]: *** [override_dh_auto_install] Error 1
make[1]: Leaving directory '/home/pi/apparmor/apparmor-2.9.2'
debian/rules:11: recipe for target 'binary' failed
make: *** [binary] Error 2

--------
I have tried compiling it following your description and also trying to compile a deb.
When trying to compiling in a .deb package, I follow this link: http://ubuntuforums.org/showthread.php?t=2198529

Thanks!

Mario G (magarto)
description: updated
description: updated
description: updated
Mario G (magarto)
description: updated
Revision history for this message
Mario G (magarto) wrote :

I managed to install it but I had to do all the following things:

$ touch ./profiles/apparmor.d/tunables/xdg-user-dirs.d/site.local
$ sudo apt-get install xdg-user-dirs apache2

description: updated
Revision history for this message
Seth Arnold (seth-arnold) wrote :

The following patch should do the trick:

--- wily/apparmor-2.10/debian/rules 2015-05-07 16:42:50.000000000 -0700
+++ wily.fixed/apparmor-2.10/debian/rules 2015-10-07 17:40:48.754397618 -0700
@@ -137,7 +137,7 @@

  # Profiles
  # We'd like to keep site.local from being a conffile
- rm ./profiles/apparmor.d/tunables/xdg-user-dirs.d/site.local
+ rm -f ./profiles/apparmor.d/tunables/xdg-user-dirs.d/site.local
  cd profiles; $(MAKE) \
      DESTDIR=$(CURDIR)/debian/tmp \
      EXTRAS_DEST=$(CURDIR)/debian/tmp/usr/share/doc/apparmor-profiles/extras \

I wonder about executing these debian/rules commands on a 'live' system though, rather than using sbuild to build the package in a chroot environment. These rules are tested and expected to run in a temporary build environment, and if your local system actually had a file in that location that you cared about, building the .deb "by hand" would destroy it -- and perhaps other files you care about.

You're not the first to report this specific error but I really think the better answer is to use sbuild to build debs.

Thanks

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Oh, I'm just now noticing the leading dot.

Still, package builds with sbuild are far preferable to building them by hand.

Thanks

Revision history for this message
Mario G (magarto) wrote :

Hi! Thanks, it works.

Yes, fakeroot is not the best way to compile but the best to include some debian environments, like including an init.d / service scripts and so on.
I will try to compile 2.10 with sbuild anyway :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.