[livecd-tools/f14/master] Fix relabel of live image when composing on a host wtih selinux disabled.

Bruno Wolff III bruno at fedoraproject.org
Mon Sep 27 04:02:00 UTC 2010


commit 0c58711fcde3bfa980ccd7951c59601358031871
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Sep 26 23:01:16 2010 -0500

    Fix relabel of live image when composing on a host wtih selinux disabled.

 livecd-tools.spec |    7 ++++++-
 selinux.patch     |   13 +++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/livecd-tools.spec b/livecd-tools.spec
index 2f815a9..4a92f74 100644
--- a/livecd-tools.spec
+++ b/livecd-tools.spec
@@ -5,7 +5,7 @@
 Summary: Tools for building live CDs
 Name: livecd-tools
 Version: 034
-Release: 10%{?dist}
+Release: 11%{?dist}
 License: GPLv2
 Group: System Environment/Base
 URL: http://git.fedorahosted.org/git/livecd
@@ -21,6 +21,7 @@ Patch2: menulabel.patch
 Patch3: devloop.patch
 Patch4: livecd-tools-034-newpath.patch
 Patch5: lzo.patch
+Patch6: selinux.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: python-imgcreate = %{version}-%{release}
 Requires: mkisofs
@@ -71,6 +72,7 @@ like live image or appliances.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 make
@@ -103,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/imgcreate/*.pyc
 
 %changelog
+* Sun Sep 26 2010 Bruno Wolff III <bruno at wolff.to> - 034-11
+- Fix live image relabel when compose host has selinux disabled.
+
 * Tue Sep 21 2010 Bruno Wolff III <bruno at wolff.to> - 034-10
 - Document the lzo compressor.
 
diff --git a/selinux.patch b/selinux.patch
new file mode 100644
index 0000000..fbf6ba7
--- /dev/null
+++ b/selinux.patch
@@ -0,0 +1,13 @@
+diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
+index aa2cff0..9a2145a 100644
+--- a/imgcreate/kickstart.py
++++ b/imgcreate/kickstart.py
+@@ -420,7 +420,7 @@ class SelinuxConfig(KickstartConfig):
+         if not os.path.exists(self.path("/sbin/setfiles")):
+             return
+ 
+-        self.call(["/sbin/setfiles", "/etc/selinux/targeted/contexts/files/file_contexts", "-e", "/proc", "-e", "/sys", "-e", "/dev", "-e", "/selinux", "/"])
++        self.call(["/sbin/setfiles", "-e", "/proc", "-e", "/sys", "-e", "/dev", "-e", "/selinux", "/etc/selinux/targeted/contexts/files/file_contexts", "/"])
+ 
+     def apply(self, ksselinux):
+         if os.path.exists(self.path("/usr/sbin/lokkit")):


More information about the scm-commits mailing list