From 70e5eb74f51ddf81d2674877a9c2f646e9035f5b Mon Sep 17 00:00:00 2001 From: John Thomson Date: Sun, 23 Oct 2022 11:21:33 +1000 Subject: [PATCH] xtables-addons: bump to 3.22 + fix for kernel 6.1 Signed-off-by: John Thomson --- net/xtables-addons/Makefile | 4 +- .../patches/100-add-rtsp-conntrack.patch | 4 +- .../patches/200-add-lua-packetscript.patch | 6 +- ...-packetscript-kernel-5.16-no-isystem.patch | 284 ++++++++++++++++++ 4 files changed, 291 insertions(+), 7 deletions(-) create mode 100644 net/xtables-addons/patches/202-fix-lua-packetscript-kernel-5.16-no-isystem.patch diff --git a/net/xtables-addons/Makefile b/net/xtables-addons/Makefile index 87b9afa6..f57e7c94 100644 --- a/net/xtables-addons/Makefile +++ b/net/xtables-addons/Makefile @@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=xtables-addons -PKG_VERSION:=3.21 +PKG_VERSION:=3.22 PKG_RELEASE:=$(AUTORELEASE) -PKG_HASH:=2e09ac129a14f5e9c23b115ebcdfff4aa84e2aeba1268dbdf39b2d752bd71e19 +PKG_HASH:=faa16a27166275afbfe8df605f55c3a81ac693bf19da674d45ceded4137ae217 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://inai.de/files/xtables-addons/ diff --git a/net/xtables-addons/patches/100-add-rtsp-conntrack.patch b/net/xtables-addons/patches/100-add-rtsp-conntrack.patch index dbdc52e9..befcd06a 100644 --- a/net/xtables-addons/patches/100-add-rtsp-conntrack.patch +++ b/net/xtables-addons/patches/100-add-rtsp-conntrack.patch @@ -1725,7 +1725,7 @@ +module_exit(fini); --- a/extensions/Kbuild +++ b/extensions/Kbuild -@@ -27,6 +27,7 @@ obj-${build_lscan} += xt_lscan.o +@@ -28,6 +28,7 @@ obj-${build_lscan} += xt_lscan.o obj-${build_pknock} += pknock/ obj-${build_psd} += xt_psd.o obj-${build_quota2} += xt_quota2.o @@ -1735,7 +1735,7 @@ -include ${M}/Kbuild.* --- a/mconfig +++ b/mconfig -@@ -23,3 +23,4 @@ build_lscan=m +@@ -24,3 +24,4 @@ build_lscan=m build_pknock=m build_psd=m build_quota2=m diff --git a/net/xtables-addons/patches/200-add-lua-packetscript.patch b/net/xtables-addons/patches/200-add-lua-packetscript.patch index c815e1a6..b898f426 100644 --- a/net/xtables-addons/patches/200-add-lua-packetscript.patch +++ b/net/xtables-addons/patches/200-add-lua-packetscript.patch @@ -18134,7 +18134,7 @@ + --- a/extensions/Kbuild +++ b/extensions/Kbuild -@@ -28,6 +28,7 @@ obj-${build_pknock} += pknock/ +@@ -29,6 +29,7 @@ obj-${build_pknock} += pknock/ obj-${build_psd} += xt_psd.o obj-${build_quota2} += xt_quota2.o obj-${build_rtsp} += rtsp/ @@ -18144,14 +18144,14 @@ -include ${M}/Kbuild.* --- a/extensions/Mbuild +++ b/extensions/Mbuild -@@ -23,3 +23,4 @@ obj-${build_pknock} += pknock/ +@@ -24,3 +24,4 @@ obj-${build_pknock} += pknock/ obj-${build_psd} += libxt_psd.so obj-${build_quota2} += libxt_quota2.so obj-${build_gradm} += libxt_gradm.so +obj-${build_LUA} += LUA/ --- a/mconfig +++ b/mconfig -@@ -24,3 +24,4 @@ build_pknock=m +@@ -25,3 +25,4 @@ build_pknock=m build_psd=m build_quota2=m build_rtsp=m diff --git a/net/xtables-addons/patches/202-fix-lua-packetscript-kernel-5.16-no-isystem.patch b/net/xtables-addons/patches/202-fix-lua-packetscript-kernel-5.16-no-isystem.patch new file mode 100644 index 00000000..5279619d --- /dev/null +++ b/net/xtables-addons/patches/202-fix-lua-packetscript-kernel-5.16-no-isystem.patch @@ -0,0 +1,284 @@ +Linux 5.16 includes 04e85bbf71c9 ("isystem: delete global -isystem compile option") + +compile error on >=5.16 +xtables-addons-3.21/extensions/LUA/lua/lua.h:12:10: fatal error: stdarg.h: No such file or directory + 12 | #include + | ^~~~~~~~~~ + +Generated with coccinelle: + +cat <cocci-xtables-lua-linux-5.16.spatch +@include_arg@ +@@ + #include + +@include_def@ +@@ + #include + +@include_both depends on include_arg && include_def@ +@@ + #include + +@add_include_linux_stdheaders_both depends on include_both@ +@@ ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) +?#include +?#include ++#else ++#include ++#include ++#endif + +@add_include_linux_stdheaders depends on !include_both@ +@@ +( ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif +| ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif +) +EOF +spatch --in-place --include-headers --no-includes --sp-file cocci-xtables-lua-linux-5.16.spatch --dir extensions/LUA/lua/ + +--- + +--- a/extensions/LUA/lua/lauxlib.c ++++ b/extensions/LUA/lua/lauxlib.c +@@ -4,7 +4,12 @@ + ** See Copyright Notice in lua.h + */ + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #if !defined(__KERNEL__) + #include +--- a/extensions/LUA/lua/lauxlib.h ++++ b/extensions/LUA/lua/lauxlib.h +@@ -9,7 +9,12 @@ + #define lauxlib_h + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + #include /* for kmalloc and kfree when allocating luaL_Buffer */ + + #if !defined(__KERNEL__) +--- a/extensions/LUA/lua/ldebug.c ++++ b/extensions/LUA/lua/ldebug.c +@@ -5,8 +5,14 @@ + */ + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include + #include ++#else ++#include ++#include ++#endif + #include + + #define ldebug_c +--- a/extensions/LUA/lua/ldump.c ++++ b/extensions/LUA/lua/ldump.c +@@ -4,7 +4,12 @@ + ** See Copyright Notice in lua.h + */ + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #define ldump_c + #define LUA_CORE +--- a/extensions/LUA/lua/lfunc.c ++++ b/extensions/LUA/lua/lfunc.c +@@ -5,7 +5,12 @@ + */ + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #define lfunc_c + #define LUA_CORE +--- a/extensions/LUA/lua/llimits.h ++++ b/extensions/LUA/lua/llimits.h +@@ -7,7 +7,12 @@ + #ifndef llimits_h + #define llimits_h + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #include "lua.h" + +--- a/extensions/LUA/lua/lmem.c ++++ b/extensions/LUA/lua/lmem.c +@@ -5,7 +5,12 @@ + */ + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #define lmem_c + #define LUA_CORE +--- a/extensions/LUA/lua/lmem.h ++++ b/extensions/LUA/lua/lmem.h +@@ -8,7 +8,12 @@ + #define lmem_h + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #include "llimits.h" + #include "lua.h" +--- a/extensions/LUA/lua/lobject.c ++++ b/extensions/LUA/lua/lobject.c +@@ -4,7 +4,12 @@ + ** See Copyright Notice in lua.h + */ + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #include + #include +--- a/extensions/LUA/lua/lobject.h ++++ b/extensions/LUA/lua/lobject.h +@@ -9,7 +9,12 @@ + #define lobject_h + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + + #include "llimits.h" +--- a/extensions/LUA/lua/lstate.c ++++ b/extensions/LUA/lua/lstate.c +@@ -5,7 +5,12 @@ + */ + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #define lstate_c + #define LUA_CORE +--- a/extensions/LUA/lua/lstrlib.c ++++ b/extensions/LUA/lua/lstrlib.c +@@ -6,7 +6,12 @@ + + + #include ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + #include + #include + #include +--- a/extensions/LUA/lua/ltablib.c ++++ b/extensions/LUA/lua/ltablib.c +@@ -5,7 +5,12 @@ + */ + + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #define ltablib_c + #define LUA_LIB +--- a/extensions/LUA/lua/lua.h ++++ b/extensions/LUA/lua/lua.h +@@ -9,8 +9,14 @@ + #ifndef lua_h + #define lua_h + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include + #include ++#else ++#include ++#include ++#endif + + #include "luaconf.h" + +--- a/extensions/LUA/lua/luaconf.h ++++ b/extensions/LUA/lua/luaconf.h +@@ -8,7 +8,12 @@ + #ifndef lconfig_h + #define lconfig_h + ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #include ++#else ++#include ++#endif + + #if !defined(__KERNEL__) + #include