From b205628235370faeeba00ef21e2690eecb580e13 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sat, 7 Sep 2019 01:58:42 +0300 Subject: [PATCH] patch: Debug SELinux relabling: print arguements of setfiles --- ...labling-print-arguements-of-setfiles.patch | 24 +++++++++++++++++++ livecd-tools.spec | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 0003-Debug-SELinux-relabling-print-arguements-of-setfiles.patch diff --git a/0003-Debug-SELinux-relabling-print-arguements-of-setfiles.patch b/0003-Debug-SELinux-relabling-print-arguements-of-setfiles.patch new file mode 100644 index 0000000..eca4a17 --- /dev/null +++ b/0003-Debug-SELinux-relabling-print-arguements-of-setfiles.patch @@ -0,0 +1,24 @@ +From 91c1f367a489713d13ee6a4d929a4749d859bff0 Mon Sep 17 00:00:00 2001 +From: Mikhail Novosyolov +Date: Sat, 7 Sep 2019 01:56:55 +0300 +Subject: [PATCH] Debug SELinux relabling: print arguements of setfiles + +--- + imgcreate/creator.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/imgcreate/creator.py b/imgcreate/creator.py +index cbd8d61..9a07f62 100644 +--- a/imgcreate/creator.py ++++ b/imgcreate/creator.py +@@ -461,6 +461,7 @@ class ImageCreator(object): + if kickstart.selinux_enabled(self.ks): + # label the fs like it is a root before the bind mounting + arglist = ["/sbin/setfiles", "-F", "-r", self._instroot, selinux.selinux_file_context_path(), self._instroot] ++ print("Running SELinux relabling: ", arglist) + subprocess.call(arglist, close_fds = True) + # these dumb things don't get magically fixed, so make the user generic + # if selinux exists on the host we need to lie to the chroot +-- +2.20.1 + diff --git a/livecd-tools.spec b/livecd-tools.spec index 90b9931..7d1b4b1 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -3,7 +3,7 @@ Summary: Tools for building live CDs Name: livecd-tools Version: 21.1 -Release: 59 +Release: 60 Epoch: 1 License: GPLv2+ Group: System/Base @@ -35,6 +35,7 @@ Patch22: livecd-tools-21.1.no.vga.opts.patch Patch23: livecd-tools-21.1-genisoimage.patch Patch24: 0001-Run-setfiles-after-chroot.patch Patch25: 0002-Get-system-architecture-by-bin-sh-executable-instead.patch +Patch26: 0003-Debug-SELinux-relabling-print-arguements-of-setfiles.patch Requires: python-imgcreate = %{EVRD} Requires: dosfstools