* [gentoo-commits] dev/xmw:master commit in: dev-python/python-iptables/files/, dev-python/python-iptables/
@ 2014-10-08 15:16 Michael Weber
0 siblings, 0 replies; 2+ messages in thread
From: Michael Weber @ 2014-10-08 15:16 UTC (permalink / raw
To: gentoo-commits
commit: 8b7584314ee8c93c2459a64072fabd2adf103174
Author: Michael Weber <michael <AT> xmw <DOT> de>
AuthorDate: Wed Oct 8 15:16:18 2014 +0000
Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Wed Oct 8 15:16:18 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=8b758431
Fork from main tree, bug https://github.com/ldx/python-iptables/issues/104
Package-Manager: portage-2.2.14_rc1
Manifest-Sign-Key: 62EEF090
---
dev-python/python-iptables/ChangeLog | 10 ++++++
dev-python/python-iptables/Manifest | 13 +++++++
.../files/python-iptables-0.2.0-tests.patch | 21 +++++++++++
.../files/python-iptables-0.4.0-python3.patch | 23 ++++++++++++
.../files/python-iptables-9999-cpython.patch | 12 +++++++
.../files/python-iptables-9999-tests.patch | 19 ++++++++++
dev-python/python-iptables/metadata.xml | 8 +++++
.../python-iptables-0.4.0-r1.ebuild | 41 ++++++++++++++++++++++
.../python-iptables/python-iptables-9999.ebuild | 33 +++++++++++++++++
9 files changed, 180 insertions(+)
diff --git a/dev-python/python-iptables/ChangeLog b/dev-python/python-iptables/ChangeLog
new file mode 100644
index 0000000..f0ed32a
--- /dev/null
+++ b/dev-python/python-iptables/ChangeLog
@@ -0,0 +1,10 @@
+*python-iptables-0.4.0-r1 (08 Oct 2014)
+*python-iptables-9999 (08 Oct 2014)
+
+ 08 Oct 2014; Michael Weber <xmw@gentoo.org>
+ +files/python-iptables-0.2.0-tests.patch,
+ +files/python-iptables-0.4.0-python3.patch,
+ +files/python-iptables-9999-cpython.patch,
+ +files/python-iptables-9999-tests.patch, +metadata.xml,
+ +python-iptables-0.4.0-r1.ebuild, +python-iptables-9999.ebuild:
+ Fork from main tree, bug https://github.com/ldx/python-iptables/issues/104
diff --git a/dev-python/python-iptables/Manifest b/dev-python/python-iptables/Manifest
new file mode 100644
index 0000000..bc5e78a
--- /dev/null
+++ b/dev-python/python-iptables/Manifest
@@ -0,0 +1,13 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST python-iptables-0.4.0.tar.gz 35824 SHA256 f1ca24c041f90d89a2d21ec7657b8d45729d18e80033602726679030eb6472f2 SHA512 9055d7e637938ef6e0def0a84e7cac67ffbbdaf7584b413b86e6a879c3aed62814defe647d8f911dc74d8573c7bfa0e7ddb034498d7992e2b5b42a1018c00b70 WHIRLPOOL 7436e6868fd2bd8ff1ce2526f4e1b5c0ff6da9c1d83f496d9ae434844c9149cc9e749b8ed81cb76f25b527cd809656ffcf31a9fef9c848cc39d8879549c05ad8
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iL4EAREIAGYFAlQ1VUJfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl
+bnBncC5maWZ0aGhvcnNlbWFuLm5ldDY3QjA4MzdGODg1NUMxMjIzNUQ0MDgxNzky
+N0FERDBDNjJFRUYwOTAACgkQknrdDGLu8JBTPgD9EL0U4qW6ILA5M2GFHntamVN2
+mt7cfEjxKM6QqdbX06UA/jL2uHJIcGKo3cV64CU9f/kJgakfvSoC1eaMvKxLuit9
+=c4M4
+-----END PGP SIGNATURE-----
diff --git a/dev-python/python-iptables/files/python-iptables-0.2.0-tests.patch b/dev-python/python-iptables/files/python-iptables-0.2.0-tests.patch
new file mode 100644
index 0000000..fb9d601
--- /dev/null
+++ b/dev-python/python-iptables/files/python-iptables-0.2.0-tests.patch
@@ -0,0 +1,21 @@
+diff --git a/test.py b/test.py
+index f426612..f598585 100755
+--- a/test.py
++++ b/test.py
+@@ -3,16 +3,6 @@
+
+ import sys
+
+-print "WARNING: this test will manipulate iptables rules."
+-print "Don't do this on a production machine."
+-while True:
+- print "Would you like to continue? y/n",
+- answer = raw_input()
+- if answer in "yYnN" and len(answer) == 1:
+- break
+-if answer in "nN":
+- sys.exit(0)
+-
+ from iptc.test import test_iptc, test_matches, test_targets
+
+ results = [rv for rv in [test_iptc.run_tests(), test_matches.run_tests(),
diff --git a/dev-python/python-iptables/files/python-iptables-0.4.0-python3.patch b/dev-python/python-iptables/files/python-iptables-0.4.0-python3.patch
new file mode 100644
index 0000000..f630792
--- /dev/null
+++ b/dev-python/python-iptables/files/python-iptables-0.4.0-python3.patch
@@ -0,0 +1,23 @@
+--- python-iptables-0.4.0/setup.py
++++ python-iptables-0.4.0/setup.py
+@@ -7,7 +7,7 @@
+ # make pyflakes happy
+ __pkgname__ = None
+ __version__ = None
+-execfile("iptc/version.py")
++exec(open("iptc/version.py").read())
+
+ # build/install python-iptables
+ setup(
+--- python-iptables-0.4.0/iptc/util.py
++++ python-iptables-0.4.0/iptc/util.py
+@@ -66,6 +66,9 @@
+
+ def _find_library(*names):
+ ext = get_config_var('SO')
++ from sys import version_info
++ if version_info > (3, ):
++ ext = '.cpython-%i%i' % (version_info.major, version_info.minor) + ext
+ for name in names:
+ for n in (name, "lib" + name, name + ext, "lib" + name + ext):
+ lib = _do_find_library(n)
diff --git a/dev-python/python-iptables/files/python-iptables-9999-cpython.patch b/dev-python/python-iptables/files/python-iptables-9999-cpython.patch
new file mode 100644
index 0000000..b7fe071
--- /dev/null
+++ b/dev-python/python-iptables/files/python-iptables-9999-cpython.patch
@@ -0,0 +1,12 @@
+--- python-iptables-9999/iptc/util.py
++++ python-iptables-9999/iptc/util.py
+@@ -66,6 +66,9 @@
+
+ def _find_library(*names):
+ ext = get_config_var('SO')
++ from sys import version_info
++ if version_info > (3, ):
++ ext = '.cpython-%i%i' % (version_info.major, version_info.minor) + ext
+ for name in names:
+ for n in (name, "lib" + name, name + ext, "lib" + name + ext):
+ lib = _do_find_library(n)
diff --git a/dev-python/python-iptables/files/python-iptables-9999-tests.patch b/dev-python/python-iptables/files/python-iptables-9999-tests.patch
new file mode 100644
index 0000000..3e43e42
--- /dev/null
+++ b/dev-python/python-iptables/files/python-iptables-9999-tests.patch
@@ -0,0 +1,19 @@
+--- python-iptables-9999/test.py
++++ python-iptables-9999/test.py
+@@ -8,16 +8,6 @@
+ except NameError:
+ pass
+
+-print("WARNING: this test will manipulate iptables rules.")
+-print("Don't do this on a production machine.")
+-while True:
+- print("Would you like to continue? y/n")
+- answer = input()
+- if answer in "yYnN" and len(answer) == 1:
+- break
+-if answer in "nN":
+- sys.exit(0)
+-
+ from iptc.test import test_iptc, test_matches, test_targets
+
+ results = [rv for rv in [test_iptc.run_tests(), test_matches.run_tests(),
diff --git a/dev-python/python-iptables/metadata.xml b/dev-python/python-iptables/metadata.xml
new file mode 100644
index 0000000..5b80fb9
--- /dev/null
+++ b/dev-python/python-iptables/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-python/python-iptables/python-iptables-0.4.0-r1.ebuild b/dev-python/python-iptables/python-iptables-0.4.0-r1.ebuild
new file mode 100644
index 0000000..1533d48
--- /dev/null
+++ b/dev-python/python-iptables/python-iptables-0.4.0-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-iptables/python-iptables-0.4.0.ebuild,v 1.2 2014/08/10 21:19:05 slyfox Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for iptables"
+HOMEPAGE="https://github.com/ldx/python-iptables"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="net-firewall/iptables"
+RDEPEND="${DEPEND}"
+
+# tests manipulate live iptables rules, so disable them by default
+RESTRICT=test
+# needed for running tests
+#RESTRICT=userpriv
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.2.0-tests.patch"
+ "${FILESDIR}/${PN}-0.4.0-python3.patch"
+)
+
+python_prepare() {
+ case ${EPYTHON} in
+ python3*)
+ 2to3-${EPYTHON/python} --write --nobackups --no-diffs .
+ ;;
+ esac
+}
+
+python_test() {
+ ${PYTHON} test.py || die "tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/python-iptables/python-iptables-9999.ebuild b/dev-python/python-iptables/python-iptables-9999.ebuild
new file mode 100644
index 0000000..7e9d0ac
--- /dev/null
+++ b/dev-python/python-iptables/python-iptables-9999.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-iptables/python-iptables-0.4.0.ebuild,v 1.2 2014/08/10 21:19:05 slyfox Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+inherit distutils-r1 git-r3
+
+DESCRIPTION="Python bindings for iptables"
+HOMEPAGE="https://github.com/ldx/python-iptables"
+EGIT_REPO_URI="https://github.com/ldx/${PN}.git"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="net-firewall/iptables"
+RDEPEND="${DEPEND}"
+
+# tests manipulate live iptables rules, so disable them by default
+RESTRICT=test
+# needed for running tests
+#RESTRICT=userpriv
+
+PATCHES=(
+ "${FILESDIR}/${P}-tests.patch"
+ "${FILESDIR}/${P}-cpython.patch"
+)
+
+python_test() {
+ ${PYTHON} test.py || die "tests fail with ${EPYTHON}"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] dev/xmw:master commit in: dev-python/python-iptables/files/, dev-python/python-iptables/
@ 2014-10-15 17:35 Michael Weber
0 siblings, 0 replies; 2+ messages in thread
From: Michael Weber @ 2014-10-15 17:35 UTC (permalink / raw
To: gentoo-commits
commit: 09e978c98ea3a9177b4b96ef0ff796cef73d46e6
Author: Michael Weber <michael <AT> xmw <DOT> de>
AuthorDate: Wed Oct 15 17:35:26 2014 +0000
Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Wed Oct 15 17:35:26 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=09e978c9
cpython patch was accepted by upstream
Package-Manager: portage-2.2.14_rc1
Manifest-Sign-Key: 62EEF090
---
dev-python/python-iptables/ChangeLog | 6 ++++++
.../files/python-iptables-0.2.0-tests.patch | 21 --------------------
.../files/python-iptables-0.4.0-python3.patch | 23 ----------------------
.../files/python-iptables-9999-cpython.patch | 12 -----------
.../python-iptables/python-iptables-9999.ebuild | 1 -
5 files changed, 6 insertions(+), 57 deletions(-)
diff --git a/dev-python/python-iptables/ChangeLog b/dev-python/python-iptables/ChangeLog
index 70584c4..9c2172f 100644
--- a/dev-python/python-iptables/ChangeLog
+++ b/dev-python/python-iptables/ChangeLog
@@ -1,3 +1,9 @@
+ 15 Oct 2014; Michael Weber <xmw@gentoo.org>
+ -files/python-iptables-0.2.0-tests.patch,
+ -files/python-iptables-0.4.0-python3.patch,
+ -files/python-iptables-9999-cpython.patch, python-iptables-9999.ebuild:
+ cpython patch was accepted by upstream
+
08 Oct 2014; Michael Weber <xmw@gentoo.org> -Manifest,
-python-iptables-0.4.0-r1.ebuild:
drop broken version
diff --git a/dev-python/python-iptables/files/python-iptables-0.2.0-tests.patch b/dev-python/python-iptables/files/python-iptables-0.2.0-tests.patch
deleted file mode 100644
index fb9d601..0000000
--- a/dev-python/python-iptables/files/python-iptables-0.2.0-tests.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/test.py b/test.py
-index f426612..f598585 100755
---- a/test.py
-+++ b/test.py
-@@ -3,16 +3,6 @@
-
- import sys
-
--print "WARNING: this test will manipulate iptables rules."
--print "Don't do this on a production machine."
--while True:
-- print "Would you like to continue? y/n",
-- answer = raw_input()
-- if answer in "yYnN" and len(answer) == 1:
-- break
--if answer in "nN":
-- sys.exit(0)
--
- from iptc.test import test_iptc, test_matches, test_targets
-
- results = [rv for rv in [test_iptc.run_tests(), test_matches.run_tests(),
diff --git a/dev-python/python-iptables/files/python-iptables-0.4.0-python3.patch b/dev-python/python-iptables/files/python-iptables-0.4.0-python3.patch
deleted file mode 100644
index f630792..0000000
--- a/dev-python/python-iptables/files/python-iptables-0.4.0-python3.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- python-iptables-0.4.0/setup.py
-+++ python-iptables-0.4.0/setup.py
-@@ -7,7 +7,7 @@
- # make pyflakes happy
- __pkgname__ = None
- __version__ = None
--execfile("iptc/version.py")
-+exec(open("iptc/version.py").read())
-
- # build/install python-iptables
- setup(
---- python-iptables-0.4.0/iptc/util.py
-+++ python-iptables-0.4.0/iptc/util.py
-@@ -66,6 +66,9 @@
-
- def _find_library(*names):
- ext = get_config_var('SO')
-+ from sys import version_info
-+ if version_info > (3, ):
-+ ext = '.cpython-%i%i' % (version_info.major, version_info.minor) + ext
- for name in names:
- for n in (name, "lib" + name, name + ext, "lib" + name + ext):
- lib = _do_find_library(n)
diff --git a/dev-python/python-iptables/files/python-iptables-9999-cpython.patch b/dev-python/python-iptables/files/python-iptables-9999-cpython.patch
deleted file mode 100644
index b7fe071..0000000
--- a/dev-python/python-iptables/files/python-iptables-9999-cpython.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- python-iptables-9999/iptc/util.py
-+++ python-iptables-9999/iptc/util.py
-@@ -66,6 +66,9 @@
-
- def _find_library(*names):
- ext = get_config_var('SO')
-+ from sys import version_info
-+ if version_info > (3, ):
-+ ext = '.cpython-%i%i' % (version_info.major, version_info.minor) + ext
- for name in names:
- for n in (name, "lib" + name, name + ext, "lib" + name + ext):
- lib = _do_find_library(n)
diff --git a/dev-python/python-iptables/python-iptables-9999.ebuild b/dev-python/python-iptables/python-iptables-9999.ebuild
index 7e9d0ac..c66d08c 100644
--- a/dev-python/python-iptables/python-iptables-9999.ebuild
+++ b/dev-python/python-iptables/python-iptables-9999.ebuild
@@ -25,7 +25,6 @@ RESTRICT=test
PATCHES=(
"${FILESDIR}/${P}-tests.patch"
- "${FILESDIR}/${P}-cpython.patch"
)
python_test() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-15 17:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-15 17:35 [gentoo-commits] dev/xmw:master commit in: dev-python/python-iptables/files/, dev-python/python-iptables/ Michael Weber
-- strict thread matches above, loose matches on Subject: below --
2014-10-08 15:16 Michael Weber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox