Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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 | SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ |
| 11 | file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ |
| 12 | file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ |
| 13 | file://0003-extensions-format-security-fixes-in-libipt_icmp.patch \ |
| 14 | " |
| 15 | |
| 16 | SRC_URI[md5sum] = "944558e88ddcc3b9b0d9550070fa3599" |
| 17 | SRC_URI[sha256sum] = "a3778b50ed1a3256f9ca975de82c2204e508001fc2471238c8c97f3d1c4c12af" |
| 18 | |
| 19 | inherit autotools pkgconfig |
| 20 | |
| 21 | EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}" |
| 22 | |
| 23 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
| 24 | |
| 25 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 26 | |
| 27 | # libnfnetlink recipe is in meta-networking layer |
| 28 | PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack" |
| 29 | |
| 30 | # libnftnl recipe is in meta-networking layer(previously known as libnftables) |
| 31 | PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl" |
| 32 | |
| 33 | do_configure_prepend() { |
| 34 | # Remove some libtool m4 files |
| 35 | # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. |
| 36 | rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 |
| 37 | } |
| 38 | |
| 39 | PACKAGES += "${PN}-modules" |
| 40 | PACKAGES_DYNAMIC += "^${PN}-module-.*" |
| 41 | |
| 42 | python populate_packages_prepend() { |
| 43 | modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='') |
| 44 | if modules: |
| 45 | metapkg = d.getVar('PN') + '-modules' |
| 46 | d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules)) |
| 47 | } |
| 48 | |
| 49 | FILES_${PN} += "${datadir}/xtables" |
| 50 | |
| 51 | ALLOW_EMPTY_${PN}-modules = "1" |
| 52 | |
| 53 | RDEPENDS_${PN} = "${PN}-module-xt-standard" |
| 54 | RRECOMMENDS_${PN} = " \ |
| 55 | ${PN}-modules \ |
| 56 | kernel-module-x-tables \ |
| 57 | kernel-module-ip-tables \ |
| 58 | kernel-module-iptable-filter \ |
| 59 | kernel-module-iptable-nat \ |
| 60 | kernel-module-nf-defrag-ipv4 \ |
| 61 | kernel-module-nf-conntrack \ |
| 62 | kernel-module-nf-conntrack-ipv4 \ |
| 63 | kernel-module-nf-nat \ |
| 64 | kernel-module-ipt-masquerade \ |
| 65 | " |