diff --git a/apparmor.changes b/apparmor.changes index 2c48515..5296b6e 100644 --- a/apparmor.changes +++ b/apparmor.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 12 21:13:23 UTC 2015 - opensuse@cboltz.de + +- only install apparmor.service for openSUSE > 13.2 + ------------------------------------------------------------------- Wed Apr 1 03:47:44 UTC 2015 - crrodriguez@opensuse.org diff --git a/apparmor.spec b/apparmor.spec index 44573c5..f5b93ba 100644 --- a/apparmor.spec +++ b/apparmor.spec @@ -2,7 +2,7 @@ # spec file for package apparmor # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2011-2014 Christian Boltz +# Copyright (c) 2011-2015 Christian Boltz # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -83,6 +83,8 @@ Patch2: apparmor-samba-include-permissions-for-shares.diff Patch3: apparmor-utils-string-split # Add support for eDirectory calls in abstractions/nameservice. Not accepted upstream (yet) because of open questions +# as discussed with Jeff on #apparmor 2015-03-16, disable when packaging the next major release +# (Is this really needed in abstractions/nameservice or only in the nscd profile? bnc#621394 only shows nscd.) Patch4: apparmor-2.5.1-edirectory-profile # Ruby 2.0 mkmf prefixes everything with $(DESTDIR), bnc#822277, kkaempf@suse.de @@ -151,8 +153,10 @@ BuildRequires: java-devel >= 1.6.0 BuildRequires: tomcat6 %endif +%if 0%{?suse_version} > 1320 BuildRequires: systemd-rpm-macros %{?systemd_requires} +%endif %package parser Summary: AppArmor userlevel parser utility @@ -598,7 +602,9 @@ done # remove *.la files rm -fv %{buildroot}%{_libdir}/libapparmor.la +%if 0%{?suse_version} > 1320 install -D -m0644 %{S:8} %{buildroot}%{_unitdir}/apparmor.service +%endif echo ------------------------------------------------------------------- #find -ls @@ -631,7 +637,9 @@ echo ------------------------------------------------------------------- %else %{_sysconfdir}/init.d/apparmor %endif +%if 0%{?suse_version} > 1320 %{_unitdir}/apparmor.service +%endif %config(noreplace) %{_sysconfdir}/apparmor/subdomain.conf %config(noreplace) %{_sysconfdir}/apparmor/parser.conf %{_localstatedir}/lib/apparmor @@ -647,7 +655,9 @@ echo ------------------------------------------------------------------- if [ -f %{_sysconfdir}/init.d/subdomain ] ; then chkconfig --del subdomain fi +%if 0%{?suse_version} > 1320 %service_add_pre apparmor.service +%endif %files parser-lang -f apparmor-parser.lang @@ -832,7 +842,9 @@ fi fi %endif +%if 0%{?suse_version} > 1320 %service_add_post apparmor.service +%endif %preun parser if [ "$1" = 0 ] ; then @@ -844,7 +856,9 @@ if [ "$1" = 0 ] ; then %endif fi +%if 0%{?suse_version} > 1320 %service_del_preun apparmor.service +%endif %postun parser %if %{distro} == "suse" @@ -860,7 +874,9 @@ fi %{insserv_cleanup} || true %endif +%if 0%{?suse_version} > 1320 %service_del_postun apparmor.service +%endif %post abstractions %if %{distro} == "suse"