rpms/mrepo/F-12 mrepo-selinux.patch,NONE,1.1 mrepo.spec,1.5,1.6
Jussi Lehtola
jussilehtola at fedoraproject.org
Mon May 10 21:14:41 UTC 2010
Author: jussilehtola
Update of /cvs/pkgs/rpms/mrepo/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2573/F-12
Modified Files:
mrepo.spec
Added Files:
mrepo-selinux.patch
Log Message:
Patch to get ISO mounting working under SELinux (#589755).
mrepo-selinux.patch:
mrepo | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- NEW FILE mrepo-selinux.patch ---
diff -up mrepo-0.8.6/mrepo.orig mrepo-0.8.6/mrepo
--- mrepo-0.8.6/mrepo.orig 2008-10-06 23:46:37.000000000 +0300
+++ mrepo-0.8.6/mrepo 2010-05-10 23:55:45.121368657 +0300
@@ -18,6 +18,7 @@ from __future__ import generators # for
import os, sys, glob, re, shutil, getopt, popen2
import ConfigParser, urlparse, sha, types, traceback
import time
+import selinux
__version__ = "$Revision: 6444 $"
# $Source$
@@ -517,8 +518,8 @@ class Dist:
opts = '-o loop,ro'
extra_opts = ''
mount_cmd = cf.cmd['mount']
- if readfile('/selinux/enforce') == '1':
- opts = opts + ',context=system_u:object_r:httpd_sys_content_t'
+ if selinux.is_selinux_enabled() == '1':
+ opts = opts + ',context=system_u:object_r:httpd_sys_content_t:s0'
for iso in self.isos:
if cf.shareiso:
symlink(iso, os.path.join(self.dir, 'iso'))
Index: mrepo.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mrepo/F-12/mrepo.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- mrepo.spec 18 Oct 2009 19:31:00 -0000 1.5
+++ mrepo.spec 10 May 2010 21:14:41 -0000 1.6
@@ -1,6 +1,6 @@
Name: mrepo
Version: 0.8.6
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: A tool to set up a yum/apt mirror from various sources
License: GPLv2
Group: System Environment/Base
@@ -8,6 +8,8 @@ URL: http://dag.wieers.com/home-made/mr
Source0: http://dag.wieers.com/home-made/mrepo/mrepo-%{version}.tar.bz2
# Patch initfile to conform to new standards
Patch0: mrepo-initd.patch
+# Patch to make mounting of ISOs possible with SELinux
+Patch1: mrepo-selinux.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
@@ -15,6 +17,8 @@ BuildRequires: python-devel
# Needed for operation
Requires: createrepo
+# For SELinux compatibility
+Requires: libselinux-python
## For dir ownership
# vixie-cron in older distros, cronie in newer ones; filelist of sbindir is always available
Requires: %{_sbindir}/crond
@@ -47,6 +51,7 @@ allow installations via the network.
%prep
%setup -q
%patch0 -p1 -b .init
+%patch1 -p1 -b .selinux
# Stop if file has content, remove empty file
[ -s client-configuration.txt ] && exit 1
@@ -124,6 +129,9 @@ rm -rf %{buildroot}
%{_localstatedir}/mrepo/
%changelog
+* Mon May 10 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 0.8.6-6
+- Patch to get iso mounting working with SElinux (#589755).
+
* Sun Oct 18 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 0.8.6-5
- Generalize webserver requirement.
More information about the scm-commits
mailing list