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