[apparmor] patch for apparmor-utils.spec

Christian Boltz apparmor at cboltz.de
Fri Jul 30 20:43:14 BST 2010


Hello,

the apparmor-utils RPM it totally broken on openSUSE 11.3 because the 
perl modules are in a directory that is no longer in @INC. See
https://bugzilla.novell.com/show_bug.cgi?id=619893 for details.

I have already submitted a patch to the security:apparmor:factory 
project in the openSUSE buildservice and hope the fix will get released 
as official update for 11.3.

However, I don't know if there are other relevant places where 
apparmor.spec "lives" (there are several instances of apparmor-utils in 
the buildservice, but most of them look quite outdated/unmaintained, and 
maybe the spec is also in the upstream repo).

Please apply the attached patch to every copy of apparmor-utils.spec ;-) 
- except the one in security:apparmor:factory because it's there 
already. The patch also contains a section for apparmor-utils.changes.


Regards,

Christian Boltz
-- 
> > Gibt's mehr Gehalt? ;)
> Du glaubst doch nicht wirklich, dass ich über solche Dinge öffentlich
> rede, oder?
Du brauchst ja keine Summe nennen. Es reicht wenn Du uns alle hier mal
auf eine Pizza einlädst ;-)))
[>> David Haller, > Philipp Thomas und Thorsten Körner in suse-linux]
-------------- next part --------------
old: security:apparmor:factory/apparmor-utils
new: home:cboltz:branches:security:apparmor:factory/apparmor-utils
Index: apparmor-utils.changes
===================================================================
--- apparmor-utils.changes (revision 8)
+++ apparmor-utils.changes (revision 7)
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Wed Jul  7 22:18:14 UTC 2010 - opensuse at cboltz.de
+
+- change perl module path to perl_vendorlib macro (hardcoded path broke, bnc#619893)
+
+-------------------------------------------------------------------
 Wed Apr 28 16:55:23 CEST 2010 - jeffm at suse.de
 
 - Updated translations.
Index: apparmor-utils.spec
===================================================================
--- apparmor-utils.spec (revision 8)
+++ apparmor-utils.spec (revision 7)
@@ -53,6 +53,15 @@
 Obsoletes:      subdomain-utils
 Provides:       subdomain-utils
 
+%if 0%{?suse_version} > 1120
+# openSUSE 11.3 no longer has /usr/lib/perl5/vendor_perl in @INC
+BuildRequires:  perl-macros
+Requires:       perl = %{perl_version}  
+    %define aa_perl_vendorlib %{perl_vendorlib}
+%else
+    %define aa_perl_vendorlib %{_prefix}/lib/perl5/vendor_perl
+%endif
+
 %description
 This package provides the aa-logprof, aa-genprof, aa-autodep,
 aa-enforce, and aa-complain tools to assist with profile authoring.
@@ -83,7 +92,7 @@
 %install
 make install DESTDIR=${RPM_BUILD_ROOT} DISTRO=%{distro} \
 	     BINDIR=${RPM_BUILD_ROOT}%{_prefix}/sbin/ \
-	     PERLDIR=${RPM_BUILD_ROOT}%{_prefix}/lib/perl5/vendor_perl/Immunix \
+	     PERLDIR=${RPM_BUILD_ROOT}%{aa_perl_vendorlib}/Immunix \
 	     MANDIR=%{_mandir}
 %find_lang %{name}
 
@@ -94,7 +103,7 @@
 %defattr(-,root,root)
 %config /etc/apparmor/*
 %{_prefix}/sbin/*
-%{_prefix}/lib/perl5/vendor_perl/*
+%{aa_perl_vendorlib}/*
 %dir /var/log/apparmor
 %dir /etc/apparmor
 %{_mandir}/man*/*



More information about the AppArmor mailing list