Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
From 653db8b938166db7833135f615b90c38a3f27a30 Mon Sep 17 00:00:00 2001
|
||||
From: "Maxin B. John" <maxin.john@intel.com>
|
||||
Date: Thu, 25 Apr 2024 10:51:02 +0200
|
||||
Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
|
||||
|
||||
Default behavior (autodetecting) does not change, but specifying
|
||||
either option would explicitly disable or enable libnfnetlink support,
|
||||
and if the library is not found in the latter case, ./configure will error
|
||||
out.
|
||||
|
||||
Upstream-Status: Backport [https://git.netfilter.org/iptables/commit/?id=653db8b938166db7833135f615b90c38a3f27a30]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
---
|
||||
configure.ac | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d99fa3b9..2293702b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -63,6 +63,9 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
|
||||
AC_ARG_ENABLE([nftables],
|
||||
AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]),
|
||||
[enable_nftables="$enableval"], [enable_nftables="yes"])
|
||||
+AC_ARG_ENABLE([libnfnetlink],
|
||||
+ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
|
||||
+ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="auto"])
|
||||
AC_ARG_ENABLE([connlabel],
|
||||
AS_HELP_STRING([--disable-connlabel],
|
||||
[Do not build libnetfilter_conntrack]),
|
||||
@@ -113,8 +116,14 @@ AM_CONDITIONAL([ENABLE_SYNCONF], [test "$enable_nfsynproxy" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_NFTABLES], [test "$enable_nftables" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_CONNLABEL], [test "$enable_connlabel" = "yes"])
|
||||
|
||||
-PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
|
||||
- [nfnetlink=1], [nfnetlink=0])
|
||||
+# If specified explicitly on the command line, error out when library was not found
|
||||
+# Otherwise, disable and continue
|
||||
+AS_IF([test "x$enable_libnfnetlink" = "xyes"],
|
||||
+ [PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
|
||||
+ [nfnetlink=1])],
|
||||
+ [test "x$enable_libnfnetlink" = "xauto"],
|
||||
+ [PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
|
||||
+ [nfnetlink=1], [nfnetlink=0])])
|
||||
AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
|
||||
|
||||
if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 465e3ef77f1763d225adc76220e43ee9bd73b178 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Tue, 17 May 2022 10:56:59 +0200
|
||||
Subject: [PATCH] iptables/xshared.h: add missing sys.types.h include
|
||||
|
||||
This resolves the build error under musl:
|
||||
|
||||
| ../../../../../../../workspace/sources/iptables/iptables/xshared.h:83:56: error: unknown type name 'u_int16_t'; did you mean 'uint16_t'?
|
||||
| 83 | set_option(unsigned int *options, unsigned int option, u_int16_t *invflg,
|
||||
| | ^~~~~~~~~
|
||||
| | uint16_t
|
||||
|
||||
Upstream-Status: Submitted [via email to phil@nwl.cc]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
|
||||
---
|
||||
iptables/xshared.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/iptables/xshared.h b/iptables/xshared.h
|
||||
index a200e0d..f543dbf 100644
|
||||
--- a/iptables/xshared.h
|
||||
+++ b/iptables/xshared.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <stdint.h>
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
+#include <sys/types.h>
|
||||
#include <linux/netfilter_arp/arp_tables.h>
|
||||
#include <linux/netfilter_ipv4/ip_tables.h>
|
||||
#include <linux/netfilter_ipv6/ip6_tables.h>
|
||||
@@ -0,0 +1,49 @@
|
||||
From 6832501bbb90a3dab977a4625d0391804c0e795c Mon Sep 17 00:00:00 2001
|
||||
From: "Maxin B. John" <maxin.john@intel.com>
|
||||
Date: Tue, 21 Feb 2017 11:49:07 +0200
|
||||
Subject: [PATCH] configure.ac:
|
||||
only-check-conntrack-when-libnfnetlink-enabled.patch
|
||||
|
||||
Package libnetfilter-conntrack depends on package libnfnetlink. iptables
|
||||
checks package libnetfilter-conntrack whatever its package config
|
||||
libnfnetlink is enabled or not. When libnfnetlink is disabled but
|
||||
package libnetfilter-conntrack exists, it fails randomly with:
|
||||
|
||||
In file included from
|
||||
.../iptables/1.4.21-r0/iptables-1.4.21/extensions/libxt_connlabel.c:8:0:
|
||||
|
||||
.../tmp/sysroots/qemumips/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:14:42:
|
||||
fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
|
||||
|
||||
compilation terminated.
|
||||
GNUmakefile:96: recipe for target 'libxt_connlabel.oo' failed
|
||||
Only check libnetfilter-conntrack when libnfnetlink is enabled to fix it.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
Signed-off-by: Maxin B. John <maxin.john@intel.com>
|
||||
|
||||
---
|
||||
configure.ac | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d607772..25a8e75 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -159,10 +159,12 @@ if test "$nftables" != 1; then
|
||||
fi
|
||||
|
||||
if test "x$enable_connlabel" = "xyes"; then
|
||||
- PKG_CHECK_MODULES([libnetfilter_conntrack],
|
||||
+ nfconntrack=0
|
||||
+ AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
|
||||
+ PKG_CHECK_MODULES([libnetfilter_conntrack],
|
||||
[libnetfilter_conntrack >= 1.0.6],
|
||||
[nfconntrack=1], [nfconntrack=0])
|
||||
-
|
||||
+ ])
|
||||
if test "$nfconntrack" -ne 1; then
|
||||
blacklist_modules="$blacklist_modules connlabel";
|
||||
echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built";
|
||||
@@ -0,0 +1,37 @@
|
||||
From 2026b08bce7fe87b5964f7912e1eef30f04922c1 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Sutter <phil@nwl.cc>
|
||||
Date: Fri, 26 Jan 2024 18:43:10 +0100
|
||||
Subject: [PATCH] nft: ruleparse: Add missing braces around ternary
|
||||
|
||||
The expression evaluated the sum before the ternay, consequently not
|
||||
adding target->size if tgsize was zero.
|
||||
|
||||
Identified by ASAN for a simple rule using standard target:
|
||||
| # ebtables -A INPUT -s de:ad:be:ef:0:00 -j RETURN
|
||||
| # ebtables -D INPUT -s de:ad:be:ef:0:00 -j RETURN
|
||||
| =================================================================
|
||||
| ==18925==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000120 at pc 0x7f627a4c75c5 bp 0x7ffe882b5180 sp 0x7ffe882b4928
|
||||
| READ of size 8 at 0x603000000120 thread T0
|
||||
| [...]
|
||||
|
||||
Upstream-Status: Backport [2026b08bce7fe87b5964f7912e1eef30f04922c1]
|
||||
|
||||
Fixes: 2a6eee89083c8 ("nft-ruleparse: Introduce nft_create_target()")
|
||||
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
---
|
||||
iptables/nft-ruleparse.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/iptables/nft-ruleparse.c b/iptables/nft-ruleparse.c
|
||||
index 0bbdf44faf..3b1cbe4fa1 100644
|
||||
--- a/iptables/nft-ruleparse.c
|
||||
+++ b/iptables/nft-ruleparse.c
|
||||
@@ -94,7 +94,7 @@ __nft_create_target(struct nft_xt_ctx *ctx, const char *name, size_t tgsize)
|
||||
if (!target)
|
||||
return NULL;
|
||||
|
||||
- size = XT_ALIGN(sizeof(*target->t)) + tgsize ?: target->size;
|
||||
+ size = XT_ALIGN(sizeof(*target->t)) + (tgsize ?: target->size);
|
||||
|
||||
target->t = xtables_calloc(1, size);
|
||||
target->t->u.target_size = size;
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=IPv6 Packet Filtering Framework
|
||||
Before=network-pre.target
|
||||
Wants=network-pre.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=@SBINDIR@/ip6tables-restore -w -- @RULESDIR@/ip6tables.rules
|
||||
ExecReload=@SBINDIR@/ip6tables-restore -w -- @RULESDIR@/ip6tables.rules
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=IPv4 Packet Filtering Framework
|
||||
Before=network-pre.target
|
||||
Wants=network-pre.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=@SBINDIR@/iptables-restore -w -- @RULESDIR@/iptables.rules
|
||||
ExecReload=@SBINDIR@/iptables-restore -w -- @RULESDIR@/iptables.rules
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
126
sources/poky/meta/recipes-extended/iptables/iptables_1.8.10.bb
Normal file
126
sources/poky/meta/recipes-extended/iptables/iptables_1.8.10.bb
Normal file
@@ -0,0 +1,126 @@
|
||||
SUMMARY = "Tools for managing kernel packet filtering capabilities"
|
||||
DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
|
||||
filtering code in Linux."
|
||||
HOMEPAGE = "http://www.netfilter.org/"
|
||||
BUGTRACKER = "http://bugzilla.netfilter.org/"
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc \
|
||||
"
|
||||
|
||||
SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.xz \
|
||||
file://iptables.service \
|
||||
file://iptables.rules \
|
||||
file://ip6tables.service \
|
||||
file://ip6tables.rules \
|
||||
file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
|
||||
file://0002-iptables-xshared.h-add-missing-sys.types.h-include.patch \
|
||||
file://0004-configure.ac-only-check-conntrack-when-libnfnetlink-.patch \
|
||||
file://0005-nft-ruleparse-Add-missing-braces-around-ternary.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "5cc255c189356e317d070755ce9371eb63a1b783c34498fb8c30264f3cc59c9c"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "\
|
||||
iptables.service \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'ip6tables.service', '', d)} \
|
||||
"
|
||||
|
||||
inherit autotools pkgconfig systemd
|
||||
|
||||
EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}"
|
||||
|
||||
CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0"
|
||||
|
||||
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
|
||||
|
||||
# libnfnetlink recipe is in meta-networking layer
|
||||
PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
|
||||
|
||||
# libnftnl recipe is in meta-networking layer(previously known as libnftables)
|
||||
PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
|
||||
|
||||
do_configure:prepend() {
|
||||
# Remove some libtool m4 files
|
||||
# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
|
||||
rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
|
||||
|
||||
# Copy a header to fix out of tree builds
|
||||
cp -f ${S}/libiptc/linux_list.h ${S}/include/libiptc/
|
||||
}
|
||||
|
||||
IPTABLES_RULES_DIR ?= "${sysconfdir}/${BPN}"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${IPTABLES_RULES_DIR}
|
||||
install -m 0644 ${WORKDIR}/iptables.rules ${D}${IPTABLES_RULES_DIR}
|
||||
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/iptables.service ${D}${systemd_system_unitdir}
|
||||
|
||||
sed -i \
|
||||
-e 's,@SBINDIR@,${sbindir},g' \
|
||||
-e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
|
||||
${D}${systemd_system_unitdir}/iptables.service
|
||||
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'true', 'false', d)} ; then
|
||||
install -m 0644 ${WORKDIR}/ip6tables.rules ${D}${IPTABLES_RULES_DIR}
|
||||
install -m 0644 ${WORKDIR}/ip6tables.service ${D}${systemd_system_unitdir}
|
||||
|
||||
sed -i \
|
||||
-e 's,@SBINDIR@,${sbindir},g' \
|
||||
-e 's,@RULESDIR@,${IPTABLES_RULES_DIR},g' \
|
||||
${D}${systemd_system_unitdir}/ip6tables.service
|
||||
fi
|
||||
|
||||
# if libnftnl is included, make the iptables symlink point to the nft-based binary by default
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'libnftnl', 'true', 'false', d)} ; then
|
||||
ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables
|
||||
ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-save
|
||||
ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-restore
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-modules ${PN}-apply"
|
||||
PACKAGES_DYNAMIC += "^${PN}-module-.*"
|
||||
|
||||
python populate_packages:prepend() {
|
||||
modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='')
|
||||
if modules:
|
||||
metapkg = d.getVar('PN') + '-modules'
|
||||
d.appendVar('RDEPENDS:' + metapkg, ' ' + ' '.join(modules))
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "${PN}-module-xt-standard"
|
||||
RRECOMMENDS:${PN} = " \
|
||||
${PN}-modules \
|
||||
kernel-module-x-tables \
|
||||
kernel-module-ip-tables \
|
||||
kernel-module-iptable-filter \
|
||||
kernel-module-iptable-nat \
|
||||
kernel-module-nf-defrag-ipv4 \
|
||||
kernel-module-nf-conntrack \
|
||||
kernel-module-nf-conntrack-ipv4 \
|
||||
kernel-module-nf-nat \
|
||||
kernel-module-ipt-masquerade \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'ipv6', '\
|
||||
kernel-module-ip6table-filter \
|
||||
kernel-module-ip6-tables \
|
||||
', '', d)} \
|
||||
"
|
||||
|
||||
FILES:${PN} += "${datadir}/xtables"
|
||||
|
||||
FILES:${PN}-apply = "${sbindir}/ip*-apply"
|
||||
RDEPENDS:${PN}-apply = "${PN} bash"
|
||||
|
||||
# Include the symlinks as well in respective packages
|
||||
FILES:${PN}-module-xt-conntrack += "${libdir}/xtables/libxt_state.so"
|
||||
FILES:${PN}-module-xt-ct += "${libdir}/xtables/libxt_NOTRACK.so ${libdir}/xtables/libxt_REDIRECT.so"
|
||||
FILES:${PN}-module-xt-nat += "${libdir}/xtables/libxt_SNAT.so ${libdir}/xtables/libxt_DNAT.so ${libdir}/xtables/libxt_MASQUERADE.so"
|
||||
|
||||
ALLOW_EMPTY:${PN}-modules = "1"
|
||||
|
||||
INSANE_SKIP:${PN}-module-xt-conntrack = "dev-so"
|
||||
INSANE_SKIP:${PN}-module-xt-ct = "dev-so"
|
||||
INSANE_SKIP:${PN}-module-xt-nat = "dev-so"
|
||||
Reference in New Issue
Block a user