From 6410182343b72de6d5b34fc6bb1079eac01b891270d238b092f89ee6b5d2648c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 20 Aug 2020 10:56:43 +0000 Subject: [PATCH] Accepting request 825946 from home:kukuk:selinux - macros.selinux-policy: move rpm-state directory to /run and make sure it exists OBS-URL: https://build.opensuse.org/request/show/825946 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/selinux-policy?expand=0&rev=80 --- macros.selinux-policy | 7 ++++++- selinux-policy.changes | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/macros.selinux-policy b/macros.selinux-policy index 4a21d1e..0d8bb2a 100644 --- a/macros.selinux-policy +++ b/macros.selinux-policy @@ -16,6 +16,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +## Changes done for openSUSE/SUSE: +## - move /var/lib/rpm-state to /run/rpm-state and create that directory +## + # RPM macros for packages installing SELinux modules %_selinux_policy_version SELINUXPOLICYVERSION @@ -24,7 +28,7 @@ %_selinux_store_policy_path %{_selinux_store_path}/${_policytype} %_file_context_file %{_sysconfdir}/selinux/${SELINUXTYPE}/contexts/files/file_contexts -%_file_context_file_pre %{_localstatedir}/lib/rpm-state/file_contexts.pre +%_file_context_file_pre /run/rpm-state/file_contexts.pre %_file_custom_defined_booleans %{_selinux_store_policy_path}/rpmbooleans.custom %_file_custom_defined_booleans_tmp %{_selinux_store_policy_path}/rpmbooleans.custom.tmp @@ -88,6 +92,7 @@ if %{_sbindir}/selinuxenabled; then \ _policytype="targeted" \ fi \ if [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ + mkdir -p /run/rpm-state \ [ -f %{_file_context_file_pre} ] || cp -f %{_file_context_file} %{_file_context_file_pre} \ fi \ fi \ diff --git a/selinux-policy.changes b/selinux-policy.changes index 5764214..dffded0 100644 --- a/selinux-policy.changes +++ b/selinux-policy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 11 14:25:58 UTC 2020 - Thorsten Kukuk + +- macros.selinux-policy: move rpm-state directory to /run and + make sure it exists + ------------------------------------------------------------------- Wed Aug 5 11:29:05 UTC 2020 - Thorsten Kukuk