]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
package: nftables: replace patch with proper backport 23910/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 22 Jun 2026 08:08:35 +0000 (08:08 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 22 Jun 2026 09:52:58 +0000 (11:52 +0200)
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>
package/network/utils/nftables/Makefile
package/network/utils/nftables/patches/000-build-fix-configure-with-non-bash-shell.patch [new file with mode: 0644]
package/network/utils/nftables/patches/001-build-simplify-the-instantiation-of-nftversion-h.patch
package/network/utils/nftables/patches/001-for-bash-syntax.patch [deleted file]
package/network/utils/nftables/patches/002-build-generate-build-time-stamp-once-at-configure.patch
package/network/utils/nftables/patches/003-build-support-SOURCE_DATE_EPOCH-for-build-time-stamp.patch

index fbcf77e5546cd6b1e456629997f54328694a6366..6075ebb5af97477620aebc911a16aebfa394138f 100644 (file)
@@ -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
diff --git a/package/network/utils/nftables/patches/000-build-fix-configure-with-non-bash-shell.patch b/package/network/utils/nftables/patches/000-build-fix-configure-with-non-bash-shell.patch
new file mode 100644 (file)
index 0000000..03c2d48
--- /dev/null
@@ -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 "};"
index 64ca9b228d9d71bd2e6f4b8f5e0afad44319e1ef..933c0b599aa00fe356fce8775aa7020e71042d8b 100644 (file)
@@ -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 @@
diff --git a/package/network/utils/nftables/patches/001-for-bash-syntax.patch b/package/network/utils/nftables/patches/001-for-bash-syntax.patch
deleted file mode 100644 (file)
index 8db917b..0000000
+++ /dev/null
@@ -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 "};"
index eae6a5bc073988ee5c802efebef0949c88087ac1..82b19b1dbcd038ed91f590753b9245e8d685f890 100644 (file)
@@ -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 @@
index c37c77b7d24396e677f3459072090052f3761991..83b014c7dacc5a95857b19dd7777b3e7d11e7f8f 100644 (file)
@@ -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 '.' ',')])