From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 05CB41381F3 for ; Fri, 9 Aug 2013 21:36:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 92708E0E9F; Fri, 9 Aug 2013 21:36:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F265EE0E9F for ; Fri, 9 Aug 2013 21:36:47 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E047133EBFC for ; Fri, 9 Aug 2013 21:36:46 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2184) id 88C7E2171D; Fri, 9 Aug 2013 21:36:45 +0000 (UTC) From: "Gilles Dartiguelongue (eva)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, eva@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in dev-python/python-slip/files: python-slip-0.4.0-no-selinux.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: python-slip-0.4.0-no-selinux.patch X-VCS-Directories: dev-python/python-slip/files X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130809213645.88C7E2171D@flycatcher.gentoo.org> Date: Fri, 9 Aug 2013 21:36:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1f4a7ab4-66d2-45ea-ad84-ad772c55a7f0 X-Archives-Hash: ab075c784284c3daa78bf07ece5518d8 eva 13/08/09 21:36:45 Added: python-slip-0.4.0-no-selinux.patch Log: Version bump. (Portage version: 2.2.0_alpha196/cvs/Linux x86_64, signed Manifest commit with key C6085806) Revision Changes Path 1.1 dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/python-slip/files/python-slip-0.4.0-no-selinux.patch?rev=1.1&content-type=text/plain Index: python-slip-0.4.0-no-selinux.patch =================================================================== >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