diff --git a/apache-extra-profile-include-if-exists.diff b/apache-extra-profile-include-if-exists.diff new file mode 100644 index 0000000..747e868 --- /dev/null +++ b/apache-extra-profile-include-if-exists.diff @@ -0,0 +1,23 @@ +Make the include optional to avoid problems with empty profile dir. +Probably doesn't happen on real systems, but openQA uses an empty profile dir +for some tests. + +Note: the patch gets applied before moving the profile to the extra directory +because quilt doesn't run the 'mv' command and therefore fails to patch the +profile at its new location (extra profiles directory) + +Fixes https://bugzilla.opensuse.org/show_bug.cgi?id=1178527 + +Index: profiles/apparmor.d/usr.lib.apache2.mpm-prefork.apache2 +=================================================================== +--- profiles/apparmor.d//usr.lib.apache2.mpm-prefork.apache2.orig 2020-12-02 12:01:37.000000000 +0100 ++++ profiles/apparmor.d//usr.lib.apache2.mpm-prefork.apache2 2021-01-22 12:19:45.964708670 +0100 +@@ -75,7 +75,7 @@ include + # This directory contains web application + # package-specific apparmor files. + +- include ++ include if exists + + # Site-specific additions and overrides. See local/README for details. + include if exists diff --git a/apparmor.changes b/apparmor.changes index 2e64edd..2695d70 100644 --- a/apparmor.changes +++ b/apparmor.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jan 22 11:23:59 UTC 2021 - Christian Boltz + +- add apache-extra-profile-include-if-exists.diff: make + include in apache extra profile optional to avoid problems with empty + profile directory (boo#1178527) + ------------------------------------------------------------------- Wed Dec 2 19:29:34 UTC 2020 - Christian Boltz diff --git a/apparmor.spec b/apparmor.spec index 6142382..4a2b267 100644 --- a/apparmor.spec +++ b/apparmor.spec @@ -1,8 +1,8 @@ # # spec file for package apparmor # -# Copyright (c) 2020 SUSE LLC -# Copyright (c) 2011-2020 Christian Boltz +# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2011-2021 Christian Boltz # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -64,6 +64,9 @@ Patch4: apparmor-lessopen-profile.patch # workaround for boo#1119937 / lp#1784499 - allow network access for reading files on NFS (proper solution needs kernel fix) Patch5: apparmor-lessopen-nfs-workaround.diff +# make include in apache extra profile optional to make openQA happy (boo#1178527) +Patch6: apache-extra-profile-include-if-exists.diff + PreReq: sed BuildRoot: %{_tmppath}/%{name}-%{version}-build %define apparmor_bin_prefix /lib/apparmor @@ -318,6 +321,8 @@ SubDomain. %setup -q # very loose profile that doesn't even match the apache2 binary path in openSUSE. Move it away instead of confusing people (boo#872984) +# (patch to change include to "include if exists" needs to be applied before moving the file to avoid breaking quilt) +%patch6 mv -v profiles/apparmor.d/usr.lib.apache2.mpm-prefork.apache2 profiles/apparmor/profiles/extras/ %patch1 diff --git a/libapparmor.spec b/libapparmor.spec index 565dfe9..010b9eb 100644 --- a/libapparmor.spec +++ b/libapparmor.spec @@ -1,7 +1,7 @@ # # spec file for package libapparmor # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # Copyright (c) 2011-2020 Christian Boltz # # All modifications and additions to the file contributed by third parties