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 49 additions and 16 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,14 +17,14 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 27.1
Release: 6%{?dist}
%if 0%{?fedora}
Release: 4.0.riscv64%{?dist}
Epoch: 1
%endif
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
@ -34,16 +34,16 @@ BuildRequires: python3-devel
BuildRequires: /usr/bin/pod2man
%if %{with python3}
Requires: python3-imgcreate = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: python3-imgcreate = %{epoch}:%{version}-%{release}
%else
Requires: python2-imgcreate = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: python2-imgcreate = %{epoch}:%{version}-%{release}
%endif
# For splitting out livecd-iso-to-disk to separate subpackage
Conflicts: livecd-tools < 25.0
%ifarch %{ix86} x86_64
Requires: livecd-iso-to-mediums = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: livecd-iso-to-mediums = %{epoch}:%{version}-%{release}
%endif
%description
@ -94,7 +94,7 @@ Requires: selinux-policy-targeted
Requires: dracut
%if ! %{with python2}
Obsoletes: python2-imgcreate < %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: python2-imgcreate < %{epoch}:%{version}-%{release}
%endif
%description -n python-imgcreate-sysdeps
@ -105,7 +105,7 @@ python-imgcreate.
%package -n python2-imgcreate
Summary: Python 2 modules for building system images
%{?python_provide:%python_provide python2-imgcreate}
Requires: python-imgcreate-sysdeps%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: python-imgcreate-sysdeps%{?_isa} = %{epoch}:%{version}-%{release}
Requires: python2-dnf >= 1.1.0
%if 0%{?rhel} && 0%{?rhel} < 8
Requires: pyparted
@ -130,7 +130,7 @@ like live image or appliances.
%package -n python3-imgcreate
Summary: Python 3 modules for building system images
%{?python_provide:%python_provide python3-imgcreate}
Requires: python-imgcreate-sysdeps%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: python-imgcreate-sysdeps%{?_isa} = %{epoch}:%{version}-%{release}
Requires: python3-pyparted
Requires: python3-dnf >= 1.1.0
Requires: python3-kickstart
@ -146,7 +146,7 @@ like live image or appliances.
%ifarch %{ix86} x86_64
%package -n livecd-iso-to-mediums
Summary: Tools for installing ISOs to different mediums
Requires: python-imgcreate-sysdeps%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: python-imgcreate-sysdeps%{?_isa} = %{epoch}:%{version}-%{release}
Conflicts: livecd-tools < 25.0
%description -n livecd-iso-to-mediums
@ -219,12 +219,6 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%endif
%changelog
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1:27.1-6
- Rebuilt for Python 3.9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:27.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:27.1-4
- Rebuilt for Python 3.8.0rc1 (#1748018)