summaryrefslogtreecommitdiffstats
path: root/packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch
diff options
context:
space:
mode:
authorcoast <coasteen@proton.me>2026-10-12 14:41:07 +0330
committercoast <coasteen@proton.me>2026-10-12 14:41:07 +0330
commit25922912c7e37f3bc3000e71b647e77677d8f2c5 (patch)
tree8383c5569a668613eee384ee31ea8cddc2113ee5 /packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch
downloadexherbo-overlay-main.tar.gz
exherbo-overlay-main.tar.bz2
exherbo-overlay-main.tar.xz
exherbo-overlay-main.tar.zst
Diffstat (limited to 'packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch')
-rw-r--r--packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch b/packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch
new file mode 100644
index 0000000..ae0c955
--- /dev/null
+++ b/packages/net-firewall/ufw/files/ufw-0.36.1-dont-check-iptables.patch
@@ -0,0 +1,50 @@
+--- a/setup.py 2022-06-27 17:33:18.043794598 +0300
++++ b/setup.py 2022-06-27 18:15:18.384463926 +0300
+@@ -256,46 +256,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']:
+- # Historically iptables was in /sbin, then later also symlinked from
+- # /usr/sbin/iptables to /sbin/iptables. Debian bullseye moves iptables
+- # to /usr/sbin with no symlink in /sbin except on upgrades. To accomodate
+- # buildds that may still have the old iptables, search /usr/sbin first
+- for dir in ['/usr/sbin', '/sbin', '/usr/bin', '/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,
+ description='front-end for Linux firewalling',