Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-slip/files/
Date: Thu, 29 Sep 2016 20:42:11
Message-Id: 1475181373.510e955cf08fdc3edd3d8fa19399728ba2a14aa1.monsieurp@gentoo
1 commit: 510e955cf08fdc3edd3d8fa19399728ba2a14aa1
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 14 17:12:59 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 29 20:36:13 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=510e955c
7
8 dev-python/python-slip: remove unused patch.
9
10 Closes: https://github.com/gentoo/gentoo/pull/2329
11
12 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
13
14 .../files/python-slip-0.2.20-no-selinux.patch | 93 ----------------------
15 1 file changed, 93 deletions(-)
16
17 diff --git a/dev-python/python-slip/files/python-slip-0.2.20-no-selinux.patch b/dev-python/python-slip/files/python-slip-0.2.20-no-selinux.patch
18 deleted file mode 100644
19 index b4ff165..00000000
20 --- a/dev-python/python-slip/files/python-slip-0.2.20-no-selinux.patch
21 +++ /dev/null
22 @@ -1,93 +0,0 @@
23 -From 13474db085f5ae550248d93ccf0f92b987f2244b Mon Sep 17 00:00:00 2001
24 -From: Alexandre Rostovtsev <tetromino@g.o>
25 -Date: Wed, 18 Jul 2012 20:07:01 -0400
26 -Subject: [PATCH] Disable selinux
27 -
28 ----
29 - setup.py.in | 2 +-
30 - slip/util/files.py | 28 ++++++++++++++--------------
31 - 2 files changed, 15 insertions(+), 15 deletions(-)
32 -
33 -diff --git a/setup.py.in b/setup.py.in
34 -index 554dc40..f3d9d55 100644
35 ---- a/setup.py.in
36 -+++ b/setup.py.in
37 -@@ -6,7 +6,7 @@ from distutils.core import setup
38 - setup(name="slip", version="@VERSION@",
39 - py_modules=["slip.__init__", "slip.util.__init__",
40 - "slip.util.hookable", "slip.util.files"],
41 -- requires=["selinux"])
42 -+ requires=[ ])
43 -
44 - setup(name="slip.dbus", version="@VERSION@",
45 - py_modules=["slip.dbus.__init__", "slip.dbus.bus",
46 -diff --git a/slip/util/files.py b/slip/util/files.py
47 -index 4e98238..141aa86 100644
48 ---- a/slip/util/files.py
49 -+++ b/slip/util/files.py
50 -@@ -24,7 +24,7 @@ __all__ = ["issamefile", "linkfile", "copyfile", "linkorcopyfile",
51 - "overwrite_safely"]
52 -
53 - import os
54 --import selinux
55 -+# import selinux
56 - import shutil
57 - import tempfile
58 - import errno
59 -@@ -135,8 +135,8 @@ def copyfile(srcpath, dstpath, copy_mode_from_dst=True, run_restorecon=True):
60 -
61 - os.rename(dsttmpfile.name, dstpath)
62 -
63 -- if run_restorecon and selinux.is_selinux_enabled() > 0:
64 -- selinux.restorecon(dstpath)
65 -+# if run_restorecon and selinux.is_selinux_enabled() > 0:
66 -+# selinux.restorecon(dstpath)
67 -
68 -
69 - def linkorcopyfile(srcpath, dstpath, copy_mode_from_dst=True,
70 -@@ -176,8 +176,8 @@ def overwrite_safely(path, content, preserve_mode=True, preserve_context=True):
71 -
72 - exists = os.path.exists(path)
73 -
74 -- if preserve_context and selinux.is_selinux_enabled() <= 0:
75 -- preserve_context = False
76 -+# if preserve_context and selinux.is_selinux_enabled() <= 0:
77 -+# preserve_context = False
78 -
79 - try:
80 - fd, tmpname = tempfile.mkstemp(prefix=base + os.path.extsep,
81 -@@ -186,10 +186,10 @@ def overwrite_safely(path, content, preserve_mode=True, preserve_context=True):
82 - if exists and preserve_mode:
83 - shutil.copymode(path, tmpname)
84 -
85 -- if exists and preserve_context:
86 -- ret, ctx = selinux.getfilecon(path)
87 -- if ret < 0:
88 -- raise RuntimeError("getfilecon(%r) failed" % path)
89 -+# if exists and preserve_context:
90 -+# ret, ctx = selinux.getfilecon(path)
91 -+# if ret < 0:
92 -+# raise RuntimeError("getfilecon(%r) failed" % path)
93 -
94 - f = os.fdopen(fd, "w")
95 - fd = None
96 -@@ -201,11 +201,11 @@ def overwrite_safely(path, content, preserve_mode=True, preserve_context=True):
97 -
98 - os.rename(tmpname, path)
99 -
100 -- if preserve_context:
101 -- if exists:
102 -- selinux.setfilecon(path, ctx)
103 -- else:
104 -- selinux.restorecon(path)
105 -+# if preserve_context:
106 -+# if exists:
107 -+# selinux.setfilecon(path, ctx)
108 -+# else:
109 -+# selinux.restorecon(path)
110 -
111 - finally:
112 - if f:
113 ---
114 -1.7.8.6
115 -