[policycoreutils] Add mgrepl patch to have sepolgen search for -systemd rpm packages

Daniel J Walsh dwalsh at fedoraproject.org
Thu Apr 26 17:55:44 UTC 2012


commit e6f13dc63b91e9d00328da86d6848291ddca84ee
Author: Dan Walsh <dwalsh at redhat.com>
Date:   Thu Apr 26 13:55:39 2012 -0400

    Add mgrepl patch to have sepolgen search for -systemd rpm packages

 policycoreutils-rhat.patch |   20 ++++++++++++++++++--
 policycoreutils.spec       |    5 ++++-
 2 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch
index 26f9c72..fecdb03 100644
--- a/policycoreutils-rhat.patch
+++ b/policycoreutils-rhat.patch
@@ -5948,10 +5948,10 @@ index 0000000..55bad9d
 +</glade-interface>
 diff --git a/policycoreutils/gui/polgen.py b/policycoreutils/gui/polgen.py
 new file mode 100644
-index 0000000..533b665
+index 0000000..04693e9
 --- /dev/null
 +++ b/policycoreutils/gui/polgen.py
-@@ -0,0 +1,1354 @@
+@@ -0,0 +1,1370 @@
 +#!/usr/bin/python -Es
 +#
 +# Copyright (C) 2007-2012 Red Hat 
@@ -7094,6 +7094,22 @@ index 0000000..533b665
 +                        else:
 +                            self.add_dir(f)
 +            fd.close()
++
++            # some packages have own systemd subpackage
++            # tor-systemd for example
++            binary_name = self.program.split("/")[-1]
++            rc, output = commands.getstatusoutput("rpm -q %s-systemd" % binary_name)
++            if rc == 0:
++                fd = os.popen("rpm -ql %s-systemd" % binary_name)
++                for f in fd.read().split():
++                    for b in self.DEFAULT_DIRS:
++                        if f.startswith(b):
++                            if os.path.isfile(f):
++                                self.add_file(f)
++                            else:
++                                self.add_dir(f)
++                fd.close()
++
 +            if os.path.isfile("/var/run/%s.pid"  % self.name):
 +                self.add_file("/var/run/%s.pid"  % self.name)
 +
diff --git a/policycoreutils.spec b/policycoreutils.spec
index 14efa4b..d25babe 100644
--- a/policycoreutils.spec
+++ b/policycoreutils.spec
@@ -7,7 +7,7 @@
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
 Version: 2.1.11
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2
 Group:	 System Environment/Base
 # Based on git repository with tag 20101221
@@ -340,6 +340,9 @@ fi
 %{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
 
 %changelog
+* Tue Apr 26 2012 Dan Walsh <dwalsh at redhat.com> - 2.1.11-8
+- Add mgrepl patch to have sepolgen search for -systemd rpm packages
+
 * Tue Apr 24 2012 Dan Walsh <dwalsh at redhat.com> - 2.1.11-7
 - Apply Stef Walter patch for semanage man page
 


More information about the scm-commits mailing list