From bf855689fe56afca5fd8191c2a378b6768106213431c84809376c8460ec81511 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 5 Mar 2024 09:07:30 +0000 Subject: [PATCH] Accepting request 1149294 from home:kukuk:no-utmp - Allow to disable apparmor support (ALP supports only SELinux) OBS-URL: https://build.opensuse.org/request/show/1149294 OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=175 --- ghostscript.changes | 5 +++++ ghostscript.spec | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ghostscript.changes b/ghostscript.changes index c3ecf91..4370ccf 100644 --- a/ghostscript.changes +++ b/ghostscript.changes @@ -3,6 +3,11 @@ Tue Feb 27 10:59:43 UTC 2024 - Dominique Leuenberger - Use %patch -P N instead of deprecated %patchN. +------------------------------------------------------------------- +Thu Feb 22 09:07:33 UTC 2024 - Thorsten Kukuk + +- Allow to disable apparmor support (ALP supports only SELinux) + ------------------------------------------------------------------- Sun Jan 28 10:39:57 UTC 2024 - Dirk Müller diff --git a/ghostscript.spec b/ghostscript.spec index 114cdc7..3463fac 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -21,6 +21,7 @@ %global psuffix -mini %else %global psuffix %{nil} +%bcond_without apparmor %endif Name: ghostscript%{psuffix} Version: 10.02.1 @@ -78,11 +79,13 @@ BuildRequires: cups154-devel %else BuildRequires: cups-devel %endif +%if %{with apparmor} %if 0%{?suse_version} >= 1500 BuildRequires: apparmor-abstractions BuildRequires: apparmor-rpm-macros %endif %endif +%endif # Always check if latest version of openjpeg becomes compatible with ghostscript %if 0%{?suse_version} >= 1550 BuildRequires: pkgconfig(libopenjp2) >= 2.3.1 @@ -305,9 +308,11 @@ done # Switch back to the usual build log messages: set -x install -m 644 catalog.devices $DOCDIR +%if %{with apparmor} %if "%{flavor}" != "mini" install -D -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/apparmor.d/ghostscript %endif +%endif # Move /usr/bin/gs to /usr/bin/gs.bin to be able to use update-alternatives install -d %{buildroot}%{_sysconfdir}/alternatives @@ -317,11 +322,13 @@ ln -sf %{_sysconfdir}/alternatives/gs %{buildroot}%{_bindir}/gs %post /sbin/ldconfig +%if %{with apparmor} %if "%{flavor}" != "mini" %if 0%{?suse_version} >= 1500 %apparmor_reload %{_sysconfdir}/apparmor.d/ghostscript %endif %endif +%endif %{_sbindir}/update-alternatives \ --install %{_bindir}/gs gs %{_bindir}/gs.bin 15 @@ -399,10 +406,12 @@ fi %{_libdir}/libijs-0.35.so %if "%{flavor}" != "mini" %exclude %{_libdir}/ghostscript/%{version}/X11.so +%if %{with apparmor} %if 0%{?suse_version} < 1500 %dir %{_sysconfdir}/apparmor.d %endif %{_sysconfdir}/apparmor.d/ghostscript +%endif %files x11 %{_libdir}/ghostscript/%{version}/X11.so