File apache-extra-profile-include-if-exists.diff of Package apparmor

Make the <apache2.d> 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)


Index: profiles/apparmor/profiles/extras/usr.lib.apache2.mpm-prefork.apache2
--- profiles/apparmor/profiles/extras/usr.lib.apache2.mpm-prefork.apache2.orig	2020-12-02 12:01:37.000000000 +0100
+++ profiles/apparmor/profiles/extras/usr.lib.apache2.mpm-prefork.apache2	2021-01-22 12:19:45.964708670 +0100
@@ -75,7 +75,7 @@ include <tunables/global>
   # This directory contains web application
   # package-specific apparmor files.
-  include <apache2.d>
+  include if exists <apache2.d>
   # Site-specific additions and overrides. See local/README for details.
   include if exists <local/usr.lib.apache2.mpm-prefork.apache2>
openSUSE Build Service is sponsored by