From 6e71bd7a836fd1bc3e3102e7fcf1646c9743752e Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 9 Jan 2023 14:39:52 +0100 Subject: [PATCH 01/20] acpica-unix: update to 20221020 The latest upstream version has an incorrect file name (tar_0.gz). Therefore, there is an error when unpacking the acrhive, as this is not recognised correctly. To fix this, PKG_CAT is set. Signed-off-by: Florian Eckert --- utils/acpica-unix/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/acpica-unix/Makefile b/utils/acpica-unix/Makefile index 563f83ee4..7548dfee7 100644 --- a/utils/acpica-unix/Makefile +++ b/utils/acpica-unix/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acpica-unix -PKG_VERSION:=20211217 +PKG_VERSION:=20221020 PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://acpica.org/sites/$(patsubst %-unix,%,$(PKG_NAME))/files/$(PKG_SOURCE_URL) -PKG_HASH:=2511f85828820d747fa3e2c3433d3a38c22db3d9c2fd900e1a84eb4173cb5992 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar_0.gz +PKG_CAT:=gzip -dc +PKG_SOURCE_URL:=https://acpica.org/sites/$(patsubst %-unix,%,$(PKG_NAME))/files/ +PKG_HASH:=33a2e394aca0ca57d4018afe3da340dfad5eb45b1b9300e81dd595fda07cf1c5 PKG_MAINTAINER:=Philip Prindeville PKG_LICENSE:=GPL-2.0 From c93c9d5de3dc9d5728da355839c8fa0699c549d1 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 9 Jan 2023 14:45:04 +0100 Subject: [PATCH 02/20] acpica-unix: remove autorelease While we're at it, let's also remove the deprecated feature autorelease. Signed-off-by: Florian Eckert --- utils/acpica-unix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/acpica-unix/Makefile b/utils/acpica-unix/Makefile index 7548dfee7..5d508e466 100644 --- a/utils/acpica-unix/Makefile +++ b/utils/acpica-unix/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acpica-unix PKG_VERSION:=20221020 -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar_0.gz PKG_CAT:=gzip -dc From 106330213f99cb2306491240dff155fee68e90d9 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 9 Jan 2023 14:46:21 +0100 Subject: [PATCH 03/20] acpica-unix: backport pending patches to fix gcc12 build issue Due to the compiler change of openwrt, from gcc version 11 to gcc version 12, we have now the following build errors. ../../../source/components/utilities/utdebug.c: In function 'AcpiUtInitStackPtrTrace': ../../../source/components/utilities/utdebug.c:188:31: error: storing the address of local variable 'CurrentSp' in 'AcpiGbl_EntryStackPointer' [-Werror=dangling-pointer=] 188 | AcpiGbl_EntryStackPointer = &CurrentSp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ ../../../source/components/utilities/utdebug.c:185:29: note: 'CurrentSp' declared here 185 | ACPI_SIZE CurrentSp; | ^~~~~~~~~ In file included from ../../../source/include/acpi.h:173, from ../../../source/components/utilities/utdebug.c:154: ../../../source/include/acglobal.h:335:41: note: 'AcpiGbl_EntryStackPointer' declared here 335 | ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/include/acpixf.h:188:17: note: in definition of macro 'ACPI_GLOBAL' 188 | extern type name | ^~~~ cc1: all warnings being treated as errors make[4]: *** [../Makefile.rules:20: obj/utdebug.o] Error 1 This is already issue opend in the the upstream project acpica. https://github.com/acpica/acpica/issues/771 There is already a fix available, but it has not yet been merged. https://github.com/acpica/acpica/pull/776 Signed-off-by: Florian Eckert --- utils/acpica-unix/Makefile | 2 +- ...0001-ACPI_CAST_PTR-cast-through-void.patch | 22 +++++ ...-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch | 37 ++++++++ ...UINT_PTR_T-to-store-stack-boundaries.patch | 85 +++++++++++++++++++ 4 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch create mode 100644 utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch create mode 100644 utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch diff --git a/utils/acpica-unix/Makefile b/utils/acpica-unix/Makefile index 5d508e466..10e5a4c1d 100644 --- a/utils/acpica-unix/Makefile +++ b/utils/acpica-unix/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acpica-unix PKG_VERSION:=20221020 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar_0.gz PKG_CAT:=gzip -dc diff --git a/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch b/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch new file mode 100644 index 000000000..71510df53 --- /dev/null +++ b/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch @@ -0,0 +1,22 @@ +From 0f814783ef9ed3a50e15cab08579218ec45b4640 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sat, 21 May 2022 12:15:16 +0200 +Subject: [PATCH 1/3] ACPI_CAST_PTR: cast through "void *" + +Not all pointer are castable to integers directly and ACPI_UINTPTR_T is +not guaranteed to be "void *". +--- + source/include/actypes.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/source/include/actypes.h ++++ b/source/include/actypes.h +@@ -649,7 +649,7 @@ typedef UINT64 + + /* Pointer manipulation */ + +-#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p)) ++#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (void *) (p)) + #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p)) + #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b))) + #define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) - (ACPI_SIZE)(b))) diff --git a/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch b/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch new file mode 100644 index 000000000..92fb3cdb6 --- /dev/null +++ b/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch @@ -0,0 +1,37 @@ +From 6b7a78c41c04772a30923c8c0ba71770d55ac815 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sat, 21 May 2022 12:17:14 +0200 +Subject: [PATCH 2/3] Linux non-kernel: Use use uintptr_t for ACPI_UINTPTR_T + +--- + source/include/platform/aclinux.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/source/include/platform/aclinux.h ++++ b/source/include/platform/aclinux.h +@@ -168,6 +168,8 @@ + #define ACPI_USE_DO_WHILE_0 + #define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS + ++#define ACPI_UINTPTR_T uintptr_t ++ + + #ifdef __KERNEL__ + +@@ -252,8 +254,6 @@ + #define ACPI_SPINLOCK spinlock_t * + #define ACPI_CPU_FLAGS unsigned long + +-#define ACPI_UINTPTR_T uintptr_t +- + #define ACPI_TO_INTEGER(p) ((uintptr_t)(p)) + #define ACPI_OFFSET(d, f) offsetof(d, f) + +@@ -311,6 +311,7 @@ + + #ifdef ACPI_USE_STANDARD_HEADERS + #include ++#include + #endif + + /* Define/disable kernel-specific declarators */ diff --git a/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch b/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch new file mode 100644 index 000000000..b0c1bef6e --- /dev/null +++ b/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch @@ -0,0 +1,85 @@ +From 2185f7d5d7a5650dbcb6a05e9de41f340cd3b865 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sat, 21 May 2022 12:17:58 +0200 +Subject: [PATCH 3/3] debug: use UINT_PTR_T to store stack boundaries + +GCC12 complains about storing invalid pointers, store them as integers +instead. + +obj/acpiexec ../../../source/components/utilities/utdebug.c +../../../source/components/utilities/utdebug.c: In function 'AcpiUtInitStackPtrTrace': +../../../source/components/utilities/utdebug.c:188:31: error: storing the address of local variable 'CurrentSp' in 'AcpiGbl_EntryStackPointer' [-Werror=dangling-pointer=] + 188 | AcpiGbl_EntryStackPointer = &CurrentSp; + | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ +../../../source/components/utilities/utdebug.c:185:29: note: 'CurrentSp' declared here + 185 | ACPI_SIZE CurrentSp; + | ^~~~~~~~~ + +Fixes #771 +--- + source/components/debugger/dbstats.c | 4 ++-- + source/components/utilities/utdebug.c | 6 +++--- + source/components/utilities/utinit.c | 2 +- + source/include/acglobal.h | 4 ++-- + 4 files changed, 8 insertions(+), 8 deletions(-) + +--- a/source/components/debugger/dbstats.c ++++ b/source/components/debugger/dbstats.c +@@ -647,8 +647,8 @@ AcpiDbDisplayStatistics ( + AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer); + + AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n"); +- AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer); +- AcpiOsPrintf ("Lowest Stack Pointer %p\n", AcpiGbl_LowestStackPointer); ++ AcpiOsPrintf ("Entry Stack Pointer %p\n", ACPI_TO_POINTER(AcpiGbl_EntryStackPointer)); ++ AcpiOsPrintf ("Lowest Stack Pointer %p\n", ACPI_TO_POINTER(AcpiGbl_LowestStackPointer)); + AcpiOsPrintf ("Stack Use %X (%u)\n", Temp, Temp); + AcpiOsPrintf ("Deepest Procedure Nesting %u\n", AcpiGbl_DeepestNesting); + #endif +--- a/source/components/utilities/utdebug.c ++++ b/source/components/utilities/utdebug.c +@@ -185,7 +185,7 @@ AcpiUtInitStackPtrTrace ( + ACPI_SIZE CurrentSp; + + +- AcpiGbl_EntryStackPointer = &CurrentSp; ++ AcpiGbl_EntryStackPointer = ACPI_TO_INTEGER(&CurrentSp); + } + + +@@ -208,9 +208,9 @@ AcpiUtTrackStackPtr ( + ACPI_SIZE CurrentSp; + + +- if (&CurrentSp < AcpiGbl_LowestStackPointer) ++ if (ACPI_TO_INTEGER(&CurrentSp) < AcpiGbl_LowestStackPointer) + { +- AcpiGbl_LowestStackPointer = &CurrentSp; ++ AcpiGbl_LowestStackPointer = ACPI_TO_INTEGER(&CurrentSp); + } + + if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting) +--- a/source/components/utilities/utinit.c ++++ b/source/components/utilities/utinit.c +@@ -359,7 +359,7 @@ AcpiUtInitGlobals ( + #endif + + #ifdef ACPI_DEBUG_OUTPUT +- AcpiGbl_LowestStackPointer = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX); ++ AcpiGbl_LowestStackPointer = ACPI_SIZE_MAX; + #endif + + #ifdef ACPI_DBG_TRACK_ALLOCATIONS +--- a/source/include/acglobal.h ++++ b/source/include/acglobal.h +@@ -332,8 +332,8 @@ extern const ACPI_PREDEFINED_NAMES + ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeCount); + ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeSize); + ACPI_GLOBAL (UINT32, AcpiGbl_MaxConcurrentNodeCount); +-ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); +-ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_LowestStackPointer); ++ACPI_GLOBAL (ACPI_UINTPTR_T, AcpiGbl_EntryStackPointer); ++ACPI_GLOBAL (ACPI_UINTPTR_T, AcpiGbl_LowestStackPointer); + ACPI_GLOBAL (UINT32, AcpiGbl_DeepestNesting); + ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); + #endif From 69c5796712a20bc21274a779714073ff0280afed Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 5 Nov 2022 17:02:54 -0700 Subject: [PATCH 04/20] libxml2: build with cmake Signed-off-by: Rosen Penev --- libs/libxml2/Makefile | 156 +++++++++++++++------------ libs/libxml2/patches/010-iconv.patch | 12 +++ 2 files changed, 97 insertions(+), 71 deletions(-) create mode 100644 libs/libxml2/patches/010-iconv.patch diff --git a/libs/libxml2/Makefile b/libs/libxml2/Makefile index 76f930529..a726e78cc 100644 --- a/libs/libxml2/Makefile +++ b/libs/libxml2/Makefile @@ -9,23 +9,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libxml2 PKG_VERSION:=2.10.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION)) PKG_HASH:=5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c +PKG_MAINTAINER:=Michael Heimpold PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2 -PKG_MAINTAINER:=Michael Heimpold - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=0 - include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk include $(INCLUDE_DIR)/nls.mk define Package/libxml2 @@ -68,70 +65,83 @@ define Package/libxml2-utils/description from libxml2, a library for manipulating XML and HTML resources. endef -TARGET_CFLAGS += $(FPIC) +CMAKE_HOST_OPTIONS += \ + -DBUILD_SHARED_LIBS=OFF \ + -DLIBXML2_WITH_C14N=ON \ + -DLIBXML2_WITH_CATALOG=OFF \ + -DLIBXML2_WITH_DEBUG=ON \ + -DLIBXML2_WITH_FTP=OFF \ + -DLIBXML2_WITH_HTML=ON \ + -DLIBXML2_WITH_HTTP=OFF \ + -DLIBXML2_WITH_ICONV=ON \ + -DLIBXML2_WITH_ICU=OFF \ + -DLIBXML2_WITH_ISO8859X=OFF \ + -DLIBXML2_WITH_LEGACY=OFF \ + -DLIBXML2_WITH_LZMA=OFF \ + -DLIBXML2_WITH_MEM_DEBUG=OFF \ + -DLIBXML2_WITH_MODULES=OFF \ + -DLIBXML2_WITH_OUTPUT=ON \ + -DLIBXML2_WITH_PATTERN=ON \ + -DLIBXML2_WITH_PROGRAMS=OFF \ + -DLIBXML2_WITH_PUSH=ON \ + -DLIBXML2_WITH_PYTHON=OFF \ + -DLIBXML2_WITH_READER=ON \ + -DLIBXML2_WITH_REGEXPS=ON \ + -DLIBXML2_WITH_RUN_DEBUG=OFF \ + -DLIBXML2_WITH_SAX1=ON \ + -DLIBXML2_WITH_SCHEMAS=ON \ + -DLIBXML2_WITH_SCHEMATRON=OFF \ + -DLIBXML2_WITH_TESTS=OFF \ + -DLIBXML2_WITH_THREADS=ON \ + -DLIBXML2_WITH_THREAD_ALLOC=OFF \ + -DLIBXML2_WITH_TREE=ON \ + -DLIBXML2_WITH_VALID=ON \ + -DLIBXML2_WITH_WRITER=ON \ + -DLIBXML2_WITH_XINCLUDE=ON \ + -DLIBXML2_WITH_XPATH=ON \ + -DLIBXML2_WITH_XPTR=ON \ + -DLIBXML2_WITH_XPTR_LOCS=ON \ + -DLIBXML2_WITH_ZLIB=ON -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --with-c14n \ - --without-catalog \ - --with-debug \ - --with-html \ - --without-ftp \ - --without-http \ - --without-iso8859x \ - --without-legacy \ - --with-output \ - --without-pattern \ - --without-push \ - --without-python \ - --with-reader \ - --without-readline \ - --without-regexps \ - --with-sax1 \ - --with-schemas \ - --with-threads \ - --with-tree \ - --with-valid \ - --with-writer \ - --with-xinclude \ - --with-xpath \ - --with-xptr \ - --with-zlib=$(STAGING_DIR)/usr \ - --with-iconv$(if $(ICONV_PREFIX),="$(ICONV_PREFIX)") \ - --without-lzma - -HOST_CONFIGURE_ARGS += \ - --disable-shared \ - --enable-static \ - --with-pic \ - --with-c14n \ - --without-catalog \ - --with-debug \ - --with-html \ - --without-ftp \ - --without-http \ - --without-iconv \ - --without-iso8859x \ - --without-legacy \ - --with-output \ - --without-pattern \ - --without-push \ - --without-python \ - --with-reader \ - --without-readline \ - --without-regexps \ - --with-sax1 \ - --with-schemas \ - --with-threads \ - --with-tree \ - --with-valid \ - --with-writer \ - --with-xinclude \ - --with-xpath \ - --with-xptr \ - --with-zlib \ - --without-lzma +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON \ + -DLIBXML2_WITH_C14N=ON \ + -DLIBXML2_WITH_CATALOG=OFF \ + -DLIBXML2_WITH_DEBUG=ON \ + -DLIBXML2_WITH_FTP=OFF \ + -DLIBXML2_WITH_HTML=ON \ + -DLIBXML2_WITH_HTTP=OFF \ + -DLIBXML2_WITH_ICONV=ON \ + -DLIBXML2_WITH_ICU=OFF \ + -DLIBXML2_WITH_ISO8859X=OFF \ + -DLIBXML2_WITH_LEGACY=OFF \ + -DLIBXML2_WITH_LZMA=OFF \ + -DLIBXML2_WITH_MEM_DEBUG=OFF \ + -DLIBXML2_WITH_MODULES=OFF \ + -DLIBXML2_WITH_OUTPUT=ON \ + -DLIBXML2_WITH_PATTERN=ON \ + -DLIBXML2_WITH_PROGRAMS=ON \ + -DLIBXML2_WITH_PUSH=ON \ + -DLIBXML2_WITH_PYTHON=OFF \ + -DLIBXML2_WITH_READER=ON \ + -DLIBXML2_WITH_REGEXPS=ON \ + -DLIBXML2_WITH_RUN_DEBUG=OFF \ + -DLIBXML2_WITH_SAX1=ON \ + -DLIBXML2_WITH_SCHEMAS=ON \ + -DLIBXML2_WITH_SCHEMATRON=OFF \ + -DLIBXML2_WITH_TESTS=OFF \ + -DLIBXML2_WITH_THREADS=ON \ + -DLIBXML2_WITH_THREAD_ALLOC=OFF \ + -DLIBXML2_WITH_TREE=ON \ + -DLIBXML2_WITH_VALID=ON \ + -DLIBXML2_WITH_WRITER=ON \ + -DLIBXML2_WITH_XINCLUDE=ON \ + -DLIBXML2_WITH_XPATH=ON \ + -DLIBXML2_WITH_XPTR=ON \ + -DLIBXML2_WITH_XPTR_LOCS=ON \ + -DLIBXML2_WITH_ZLIB=ON \ + -DHAVE_LIBHISTORY=OFF \ + -DHAVE_LIBREADLINE=OFF define Build/InstallDev $(INSTALL_DIR) $(2)/bin @@ -141,14 +151,18 @@ define Build/InstallDev $(2)/bin/$(GNU_TARGET_NAME)-xml2-config $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2 - $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2-$(PKG_VERSION)/*.cmake \ $(1)/usr/lib/cmake/libxml2 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig diff --git a/libs/libxml2/patches/010-iconv.patch b/libs/libxml2/patches/010-iconv.patch new file mode 100644 index 000000000..e35b7ce93 --- /dev/null +++ b/libs/libxml2/patches/010-iconv.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -496,6 +496,9 @@ if(LIBXML2_WITH_PROGRAMS) + add_executable(LibXml2::${PROGRAM} ALIAS ${PROGRAM}) + target_compile_definitions(${PROGRAM} PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") + target_link_libraries(${PROGRAM} LibXml2) ++ if(LIBXML2_WITH_ICONV AND NOT Iconv_IS_BUILT_IN) ++ target_link_libraries(${PROGRAM} iconv) ++ endif() + if(HAVE_LIBHISTORY) + target_link_libraries(${PROGRAM} history) + endif() From 4b77f94b5398111c839f7fe0f48b52a1087585b0 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Sat, 14 Jan 2023 23:00:30 +0000 Subject: [PATCH 05/20] simple-adblock: update sed for allowing domains Signed-off-by: Stan Grishin --- net/simple-adblock/Makefile | 2 +- net/simple-adblock/files/simple-adblock.init | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/simple-adblock/Makefile b/net/simple-adblock/Makefile index 725ec66b8..de1ca0e05 100644 --- a/net/simple-adblock/Makefile +++ b/net/simple-adblock/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=simple-adblock PKG_VERSION:=1.9.3 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_MAINTAINER:=Stan Grishin PKG_LICENSE:=GPL-3.0-or-later diff --git a/net/simple-adblock/files/simple-adblock.init b/net/simple-adblock/files/simple-adblock.init index e57a03b45..fb6e99588 100644 --- a/net/simple-adblock/files/simple-adblock.init +++ b/net/simple-adblock/files/simple-adblock.init @@ -790,7 +790,7 @@ download_lists() { for hf in $blocked_domain $canaryDomains; do echo "$hf" | sed "$domainsFilter" >> $B_TMP; done allowed_domain="${allowed_domain} $(cat $A_TMP)" - for hf in ${allowed_domain}; do hf="$(echo "$hf" | sed 's/\./\\./g')"; allow_filter="$allow_filter/^(.*\.)?${hf}$/d;"; done + for hf in ${allowed_domain}; do hf="$(echo "$hf" | sed 's/\./\\./g')"; allow_filter="$allow_filter/(^|\.)${hf}$/d;"; done [ ! -s "$B_TMP" ] && return 1 @@ -966,7 +966,7 @@ adb_allow() { for c in $string; do output 2 " $c " hf="$(echo "$c" | sed 's/\./\\./g')" - if sed -i "/^${hf}$/d;/\.${hf}$/d;" "$outputFile" && \ + if sed -i "/(^|\.)${hf}$/d;" "$outputFile" && \ uci_add_list_if_new "${packageName}" 'config' 'allowed_domain' "$c"; then output_ok else From 3218dd24577b051fddb1635a5a856fe8426ef8f8 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 14 Jan 2023 14:34:54 -0800 Subject: [PATCH 06/20] stress: update to 1.0.5 New upstream. Signed-off-by: Rosen Penev --- utils/stress/Makefile | 22 +++++++++------------- utils/stress/patches/010-usleep.patch | 10 +++++----- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/utils/stress/Makefile b/utils/stress/Makefile index 3a66817dd..953b21cd5 100644 --- a/utils/stress/Makefile +++ b/utils/stress/Makefile @@ -8,17 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=stress -PKG_VERSION:=1.0.4 -PKG_RELEASE:=2 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://fossies.org/linux/privat -PKG_HASH:=369c997f65e8426ae8b318d4fdc8e6f07a311cfa77cc4b25dace465c582163c0 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=1.0.5 +PKG_SOURCE_URL:=https://github.com/resurrecting-open-source-projects/stress +PKG_MIRROR_HASH:=711e42ead6fd220a98821aae0cf024930785e439d3d0d50663fed1b2cd021bd1 -PKG_LICENSE:=GPL-2.0 +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -27,7 +30,6 @@ define Package/stress CATEGORY:=Utilities TITLE:=stress is a simple stress utility URL:= - MAINTAINER:=Alexandru Ardelean endef define Package/stress/description @@ -35,12 +37,6 @@ stress is a simple tool that imposes certain types of compute \ stress on UNIX-like operating systems. endef -CONFIGURE_ARGS += \ - --prefix="/usr" - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS)" - define Package/stress/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stress $(1)/usr/bin/ diff --git a/utils/stress/patches/010-usleep.patch b/utils/stress/patches/010-usleep.patch index 69467264c..fde51cf85 100644 --- a/utils/stress/patches/010-usleep.patch +++ b/utils/stress/patches/010-usleep.patch @@ -1,6 +1,6 @@ --- a/src/stress.c +++ b/src/stress.c -@@ -262,6 +262,7 @@ main (int argc, char **argv) +@@ -263,6 +263,7 @@ main (int argc, char **argv) /* Calculate the backoff value so we get good fork throughput. */ backoff = do_backoff * forks; @@ -8,7 +8,7 @@ dbg (stdout, "using backoff sleep of %llius\n", backoff); /* If we are supposed to respect a timeout, calculate it. */ -@@ -296,7 +297,7 @@ main (int argc, char **argv) +@@ -297,7 +298,7 @@ main (int argc, char **argv) { case 0: /* child */ alarm (timeout); @@ -17,7 +17,7 @@ if (do_dryrun) exit (0); exit (hogcpu ()); -@@ -317,7 +318,7 @@ main (int argc, char **argv) +@@ -318,7 +319,7 @@ main (int argc, char **argv) { case 0: /* child */ alarm (timeout); @@ -26,7 +26,7 @@ if (do_dryrun) exit (0); exit (hogio ()); -@@ -337,7 +338,7 @@ main (int argc, char **argv) +@@ -338,7 +339,7 @@ main (int argc, char **argv) { case 0: /* child */ alarm (timeout); @@ -35,7 +35,7 @@ if (do_dryrun) exit (0); exit (hogvm -@@ -358,7 +359,7 @@ main (int argc, char **argv) +@@ -359,7 +360,7 @@ main (int argc, char **argv) { case 0: /* child */ alarm (timeout); From ce7deb506d23d9158b2f1282278cec1350ceb9a0 Mon Sep 17 00:00:00 2001 From: Oskari Rauta Date: Thu, 12 Jan 2023 11:13:12 +0200 Subject: [PATCH 07/20] podman: update to 4.3.1 Signed-off-by: Oskari Rauta --- utils/podman/Makefile | 48 +++++++++++++++---- .../patches/010-do-not-build-docs.patch | 20 ++++++++ 2 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 utils/podman/patches/010-do-not-build-docs.patch diff --git a/utils/podman/Makefile b/utils/podman/Makefile index 834dda66c..2e9a0e5cb 100644 --- a/utils/podman/Makefile +++ b/utils/podman/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=podman -PKG_VERSION:=4.1.0 -PKG_RELEASE:=$(AUTORELEASE) +PKG_VERSION:=4.3.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION) -PKG_HASH:=f814e12a7311d486c1ccdc4eb021bc6dd24499569de7a572e436342876f70e95 +PKG_HASH:=455c29c4ee78cd6365e5d46e20dd31a5ce4e6e1752db6774253d76bd3ca78813 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE @@ -15,9 +15,7 @@ PKG_MAINTAINER:=Oskari Rauta PKG_BUILD_DEPENDS:=golang/host protobuf/host PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 - -GO_PKG:=github.com/containers/podman/ -GO_PKG_BUILD_PKG:=github.com/containers/podman/v4/cmd/podman/ +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/golang/golang-package.mk @@ -41,7 +39,7 @@ define Package/podman CATEGORY:=Utilities TITLE:=Podman URL:=https://podman.io - DEPENDS:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +uci-firewall +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +kmod-veth +catatonit +PODMAN_SELINUX_SUPPORT:libselinux + DEPENDS:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +uci-firewall +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +kmod-veth +PODMAN_SELINUX_SUPPORT:libselinux endef define Package/podman/description @@ -82,6 +80,37 @@ else CNIFILE:=87-podman-bridge.conflist endif +MAKE_VARS += \ + GO_INSTALL_BIN_PATH="$(strip $(GO_PKG_INSTALL_BIN_PATH))" \ + BUILD_DIR="$(PKG_BUILD_DIR)" \ + GO_BUILD_DIR="$(GO_PKG_BUILD_DIR)" \ + GO_BUILD_BIN_DIR="$(GO_PKG_BUILD_BIN_DIR)" \ + GO_BUILD_DEPENDS_PATH="$(GO_PKG_BUILD_DEPENDS_PATH)" \ + GO_BUILD_DEPENDS_SRC="$(GO_PKG_BUILD_DEPENDS_SRC)" \ + GOOS="$(GO_OS)" \ + GOARCH="$(GO_ARCH)" \ + CC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ + CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \ + CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ + CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \ + CGO_LDFLAGS="$(TARGET_LDFLAGS)" \ + GOPATH="$(GO_PKG_BUILD_DIR)" \ + GOCACHE="$(GO_BUILD_CACHE_DIR)" \ + GOMODCACHE="$(GO_MOD_CACHE_DIR)" \ + GOFLAGS="$(GO_PKG_GCFLAGS)" \ + GO_PKG_CFLAGS="$(GO_PKG_CFLAGS)" \ + CGO_ENABLED=1 \ + GOENV=off \ + PREFIX=/usr \ + LIBEXECDIR=/usr/lib \ + LIBEXECPODMAN=/usr/lib/podman \ + SHAREDIR_CONTAINERS=/usr/share/containers \ + ETCDIR=/etc \ + TMPFILESDIR=/var/run/podman \ + BUILDTAGS="$(GO_PKG_TAGS)" \ + EXTRA_LDFLAGS="$(GO_PKG_LDFLAGS)" + define Build/Prepare $(call Build/Prepare/Default) $(eval $(call Download,default-registries)) @@ -89,7 +118,9 @@ define Build/Prepare endef define Package/podman/install - $(call GoPackage/Package/Install/Bin,$(1)) + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/podman + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{podman,podman-remote} $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/podman/rootlessport $(1)/usr/lib/podman/ $(INSTALL_DIR) $(1)/etc/containers $(INSTALL_DATA) $(DL_DIR)/default-policy.json-362f70b056 $(1)/etc/containers/policy.json $(INSTALL_DATA) $(DL_DIR)/registries.fedora-da9a9c8778 $(1)/etc/containers/registries.conf @@ -104,5 +135,4 @@ define Package/podman/install $(SED) 's/driver = \"\"/driver = \"overlay\"/g' $(1)/etc/containers/storage.conf endef -$(eval $(call GoBinPackage,podman)) $(eval $(call BuildPackage,podman)) diff --git a/utils/podman/patches/010-do-not-build-docs.patch b/utils/podman/patches/010-do-not-build-docs.patch new file mode 100644 index 000000000..43f62b65a --- /dev/null +++ b/utils/podman/patches/010-do-not-build-docs.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -200,7 +200,7 @@ GV_SHA=e943b1806d94d387c4c38d96719432d50 + default: all + + .PHONY: all +-all: binaries docs ++all: binaries + + .PHONY: binaries + ifeq ($(shell uname -s),FreeBSD) +@@ -744,7 +744,7 @@ package-install: package ## Install rpm + /usr/bin/podman info # will catch a broken conmon + + .PHONY: install +-install: install.bin install.remote install.man install.systemd ## Install binaries to system locations ++install: install.bin install.remote install.systemd ## Install binaries to system locations + + .PHONY: install.catatonit + install.catatonit: From 95acb627f4b6853cd8fa0329f127d52118013e65 Mon Sep 17 00:00:00 2001 From: ValdikSS ValdikSS Date: Sun, 15 Jan 2023 01:32:19 +0300 Subject: [PATCH 08/20] miredo: add miredo.conf conffile Keep miredo.conf modified configuration upon upgrades Signed-off-by: ValdikSS ValdikSS --- ipv6/miredo/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ipv6/miredo/Makefile b/ipv6/miredo/Makefile index f25a86df4..9e1390a23 100644 --- a/ipv6/miredo/Makefile +++ b/ipv6/miredo/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miredo PKG_VERSION:=1.2.6 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=miredo-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.remlab.net/files/miredo/ @@ -36,6 +36,10 @@ define Package/miredo/description IPv6 connectivity even from behind NAT devices. endef +define Package/miredo/conffiles +/etc/miredo/miredo.conf +endef + CONFIGURE_ARGS+= \ --enable-shared \ --enable-static \ From 2aaa7c559b4e1450a63de820eb6fd67161c4d511 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Tue, 3 Jan 2023 19:46:20 +0000 Subject: [PATCH 09/20] pbr: update to 1.0.1-10 Bugfixes: * better error information for empty tid/mark and failure to resolve domains * better handling of entries in /etc/iproute2/rt_tables * update packages definitions and descriptions * remove firewall4 from dependencies to prevent dependency recursion Updates: * introduce nft_user_set_policy and nft_user_set_counter to control options for user nft sets this service creares * use counters in internal nft sets Signed-off-by: Stan Grishin --- net/pbr/Makefile | 31 ++++++------ net/pbr/files/etc/init.d/pbr.init | 83 +++++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 36 deletions(-) diff --git a/net/pbr/Makefile b/net/pbr/Makefile index ddcd9e123..6348c9bab 100644 --- a/net/pbr/Makefile +++ b/net/pbr/Makefile @@ -5,57 +5,60 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pbr PKG_VERSION:=1.0.1 -PKG_RELEASE:=4 +PKG_RELEASE:=10 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Stan Grishin include $(INCLUDE_DIR)/package.mk -define Package/pbr/default +define Package/pbr/Default SECTION:=net CATEGORY:=Network - SUBMENU:=VPN - PROVIDES:=pbr + SUBMENU:=Routing and Redirection TITLE:=Policy Based Routing Service URL:=https://docs.openwrt.melmac.net/pbr/ - DEPENDS:=+ip-full +jshn +jsonfilter +resolveip + DEPENDS:=+ip-full +jshn +jsonfilter +libubus +resolveip CONFLICTS:=vpnbypass vpn-policy-routing PKGARCH:=all endef define Package/pbr -$(call Package/pbr/default) +$(call Package/pbr/Default) TITLE+= with nft/nft set support - DEPENDS+=+firewall4 +kmod-nft-core +kmod-nft-nat +nftables-json + DEPENDS+=+kmod-nft-core +kmod-nft-nat +nftables-json + VARIANT:=nftables PROVIDES:=vpnbypass vpn-policy-routing + DEFAULT_VARIANT:=1 endef define Package/pbr-iptables -$(call Package/pbr/default) +$(call Package/pbr/Default) TITLE+= with iptables/ipset support DEPENDS+=+ipset +iptables +kmod-ipt-ipset +iptables-mod-ipopt - PROVIDES:=pbr vpnbypass vpn-policy-routing + VARIANT:=iptables + PROVIDES:=pbr endef define Package/pbr-netifd -$(call Package/pbr/default) +$(call Package/pbr/Default) TITLE+= with netifd support - PROVIDES:=pbr vpnbypass vpn-policy-routing + VARIANT:=netifd + PROVIDES:=pbr endef define Package/pbr/description This service enables policy-based routing for WAN interfaces and various VPN tunnels. -This version supports OpenWrt with both fw3/ipset/iptables and fw4/nft. +This version supports OpenWrt with both firewall3/ipset/iptables and firewall4/nft. endef define Package/pbr-iptables/description This service enables policy-based routing for WAN interfaces and various VPN tunnels. -This version supports OpenWrt with fw3/ipset/iptables. +This version supports OpenWrt with firewall3/ipset/iptables. endef define Package/pbr-netifd/description This service enables policy-based routing for WAN interfaces and various VPN tunnels. -This version supports OpenWrt with both fw3/ipset/iptables and fw4/nft. +This version supports OpenWrt with both firewall3/ipset/iptables and firewall4/nft. This version uses OpenWrt native netifd/tables to set up interfaces. This is WIP. endef diff --git a/net/pbr/files/etc/init.d/pbr.init b/net/pbr/files/etc/init.d/pbr.init index 16aae0596..481b1d948 100755 --- a/net/pbr/files/etc/init.d/pbr.init +++ b/net/pbr/files/etc/init.d/pbr.init @@ -72,6 +72,8 @@ fw_mask= icmp_interface= ignored_interface= ipv6_enabled= +nft_user_set_policy= +nft_user_set_counter= procd_boot_delay= procd_reload_delay= resolver_set= @@ -103,7 +105,6 @@ resolver_set_supported= nftPrevParam4= nftPrevParam6= - get_text() { local r case "$1" in @@ -136,6 +137,8 @@ get_text() { errorPolicyProcessUnknownProtocol) r="Unknown protocol in policy %s";; errorPolicyProcessInsertionFailed) r="Insertion failed for both IPv4 and IPv6 for policy %s";; errorPolicyProcessInsertionFailedIpv4) r="Insertion failed for IPv4 for policy %s";; + errorInterfaceRoutingEmptyValues) r="Received empty tid/mark or interface name when setting up routing";; + errorFailedToResolve) r="Failed to resolve %s";; warningResolverNotSupported) r="Resolver set (${resolver_set}) is not supported on this system.";; warningAGHVersionTooLow) r="Installed AdGuardHome (%s) doesn't support 'ipset_file' option.";; warningPolicyProcessCMD) r="%s";; @@ -264,7 +267,7 @@ is_service_running_nft() { [ -x "$nft" ] && [ -n "$(get_mark_nft_chains)" ]; } # is_service_running_nft() { [ -x "$nft" ] && [ -s "$nftPermFile" ]; } is_service_running() { if is_nft; then is_service_running_nft; else is_service_running_iptables; fi; } is_netifd_table() { local iface="$1"; [ "$(uci -q get "network.${iface}.ip4table")" = "${packageName}_${iface%6}" ]; } -get_rt_tables_id() { local iface="$1"; grep "${packageName}_${iface}" '/etc/iproute2/rt_tables' | awk '{print $1;}'; } +get_rt_tables_id() { local iface="$1"; grep "${ipTablePrefix}_${iface}\$" '/etc/iproute2/rt_tables' | awk '{print $1;}'; } get_rt_tables_next_id() { echo "$(($(sort -r -n '/etc/iproute2/rt_tables' | grep -o -E -m 1 "^[0-9]+")+1))"; } _check_config() { local en; config_get_bool en "$1" 'enabled' 1; [ "$en" -gt 0 ] && _cfg_enabled=0; } is_config_enabled() { @@ -276,6 +279,8 @@ is_config_enabled() { } # shellcheck disable=SC2016 resolveip_to_ipt() { resolveip "$@" | sed -n 'H;${x;s/\n/,/g;s/^,//;p;};d'; } +resolveip_to_ipt4() { resolveip_to_ipt -4 "$@"; } +resolveip_to_ipt6() { [ -n "$ipv6_enabled" ] && resolveip_to_ipt -6 "$@"; } # shellcheck disable=SC2016 resolveip_to_nftset() { resolveip "$@" | sed -n 'H;${x;s/\n/,/g;s/^,//;p;};d' | tr '\n' ' '; } resolveip_to_nftset4() { resolveip_to_nftset -4 "$@"; } @@ -302,6 +307,8 @@ load_package_config() { config_get icmp_interface 'config' 'icmp_interface' config_get ignored_interface 'config' 'ignored_interface' config_get_bool ipv6_enabled 'config' 'ipv6_enabled' '0' + config_get nft_user_set_policy 'config' 'nft_user_set_policy' 'memory' + config_get_bool nft_user_set_counter 'config' 'nft_user_set_counter' '0' config_get procd_boot_delay 'config' 'procd_boot_delay' '0' config_get resolver_set 'config' 'resolver_set' config_get rule_create_option 'config' 'rule_create_option' 'add' @@ -320,6 +327,9 @@ load_package_config() { if is_nft; then fw_maskXor="$(printf '%#x' "$((fw_mask ^ 0xffffffff))")" fw_maskXor="${fw_maskXor:-0xff00ffff}" + if [ "$nft_user_set_counter" -eq '0' ]; then + unset nft_user_set_counter + fi else case $rule_create_option in insert|-i|-I) rule_create_option='-I';; @@ -569,8 +579,12 @@ nftset() { fi [ -z "$param4" ] && param4="$(resolveip_to_nftset4 "$param")" [ -z "$param6" ] && param6="$(resolveip_to_nftset6 "$param")" - nft4 add element inet "$nftTable" "$nftset4" "{ $param4 }" && ipv4_error=0 - nft6 add element inet "$nftTable" "$nftset6" "{ $param6 }" && ipv6_error=0 + if [ -z "$param4" ] && [ -z "$param6" ]; then + state add 'errorSummary' 'errorFailedToResolve' "$param" + else + nft4 add element inet "$nftTable" "$nftset4" "{ $param4 }" && ipv4_error=0 + nft6 add element inet "$nftTable" "$nftset6" "{ $param6 }" && ipv6_error=0 + fi fi ;; add_dnsmasq_element) @@ -580,24 +594,24 @@ nftset() { create) case "$type" in ip|net) - nft4 add set inet "$nftTable" "$nftset4" "{ type ipv4_addr; flags interval; auto-merge; comment \"$comment\"; }" && ipv4_error=0 - nft6 add set inet "$nftTable" "$nftset6" "{ type ipv6_addr; flags interval; auto-merge; comment \"$comment\"; }" && ipv6_error=0 + nft4 add set inet "$nftTable" "$nftset4" "{ type ipv4_addr; counter; flags interval; auto-merge; comment \"$comment\"; }" && ipv4_error=0 + nft6 add set inet "$nftTable" "$nftset6" "{ type ipv6_addr; counter; flags interval; auto-merge; comment \"$comment\"; }" && ipv6_error=0 ;; mac) - nft4 add set inet "$nftTable" "$nftset4" "{ type ether_addr; flags interval; auto-merge; comment \"$comment\"; }" && ipv4_error=0 - nft6 add set inet "$nftTable" "$nftset6" "{ type ether_addr; flags interval; auto-merge; comment \"$comment\"; }" && ipv6_error=0 + nft4 add set inet "$nftTable" "$nftset4" "{ type ether_addr; counter; flags interval; auto-merge; comment \"$comment\"; }" && ipv4_error=0 + nft6 add set inet "$nftTable" "$nftset6" "{ type ether_addr; counter; flags interval; auto-merge; comment \"$comment\"; }" && ipv6_error=0 ;; esac ;; create_dnsmasq_set) - nft4 add set inet "$nftTable" "$nftset4" "{ type ipv4_addr; flags interval; auto-merge; comment \"$comment\"; }" && ipv4_error=0 - nft6 add set inet "$nftTable" "$nftset6" "{ type ipv6_addr; flags interval; auto-merge; comment \"$comment\"; }" && ipv6_error=0 + nft4 add set inet "$nftTable" "$nftset4" "{ type ipv4_addr; counter; flags interval; auto-merge; comment \"$comment\"; }" && ipv4_error=0 + nft6 add set inet "$nftTable" "$nftset6" "{ type ipv6_addr; counter; flags interval; auto-merge; comment \"$comment\"; }" && ipv6_error=0 ;; create_user_set) case "$type" in ip|net) - nft4 add set inet "$nftTable" "$nftset4" "{ type ipv4_addr; flags interval; auto-merge; policy memory; comment \"$comment\"; }" && ipv4_error=0 - nft6 add set inet "$nftTable" "$nftset6" "{ type ipv6_addr; flags interval; auto-merge; policy memory; comment \"$comment\"; }" && ipv6_error=0 + nft4 add set inet "$nftTable" "$nftset4" "{ type ipv4_addr; ${nft_user_set_counter:+counter;} flags interval; auto-merge; policy $nft_user_set_policy; comment \"$comment\"; }" && ipv4_error=0 + nft6 add set inet "$nftTable" "$nftset6" "{ type ipv6_addr; ${nft_user_set_counter:+counter;} flags interval; auto-merge; policy $nft_user_set_policy; comment \"$comment\"; }" && ipv6_error=0 case "$target" in dst) nft add rule inet "$nftTable" "${nftPrefix}_prerouting" ip daddr "@${nftset4}" goto "${nftPrefix}_mark_${mark}" && ipv4_error=0 @@ -610,8 +624,8 @@ nftset() { esac ;; mac) - nft4 add set inet "$nftTable" "$nftset4" "{ type ether_addr; flags interval; auto-merge; policy memory; comment \"$comment\"; }" && ipv4_error=0 - nft6 add set inet "$nftTable" "$nftset6" "{ type ether_addr; flags interval; auto-merge; policy memory; comment \"$comment\"; }" && ipv6_error=0 + nft4 add set inet "$nftTable" "$nftset4" "{ type ether_addr; ${nft_user_set_counter:+counter;} flags interval; auto-merge; policy $nft_user_set_policy; comment \"$comment\"; }" && ipv4_error=0 + nft6 add set inet "$nftTable" "$nftset6" "{ type ether_addr; ${nft_user_set_counter:+counter;} flags interval; auto-merge; policy $nft_user_set_policy; comment \"$comment\"; }" && ipv6_error=0 nft add rule inet "$nftTable" "${nftPrefix}_prerouting" ether saddr "@${nftset4}" goto "${nftPrefix}_mark_${mark}" && ipv4_error=0 nft add rule inet "$nftTable" "${nftPrefix}_prerouting" ether saddr "@${nftset6}" goto "${nftPrefix}_mark_${mark}" && ipv6_error=0 ;; @@ -657,7 +671,9 @@ nftset() { fi } +cleanup_rt_tables() { sed -i '/pbr_/d' '/etc/iproute2/rt_tables'; sync; } cleanup_dnsmasq() { [ -s "$dnsmasqFile" ] && resolverStoredHash="$(md5sum $dnsmasqFile | awk '{ print $1; }')" && rm "$dnsmasqFile" >/dev/null 2>&1; } + cleanup_main_chains() { local i for i in $chainsList; do @@ -1212,8 +1228,14 @@ policy_routing_iptables() { param4="$param4 -m set $negation --match-set ${ipsPrefix}_${iface}_4_${target}_${type}_${uid} $target" param6="$param6 -m set $negation --match-set ${ipsPrefix}_${iface}_6_${target}_${type}_${uid} $target" else - param4="$param4 $negation -s $(resolveip_to_ipt -4 "$value")" - param6="$param6 $negation -s $(resolveip_to_ipt -6 "$value")" + local resolvedIP4 resolvedIP6 + resolvedIP4="$(resolveip_to_ipt4 "$value")" + resolvedIP6="$(resolveip_to_ipt6 "$value")" + if [ -z "$resolvedIP4" ] && [ -z "$resolvedIP6" ]; then + state add 'errorSummary' 'errorFailedToResolve' "$value" + fi + param4="$param4 $negation -s $resolvedIP4" + param6="$param6 $negation -s $resolvedIP6" fi fi fi @@ -1255,8 +1277,14 @@ policy_routing_iptables() { param4="$param4 -m set $negation --match-set ${ipsPrefix}_${iface}_4_${target}_${type}_${uid} $target" param6="$param6 -m set $negation --match-set ${ipsPrefix}_${iface}_6_${target}_${type}_${uid} $target" else - param4="$param4 $negation -d $(resolveip_to_ipt -4 "$value")" - param6="$param6 $negation -d $(resolveip_to_ipt -6 "$value")" + local resolvedIP4 resolvedIP6 + resolvedIP4="$(resolveip_to_ipt4 "$value")" + resolvedIP6="$(resolveip_to_ipt6 "$value")" + if [ -z "$resolvedIP4" ] && [ -z "$resolvedIP6" ]; then + state add 'errorSummary' 'errorFailedToResolve' "$value" + fi + param4="$param4 $negation -d $resolvedIP4" + param6="$param6 $negation -d $resolvedIP6" fi else local target='dst' type='ip' @@ -1400,8 +1428,14 @@ policy_routing_nft() { param4="$param4 $ip4Flag daddr $negation @${nftPrefix}_${iface}_4_${target}_${type}_${uid}" param6="$param6 $ip6Flag daddr $negation @${nftPrefix}_${iface}_6_${target}_${type}_${uid}" else - param4="$param4 $ip4Flag daddr $negation {$(resolveip_to_nftset4 "$value")}" - param6="$param6 $ip6Flag daddr $negation {$(resolveip_to_nftset6 "$value")}" + local resolvedIP4 resolvedIP6 + resolvedIP4="$(resolveip_to_nftset4 "$value")" + resolvedIP6="$(resolveip_to_nftset6 "$value")" + if [ -z "$resolvedIP4" ] && [ -z "$resolvedIP6" ]; then + state add 'errorSummary' 'errorFailedToResolve' "$value" + fi + param4="$param4 $ip4Flag daddr $negation { $resolvedIP4 }" + param6="$param6 $ip6Flag daddr $negation { $resolvedIP6 }" fi else local target='dst' type='ip' @@ -1635,6 +1669,7 @@ interface_routing() { local action="$1" tid="$2" mark="$3" iface="$4" gw4="$5" dev="$6" gw6="$7" dev6="$8" priority="$9" local dscp s=0 i ipv4_error=1 ipv6_error=1 if [ -z "$tid" ] || [ -z "$mark" ] || [ -z "$iface" ]; then + state add 'errorSummary' 'errorInterfaceRoutingEmptyValues' return 1 fi case "$action" in @@ -1758,7 +1793,7 @@ EOF $ip_full rule del fwmark "${mark}/${fw_mask}" table "$tid" >/dev/null 2>&1 if ! is_netifd_table "$iface"; then $ip_full route flush table "$tid" >/dev/null 2>&1 - sed -i "/${ipTablePrefix}_${iface}/d" '/etc/iproute2/rt_tables' + sed -i "/${ipTablePrefix}_${iface}\$/d" '/etc/iproute2/rt_tables' sync fi return "$s" @@ -2057,6 +2092,7 @@ start_service() { cleanup_main_chains cleanup_sets cleanup_marking_chains + cleanup_rt_tables if ! is_nft; then for i in $chainsList; do i="$(str_to_upper "$i")" @@ -2159,6 +2195,7 @@ stop_service() { config_load 'network' config_foreach interface_process 'interface' 'destroy' interface_process_tor 'tor' 'destroy' + cleanup_rt_tables output 1 "\\n" ip route flush cache unset ifaceMark @@ -2387,7 +2424,9 @@ load_validate_config() { 'wan_ip_rules_priority:uinteger:30000' \ 'rule_create_option:or("", "add", "insert"):add' \ 'procd_reload_delay:integer:0' \ - 'webui_supported_protocol:list(string)' + 'webui_supported_protocol:list(string)' \ + 'nft_user_set_policy:or("", "memory", "performance")'\ + 'nft_user_set_counter:bool:0' } # shellcheck disable=SC2120 From f4f899f6f992db1e92f02881649e1580958dae18 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Tue, 17 Jan 2023 00:41:48 +0000 Subject: [PATCH 10/20] pbr: update to 1.0.1-14 * improve install/uninstall messages * fix ips add command * add boot() to init file Signed-off-by: Stan Grishin --- net/pbr/Makefile | 28 ++++++++++------------------ net/pbr/files/etc/init.d/pbr.init | 9 +++++++-- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/net/pbr/Makefile b/net/pbr/Makefile index 6348c9bab..ab931e7cd 100644 --- a/net/pbr/Makefile +++ b/net/pbr/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pbr PKG_VERSION:=1.0.1 -PKG_RELEASE:=10 +PKG_RELEASE:=14 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Stan Grishin @@ -130,8 +130,8 @@ define Package/pbr/prerm # check if we are on real system if [ -z "$${IPKG_INSTROOT}" ]; then uci -q delete firewall.pbr || true - echo "Stopping pbr service... " - /etc/init.d/pbr stop || true + echo -n "Stopping pbr service... " + /etc/init.d/pbr stop && echo "OK" || echo "FAIL" echo -n "Removing rc.d symlink for pbr... " /etc/init.d/pbr disable && echo "OK" || echo "FAIL" fi @@ -151,7 +151,7 @@ define Package/pbr-iptables/postinst #!/bin/sh # check if we are on real system if [ -z "$${IPKG_INSTROOT}" ]; then - echo -n "Installing rc.d symlink for pbr... " + echo -n "Installing rc.d symlink for pbr-iptables... " /etc/init.d/pbr enable && echo "OK" || echo "FAIL" fi exit 0 @@ -162,9 +162,9 @@ define Package/pbr-iptables/prerm # check if we are on real system if [ -z "$${IPKG_INSTROOT}" ]; then uci -q delete firewall.pbr || true - echo "Stopping pbr service... " - /etc/init.d/pbr stop || true - echo -n "Removing rc.d symlink for pbr... " + echo -n "Stopping pbr-iptables service... " + /etc/init.d/pbr stop && echo "OK" || echo "FAIL" + echo -n "Removing rc.d symlink for pbr-iptables... " /etc/init.d/pbr disable && echo "OK" || echo "FAIL" fi exit 0 @@ -174,12 +174,8 @@ define Package/pbr-netifd/postinst #!/bin/sh # check if we are on real system if [ -z "$${IPKG_INSTROOT}" ]; then - echo -n "Installing rc.d symlink for pbr... " + echo -n "Installing rc.d symlink for pbr-netifd... " /etc/init.d/pbr enable && echo "OK" || echo "FAIL" - # echo -n "Installing netifd support for pbr... " - # /etc/init.d/pbr netifd install && echo "OK" || echo "FAIL" - # echo -n "Restarting network... " - # /etc/init.d/network restart && echo "OK" || echo "FAIL" fi exit 0 endef @@ -189,14 +185,10 @@ define Package/pbr-netifd/prerm # check if we are on real system if [ -z "$${IPKG_INSTROOT}" ]; then uci -q delete firewall.pbr || true - echo "Stopping pbr service... " - /etc/init.d/pbr stop || true - # echo -n "Removing netifd support for pbr... " - # /etc/init.d/pbr netifd remove && echo "OK" || echo "FAIL" + echo -n "Stopping pbr-netifd service... " + /etc/init.d/pbr stop && echo "OK" || echo "FAIL" echo -n "Removing rc.d symlink for pbr... " /etc/init.d/pbr disable && echo "OK" || echo "FAIL" - # echo -n "Restarting network... " - # /etc/init.d/network restart && echo "OK" || echo "FAIL" fi exit 0 endef diff --git a/net/pbr/files/etc/init.d/pbr.init b/net/pbr/files/etc/init.d/pbr.init index 481b1d948..e612072c3 100755 --- a/net/pbr/files/etc/init.d/pbr.init +++ b/net/pbr/files/etc/init.d/pbr.init @@ -457,8 +457,8 @@ ips() { case "$command" in add) - ips4 -q -! add "$ipset4" comment "$comment" && ipv4_error=0 - ips6 -q -! add "$ipset6" comment "$comment" && ipv6_error=0 + ips4 -q -! add "$ipset4" ["$param"] comment "$comment" && ipv4_error=0 + ips6 -q -! add "$ipset6" ["$param"] comment "$comment" && ipv6_error=0 ;; add_agh_element) [ -n "$ipv6_enabled" ] || unset ipset6 @@ -1971,6 +1971,11 @@ user_file_process() { fi } +boot() { + ubus -t 30 wait_for network.interface 2>/dev/null + rc_procd start_service 'on_boot' +} + on_firewall_reload() { if [ -z "$(ubus_get_status 'gateways')" ]; then # service is not running, do not start it on firewall reload logger -t "$packageName" "Reload on firewall action aborted: service not running." From f04af1261cc3951305e7a2cb2acf0e596a8ce488 Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Tue, 3 Jan 2023 11:41:21 +0100 Subject: [PATCH 11/20] python-exceptiongroup: bump to 1.1.0 Signed-off-by: Julien Malik --- lang/python/python-exceptiongroup/Makefile | 4 ++-- ...add-setup.py-to-avoid-depending-on-flit-for-building.patch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/python/python-exceptiongroup/Makefile b/lang/python/python-exceptiongroup/Makefile index dd64f9210..7c096dc5e 100644 --- a/lang/python/python-exceptiongroup/Makefile +++ b/lang/python/python-exceptiongroup/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-exceptiongroup -PKG_VERSION:=1.0.4 +PKG_VERSION:=1.1.0 PKG_RELEASE:=1 PYPI_NAME:=exceptiongroup -PKG_HASH:=bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec +PKG_HASH:=bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23 PKG_LICENSE:=MIT,Python-2.0 PKG_LICENSE_FILES:=LICENSE diff --git a/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch b/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch index ec2763825..5c6cf2519 100644 --- a/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch +++ b/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch @@ -1,4 +1,4 @@ -From 99e590f2177148420f3556bbb0dc2e493e94e45f Mon Sep 17 00:00:00 2001 +From d6a0c3045598597023ee2423144b134fc87f4b6f Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Sat, 26 Nov 2022 13:05:20 +0100 Subject: [PATCH] add setup.py to avoid depending on flit for building @@ -17,7 +17,7 @@ Subject: [PATCH] add setup.py to avoid depending on flit for building + +setuptools.setup( + name='exceptiongroup', -+ version='1.0.4', ++ version='1.1.0', + description='Backport of PEP 654 (exception groups)', + author='Alex Grönholm', + author_email='Alex Grönholm ', From 5dffc0af0e8f7b8e609c309985ea23e95ed46fef Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Tue, 3 Jan 2023 11:42:45 +0100 Subject: [PATCH 12/20] borgbackup: bump to 1.2.3 Signed-off-by: Julien Malik --- lang/python/borgbackup/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/python/borgbackup/Makefile b/lang/python/borgbackup/Makefile index 8c6a8a924..0637d1b0b 100644 --- a/lang/python/borgbackup/Makefile +++ b/lang/python/borgbackup/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=borgbackup -PKG_VERSION:=1.2.2 +PKG_VERSION:=1.2.3 PKG_RELEASE:=1 PYPI_NAME:=borgbackup -PKG_HASH:=d730687443f1beb602b1d72bae36318f6f9654818fcdc50458540ec579e57260 +PKG_HASH:=e32418f8633c96fa9681352a56eb63b98e294203472c114a5242709d36966785 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE From 38c660f48e99f860ec6522949bf980ffc97b9c9c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 4 Nov 2022 21:27:14 -0700 Subject: [PATCH 13/20] libv4l: update to 1.22.1 Signed-off-by: Rosen Penev --- libs/libv4l/Makefile | 8 ++---- .../patches/020-add-missing-includes.patch | 10 ------- libs/libv4l/patches/030-getsubopt.patch | 28 ------------------- 3 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 libs/libv4l/patches/020-add-missing-includes.patch delete mode 100644 libs/libv4l/patches/030-getsubopt.patch diff --git a/libs/libv4l/Makefile b/libs/libv4l/Makefile index 60bac1d2b..22b3cd15f 100644 --- a/libs/libv4l/Makefile +++ b/libs/libv4l/Makefile @@ -6,17 +6,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v4l-utils -PKG_VERSION:=1.20.0 -PKG_RELEASE:=5 +PKG_VERSION:=1.22.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils -PKG_HASH:=956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7 +PKG_HASH:=65c6fbe830a44ca105c443b027182c1b2c9053a91d1e72ad849dfab388b94e31 PKG_MAINTAINER:=Ted Hess PKG_USE_MIPS16:=0 -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -75,7 +74,6 @@ define Package/v4l-utils/description endef TARGET_CFLAGS += -flto -TARGET_CXXFLAGS += -std=c++11 TARGET_LDFLAGS += \ $(if $(CONFIG_USE_GLIBC),,-largp) \ -Wl,--gc-sections,--as-needed diff --git a/libs/libv4l/patches/020-add-missing-includes.patch b/libs/libv4l/patches/020-add-missing-includes.patch deleted file mode 100644 index c5a83a97a..000000000 --- a/libs/libv4l/patches/020-add-missing-includes.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/utils/libcecutil/cec-info.cpp -+++ b/utils/libcecutil/cec-info.cpp -@@ -5,6 +5,7 @@ - * Copyright 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved. - */ - -+#include - #include - #include - #include diff --git a/libs/libv4l/patches/030-getsubopt.patch b/libs/libv4l/patches/030-getsubopt.patch deleted file mode 100644 index 3e48732f2..000000000 --- a/libs/libv4l/patches/030-getsubopt.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/utils/v4l2-ctl/v4l2-ctl-common.cpp -+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp -@@ -785,15 +785,17 @@ static bool parse_subset(char *optarg) - - static bool parse_next_subopt(char **subs, char **value) - { -- static char *const subopts[] = { -- NULL -- }; -- int opt = getsubopt(subs, subopts, value); -+ char *p = *subs; -+ *value = *subs; - -- if (opt < 0 || *value) -- return false; -- fprintf(stderr, "Missing suboption value\n"); -- return true; -+ while (*p && *p != ',') -+ p++; -+ -+ if (*p) -+ *p++ = '\0'; -+ -+ *subs = p; -+ return false; - } - - void common_cmd(const std::string &media_bus_info, int ch, char *optarg) From 8ff6537f4232706d35d16625a89ee0f49be93877 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 18 Jan 2023 00:14:02 +0100 Subject: [PATCH 14/20] ddns-scripts: add hosting.de provider Add hosting.de provider. To use dynamic DNS you have to create a DDNS host with a separate DDNS user. Note: As of 2023-01-17 hosting.de does not work with wget which will fail with `400: Bad Request` (it will work with `--auth-no-challenge`). You should use curl instead. I have reported that to the provider. Signed-off-by: Benjamin Drung --- net/ddns-scripts/Makefile | 2 +- .../files/usr/share/ddns/default/hosting.de.json | 11 +++++++++++ net/ddns-scripts/files/usr/share/ddns/list | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 net/ddns-scripts/files/usr/share/ddns/default/hosting.de.json diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 2ac7fb58c..5729305dc 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts PKG_VERSION:=2.8.2 -PKG_RELEASE:=33 +PKG_RELEASE:=34 PKG_LICENSE:=GPL-2.0 diff --git a/net/ddns-scripts/files/usr/share/ddns/default/hosting.de.json b/net/ddns-scripts/files/usr/share/ddns/default/hosting.de.json new file mode 100644 index 000000000..c41ee35e4 --- /dev/null +++ b/net/ddns-scripts/files/usr/share/ddns/default/hosting.de.json @@ -0,0 +1,11 @@ +{ + "name": "hosting.de", + "ipv4": { + "url": "https://[USERNAME]:[PASSWORD]@ddns.hosting.de/nic/update?hostname=[DOMAIN]&myip=[IP]", + "answer": "good|nochg" + }, + "ipv6": { + "url": "https://[USERNAME]:[PASSWORD]@ddns.hosting.de/nic/update?hostname=[DOMAIN]&myip=[IP]", + "answer": "good|nochg" + } +} diff --git a/net/ddns-scripts/files/usr/share/ddns/list b/net/ddns-scripts/files/usr/share/ddns/list index 310437621..ef117c654 100644 --- a/net/ddns-scripts/files/usr/share/ddns/list +++ b/net/ddns-scripts/files/usr/share/ddns/list @@ -32,6 +32,7 @@ easydns.com goip.de google.com he.net +hosting.de infomaniak.com inwx.de joker.com From e76f878c60e6a9c629611763679ea3b9e0479f7f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 19 Dec 2022 21:57:03 +0000 Subject: [PATCH 15/20] hiredis: update to version 1.1.0 See project release page[1] for more details. Switch build to use CMake instead of autotools, allows removal of local patch. [1]: https://github.com/redis/hiredis/releases Signed-off-by: Daniel Golle --- libs/hiredis/Makefile | 18 +++-------- .../patches/010-fix_pkconfig_file.patch | 32 ------------------- 2 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 libs/hiredis/patches/010-fix_pkconfig_file.patch diff --git a/libs/hiredis/Makefile b/libs/hiredis/Makefile index 01e6b8647..4c2783587 100644 --- a/libs/hiredis/Makefile +++ b/libs/hiredis/Makefile @@ -8,21 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hiredis -PKG_VERSION:=1.0.2 +PKG_VERSION:=1.1.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=e0ab696e2f07deb4252dda45b703d09854e53b9703c7d52182ce5a22616c3819 +PKG_HASH:=fe6d21741ec7f3fc9df409d921f47dfc73a4d8ff64f4ac6f1d95f951bf7f53d6 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Daniel Golle PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libhiredis SECTION:=libs @@ -35,17 +36,6 @@ define Package/libhiredis/description Hiredis is a minimalistic C client library for the Redis database. endef -MAKE_FLAGS += ARCH="" DEBUG="" PREFIX="/usr" uname_S="Linux" - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/hiredis/adapters - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/hiredis/adapters/* $(1)/usr/include/hiredis/adapters - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/hiredis/*.h $(1)/usr/include/hiredis/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhiredis.{so*,a} $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/hiredis.pc $(1)/usr/lib/pkgconfig -endef - define Package/libhiredis/install $(INSTALL_DIR) $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhiredis.so* $(1)/usr/lib/ diff --git a/libs/hiredis/patches/010-fix_pkconfig_file.patch b/libs/hiredis/patches/010-fix_pkconfig_file.patch deleted file mode 100644 index 11d7e7fa6..000000000 --- a/libs/hiredis/patches/010-fix_pkconfig_file.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit f96d9f9d2e3ba39352035e6ac26463243484d404 -Author: Sebastian Kemper -Date: Sun Jan 13 19:25:52 2019 +0100 - - Setup .pc file to allow use for cross-compiling - - The Makefile is currently creating the pkg-config file using static lib - and include dir statements. Change that so that projects that - cross-compile hiredis can use pkg-config to setup other programs - depending on it. - - Note: these projects (like OpenWrt) call pkg-config with arguments to - overwrite some variables in the .pc file, namely: - - --define-variable=prefix=<...> - --define-variable=exec_prefix=<...> - - Signed-off-by: Sebastian Kemper - ---- a/Makefile -+++ b/Makefile -@@ -234,8 +234,8 @@ $(PKGCONFNAME): hiredis.h - @echo "Generating $@ for pkgconfig..." - @echo prefix=$(PREFIX) > $@ - @echo exec_prefix=\$${prefix} >> $@ -- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@ -- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ -+ @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@ -+ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@ - @echo >> $@ - @echo Name: hiredis >> $@ - @echo Description: Minimalistic C client library for Redis. >> $@ From 5d7eab630cdbf92116d63c4c641821add042f948 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 18 Jan 2023 18:22:47 +0800 Subject: [PATCH 16/20] v2ray-core: Update to 5.2.1 Signed-off-by: Tianling Shen --- net/v2ray-core/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/v2ray-core/Makefile b/net/v2ray-core/Makefile index 115be3064..14fa12fc0 100644 --- a/net/v2ray-core/Makefile +++ b/net/v2ray-core/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-core -PKG_VERSION:=5.2.0 +PKG_VERSION:=5.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=3594fcec033706cbc94ff76ecf86a44f025164baa5da9b2286dea32f2b6029f9 +PKG_HASH:=97bc872e798fed51c23c39f8f63ee25984658e2b252b0ec2c8ec469c00a4d77a PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From e3cae01ecd472e34eaddb691b89834d9d1b6c552 Mon Sep 17 00:00:00 2001 From: Oskari Rauta Date: Thu, 12 Jan 2023 10:49:49 +0200 Subject: [PATCH 17/20] efivar: new package Co-authored-by: Tianling Shen Signed-off-by: Oskari Rauta --- libs/efivar/Makefile | 66 +++++++ libs/efivar/patches/002-musl-compat.patch | 199 ++++++++++++++++++++++ libs/efivar/patches/005-skip-docs.patch | 11 ++ 3 files changed, 276 insertions(+) create mode 100644 libs/efivar/Makefile create mode 100644 libs/efivar/patches/002-musl-compat.patch create mode 100644 libs/efivar/patches/005-skip-docs.patch diff --git a/libs/efivar/Makefile b/libs/efivar/Makefile new file mode 100644 index 000000000..63c2abe52 --- /dev/null +++ b/libs/efivar/Makefile @@ -0,0 +1,66 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=efivar +PKG_VERSION:=38 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/rhboot/efivar/releases/download/$(PKG_VERSION) +PKG_HASH:=f018ed6e49c5f1c16d336d9fd7687ce87023276591921db1e49a314ad6515349 + +PKG_LICENSE:=LGPL-2.1-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/efivar + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Tools and libraries to work with EFI variables + DEPENDS:=@TARGET_x86_64 + URL:=https://github.com/rhboot/efibootmgr +endef + +define Package/efivar/description + Tools and libraries to work with EFI variables +endef + +MAKE_VARS += \ + ERRORS= \ + HOSTCC="$(HOSTCC)" \ + HOST_CFLAGS="$(HOST_CFLAGS)" \ + HOST_LDFLAGS="$(HOST_LDFLAGS)" \ + LIBDIR="/usr/lib" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libefiboot.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libefisec.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libefivar.so* $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/include/efivar + $(CP) $(PKG_INSTALL_DIR)/usr/include/efivar/*.h $(1)/usr/include/efivar/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/efivar/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/efisecdb $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/efivar $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libefiboot.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libefisec.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libefivar.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,efivar)) diff --git a/libs/efivar/patches/002-musl-compat.patch b/libs/efivar/patches/002-musl-compat.patch new file mode 100644 index 000000000..be3cfec48 --- /dev/null +++ b/libs/efivar/patches/002-musl-compat.patch @@ -0,0 +1,199 @@ +From cece3ffd5be2f8641eb694513f2b73e5eb97ffd3 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Fri, 28 Jan 2022 12:13:30 +0100 +Subject: [PATCH 1/2] efisecdb: fix build with musl libc + +Refactor code to use POSIX atexit(3) instead of the GNU specific +on_exit(3). + +Resolves: #197 +Resolves: #202 +Signed-off-by: Natanael Copa + +--- a/src/compiler.h ++++ b/src/compiler.h +@@ -7,8 +7,6 @@ + #ifndef COMPILER_H_ + #define COMPILER_H_ + +-#include +- + /* GCC version checking borrowed from glibc. */ + #if defined(__GNUC__) && defined(__GNUC_MINOR__) + # define GNUC_PREREQ(maj,min) \ +--- a/src/efisecdb.c ++++ b/src/efisecdb.c +@@ -25,6 +25,10 @@ + extern char *optarg; + extern int optind, opterr, optopt; + ++static efi_secdb_t *secdb = NULL; ++static list_t infiles; ++static list_t actions; ++ + struct hash_param { + char *name; + efi_secdb_type_t algorithm; +@@ -187,12 +191,11 @@ add_action(list_t *list, action_type_t a + } + + static void +-free_actions(int status UNUSED, void *actionsp) ++free_actions(void) + { +- list_t *actions = (list_t *)actionsp; + list_t *pos, *tmp; + +- for_each_action_safe(pos, tmp, actions) { ++ for_each_action_safe(pos, tmp, &actions) { + action_t *action = list_entry(pos, action_t, list); + + list_del(&action->list); +@@ -202,12 +205,11 @@ free_actions(int status UNUSED, void *ac + } + + static void +-free_infiles(int status UNUSED, void *infilesp) ++free_infiles(void) + { +- list_t *infiles = (list_t *)infilesp; + list_t *pos, *tmp; + +- for_each_ptr_safe(pos, tmp, infiles) { ++ for_each_ptr_safe(pos, tmp, &infiles) { + ptrlist_t *entry = list_entry(pos, ptrlist_t, list); + + list_del(&entry->list); +@@ -216,27 +218,12 @@ free_infiles(int status UNUSED, void *in + } + + static void +-maybe_free_secdb(int status UNUSED, void *voidp) ++maybe_free_secdb(void) + { +- efi_secdb_t **secdbp = (efi_secdb_t **)voidp; +- +- if (secdbp == NULL || *secdbp == NULL) ++ if (secdb == NULL) + return; + +- efi_secdb_free(*secdbp); +-} +- +-static void +-maybe_do_unlink(int status, void *filep) +-{ +- char **file = (char **)filep; +- +- if (status == 0) +- return; +- if (file == NULL || *file == NULL) +- return; +- +- unlink(*file); ++ efi_secdb_free(secdb); + } + + static void +@@ -268,8 +255,7 @@ list_guids(void) + * failure. + */ + static int +-parse_input_files(list_t *infiles, char **outfile, efi_secdb_t **secdb, +- bool dump) ++parse_input_files(list_t *infiles, efi_secdb_t **secdb, bool dump) + { + int status = 0; + list_t *pos, *tmp; +@@ -310,8 +296,6 @@ parse_input_files(list_t *infiles, char + if (!dump) + exit(1); + status = 1; +- xfree(*outfile); +- *outfile = NULL; + break; + } + } +@@ -323,15 +307,6 @@ parse_input_files(list_t *infiles, char + return status; + } + +-/* +- * These need to be static globals so that they're not on main's stack when +- * on_exit() fires. +- */ +-static efi_secdb_t *secdb = NULL; +-static list_t infiles; +-static list_t actions; +-static char *outfile = NULL; +- + int + main(int argc, char *argv[]) + { +@@ -351,6 +326,7 @@ main(int argc, char *argv[]) + bool do_sort_data = false; + bool sort_descending = false; + int status = 0; ++ char *outfile = NULL; + + const char sopts[] = ":aAc:dfg:h:i:Lo:rs:t:v?"; + const struct option lopts[] = { +@@ -376,10 +352,9 @@ main(int argc, char *argv[]) + INIT_LIST_HEAD(&infiles); + INIT_LIST_HEAD(&actions); + +- on_exit(free_actions, &actions); +- on_exit(free_infiles, &infiles); +- on_exit(maybe_free_secdb, &secdb); +- on_exit(maybe_do_unlink, &outfile); ++ atexit(free_actions); ++ atexit(free_infiles); ++ atexit(maybe_free_secdb); + + /* + * parse the command line. +@@ -550,7 +525,7 @@ sort_err: + efi_secdb_set_bool(secdb, EFI_SECDB_SORT_DATA, do_sort_data); + efi_secdb_set_bool(secdb, EFI_SECDB_SORT_DESCENDING, sort_descending); + +- status = parse_input_files(&infiles, &outfile, &secdb, dump); ++ status = parse_input_files(&infiles, &secdb, dump); + if (status == 0) { + for_each_action_safe(pos, tmp, &actions) { + action_t *action = list_entry(pos, action_t, list); +@@ -587,24 +562,30 @@ sort_err: + outfd = open(outfile, flags, 0600); + if (outfd < 0) { + char *tmpoutfile = outfile; +- if (errno == EEXIST) +- outfile = NULL; ++ if (errno != EEXIST) ++ unlink(outfile); + err(1, "could not open \"%s\"", tmpoutfile); + } + + rc = ftruncate(outfd, 0); +- if (rc < 0) ++ if (rc < 0) { ++ unlink(outfile); + err(1, "could not truncate output file \"%s\"", outfile); ++ } + + void *output; + size_t size = 0; + rc = efi_secdb_realize(secdb, &output, &size); +- if (rc < 0) ++ if (rc < 0) { ++ unlink(outfile); + secdb_err(1, "could not realize signature list"); ++ } + + rc = write(outfd, output, size); +- if (rc < 0) ++ if (rc < 0) { ++ unlink(outfile); + err(1, "could not write signature list"); ++ } + + close(outfd); + xfree(output); diff --git a/libs/efivar/patches/005-skip-docs.patch b/libs/efivar/patches/005-skip-docs.patch new file mode 100644 index 000000000..94e20d7fd --- /dev/null +++ b/libs/efivar/patches/005-skip-docs.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -7,7 +7,7 @@ include $(TOPDIR)/src/include/defaults.m + include $(TOPDIR)/src/include/coverity.mk + include $(TOPDIR)/src/include/scan-build.mk + +-SUBDIRS := src docs ++SUBDIRS := src + + all : | efivar.spec src/include/version.mk prep + all clean install prep : From b5f6682b4be7c7a2d93f37e79cfa92c8c263fbf4 Mon Sep 17 00:00:00 2001 From: Oskari Rauta Date: Thu, 12 Jan 2023 10:56:08 +0200 Subject: [PATCH 18/20] efibootmgr: new package Co-authored-by: Tianling Shen Signed-off-by: Oskari Rauta --- utils/efibootmgr/Makefile | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 utils/efibootmgr/Makefile diff --git a/utils/efibootmgr/Makefile b/utils/efibootmgr/Makefile new file mode 100644 index 000000000..fc53f8729 --- /dev/null +++ b/utils/efibootmgr/Makefile @@ -0,0 +1,55 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=efibootmgr +PKG_VERSION:=18 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/rhboot/efibootmgr.git +PKG_SOURCE_DATE:=2022-11-12 +PKG_SOURCE_VERSION:=1904f9cd5a48207d49e393ac8de824f54ccfb697 +PKG_MIRROR_HASH:=0355e00bb54d468ecbaa106aa703dd389f2f2f4c7b7afb78a258cec10d75f78d + +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=OSkari Rauta + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/efibootmgr + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Application to modify the EFI Boot Manager + DEPENDS:=@TARGET_x86_64 +efivar +libpopt + URL:=https://github.com/rhboot/efibootmgr +endef + +define Package/efibootmgr/description + This is efibootmgr, a Linux user-space application to modify the + Intel Extensible Firmware Interface (EFI) Boot Manager. + This application can create and destroy boot entries, change + the boot order, change the next running boot option, and more. + + Details on the EFI Boot Manager are available from the + EFI Specification, v1.02 or above, available from: + http://www.uefi.org + + Note: efibootmgr requires either the efivarfs or the legacy + efivars kernel module to be loaded prior to use. +endef + +MAKE_VARS += \ + EFIDIR="/boot/EFI" \ + PCDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ + EXTRAINCDIR="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/efivar" \ + EXTRALIBDIR="-L$(STAGING_DIR)/usr/lib" + +define Package/efibootmgr/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{efibootdump,efibootmgr} $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,efibootmgr)) From 96e8ff604f5d980360e1ab9c0cdd22269888885c Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Wed, 18 Jan 2023 13:00:54 +0100 Subject: [PATCH 19/20] git: update to 2.34.6 Fixes CVE-2022-23521 Fixes CVE-2022-41903 Fixes CVE-2022-39260 Fixes CVE-2022-39253 Fixes CVE-2022-29187 Signed-off-by: Michal Vasilek --- net/git/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/git/Makefile b/net/git/Makefile index af31d27fc..aa800e1fc 100644 --- a/net/git/Makefile +++ b/net/git/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=git -PKG_VERSION:=2.34.3 +PKG_VERSION:=2.34.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/scm/git/ -PKG_HASH:=648e2f753a4360984d437f9038cb4649442fb5be846950bcaaca006b75c78418 +PKG_HASH:=ed2c17ea71cacac9b92835e74edef7b26ed5bc85bb25e954adb0efa12fbfcf69 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING From eb90ea31d2e89263ddf45b33bb6211f5588e837c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sun, 15 Jan 2023 13:59:29 +0800 Subject: [PATCH 20/20] udphp-client: bump to latest git HEAD Fix build with gcc12. Signed-off-by: Tianling Shen --- net/udphp-client/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/udphp-client/Makefile b/net/udphp-client/Makefile index 4fd6fc5df..995c167c7 100644 --- a/net/udphp-client/Makefile +++ b/net/udphp-client/Makefile @@ -13,9 +13,9 @@ PKG_LICENSE:=MIT PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/gargargar/udphp.git -PKG_SOURCE_DATE:=2022-12-30 -PKG_SOURCE_VERSION:=e4ab512ab5ba3955fd5a23a76ffaae00f627ec3c -PKG_MIRROR_HASH:=68ce9885b7fc1e10ff2afbe003dd65489d3e64ca0212914c513469e581127974 +PKG_SOURCE_DATE:=2023-01-13 +PKG_SOURCE_VERSION:=7c0fc5fcf3b807b053c5906bdd8c2acb244c1cbd +PKG_MIRROR_HASH:=19693aef4020e58955dba25f28b76a396a4c1fbb7ef7464cfaf45405d9eb0c5e include $(INCLUDE_DIR)/package.mk