summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iptables/iptables_1.8.7.bb
diff options
context:
space:
mode:
authorWang Mingyu <wangmy@cn.fujitsu.com>2021-01-21 13:51:44 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-23 17:08:54 +0000
commite261ab2d36c27ca909c6066c9495341359f2ec57 (patch)
tree5135ae154de875ba43da592c5118552554912539 /meta/recipes-extended/iptables/iptables_1.8.7.bb
parent80f38cff27a8df98b6f5f92057b7c8b37308d51d (diff)
downloadpoky-e261ab2d36c27ca909c6066c9495341359f2ec57.tar.gz
iptables: upgrade 1.8.6 -> 1.8.7
(From OE-Core rev: 7d5c46abf904de5c9770e466baef38705f46695e) Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/iptables/iptables_1.8.7.bb')
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.7.bb110
1 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-extended/iptables/iptables_1.8.7.bb b/meta/recipes-extended/iptables/iptables_1.8.7.bb
new file mode 100644
index 0000000000..621f87ff87
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables_1.8.7.bb
@@ -0,0 +1,110 @@
1SUMMARY = "Tools for managing kernel packet filtering capabilities"
2DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
3filtering code in Linux."
4HOMEPAGE = "http://www.netfilter.org/"
5BUGTRACKER = "http://bugzilla.netfilter.org/"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc \
9"
10
11SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
12 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
13 file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
14 file://iptables.service \
15 file://iptables.rules \
16 file://ip6tables.service \
17 file://ip6tables.rules \
18 "
19SRC_URI[sha256sum] = "c109c96bb04998cd44156622d36f8e04b140701ec60531a10668cfdff5e8d8f0"
20
21SYSTEMD_SERVICE_${PN} = "\
22 iptables.service \
23 ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'ip6tables.service', '', d)} \
24"
25
26inherit autotools pkgconfig systemd
27
28EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}"
29
30PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
31PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
32
33# libnfnetlink recipe is in meta-networking layer
34PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
35
36# libnftnl recipe is in meta-networking layer(previously known as libnftables)
37PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
38
39do_configure_prepend() {
40 # Remove some libtool m4 files
41 # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
42 rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
43}
44
45IPTABLES_RULES_DIR ?= "${sysconfdir}/${BPN}"
46
47do_install_append() {
48 install -d ${D}${IPTABLES_RULES_DIR}
49 install -m 0644 ${WORKDIR}/iptables.rules ${D}${IPTABLES_RULES_DIR}
50
51 install -d ${D}${systemd_system_unitdir}
52 install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir}
53
54 sed -i \
55 -e 's,@SBINDIR@,${sbindir},g' \
56 -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
57 ${D}${systemd_system_unitdir}/iptables.service
58
59 if ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'true', 'false', d)} ; then
60 install -m 0644 ${WORKDIR}/ip6tables.rules ${D}${IPTABLES_RULES_DIR}
61 install -m 0644 ${WORKDIR}/ip6tables.service ${D}${systemd_system_unitdir}
62
63 sed -i \
64 -e 's,@SBINDIR@,${sbindir},g' \
65 -e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
66 ${D}${systemd_system_unitdir}/ip6tables.service
67 fi
68}
69
70PACKAGES =+ "${PN}-modules ${PN}-apply"
71PACKAGES_DYNAMIC += "^${PN}-module-.*"
72
73python populate_packages_prepend() {
74 modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='')
75 if modules:
76 metapkg = d.getVar('PN') + '-modules'
77 d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules))
78}
79
80RDEPENDS_${PN} = "${PN}-module-xt-standard"
81RRECOMMENDS_${PN} = " \
82 ${PN}-modules \
83 kernel-module-x-tables \
84 kernel-module-ip-tables \
85 kernel-module-iptable-filter \
86 kernel-module-iptable-nat \
87 kernel-module-nf-defrag-ipv4 \
88 kernel-module-nf-conntrack \
89 kernel-module-nf-conntrack-ipv4 \
90 kernel-module-nf-nat \
91 kernel-module-ipt-masquerade \
92 ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', '\
93 kernel-module-ip6table-filter \
94 kernel-module-ip6-tables \
95 ', '', d)} \
96"
97
98FILES_${PN} += "${datadir}/xtables"
99
100FILES_${PN}-apply = "${sbindir}/ip*-apply"
101RDEPENDS_${PN}-apply = "${PN} bash"
102
103# Include the symlinks as well in respective packages
104FILES_${PN}-module-xt-conntrack += "${libdir}/xtables/libxt_state.so"
105FILES_${PN}-module-xt-ct += "${libdir}/xtables/libxt_NOTRACK.so"
106
107ALLOW_EMPTY_${PN}-modules = "1"
108
109INSANE_SKIP_${PN}-module-xt-conntrack = "dev-so"
110INSANE_SKIP_${PN}-module-xt-ct = "dev-so"