mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-02 08:45:49 +00:00
Switch from using DISTUTILS_*_ARGS to SETUPTOOLS_*_ARGS to correspond
with the earlier change to use setuptools3_legacy instead of distutils3.
Without this change, you will get the following error if your build host
does not have iptables installed:
Fixes:
ERROR: ufw-0.36.1-r0 do_compile: 'python3 setup.py build ' execution failed.
Log data follows:
| DEBUG: Executing shell function do_compile
| ERROR: could not find required binary 'iptables'
| ERROR: 'python3 setup.py build ' execution failed.
| WARNING: exit code 1 from a shell command.
ERROR: Task ([snip]/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb:do_compile) failed with exit code '1'
Also, although the build will not fail on a host that has iptables, it
could cause a problem if it is installed at a different path than where
OpenEmbedded's iptables will be installed on the target.
Fixes: 3e2ed1dcc088 ("ufw: port to setuptools, use setuptools_legacy")
Signed-off-by: Howard Cochran <howard_cochran@jabil.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
75 lines
2.4 KiB
BlitzBasic
75 lines
2.4 KiB
BlitzBasic
|
|
SUMMARY = "Uncomplicated Firewall"
|
|
DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \
|
|
managing a netfilter firewall. It provides a command line interface and aims \
|
|
to be uncomplicated and easy to use."
|
|
HOMEPAGE = "https://launchpad.net/ufw"
|
|
SECTION = "net"
|
|
LICENSE = "GPL-3.0-only"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
|
|
|
|
SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \
|
|
file://0001-optimize-boot.patch \
|
|
file://0002-add-an-option-to-specify-iptables-location.patch \
|
|
file://0003-only-make-one-reference-to-env.patch \
|
|
file://setuptools.patch \
|
|
"
|
|
SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c"
|
|
|
|
UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
|
|
|
|
inherit setuptools3_legacy features_check systemd update-rc.d
|
|
|
|
RDEPENDS:${PN} = " \
|
|
iptables \
|
|
python3 \
|
|
python3-modules \
|
|
"
|
|
|
|
RRECOMMENDS:${PN} = " \
|
|
kernel-module-ipv6 \
|
|
kernel-module-nf-conntrack-ipv6 \
|
|
kernel-module-nf-log-common \
|
|
kernel-module-nf-log-ipv4 \
|
|
kernel-module-nf-log-ipv6 \
|
|
kernel-module-nf-addrtype \
|
|
kernel-module-nf-limit \
|
|
kernel-module-nf-log \
|
|
kernel-module-nf-recent \
|
|
"
|
|
|
|
|
|
do_configure:prepend() {
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
|
|
sed -i -e 's|/lib|${nonarch_base_libdir}|' ${S}/setup.py
|
|
fi
|
|
}
|
|
|
|
do_install:append() {
|
|
install -d ${D}${systemd_unitdir}/system/
|
|
install -m 0644 ${S}/doc/systemd.example ${D}${systemd_unitdir}/system/ufw.service
|
|
|
|
install -d ${D}${sysconfdir}/init.d/
|
|
install -m 0755 ${S}/doc/initscript.example ${D}${sysconfdir}/init.d/ufw
|
|
}
|
|
|
|
SYSTEMD_SERVICE:${PN} = "ufw.service"
|
|
|
|
INITSCRIPT_NAME = "ufw"
|
|
INITSCRIPT_PARAMS = "defaults"
|
|
|
|
# Certain items are explicitly put under /lib, not base_libdir when installed.
|
|
#
|
|
FILES:${PN} += " \
|
|
${sbindir}/* \
|
|
${datadir}/ufw/* \
|
|
${nonarch_base_libdir}/ufw/* \
|
|
${sysconfdir}/ufw/* \
|
|
${sysconfdir}/default/ufw \
|
|
"
|
|
|
|
REQUIRED_DISTRO_FEATURES = "ipv6"
|
|
|
|
SETUPTOOLS_BUILD_ARGS:append = " --iptables-dir /usr/sbin"
|
|
SETUPTOOLS_INSTALL_ARGS:append = " --iptables-dir /usr/sbin"
|