mirror of
https://github.com/openwrt/openwrt.git
synced 2026-07-15 06:11:53 +04:00
package: nftables: replace patch with proper backport
A patch was added without proper header and not obvious that it's a
backport. Replace that patch with a backport of the upstream commit.
Patch 001-build-simplify-the-instantiation-of-nftversion-h.patch
rebased, all others refreshed.
Fixes: 255f4c8e60 ("packages: nftables: fix build on host with busybox ash")
Link: https://github.com/openwrt/openwrt/pull/23910
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nftables
|
||||
PKG_VERSION:=1.1.6
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
From 2e3c68f26d5bd60c8ea7467fa9018c282a7d8c47 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Palus <jpalus@fastmail.com>
|
||||
Date: Sat, 6 Dec 2025 00:43:58 +0100
|
||||
Subject: build: fix ./configure with non-bash shell
|
||||
|
||||
CONFIG_SHELL=/bin/dash ./configure
|
||||
|
||||
breaks with:
|
||||
|
||||
./config.status: 2044: Syntax error: Bad for loop variable
|
||||
|
||||
Fixes: 64c07e38f049 ("table: Embed creating nft version into userdata")
|
||||
Signed-off-by: Jan Palus <jpalus@fastmail.com>
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -157,7 +157,7 @@ AC_CONFIG_COMMANDS([nftversion.h], [
|
||||
echo " ${STABLE_RELEASE}"
|
||||
echo "};"
|
||||
echo "static char nftbuildstamp[[]] = {"
|
||||
- for ((i = 56; i >= 0; i-= 8)); do
|
||||
+ for i in `seq 56 -8 0`; do
|
||||
echo " ((uint64_t)MAKE_STAMP >> $i) & 0xff,"
|
||||
done
|
||||
echo "};"
|
||||
+4
-9
@@ -1,7 +1,7 @@
|
||||
From 2a0ec8a7246e5c5eb85270e3d4de43e20a00c577 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Sowden <jeremy@azazel.net>
|
||||
Date: Wed, 28 Jan 2026 18:31:05 +0000
|
||||
Subject: [PATCH] build: simplify the instantation of nftversion.h
|
||||
Subject: build: simplify the instantation of nftversion.h
|
||||
|
||||
Add an nftversion.h.in autoconf input file which configure uses to instantiate
|
||||
nftversion.h in the usual way.
|
||||
@@ -14,11 +14,9 @@ Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
2 files changed, 22 insertions(+), 16 deletions(-)
|
||||
create mode 100644 nftversion.h.in
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6825474..2c61072 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -147,22 +147,8 @@ AM_CONDITIONAL([BUILD_SERVICE], [test "x$unitdir" != x])
|
||||
@@ -147,22 +147,8 @@ AM_CONDITIONAL([BUILD_SERVICE], [test "x
|
||||
AC_ARG_WITH([stable-release], [AS_HELP_STRING([--with-stable-release],
|
||||
[Stable release number])],
|
||||
[], [with_stable_release=0])
|
||||
@@ -32,7 +30,7 @@ index 6825474..2c61072 100644
|
||||
- echo " ${STABLE_RELEASE}"
|
||||
- echo "};"
|
||||
- echo "static char nftbuildstamp[[]] = {"
|
||||
- for ((i = 56; i >= 0; i-= 8)); do
|
||||
- for i in `seq 56 -8 0`; do
|
||||
- echo " ((uint64_t)MAKE_STAMP >> $i) & 0xff,"
|
||||
- done
|
||||
- echo "};"
|
||||
@@ -43,7 +41,7 @@ index 6825474..2c61072 100644
|
||||
# Current date should be fetched exactly once per build,
|
||||
# so have 'make' call date and pass the value to every 'gcc' call
|
||||
AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"])
|
||||
@@ -175,6 +161,7 @@ AM_CONDITIONAL([BUILD_DISTCHECK], [test "x$enable_distcheck" = "xyes"])
|
||||
@@ -175,6 +161,7 @@ AM_CONDITIONAL([BUILD_DISTCHECK], [test
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
libnftables.pc \
|
||||
@@ -51,9 +49,6 @@ index 6825474..2c61072 100644
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
diff --git a/nftversion.h.in b/nftversion.h.in
|
||||
new file mode 100644
|
||||
index 0000000..6f89771
|
||||
--- /dev/null
|
||||
+++ b/nftversion.h.in
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17940,7 +17940,7 @@
|
||||
echo " ${STABLE_RELEASE}"
|
||||
echo "};"
|
||||
echo "static char nftbuildstamp[] = {"
|
||||
- for ((i = 56; i >= 0; i-= 8)); do
|
||||
+ for i in `seq 56 -8 0`; do
|
||||
echo " ((uint64_t)MAKE_STAMP >> $i) & 0xff,"
|
||||
done
|
||||
echo "};"
|
||||
+1
-7
@@ -19,8 +19,6 @@ Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
nftversion.h.in | 18 ++++++++++--------
|
||||
3 files changed, 11 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index b134330..ceb2225 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -159,8 +159,6 @@ AM_CFLAGS = \
|
||||
@@ -32,11 +30,9 @@ index b134330..ceb2225 100644
|
||||
$(NULL)
|
||||
|
||||
AM_YFLAGS = -d -Wno-yacc
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2c61072..9859072 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -149,9 +149,7 @@ AC_ARG_WITH([stable-release], [AS_HELP_STRING([--with-stable-release],
|
||||
@@ -149,9 +149,7 @@ AC_ARG_WITH([stable-release], [AS_HELP_S
|
||||
[], [with_stable_release=0])
|
||||
AC_SUBST([STABLE_RELEASE],[$with_stable_release])
|
||||
AC_SUBST([NFT_VERSION], [$(echo "${VERSION}" | tr '.' ',')])
|
||||
@@ -47,8 +43,6 @@ index 2c61072..9859072 100644
|
||||
|
||||
AC_ARG_ENABLE([distcheck],
|
||||
AS_HELP_STRING([--enable-distcheck], [Build for distcheck]),
|
||||
diff --git a/nftversion.h.in b/nftversion.h.in
|
||||
index 6f89771..325b9dc 100644
|
||||
--- a/nftversion.h.in
|
||||
+++ b/nftversion.h.in
|
||||
@@ -1,19 +1,21 @@
|
||||
|
||||
+1
-3
@@ -18,11 +18,9 @@ Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9859072..0226086 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -149,7 +149,7 @@ AC_ARG_WITH([stable-release], [AS_HELP_STRING([--with-stable-release],
|
||||
@@ -149,7 +149,7 @@ AC_ARG_WITH([stable-release], [AS_HELP_S
|
||||
[], [with_stable_release=0])
|
||||
AC_SUBST([STABLE_RELEASE],[$with_stable_release])
|
||||
AC_SUBST([NFT_VERSION], [$(echo "${VERSION}" | tr '.' ',')])
|
||||
|
||||
Reference in New Issue
Block a user