Compare commits

...

8 Commits

Author SHA1 Message Date
David Abdurachmanov 450c63dbef
Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-12-23 19:12:06 +02:00
David Abdurachmanov 96fe9d763e
Add extra setfiles (SELinux) log messages
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-10-03 13:53:36 +03:00
David Abdurachmanov 2ef55a53ea
Match master-riscv64 to f31 branch
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-10-03 13:51:54 +03:00
David Abdurachmanov c16271b274
Merge remote-tracking branch 'up/f31' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-10-03 13:51:31 +03:00
David Abdurachmanov fdfcc55a82
Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-08-01 10:37:42 +03:00
David Abdurachmanov 2a513334c6
Fix %changelog entry date
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-06-30 15:37:03 +02:00
David Abdurachmanov 927856c9e5
Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-06-30 15:35:15 +02:00
David Abdurachmanov 03754dbb42 Add support for riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-05-11 11:31:22 +02:00
2 changed files with 42 additions and 1 deletions

View File

@ -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.')

View File

@ -17,12 +17,14 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 27.1
Release: 4%{?dist}
Release: 4.0.riscv64%{?dist}
Epoch: 1
License: GPLv2
URL: https://github.com/livecd-tools/livecd-tools
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
Patch10: add-setfiles-logging.patch
%if %{with python2}
BuildRequires: python2-devel
%endif