diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb')
-rw-r--r-- | meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb b/meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb new file mode 100644 index 000000000..5955072f1 --- /dev/null +++ b/meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb | |||
@@ -0,0 +1,84 @@ | |||
1 | SUMMARY = "Dynamic firewall daemon with a D-Bus interface" | ||
2 | HOMEPAGE = "https://firewalld.org/" | ||
3 | BUGTRACKER = "https://github.com/firewalld/firewalld/issues" | ||
4 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
6 | |||
7 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ | ||
8 | file://0001-fix-building-in-a-separate-directory-outside-the-sou.patch \ | ||
9 | file://firewalld.init \ | ||
10 | " | ||
11 | SRC_URI[md5sum] = "e63bdd65a4d2f6338f60b31e91bb5525" | ||
12 | SRC_URI[sha256sum] = "5a82a72fd9ad4cbbfb805bae615faa9b91a27855245de0fef3bcb06439394852" | ||
13 | |||
14 | # glib-2.0-native is needed for GSETTINGS_RULES autoconf macro from gsettings.m4 | ||
15 | # xmlto-native is needed to populate /etc/xml/catalog.xml in the sysroot so that xsltproc finds the docbook xslt | ||
16 | DEPENDS = "intltool-native glib-2.0-native libxslt-native docbook-xsl-stylesheets-native xmlto-native" | ||
17 | |||
18 | inherit gettext autotools bash-completion python3native gsettings systemd update-rc.d | ||
19 | |||
20 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
21 | PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_unitdir}/system/,--disable-systemd" | ||
22 | |||
23 | # iptables, ip6tables, ebtables, and ipset *should* be unnecessary | ||
24 | # when the nftables backend is available, because nftables supersedes all of them. | ||
25 | # However we still need iptables and ip6tables to be available otherwise any | ||
26 | # application relying on "direct passthrough" rules (such as docker) will break. | ||
27 | # /etc/sysconfig/firewalld is a Red Hat-ism, only referenced by | ||
28 | # the Red Hat-specific init script which we aren't using, so we disable that. | ||
29 | EXTRA_OECONF = "\ | ||
30 | --with-nft=${sbindir}/nft \ | ||
31 | --without-ipset \ | ||
32 | --with-iptables=${sbindir}/iptables \ | ||
33 | --with-iptables-restore=${sbindir}/iptables-restore \ | ||
34 | --with-ip6tables=${sbindir}/ip6tables \ | ||
35 | --with-ip6tables-restore=${sbindir}/ip6tables-restore \ | ||
36 | --without-ebtables \ | ||
37 | --without-ebtables-restore \ | ||
38 | --disable-sysconfig \ | ||
39 | " | ||
40 | |||
41 | INITSCRIPT_NAME = "firewalld" | ||
42 | SYSTEMD_SERVICE = "firewalld.service" | ||
43 | |||
44 | do_install_append() { | ||
45 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
46 | : | ||
47 | else | ||
48 | # firewalld ships an init script but it contains Red Hat-isms, replace it with our own | ||
49 | rm -rf ${D}${sysconfdir}/rc.d/ | ||
50 | install -d ${D}${sysconfdir}/init.d | ||
51 | install -m0755 ${WORKDIR}/firewalld.init ${D}${sysconfdir}/init.d/firewalld | ||
52 | fi | ||
53 | |||
54 | # We ran ./configure with PYTHON pointed at the binary inside $STAGING_BINDIR_NATIVE | ||
55 | # so now we need to fix up any references to point at the proper path in the image. | ||
56 | # This hack is also in distutils.bbclass, but firewalld doesn't use distutils/setuptools. | ||
57 | if [ ${PN} != "${BPN}-native" ]; then | ||
58 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python3-native/python3:${bindir}/python3:g \ | ||
59 | ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml | ||
60 | fi | ||
61 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g \ | ||
62 | ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml | ||
63 | } | ||
64 | |||
65 | FILES_${PN} += "\ | ||
66 | ${PYTHON_SITEPACKAGES_DIR}/firewall \ | ||
67 | ${datadir}/polkit-1 \ | ||
68 | ${datadir}/metainfo \ | ||
69 | " | ||
70 | |||
71 | RDEPENDS_${PN} = "\ | ||
72 | nftables \ | ||
73 | iptables \ | ||
74 | python3-core \ | ||
75 | python3-io \ | ||
76 | python3-fcntl \ | ||
77 | python3-shell \ | ||
78 | python3-syslog \ | ||
79 | python3-xml \ | ||
80 | python3-dbus \ | ||
81 | python3-slip-dbus \ | ||
82 | python3-decorator \ | ||
83 | python3-pygobject \ | ||
84 | " | ||