package/shadowsocks-libev: bump version to 3.3.6
PATCH 1/20 package/shadowsocks-libev: bump version to 3.3.6
https://github.com/shadowsocks/shadowsocks-libev/releases/tag/v3.3.6
Upstream tarball does not contain submodules so we need to download the git repo ourselves. Please note that these submodules cannot be provided as system libraries:
https://github.com/shadowsocks/shadowsocks-libev/commit/6423c8e496fe2e8d37e02b9a2d0472f7f4d6f5c0
"These are vendored code built from git submodules, not system
libraries, [...]"
Removed all patches, they were either autoconf-related or are included in this release.
Added patch to fix build with toolchains without c++.
Switched build system to cmake due to upstream removal of autoconf and switched to pcre2 instead of pcre:
https://github.com/shadowsocks/shadowsocks-libev/commit/7bb250739ef0067c62e4ffd533ec8cee2775995a
The cmake build system always builds dynamic libraries:
https://github.com/shadowsocks/shadowsocks-libev/blob/v3.3.6/src/CMakeLists.txt#L252
so we added a dependency to !BR2_STATIC_LIBS and -DWITH_STATIC=OFF as configure option.
Please note that this bump will not fix the build errors introduced by the bump of glibc to version 2.43:
https://github.com/shadowsocks/shadowsocks-libev/issues/3032
--- .checkpackageignore | 3 - ...dd-LANGUAGES-option-to-project-varia.patch | 29 +++ ...-pkg-config-to-find-netfilter_conntr.patch | 62 ----- .../0002-fix-maybe-uninitialized-errors.patch | 93 ------- ...kefile.am-remove-static-from-LDFLAGS.patch | 61 ----- .../0004-fix-mbedtls-3-6-compatibility.patch | 231 ------------------ package/shadowsocks-libev/Config.in | 7 +- .../shadowsocks-libev/shadowsocks-libev.hash | 2 +- .../shadowsocks-libev/shadowsocks-libev.mk | 22 +- 9 files changed, 45 insertions(+), 465 deletions(-) create mode 100644 package/shadowsocks-libev/0001-CMakeLists.txt-Add-LANGUAGES-option-to-project-varia.patch delete mode 100644 package/shadowsocks-libev/0001-configure.ac-use-pkg-config-to-find-netfilter_conntr.patch delete mode 100644 package/shadowsocks-libev/0002-fix-maybe-uninitialized-errors.patch delete mode 100644 package/shadowsocks-libev/0003-lib-Makefile.am-remove-static-from-LDFLAGS.patch delete mode 100644 package/shadowsocks-libev/0004-fix-mbedtls-3-6-compatibility.patch
.checkpackageignore +0 -3
@@ -862,9 +862,6 @@ package/sentry-native/0001-sentry.h-include-ucontext.h.patch lib_patch.Upstream package/ser2net/S50ser2net Shellcheck lib_sysv.Indent lib_sysv.Variables package/setools/0001-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch lib_patch.Upstream package/setserial/0001-build-system-fix.patch lib_patch.Upstream -package/shadowsocks-libev/0001-configure.ac-use-pkg-config-to-find-netfilter_conntr.patch lib_patch.Upstream -package/shadowsocks-libev/0002-fix-maybe-uninitialized-errors.patch lib_patch.Upstream -package/shadowsocks-libev/0003-lib-Makefile.am-remove-static-from-LDFLAGS.patch lib_patch.Upstream package/shairport-sync/S99shairport-sync Shellcheck lib_sysv.Indent lib_sysv.Variables package/shared-mime-info/0001-Remove-incorrect-dependency-from-install-data-hook.patch lib_patch.Upstream package/shellinabox/0001-Makefile-disable-always-building-statically.patch lib_patch.Upstream
package/shadowsocks-libev/0001-CMakeLists.txt-Add-LANGUAGES-option-to-project-varia.patch new file +29 -0
@@ -0,0 +1,29 @@ +From cfff08f2ebc0edc89801c6dea97ca9b47d593608 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sat, 4 Apr 2026 09:25:07 +0200 +Subject: [PATCH] CMakeLists.txt: Add LANGUAGES option to project variable + +Fixes build with toolchains without c++. + +Upstream: https://github.com/shadowsocks/shadowsocks-libev/pull/3033 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 52ff13e..0d9528f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.5) + +-set(PROJECT_NAME shadowsocks-libev) ++set(PROJECT_NAME shadowsocks-libev LANGUAGES C) + set(RELEASE_DATE 2026-02-09) + set(PROJECT_VERSION "3.3.6") + set(PROJECT_DESC "a lightweight secured socks5 proxy") +-- +2.47.3 +
package/shadowsocks-libev/0001-configure.ac-use-pkg-config-to-find-netfilter_conntr.patch deleted +0 -62
62 lines not on this page · raw message
package/shadowsocks-libev/0002-fix-maybe-uninitialized-errors.patch deleted +0 -93
93 lines not on this page · raw message
package/shadowsocks-libev/0003-lib-Makefile.am-remove-static-from-LDFLAGS.patch deleted +0 -61
61 lines not on this page · raw message
package/shadowsocks-libev/0004-fix-mbedtls-3-6-compatibility.patch deleted +0 -231
231 lines not on this page · raw message
package/shadowsocks-libev/Config.in +4 -3
@@ -4,11 +4,12 @@ config BR2_PACKAGE_SHADOWSOCKS_LIBEV depends on BR2_TOOLCHAIN_HAS_SYNC_8 || !BR2_ARCH_IS_64 # for libcork depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS select BR2_PACKAGE_C_ARES select BR2_PACKAGE_LIBEV select BR2_PACKAGE_LIBSODIUM select BR2_PACKAGE_MBEDTLS - select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE2 help Shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and low-end boxes.
@@ -27,8 +28,8 @@ config BR2_PACKAGE_SHADOWSOCKS_LIBEV_CONNMARKTOS If unsure, don't enable this option -comment "shadowsocks-libev needs a toolchain w/ threads" +comment "shadowsocks-libev needs a toolchain w/ threads, dynamic library" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on BR2_TOOLCHAIN_HAS_SYNC_8 || !BR2_ARCH_IS_64 depends on BR2_USE_MMU - depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/shadowsocks-libev/shadowsocks-libev.hash +1 -1
@@ -1,5 +1,5 @@ # Locally computed -sha256 cfc8eded35360f4b67e18dc447b0c00cddb29cc57a3cec48b135e5fb87433488 shadowsocks-libev-3.3.5.tar.gz +sha256 2de1dbbc9b643e8655b0ed0534b5e10d7182eb2009046897f20ac5383d4c6919 shadowsocks-libev-v3.3.6-git4.tar.gz # License files, locally calculated sha256 736883f97d44dbec288bb82819f18f4f86d02ae3192f6a9abefa00db76bace41 COPYING
package/shadowsocks-libev/shadowsocks-libev.mk +11 -11
@@ -4,24 +4,24 @@ # ################################################################################ -SHADOWSOCKS_LIBEV_VERSION = 3.3.5 -SHADOWSOCKS_LIBEV_SITE = https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(SHADOWSOCKS_LIBEV_VERSION) +SHADOWSOCKS_LIBEV_VERSION = v3.3.6 +SHADOWSOCKS_LIBEV_SITE = https://github.com/shadowsocks/shadowsocks-libev.git +SHADOWSOCKS_LIBEV_SITE_METHOD = git +SHADOWSOCKS_LIBEV_GIT_SUBMODULES = YES SHADOWSOCKS_LIBEV_LICENSE = GPL-3.0+, BSD-2-Clause (libbloom), BSD-3-Clause (libcork, libipset) SHADOWSOCKS_LIBEV_LICENSE_FILES = COPYING libbloom/LICENSE libcork/COPYING SHADOWSOCKS_LIBEV_CPE_ID_VENDOR = shadowsocks -SHADOWSOCKS_LIBEV_DEPENDENCIES = host-pkgconf c-ares libev libsodium mbedtls pcre +SHADOWSOCKS_LIBEV_DEPENDENCIES = host-pkgconf c-ares libev libsodium mbedtls pcre2 SHADOWSOCKS_LIBEV_INSTALL_STAGING = YES -# We're patching configure.ac -SHADOWSOCKS_LIBEV_AUTORECONF = YES -SHADOWSOCKS_LIBEV_CONF_OPTS = \ - --with-pcre=$(STAGING_DIR)/usr \ - --disable-ssp +SHADOWSOCKS_LIBEV_CONF_OPTS += \ + -DDISABLE_SSP=ON \ + -DWITH_STATIC=OFF ifeq ($(BR2_PACKAGE_SHADOWSOCKS_LIBEV_CONNMARKTOS),y) SHADOWSOCKS_LIBEV_DEPENDENCIES += libnetfilter_conntrack -SHADOWSOCKS_LIBEV_CONF_OPTS += --enable-connmarktos +SHADOWSOCKS_LIBEV_CONF_OPTS += -DENABLE_CONNMARKTOS=ON else -SHADOWSOCKS_LIBEV_CONF_OPTS += --disable-connmarktos +SHADOWSOCKS_LIBEV_CONF_OPTS += -DENABLE_CONNMARKTOS=OFF endif -$(eval $(autotools-package)) +$(eval $(cmake-package))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/20 package/c-icap: fix musl build
Fixes:
https://autobuild.buildroot.net/results/33b/33bb3ea8ac36da7f40a82c580d3614f0b34a7ab2/
The oldest build error dates back to June 2024 so this patch should be backported to LTS branches.
--- ...ting-in-various-printf-to-avoid-warn.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch
package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 8ef8966237865ec699ab16d208ff56edaac4ff7b Mon Sep 17 00:00:00 2001 +From: Christos Tsantilas <[email protected]> +Date: Fri, 1 Nov 2019 08:00:52 -0700 +Subject: [PATCH] Fix integer printing in various printf to avoid warnings + about integer sizes + +Upstream: https://github.com/c-icap/c-icap-server/commit/8ef8966237865ec699ab16d208ff56edaac4ff7b + +[Bernd: partially backported to 0.5.10] +Signed-off-by: Bernd Kuhls <[email protected]> +--- + mpmt_server.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mpmt_server.c b/mpmt_server.c +index a30d55d4..9b178a66 100644 +--- a/mpmt_server.c ++++ b/mpmt_server.c +@@ -74,7 +74,7 @@ typedef struct server_decl { + + ci_thread_mutex_t threads_list_mtx; + server_decl_t **threads_list = NULL; +-ci_thread_t listener_thread_id = -1; ++ci_thread_t listener_thread_id; + int listener_running = 0; + + ci_thread_cond_t free_server_cond; +@@ -242,8 +242,8 @@ static void cancel_all_threads() + for (i=0; i<CI_CONF.THREADS_PER_CHILD; i++) { + if (threads_list[i] != NULL) { /* if the i thread is still alive*/ + if (!threads_list[i]->running) { /*if the i thread is not running any more*/ +- ci_debug_printf(5, "Cancel server %d, thread_id %lu (%d)\n", +- threads_list[i]->srv_id, threads_list[i]->srv_pthread, ++ ci_debug_printf(5, "Cancel server %" PRIu64 ", thread_id %" PRIu64 " (%d)\n", ++ (uint64_t)threads_list[i]->srv_id, (uint64_t)threads_list[i]->srv_pthread, + i); + ci_thread_join(threads_list[i]->srv_pthread); + release_thread_i(i); +@@ -252,7 +252,7 @@ static void cancel_all_threads() + /*The thread is still running, and we have a timeout for waiting + the thread to exit. */ + if (wait_for_workers <= 2) { +- ci_debug_printf(5, "Thread %ld still running near the timeout. Try to kill it\n", threads_list[i]->srv_pthread); ++ ci_debug_printf(5, "Thread %" PRIu64 " still running near the timeout. Try to kill it\n", (uint64_t)threads_list[i]->srv_pthread); + pthread_kill( threads_list[i]->srv_pthread, SIGTERM); + } + }
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedRe: [Buildroot] [PATCH 02/20] package/c-icap: fix musl build
In reply of:
Quoted 7 lines
Fixes:
https://autobuild.buildroot.net/results/33b/33bb3ea8ac36da7f40a82c580d3614f0b34a7ab2/The oldest build error dates back to June 2024 so this patch should be backported to LTS branches.
Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2025.02.x & 2026.02.x. Thanks
Quoted 65 lines
--- ...ting-in-various-printf-to-avoid-warn.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patchpackage/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch new file +47
-0@@ -0,0 +1,47 @@ +From 8ef8966237865ec699ab16d208ff56edaac4ff7b Mon Sep 17 00:00:00 2001 +From: Christos Tsantilas <[email protected]> +Date: Fri, 1 Nov 2019 08:00:52 -0700 +Subject: [PATCH] Fix integer printing in various printf to avoid warnings + about integer sizes + +Upstream: https://github.com/c-icap/c-icap-server/commit/8ef8966237865ec699ab16d208ff56edaac4ff7b + +[Bernd: partially backported to 0.5.10] +Signed-off-by: Bernd Kuhls <[email protected]> +--- + mpmt_server.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mpmt_server.c b/mpmt_server.c +index a30d55d4..9b178a66 100644 +--- a/mpmt_server.c ++++ b/mpmt_server.c +@@ -74,7 +74,7 @@ typedef struct server_decl { + + ci_thread_mutex_t threads_list_mtx; + server_decl_t **threads_list = NULL; +-ci_thread_t listener_thread_id = -1; ++ci_thread_t listener_thread_id; + int listener_running = 0; + + ci_thread_cond_t free_server_cond; +@@ -242,8 +242,8 @@ static void cancel_all_threads() + for (i=0; i<CI_CONF.THREADS_PER_CHILD; i++) { + if (threads_list[i] != NULL) { /* if the i thread is still alive*/ + if (!threads_list[i]->running) { /*if the i thread is not running any more*/ +- ci_debug_printf(5, "Cancel server %d, thread_id %lu (%d)\n", +- threads_list[i]->srv_id, threads_list[i]->srv_pthread, ++ ci_debug_printf(5, "Cancel server %" PRIu64 ", thread_id %" PRIu64 " (%d)\n", ++ (uint64_t)threads_list[i]->srv_id, (uint64_t)threads_list[i]->srv_pthread, + i); + ci_thread_join(threads_list[i]->srv_pthread); + release_thread_i(i); +@@ -252,7 +252,7 @@ static void cancel_all_threads() + /*The thread is still running, and we have a timeout for waiting + the thread to exit. */ + if (wait_for_workers <= 2) { +- ci_debug_printf(5, "Thread %ld still running near the timeout. Try to kill it\n", threads_list[i]->srv_pthread); ++ ci_debug_printf(5, "Thread %" PRIu64 " still running near the timeout. Try to kill it\n", (uint64_t)threads_list[i]->srv_pthread); + pthread_kill( threads_list[i]->srv_pthread, SIGTERM); + } + }Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/20 package/c-icap: bump version to 0.5.14
In reply to Bernd Kuhls0.5.11: https://sourceforge.net/p/c-icap/mailman/message/38634903/
0.5.12: https://sourceforge.net/p/c-icap/mailman/message/58723532/
0.5.13: https://github.com/c-icap/c-icap-server/compare/C_ICAP_0.5.12...C_ICAP_0.5.13
(no announcement found)
0.5.14: https://sourceforge.net/p/c-icap/mailman/message/59202148/
Rebased patch 0001 due to upstream commit
https://github.com/c-icap/c-icap-server/commit/1559d1662a9c0cd8280073202f187f0d5c080f87
Rebased patch 0003 due to upstream commit
https://github.com/c-icap/c-icap-server/commit/b650bfdd4ac5aa32fd1b2de8cc0a47e2dc08c6d7
Removed patch 0004 which is included in this release:
https://github.com/c-icap/c-icap-server/commit/16cdaa505db2108d9a7c42baa3779f5831e62916
Renamed patches 0005 & 0006.
Disabled zstd support added upstream with commit
https://github.com/c-icap/c-icap-server/commit/1559d1662a9c0cd8280073202f187f0d5c080f87
due to build errors when enabled:
encode.c: In function 'ci_compress_to_membuf':
encode.c:75:16: error: implicit declaration of function
'ci_zstd_compress_to_membuf'; did you mean 'ci_decompress_to_membuf'? [-Wimplicit-function-declaration]
---
...ixes-to-compile-and-run-under-cygwin.patch | 8 +++--
...thod-release_authentication_header-m.patch | 18 ++---------
...ion-prototypes-to-fix-GCC-15.x-buil.patch} | 0
...ith-GCC15-signal-handlers-require-an.patch | 31 -------------------
...ing-in-various-printf-to-avoid-warn.patch} | 0
package/c-icap/c-icap.hash | 6 ++--
package/c-icap/c-icap.mk | 3 +-
7 files changed, 13 insertions(+), 53 deletions(-)
rename package/c-icap/{0005-Fix-module-operation-prototypes-to-fix-GCC-15.x-buil.patch => 0004-Fix-module-operation-prototypes-to-fix-GCC-15.x-buil.patch} (100%)
delete mode 100644 package/c-icap/0004-Fix-to-compile-with-GCC15-signal-handlers-require-an.patch
rename package/c-icap/{0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch => 0005-Fix-integer-printing-in-various-printf-to-avoid-warn.patch} (100%)package/c-icap/0001-Required-fixes-to-compile-and-run-under-cygwin.patch +5 -3
@@ -7,6 +7,8 @@ Subject: [PATCH] Required fixes to compile and run under cygwin https://github.com/c-icap/c-icap-server/commit/1631a6c1f50e152b8a45d8279c96086e5636795b, which has the side effect of fixing the build with the musl C library] Signed-off-by: Fabrice Fontaine <[email protected]> +[Bernd: rebased for 0.5.14] +Signed-off-by: Bernd Kuhls <[email protected]> --- Makefile.am | 2 +- configure.ac | 10 +++++++---
@@ -26,13 +28,13 @@ index 4c34033..ab80f4f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,7 @@ c_icap_SOURCES = aserver.c request.c cfg_param.c \ - libicapapi_la_CFLAGS= $(INVISIBILITY_CFLAG) -I$(srcdir)/include/ -Iinclude/ @ZLIB_ADD_FLAG@ @OPENSSL_ADD_FLAG@ @BZLIB_ADD_FLAG@ @BROTLI_ADD_FLAG@ @PCRE_ADD_FLAG@ -DCI_BUILD_LIB + libicapapi_la_CFLAGS= $(INVISIBILITY_CFLAG) -I$(srcdir)/include/ -Iinclude/ @ZLIB_ADD_FLAG@ @OPENSSL_ADD_FLAG@ @BZLIB_ADD_FLAG@ @BROTLI_ADD_FLAG@ @ZSTD_ADD_FLAG@ @PCRE_ADD_FLAG@ -DCI_BUILD_LIB - libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @BZLIB_ADD_LDADD@ @BROTLI_ADD_LDADD@ @PCRE_ADD_LDADD@ @DL_ADD_FLAG@ @THREADS_LDADD@ @OPENSSL_ADD_LDADD@ + libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @BZLIB_ADD_LDADD@ @BROTLI_ADD_LDADD@ @ZSTD_ADD_LDADD@ @PCRE_ADD_LDADD@ @DL_ADD_FLAG@ @THREADS_LDADD@ @OPENSSL_ADD_LDADD@ -libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@ @THREADS_LDFLAGS@ +libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@ @LIBS_LDFLAGS@ @THREADS_LDFLAGS@ - export EXT_PROGRAMS_MKLIB = @ZLIB_LNDIR_LDADD@ @BZLIB_LNDIR_LDADD@ @BROTLI_LNDIR_LDADD@ @PCRE_LNDIR_LDADD@ @OPENSSL_LNDIR_LDADD@ + export EXT_PROGRAMS_MKLIB = @ZLIB_LNDIR_LDADD@ @BZLIB_LNDIR_LDADD@ @BROTLI_LNDIR_LDADD@ @ZSTD_LNDIR_LDADD@ @PCRE_LNDIR_LDADD@ @OPENSSL_LNDIR_LDADD@ diff --git a/configure.ac b/configure.ac index 405571b..8059cb7 100644
package/c-icap/0003-Fix-http_auth_method-release_authentication_header-m.patch +3 -15
@@ -11,10 +11,11 @@ Reported with PR#72 at github: Upstream: 48a221b0197727b26f90c00544fa19c67d0f5d47 Signed-off-by: Thomas Petazzoni <[email protected]> +[Bernd: rebased for 0.5.14] +Signed-off-by: Bernd Kuhls <[email protected]> --- http_auth.c | 2 +- - include/module.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_auth.c b/http_auth.c index 1883b55..b831bb1 100644
@@ -29,19 +30,6 @@ index 1883b55..b831bb1 100644 int len, res; if (ALLOW_REMOTE_PROXY_USERS && !use_method) { -diff --git a/include/module.h b/include/module.h -index 286ef72..0e57586 100644 ---- a/include/module.h -+++ b/include/module.h -@@ -96,7 +96,7 @@ typedef struct http_auth_method { - void *(*create_auth_data)(const char *authorization_header,const char **username); - void (*release_auth_data)(void *data); - char *(*authentication_header)(); -- void (*release_authentication_header)(); -+ void (*release_authentication_header)(char *); - struct ci_conf_entry *conf_table; - } http_auth_method_t; - -- 2.51.0
package/c-icap/0004-Fix-module-operation-prototypes-to-fix-GCC-15.x-buil.patch renamed from package/c-icap/0005-Fix-module-operation-prototypes-to-fix-GCC-15.x-buil.patch +0 -0
package/c-icap/0004-Fix-to-compile-with-GCC15-signal-handlers-require-an.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 8d21c9c18e3b03e28ef2831f3ecd287c4cc44694 Mon Sep 17 00:00:00 2001 -From: Christos Tsantilas <[email protected]> -Date: Fri, 21 Feb 2025 13:41:37 +0200 -Subject: [PATCH] Fix to compile with GCC15: signal handlers require an int - argument - -Reported with PR#72 at github: - https://github.com/c-icap/c-icap-server/pull/72 - -Upstream: 0b3408ad0e9f5ccadcd4d77dffa651f9211e4cd2 -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - mpmt_server.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mpmt_server.c b/mpmt_server.c -index aab9db5..01bab65 100644 ---- a/mpmt_server.c -+++ b/mpmt_server.c -@@ -140,7 +140,7 @@ static void sigchld_handler_main(int sig) - /*Do nothing the signal will be ignored..... */ - } - --static void sighup_handler_main() -+static void sighup_handler_main(int sig) - { - c_icap_reconfigure = 1; - } --- -2.51.0 -
package/c-icap/0005-Fix-integer-printing-in-various-printf-to-avoid-warn.patch renamed from package/c-icap/0006-Fix-integer-printing-in-various-printf-to-avoid-warn.patch +0 -0
package/c-icap/c-icap.hash +3 -3
@@ -1,6 +1,6 @@ # Retrieved from https://sourceforge.net/projects/c-icap/files/c-icap/0.5.x/ -md5 c8329684588a906d10a687e84ba4a478 c_icap-0.5.10.tar.gz -sha1 2901aa19c8c4b09b700164290942290c34132076 c_icap-0.5.10.tar.gz +md5 f678d20ae30cad41b08437b441752e31 c_icap-0.5.14.tar.gz +sha1 db5e72065a3219410adfdbc5378b40b01e21ec36 c_icap-0.5.14.tar.gz # Locally calculated -sha256 541d503354907f06d1d72fa90fffd031002f0f4346150fb7b2203ad5825ae49d c_icap-0.5.10.tar.gz +sha256 28c30c97b1892a1a8938db6cdad806a73016c57ae181e232d33f347d5d700ec5 c_icap-0.5.14.tar.gz sha256 36b6d3fa47916943fd5fec313c584784946047ec1337a78b440e5992cb595f89 COPYING
package/c-icap/c-icap.mk +2 -1
@@ -4,7 +4,7 @@ # ################################################################################ -C_ICAP_VERSION = 0.5.10 +C_ICAP_VERSION = 0.5.14 C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz C_ICAP_SITE = http://downloads.sourceforge.net/c-icap C_ICAP_LICENSE = LGPL-2.1+
@@ -14,6 +14,7 @@ C_ICAP_INSTALL_STAGING = YES C_ICAP_CONFIG_SCRIPTS = c-icap-config c-icap-libicapapi-config C_ICAP_CONF_OPTS = \ --without-perl \ + --without-zstd \ --enable-large-files \ --enable-ipv6 # Pre-seed cache variables for tests done with AC_TRY_RUN that are not
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/20 package/c-icap-modules: bump version to 0.5.7
In reply to Bernd Kuhls0.5.7: https://sourceforge.net/p/c-icap/mailman/message/58723534/
"The newer c-icap-0.5.12 or c-icap-0.6.2 c-icap release is also
required."
0.5.6: https://sourceforge.net/p/c-icap/mailman/message/40461114/
--- package/c-icap-modules/c-icap-modules.hash | 6 +++--- package/c-icap-modules/c-icap-modules.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
package/c-icap-modules/c-icap-modules.hash +3 -3
@@ -1,7 +1,7 @@ # From http://sourceforge.net/projects/c-icap/files/c-icap-modules/0.5.x/ -md5 ca6d5d124a4668d63affcaa5ab083e57 c_icap_modules-0.5.5.tar.gz -sha1 67be484a93fe662a7735ee06e1d34d82b54469a8 c_icap_modules-0.5.5.tar.gz +md5 08c4721a26840bb0ff95fcaa64b686c3 c_icap_modules-0.5.7.tar.gz +sha1 839b79bc53e9048680309a7cd31ad3c1e2cf44b5 c_icap_modules-0.5.7.tar.gz # Locally calculated -sha256 6a42f1fdd8c35ad38d29f7d3c10f925471977f217086352e146cf95e45f2b5b5 c_icap_modules-0.5.5.tar.gz +sha256 80bc0af10be171c0c73cd5886533a397c4d55211756fb6279f245ee7e5dd3814 c_icap_modules-0.5.7.tar.gz sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
package/c-icap-modules/c-icap-modules.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -C_ICAP_MODULES_VERSION = 0.5.5 +C_ICAP_MODULES_VERSION = 0.5.7 C_ICAP_MODULES_SOURCE = c_icap_modules-$(C_ICAP_MODULES_VERSION).tar.gz C_ICAP_MODULES_SITE = http://downloads.sourceforge.net/c-icap C_ICAP_MODULES_LICENSE = GPL-2.0+
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 5/20 package/c-icap: switch to pcre2
In reply to Bernd KuhlsAdded two patches backported from the upstream branch c_icap_0_6_x which were backported by Debian to the 0.5.x branch.
Build-tested using this defconfig:
BR2_PACKAGE_PCRE2=y
BR2_PACKAGE_C_ICAP=y
BR2_PACKAGE_C_ICAP_MODULES=y
arm-aarch64 [ 1/32]: OK
bootlin-aarch64-glibc [ 2/32]: OK
bootlin-aarch64-glibc-old [ 3/32]: FAILED
bootlin-arcle-hs38-uclibc [ 4/32]: OK
bootlin-armv5-uclibc [ 5/32]: OK
bootlin-armv7-glibc [ 6/32]: OK
bootlin-armv7m-uclibc [ 7/32]: SKIPPED
bootlin-armv7-musl [ 8/32]: OK
bootlin-m68k-5208-uclibc [ 9/32]: SKIPPED
bootlin-m68k-68040-uclibc [10/32]: OK
bootlin-microblazeel-uclibc [11/32]: OK
bootlin-mips64el-glibc [12/32]: OK
bootlin-mipsel32r6-glibc [13/32]: OK
bootlin-mipsel-uclibc [14/32]: OK
bootlin-openrisc-uclibc [15/32]: OK
bootlin-powerpc64le-power8-glibc [16/32]: OK
bootlin-powerpc-e500mc-uclibc [17/32]: OK
bootlin-riscv32-glibc [18/32]: OK
bootlin-riscv64-glibc [19/32]: OK
bootlin-riscv64-musl [20/32]: OK
bootlin-s390x-z13-glibc [21/32]: OK
bootlin-sh4-uclibc [22/32]: OK
bootlin-sparc64-glibc [23/32]: OK
bootlin-sparc-uclibc [24/32]: OK
bootlin-x86-64-glibc [25/32]: OK
bootlin-x86-64-musl [26/32]: OK
bootlin-x86-64-uclibc [27/32]: OK
bootlin-x86-i686-musl [28/32]: OK
bootlin-xtensa-uclibc [29/32]: OK
br-arm-basic [30/32]: FAILED
br-arm-full-nothread [31/32]: SKIPPED
br-arm-full-static [32/32]: SKIPPED32 builds, 4 skipped, 2 build failed, 0 legal-info failed, 0 show-info failed
The two build errors are unrelated to this patch, they are caused by patch 0005-Fix-module-operation-prototypes-to-fix-GCC-15.x-buil.patch which breaks the build with gcc <= 9.x:
http_auth.c: In function ‘basic_close’:
http_auth.c:412:25: error: parameter name omitted
void basic_close(struct ci_server_conf *)
--- .../c-icap/0006-Backport-pcre2-support.patch | 569 ++++++++++++++++++ ...ing-_CI_ASSERT-macro-for-pcre2-patch.patch | 50 ++ package/c-icap/c-icap.mk | 9 +- 3 files changed, 624 insertions(+), 4 deletions(-) create mode 100644 package/c-icap/0006-Backport-pcre2-support.patch create mode 100644 package/c-icap/0007-Add-missing-_CI_ASSERT-macro-for-pcre2-patch.patch
package/c-icap/0006-Backport-pcre2-support.patch new file +569 -0
@@ -0,0 +1,569 @@ +From: Boyuan Yang <[email protected]> +Date: Sat, 29 Jul 2023 19:13:16 -0400 +Subject: Backport pcre2 support + +Bug-Debian: https://bugs.debian.org/1000077 +Upstream: https://github.com/c-icap/c-icap-server/commit/888a98ff382d782729f000876b4e81f08d9046d3 + +Downloaded from +https://sources.debian.org/src/c-icap/1%3A0.5.10-7/debian/patches/0005-Backport-pcre2-support.patch + +[Bernd: rebased for 0.5.14] +Signed-off-by: Bernd Kuhls <[email protected]> +--- + Makefile.am | 16 +++- + aserver.c | 2 + + configure.ac | 51 ++++++++++++- + include/ci_regex.h | 43 ++++++++++- + regex.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++++----- + types_ops.c | 4 +- + 6 files changed, 296 insertions(+), 30 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index acfa0d0..ebdf51c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -22,11 +22,23 @@ bin_PROGRAMS = c-icap + + bin_SCRIPTS = c-icap-config c-icap-libicapapi-config + ++UTIL_FLAGS= ++UTIL_LDADD= + UTIL_LIB_SOURCES=net_io.c util.c os/unix/net_io.c os/unix/proc_mutex.c os/unix/shared_mem.c os/unix/threads.c os/unix/utilfunc.c os/unix/dlib.c + if USE_OPENSSL + UTIL_LIB_SOURCES += openssl/net_io_ssl.c + endif ++ + if USE_REGEX ++if USE_PCRE2 ++UTIL_FLAGS += @PCRE2_ADD_FLAG@ ++UTIL_LDADD += @PCRE2_ADD_LDADD@ ++endif ++if USE_PCRE ++UTIL_FLAGS += @PCRE_ADD_FLAG@ ++UTIL_LDADD += @PCRE_ADD_LDADD@ ++endif ++ + UTIL_LIB_SOURCES += regex.c + endif + UTIL_SOURCES=os/unix/proc_utils.c +@@ -50,9 +62,9 @@ c_icap_SOURCES = aserver.c request.c cfg_param.c \ + + + # libicapapi ...... +-libicapapi_la_CFLAGS= $(INVISIBILITY_CFLAG) -I$(srcdir)/include/ -Iinclude/ @ZLIB_ADD_FLAG@ @OPENSSL_ADD_FLAG@ @BZLIB_ADD_FLAG@ @BROTLI_ADD_FLAG@ @ZSTD_ADD_FLAG@ @PCRE_ADD_FLAG@ -DCI_BUILD_LIB ++libicapapi_la_CFLAGS= $(INVISIBILITY_CFLAG) -I$(srcdir)/include/ -Iinclude/ @ZLIB_ADD_FLAG@ @OPENSSL_ADD_FLAG@ @BZLIB_ADD_FLAG@ @BROTLI_ADD_FLAG@ @ZSTD_ADD_FLAG@ $(UTIL_FLAG) -DCI_BUILD_LIB + +-libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @BZLIB_ADD_LDADD@ @BROTLI_ADD_LDADD@ @ZSTD_ADD_LDADD@ @PCRE_ADD_LDADD@ @DL_ADD_FLAG@ @THREADS_LDADD@ @OPENSSL_ADD_LDADD@ ++libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @BZLIB_ADD_LDADD@ @BROTLI_ADD_LDADD@ @ZSTD_ADD_LDADD@ $(UTIL_LDADD) @DL_ADD_FLAG@ @THREADS_LDADD@ @OPENSSL_ADD_LDADD@ + libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@ @LIBS_LDFLAGS@ @THREADS_LDFLAGS@ + + export EXT_PROGRAMS_MKLIB = @ZLIB_LNDIR_LDADD@ @BZLIB_LNDIR_LDADD@ @BROTLI_LNDIR_LDADD@ @ZSTD_LNDIR_LDADD@ @PCRE_LNDIR_LDADD@ @OPENSSL_LNDIR_LDADD@ +diff --git a/aserver.c b/aserver.c +index 9eaa609..990be9d 100644 +--- a/aserver.c ++++ b/aserver.c +@@ -29,6 +29,7 @@ + #endif + #include "txtTemplate.h" + #include "commands.h" ++#include "ci_regex.h" + + /* + extern char *PIDFILE; +@@ -142,6 +143,7 @@ int main(int argc, char **argv) + } + ci_txt_template_init(); + ci_txt_template_set_dir(DATADIR"templates"); ++ ci_regex_memory_init(); + commands_init(); + + if (!(CI_CONF.MAGIC_DB = ci_magic_db_load(CI_CONF.magics_file))) { +diff --git a/configure.ac b/configure.ac +index 2144011..08a937f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -246,6 +246,7 @@ AC_ARG_ENABLE(rpath, + #Routines used for checking libraries + AC_DEFUN([ICFG_STATE_SAVE],[ + #save state ++ICFG_OLD_CPPFLAGS=$CPPFLAGS + ICFG_OLD_CFLAGS=$CFLAGS + ICFG_OLD_LDFLAGS=$LDFLAGS + ICFG_OLD_LIBS=$LIBS +@@ -253,7 +254,8 @@ ICFG_OLD_LIBS=$LIBS + + #Routines used for checking libraries + AC_DEFUN([ICFG_STATE_ROLLBACK],[ +-#save state ++#rollback saved state ++CPPFLAGS=$ICFG_OLD_CPPFLAGS + CFLAGS=$ICFG_OLD_CFLAGS + LDFLAGS=$ICFG_OLD_LDFLAGS + LIBS=$ICFG_OLD_LIBS +@@ -650,6 +652,45 @@ if test a"$libmemcached" != "ano"; then + ICFG_STATE_ROLLBACK + fi + ++# Check for PCRE2 regex library ++AC_ARG_WITH(pcre2, ++[ --with-pcre2 Path to PCRE2 library], ++[ ++case "$withval" in ++ yes) ++ pcre2=yes; ++ ;; ++ no) ++ pcre2=no; ++ ;; ++ *) ++ pcre2=yes; ++ pcre2path=$withval; ++ ;; ++ esac ++], ++[ pcre2=yes] ++) ++ ++if test a"$pcre2" != "ano"; then ++ ICFG_STATE_SAVE(PCRE2) ++ CPPFLAGS="$CPPFLAGS -DPCRE2_CODE_UNIT_WIDTH=8" ++ if test "a$pcre2path" != "a"; then ++ CFLAGS="$CFLAGS -I$pcre2path/include" ++ LDFLAGS="$LDFLAGS -L$pcre2path/lib" ++ fi ++ AC_CHECK_HEADERS(pcre2.h, ++ AC_CHECK_LIB(pcre2-8, pcre2_match_8,[pcre2=yes],[pcre2=no]), ++ [pcre2=no] ++ ) ++ ++ if test "a$pcre2" = "ayes"; then ++ AC_DEFINE(HAVE_PCRE2,1,[Define HAVE_PCRE2 if pcre2 installed]) ++ ICFG_BUILD_FLAGS(PCRE2, "$pcre2path", "-lpcre2-8") ++ fi ++ ICFG_STATE_ROLLBACK ++fi ++ + # Check for PCRE regex library + AC_ARG_WITH(pcre, + [ --with-pcre Path to PCRE library], +@@ -670,7 +711,7 @@ case "$withval" in + [ pcre=yes] + ) + +-if test a"$pcre" != "ano"; then ++if test a"$pcre" != "ano" -a a"$pcre2" != "ayes"; then + ICFG_STATE_SAVE(PCRE) + if test "a$pcrepath" != "a"; then + CFLAGS="$CFLAGS -I$pcrepath/include" +@@ -714,7 +755,7 @@ AC_CHECK_HEADERS(regex.h, + ) + + USE_REGEX=0 +-if test "a$pcre" = "ayes" -o "a$posix_regex" = "ayes"; then ++if test "a$pcre2" = "ayes" -o "a$pcre" = "ayes" -o "a$posix_regex" = "ayes"; then + USE_REGEX=1 + fi + AC_SUBST(USE_REGEX) +@@ -1001,7 +1042,9 @@ AM_CONDITIONAL(ISCYGWIN,[test a"$iscygwin" != a]) + # Now determine which modules will going to build ..... + + AM_CONDITIONAL(USE_OPENSSL, [test a"$openssl" != "ano"]) +-AM_CONDITIONAL(USE_REGEX, [test a"$pcre" = "ayes" -o a"$posix_regex" = "ayes"]) ++AM_CONDITIONAL(USE_PCRE2, [test a"$pcre2" = "ayes"]) ++AM_CONDITIONAL(USE_PCRE, [test a"$pcre" = "ayes"]) ++AM_CONDITIONAL(USE_REGEX, [test a"$pcre2" = "ayes" -o a"$pcre" = "ayes" -o a"$posix_regex" = "ayes"]) + AM_CONDITIONAL(USEPERL,[test a"$perlcore" != a]) + AM_CONDITIONAL(USEBDB, [test a"$libdb" != ano]) + AM_CONDITIONAL(USELDAP, [test a"$libldap" != ano]) +diff --git a/include/ci_regex.h b/include/ci_regex.h +index 27afc9c..df7b77a 100644 +--- a/include/ci_regex.h ++++ b/include/ci_regex.h +@@ -33,18 +33,57 @@ struct ci_regex_match { + size_t s; + size_t e; + }; +-typedef struct ci_regex_match ci_regex_matches_t[10]; ++#define CI_REGEX_SUBMATCHES 10 ++typedef struct ci_regex_match ci_regex_matches_t[CI_REGEX_SUBMATCHES]; + typedef struct ci_regex_replace_part { + const void *user_data; + ci_regex_matches_t matches; + } ci_regex_replace_part_t; + +-#define ci_regex_create_match_list() ci_list_create(32768, sizeof(ci_regex_replace_part_t)) ++/** ++ \brief Builds a regex match list to store regex matches. ++ * The regex match list is a ci_list_t object which stores ci_regex_replace_part ++ * objects as items. ++ \ingroup UTILITY ++ */ ++#define ci_regex_create_match_list() ci_list_create(1024, sizeof(ci_regex_replace_part_t)) ++ ++/** ++ \brief Parses a regex expresion having the form /regex/flags ++ \ingroup UTILITY ++ * ++ */ + CI_DECLARE_FUNC(char *) ci_regex_parse(const char *str, int *flags, int *recursive); ++ ++/** ++ \brief Compiles a regex expresion into an internal form. ++ \param regex_str The regex string normally returned by ci_regex_parse function ++ \param regex_flags The regex flags built using the ci_regex_parse ++ \ingroup UTILITY ++ */ + CI_DECLARE_FUNC(ci_regex_t) ci_regex_build(const char *regex_str, int regex_flags); ++ ++/** ++ * Releases objects built using the ci_regex_build ++ \ingroup UTILITY ++ */ + CI_DECLARE_FUNC(void) ci_regex_free(ci_regex_t regex); ++ ++/** ++ * Matchs a compiled regex expresion of type ci_regex_t against the given string. ++ \param regex The compiled regex expresion ++ \param str The string to match against ++ \param len The str string length. For '\0' terminated strings set it to -1 ++ \param recurs If it is not NULL matches recursivelly ++ \param matches The regex match list to store matches. It can be NULL ++ \param user_data pointer to user data to store with matches in rege match list. ++ \ingroup UTILITY ++ */ + CI_DECLARE_FUNC(int) ci_regex_apply(const ci_regex_t regex, const char *str, int len, int recurs, ci_list_t *matches, const void *user_data); + ++ ++CI_DECLARE_FUNC(void) ci_regex_memory_init(); ++ + #ifdef __cplusplus + } + #endif +diff --git a/regex.c b/regex.c +index 82277df..de9b387 100644 +--- a/regex.c ++++ b/regex.c +@@ -1,14 +1,107 @@ + #include "common.h" + #include "debug.h" + #include "array.h" ++#include "mem.h" + #include "ci_regex.h" + +-#ifdef HAVE_PCRE ++#if defined(HAVE_PCRE2) ++#define PCRE2_CODE_UNIT_WIDTH 8 // TODO: make it configurable via configure ++#include <pcre2.h> ++#elif defined(HAVE_PCRE) + #include <pcre.h> + #else + #include <regex.h> + #endif + ++#if defined(HAVE_PCRE2) ++pcre2_general_context *pcre2GenContext = NULL; ++pcre2_match_context *pcre2MatchContext = NULL; ++ ++void *pcre2_malloc(PCRE2_SIZE size, void *udata) ++{ ++ void *p = ci_buffer_alloc(size); ++ return p; ++} ++ ++void pcre2_free(void *p, void *udata) ++{ ++ ci_buffer_free(p); ++} ++ ++struct { ++ char *name; ++ uint32_t flag; ++} pcre2_flags[] = { ++ {"ANCHORED", 0x80000000u}, ++ {"NO_UTF_CHECK", 0x40000000u}, ++ {"ENDANCHORED", 0x20000000u}, ++ {"ALLOW_EMPTY_CLASS", 0x00000001u}, ++ {"ALT_BSUX", 0x00000002u}, ++ {"AUTO_CALLOUT", 0x00000004u}, ++ {"CASELESS", 0x00000008u}, ++ {"DOLLAR_ENDONLY", 0x00000010u}, ++ {"DOTALL", 0x00000020u}, ++ {"DUPNAMES", 0x00000040u}, ++ {"EXTENDED", 0x00000080u}, ++ {"FIRSTLINE", 0x00000100u}, ++ {"MATCH_UNSET_BACKREF", 0x00000200u}, ++ {"MULTILINE", 0x00000400u}, ++ {"NEVER_UCP", 0x00000800u}, ++ {"NEVER_UTF", 0x00001000u}, ++ {"NO_AUTO_CAPTURE", 0x00002000u}, ++ {"NO_AUTO_POSSESS", 0x00004000u}, ++ {"NO_DOTSTAR_ANCHOR", 0x00008000u}, ++ {"NO_START_OPTIMIZE", 0x00010000u}, ++ {"UCP", 0x00020000u}, ++ {"UNGREEDY", 0x00040000u}, ++ {"UTF", 0x00080000u}, ++ {"NEVER_BACKSLASH_C", 0x00100000u}, ++ {"ALT_CIRCUMFLEX", 0x00200000u}, ++ {"ALT_VERBNAMES", 0x00400000u}, ++ {"USE_OFFSET_LIMIT", 0x00800000u}, ++ {"EXTENDED_MORE", 0x01000000u}, ++ {"LITERAL", 0x02000000u}, ++ {"MATCH_INVALID_UTF", 0x04000000u}, ++ {NULL, 0} ++}; ++ ++int pcre2_flag_parse(const char **f) ++{ ++ const char *s = (*f); ++ if (*s != '<') ++ return 0; ++ s++; ++ const char *e = strchr(s, '>'); ++ if (e) ++ *f = e; ++ else { ++ e = s + strlen(s); ++ *f = e - 1; ++ } ++ size_t len = e - s; ++ e--; ++ if (!len) ++ return 0; ++ ++ int i; ++ for (i = 0; pcre2_flags[i].name != NULL; i++) { ++ if (strncmp(pcre2_flags[i].name, s, len) == 0) ++ return pcre2_flags[i].flag; ++ } ++ return 0; ++} ++ ++#endif ++ ++void ci_regex_memory_init() ++{ ++#if defined(HAVE_PCRE2) ++ pcre2GenContext = pcre2_general_context_create(pcre2_malloc, pcre2_free, NULL); ++ pcre2MatchContext = pcre2_match_context_create(pcre2GenContext); ++#endif ++} ++ ++ + + char *ci_regex_parse(const char *str, int *flags, int *recursive) + { +@@ -29,7 +122,10 @@ char *ci_regex_parse(const char *str, int *flags, int *recursive) + s[slen] = '\0'; + + *flags = 0; +-#ifdef HAVE_PCRE ++#if defined(HAVE_PCRE2) ++ *flags |= PCRE2_NEWLINE_ANY; ++ *flags |= PCRE2_NEWLINE_ANYCRLF; ++#elif defined(HAVE_PCRE) + *flags |= PCRE_NEWLINE_ANY; + *flags |= PCRE_NEWLINE_ANYCRLF; + #else +@@ -38,7 +134,27 @@ char *ci_regex_parse(const char *str, int *flags, int *recursive) + #endif + + while (*e != '\0') { +-#ifdef HAVE_PCRE ++#if defined(HAVE_PCRE2) ++ if (*e == 'i') ++ *flags = *flags | PCRE2_CASELESS; ++ else if (*e == 'm') ++ *flags |= PCRE2_MULTILINE; ++ else if (*e == 's') ++ *flags |= PCRE2_DOTALL; ++ else if (*e == 'x') ++ *flags |= PCRE2_EXTENDED; ++ else if (*e == 'A') ++ *flags |= PCRE2_ANCHORED; ++ else if (*e == 'D') ++ *flags |= PCRE2_DOLLAR_ENDONLY; ++ else if (*e == 'U') ++ *flags |= PCRE2_UNGREEDY; ++ else if (*e == 'u') ++ *flags |= PCRE2_UTF | PCRE2_UCP; ++ else if (*e == '<') { ++ *flags |= pcre2_flag_parse(&e); ++ } ++#elif defined(HAVE_PCRE) + if (*e == 'i') + *flags = *flags | PCRE_CASELESS; + else if (*e == 'm') +@@ -74,7 +190,19 @@ char *ci_regex_parse(const char *str, int *flags, int *recursive) + + ci_regex_t ci_regex_build(const char *regex_str, int regex_flags) + { +-#ifdef HAVE_PCRE ++#if defined(HAVE_PCRE2) ++ pcre2_code *re; ++ int errcode; ++ PCRE2_SIZE erroffset; ++ re = pcre2_compile((PCRE2_SPTR)regex_str, PCRE2_ZERO_TERMINATED, (uint32_t)regex_flags, &errcode, &erroffset, NULL); ++ if (re == NULL) { ++ PCRE2_UCHAR errbuf[256]; ++ pcre2_get_error_message(errcode, errbuf, sizeof(errbuf)); ++ ci_debug_printf(2, "PCRE2 compilation of '%s' failed at offset %d: %s\n", regex_str, (int)erroffset, errbuf); ++ return NULL; ++ } ++ return (ci_regex_t)re; ++#elif defined(HAVE_PCRE) + pcre *re; + const char *error; + int erroffset; +@@ -103,7 +231,9 @@ ci_regex_t ci_regex_build(const char *regex_str, int regex_flags) + + void ci_regex_free(ci_regex_t regex) + { +-#ifdef HAVE_PCRE ++#if defined(HAVE_PCRE2) ++ pcre2_code_free((pcre2_code *)regex); ++#elif defined(HAVE_PCRE) + pcre_free((pcre *)regex); + #else + regfree((regex_t *)regex); +@@ -112,7 +242,7 @@ void ci_regex_free(ci_regex_t regex) + } + + #ifdef HAVE_PCRE +-#define OVECCOUNT 30 /* should be a multiple of 3 */ ++#define OVECCOUNT (3*CI_REGEX_SUBMATCHES) /* should be a multiple of 3 */ + #endif + + int ci_regex_apply(const ci_regex_t regex, const char *str, int len, int recurs, ci_list_t *matches, const void *user_data) +@@ -120,14 +250,42 @@ int ci_regex_apply(const ci_regex_t regex, const char *str, int len, int recurs, + int count = 0, i; + ci_regex_replace_part_t parts; + +- if (!str) ++ if (!str || len == 0) + return 0; + +-#ifdef HAVE_PCRE ++#if defined(HAVE_PCRE2) ++ PCRE2_SIZE offset = 0; ++ pcre2_match_data *match_data = pcre2_match_data_create_from_pattern(regex, pcre2GenContext); ++ do { ++ int str_length = len > 0 ? len : PCRE2_ZERO_TERMINATED; ++ int rcaptures = pcre2_match(regex, (PCRE2_SPTR)str, str_length, offset, 0, match_data, pcre2MatchContext); ++ if (rcaptures >= 0) ++ count++; ++ if (rcaptures > 0 && matches) { ++ PCRE2_SIZE *ovector = pcre2_get_ovector_pointer(match_data); ++ for (i = 0; i < rcaptures && i < CI_REGEX_SUBMATCHES; i++) { ++ _CI_ASSERT(ovector[2*i+1] >= ovector[2*i]); ++ if (matches) { ++ parts.user_data = user_data; ++ memset(parts.matches, 0, sizeof(ci_regex_matches_t)); ++ ci_debug_printf(9, "\t sub-match pattern (pos:%d-%d): '%.*s'\n", (int)ovector[2*i], (int)ovector[2*i+1], (int)(ovector[2*i + 1] - ovector[2*i]), str+ovector[2*i]); ++ parts.matches[i].s = ovector[2*i]; ++ parts.matches[i].e = ovector[2*i+1]; ++ } ++ ci_list_push_back(matches, (void *)&parts); ++ } ++ offset = ovector[1]; /*Assert that it is less than strlen(str)?*/ ++ } else if (rcaptures < 0) { ++ /* maybe check and report the exact error?*/ ++ offset = 0; ++ } /* the rcaptures==0 not possible for our case, but maybe check and warn?*/ ++ } while (recurs && offset > 0); ++ pcre2_match_data_free(match_data); ++#elif defined(HAVE_PCRE) + int ovector[OVECCOUNT]; + int rc; + int offset = 0; +- int str_length = len >=0 ? len : strlen(str); ++ int str_length = len > 0 ? len : strlen(str); + do { + memset(ovector, 0, sizeof(ovector)); + rc = pcre_exec(regex, NULL, str, str_length, offset, 0, ovector, OVECCOUNT); +@@ -139,7 +297,7 @@ int ci_regex_apply(const ci_regex_t regex, const char *str, int len, int recurs, + if (matches) { + parts.user_data = user_data; + memset(parts.matches, 0, sizeof(ci_regex_matches_t)); +- for (i = 0; i < 10 && ovector[2*i+1] > ovector[2*i]; ++i) { ++ for (i = 0; i < CI_REGEX_SUBMATCHES && ovector[2*i+1] > ovector[2*i]; ++i) { + ci_debug_printf(9, "\t sub-match pattern (pos:%d-%d): '%.*s'\n", ovector[2*i], ovector[2*i+1], ovector[2*i + 1] - ovector[2*i], str+ovector[2*i]); + parts.matches[i].s = ovector[2*i]; + parts.matches[i].e = ovector[2*i+1]; +@@ -151,17 +309,27 @@ int ci_regex_apply(const ci_regex_t regex, const char *str, int len, int recurs, + + #else + int retcode; +- regmatch_t pmatch[10]; ++ regmatch_t pmatch[CI_REGEX_SUBMATCHES]; ++ char *tmpS = NULL; ++ const char *s; ++ if (len > 0 && len < strlen(str)) { ++ tmpS = ci_buffer_alloc(len + 1); ++ _CI_ASSERT(tmpS); ++ memcpy(tmpS, str, len); ++ tmpS[len] = '\0'; ++ s = tmpS; ++ } else ++ s = str; + do { +- if ((retcode = regexec(regex, str, 10, pmatch, 0)) == 0) { ++ if ((retcode = regexec(regex, s, CI_REGEX_SUBMATCHES, pmatch, 0)) == 0) { + ++count; +- ci_debug_printf(9, "Match pattern (pos:%d-%d): '%.*s'\n", pmatch[0].rm_so, pmatch[0].rm_eo, pmatch[0].rm_eo - pmatch[0].rm_so, str+pmatch[0].rm_so); ++ ci_debug_printf(9, "Match pattern (pos:%d-%d): '%.*s'\n", pmatch[0].rm_so, pmatch[0].rm_eo, pmatch[0].rm_eo - pmatch[0].rm_so, s+pmatch[0].rm_so); + + if (matches) { + parts.user_data = user_data; + memset(parts.matches, 0, sizeof(ci_regex_matches_t)); +- for (i = 0; i < 10 && pmatch[i].rm_eo > pmatch[i].rm_so; ++i) { +- ci_debug_printf(9, "\t sub-match pattern (pos:%d-%d): '%.*s'\n", pmatch[i].rm_so, pmatch[i].rm_eo, pmatch[i].rm_eo - pmatch[i].rm_so, str+pmatch[i].rm_so); ++ for (i = 0; i < CI_REGEX_SUBMATCHES && pmatch[i].rm_eo > pmatch[i].rm_so; ++i) { ++ ci_debug_printf(9, "\t sub-match pattern (pos:%d-%d): '%.*s'\n", pmatch[i].rm_so, pmatch[i].rm_eo, pmatch[i].rm_eo - pmatch[i].rm_so, s+pmatch[i].rm_so); + parts.matches[i].s = pmatch[i].rm_so; + parts.matches[i].e = pmatch[i].rm_eo; + } +@@ -169,14 +337,16 @@ int ci_regex_apply(const ci_regex_t regex, const char *str, int len, int recurs, + } + + if (pmatch[0].rm_so >= 0 && pmatch[0].rm_eo >= 0 && pmatch[0].rm_so != pmatch[0].rm_eo) { +- str += pmatch[0].rm_eo; +- ci_debug_printf(8, "I will check again starting from: %s\n", str); ++ s += pmatch[0].rm_eo; ++ ci_debug_printf(8, "I will check again starting from: %s\n", s); + } else /*stop here*/ +- str = NULL; ++ s = NULL; + } +- } while (recurs && str && *str != '\0' && retcode == 0); ++ } while (recurs && s && *s != '\0' && retcode == 0); ++ if (tmpS) ++ ci_buffer_free(tmpS); + #endif + +- ci_debug_printf(5, "ci_regex_apply matches count: %d\n", count); ++ ci_debug_printf(5, "ci_regex_apply string '%s' matches count: %d\n", str, count); + return count; + } +diff --git a/types_ops.c b/types_ops.c +index 78798c6..1310d4b 100644 +--- a/types_ops.c ++++ b/types_ops.c +@@ -273,7 +273,7 @@ int regex_cmp(const void *key1, const void *key2) + struct ci_acl_regex *reg = (struct ci_acl_regex *)key1; + if (!key2) + return -1; +- return (ci_regex_apply(reg->preg, (const char *)key2, strlen(key2), 0, NULL, NULL) == 0 ? 1 : 0); ++ return (ci_regex_apply(reg->preg, (const char *)key2, -1, 0, NULL, NULL) == 0 ? 1 : 0); + } + + int regex_equal(const void *key1, const void *key2) +@@ -281,7 +281,7 @@ int regex_equal(const void *key1, const void *key2) + struct ci_acl_regex *reg = (struct ci_acl_regex *)key1; + if (!key2) + return 0; +- return ci_regex_apply(reg->preg, (const char *)key2, strlen(key2), 0, NULL, NULL) != 0; ++ return ci_regex_apply(reg->preg, (const char *)key2, -1, 0, NULL, NULL) != 0; + } + + size_t regex_len(const void *key)
package/c-icap/0007-Add-missing-_CI_ASSERT-macro-for-pcre2-patch.patch new file +50 -0
50 lines not on this page · raw message
package/c-icap/c-icap.mk +5 -4
@@ -13,6 +13,7 @@ C_ICAP_CPE_ID_VALID = YES C_ICAP_INSTALL_STAGING = YES C_ICAP_CONFIG_SCRIPTS = c-icap-config c-icap-libicapapi-config C_ICAP_CONF_OPTS = \ + --without-pcre \ --without-perl \ --without-zstd \ --enable-large-files \
@@ -63,11 +64,11 @@ else C_ICAP_CONF_OPTS += --without-openssl endif -ifeq ($(BR2_PACKAGE_PCRE),y) -C_ICAP_CONF_OPTS += --with-pcre -C_ICAP_DEPENDENCIES += pcre +ifeq ($(BR2_PACKAGE_PCRE2),y) +C_ICAP_CONF_OPTS += --with-pcre2 +C_ICAP_DEPENDENCIES += pcre2 else -C_ICAP_CONF_OPTS += --without-pcre +C_ICAP_CONF_OPTS += --without-pcre2 endif ifeq ($(BR2_PACKAGE_ZLIB),y)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 6/20 package/brltty: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/brltty/brltty.mk | 3 --- 1 file changed, 3 deletions(-)
package/brltty/brltty.mk +0 -3
@@ -95,9 +95,6 @@ endif ifeq ($(BR2_PACKAGE_PCRE2_32),y) BRLTTY_DEPENDENCIES += pcre2 BRLTTY_CONF_OPTS += --with-rgx-package -else ifeq ($(BR2_PACKAGE_PCRE_32),y) -BRLTTY_DEPENDENCIES += pcre -BRLTTY_CONF_OPTS += --with-rgx-package else BRLTTY_CONF_OPTS += --without-rgx-package endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 7/20 package/haproxy: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/haproxy/haproxy.mk | 5 ----- 1 file changed, 5 deletions(-)
package/haproxy/haproxy.mk +0 -5
@@ -59,11 +59,6 @@ HAPROXY_DEPENDENCIES += pcre2 HAPROXY_MAKE_OPTS += \ PCRE2_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config \ USE_PCRE2=1 -else ifeq ($(BR2_PACKAGE_PCRE),y) -HAPROXY_DEPENDENCIES += pcre -HAPROXY_MAKE_OPTS += \ - PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config \ - USE_PCRE=1 endif ifeq ($(BR2_PACKAGE_SYSTEMD),y)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 8/20 package/kismet: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/kismet/kismet.mk | 3 --- 1 file changed, 3 deletions(-)
package/kismet/kismet.mk +0 -3
@@ -74,9 +74,6 @@ endif ifeq ($(BR2_PACKAGE_PCRE2),y) KISMET_DEPENDENCIES += pcre2 KISMET_CONF_OPTS += --enable-pcre --enable-require-pcre2 -else ifeq ($(BR2_PACKAGE_PCRE),y) -KISMET_DEPENDENCIES += pcre -KISMET_CONF_OPTS += --enable-pcre --disable-require-pcre2 else KISMET_CONF_OPTS += --disable-pcre endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 9/20 package/pound: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/pound/pound.mk | 3 --- 1 file changed, 3 deletions(-)
package/pound/pound.mk +0 -3
@@ -19,9 +19,6 @@ POUND_CONF_OPTS += --enable-pcre=2 POUND_CONF_ENV += \ ac_cv_path_PCRE2_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config POUND_DEPENDENCIES += pcre2 -else ifeq ($(BR2_PACKAGE_PCRE),y) -POUND_CONF_OPTS += --enable-pcre=1 -POUND_DEPENDENCIES += pcre else POUND_CONF_OPTS += --disable-pcre endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 10/20 package/sngrep: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/sngrep/sngrep.mk | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
package/sngrep/sngrep.mk +3 -6
@@ -16,7 +16,7 @@ SNGREP_DEPENDENCIES = libpcap ncurses host-pkgconf SNGREP_CONF_ENV += \ $(if $(BR2_STATIC_LIBS),LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --libs`") -SNGREP_CONF_OPTS += --disable-unicode +SNGREP_CONF_OPTS += --without-pcre --disable-unicode # openssl and gnutls can't be enabled at the same time. ifeq ($(BR2_PACKAGE_OPENSSL),y)
@@ -33,12 +33,9 @@ endif ifeq ($(BR2_PACKAGE_PCRE2),y) SNGREP_DEPENDENCIES += pcre2 -SNGREP_CONF_OPTS += --without-pcre --with-pcre2 -else ifeq ($(BR2_PACKAGE_PCRE),y) -SNGREP_DEPENDENCIES += pcre -SNGREP_CONF_OPTS += --with-pcre --without-pcre2 +SNGREP_CONF_OPTS += --with-pcre2 else -SNGREP_CONF_OPTS += --without-pcre --without-pcre2 +SNGREP_CONF_OPTS += --without-pcre2 endif ifeq ($(BR2_PACKAGE_ZLIB),y)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 11/20 package/tvheadend: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/tvheadend/tvheadend.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
package/tvheadend/tvheadend.mk +4 -6
@@ -15,7 +15,8 @@ TVHEADEND_DEPENDENCIES = \ host-python3 \ openssl TVHEADEND_CONF_OPTS = \ - --disable-omx + --disable-omx \ + --disable-pcre ifeq ($(BR2_PACKAGE_AVAHI),y) TVHEADEND_DEPENDENCIES += avahi
@@ -125,12 +126,9 @@ endif ifeq ($(BR2_PACKAGE_PCRE2),y) TVHEADEND_DEPENDENCIES += pcre2 -TVHEADEND_CONF_OPTS += --disable-pcre --enable-pcre2 -else ifeq ($(BR2_PACKAGE_PCRE),y) -TVHEADEND_DEPENDENCIES += pcre -TVHEADEND_CONF_OPTS += --enable-pcre --disable-pcre2 +TVHEADEND_CONF_OPTS += --enable-pcre2 else -TVHEADEND_CONF_OPTS += --disable-pcre --disable-pcre2 +TVHEADEND_CONF_OPTS += --disable-pcre2 endif ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 12/20 package/wget: remove optional support for pcre, keep pcre2
In reply to Bernd Kuhls--- package/wget/wget.mk | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
package/wget/wget.mk +4 -5
@@ -12,6 +12,8 @@ WGET_LICENSE = GPL-3.0+ WGET_LICENSE_FILES = COPYING WGET_CPE_ID_VENDOR = gnu +WGET_CONF_OPTS += --disable-pcre + ifeq ($(BR2_PACKAGE_LIBPSL),y) WGET_CONF_OPTS += --with-libpsl WGET_DEPENDENCIES += libpsl
@@ -63,13 +65,10 @@ WGET_CONF_OPTS += --without-cares endif ifeq ($(BR2_PACKAGE_PCRE2),y) -WGET_CONF_OPTS += --disable-pcre --enable-pcre2 +WGET_CONF_OPTS += --enable-pcre2 WGET_DEPENDENCIES += pcre2 -else ifeq ($(BR2_PACKAGE_PCRE),y) -WGET_CONF_OPTS += --enable-pcre --disable-pcre2 -WGET_DEPENDENCIES += pcre else -WGET_CONF_OPTS += --disable-pcre --disable-pcre2 +WGET_CONF_OPTS += --disable-pcre2 endif $(eval $(autotools-package))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 13/20 package/aircrack-ng: switch to pcre2
In reply to Bernd KuhlsAdded two upstream commits to support pcre2 and switch the package from pcre to pcre2.
--- .../0001-autotools-add-PCRE2-detection.patch | 102 +++++++++++++ ...icate-if-PCRE-or-PCRE2-is-being-used.patch | 142 ++++++++++++++++++ package/aircrack-ng/aircrack-ng.mk | 2 +- 3 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 package/aircrack-ng/0001-autotools-add-PCRE2-detection.patch create mode 100644 package/aircrack-ng/0002-autotools-indicate-if-PCRE-or-PCRE2-is-being-used.patch
package/aircrack-ng/0001-autotools-add-PCRE2-detection.patch new file +102 -0
@@ -0,0 +1,102 @@ +From 6b05dc10cdcf45d50bc8f9dd74667a3ff399a059 Mon Sep 17 00:00:00 2001 +From: Andras Gemes <[email protected]> +Date: Fri, 20 Jan 2023 14:52:12 +0100 +Subject: [PATCH] autotools: add PCRE2 detection + +Upstream: https://github.com/aircrack-ng/aircrack-ng/commit/6b05dc10cdcf45d50bc8f9dd74667a3ff399a059 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + build/m4/aircrack_ng_pcre2.m4 | 61 +++++++++++++++++++++++++++++++++++ + configure.ac | 2 ++ + 2 files changed, 63 insertions(+) + create mode 100644 build/m4/aircrack_ng_pcre2.m4 + +diff --git a/build/m4/aircrack_ng_pcre2.m4 b/build/m4/aircrack_ng_pcre2.m4 +new file mode 100644 +index 0000000000..f61c0f656d +--- /dev/null ++++ b/build/m4/aircrack_ng_pcre2.m4 +@@ -0,0 +1,61 @@ ++dnl Aircrack-ng ++dnl ++dnl Copyright (C) 2023 Andras Gemes <[email protected]> ++dnl ++dnl Autotool support was written by: Joseph Benden <[email protected]> ++dnl ++dnl This program is free software; you can redistribute it and/or modify ++dnl it under the terms of the GNU General Public License as published by ++dnl the Free Software Foundation; either version 2 of the License, or ++dnl (at your option) any later version. ++dnl ++dnl This program is distributed in the hope that it will be useful, ++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of ++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++dnl GNU General Public License for more details. ++dnl ++dnl You should have received a copy of the GNU General Public License ++dnl along with this program; if not, write to the Free Software ++dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++dnl ++dnl In addition, as a special exception, the copyright holders give ++dnl permission to link the code of portions of this program with the ++dnl OpenSSL library under certain conditions as described in each ++dnl individual source file, and distribute linked combinations ++dnl including the two. ++dnl ++dnl You must obey the GNU General Public License in all respects ++dnl for all of the code used other than OpenSSL. ++dnl ++dnl If you modify file(s) with this exception, you may extend this ++dnl exception to your dnl version of the file(s), but you are not obligated ++dnl to do so. ++dnl ++dnl If you dnl do not wish to do so, delete this exception statement from your ++dnl version. ++dnl ++dnl If you delete this exception statement from all source files in the ++dnl program, then also delete it here. ++ ++AC_DEFUN([AIRCRACK_NG_PCRE2], [ ++AC_ARG_ENABLE(static-pcre2, ++ AS_HELP_STRING([--enable-static-pcre2], ++ [Enable statically linked PCRE2 libpcre2-8.]), ++ [static_pcre2=$enableval], [static_pcre2=no]) ++ ++if test "x$static_pcre2" != "xno"; then ++ AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT]) ++ AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version) ++ if test "x$PCRE2_FOUND" = xyes; then ++ HAVE_PCRE2=yes ++ else ++ HAVE_PCRE2=no ++ fi ++else ++ PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no) ++fi ++ ++AS_IF([test "x$HAVE_PCRE2" = "xyes"], [ ++ AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system]) ++]) ++]) +\ No newline at end of file +diff --git a/configure.ac b/configure.ac +index 06aca4e466..6d8e0e5677 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -143,6 +143,7 @@ AIRCRACK_NG_EXT_SCRIPTS + AIRCRACK_NG_HWLOC + AIRCRACK_NG_PCAP + AIRCRACK_NG_PCRE ++AIRCRACK_NG_PCRE2 + AIRCRACK_NG_RFKILL + AIRCRACK_NG_SQLITE + AIRCRACK_NG_ZLIB +@@ -319,6 +320,7 @@ ${PACKAGE} ${VERSION} + Jemalloc: ${JEMALLOC} + Pcap: ${PCAP_FOUND} + Pcre: ${HAVE_PCRE} ++ Pcre2: ${HAVE_PCRE2} + Sqlite: ${HAVE_SQLITE3} + Tcmalloc: ${TCMALLOC} + Zlib: ${HAVE_ZLIB}
package/aircrack-ng/0002-autotools-indicate-if-PCRE-or-PCRE2-is-being-used.patch new file +142 -0
142 lines not on this page · raw message
package/aircrack-ng/aircrack-ng.mk +1 -1
@@ -13,7 +13,7 @@ AIRCRACK_NG_DEPENDENCIES = \ $(if $(BR2_PACKAGE_CMOCKA),cmocka) \ $(if $(BR2_PACKAGE_LIBNL),libnl) \ $(if $(BR2_PACKAGE_OPENSSL),openssl) \ - $(if $(BR2_PACKAGE_PCRE),pcre) \ + $(if $(BR2_PACKAGE_PCRE2),pcre2) \ $(if $(BR2_PACKAGE_ZLIB),zlib) \ host-pkgconf AIRCRACK_NG_AUTORECONF = YES
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 14/20 package/freeradius-server: switch to pcre2
In reply to Bernd KuhlsUpstream added support for pcre2 with commit
https://github.com/FreeRADIUS/freeradius-server/commit/430ed115ca58b0b99f6ea372d4e32b573aa5d0fd
with version 3.2.8 which was added to buildroot with commit 747fed73f985b8972052cc8111707279079e4aaa.
--- package/freeradius-server/freeradius-server.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/freeradius-server/freeradius-server.mk +2 -2
@@ -158,9 +158,9 @@ else FREERADIUS_SERVER_CONF_OPTS += --without-rlm_sql_mysql endif -ifeq ($(BR2_PACKAGE_PCRE),y) +ifeq ($(BR2_PACKAGE_PCRE2),y) FREERADIUS_SERVER_CONF_OPTS += --with-pcre -FREERADIUS_SERVER_DEPENDENCIES += pcre +FREERADIUS_SERVER_DEPENDENCIES += pcre2 else FREERADIUS_SERVER_CONF_OPTS += --without-pcre endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 15/20 package/freeswitch: switch to pcre2
In reply to Bernd KuhlsAdded patch 0006 which replaces the usage of pcre in favour of pcre2, this is a rebased version of upstream commits used by OpenWRT:
https://github.com/openwrt/telephony/commit/75acd1cdc29740a47454212cd48755b9abbd7a12
Added patch 0005 which is a prerequisite for patch 0006, also used by OpenWRT.
Added patch 0007 which fixes a runtime crash caused by patch 0006.
Added Upstream: tag to patch 0001.
--- .checkpackageignore | 1 - ...-hash-hmac_ossl.c-fix-build-with-lib.patch | 2 + ...mory-leak-by-correctly-freeing-regex.patch | 34 + .../0006-Move-project-to-PCRE2.patch | 1813 +++++++++++++++++ ...x-double-free-after-upgrade-to-pcre2.patch | 27 + package/freeswitch/Config.in | 2 +- package/freeswitch/freeswitch.mk | 5 +- 7 files changed, 1881 insertions(+), 3 deletions(-) create mode 100644 package/freeswitch/0005-Fix-memory-leak-by-correctly-freeing-regex.patch create mode 100644 package/freeswitch/0006-Move-project-to-PCRE2.patch create mode 100644 package/freeswitch/0007-Fix-double-free-after-upgrade-to-pcre2.patch
.checkpackageignore +0 -1
@@ -354,7 +354,6 @@ package/freescale-imx/imx-uuc/S80imx-uuc Shellcheck lib_sysv.Indent lib_sysv.Var package/freescale-imx/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch lib_patch.Upstream package/freescale-imx/imx-vpu-hantro/0002-Fix-build-with-uclibc-toolchain.patch lib_patch.Upstream package/freescale-imx/imx-vpu-hantro/0003-Fix-Linux-kernel-version-header.patch lib_patch.Upstream -package/freeswitch/0001-libs-srtp-crypto-hash-hmac_ossl.c-fix-build-with-lib.patch lib_patch.Upstream package/frr/S50frr Shellcheck package/fstrcmp/0001-disable-rpath.patch lib_patch.Upstream package/ftop/0001-overflow.patch lib_patch.Upstream
package/freeswitch/0001-libs-srtp-crypto-hash-hmac_ossl.c-fix-build-with-lib.patch +2 -0
@@ -25,6 +25,8 @@ crypto/hash/hmac_ossl.c:133:40: error: invalid application of 'sizeof' to incomp Fixes: - http://autobuild.buildroot.org/results/e696ead9ffffa5bb80928d75607bfbb9b263d3c6 +Upstream: https://github.com/signalwire/freeswitch/pull/1654 + Signed-off-by: Fabrice Fontaine <[email protected]> --- libs/srtp/crypto/hash/hmac_ossl.c | 6 ++++--
package/freeswitch/0005-Fix-memory-leak-by-correctly-freeing-regex.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 12b47fe7f91b93ba9cec90676e62c6239a097c98 Mon Sep 17 00:00:00 2001 +From: Christian Marangi <[email protected]> +Date: Fri, 3 Nov 2023 17:27:06 +0100 +Subject: [PATCH] [mod_verto] Fix memory leak by correctly freeing regex + +For mod_verto regex was never freed and was actually leaking memory. +Correctly free the compiled regex to fix the memory leak. + +Signed-off-by: Christian Marangi <[email protected]> + +Upstream: https://github.com/signalwire/freeswitch/commit/12b47fe7f91b93ba9cec90676e62c6239a097c98 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + src/mod/endpoints/mod_verto/mod_verto.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c +index 48c40527b56..36aba6db5e2 100644 +--- a/src/mod/endpoints/mod_verto/mod_verto.c ++++ b/src/mod/endpoints/mod_verto/mod_verto.c +@@ -1893,10 +1893,12 @@ static void http_run(jsock_t *jsock) + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, + "%d request [%s] matched expr [%s]\n", proceed, request->uri, expression); + request->uri = rule->value; ++ switch_regex_safe_free(re); + break; + } + + rule = rule->next; ++ switch_regex_safe_free(re); + } + } +
package/freeswitch/0006-Move-project-to-PCRE2.patch new file +1813 -0
1,813 lines not on this page · raw message
package/freeswitch/0007-Fix-double-free-after-upgrade-to-pcre2.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 02549c10d9155d0f71f36289aeeddc9c73a4d46e Mon Sep 17 00:00:00 2001 +From: Andrey Volk <[email protected]> +Date: Thu, 13 Nov 2025 17:42:04 +0300 +Subject: [PATCH] [mod_dialplan_xml] Fix double free after upgrade to pcre2. + (#2946) + +Upstream: https://github.com/signalwire/freeswitch/commit/02549c10d9155d0f71f36289aeeddc9c73a4d46e + +[backported only second part of upstream commit, the first part is + already included in patch 0006] +Signed-off-by: Bernd Kuhls <[email protected]> +--- + src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c +index 3d3fdfd8a93..cab522887c4 100644 +--- a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c ++++ b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c +@@ -357,6 +357,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t * + save_proceed = proceed; + + re = NULL; ++ match_data = NULL; + } + + switch_regex_and_match_data_safe_free(re, match_data);
package/freeswitch/Config.in +1 -1
@@ -10,7 +10,7 @@ config BR2_PACKAGE_FREESWITCH select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_JPEG select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE2 select BR2_PACKAGE_SOFIA_SIP select BR2_PACKAGE_SPANDSP select BR2_PACKAGE_SPEEX
package/freeswitch/freeswitch.mk +4 -1
@@ -19,6 +19,9 @@ FREESWITCH_LICENSE_FILES = \ libs/apr/LICENSE \ libs/srtp/LICENSE +# 0006-Move-project-to-PCRE2.patch +FREESWITCH_AUTORECONF = YES + FREESWITCH_CPE_ID_VENDOR = freeswitch # required dependencies
@@ -27,7 +30,7 @@ FREESWITCH_DEPENDENCIES = \ jpeg \ libcurl \ openssl \ - pcre \ + pcre2 \ spandsp \ sofia-sip \ speex \
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 16/20 package/kodi: switch to pcre2
In reply to Bernd Kuhls--- .../0003-RegExp-remove-unused-methods.patch | 127 +++++ .../0004-Introduce-PCRE2-dependency.patch | 192 +++++++ ...igrate-PCRE-to-PCRE2-and-remove-PCRE.patch | 486 ++++++++++++++++++ package/kodi/Config.in | 3 +- package/kodi/kodi.mk | 2 +- 5 files changed, 807 insertions(+), 3 deletions(-) create mode 100644 package/kodi/0003-RegExp-remove-unused-methods.patch create mode 100644 package/kodi/0004-Introduce-PCRE2-dependency.patch create mode 100644 package/kodi/0005-Migrate-PCRE-to-PCRE2-and-remove-PCRE.patch
package/kodi/0003-RegExp-remove-unused-methods.patch new file +127 -0
@@ -0,0 +1,127 @@ +From 4dd017b2eae39356cda0d96a2f5743dbb8ccf299 Mon Sep 17 00:00:00 2001 +From: fuzzard <[email protected]> +Date: Sun, 2 Jun 2024 12:13:01 +1000 +Subject: [PATCH] RegExp remove unused methods + +Upstream: https://github.com/xbmc/xbmc/commit/5df2e57368cf5867f588d00a503eb624e5121460 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + xbmc/utils/RegExp.cpp | 30 ------------------------------ + xbmc/utils/RegExp.h | 5 ----- + xbmc/utils/test/TestRegExp.cpp | 17 ----------------- + 3 files changed, 52 deletions(-) + +diff --git a/xbmc/utils/RegExp.cpp b/xbmc/utils/RegExp.cpp +index 9667b646a9..40263a28eb 100644 +--- a/xbmc/utils/RegExp.cpp ++++ b/xbmc/utils/RegExp.cpp +@@ -485,11 +485,6 @@ int CRegExp::GetSubStart(int iSub) const + return m_iOvector[iSub*2] + m_offset; + } + +-int CRegExp::GetSubStart(const std::string& subName) const +-{ +- return GetSubStart(GetNamedSubPatternNumber(subName.c_str())); +-} +- + int CRegExp::GetSubLength(int iSub) const + { + if (!IsValidSubNumber(iSub)) +@@ -498,11 +493,6 @@ int CRegExp::GetSubLength(int iSub) const + return m_iOvector[(iSub*2)+1] - m_iOvector[(iSub*2)]; + } + +-int CRegExp::GetSubLength(const std::string& subName) const +-{ +- return GetSubLength(GetNamedSubPatternNumber(subName.c_str())); +-} +- + std::string CRegExp::GetMatch(int iSub /* = 0 */) const + { + if (!IsValidSubNumber(iSub)) +@@ -516,26 +506,6 @@ std::string CRegExp::GetMatch(int iSub /* = 0 */) const + return m_subject.substr(pos, len); + } + +-std::string CRegExp::GetMatch(const std::string& subName) const +-{ +- return GetMatch(GetNamedSubPatternNumber(subName.c_str())); +-} +- +-bool CRegExp::GetNamedSubPattern(const char* strName, std::string& strMatch) const +-{ +- strMatch.clear(); +- int iSub = pcre_get_stringnumber(m_re, strName); +- if (!IsValidSubNumber(iSub)) +- return false; +- strMatch = GetMatch(iSub); +- return true; +-} +- +-int CRegExp::GetNamedSubPatternNumber(const char* strName) const +-{ +- return pcre_get_stringnumber(m_re, strName); +-} +- + void CRegExp::DumpOvector(int iLog /* = LOGDEBUG */) + { + if (iLog < LOGDEBUG || iLog > LOGNONE) +diff --git a/xbmc/utils/RegExp.h b/xbmc/utils/RegExp.h +index 53f6019a8f..feea89cd0d 100644 +--- a/xbmc/utils/RegExp.h ++++ b/xbmc/utils/RegExp.h +@@ -111,15 +111,10 @@ public: + }; + int GetSubCount() const { return m_iMatchCount - 1; } // PCRE returns the number of sub-patterns + 1 + int GetSubStart(int iSub) const; +- int GetSubStart(const std::string& subName) const; + int GetSubLength(int iSub) const; +- int GetSubLength(const std::string& subName) const; + int GetCaptureTotal() const; + std::string GetMatch(int iSub = 0) const; +- std::string GetMatch(const std::string& subName) const; + const std::string& GetPattern() const { return m_pattern; } +- bool GetNamedSubPattern(const char* strName, std::string& strMatch) const; +- int GetNamedSubPatternNumber(const char* strName) const; + void DumpOvector(int iLog); + /** + * Check is RegExp object is ready for matching +diff --git a/xbmc/utils/test/TestRegExp.cpp b/xbmc/utils/test/TestRegExp.cpp +index d757127417..9435a46aa4 100644 +--- a/xbmc/utils/test/TestRegExp.cpp ++++ b/xbmc/utils/test/TestRegExp.cpp +@@ -96,19 +96,6 @@ TEST(TestRegExp, GetPattern) + EXPECT_STREQ("^(Test)\\s*(.*)\\.", regex.GetPattern().c_str()); + } + +-TEST(TestRegExp, GetNamedSubPattern) +-{ +- CRegExp regex; +- std::string match; +- +- EXPECT_TRUE(regex.RegComp("^(?<first>Test)\\s*(?<second>.*)\\.")); +- EXPECT_EQ(0, regex.RegFind("Test string.")); +- EXPECT_TRUE(regex.GetNamedSubPattern("first", match)); +- EXPECT_STREQ("Test", match.c_str()); +- EXPECT_TRUE(regex.GetNamedSubPattern("second", match)); +- EXPECT_STREQ("string", match.c_str()); +-} +- + TEST(TestRegExp, operatorEqual) + { + CRegExp regex, regexcopy; +@@ -117,10 +104,6 @@ TEST(TestRegExp, operatorEqual) + EXPECT_TRUE(regex.RegComp("^(?<first>Test)\\s*(?<second>.*)\\.")); + regexcopy = regex; + EXPECT_EQ(0, regexcopy.RegFind("Test string.")); +- EXPECT_TRUE(regexcopy.GetNamedSubPattern("first", match)); +- EXPECT_STREQ("Test", match.c_str()); +- EXPECT_TRUE(regexcopy.GetNamedSubPattern("second", match)); +- EXPECT_STREQ("string", match.c_str()); + } + + class TestRegExpLog : public testing::Test +-- +2.47.3 +
package/kodi/0004-Introduce-PCRE2-dependency.patch new file +192 -0
192 lines not on this page · raw message
package/kodi/0005-Migrate-PCRE-to-PCRE2-and-remove-PCRE.patch new file +486 -0
486 lines not on this page · raw message
package/kodi/Config.in +1 -2
@@ -91,8 +91,7 @@ menuconfig BR2_PACKAGE_KODI select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_LZO select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_PCRE - select BR2_PACKAGE_PCRE_UCP + select BR2_PACKAGE_PCRE2 select BR2_PACKAGE_PYTHON3_2TO3 select BR2_PACKAGE_PYTHON3_PYEXPAT select BR2_PACKAGE_PYTHON3_SQLITE
package/kodi/kodi.mk +1 -1
@@ -47,7 +47,7 @@ KODI_DEPENDENCIES = \ libpng \ lzo \ openssl \ - pcre \ + pcre2 \ python3 \ rapidjson \ spdlog \
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 17/20 package/postgis: switch to pcre2
In reply to Bernd KuhlsUpstream added additional and optional support for pcre2 in version 3.2.0:
https://github.com/postgis/postgis/commit/6cf2fba94a434e79d6526a6a5cfdb6057a91bff8
which was added to buildroot in 2021 with commit 5084994d3f6dce350de091cd813047e658b9363d.
--- package/postgis/postgis.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/postgis/postgis.mk +2 -2
@@ -33,8 +33,8 @@ else POSTGIS_CONF_OPTS += --without-raster endif -ifeq ($(BR2_PACKAGE_PCRE),y) -POSTGIS_DEPENDENCIES += pcre +ifeq ($(BR2_PACKAGE_PCRE2),y) +POSTGIS_DEPENDENCIES += pcre2 endif ifeq ($(BR2_PACKAGE_PROTOBUF_C),y)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 18/20 package/slang: disable pcre module
In reply to Bernd KuhlsThe pcre package is unmaintained and will be removed from buildroot.
Slang has no support for pcre2 so we remove the pcre module.
For reference see:
https://fedoraproject.org/wiki/Changes/PcreDeprecation
https://bugzilla.redhat.com/show_bug.cgi?id=2128372
https://src.fedoraproject.org/rpms/slang/c/40c4fb0556a06ad3ad9abf01bcaef50dde0dc8c2?branch=rawhide
https://github.com/LibreELEC/LibreELEC.tv/pull/8299
https://packagehub.suse.com/packages/slang/2_3_3+git16_89d32bb-160000_2_2/
--- package/slang/slang.mk | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
package/slang/slang.mk +1 -7
@@ -10,7 +10,7 @@ SLANG_SITE = http://www.jedsoft.org/releases/slang SLANG_LICENSE = GPL-2.0+ SLANG_LICENSE_FILES = COPYING SLANG_INSTALL_STAGING = YES -SLANG_CONF_OPTS = --with-onig=no +SLANG_CONF_OPTS = --with-onig=no --with-pcre=no SLANG_MAKE = $(MAKE1) # Racy and we don't have/do libtermcap
@@ -26,12 +26,6 @@ SLANG_DEPENDENCIES += libpng else SLANG_CONF_OPTS += --with-png=no endif -ifeq ($(BR2_PACKAGE_PCRE),y) -SLANG_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr -SLANG_DEPENDENCIES += pcre -else -SLANG_CONF_OPTS += --with-pcre=no -endif ifeq ($(BR2_PACKAGE_ZLIB),y) SLANG_CONF_OPTS += --with-z=$(STAGING_DIR)/usr SLANG_DEPENDENCIES += zlib
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 19/20 package/zsh: switch to pcre2
In reply to Bernd Kuhlshttps://bbs.archlinux.org/viewtopic.php?pid=2129384#p2129384
Patches 0003 and 0004 add upstream commits to support pcre2.
Patch 0002 is a prerequisite for patch 0003 to apply cleanly to Src/Modules/pcre.c.
Renamed ac_cv_prog_ variable due to changes in patch 0004.
--- ...e-to-switch-between-C-UTF-8-locales-.patch | 68 +++ ...3-51723-migrate-pcre-module-to-pcre2.patch | 539 ++++++++++++++++++ ...ld-pcre-module-if-pcre2-config-is-no.patch | 108 ++++ package/zsh/zsh.mk | 8 +- 4 files changed, 720 insertions(+), 3 deletions(-) create mode 100644 package/zsh/0002-50658-test-Enable-to-switch-between-C-UTF-8-locales-.patch create mode 100644 package/zsh/0003-51723-migrate-pcre-module-to-pcre2.patch create mode 100644 package/zsh/0004-51877-do-not-build-pcre-module-if-pcre2-config-is-no.patch
package/zsh/0002-50658-test-Enable-to-switch-between-C-UTF-8-locales-.patch new file +68 -0
@@ -0,0 +1,68 @@ +From 6e0862221f2fadef0ec4153c7f0ca41a016144b8 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto <[email protected]> +Date: Mon, 26 Sep 2022 10:52:50 +0900 +Subject: [PATCH] 50658 + test: Enable to switch between C/UTF-8 locales in + PCRE + +Upstream: https://github.com/zsh-users/zsh/commit/1b421e4978440234fb73117c8505dad1ccc68d46 + +[Bernd: backported to 5.9] +Signed-off-by: Bernd Kuhls <[email protected]> +--- + Src/Modules/pcre.c | 10 ++-------- + Test/V07pcre.ztst | 11 +++++++++++ + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c +index 6289e003e..46875a59b 100644 +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -47,8 +47,6 @@ zpcre_utf8_enabled(void) + #if defined(MULTIBYTE_SUPPORT) && defined(HAVE_NL_LANGINFO) && defined(CODESET) + static int have_utf8_pcre = -1; + +- /* value can toggle based on MULTIBYTE, so don't +- * be too eager with caching */ + if (have_utf8_pcre < -1) + return 0; + +@@ -56,15 +54,11 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (!strcmp(nl_langinfo(CODESET), "UTF-8"))) { +- +- if (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre)) ++ (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { + have_utf8_pcre = -2; /* erk, failed to ask */ + } + +- if (have_utf8_pcre < 0) +- return 0; +- return have_utf8_pcre; ++ return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); + + #else + return 0; +diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst +index c9c844d2a..ca35d43f0 100644 +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -174,3 +174,14 @@ + echo $match[2] ) + 0:regression for segmentation fault, workers/38307 + >test ++ ++ LANG_SAVE=$LANG ++ [[ é =~ '^.\z' ]]; echo $? ++ LANG=C ++ [[ é =~ '^..\z' ]]; echo $? ++ LANG=$LANG_SAVE ++ [[ é =~ '^.\z' ]]; echo $? ++0:swich between C/UTF-8 locales ++>0 ++>0 ++>0 +-- +2.47.3 +
package/zsh/0003-51723-migrate-pcre-module-to-pcre2.patch new file +539 -0
539 lines not on this page · raw message
package/zsh/0004-51877-do-not-build-pcre-module-if-pcre2-config-is-no.patch new file +108 -0
108 lines not on this page · raw message
package/zsh/zsh.mk +5 -3
@@ -14,6 +14,8 @@ ZSH_LICENSE = MIT-like ZSH_LICENSE_FILES = LICENCE ZSH_CPE_ID_VENDOR = zsh # 0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch +# 0003-51723-migrate-pcre-module-to-pcre2.patch +# 0004-51877-do-not-build-pcre-module-if-pcre2-config-is-no.patch ZSH_AUTORECONF = YES # zsh uses TRY_RUN to determine these
@@ -38,10 +40,10 @@ else ZSH_CONF_OPTS += --disable-cap endif -ifeq ($(BR2_PACKAGE_PCRE),y) +ifeq ($(BR2_PACKAGE_PCRE2),y) ZSH_CONF_OPTS += --enable-pcre -ZSH_CONF_ENV += ac_cv_prog_PCRECONF=$(STAGING_DIR)/usr/bin/pcre-config -ZSH_DEPENDENCIES += pcre +ZSH_CONF_ENV += ac_cv_prog_PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config +ZSH_DEPENDENCIES += pcre2 else ZSH_CONF_OPTS += --disable-pcre endif
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 20/20 package/pcre: remove package
In reply to Bernd KuhlsQuoting https://www.pcre.org/
"The older, but still widely deployed PCRE library, originally released
in 1997, is at version 8.45. This version of PCRE is now at end of life, and is no longer being actively maintained. Version 8.45 is expected to be the final release of the older PCRE library, and new projects should use PCRE2 instead. [...]"
--- .checkpackageignore | 2 - Config.in.legacy | 7 +++ package/Config.in | 1 - .../pcre/0001-Kill-compatibility-bits.patch | 46 ------------------- package/pcre/0002-Disable-C-unit-tests.patch | 42 ----------------- package/pcre/Config.in | 34 -------------- package/pcre/pcre.hash | 4 -- package/pcre/pcre.mk | 31 ------------- 8 files changed, 7 insertions(+), 160 deletions(-) delete mode 100644 package/pcre/0001-Kill-compatibility-bits.patch delete mode 100644 package/pcre/0002-Disable-C-unit-tests.patch delete mode 100644 package/pcre/Config.in delete mode 100644 package/pcre/pcre.hash delete mode 100644 package/pcre/pcre.mk
.checkpackageignore +0 -2
@@ -743,8 +743,6 @@ package/paxtest/0001-genpaxtest-move-log-location.patch lib_patch.Upstream package/paxtest/0002-paxtest-page-alignment-ARM-and-NIOS2-arch.patch lib_patch.Upstream package/pcm-tools/0001-pmu-query.py-fix-python3-errors-add-linux-platform-s.patch lib_patch.Upstream package/pcmanfm/0001-po-de-po-fix-build-with-gettext-tiny.patch lib_patch.Upstream -package/pcre/0001-Kill-compatibility-bits.patch lib_patch.Upstream -package/pcre/0002-Disable-C-unit-tests.patch lib_patch.Upstream package/pdmenu/0001-autoconf-makeinfo.in-link-with-INTLLIBS-if-needed.patch lib_patch.Upstream package/pdmenu/0002-Makefile-autoconf-makeinfo.in-support-build-install-.patch lib_patch.Upstream package/perl-net-ssleay/0001-fix-build-system.patch lib_patch.Upstream
Config.in.legacy +7 -0
@@ -146,6 +146,13 @@ endif comment "Legacy options removed in 2026.05" +config BR2_PACKAGE_PCRE + bool "pcre removed" + select BR2_LEGACY + help + pcre was no longer maintained upstream, so it has been + dropped. Look at pcre2 for an alternative. + config BR2_PACKAGE_SNORT bool "snort removed" select BR2_LEGACY
package/Config.in +0 -1
@@ -2326,7 +2326,6 @@ menu "Text and terminal handling" source "package/ncurses/Config.in" source "package/newt/Config.in" source "package/oniguruma/Config.in" - source "package/pcre/Config.in" source "package/pcre2/Config.in" source "package/popt/Config.in" source "package/re2/Config.in"
package/pcre/0001-Kill-compatibility-bits.patch deleted +0 -46
46 lines not on this page · raw message
package/pcre/0002-Disable-C-unit-tests.patch deleted +0 -42
42 lines not on this page · raw message
package/pcre/Config.in deleted +0 -34
@@ -1,34 +0,0 @@ -config BR2_PACKAGE_PCRE - bool "pcre" - help - Perl Compatible Regular Expressions. By default, only the - 8-bits libpcre is built. To get the 16-bits and/or 32-bits - variants libpcre16/libpcre32, use the package sub-options. - - http://www.pcre.org/ - -if BR2_PACKAGE_PCRE - -config BR2_PACKAGE_PCRE_16 - bool "16-bit pcre" - help - This option builds the 16-bits pcre library, i.e 'libpcre16' - -config BR2_PACKAGE_PCRE_32 - bool "32-bit pcre" - help - This option builds the 32-bits pcre library, i.e 'libpcre32' - -config BR2_PACKAGE_PCRE_UTF - bool "UTF-8/16/32 support in pcre" - help - This option builds the pcre library with UTF-8/16/32 support - -config BR2_PACKAGE_PCRE_UCP - bool "Unicode properties support in pcre" - select BR2_PACKAGE_PCRE_UTF - help - This option builds the pcre library with Unicode properties - support (implies UTF-8/16/32 support)' - -endif
package/pcre/pcre.hash deleted +0 -4
@@ -1,4 +0,0 @@ -# Locally calculated after checking pgp signature -sha256 4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8 pcre-8.45.tar.bz2 -# License files, locally calculated -sha256 51b3dea44f63338b84b9c97b3d793826a8397309068cf9379a423216ab8ea5b2 LICENCE
package/pcre/pcre.mk deleted +0 -31
@@ -1,31 +0,0 @@ -################################################################################ -# -# pcre -# -################################################################################ - -PCRE_VERSION = 8.45 -PCRE_SITE = http://downloads.sourceforge.net/project/pcre/pcre/$(PCRE_VERSION) -PCRE_SOURCE = pcre-$(PCRE_VERSION).tar.bz2 -PCRE_LICENSE = BSD-3-Clause -PCRE_LICENSE_FILES = LICENCE -PCRE_CPE_ID_VENDOR = pcre -PCRE_INSTALL_STAGING = YES -PCRE_CONFIG_SCRIPTS = pcre-config - -# They're required for host-libglib2 -HOST_PCRE_CONF_OPTS = --enable-unicode-properties - -ifneq ($(BR2_INSTALL_LIBSTDCPP),y) -# pcre will use the host g++ if a cross version isn't available -PCRE_CONF_OPTS += --disable-cpp -endif - -PCRE_CONF_OPTS += --enable-pcre8 -PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_16),--enable-pcre16,--disable-pcre16) -PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32) -PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UTF),--enable-utf,--disable-utf) -PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UCP),--enable-unicode-properties,--disable-unicode-properties) - -$(eval $(autotools-package)) -$(eval $(host-autotools-package))
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 23 lines · Bernd Kuhls
https://github.com/shadowsocks/shadowsocks-libev/releases/tag/v3.3.6
Upstream tarball does not contain submodules so we need to download the git repo ourselves. Please note that these submodules cannot be provided as system libraries:
https://github.com/shadowsocks/shadowsocks-libev/commit/6423c8e496fe2e8d37e02b9a2d0472f7f4d6f5c0
"These are vendored code built from git submodules, not system
libraries, [...]"Removed all patches, they were either autoconf-related or are included in this release.
Added patch to fix build with toolchains without c++.
Switched build system to cmake due to upstream removal of autoconf and switched to pcre2 instead of pcre:
https://github.com/shadowsocks/shadowsocks-libev/commit/7bb250739ef0067c62e4ffd533ec8cee2775995aThe cmake build system always builds dynamic libraries:
https://github.com/shadowsocks/shadowsocks-libev/blob/v3.3.6/src/CMakeLists.txt#L252
so we added a dependency to !BR2_STATIC_LIBS and -DWITH_STATIC=OFF as configure option.
Quoted 5 lines
Please note that this bump will not fix the build errors introduced by the bump of glibc to version 2.43:
https://github.com/shadowsocks/shadowsocks-libev/issues/3032Signed-off-by Bernd Kuhls <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot