From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-python/python-slip/Manifest | 9 +++ .../files/python-slip-0.4.0-no-selinux.patch | 93 ++++++++++++++++++++++ .../files/python-slip-0.6.5-no-selinux.patch | 93 ++++++++++++++++++++++ dev-python/python-slip/metadata.xml | 8 ++ dev-python/python-slip/python-slip-0.6.1.ebuild | 44 ++++++++++ dev-python/python-slip/python-slip-0.6.5.ebuild | 44 ++++++++++ 6 files changed, 291 insertions(+) create mode 100644 dev-python/python-slip/Manifest create mode 100644 dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch create mode 100644 dev-python/python-slip/files/python-slip-0.6.5-no-selinux.patch create mode 100644 dev-python/python-slip/metadata.xml create mode 100644 dev-python/python-slip/python-slip-0.6.1.ebuild create mode 100644 dev-python/python-slip/python-slip-0.6.5.ebuild (limited to 'dev-python/python-slip') diff --git a/dev-python/python-slip/Manifest b/dev-python/python-slip/Manifest new file mode 100644 index 000000000000..9cee6779e6e7 --- /dev/null +++ b/dev-python/python-slip/Manifest @@ -0,0 +1,9 @@ +AUX python-slip-0.4.0-no-selinux.patch 3129 SHA256 b174198c292807362be6ee6c977e1e275dbd2cd515591dd5b9ed8b401b7f7f8b SHA512 14ff496a0d27805eee2bb45ce73c799d5bcdfb12d5bc7a2b5bee0989c9c5d6d6b79bfeb41f06e2de132dcfae220176cc1fb13272e29ad2810e37083f030c4d8c WHIRLPOOL 1de930a015f7418e63a1ff6f443d52de94e6669336550cf334944cee61ea536ec50303d5c0878b3d00677ac2c5ed1dfffbe93b6c11ba7e648c3fb205a6ebf166 +AUX python-slip-0.6.5-no-selinux.patch 2942 SHA256 8d3865dd3cf9e600c8f5c20a2809f35e0c1c938a75dc28392637006e41814792 SHA512 64a742f93a38a2ff15d98e9d22c30a821ecd2044457ac958bf34cd7fd8e333b16a5fd56e80b169cc67c9ab35d13298d0caf418ad7a693372539701bda56f123e WHIRLPOOL 1872eb21fba15b72a12788915e73362d4f19db1f13b686d0935bcc1b1090275689d79f2b7aecf351a4249d075d9bd945d93e4cbaae94b9f068d849f7ee8d971c +DIST python-slip-0.6.1.tar.bz2 25000 SHA256 bc897f1ab6f5b4989f85548799aaeb84fde67bbba18e40341bfe1d7885c2fd9a SHA512 d7d79b8ee4468d3a3b5e2ff31dcc8af30f70591ba42f74af9787e5c883a137e85c39a6ffc7c36cd2383840aa4ca09cd1ca3d9e40fc4d266b37689a85f084a9ab WHIRLPOOL 95595c7cc45bd403fa8ed1a5a36e32bbcce7aa621ff2d86503487174279e996e3839e7c3033a771274c944f46591f819a0ab1981e1301c4a13757f4787c2586b +DIST python-slip-0.6.5.tar.bz2 25996 SHA256 c726c086f0dd93a0ac7a0176f383a12af91b6657b78a301e3f5b25d9f8d4d10b SHA512 84dfd4d74602e996797261aa4021fc1579a6aba554d2b3d497c0a7b8618366a9c0a6f12051b00c5653845dda923eedb58afdded37f2a1f31b5b0ce1a0532ccff WHIRLPOOL 54f9d0663cbfada42ab1fee2372919dae7960326719bced4da2e31167a9a92894ec7a0e9ce439cc659fc7511c22d47fe25a6ccf83ffe84ff830b55ca153bdda0 +EBUILD python-slip-0.6.1.ebuild 1179 SHA256 7fc5a1417d4b57ae4f4c74caf506cd148f293fec9c7aa745695f75fa6c14e0bb SHA512 08b5d9f0ef54fe15bf02de1d8d732b8bc7bb0a010daf58fdf2c3dba7c568cc220eea01903d3e42fd3c281ffdad11e9a807e48d24a73c5fc0e36baebdc6a834d4 WHIRLPOOL 05fc2e5946e854ebb989898be7c5e54d20c5b740f0aeed16541531b80e276a521e1cac89f136512a0ea0b675e3abd92de79e335b3e8deeecc2b2228d2b03428f +EBUILD python-slip-0.6.5.ebuild 1198 SHA256 117b51bc4439402f3edaec59ebf3cd05770cdcaf6387e77124d821435d2da053 SHA512 54474d1b5cf988e5fa52d509ceeab2c47a74509dc11d3cd01cd1a02914efae37e939024c49e30e88bf2634491b16b1eb75cabd462c15227da24be28dcc4ccc2e WHIRLPOOL 350eb7218504bec5daf4f7e61c5e201fb7c202dffbffd1b6e33eb33818f4791b7d06168cce9de61857635837657d92a523b031d129c4f2e851a673a9c3dcc3b6 +MISC ChangeLog 2987 SHA256 d32e02820a50d6db048e5edcaa7651a28e0d412648e5f3d4f239f826ab626fbb SHA512 cecd94f850b57e02789a2c89aaf0fe774d8ee4e3b76e616ccacfebf31aa56e1c00db4b05e7cbaae6e42df99c99c01473294aa05aa81d5f7bb9be3b60f9d7824b WHIRLPOOL de5b333c8a795ad4995c2309e4020ceed64d64bdcf57bdd88aa33d41028aaccab8ab6b58172d26a6f7867f067f41eefad2c3570134b49da79632f277de3f1c2e +MISC ChangeLog-2015 3277 SHA256 7395b505c2c46ef5cda461eb5608618e052b8e924d5e4dfe0124d84b0503ed09 SHA512 2c7580842aebb6ba2f7b18f55088d94e08f6bce1dc7fa94690b93e33e375072b62c894e131596f4fbfd460d213151d65fc45c4350d161ed9c395e5f4064fa459 WHIRLPOOL e27d1a8c837a57e58dd693443d380d592d861f9f7b610689b06d0cfccd9f7b3160bfe5f3bbe2a9536711efdcb45327a01bc08f738cd6172f1cc91fb482ccb020 +MISC metadata.xml 249 SHA256 4505b0bfeadff287958620b7dc7b7209699065a8f17139a237a5dd409a726a97 SHA512 c40662134899a5c9f0369a1017806f35adf3280a0b3c91726f7a8ca6012a073a8b471583f5bfb6fe95faac1dcf607e8e2e43f8c91d48ec46f4a8824e2f551506 WHIRLPOOL 333a938ee1d2124595596c572697bf5ebad523a92ba12005cfb12e6bb6270881a94a911f0cc9c1cf2bb571559e8271e07dfd307dabe50058236dbe7103562b92 diff --git a/dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch b/dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch new file mode 100644 index 000000000000..08a4fa80b880 --- /dev/null +++ b/dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch @@ -0,0 +1,93 @@ +From a7bfeeb479d28c9a880d2a08d0102978fa711237 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev +Date: Wed, 18 Jul 2012 20:07:01 -0400 +Subject: [PATCH] Disable selinux + +--- + setup.py.in | 2 +- + slip/util/files.py | 28 ++++++++++++++-------------- + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/setup.py.in b/setup.py.in +index d670ed5..d5b8db8 100644 +--- a/setup.py.in ++++ b/setup.py.in +@@ -7,7 +7,7 @@ setup(name="slip", version="@VERSION@", + py_modules=["slip.__init__", "slip.util.__init__", + "slip.util.hookable", "slip.util.files", + "slip._wrappers.__init__", "slip._wrappers._gobject"], +- 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 27ba45c..53869f6 100644 +--- a/slip/util/files.py ++++ b/slip/util/files.py +@@ -24,7 +24,7 @@ __all__ = ["issamefile", "linkfile", "copyfile", "linkorcopyfile", + "overwrite_safely"] + + import os +-import selinux ++# import selinux + import shutil + import tempfile + import errno +@@ -134,8 +134,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(srcpath, dstpath, copy_mode_from_dst=True, +@@ -234,8 +234,8 @@ def overwrite_safely(path, content, preserve_mode=True, preserve_context=True): + + 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, +@@ -244,10 +244,10 @@ def overwrite_safely(path, content, preserve_mode=True, preserve_context=True): + if exists and preserve_mode: + shutil.copymode(path, tmpname) + +- if exists and preserve_context: +- ret, ctx = selinux.getfilecon(path) +- if ret < 0: +- raise RuntimeError("getfilecon(%r) failed" % path) ++# if exists and preserve_context: ++# ret, ctx = selinux.getfilecon(path) ++# if ret < 0: ++# raise RuntimeError("getfilecon(%r) failed" % path) + + f = os.fdopen(fd, "w") + fd = None +@@ -259,11 +259,11 @@ def overwrite_safely(path, content, preserve_mode=True, preserve_context=True): + + 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: +-- +1.8.3.2 + 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 +Date: Wed, 16 Aug 2017 10:49:43 +0200 +Subject: [PATCH] Disable selinux + +Signed-off-by: Gilles Dartiguelongue +--- + 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 + diff --git a/dev-python/python-slip/metadata.xml b/dev-python/python-slip/metadata.xml new file mode 100644 index 000000000000..39980802b1da --- /dev/null +++ b/dev-python/python-slip/metadata.xml @@ -0,0 +1,8 @@ + + + + + gnome@gentoo.org + Gentoo GNOME Desktop + + diff --git a/dev-python/python-slip/python-slip-0.6.1.ebuild b/dev-python/python-slip/python-slip-0.6.1.ebuild new file mode 100644 index 000000000000..7ec1e7fe6ee7 --- /dev/null +++ b/dev-python/python-slip/python-slip-0.6.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_REQ_USE="xml" +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 eutils + +DESCRIPTION="Miscellaneous convenience, extension and workaround code for Python" +HOMEPAGE="https://github.com/nphilipp/python-slip" +SRC_URI="https://fedorahosted.org/released/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="dbus selinux" + +RDEPEND=" + dbus? ( + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + sys-auth/polkit ) +" +DEPEND="" + +python_prepare_all() { + use selinux || epatch "${FILESDIR}/${PN}-0.4.0-no-selinux.patch" + + # hard-disable slip.gtk since it did not get ported to gtk3+ and the only user + # of slip (firewalld) does not use it (upstream disables it for py3 already) + sed \ + -e 's|sys.version_info.major == 2|False|' \ + -e "s:@VERSION@:${PV}:" setup.py.in > setup.py || die "sed failed" + + if ! use dbus; then + sed -e '/name="slip.dbus"/ s/\(.*\)/if 0:\n \1/' \ + -i setup.py || die "sed 2 failed" + fi + + distutils-r1_python_prepare_all +} diff --git a/dev-python/python-slip/python-slip-0.6.5.ebuild b/dev-python/python-slip/python-slip-0.6.5.ebuild new file mode 100644 index 000000000000..58abc1ead8da --- /dev/null +++ b/dev-python/python-slip/python-slip-0.6.5.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_REQ_USE="xml" +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 eutils + +DESCRIPTION="Miscellaneous convenience, extension and workaround code for Python" +HOMEPAGE="https://github.com/nphilipp/python-slip" +SRC_URI="https://github.com/nphilipp/${PN}/releases/download/${P}/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="dbus selinux" + +RDEPEND=" + dbus? ( + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + sys-auth/polkit ) +" +DEPEND="" + +python_prepare_all() { + use selinux || epatch "${FILESDIR}"/${PN}-0.6.5-no-selinux.patch + + # hard-disable slip.gtk since it did not get ported to gtk3+ and the only user + # of slip (firewalld) does not use it (upstream disables it for py3 already) + sed \ + -e 's|sys.version_info.major == 2|False|' \ + -e "s:@VERSION@:${PV}:" setup.py.in > setup.py || die "sed failed" + + if ! use dbus; then + sed -e '/name="slip.dbus"/ s/\(.*\)/if 0:\n \1/' \ + -i setup.py || die "sed 2 failed" + fi + + distutils-r1_python_prepare_all +} -- cgit v1.2.3