From 4fe81390101bb73fb06e616803081a05ac8e23c6 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Fri, 8 Feb 2013 13:32:54 -0500 Subject: [PATCH] Fix post install scripts to not use systemd macros --- policycoreutils-nosub.patch | 33 +++++++++++++++++++++++++++++++++ policycoreutils.spec | 4 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 policycoreutils-nosub.patch diff --git a/policycoreutils-nosub.patch b/policycoreutils-nosub.patch new file mode 100644 index 0000000..2c3b533 --- /dev/null +++ b/policycoreutils-nosub.patch @@ -0,0 +1,33 @@ +diff -up policycoreutils-2.1.13/semanage/seobject.py~ policycoreutils-2.1.13/semanage/seobject.py +--- policycoreutils-2.1.13/semanage/seobject.py~ 2013-02-08 12:36:21.408442611 -0500 ++++ policycoreutils-2.1.13/semanage/seobject.py 2013-02-08 12:36:53.963553141 -0500 +@@ -1992,8 +1992,6 @@ class booleanRecords(semanageRecords): + self.modify_local = False + + def __mod(self, name, value): +- name = selinux.selinux_boolean_sub(name) +- + (rc, k) = semanage_bool_key_create(self.sh, name) + if rc < 0: + raise ValueError(_("Could not create a key for %s") % name) +@@ -2043,8 +2041,6 @@ class booleanRecords(semanageRecords): + self.commit() + + def __delete(self, name): +- name = selinux.selinux_boolean_sub(name) +- + (rc, k) = semanage_bool_key_create(self.sh, name) + if rc < 0: + raise ValueError(_("Could not create a key for %s") % name) +@@ -2108,11 +2104,9 @@ class booleanRecords(semanageRecords): + return ddict + + def get_desc(self, name): +- name = selinux.selinux_boolean_sub(name) + return boolean_desc(name) + + def get_category(self, name): +- name = selinux.selinux_boolean_sub(name) + return boolean_category(name) + + def customized(self): diff --git a/policycoreutils.spec b/policycoreutils.spec index 6e5d156..a88db4e 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -4,7 +4,7 @@ Summary: SELinux policy core utilities Name: policycoreutils Version: 2.1.13 -Release: 27.2%{?dist} +Release: 27.3%{?dist} License: GPLv2 Group: System Environment/Base # Based on git repository with tag 20101221 @@ -20,6 +20,7 @@ Source8: policycoreutils_man_ru2.tar.bz2 Source10: restorecond.service Patch: policycoreutils-rhat.patch Patch1: policycoreutils-sepolgen.patch +Patch2: policycoreutils-nosub.patch Obsoletes: policycoreutils < 2.0.61-2 Conflicts: filesystem < 3 Provides: /sbin/fixfiles @@ -60,6 +61,7 @@ to switch roles. %setup -q -a 1 %patch -p2 -b .rhat %patch1 -p2 -b .sepolgen -d sepolgen-%{sepolgenver} +%patch2 -p1 -b .nosub %build make LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all