summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2012-02-28 11:42:23 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2012-02-28 11:42:23 +0000
commit3141567875cc04d64590844689b9db36fb770827 (patch)
tree46b3acf5cf6e5caee3f2f0e1d6223e4a1fb5a8a5 /net-firewall/ufw
parentBump to 1.0, with permission from dagger. Fix glib single-includes bug in a h... (diff)
downloadgentoo-2-3141567875cc04d64590844689b9db36fb770827.tar.gz
gentoo-2-3141567875cc04d64590844689b9db36fb770827.tar.bz2
gentoo-2-3141567875cc04d64590844689b9db36fb770827.zip
Update per proxy-maintainer request. Remove overshadowed versions.
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'net-firewall/ufw')
-rw-r--r--net-firewall/ufw/ChangeLog11
-rw-r--r--net-firewall/ufw/files/ufw-0.30.1-encoding.patch15
-rw-r--r--net-firewall/ufw/files/ufw-0.30.1-python-abis.patch21
-rw-r--r--net-firewall/ufw/ufw-0.30.1-r2.ebuild78
-rw-r--r--net-firewall/ufw/ufw-0.30.1-r4.ebuild (renamed from net-firewall/ufw/ufw-0.30.1-r3.ebuild)36
5 files changed, 68 insertions, 93 deletions
diff --git a/net-firewall/ufw/ChangeLog b/net-firewall/ufw/ChangeLog
index a472dccd9265..d9fd0120c96b 100644
--- a/net-firewall/ufw/ChangeLog
+++ b/net-firewall/ufw/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-firewall/ufw
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ChangeLog,v 1.4 2011/09/13 06:35:49 pva Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ChangeLog,v 1.5 2012/02/28 11:42:22 scarabeus Exp $
+
+*ufw-0.30.1-r4 (28 Feb 2012)
+
+ 28 Feb 2012; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/ufw-0.30.1-encoding.patch, +files/ufw-0.30.1-python-abis.patch,
+ +ufw-0.30.1-r4.ebuild, -ufw-0.30.1-r2.ebuild, -ufw-0.30.1-r3.ebuild:
+ Update per proxy-maintainer request. Remove overshadowed versions.
13 Sep 2011; Peter Volkov <pva@gentoo.org> ufw-0.30.1-r2.ebuild,
ufw-0.30.1-r3.ebuild:
diff --git a/net-firewall/ufw/files/ufw-0.30.1-encoding.patch b/net-firewall/ufw/files/ufw-0.30.1-encoding.patch
new file mode 100644
index 000000000000..a4626ef0cff0
--- /dev/null
+++ b/net-firewall/ufw/files/ufw-0.30.1-encoding.patch
@@ -0,0 +1,15 @@
+Fixes usage with ufw-frontends.
+upstream bug report: https://bugs.launchpad.net/ufw/+bug/921758
+--- src/util.py
++++ src/util.py
+@@ -205,8 +205,9 @@
+
+ def open_file_read(f):
+ '''Opens the specified file read-only'''
++ import codecs
+ try:
+- orig = open(f, 'r')
++ orig = codecs.open(f, 'r', "UTF-8")
+ except Exception:
+ raise
+
diff --git a/net-firewall/ufw/files/ufw-0.30.1-python-abis.patch b/net-firewall/ufw/files/ufw-0.30.1-python-abis.patch
new file mode 100644
index 000000000000..b924012790e4
--- /dev/null
+++ b/net-firewall/ufw/files/ufw-0.30.1-python-abis.patch
@@ -0,0 +1,21 @@
+This patch fixes strings substitution in common.py during package
+build with ebuild supporting installation for multiple Python versions.
+
+With support for multiple Python versions in the ebuild, seems the
+file isn't copied from staging/ to build-*/lib/ufw/ after being
+modified. That's why the copy needs to be done "manually" here.
+The issue occurs with "setup.py build -b build-XXX" followed by
+"setup.py build -b build-XXX install".
+
+probably related: https://bugs.launchpad.net/ufw/+bug/819600
+--- setup.py
++++ setup.py
+@@ -89,6 +89,8 @@
+ "-i",
+ "s%#SHARE_DIR#%" + real_sharedir + "%g",
+ os.path.join('staging', file)])
++ self.copy_file(os.path.join('staging', file),
++ os.path.join(self.build_base, "lib", "ufw"))
+
+ # Now byte-compile everything
+ super(Install, self).run()
diff --git a/net-firewall/ufw/ufw-0.30.1-r2.ebuild b/net-firewall/ufw/ufw-0.30.1-r2.ebuild
deleted file mode 100644
index 64b37228008a..000000000000
--- a/net-firewall/ufw/ufw-0.30.1-r2.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ufw-0.30.1-r2.ebuild,v 1.3 2011/09/13 06:35:49 pva Exp $
-
-EAPI=3
-PYTHON_DEPEND="2:2.5"
-
-inherit versionator bash-completion-r1 eutils linux-info distutils
-
-MY_PV_12=$(get_version_component_range 1-2)
-DESCRIPTION="A program used to manage a netfilter firewall"
-HOMEPAGE="http://launchpad.net/ufw"
-SRC_URI="http://launchpad.net/ufw/${MY_PV_12}/${PV}/+download/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="examples"
-
-DEPEND=""
-RDEPEND=">=net-firewall/iptables-1.4"
-
-# tests fail; upstream bug: https://bugs.launchpad.net/ufw/+bug/815982
-RESTRICT="test"
-
-pkg_setup() {
- local CONFIG_CHECK="~PROC_FS ~NETFILTER_XT_MATCH_COMMENT ~IP6_NF_MATCH_HL \
- ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_MULTIPORT \
- ~NETFILTER_XT_MATCH_RECENT ~NETFILTER_XT_MATCH_STATE"
-
- if kernel_is -ge 2 6 39; then
- CONFIG_CHECK+=" ~NETFILTER_XT_MATCH_ADDRTYPE"
- else
- CONFIG_CHECK+=" ~IP_NF_MATCH_ADDRTYPE"
- fi
-
- check_extra_config
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_prepare() {
- # Allow to remove unnecessary build time dependency
- # on net-firewall/iptables.
- epatch "${FILESDIR}"/${PN}-dont-check-iptables.patch
- # Move files away from /lib/ufw.
- epatch "${FILESDIR}"/${PN}-move-path.patch
- # Set as enabled by default. User can enable or disable
- # the service by adding or removing it to/from a runlevel.
- sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \
- || die "sed failed (ufw.conf)"
-}
-
-src_install() {
- newconfd "${FILESDIR}"/ufw.confd ufw || die "inserting a file to conf.d failed"
- newinitd "${FILESDIR}"/ufw-2.initd ufw || die "inserting a file to init.d failed"
- if use examples; then
- dodoc doc/rsyslog.example || die "inserting example rsyslog configuration failed"
- insinto /usr/share/doc/${PF}/examples
- doins examples/* || die "inserting example files failed"
- fi
- distutils_src_install
- newbashcomp shell-completion/bash ${PN} || die "newbashcomp failed"
-}
-
-pkg_postinst() {
- distutils_pkg_postinst
- if path_exists -o "${EROOT}"lib/ufw/user{,6}.rules; then
- ewarn "Attention!"
- ewarn "User configuration from /lib/ufw is now placed in /etc/ufw/user."
- ewarn "Please stop ufw, copy .rules files from ${EROOT}lib/ufw"
- ewarn "to ${EROOT}etc/ufw/user/ and start ufw again."
- fi
- echo
- elog "Remember to enable ufw add it to your boot sequence:"
- elog "-- # ufw enable"
- elog "-- # rc-update add ufw boot"
-}
diff --git a/net-firewall/ufw/ufw-0.30.1-r3.ebuild b/net-firewall/ufw/ufw-0.30.1-r4.ebuild
index d05d12ece1e6..d043b6d3936b 100644
--- a/net-firewall/ufw/ufw-0.30.1-r3.ebuild
+++ b/net-firewall/ufw/ufw-0.30.1-r4.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ufw-0.30.1-r3.ebuild,v 1.2 2011/09/13 06:35:49 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ufw-0.30.1-r4.ebuild,v 1.1 2012/02/28 11:42:22 scarabeus Exp $
-EAPI=3
+EAPI=4
PYTHON_DEPEND="2:2.5"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
inherit versionator bash-completion-r1 eutils linux-info distutils
@@ -17,13 +19,13 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples"
-DEPEND=""
+DEPEND="sys-devel/gettext"
RDEPEND=">=net-firewall/iptables-1.4"
# tests fail; upstream bug: https://bugs.launchpad.net/ufw/+bug/815982
RESTRICT="test"
-pkg_setup() {
+pkg_pretend() {
local CONFIG_CHECK="~PROC_FS ~NETFILTER_XT_MATCH_COMMENT ~IP6_NF_MATCH_HL \
~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_MULTIPORT \
~NETFILTER_XT_MATCH_RECENT ~NETFILTER_XT_MATCH_STATE"
@@ -35,7 +37,9 @@ pkg_setup() {
fi
check_extra_config
- python_set_active_version 2
+}
+
+pkg_setup() {
python_pkg_setup
}
@@ -45,6 +49,10 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-dont-check-iptables.patch
# Move files away from /lib/ufw.
epatch "${FILESDIR}"/${PN}-move-path.patch
+ # Allows correct build with SUPPORT_PYTHON_ABIS="1" (see comment in the file).
+ epatch "${FILESDIR}"/${P}-python-abis.patch
+ # Fixes usage with ufw-frontends (bug ref. inside the patch).
+ epatch "${FILESDIR}"/${P}-encoding.patch
# Set as enabled by default. User can enable or disable
# the service by adding or removing it to/from a runlevel.
sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \
@@ -52,23 +60,25 @@ src_prepare() {
}
src_install() {
- newconfd "${FILESDIR}"/ufw.confd ufw || die "inserting a file to conf.d failed"
- newinitd "${FILESDIR}"/ufw-2.initd ufw || die "inserting a file to init.d failed"
+ newconfd "${FILESDIR}"/ufw.confd ufw
+ newinitd "${FILESDIR}"/ufw-2.initd ufw
# users normally would want it
insinto /usr/share/doc/${PF}/logging
- doins -r "${FILESDIR}"/syslog-ng || die "inserting syslog-ng configuration failed"
+ doins -r "${FILESDIR}"/syslog-ng
insinto /usr/share/doc/${PF}/logging/rsyslog
- doins "${FILESDIR}"/rsyslog/* || die "inserting rsyslog configuration failed"
- doins doc/rsyslog.example || die "inserting rsyslog.example failed"
+ doins "${FILESDIR}"/rsyslog/*
+ doins doc/rsyslog.example
if use examples; then
insinto /usr/share/doc/${PF}/examples
- doins examples/* || die "inserting example files failed"
+ doins examples/*
fi
distutils_src_install
- newbashcomp shell-completion/bash ${PN} || die "newbashcomp failed"
+ domo locales/mo/*.mo
+ rm -r "${ED}"usr/share/${PN}/messages || die
+ newbashcomp shell-completion/bash ${PN}
}
pkg_postinst() {