diff --git a/monitoring-plugins-sar-perf.changes b/monitoring-plugins-sar-perf.changes index c301c3d..f6283ab 100644 --- a/monitoring-plugins-sar-perf.changes +++ b/monitoring-plugins-sar-perf.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 22 12:25:03 UTC 2021 - Lars Vogdt + +- include abstractions/bash in apparmor profile - otherwise + the 'which iostat' command fails +- reload the apparmor profile in postun to make the changes effective + ------------------------------------------------------------------- Tue Jul 28 14:03:05 CEST 2020 - ro@suse.de diff --git a/monitoring-plugins-sar-perf.spec b/monitoring-plugins-sar-perf.spec index f6b06b9..d549d98 100644 --- a/monitoring-plugins-sar-perf.spec +++ b/monitoring-plugins-sar-perf.spec @@ -1,7 +1,7 @@ # # spec file for package monitoring-plugins-sar-perf # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -66,6 +66,17 @@ install -D -m755 check_sar_perf.py %{buildroot}/%{nagios_plugindir}/check_sar_pe install -m755 %{SOURCE1} %{buildroot}/%{nagios_plugindir}/check_iostat install -Dm0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat +%postun +if [ "$YAST_IS_RUNNING" != "instsys" ]; then + if [ -x /sbin/apparmor_parser ]; then + if /usr/bin/systemctl is-active --quiet apparmor.service; then + /sbin/apparmor_parser -r -T -W %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat &> /dev/null || : + fi + else + echo "Could not reload the Apparmor profile: /sbin/apparmor_parser is missing or not executable." + fi +fi + %clean rm -rf %{buildroot} diff --git a/usr.lib.nagios.plugins.check_iostat b/usr.lib.nagios.plugins.check_iostat index 6a6b18b..d603469 100644 --- a/usr.lib.nagios.plugins.check_iostat +++ b/usr.lib.nagios.plugins.check_iostat @@ -1,6 +1,7 @@ #include /usr/lib/nagios/plugins/check_iostat { #include + #include #include #include /usr/bin/iostat rix,