[packages/ufw] remove build time iptables dependency; patch from gentoo
glen
glen at pld-linux.org
Mon Sep 16 14:16:22 CEST 2013
commit 04f6203347a675e2decc87c7a328f7e1ea3cff10
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Sep 16 15:16:10 2013 +0300
remove build time iptables dependency; patch from gentoo
dont-check-iptables.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
ufw.spec | 3 ++-
2 files changed, 48 insertions(+), 1 deletion(-)
---
diff --git a/ufw.spec b/ufw.spec
index de8c3d6..b409b3d 100644
--- a/ufw.spec
+++ b/ufw.spec
@@ -7,8 +7,8 @@ Group: Networking/Admin
Source0: http://launchpad.net/ufw/0.33/%{version}/+download/%{name}-%{version}.tar.gz
# Source0-md5: 3747b453d76709e5a99da209fc0bb5f5
Patch0: sysconfig.patch
+Patch1: dont-check-iptables.patch
URL: http://launchpad.net/ufw
-BuildRequires: iptables >= 1.4
BuildRequires: python-devel >= 1:2.6
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
@@ -28,6 +28,7 @@ manipulating the firewall.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
# typo
sed -i -e 's,/etc/defaults/ufw,/etc/sysconfig/ufw,' README
diff --git a/dont-check-iptables.patch b/dont-check-iptables.patch
new file mode 100644
index 0000000..b7eae35
--- /dev/null
+++ b/dont-check-iptables.patch
@@ -0,0 +1,46 @@
+diff -ur ufw-0.32/setup.py ufw-0.32.new/setup.py
+--- ufw-0.32/setup.py 2012-07-06 17:46:29.000000000 +0200
++++ ufw-0.32.new/setup.py 2012-07-30 15:28:31.874547818 +0200
+@@ -225,41 +225,7 @@
+ os.unlink(os.path.join('staging', 'ufw-init'))
+ os.unlink(os.path.join('staging', 'ufw-init-functions'))
+
+-iptables_exe = ''
+-iptables_dir = ''
+-
+-for e in ['iptables']:
+- for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \
+- '/usr/local/bin']:
+- if e == "iptables":
+- if os.path.exists(os.path.join(dir, e)):
+- iptables_dir = dir
+- iptables_exe = os.path.join(iptables_dir, "iptables")
+- print("Found '%s'" % iptables_exe)
+- else:
+- continue
+-
+- if iptables_exe != "":
+- break
+-
+-
+-if iptables_exe == '':
+- print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
+- sys.exit(1)
+-
+-for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
+- if not os.path.exists(os.path.join(iptables_dir, e)):
+- print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
+- sys.exit(1)
+-
+-(rc, out) = cmd([iptables_exe, '-V'])
+-if rc != 0:
+- raise OSError(errno.ENOENT, "Could not find version for '%s'" % \
+- (iptables_exe))
+-version = re.sub('^v', '', re.split('\s', str(out))[1])
+-print("Found '%s' version '%s'" % (iptables_exe, version))
+-if version < "1.4":
+- print("WARN: version '%s' has limited IPv6 support. See README for details." % (version), file=sys.stderr)
++iptables_dir = '/sbin'
+
+ setup (name='ufw',
+ version=ufw_version,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ufw.git/commitdiff/04f6203347a675e2decc87c7a328f7e1ea3cff10
More information about the pld-cvs-commit
mailing list