summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarien Zwart <marienz@gentoo.org>2007-05-14 21:39:28 +0000
committerMarien Zwart <marienz@gentoo.org>2007-05-14 21:39:28 +0000
commit0b259dd1698306087bc2c72390537b246cdb39f0 (patch)
tree66ad20f78178a569751cf9d042ee932ac26dca1b /dev-python/logilab-common
parentStable on sparc wrt security #177913 and #157408 (diff)
downloadgentoo-2-0b259dd1698306087bc2c72390537b246cdb39f0.tar.gz
gentoo-2-0b259dd1698306087bc2c72390537b246cdb39f0.tar.bz2
gentoo-2-0b259dd1698306087bc2c72390537b246cdb39f0.zip
Make the tests pass without FEATURES=-userpriv (bug #176201).
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-python/logilab-common')
-rw-r--r--dev-python/logilab-common/ChangeLog7
-rw-r--r--dev-python/logilab-common/files/logilab-common-0.21.2-disable-access-tests-as-root.patch31
-rw-r--r--dev-python/logilab-common/logilab-common-0.21.2.ebuild9
3 files changed, 45 insertions, 2 deletions
diff --git a/dev-python/logilab-common/ChangeLog b/dev-python/logilab-common/ChangeLog
index 58fcdaa4f6b0..9be92b93be3e 100644
--- a/dev-python/logilab-common/ChangeLog
+++ b/dev-python/logilab-common/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-python/logilab-common
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/ChangeLog,v 1.32 2007/03/02 00:30:16 marienz Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/ChangeLog,v 1.33 2007/05/14 21:39:28 marienz Exp $
+
+ 14 May 2007; Marien Zwart <marienz@gentoo.org>
+ +files/logilab-common-0.21.2-disable-access-tests-as-root.patch,
+ logilab-common-0.21.2.ebuild:
+ Make the tests pass without FEATURES=-userpriv (bug #176201).
*logilab-common-0.21.2 (02 Mar 2007)
diff --git a/dev-python/logilab-common/files/logilab-common-0.21.2-disable-access-tests-as-root.patch b/dev-python/logilab-common/files/logilab-common-0.21.2-disable-access-tests-as-root.patch
new file mode 100644
index 000000000000..dc282ccb9a36
--- /dev/null
+++ b/dev-python/logilab-common/files/logilab-common-0.21.2-disable-access-tests-as-root.patch
@@ -0,0 +1,31 @@
+=== modified file 'test/unittest_fileutils.py'
+--- test/unittest_fileutils.py 2007-05-14 21:26:45 +0000
++++ test/unittest_fileutils.py 2007-05-14 21:36:23 +0000
+@@ -74,6 +74,8 @@
+
+ def test_mode_change(self):
+ """tests that mode is changed when needed"""
++ if not os.geteuid():
++ self.skip('this test fails with root privs')
+ # test on non-writable file
+ self.assert_(not os.access(self.rpath, os.W_OK))
+ wp_file = ProtectedFile(self.rpath, 'w')
+@@ -85,6 +87,8 @@
+
+ def test_restore_on_close(self):
+ """tests original mode is restored on close"""
++ if not os.geteuid():
++ self.skip('this test fails with root privs')
+ # test on non-writable file
+ self.assert_(not os.access(self.rpath, os.W_OK))
+ ProtectedFile(self.rpath, 'w').close()
+@@ -96,6 +100,8 @@
+
+ def test_mode_change_on_append(self):
+ """tests that mode is changed when file is opened in 'a' mode"""
++ if not os.geteuid():
++ self.skip('this test fails with root privs')
+ self.assert_(not os.access(self.rpath, os.W_OK))
+ wp_file = ProtectedFile(self.rpath, 'a')
+ self.assert_(os.access(self.rpath, os.W_OK))
+
diff --git a/dev-python/logilab-common/logilab-common-0.21.2.ebuild b/dev-python/logilab-common/logilab-common-0.21.2.ebuild
index 09f72da79f80..104fee7e3ec0 100644
--- a/dev-python/logilab-common/logilab-common-0.21.2.ebuild
+++ b/dev-python/logilab-common/logilab-common-0.21.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/logilab-common-0.21.2.ebuild,v 1.1 2007/03/02 00:30:16 marienz Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/logilab-common-0.21.2.ebuild,v 1.2 2007/05/14 21:39:28 marienz Exp $
inherit distutils eutils
@@ -19,6 +19,13 @@ DEPEND="|| ( >=dev-python/optik-1.4 >=dev-lang/python-2.3 )
PYTHON_MODNAME="logilab"
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-0.21.2-disable-access-tests-as-root.patch"
+}
+
src_test() {
# Install temporarily.
local spath="test/lib/python"