diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2013-08-09 21:36:45 +0000 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2013-08-09 21:36:45 +0000 |
commit | a10c8970ea427235aa38179ed8984947e3aa5797 (patch) | |
tree | eca985e1d9e9fb7b9ddb1bc1e00e9b6c5ffd144c /dev-python/python-slip | |
parent | Version bump, based on work of Yuta SATOH in bug #476646 (diff) | |
download | gentoo-2-a10c8970ea427235aa38179ed8984947e3aa5797.tar.gz gentoo-2-a10c8970ea427235aa38179ed8984947e3aa5797.tar.bz2 gentoo-2-a10c8970ea427235aa38179ed8984947e3aa5797.zip |
Version bump.
(Portage version: 2.2.0_alpha196/cvs/Linux x86_64, signed Manifest commit with key C6085806)
Diffstat (limited to 'dev-python/python-slip')
-rw-r--r-- | dev-python/python-slip/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch | 93 | ||||
-rw-r--r-- | dev-python/python-slip/python-slip-0.4.0.ebuild | 45 |
3 files changed, 145 insertions, 1 deletions
diff --git a/dev-python/python-slip/ChangeLog b/dev-python/python-slip/ChangeLog index d09b915bb5e9..02a25db54f98 100644 --- a/dev-python/python-slip/ChangeLog +++ b/dev-python/python-slip/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/python-slip # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-slip/ChangeLog,v 1.7 2013/08/02 12:30:25 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-slip/ChangeLog,v 1.8 2013/08/09 21:36:45 eva Exp $ + +*python-slip-0.4.0 (09 Aug 2013) + + 09 Aug 2013; Gilles Dartiguelongue <eva@gentoo.org> + +python-slip-0.4.0.ebuild, +files/python-slip-0.4.0-no-selinux.patch: + Version bump. *python-slip-0.2.21-r1 (02 Aug 2013) 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 <tetromino@gentoo.org> +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/python-slip-0.4.0.ebuild b/dev-python/python-slip/python-slip-0.4.0.ebuild new file mode 100644 index 000000000000..8cd2d131ae77 --- /dev/null +++ b/dev-python/python-slip/python-slip-0.4.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-slip/python-slip-0.4.0.ebuild,v 1.1 2013/08/09 21:36:45 eva Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit distutils-r1 eutils + +DESCRIPTION="Miscellaneous convenience, extension and workaround code for Python" +HOMEPAGE="https://fedorahosted.org/python-slip/" +SRC_URI="https://fedorahosted.org/released/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dbus gtk selinux" + +RDEPEND=" + dbus? ( + dev-python/dbus-python[${PYTHON_USEDEP}] + || ( + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/pygobject:2[${PYTHON_USEDEP}] ) + sys-auth/polkit ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) +" +DEPEND="" + +python_prepare_all() { + use selinux || epatch "${FILESDIR}/${PN}-0.4.0-no-selinux.patch" + sed -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 + if ! use gtk; then + sed -e '/name="slip.gtk"/ s/\(.*\)/if 0:\n \1/' \ + -i setup.py || die "sed 3 failed" + fi + + distutils-r1_python_prepare_all +} |