diff options
| author | Gilles Dartiguelongue <eva@gentoo.org> | 2017-08-16 12:17:13 +0200 |
|---|---|---|
| committer | Gilles Dartiguelongue <eva@gentoo.org> | 2017-08-16 12:18:00 +0200 |
| commit | 00117ca09fc8f3b3ee230e163c96b00eed3d5efd (patch) | |
| tree | 576c2d87f08d6e08963852da57eb97415186d438 /dev-python/python-slip/files | |
| parent | dffffdbbd53b1a6f36589bd05c75445f516a9884 (diff) | |
| download | gentoo-00117ca09fc8f3b3ee230e163c96b00eed3d5efd.tar.gz gentoo-00117ca09fc8f3b3ee230e163c96b00eed3d5efd.tar.bz2 gentoo-00117ca09fc8f3b3ee230e163c96b00eed3d5efd.zip | |
dev-python/python-slip: version bump 0.6.1 → 0.6.5
Fix homepage, bug #617614.
Package-Manager: Portage-2.3.7, Repoman-2.3.3
Diffstat (limited to 'dev-python/python-slip/files')
| -rw-r--r-- | dev-python/python-slip/files/python-slip-0.6.5-no-selinux.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/python-slip/files/python-slip-0.6.5-no-selinux.patch b/dev-python/python-slip/files/python-slip-0.6.5-no-selinux.patch new file mode 100644 index 000000000000..b957625f7ecd --- /dev/null +++ b/dev-python/python-slip/files/python-slip-0.6.5-no-selinux.patch @@ -0,0 +1,93 @@ +From 66480a1ee0222d9944f58af945959183b23c26f6 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev <tetromino@gentoo.org> +Date: Wed, 16 Aug 2017 10:49:43 +0200 +Subject: [PATCH] Disable selinux + +Signed-off-by: Gilles Dartiguelongue <eva@gentoo.org> +--- + setup.py.in | 2 +- + slip/util/files.py | 27 ++++++++++++++------------- + 2 files changed, 15 insertions(+), 14 deletions(-) + +diff --git a/setup.py.in b/setup.py.in +index 9e7644b..fb276a7 100644 +--- a/setup.py.in ++++ b/setup.py.in +@@ -8,7 +8,7 @@ setup(name="slip", version="@VERSION@", + py_modules=["slip.__init__", "slip.util.__init__", + "slip.util.hookable", "slip.util.files", + "slip._wrappers.__init__", "slip._wrappers._glib"], +- requires=["selinux"]) ++ requires=[]) + + setup(name="slip.dbus", version="@VERSION@", + py_modules=["slip.dbus.__init__", "slip.dbus.bus", +diff --git a/slip/util/files.py b/slip/util/files.py +index 98faa7c..a0a3768 100644 +--- a/slip/util/files.py ++++ b/slip/util/files.py +@@ -33,6 +33,7 @@ __all__ = ["issamefile", "linkfile", "copyfile", "linkorcopyfile", + + import os + import selinux ++# import selinux + import tempfile + import errno + import stat +@@ -140,8 +141,8 @@ def copyfile(srcpath, dstpath, copy_mode_from_dst=True, run_restorecon=True): + + os.rename(dsttmpfile.name, dstpath) + +- if run_restorecon and selinux.is_selinux_enabled() > 0: +- selinux.restorecon(dstpath) ++# if run_restorecon and selinux.is_selinux_enabled() > 0: ++# selinux.restorecon(dstpath) + + + def linkorcopyfile( +@@ -247,8 +248,8 @@ def overwrite_safely( + + exists = os.path.exists(path) + +- if preserve_context and selinux.is_selinux_enabled() <= 0: +- preserve_context = False ++# if preserve_context and selinux.is_selinux_enabled() <= 0: ++# preserve_context = False + + try: + fd, tmpname = tempfile.mkstemp(prefix=base + os.path.extsep, +@@ -263,10 +264,10 @@ def overwrite_safely( + if preserve_mode: + os.fchmod(fd, stat.S_IMODE(s.st_mode)) + +- if preserve_context: +- ret, ctx = selinux.getfilecon(path) +- if ret < 0: +- raise RuntimeError("getfilecon(%r) failed" % path) ++# if preserve_context: ++# ret, ctx = selinux.getfilecon(path) ++# if ret < 0: ++# raise RuntimeError("getfilecon(%r) failed" % path) + + f = os.fdopen(fd, "w") + fd = None +@@ -278,11 +279,11 @@ def overwrite_safely( + + os.rename(tmpname, path) + +- if preserve_context: +- if exists: +- selinux.setfilecon(path, ctx) +- else: +- selinux.restorecon(path) ++# if preserve_context: ++# if exists: ++# selinux.setfilecon(path, ctx) ++# else: ++# selinux.restorecon(path) + + finally: + if f: +-- +2.14.0 + |
