summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/ufw
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-02-28 13:50:59 -0800
committerKhem Raj <raj.khem@gmail.com>2022-03-01 09:13:42 -0800
commit6ce000f6671779b475262b56baf3f22907d6fdc9 (patch)
treea3919e4c9fb7c6090390c85ca559ecce17004baa /meta-networking/recipes-connectivity/ufw
parent6e064cf217685b11e68d14410f70d1f72021e74a (diff)
downloadmeta-openembedded-6ce000f6671779b475262b56baf3f22907d6fdc9.tar.gz
ufw: Upgrade to 0.36.1 bugfix release
Forward port 0002-add-an-option-to-specify-iptables-location.patch Use distutils3, since it still needs it [1] [1] https://git.launchpad.net/ufw/tree/setup.py#n28 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/ufw')
-rw-r--r--meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch30
-rw-r--r--meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb (renamed from meta-networking/recipes-connectivity/ufw/ufw_0.36.bb)8
2 files changed, 20 insertions, 18 deletions
diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch b/meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch
index 884fa1647..ee935eb61 100644
--- a/meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch
+++ b/meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch
@@ -23,11 +23,9 @@ Signed-off-by: Silcet <camorga1@gmail.com>
23 setup.py | 65 ++++++++++++++++++++++++++++++++------------------------ 23 setup.py | 65 ++++++++++++++++++++++++++++++++------------------------
24 1 file changed, 37 insertions(+), 28 deletions(-) 24 1 file changed, 37 insertions(+), 28 deletions(-)
25 25
26diff --git a/setup.py b/setup.py
27index 09204d3..2343bc9 100644
28--- a/setup.py 26--- a/setup.py
29+++ b/setup.py 27+++ b/setup.py
30@@ -246,41 +246,50 @@ shutil.copytree('src', 'staging') 28@@ -245,45 +245,50 @@ shutil.copytree('src', 'staging')
31 os.unlink(os.path.join('staging', 'ufw-init')) 29 os.unlink(os.path.join('staging', 'ufw-init'))
32 os.unlink(os.path.join('staging', 'ufw-init-functions')) 30 os.unlink(os.path.join('staging', 'ufw-init-functions'))
33 31
@@ -36,7 +34,11 @@ index 09204d3..2343bc9 100644
36 iptables_dir = '' 34 iptables_dir = ''
37 35
38-for e in ['iptables']: 36-for e in ['iptables']:
39- for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \ 37- # Historically iptables was in /sbin, then later also symlinked from
38- # /usr/sbin/iptables to /sbin/iptables. Debian bullseye moves iptables
39- # to /usr/sbin with no symlink in /sbin except on upgrades. To accomodate
40- # buildds that may still have the old iptables, search /usr/sbin first
41- for dir in ['/usr/sbin', '/sbin', '/usr/bin', '/bin', '/usr/local/sbin', \
40- '/usr/local/bin']: 42- '/usr/local/bin']:
41- if e == "iptables": 43- if e == "iptables":
42- if os.path.exists(os.path.join(dir, e)): 44- if os.path.exists(os.path.join(dir, e)):
@@ -49,6 +51,14 @@ index 09204d3..2343bc9 100644
49- if iptables_exe != "": 51- if iptables_exe != "":
50- break 52- break
51- 53-
54-
55-if iptables_exe == '':
56- print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
57- sys.exit(1)
58-
59-for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
60- if not os.path.exists(os.path.join(iptables_dir, e)):
61- print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
52+if "--iptables-dir" in sys.argv: 62+if "--iptables-dir" in sys.argv:
53+ iptables_dir = sys.argv[sys.argv.index("--iptables-dir") + 1] 63+ iptables_dir = sys.argv[sys.argv.index("--iptables-dir") + 1]
54+ iptables_exe = os.path.join(iptables_dir, "iptables") 64+ iptables_exe = os.path.join(iptables_dir, "iptables")
@@ -59,7 +69,7 @@ index 09204d3..2343bc9 100644
59+ 69+
60+if not iptables_set: 70+if not iptables_set:
61+ for e in ['iptables']: 71+ for e in ['iptables']:
62+ for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \ 72+ for dir in ['/usr/sbin', '/sbin', '/usr/bin', '/bin', '/usr/local/sbin', \
63+ '/usr/local/bin']: 73+ '/usr/local/bin']:
64+ if e == "iptables": 74+ if e == "iptables":
65+ if os.path.exists(os.path.join(dir, e)): 75+ if os.path.exists(os.path.join(dir, e)):
@@ -68,16 +78,10 @@ index 09204d3..2343bc9 100644
68+ print("Found '%s'" % iptables_exe) 78+ print("Found '%s'" % iptables_exe)
69+ else: 79+ else:
70+ continue 80+ continue
71 81+
72-if iptables_exe == '':
73- print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
74- sys.exit(1)
75+ if iptables_exe != "": 82+ if iptables_exe != "":
76+ break 83+ break
77 84+
78-for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
79- if not os.path.exists(os.path.join(iptables_dir, e)):
80- print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
81+ if iptables_exe == '': 85+ if iptables_exe == '':
82+ print("ERROR: could not find required binary 'iptables'", file=sys.stderr) 86+ print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
83 sys.exit(1) 87 sys.exit(1)
diff --git a/meta-networking/recipes-connectivity/ufw/ufw_0.36.bb b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb
index 40188cea2..c6beedf02 100644
--- a/meta-networking/recipes-connectivity/ufw/ufw_0.36.bb
+++ b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb
@@ -8,18 +8,16 @@ SECTION = "net"
8LICENSE = "GPLv3" 8LICENSE = "GPLv3"
9LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" 9LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
10 10
11SRC_URI = "https://launchpad.net/ufw/0.36/0.36/+download/ufw-0.36.tar.gz \ 11SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \
12 file://0001-optimize-boot.patch \ 12 file://0001-optimize-boot.patch \
13 file://0002-add-an-option-to-specify-iptables-location.patch \ 13 file://0002-add-an-option-to-specify-iptables-location.patch \
14 file://0003-only-make-one-reference-to-env.patch \ 14 file://0003-only-make-one-reference-to-env.patch \
15 " 15 "
16SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c"
16 17
17UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" 18UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
18 19
19SRC_URI[md5sum] = "6d8ab1506da21ae003f4628f93d05781" 20inherit distutils3 features_check systemd update-rc.d
20SRC_URI[sha256sum] = "754b22ae5edff0273460ac9f57509c3938187e0cf4fb9692c6a02833fff33cfc"
21
22inherit setuptools3 features_check systemd update-rc.d
23 21
24RDEPENDS:${PN} = " \ 22RDEPENDS:${PN} = " \
25 iptables \ 23 iptables \