Compare commits
8 Commits
master
...
master-ris
Author | SHA1 | Date |
---|---|---|
David Abdurachmanov | 450c63dbef | |
David Abdurachmanov | 96fe9d763e | |
David Abdurachmanov | 2ef55a53ea | |
David Abdurachmanov | c16271b274 | |
David Abdurachmanov | fdfcc55a82 | |
David Abdurachmanov | 2a513334c6 | |
David Abdurachmanov | 927856c9e5 | |
David Abdurachmanov | 03754dbb42 |
|
@ -0,0 +1,39 @@
|
||||||
|
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
|
||||||
|
index 692d287..bb68111 100644
|
||||||
|
--- a/imgcreate/creator.py
|
||||||
|
+++ b/imgcreate/creator.py
|
||||||
|
@@ -493,12 +493,14 @@ class ImageCreator(object):
|
||||||
|
# label the fs like it is a root before the bind mounting
|
||||||
|
arglist = ["setfiles", "-F", "-r", self._instroot,
|
||||||
|
selinux.selinux_file_context_path(), self._instroot]
|
||||||
|
+ logging.info("Executing: %s" % " ".join(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
|
||||||
|
if selinux.is_selinux_enabled():
|
||||||
|
for f in ("/proc", "/sys"):
|
||||||
|
arglist = ["chcon", "-u", "system_u", self._instroot + f]
|
||||||
|
+ logging.info("Executing: %s" % " ".join(arglist))
|
||||||
|
subprocess.call(arglist, close_fds = True)
|
||||||
|
|
||||||
|
def __destroy_selinuxfs(self):
|
||||||
|
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
|
||||||
|
index 62396b3..9ae55b7 100644
|
||||||
|
--- a/imgcreate/kickstart.py
|
||||||
|
+++ b/imgcreate/kickstart.py
|
||||||
|
@@ -479,10 +479,11 @@ class SelinuxConfig(KickstartConfig):
|
||||||
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
- rc = subprocess.call(['setfiles', '-p', '-e', '/proc',
|
||||||
|
- '-e', '/sys', '-e', '/dev',
|
||||||
|
- selinux.selinux_file_context_path(), '/'],
|
||||||
|
- preexec_fn=self.chroot)
|
||||||
|
+ arglist = ['setfiles', '-p', '-e', '/proc',
|
||||||
|
+ '-e', '/sys', '-e', '/dev',
|
||||||
|
+ selinux.selinux_file_context_path(), '/']
|
||||||
|
+ logging.info('Executing: %s' % " ".join(arglist))
|
||||||
|
+ rc = subprocess.call(arglist, preexec_fn=self.chroot)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno == errno.ENOENT:
|
||||||
|
logging.info('The setfiles command is not available.')
|
|
@ -17,12 +17,14 @@
|
||||||
Summary: Tools for building live CDs
|
Summary: Tools for building live CDs
|
||||||
Name: livecd-tools
|
Name: livecd-tools
|
||||||
Version: 27.1
|
Version: 27.1
|
||||||
Release: 4%{?dist}
|
Release: 4.0.riscv64%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://github.com/livecd-tools/livecd-tools
|
URL: https://github.com/livecd-tools/livecd-tools
|
||||||
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
|
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch10: add-setfiles-logging.patch
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
Loading…
Reference in New Issue