diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch | 30 | ||||
| -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 884fa1647e..ee935eb615 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 | ||
| 26 | diff --git a/setup.py b/setup.py | ||
| 27 | index 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 40188cea21..c6beedf02c 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" | |||
| 8 | LICENSE = "GPLv3" | 8 | LICENSE = "GPLv3" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" |
| 10 | 10 | ||
| 11 | SRC_URI = "https://launchpad.net/ufw/0.36/0.36/+download/ufw-0.36.tar.gz \ | 11 | SRC_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 | " |
| 16 | SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" | ||
| 16 | 17 | ||
| 17 | UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" | 18 | UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" |
| 18 | 19 | ||
| 19 | SRC_URI[md5sum] = "6d8ab1506da21ae003f4628f93d05781" | 20 | inherit distutils3 features_check systemd update-rc.d |
| 20 | SRC_URI[sha256sum] = "754b22ae5edff0273460ac9f57509c3938187e0cf4fb9692c6a02833fff33cfc" | ||
| 21 | |||
| 22 | inherit setuptools3 features_check systemd update-rc.d | ||
| 23 | 21 | ||
| 24 | RDEPENDS:${PN} = " \ | 22 | RDEPENDS:${PN} = " \ |
| 25 | iptables \ | 23 | iptables \ |
