Merge pull request #22443 from stangri/master-nghttp3
authorStan Grishin <stangri@melmac.ca>
Thu, 26 Oct 2023 14:32:40 +0000 (08:32 -0600)
committerGitHub <noreply@github.com>
Thu, 26 Oct 2023 14:32:40 +0000 (08:32 -0600)
nghttp3: add new package

54 files changed:
lang/perl/Makefile
lang/perl/files/riscv64.config [new file with mode: 0644]
lang/python/micropython-lib/Makefile
lang/python/micropython-lib/patches/004-unix-ffi-re-convert-to-PCRE2.patch [new file with mode: 0644]
lang/python/pillow/Makefile
lang/python/pillow/patches/001-remove-setuptools-version-limit.patch
lang/python/pillow/test.sh [new file with mode: 0644]
mail/exim/Makefile
mail/exim/patches/100-localscan_dlopen.patch
multimedia/gst1-libav/Makefile
multimedia/gst1-plugins-bad/Makefile
multimedia/gst1-plugins-bad/patches/010-distutils.patch
multimedia/gst1-plugins-base/Makefile
multimedia/gst1-plugins-good/Makefile
multimedia/gst1-plugins-good/patches/010-distutils.patch
multimedia/gst1-plugins-ugly/Makefile
multimedia/gstreamer1/Makefile
net/adblock-fast/Makefile
net/adblock-fast/files/etc/config/adblock-fast
net/adblock-fast/files/etc/init.d/adblock-fast
net/conntrack-tools/Makefile
net/dnsproxy/Makefile
net/https-dns-proxy/Makefile
net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy [deleted file]
net/https-dns-proxy/files/etc/init.d/https-dns-proxy
net/net-snmp/Makefile
net/net-snmp/patches/203-if-mib-data_access-interface.c-plug-a-leak-with-pcre.patch [new file with mode: 0644]
net/nginx/Config_ssl.in
net/nginx/Makefile
net/ooniprobe/Makefile [deleted file]
net/ooniprobe/test.sh [deleted file]
net/pdns/Makefile
net/pdns/files/pdns.conf-dist
net/rclone/Makefile
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/patches/100-Upgrade-PCRE-to-PCRE2.patch [new file with mode: 0644]
net/sing-box/Makefile
net/snowflake/Makefile
net/tor/Makefile
net/tor/files/tor.init
net/transmission/Makefile
net/travelmate/Makefile
net/travelmate/files/README.md
net/travelmate/files/travelmate.sh
net/travelmate/files/travelmate.vpn
net/travelmate/files/travelmate_ntp.hotplug
utils/acpica-unix/Makefile
utils/docker-compose/Makefile
utils/nerdctl/Makefile [new file with mode: 0644]
utils/procs/Makefile
utils/quectel-timesync/Makefile [new file with mode: 0644]
utils/stress-ng/Makefile
utils/stress-ng/patches/002-core-stress-Add-musl-gcc-detection-and-HAVE_COMPILER.patch [new file with mode: 0644]
utils/stress-ng/test.sh [new file with mode: 0644]

index 2763de2777f8e3e60db9917ad64da7d5d127ba8f..7b603b5af28842f35a8873f07b6259a667037c1c 100644 (file)
@@ -11,7 +11,7 @@ include perlver.mk
 
 PKG_NAME:=perl
 PKG_VERSION:=$(PERL_VERSION)
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE_URL:=\
                https://cpan.metacpan.org/src/5.0 \
diff --git a/lang/perl/files/riscv64.config b/lang/perl/files/riscv64.config
new file mode 100644 (file)
index 0000000..4596f8c
--- /dev/null
@@ -0,0 +1,21 @@
+owrt:arch=riscv
+owrt:bits=64
+owrt:endian=little
+
+ccsymbols=''
+cppccsymbols=''
+cppsymbols='_FILE_OFFSET_BITS=64 _FORTIFY_SOURCE=2 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200809L _POSIX_SOURCE=1 _REENTRANT=1 _STDC_PREDEF_H=1 _XOPEN_SOURCE=700 _XOPEN_SOURCE_EXTENDED=1 __ATOMIC_ACQUIRE=2 __ATOMIC_ACQ_REL=4 __ATOMIC_CONSUME=1 __ATOMIC_RELAXED=0 __ATOMIC_RELEASE=3 __ATOMIC_SEQ_CST=5 __BIGGEST_ALIGNMENT__=16 __BYTE_ORDER__=1234 __CHAR16_TYPE__=short\ unsigned\ int __CHAR32_TYPE__=unsigned\ int __CHAR_BIT__=8 __CHAR_UNSIGNED__=1 __DBL_DECIMAL_DIG__=17 __DBL_DENORM_MIN__=((double)4.94065645841246544176568792868221372e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((double)2.22044604925031308084726333618164062e-16L) __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=((double)1.79769313486231570814527423731704357e+308L) __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=((double)2.22507385850720138309023271733240406e-308L) __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6145 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6142) __DEC128_MIN__=1E-6143DL __DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=97 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-94) __DEC32_MIN__=1E-95DF __DEC32_SUBNORMAL_MIN__=0.000001E-95DF __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=385 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-382) __DEC64_MIN__=1E-383DD __DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD __DECIMAL_DIG__=36 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLOAT_WORD_ORDER__=1234 __FLT128_DECIMAL_DIG__=36 __FLT128_DENORM_MIN__=6.47517511943802511092443895822764655e-4966F128 __FLT128_DIG__=33 __FLT128_EPSILON__=1.92592994438723585305597794258492732e-34F128 __FLT128_HAS_DENORM__=1 __FLT128_HAS_INFINITY__=1 __FLT128_HAS_QUIET_NAN__=1 __FLT128_MANT_DIG__=113 __FLT128_MAX_10_EXP__=4932 __FLT128_MAX_EXP__=16384 __FLT128_MAX__=1.18973149535723176508575932662800702e+4932F128 __FLT128_MIN_10_EXP__=(-4931) __FLT128_MIN_EXP__=(-16381) __FLT128_MIN__=3.36210314311209350626267781732175260e-4932F128 __FLT32X_DECIMAL_DIG__=17 __FLT32X_DENORM_MIN__=4.94065645841246544176568792868221372e-324F32x __FLT32X_DIG__=15 __FLT32X_EPSILON__=2.22044604925031308084726333618164062e-16F32x __FLT32X_HAS_DENORM__=1 __FLT32X_HAS_INFINITY__=1 __FLT32X_HAS_QUIET_NAN__=1 __FLT32X_MANT_DIG__=53 __FLT32X_MAX_10_EXP__=308 __FLT32X_MAX_EXP__=1024 __FLT32X_MAX__=1.79769313486231570814527423731704357e+308F32x __FLT32X_MIN_10_EXP__=(-307) __FLT32X_MIN_EXP__=(-1021) __FLT32X_MIN__=2.22507385850720138309023271733240406e-308F32x __FLT32_DECIMAL_DIG__=9 __FLT32_DENORM_MIN__=1.40129846432481707092372958328991613e-45F32 __FLT32_DIG__=6 __FLT32_EPSILON__=1.19209289550781250000000000000000000e-7F32 __FLT32_HAS_DENORM__=1 __FLT32_HAS_INFINITY__=1 __FLT32_HAS_QUIET_NAN__=1 __FLT32_MANT_DIG__=24 __FLT32_MAX_10_EXP__=38 __FLT32_MAX_EXP__=128 __FLT32_MAX__=3.40282346638528859811704183484516925e+38F32 __FLT32_MIN_10_EXP__=(-37) __FLT32_MIN_EXP__=(-125) __FLT32_MIN__=1.17549435082228750796873653722224568e-38F32 __FLT64X_DECIMAL_DIG__=36 __FLT64X_DENORM_MIN__=6.47517511943802511092443895822764655e-4966F64x __FLT64X_DIG__=33 __FLT64X_EPSILON__=1.92592994438723585305597794258492732e-34F64x __FLT64X_HAS_DENORM__=1 __FLT64X_HAS_INFINITY__=1 __FLT64X_HAS_QUIET_NAN__=1 __FLT64X_MANT_DIG__=113 __FLT64X_MAX_10_EXP__=4932 __FLT64X_MAX_EXP__=16384 __FLT64X_MAX__=1.18973149535723176508575932662800702e+4932F64x __FLT64X_MIN_10_EXP__=(-4931) __FLT64X_MIN_EXP__=(-16381) __FLT64X_MIN__=3.36210314311209350626267781732175260e-4932F64x __FLT64_DECIMAL_DIG__=17 __FLT64_DENORM_MIN__=4.94065645841246544176568792868221372e-324F64 __FLT64_DIG__=15 __FLT64_EPSILON__=2.22044604925031308084726333618164062e-16F64 __FLT64_HAS_DENORM__=1 __FLT64_HAS_INFINITY__=1 __FLT64_HAS_QUIET_NAN__=1 __FLT64_MANT_DIG__=53 __FLT64_MAX_10_EXP__=308 __FLT64_MAX_EXP__=1024 __FLT64_MAX__=1.79769313486231570814527423731704357e+308F64 __FLT64_MIN_10_EXP__=(-307) __FLT64_MIN_EXP__=(-1021) __FLT64_MIN__=2.22507385850720138309023271733240406e-308F64 __FLT_DECIMAL_DIG__=9 __FLT_DENORM_MIN__=1.40129846432481707092372958328991613e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209289550781250000000000000000000e-7F __FLT_EVAL_METHOD_TS_18661_3__=0 __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282346638528859811704183484516925e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435082228750796873653722224568e-38F __FLT_RADIX__=2 __FP_FAST_FMA=1 __FP_FAST_FMAF32=1 __FP_FAST_FMAF32x=1 __FP_FAST_FMAF64=1 __FP_FAST_FMAF=1 __GCC_ATOMIC_BOOL_LOCK_FREE=1 __GCC_ATOMIC_CHAR16_T_LOCK_FREE=1 __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 __GCC_ATOMIC_CHAR_LOCK_FREE=1 __GCC_ATOMIC_INT_LOCK_FREE=2 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_ATOMIC_LONG_LOCK_FREE=2 __GCC_ATOMIC_POINTER_LOCK_FREE=2 __GCC_ATOMIC_SHORT_LOCK_FREE=1 __GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 __GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GCC_IEC_559=2 __GCC_IEC_559_COMPLEX=2 __GLIBC_MINOR__=27 __GLIBC__=2 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=0 __GNUC_STDC_INLINE__=1 __GNUC__=8 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1013 __INT16_C=__INT16_C __INT16_MAX__=0x7fff __INT16_TYPE__=short\ int __INT32_C=__INT32_C __INT32_MAX__=0x7fffffff __INT32_TYPE__=int __INT64_C=__INT64_C __INT64_MAX__=0x7fffffffffffffffL __INT64_TYPE__=long\ int __INT8_C=__INT8_C __INT8_MAX__=0x7f __INT8_TYPE__=signed\ char __INTMAX_C=__INTMAX_C __INTMAX_MAX__=0x7fffffffffffffffL __INTMAX_TYPE__=long\ int __INTMAX_WIDTH__=64 __INTPTR_MAX__=0x7fffffffffffffffL __INTPTR_TYPE__=long\ int __INTPTR_WIDTH__=64 __INT_FAST16_MAX__=0x7fffffffffffffffL __INT_FAST16_TYPE__=long\ int __INT_FAST16_WIDTH__=64 __INT_FAST32_MAX__=0x7fffffffffffffffL __INT_FAST32_TYPE__=long\ int __INT_FAST32_WIDTH__=64 __INT_FAST64_MAX__=0x7fffffffffffffffL __INT_FAST64_TYPE__=long\ int __INT_FAST64_WIDTH__=64 __INT_FAST8_MAX__=0x7f __INT_FAST8_TYPE__=signed\ char __INT_FAST8_WIDTH__=8 __INT_LEAST16_MAX__=0x7fff __INT_LEAST16_TYPE__=short\ int __INT_LEAST16_WIDTH__=16 __INT_LEAST32_MAX__=0x7fffffff __INT_LEAST32_TYPE__=int __INT_LEAST32_WIDTH__=32 __INT_LEAST64_MAX__=0x7fffffffffffffffL __INT_LEAST64_TYPE__=long\ int __INT_LEAST64_WIDTH__=64 __INT_LEAST8_MAX__=0x7f __INT_LEAST8_TYPE__=signed\ char __INT_LEAST8_WIDTH__=8 __INT_MAX__=0x7fffffff __INT_WIDTH__=32 __LDBL_DECIMAL_DIG__=36 __LDBL_DENORM_MIN__=6.47517511943802511092443895822764655e-4966L __LDBL_DIG__=33 __LDBL_EPSILON__=1.92592994438723585305597794258492732e-34L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=113 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176508575932662800702e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626267781732175260e-4932L __LONG_LONG_MAX__=0x7fffffffffffffffLL __LONG_LONG_WIDTH__=64 __LONG_MAX__=0x7fffffffffffffffL __LONG_WIDTH__=64 __LP64__=1 __ORDER_BIG_ENDIAN__=4321 __ORDER_LITTLE_ENDIAN__=1234 __ORDER_PDP_ENDIAN__=3412 __PIC__=2 __PIE__=2 __PRAGMA_REDEFINE_EXTNAME=1 __PTRDIFF_MAX__=0x7fffffffffffffffL __PTRDIFF_TYPE__=long\ int __PTRDIFF_WIDTH__=64 __REGISTER_PREFIX__= __SCHAR_MAX__=0x7f __SCHAR_WIDTH__=8 __SHRT_MAX__=0x7fff __SHRT_WIDTH__=16 __SIG_ATOMIC_MAX__=0x7fffffff __SIG_ATOMIC_MIN__=(-0x7fffffff\ -\ 1) __SIG_ATOMIC_TYPE__=int __SIG_ATOMIC_WIDTH__=32 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT128__=16 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_MAX__=0xffffffffffffffffUL __SIZE_TYPE__=long\ unsigned\ int __SIZE_WIDTH__=64 __STDC_HOSTED__=1 __STDC_IEC_559_COMPLEX__=1 __STDC_IEC_559__=1 __STDC_ISO_10646__=201706L __STDC_NO_THREADS__=1 __STDC_UTF_16__=1 __STDC_UTF_32__=1 __STDC_VERSION__=201710L __STDC__=1 __UINT16_C=__UINT16_C __UINT16_MAX__=0xffff __UINT16_TYPE__=short\ unsigned\ int __UINT32_C=__UINT32_C __UINT32_MAX__=0xffffffffU __UINT32_TYPE__=unsigned\ int __UINT64_C=__UINT64_C __UINT64_MAX__=0xffffffffffffffffUL __UINT64_TYPE__=long\ unsigned\ int __UINT8_C=__UINT8_C __UINT8_MAX__=0xff __UINT8_TYPE__=unsigned\ char __UINTMAX_C=__UINTMAX_C __UINTMAX_MAX__=0xffffffffffffffffUL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=0xffffffffffffffffUL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=0xffffffffffffffffUL __UINT_FAST16_TYPE__=long\unsigned\ int __UINT_FAST32_MAX__=0xffffffffffffffffUL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=0xffffffffffffffffUL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_FAST8_MAX__=0xff __UINT_FAST8_TYPE__=unsigned\ char__UINT_LEAST16_MAX__=0xffff __UINT_LEAST16_TYPE__=short\ unsigned\ int __UINT_LEAST32_MAX__=0xffffffffU __UINT_LEAST32_TYPE__=unsigned\ int __UINT_LEAST64_MAX__=0xffffffffffffffffUL __UINT_LEAST64_TYPE__=long\ unsigned\ int __UINT_LEAST8_MAX__=0xff __UINT_LEAST8_TYPE__=unsigned\ char __USER_LABEL_PREFIX__= __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __VERSION__="8.2.0" __WCHAR_MAX__=0x7fffffff __WCHAR_MIN__=(-0x7fffffff\ -\ 1) __WCHAR_TYPE__=int __WCHAR_WIDTH__=32 __WINT_MAX__=0xffffffffU __WINT_MIN__=0U __WINT_TYPE__=unsigned\ int __WINT_WIDTH__=32 __gnu_linux__=1 __has_include=__has_include __has_include_next=__has_include_next __linux=1 __linux__=1 __pic__=2 __pie__=2 __riscv=1 __riscv_atomic=1 __riscv_cmodel_pic=1 __riscv_compressed=1 __riscv_div=1 __riscv_fdiv=1 __riscv_flen=64 __riscv_float_abi_double=1 __riscv_fsqrt=1 __riscv_mul=1 __riscv_muldiv=1 __riscv_xlen=64 __unix=1 __unix__=1 linux=1 unix=1'
+
+d_casti32='define'
+d_double_style_ieee='define'
+d_modflproto='define'
+doublekind='3'
+fpossize='16'
+longdblkind='1'
+need_va_copy='undef'
+quadkind='2'
+
+owrt:sig_count='64'
+owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS'
+owrt:sig_name_extra='IOT CLD POLL UNUSED'
+owrt:sig_num_extra='6 17 29 31'
index 7bd167898a871edee62cba3593449ba041286d96..490e6e2e7d3549f07d59a50799895cb352275c5f 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=micropython-lib
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
@@ -50,7 +50,7 @@ endef
 define Package/micropython-lib-unix
 $(call Package/micropython-lib/Default)
   TITLE+= - Unix port packages
-  DEPENDS:=+micropython +libpcre +librt +libsqlite3
+  DEPENDS:=+micropython +libpcre2 +librt +libsqlite3
 endef
 
 define Package/micropython-lib-unix-src
diff --git a/lang/python/micropython-lib/patches/004-unix-ffi-re-convert-to-PCRE2.patch b/lang/python/micropython-lib/patches/004-unix-ffi-re-convert-to-PCRE2.patch
new file mode 100644 (file)
index 0000000..6bf539b
--- /dev/null
@@ -0,0 +1,148 @@
+From 1cbe8c4dd653336c5766dfd75eb379ad37f04249 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth@gmail.com>
+Date: Thu, 28 Sep 2023 20:59:26 +0200
+Subject: [PATCH] unix-ffi: re: convert to PCRE2
+
+PCRE is marked as EOL and won't receive any new security update.
+
+Convert the re module to PCRE2 API to enforce security.
+Additional dependency is now needed with uctypes due to changes in how
+PCRE2 return the match_data in a pointer and require special handling.
+
+The converted module is tested with the test_re.py with no regression.
+
+Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+---
+ unix-ffi/re/re.py | 73 +++++++++++++++++++++++++++++++----------------
+ 1 file changed, 48 insertions(+), 25 deletions(-)
+
+--- a/unix-ffi/re/re.py
++++ b/unix-ffi/re/re.py
+@@ -1,36 +1,55 @@
+ import sys
+ import ffilib
+ import array
++import uctypes
++pcre2 = ffilib.open("libpcre2-8")
+-pcre = ffilib.open("libpcre")
+-
+-#       pcre *pcre_compile(const char *pattern, int options,
+-#            const char **errptr, int *erroffset,
+-#            const unsigned char *tableptr);
+-pcre_compile = pcre.func("p", "pcre_compile", "sipps")
+-
+-#       int pcre_exec(const pcre *code, const pcre_extra *extra,
+-#            const char *subject, int length, int startoffset,
+-#            int options, int *ovector, int ovecsize);
+-pcre_exec = pcre.func("i", "pcre_exec", "PPsiiipi")
+-
+-#       int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
+-#            int what, void *where);
+-pcre_fullinfo = pcre.func("i", "pcre_fullinfo", "PPip")
+-
+-
+-IGNORECASE = I = 1
+-MULTILINE = M = 2
+-DOTALL = S = 4
+-VERBOSE = X = 8
+-PCRE_ANCHORED = 0x10
++#       pcre2_code *pcre2_compile(PCRE2_SPTR pattern, PCRE2_SIZE length,
++#           uint32_t options, int *errorcode, PCRE2_SIZE *erroroffset,
++#           pcre2_compile_context *ccontext);
++pcre2_compile = pcre2.func("p", "pcre2_compile_8", "siippp")
++
++#       int pcre2_match(const pcre2_code *code, PCRE2_SPTR subject,
++#           PCRE2_SIZE length, PCRE2_SIZE startoffset, uint32_t options,
++#           pcre2_match_data *match_data, pcre2_match_context *mcontext);
++pcre2_match = pcre2.func("i", "pcre2_match_8", "Psiiipp")
++
++#       int pcre2_pattern_info(const pcre2_code *code, uint32_t what,
++#           void *where);
++pcre2_pattern_info = pcre2.func("i", "pcre2_pattern_info_8", "Pip")
++
++#       PCRE2_SIZE *pcre2_get_ovector_pointer(pcre2_match_data *match_data);
++pcre2_get_ovector_pointer = pcre2.func("p", "pcre2_get_ovector_pointer_8", "p")
++
++#       pcre2_match_data *pcre2_match_data_create_from_pattern(const pcre2_code *code,
++#           pcre2_general_context *gcontext);
++pcre2_match_data_create_from_pattern = pcre2.func(
++    "p", "pcre2_match_data_create_from_pattern_8", "Pp"
++)
++
++# PCRE2_SIZE that is of type size_t.
++# Use ULONG as type to support both 32bit and 64bit.
++PCRE2_SIZE_SIZE = uctypes.sizeof({"field": 0 | uctypes.ULONG})
++PCRE2_SIZE_TYPE = "L"
++
++# Real value in pcre2.h is 0xFFFFFFFF for 32bit and
++# 0x0xFFFFFFFFFFFFFFFF for 64bit that is equivalent
++# to -1
++PCRE2_ZERO_TERMINATED = -1
++
++
++IGNORECASE = I = 0x8
++MULTILINE = M = 0x400
++DOTALL = S = 0x20
++VERBOSE = X = 0x80
++PCRE2_ANCHORED = 0x80000000
+ # TODO. Note that Python3 has unicode by default
+ ASCII = A = 0
+ UNICODE = U = 0
+-PCRE_INFO_CAPTURECOUNT = 2
++PCRE2_INFO_CAPTURECOUNT = 0x4
+ class PCREMatch:
+@@ -67,19 +86,23 @@ class PCREPattern:
+     def search(self, s, pos=0, endpos=-1, _flags=0):
+         assert endpos == -1, "pos: %d, endpos: %d" % (pos, endpos)
+         buf = array.array("i", [0])
+-        pcre_fullinfo(self.obj, None, PCRE_INFO_CAPTURECOUNT, buf)
++        pcre2_pattern_info(self.obj, PCRE2_INFO_CAPTURECOUNT, buf)
+         cap_count = buf[0]
+-        ov = array.array("i", [0, 0, 0] * (cap_count + 1))
+-        num = pcre_exec(self.obj, None, s, len(s), pos, _flags, ov, len(ov))
++        match_data = pcre2_match_data_create_from_pattern(self.obj, None)
++        num = pcre2_match(self.obj, s, len(s), pos, _flags, match_data, None)
+         if num == -1:
+             # No match
+             return None
++        ov_ptr = pcre2_get_ovector_pointer(match_data)
++        # pcre2_get_ovector_pointer return PCRE2_SIZE
++        ov_buf = uctypes.bytearray_at(ov_ptr, PCRE2_SIZE_SIZE * (cap_count + 1) * 2)
++        ov = array.array(PCRE2_SIZE_TYPE, ov_buf)
+         # We don't care how many matching subexpressions we got, we
+         # care only about total # of capturing ones (including empty)
+         return PCREMatch(s, cap_count + 1, ov)
+     def match(self, s, pos=0, endpos=-1):
+-        return self.search(s, pos, endpos, PCRE_ANCHORED)
++        return self.search(s, pos, endpos, PCRE2_ANCHORED)
+     def sub(self, repl, s, count=0):
+         if not callable(repl):
+@@ -141,9 +164,9 @@ class PCREPattern:
+ def compile(pattern, flags=0):
+-    errptr = bytes(4)
++    errcode = bytes(4)
+     erroffset = bytes(4)
+-    regex = pcre_compile(pattern, flags, errptr, erroffset, None)
++    regex = pcre2_compile(pattern, PCRE2_ZERO_TERMINATED, flags, errcode, erroffset, None)
+     assert regex
+     return PCREPattern(regex)
+@@ -154,7 +177,7 @@ def search(pattern, string, flags=0):
+ def match(pattern, string, flags=0):
+-    r = compile(pattern, flags | PCRE_ANCHORED)
++    r = compile(pattern, flags | PCRE2_ANCHORED)
+     return r.search(string)
index c974723a97621dee09e72f34dc7623a750485983..c6b1faf0ee0f941e22c2918d359ecaacec11edc4 100644 (file)
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pillow
-PKG_VERSION:=10.0.0
+PKG_VERSION:=10.1.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=Pillow
-PKG_HASH:=9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396
+PKG_HASH:=e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38
 
 PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
index 3dc07d9926674519754b1935334b6f6fb0267f8a..e5ac168cbfadbf0a4cf264642acdae5ce90876c4 100644 (file)
@@ -6,6 +6,6 @@
  requires = [
 -  "setuptools>=67.8",
 +  "setuptools",
-   "wheel",
  ]
  backend-path = [
+   "_custom_build",
diff --git a/lang/python/pillow/test.sh b/lang/python/pillow/test.sh
new file mode 100644 (file)
index 0000000..9bad292
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+[ "$1" = "python3-pillow" ] || exit 0
+
+python3 - << EOF
+import sys
+from PIL import Image, ImageDraw
+
+if (Image.__version__ != "$2"):
+    print("Wrong version: " + Image.__version__)
+    sys.exit(1)
+
+from PIL import Image, ImageDraw
+img = Image.new('RGB', (100, 30), color = (73, 109, 137))
+d = ImageDraw.Draw(img)
+d.text((10,10), "Hello World", fill=(255,255,0))
+
+# Getting here means we did not get exceptions
+sys.exit(0)
+EOF
index 69d200bf1ebf227599110c305c08884486f94dd0..ebc17dcecb52ae3b9eb2746af80d2eebec05e5b5 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=exim
-PKG_VERSION:=4.96.1
+PKG_VERSION:=4.96.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://ftp.exim.org/pub/exim/exim4/
-PKG_HASH:=93ac0755c317e1fdbbea8ccb70a868876bdf3148692891c72ad0fe816767033d
+PKG_HASH:=038e327e8d1e93d005bac9bb06fd22aec44d5028930d6dbe8817ad44bbfc1de6
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
 PKG_LICENSE:=GPL-2.0-or-later
index e5efd5e5666772f48c746e75619e7f439e4d4eeb..115201c05ac667d960f690b1b695e10deb710610 100644 (file)
@@ -287,7 +287,7 @@ Last-Update: 2021-07-28
  #endif
 --- a/src/string.c
 +++ b/src/string.c
-@@ -418,6 +418,7 @@ return ss;
+@@ -428,6 +428,7 @@ return ss;
  
  #if (defined(HAVE_LOCAL_SCAN) || defined(EXPAND_DLFUNC)) \
        && !defined(MACRO_PREDEF) && !defined(COMPILE_UTILITY)
@@ -295,7 +295,7 @@ Last-Update: 2021-07-28
  /*************************************************
  *            Copy and save string                *
  *************************************************/
-@@ -463,6 +464,7 @@ string_copyn_function(const uschar * s,
+@@ -473,6 +474,7 @@ string_copyn_function(const uschar * s,
  {
  return string_copyn(s, n);
  }
index 8237ca1c229ccd593e6fc370b0258efe31fba20c..9ef7ce8ad7cf93950f050ed6d018bc8882234168 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-libav
-PKG_VERSION:=1.22.3
+PKG_VERSION:=1.22.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=2ec5c805808b4371a7e32b1da0202a1c8a6b36b6ce905080bf5c34097d12a923
+PKG_HASH:=7789e6408388a25f23cbf948cfc5c6230d735bbcd8b7f37f4a01c9e348a1e3a7
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
index b5dad4177f503517200b16e332befe5f0f146fa4..0f999a3738f4e942b6affd0af56ec5680959acd5 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.22.3
+PKG_VERSION:=1.22.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-PKG_HASH:=e1798fee2d86127f0637481c607f983293bf0fd81aad70a5c7b47205af3621d8
+PKG_HASH:=b4029cd2908a089c55f1d902a565d007495c95b1442d838485dc47fb12df7137
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
index 952d52577e13b52b5f94f3be3ce248d3a7f6d5ca..856692f1f3840ab11d515181cf94a4ca36c5a233 100644 (file)
@@ -1,6 +1,6 @@
 --- a/meson.build
 +++ b/meson.build
-@@ -501,7 +501,7 @@ gst_plugins_bad_args = ['-DHAVE_CONFIG_H
+@@ -508,7 +508,7 @@ gst_plugins_bad_args = ['-DHAVE_CONFIG_H
  configinc = include_directories('.')
  libsinc = include_directories('gst-libs')
  
index 24907d141e91189fdd3e94ddc4cd0d392624aad3..cbfa51c88236327e818538cdefb867390981ed61 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.22.3
+PKG_VERSION:=1.22.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base
-PKG_HASH:=1c596289a0d4207380233eba8c36a932c4d1aceba19932937d9b57c24cef89f3
+PKG_HASH:=50f2b4d17c02eefe430bbefa8c5cd134b1be78a53c0f60e951136d96cf49fd4b
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
index 3b3853c82cbd45c924e6fadf4e24c73f05002fd4..174e8eecd18a67a0a5c6bbec5e6c7b62ca8be871 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.22.3
+PKG_VERSION:=1.22.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-good/
-PKG_HASH:=af81154b3a2ef3f4d2feba395f25696feea6fd13ec62c92d3c7a973470710273
+PKG_HASH:=b3b07fe3f1ce7fe93aa9be7217866044548f35c4a7792280eec7e108a32f9817
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
index 582df3b628156b4b4021ec5acd98faac42bfc617..a0e6365ffef0c2477321433bdad565ea5022b745 100644 (file)
@@ -1,6 +1,6 @@
 --- a/meson.build
 +++ b/meson.build
-@@ -461,7 +461,7 @@ endif
+@@ -469,7 +469,7 @@ endif
  
  presetdir = join_paths(get_option('datadir'), 'gstreamer-' + api_version, 'presets')
  
index 572adda1eb34ba33fa68b6e64cab9965672c37f4..3da36b89715b9d73146cf74139d1d5a65ad3e7fa 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.22.3
+PKG_VERSION:=1.22.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-ugly
-PKG_HASH:=3dc98ed5c2293368b3c4e6ce55d89be834a0a62e9bf88ef17928cf03b7d5a360
+PKG_HASH:=3e31454c98cb2f7f6d2d355eceb933a892fa0f1dc09bc36c9abc930d8e29ca48
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
index 81653efacf9727c6b36d5b2e57f14e75b50df479..de77412e0a250d499c4ad45679b2fc63a3f2b26d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gstreamer1
-PKG_VERSION:=1.22.3
+PKG_VERSION:=1.22.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
-PKG_HASH:=9ffeab95053f9f6995eb3b3da225e88f21c129cd60da002d3f795db70d6d5974
+PKG_HASH:=f500e6cfddff55908f937711fc26a0840de28a1e9ec49621c0b6f1adbd8f818e
 PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
index f923a27b4717f706796422fc25ee7734f12ce541..5c7936891c9bb944351a2c42c18cf33c61157f60 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock-fast
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 PKG_LICENSE:=GPL-3.0-or-later
 
index f459411f03fd5a7bc2725aeaf6f7e39b088dbf0b..e55475dd1a1db55ec816cc8c6ae9c3d0fec268c2 100644 (file)
@@ -29,6 +29,7 @@ config adblock-fast 'config'
 #      list force_dns_port '8443'
        option led 'none'
        option parallel_downloads '1'
+       option pause_timeout '20'
        option procd_trigger_wan6 '0'
        option procd_boot_wan_timeout '60'
        option verbosity '2'
index 8229f0845d7ee53acc64ee4121f30393d399c5ae..57fe5b93283cf2297e7dd65a560504fd31cb2d05 100755 (executable)
@@ -1155,7 +1155,7 @@ adb_allow() {
                        for c in $string; do
                                output 2 "  $c "
                                hf="$(echo "$c" | sed 's/\./\\./g')"
-                               if sed -i "/\(^\|\.\)${hf}$/d;" "$outputFile" && \
+                               if sed -i "\:\(/\|\.\)${hf}/:d" "$outputFile" && \
                                        uci_add_list_if_new "${packageName}" 'config' 'allowed_domain' "$c"; then
                                                output_ok
                                else
@@ -1171,7 +1171,7 @@ adb_allow() {
                                fi
                        fi
                        output 2 "Committing changes to config "
-                       if [ -n "$(uci_changes "$packageName")" ] && uci_commit "$packageName"; then
+                       if uci_commit "$packageName"; then
                                allowed_domain="$(uci_get "$packageName" 'config' 'allowed_domain')"
                                json set triggers
                                json set stats "$serviceName is blocking $(wc -l < "$outputFile") domains (with ${dns})"
@@ -1196,7 +1196,8 @@ adb_allow() {
                        output 2 "Allowing domain(s) \\n"
                        for c in $string; do 
                                output 2 "  $c "
-                               if sed -i "/${string}/d" "$outputFile" && \
+                               hf="$(echo "$c" | sed 's/\./\\./g')"
+                               if sed -i "\:\(\"\|\.\)${hf}\":d" "$outputFile" && \
                                        uci_add_list_if_new "$packageName" 'config' 'allowed_domain' "$string"; then
                                                output_ok
                                else
@@ -1212,7 +1213,7 @@ adb_allow() {
                                fi
                        fi
                        output 2 "Committing changes to config "
-                       if [ -n "$(uci_changes "$packageName")" ] && uci_commit "$packageName"; then
+                       if uci_commit "$packageName"; then
                                allowed_domain="$(uci_get "$packageName" 'config' 'allowed_domain')"
                                json set triggers
                                json set stats "$serviceName is blocking $(wc -l < "$outputFile") domains (with ${dns})"
@@ -1725,7 +1726,7 @@ load_validate_config() {
                'config_update_enabled:bool:0' \
                'config_update_url:string:https://cdn.jsdelivr.net/gh/openwrt/packages/net/adblock-fast/files/adblock-fast.conf.update' \
                'download_timeout:range(1,60):20' \
-               'pause_timeout:range(10,120):60' \
+               'pause_timeout:range(1,60):20' \
                'curl_additional_param:or("", string)' \
                'curl_max_file_size:or("", uinteger)' \
                'curl_retry:range(0,30):3' \
index 9c063d84c6743526da848a7c441f54012f41b802..4a415e8c0279e6cd01f8ec70190a1e61964cf422 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=conntrack-tools
-PKG_VERSION:=1.4.7
+PKG_VERSION:=1.4.8
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.netfilter.org/projects/conntrack-tools/files
-PKG_HASH:=099debcf57e81690ced57f516b493588a73518f48c14d656f823b29b4fc24b5d
+PKG_HASH:=067677f4c5f6564819e78ed3a9d4a8980935ea9273f3abb22a420ea30ab5ded6
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=GPL-2.0-or-later
index 61dfe4cbbfe032bab99f5553b95fc95cce207c9b..04bbd4bec04e254c8fdf9fdb203fa89729b3467f 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsproxy
-PKG_VERSION:=0.56.1
+PKG_VERSION:=0.56.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=09aca2248e36c8e50e0a5e68034e34526aaccd6f849bd4de708f2ea4a5b3a52f
+PKG_HASH:=b20a77e88567fbcb80a07faa0f47aee7446b4d32ee7c17036fbdf07c03f05e3a
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=Apache-2.0
index 5c6912e2ea4b7ca6b2fa359210fa183de95a6c4d..e6008ac9fa94723e67fafd2308c2692706c55aa6 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=https-dns-proxy
 PKG_VERSION:=2023-05-25
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
diff --git a/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy b/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy
deleted file mode 100644 (file)
index 5acf7b7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# Copied from https://openwrt.org/docs/guide-user/advanced/hotplug_extras
-# shellcheck disable=SC1091
-. /lib/functions/network.sh
-network_flush_cache
-network_find_wan NET_IF
-network_find_wan6 NET_IF6
-[ "$INTERFACE" != "$NET_IF" ] && [ "$INTERFACE" != "$NET_IF6" ] && exit 0
-[ "$ACTION" != "ifup" ] && [ "$ACTION" != "ifupdate" ] && exit 0
-[ "$ACTION" = "ifupdate" ] && [ -z "$IFUPDATE_ADDRESSES" ] && \
-[ -z "$IFUPDATE_DATA" ] && exit 0
-
-sleep 10
-/etc/init.d/https-dns-proxy start 'on_hotplug'
index 58fd647c1516d9d967dac0c358339b2889b7d727..5679f6349890094e4709041008737cbe688cd487 100755 (executable)
@@ -28,6 +28,8 @@ readonly DEFAULT_BOOTSTRAP="${BOOTSTRAP_CF},${BOOTSTRAP_GOOGLE}"
 readonly canaryDomainsMozilla='use-application-dns.net'
 readonly canaryDomainsiCloud='mask.icloud.com mask-h2.icloud.com'
 
+on_boot_trigger=
+
 str_contains() { [ -n "$1" ] &&[ -n "$2" ] && [ "${1//$2}" != "$1" ]; }
 is_mac_address() { expr "$1" : '[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]$' >/dev/null; }
 is_ipv4() { expr "$1" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; }
@@ -133,7 +135,8 @@ resolver_health_check() { resolveip -t 3 one.one.one.one >/dev/null 2>&1; }
 
 boot() {
        ubus -t 30 wait_for network.interface 2>/dev/null
-       rc_procd start_service 'on_boot'
+       on_boot_trigger=1
+       rc_procd start_service 'on_boot' && rc_procd service_started 'on_boot'
        resolver_health_check || rc_procd stop_service 'on_boot'
 }
 
@@ -295,9 +298,28 @@ stop_service() {
 }
 
 service_triggers() {
-       procd_add_raw_trigger "interface.*.up" 3000 "/etc/init.d/${packageName}" restart 'on_interface_up'
+       local wan wan6 i
+       local procd_trigger_wan6
+       if [ "$on_boot_trigger" = '1' ]; then
+               procd_add_raw_trigger "interface.*.up" 3000 "/etc/init.d/${packageName}" restart 'on_interface_up'
+       else
+               config_load "$packageName"
+               config_get_bool procd_trigger_wan6 'config' 'procd_trigger_wan6' '0'
+               . /lib/functions/network.sh
+               network_flush_cache
+               network_find_wan wan
+               wan="${wan:-wan}"
+               if [ "$procd_trigger_wan6" -ne 0 ]; then
+                       network_find_wan6 wan6
+                       wan6="${wan6:-wan6}"
+               fi
+               for i in $wan $wan6; do
+                       procd_add_interface_trigger "interface.*" "$i" "/etc/init.d/${packageName}" restart 'on_interface_trigger'
+               done
+       fi
        procd_add_config_trigger "config.change" "$packageName" "/etc/init.d/${packageName}" reload 'on_config_change'
 }
+
 service_started() { procd_set_config_changed firewall; }
 service_stopped() { procd_set_config_changed firewall; }
 restart() { procd_send_signal "$packageName"; rc_procd start_service "$*"; }
index 46aa5e2735101770db341e619c0e32d6593826b9..1a1194955bfa4eddf6f9d406dc9904fae9779278 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=net-snmp
 PKG_VERSION:=5.9.1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/net-snmp
diff --git a/net/net-snmp/patches/203-if-mib-data_access-interface.c-plug-a-leak-with-pcre.patch b/net/net-snmp/patches/203-if-mib-data_access-interface.c-plug-a-leak-with-pcre.patch
new file mode 100644 (file)
index 0000000..e2da12f
--- /dev/null
@@ -0,0 +1,30 @@
+From e5aadf1e78c624a8e4147d4b70a7795497a50e73 Mon Sep 17 00:00:00 2001
+From: Niels Baggesen <nba@users.sourceforge.net>
+Date: Mon, 22 May 2023 18:44:36 +0200
+Subject: [PATCH] if-mib/data_access/interface.c: plug a leak with pcre2
+
+---
+ agent/mibgroup/if-mib/data_access/interface.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/agent/mibgroup/if-mib/data_access/interface.c
++++ b/agent/mibgroup/if-mib/data_access/interface.c
+@@ -845,7 +845,7 @@ int netsnmp_access_interface_include(con
+ {
+     netsnmp_include_if_list *if_ptr;
+ #if defined(HAVE_PCRE2_H)
+-    pcre2_match_data *ndx_match = pcre2_match_data_create(3, NULL);
++    pcre2_match_data *ndx_match;
+ #elif defined(HAVE_PCRE_H)
+     int                      found_ndx[3];
+ #endif
+@@ -860,6 +860,9 @@ int netsnmp_access_interface_include(con
+          */
+         return TRUE;
++#if defined(HAVE_PCRE2_H)
++    ndx_match = pcre2_match_data_create(3, NULL);
++#endif
+     for (if_ptr = include_list; if_ptr; if_ptr = if_ptr->next) {
+ #if defined(HAVE_PCRE2_H)
index 990a01e813c5831acf8e1aff28ca425621718755..b02166f36d922cdcff042c6c3311a3909ebf1dbc 100644 (file)
@@ -200,4 +200,9 @@ config NGINX_HTTP_SUB
        prompt "Enable HTTP sub module"
        default n
 
+config NGINX_STREAM_REAL_IP
+       bool
+       prompt "Enable STREAM real ip module"
+       default n
+
 endmenu
index 66a0c8713d1d71c1a0d65ffd6facaf42fd422bc1..0accdd0999367a2a71065203f993516cfb775ff5 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
 PKG_VERSION:=1.25.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nginx.org/download/
@@ -82,6 +82,7 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_PCRE \
        CONFIG_NGINX_HTTP_REAL_IP \
        CONFIG_NGINX_HTTP_SECURE_LINK \
+       CONFIG_NGINX_STREAM_REAL_IP \
        CONFIG_OPENSSL_ENGINE \
        CONFIG_OPENSSL_WITH_NPN \
        $(foreach m,$(PKG_MOD_EXTRA),CONFIG_PACKAGE_$(m))
@@ -449,6 +450,7 @@ CONFIGURE_ARGS += \
        $(if $(call IsEnabled,NGINX_HTTP_SECURE_LINK),--with-http_secure_link_module) \
        $(if $(call IsEnabled,NGINX_HTTP_SUB),--with-http_sub_module) \
        $(if $(CONFIG_PACKAGE_nginx-mod-stream),--with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module) \
+       $(if $(call IsEnabled,NGINX_STREAM_REAL_IP),--with-stream_realip_module) \
        $(if $(CONFIG_PACKAGE_nginx-mod-naxsi),--add-dynamic-module=$(PKG_BUILD_DIR)/nginx-mod-naxsi/naxsi_src) \
        $(foreach m,$(filter-out lua-resty-core lua-resty-lrucache naxsi,$(PKG_MOD_EXTRA)), \
                $(if $(CONFIG_PACKAGE_nginx-mod-$(m)),--add-dynamic-module=$(PKG_BUILD_DIR)/nginx-mod-$(m)))
diff --git a/net/ooniprobe/Makefile b/net/ooniprobe/Makefile
deleted file mode 100644 (file)
index bb7cf42..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (C) 2020-2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ooniprobe
-PKG_VERSION:=3.18.0
-PKG_RELEASE:=1
-
-PKG_SOURCE:=probe-cli-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/ooni/probe-cli/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=d28c050226c9282d7155da6cabf5547ddd43dc11eecacc485b6c05161c2d1d88
-
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
-PKG_LICENSE:=GPL-3.0-or-later
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/probe-cli-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-PKG_BUILD_FLAGS:=no-mips16
-
-GO_PKG:=github.com/ooni/probe-cli
-GO_PKG_BUILD_PKG:=github.com/ooni/probe-cli/v3/cmd/ooniprobe
-
-include $(INCLUDE_DIR)/package.mk
-include ../../lang/golang/golang-package.mk
-
-define Package/ooniprobe
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=OONI probe-cli
-  URL:=https://ooni.org
-  DEPENDS:=$(GO_ARCH_DEPENDS)
-endef
-
-define Package/ooniprobe/description
-  The next generation of Open Observatory of Network Interference (OONI)
-  Probe Command Line Interface.
-endef
-
-# Workaround for musl 1.2.4 compability in mattn/go-sqlite3
-# https://github.com/mattn/go-sqlite3/issues/1164
-ifneq ($(CONFIG_USE_MUSL),)
-  TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
-endif
-
-$(eval $(call GoBinPackage,ooniprobe))
-$(eval $(call BuildPackage,ooniprobe))
diff --git a/net/ooniprobe/test.sh b/net/ooniprobe/test.sh
deleted file mode 100644 (file)
index 9ecab82..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-ooniprobe version | grep "$2"
index 39ac66747fa46a9218802a394f9e4d9cd6cfdff7..eedc3c6d112eb6cae6b7e6282b8756689d131de0 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pdns
-PKG_VERSION:=4.8.2
+PKG_VERSION:=4.8.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
-PKG_HASH:=3b173fda4c51bb07b5a51d8c599eedd7962a02056b410e3c9d9d69ed97be35b9
+PKG_HASH:=77b91199bdf71874334501c67e26469c2667a373d8423803fe657417295c77ba
 
 PKG_MAINTAINER:=Peter van Dijk <peter.van.dijk@powerdns.com>
 PKG_LICENCE:=GPL-2.0-only
index 9242373a2974b9d110c1e72fbbebc49614c20d3a..2e417c4cb13e371bf47e54aa4790dd836ff0b4e7 100644 (file)
 #
 # default-api-rectify=yes
 
+#################################
+# default-catalog-zone Catalog zone to assign newly created primary zones (via the API) to
+#
+# default-catalog-zone=
+
 #################################
 # default-ksk-algorithm        Default KSK algorithm
 #
 #
 # secondary=no
 
+#################################
+# secondary-check-signature-freshness  Check signatures in SOA freshness check. Sets DO flag on SOA queries. Outside some very problematic scenarios, say yes here.
+#
+# secondary-check-signature-freshness=yes
+
 #################################
 # secondary-do-renotify        If this secondary should send out notifications after receiving zone transfers from a primary
 #
 # slave-renotify=no
 
 #################################
-# socket-dir   Where the controlsocket will live, /var/run/pdns when unset and not chrooted. Set to the RUNTIME_DIRECTORY environment variable when that variable has a value (e.g. under systemd).
+# socket-dir   Where the controlsocket will live, /var/run/pdns when unset and not chrooted
 #
 # socket-dir=
 
 #
 # webserver-print-arguments=no
 
+#################################
+# workaround-11804     Workaround for issue 11804: send single RR per AXFR chunk
+#
+# workaround-11804=no
+
 #################################
 # write-pid    Write a PID file
 #
index 01d253a9a7a848d0c287138564c6a81c501651d6..195076e7a94f47f3c10f4fc711fa3aa885f2ea93 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rclone
-PKG_VERSION:=1.64.0
+PKG_VERSION:=1.64.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/rclone/rclone/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3297838fdcf611a5ad605835f41c0e51031ce9f220c77a4ad0af6283b7805329
+PKG_HASH:=85feffc2d60554bcc3c59140750dc4ccf008e109b52c451956a1f52387af1bd6
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
index 0c4ce1bd689b3399a7405356763a13073f505854..b10eb32f7f2d28d6cabacf333b04c850df23ec44 100644 (file)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.3.5
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
@@ -29,7 +29,7 @@ PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 PKG_BUILD_FLAGS:=no-mips16 lto
 PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=c-ares pcre
+PKG_BUILD_DEPENDS:=c-ares pcre2
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -71,8 +71,8 @@ define Package/shadowsocks-libev/Default
 
 endef
 
-DEPENDS_ss-local = +libpcre
-DEPENDS_ss-server = +libcares +libpcre
+DEPENDS_ss-local = +libpcre2
+DEPENDS_ss-server = +libcares +libpcre2
 
 SHADOWSOCKS_COMPONENTS:=ss-local ss-redir ss-tunnel ss-server
 define shadowsocks-libev/templates
diff --git a/net/shadowsocks-libev/patches/100-Upgrade-PCRE-to-PCRE2.patch b/net/shadowsocks-libev/patches/100-Upgrade-PCRE-to-PCRE2.patch
new file mode 100644 (file)
index 0000000..91b2e5b
--- /dev/null
@@ -0,0 +1,544 @@
+From d4f4d9761cbd41c3ab6de79383ff39b9f97bf452 Mon Sep 17 00:00:00 2001
+From: Syrone Wong <wong.syrone@gmail.com>
+Date: Sat, 18 Nov 2017 20:06:50 +0800
+Subject: [PATCH] Upgrade PCRE to PCRE2
+
+- Use 8bit variant by default
+
+This comes from a PR closed and never reopen as at times PCRE2 was too
+new(???.)
+
+Ref: https://github.com/shadowsocks/shadowsocks-libev/pull/1792
+Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
+[ squash the first 2 patch from PR, drop the last one ]
+Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+---
+ .travis.yml  |   9 ++-
+ configure.ac |   8 +--
+ m4/pcre.m4   | 152 ------------------------------------------
+ m4/pcre2.m4  | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/rule.c   |  53 ++++++++++++---
+ src/rule.h   |  23 +++++--
+ 6 files changed, 253 insertions(+), 173 deletions(-)
+ delete mode 100644 m4/pcre.m4
+ create mode 100644 m4/pcre2.m4
+
+# diff --git a/.travis.yml b/.travis.yml
+# index ee3424c..e7da08c 100644
+# --- a/.travis.yml
+# +++ b/.travis.yml
+# @@ -11,11 +11,12 @@ env:
+#      global:
+#          - LIBSODIUM_VER=1.0.12
+#          - MBEDTLS_VER=2.4.0
+# +        - PCRE2_VER=10.30
+#  before_install:
+#      - |
+#        if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+#            # All dependencies for macOS build. Some packages has been installed by travis so use reinstall.
+# -          brew reinstall autoconf automake xmlto c-ares libev mbedtls libsodium asciidoc >> /dev/null 2>&1;
+# +          brew reinstall autoconf automake xmlto pcre2 c-ares libev mbedtls libsodium asciidoc >> /dev/null 2>&1;
+#        else
+#            wget  https://github.com/jedisct1/libsodium/releases/download/$LIBSODIUM_VER/libsodium-$LIBSODIUM_VER.tar.gz;
+#            tar xvf libsodium-$LIBSODIUM_VER.tar.gz;
+# @@ -29,6 +30,12 @@ before_install:
+#            make SHARED=1;
+#            sudo make install;
+#            popd;
+# +          wget https://ftp.pcre.org/pub/pcre/pcre2-$PCRE2_VER.tar.gz;
+# +          tar xvf pcre2-$PCRE2_VER.tar.gz;
+# +          pushd pcre2-$PCRE2_VER;
+# +          ./configure --prefix=/usr --enable-pcre2-16 --enable-pcre2-32 && make;
+# +          sudo make install;
+# +          popd;
+#            # Load cached docker images
+#            if [[ -d $HOME/docker ]]; then
+#                ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load";
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,10 +20,10 @@ AC_DISABLE_STATIC
+ AC_DISABLE_SHARED
+ LT_INIT([dlopen])
+-dnl Check for pcre library
+-TS_CHECK_PCRE
+-if test "x${enable_pcre}" != "xyes"; then
+-  AC_MSG_ERROR([Cannot find pcre library. Configure --with-pcre=DIR])
++dnl Check for pcre2 library
++TS_CHECK_PCRE2
++if test "x${enable_pcre2}" != "xyes"; then
++  AC_MSG_ERROR([Cannot find pcre2 library. Configure --with-pcre2=DIR])
+ fi
+ dnl Checks for using shared libraries from system
+--- a/m4/pcre.m4
++++ /dev/null
+@@ -1,152 +0,0 @@
+-dnl -------------------------------------------------------- -*- autoconf -*-
+-dnl Licensed to the Apache Software Foundation (ASF) under one or more
+-dnl contributor license agreements.  See the NOTICE file distributed with
+-dnl this work for additional information regarding copyright ownership.
+-dnl The ASF licenses this file to You under the Apache License, Version 2.0
+-dnl (the "License"); you may not use this file except in compliance with
+-dnl the License.  You may obtain a copy of the License at
+-dnl
+-dnl     http://www.apache.org/licenses/LICENSE-2.0
+-dnl
+-dnl Unless required by applicable law or agreed to in writing, software
+-dnl distributed under the License is distributed on an "AS IS" BASIS,
+-dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-dnl See the License for the specific language governing permissions and
+-dnl limitations under the License.
+-
+-dnl
+-dnl TS_ADDTO(variable, value)
+-dnl
+-dnl  Add value to variable
+-dnl
+-AC_DEFUN([TS_ADDTO], [
+-  if test "x$$1" = "x"; then
+-    test "x$verbose" = "xyes" && echo "  setting $1 to \"$2\""
+-    $1="$2"
+-  else
+-    ats_addto_bugger="$2"
+-    for i in $ats_addto_bugger; do
+-      ats_addto_duplicate="0"
+-      for j in $$1; do
+-        if test "x$i" = "x$j"; then
+-          ats_addto_duplicate="1"
+-          break
+-        fi
+-      done
+-      if test $ats_addto_duplicate = "0"; then
+-        test "x$verbose" = "xyes" && echo "  adding \"$i\" to $1"
+-        $1="$$1 $i"
+-      fi
+-    done
+-  fi
+-])dnl
+-
+-dnl
+-dnl TS_ADDTO_RPATH(path)
+-dnl
+-dnl   Adds path to variable with the '-rpath' directive.
+-dnl
+-AC_DEFUN([TS_ADDTO_RPATH], [
+-  AC_MSG_NOTICE([adding $1 to RPATH])
+-  TS_ADDTO(LIBTOOL_LINK_FLAGS, [-R$1])
+-])dnl
+-
+-dnl
+-dnl pcre.m4: Trafficserver's pcre autoconf macros
+-dnl
+-
+-dnl
+-dnl TS_CHECK_PCRE: look for pcre libraries and headers
+-dnl
+-AC_DEFUN([TS_CHECK_PCRE], [
+-enable_pcre=no
+-AC_ARG_WITH(pcre, [AC_HELP_STRING([--with-pcre=DIR],[use a specific pcre library])],
+-[
+-  if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+-    pcre_base_dir="$withval"
+-    if test "$withval" != "no"; then
+-      enable_pcre=yes
+-      case "$withval" in
+-      *":"*)
+-        pcre_include="`echo $withval |sed -e 's/:.*$//'`"
+-        pcre_ldflags="`echo $withval |sed -e 's/^.*://'`"
+-        AC_MSG_CHECKING(checking for pcre includes in $pcre_include libs in $pcre_ldflags )
+-        ;;
+-      *)
+-        pcre_include="$withval/include"
+-        pcre_ldflags="$withval/lib"
+-        AC_MSG_CHECKING(checking for pcre includes in $withval)
+-        ;;
+-      esac
+-    fi
+-  fi
+-],
+-[
+-  AC_CHECK_PROG(PCRE_CONFIG, pcre-config, pcre-config)
+-  if test "x$PCRE_CONFIG" != "x"; then
+-    enable_pcre=yes
+-    pcre_base_dir="`$PCRE_CONFIG --prefix`"
+-    pcre_include="`$PCRE_CONFIG --cflags | sed -es/-I//`"
+-    pcre_ldflags="`$PCRE_CONFIG --libs | sed -es/-lpcre// -es/-L//`"
+-  fi
+-])
+-
+-if test "x$pcre_base_dir" = "x"; then
+-  AC_MSG_CHECKING([for pcre location])
+-  AC_CACHE_VAL(ats_cv_pcre_dir,[
+-  for dir in /usr/local /usr ; do
+-    if test -d $dir && ( test -f $dir/include/pcre.h || test -f $dir/include/pcre/pcre.h ); then
+-      ats_cv_pcre_dir=$dir
+-      break
+-    fi
+-  done
+-  ])
+-  pcre_base_dir=$ats_cv_pcre_dir
+-  if test "x$pcre_base_dir" = "x"; then
+-    enable_pcre=no
+-    AC_MSG_RESULT([not found])
+-  else
+-    enable_pcre=yes
+-    pcre_include="$pcre_base_dir/include"
+-    pcre_ldflags="$pcre_base_dir/lib"
+-    AC_MSG_RESULT([$pcre_base_dir])
+-  fi
+-else
+-  AC_MSG_CHECKING(for pcre headers in $pcre_include)
+-  if test -d $pcre_include && test -d $pcre_ldflags && ( test -f $pcre_include/pcre.h || test -f $pcre_include/pcre/pcre.h ); then
+-    AC_MSG_RESULT([ok])
+-  else
+-    AC_MSG_RESULT([not found])
+-  fi
+-fi
+-
+-pcreh=0
+-pcre_pcreh=0
+-if test "$enable_pcre" != "no"; then
+-  saved_ldflags=$LDFLAGS
+-  saved_cppflags=$CFLAGS
+-  pcre_have_headers=0
+-  pcre_have_libs=0
+-  if test "$pcre_base_dir" != "/usr"; then
+-    TS_ADDTO(CFLAGS, [-I${pcre_include}])
+-    TS_ADDTO(CFLAGS, [-DPCRE_STATIC])
+-    TS_ADDTO(LDFLAGS, [-L${pcre_ldflags}])
+-    TS_ADDTO_RPATH(${pcre_ldflags})
+-  fi
+-  AC_SEARCH_LIBS([pcre_exec], [pcre], [pcre_have_libs=1])
+-  if test "$pcre_have_libs" != "0"; then
+-    AC_CHECK_HEADERS(pcre.h, [pcre_have_headers=1])
+-    AC_CHECK_HEADERS(pcre/pcre.h, [pcre_have_headers=1])
+-  fi
+-  if test "$pcre_have_headers" != "0"; then
+-    AC_DEFINE(HAVE_LIBPCRE,1,[Compiling with pcre support])
+-    AC_SUBST(LIBPCRE, [-lpcre])
+-  else
+-    enable_pcre=no
+-    CFLAGS=$saved_cppflags
+-    LDFLAGS=$saved_ldflags
+-  fi
+-fi
+-AC_SUBST(pcreh)
+-AC_SUBST(pcre_pcreh)
+-])
+--- /dev/null
++++ b/m4/pcre2.m4
+@@ -0,0 +1,181 @@
++dnl -------------------------------------------------------- -*- autoconf -*-
++dnl Licensed to the Apache Software Foundation (ASF) under one or more
++dnl contributor license agreements.  See the NOTICE file distributed with
++dnl this work for additional information regarding copyright ownership.
++dnl The ASF licenses this file to You under the Apache License, Version 2.0
++dnl (the "License"); you may not use this file except in compliance with
++dnl the License.  You may obtain a copy of the License at
++dnl
++dnl     http://www.apache.org/licenses/LICENSE-2.0
++dnl
++dnl Unless required by applicable law or agreed to in writing, software
++dnl distributed under the License is distributed on an "AS IS" BASIS,
++dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++dnl See the License for the specific language governing permissions and
++dnl limitations under the License.
++
++dnl Modified by Syrone Wong <wong.syrone@gmail.com> to support pcre2 8bit variant only
++
++dnl
++dnl TS_ADDTO(variable, value)
++dnl
++dnl  Add value to variable
++dnl
++AC_DEFUN([TS_ADDTO], [
++  if test "x$$1" = "x"; then
++    test "x$verbose" = "xyes" && echo "  setting $1 to \"$2\""
++    $1="$2"
++  else
++    ats_addto_bugger="$2"
++    for i in $ats_addto_bugger; do
++      ats_addto_duplicate="0"
++      for j in $$1; do
++        if test "x$i" = "x$j"; then
++          ats_addto_duplicate="1"
++          break
++        fi
++      done
++      if test $ats_addto_duplicate = "0"; then
++        test "x$verbose" = "xyes" && echo "  adding \"$i\" to $1"
++        $1="$$1 $i"
++      fi
++    done
++  fi
++])dnl
++
++dnl
++dnl TS_ADDTO_RPATH(path)
++dnl
++dnl   Adds path to variable with the '-rpath' directive.
++dnl
++AC_DEFUN([TS_ADDTO_RPATH], [
++  AC_MSG_NOTICE([adding $1 to RPATH])
++  TS_ADDTO(LIBTOOL_LINK_FLAGS, [-R$1])
++])dnl
++
++dnl
++dnl pcre2.m4: Trafficserver's pcre2 autoconf macros
++dnl
++
++dnl
++dnl TS_CHECK_PCRE2: look for pcre2 libraries and headers
++dnl
++AC_DEFUN([TS_CHECK_PCRE2], [
++enable_pcre2=no
++AC_ARG_WITH(pcre2, [AC_HELP_STRING([--with-pcre2=DIR],[use a specific pcre2 library])],
++[
++  if test "x$withval" != "xyes" && test "x$withval" != "x"; then
++    pcre2_base_dir="$withval"
++    if test "$withval" != "no"; then
++      enable_pcre2=yes
++      case "$withval" in
++      *":"*)
++        pcre2_include="`echo $withval |sed -e 's/:.*$//'`"
++        pcre2_ldflags="`echo $withval |sed -e 's/^.*://'`"
++        AC_MSG_CHECKING(checking for pcre2 includes in $pcre2_include libs in $pcre2_ldflags )
++        ;;
++      *)
++        pcre2_include="$withval/include"
++        pcre2_ldflags="$withval/lib"
++        AC_MSG_CHECKING(checking for pcre2 includes in $withval)
++        ;;
++      esac
++    fi
++  fi
++],
++[
++  AC_CHECK_PROG(PCRE2_CONFIG, pcre2-config, pcre2-config)
++  if test "x$PCRE2_CONFIG" != "x"; then
++    enable_pcre2=yes
++    pcre2_base_dir="`$PCRE2_CONFIG --prefix`"
++    pcre2_include="`$PCRE2_CONFIG --cflags | sed -es/-I//`"
++    pcre2_ldflags="`$PCRE2_CONFIG --libs8 | sed -es/-lpcre2-8// -es/-L//`"
++  fi
++])
++
++if test "x$pcre2_base_dir" = "x"; then
++  AC_MSG_CHECKING([for pcre2 location])
++  AC_CACHE_VAL(ats_cv_pcre2_dir,[
++  for dir in /usr/local /usr ; do
++    if test -d $dir && ( test -f $dir/include/pcre2.h || test -f $dir/include/pcre2/pcre2.h ); then
++      ats_cv_pcre2_dir=$dir
++      break
++    fi
++  done
++  ])
++  pcre2_base_dir=$ats_cv_pcre2_dir
++  if test "x$pcre2_base_dir" = "x"; then
++    enable_pcre2=no
++    AC_MSG_RESULT([not found])
++  else
++    enable_pcre2=yes
++    pcre2_include="$pcre2_base_dir/include"
++    pcre2_ldflags="$pcre2_base_dir/lib"
++    AC_MSG_RESULT([$pcre2_base_dir])
++  fi
++else
++  AC_MSG_CHECKING(for pcre2 headers in $pcre2_include)
++  if test -d $pcre2_include && test -d $pcre2_ldflags && ( test -f $pcre2_include/pcre2.h || test -f $pcre2_include/pcre2/pcre2.h ); then
++    AC_MSG_RESULT([ok])
++  else
++    AC_MSG_RESULT([not found])
++  fi
++fi
++
++pcre2h=0
++pcre2_pcre2h=0
++if test "$enable_pcre2" != "no"; then
++  saved_ldflags=$LDFLAGS
++  saved_cppflags=$CFLAGS
++  pcre2_have_headers=0
++  pcre2_have_libs=0
++  if test "$pcre2_base_dir" != "/usr"; then
++    TS_ADDTO(CFLAGS, [-I${pcre2_include}])
++    TS_ADDTO(CFLAGS, [-DPCRE2_STATIC])
++    TS_ADDTO(LDFLAGS, [-L${pcre2_ldflags}])
++    TS_ADDTO_RPATH(${pcre2_ldflags})
++  fi
++  AC_SEARCH_LIBS([pcre2_match_8], [pcre2-8], [pcre2_have_libs=1])
++  if test "$pcre2_have_libs" != "0"; then
++      AC_MSG_CHECKING([pcre2.h])
++  AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++      [[
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++      ]],
++      [[
++      ]]
++    )],
++    [pcre2_have_headers=1
++    AC_MSG_RESULT([ok])],
++    [AC_MSG_RESULT([not found])]
++  )
++
++    AC_MSG_CHECKING([pcre2/pcre2.h])
++  AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++      [[
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2/pcre2.h>
++      ]],
++      [[
++      ]]
++    )],
++    [pcre2_have_headers=1
++    AC_MSG_RESULT([ok])],
++    [AC_MSG_RESULT([not found])]
++  )
++  fi
++  if test "$pcre2_have_headers" != "0"; then
++    AC_DEFINE(HAVE_LIBPCRE2,1,[Compiling with pcre2 support])
++    AC_SUBST(LIBPCRE2, [-lpcre2-8])
++  else
++    enable_pcre2=no
++    CFLAGS=$saved_cppflags
++    LDFLAGS=$saved_ldflags
++  fi
++fi
++AC_SUBST(pcre2h)
++AC_SUBST(pcre2_pcre2h)
++])
+--- a/src/rule.c
++++ b/src/rule.c
+@@ -1,6 +1,7 @@
+ /*
+  * Copyright (c) 2011 and 2012, Dustin Lundquist <dustin@null-ptr.net>
+  * Copyright (c) 2011 Manuel Kasper <mk@neon1.net>
++ * Copyright (c) 2017 Syrone Wong <wong.syrone@gmail.com>
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -74,18 +75,37 @@ add_rule(struct cork_dllist *rules, rule
+     cork_dllist_add(rules, &rule->entries);
+ }
++/*
++ * XXX: As pattern and subject are char arguments, they can be straightforwardly
++ *      cast to PCRE2_SPTR as we are working in 8-bit code units.
++ */
++
+ int
+ init_rule(rule_t *rule)
+ {
+     if (rule->pattern_re == NULL) {
+-        const char *reerr;
+-        int reerroffset;
++        int errornumber;
++        PCRE2_SIZE erroroffset;
++        rule->pattern_re = pcre2_compile(
++            (PCRE2_SPTR)rule->pattern,   /* the pattern */
++            PCRE2_ZERO_TERMINATED,       /* indicates pattern is zero-terminated */
++            0,                           /* default options */
++            &errornumber,                /* for error number */
++            &erroroffset,                /* for error offset */
++            NULL);                       /* use default compile context */
+-        rule->pattern_re =
+-            pcre_compile(rule->pattern, 0, &reerr, &reerroffset, NULL);
+         if (rule->pattern_re == NULL) {
+-            LOGE("Regex compilation of \"%s\" failed: %s, offset %d",
+-                 rule->pattern, reerr, reerroffset);
++            PCRE2_UCHAR errbuffer[512];
++            pcre2_get_error_message(errornumber, errbuffer, sizeof(errbuffer));
++            LOGE("PCRE2 regex compilation failed at offset %d: %s\n", (int)erroroffset,
++                 errbuffer);
++            return 0;
++        }
++
++        rule->pattern_re_match_data = pcre2_match_data_create_from_pattern(rule->pattern_re, NULL);
++
++        if (rule->pattern_re_match_data == NULL) {
++            ERROR("PCRE2: the memory for the block could not be obtained");
+             return 0;
+         }
+     }
+@@ -105,8 +125,15 @@ lookup_rule(const struct cork_dllist *ru
+     cork_dllist_foreach_void(rules, curr, next) {
+         rule_t *rule = cork_container_of(curr, rule_t, entries);
+-        if (pcre_exec(rule->pattern_re, NULL,
+-                      name, name_len, 0, 0, NULL, 0) >= 0)
++        if (pcre2_match(
++                rule->pattern_re,            /* the compiled pattern */
++                (PCRE2_SPTR)name,            /* the subject string */
++                name_len,                    /* the length of the subject */
++                0,                           /* start at offset 0 in the subject */
++                0,                           /* default options */
++                rule->pattern_re_match_data, /* block for storing the result */
++                NULL                         /* use default match context */
++                ) >= 0)
+             return rule;
+     }
+@@ -127,7 +154,13 @@ free_rule(rule_t *rule)
+         return;
+     ss_free(rule->pattern);
+-    if (rule->pattern_re != NULL)
+-        pcre_free(rule->pattern_re);
++    if (rule->pattern_re != NULL) {
++        pcre2_code_free(rule->pattern_re);                    /* data and the compiled pattern. */
++        rule->pattern_re            = NULL;
++    }
++    if (rule->pattern_re_match_data != NULL) {
++        pcre2_match_data_free(rule->pattern_re_match_data);   /* Release memory used for the match */
++        rule->pattern_re_match_data = NULL;
++    }
+     ss_free(rule);
+ }
+--- a/src/rule.h
++++ b/src/rule.h
+@@ -1,6 +1,7 @@
+ /*
+  * Copyright (c) 2011 and 2012, Dustin Lundquist <dustin@null-ptr.net>
+  * Copyright (c) 2011 Manuel Kasper <mk@neon1.net>
++ * Copyright (c) 2017 Syrone Wong <wong.syrone@gmail.com>
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -33,17 +34,27 @@
+ #include <libcork/ds.h>
+-#ifdef HAVE_PCRE_H
+-#include <pcre.h>
+-#elif HAVE_PCRE_PCRE_H
+-#include <pcre/pcre.h>
+-#endif
++/*
++ * The PCRE2_CODE_UNIT_WIDTH macro must be defined before including pcre2.h.
++ * For a program that uses only one code unit width, setting it to 8, 16, or 32
++ * makes it possible to use generic function names such as pcre2_compile(). Note
++ * that just changing 8 to 16 (for example) is not sufficient to convert this
++ * program to process 16-bit characters. Even in a fully 16-bit environment, where
++ * string-handling functions such as strcmp() and printf() work with 16-bit
++ * characters, the code for handling the table of named substrings will still need
++ * to be modified.
++ */
++/* we only need to support ASCII chartable, thus set it to 8 */
++#define PCRE2_CODE_UNIT_WIDTH 8
++
++#include <pcre2.h>
+ typedef struct rule {
+     char *pattern;
+     /* Runtime fields */
+-    pcre *pattern_re;
++    pcre2_code *pattern_re;
++    pcre2_match_data *pattern_re_match_data;
+     struct cork_dllist_item entries;
+ } rule_t;
index 20a7c6dd0c8ea86c65768ed77c8050c403456148..5a4588f1e3e6e094c345c519d031058c9cd61117 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sing-box
-PKG_VERSION:=1.5.2
+PKG_VERSION:=1.5.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=ad344a5fe0a515e3e5d0ab8102482b4a3d38932cf754756e1d48db17d36a5609
+PKG_HASH:=3238492e21246b56ef80e99f321c26ffaf9ac8877c916dce85273b61031c58b7
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
index 73b36d78b89ea9ad5cb9146eca03ee3bbc80ce4e..c23fd87dd33e270140640fab97024a369fb5b432 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snowflake
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.7.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=c6a7ef515bae874c42220ab52dd597c08df4569e7d97f700e5c80c8946e205bd
+PKG_MIRROR_HASH:=3156dbeffaea82761372c7e64322cf9c24a05894c54ccb0d80eaed61b54e08c6
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -41,11 +41,6 @@ $(call Package/snowflake/Default)
   TITLE+= Client
 endef
 
-define Package/snowflake-distinctcounter
-$(call Package/snowflake/Default)
-  TITLE+= Distinct Counter
-endef
-
 define Package/snowflake-probetest
 $(call Package/snowflake/Default)
   TITLE+= Probe test
@@ -81,12 +76,6 @@ $(call Package/snowflake/description/Default)
 This package contains the Snowflake client which provides the bridge to TOR.
 endef
 
-define Package/snowflake-distinctcounter/description
-$(call Package/snowflake/description/Default)
-
-This package provides the Snowflake distinct counter service.
-endef
-
 define Package/snowflake-probetest/description
 $(call Package/snowflake/description/Default)
 
@@ -115,11 +104,6 @@ define Package/snowflake-client/install
        $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/client $(1)/usr/bin/snowflake-client
 endef
 
-define Package/snowflake-distinctcounter/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/distinctcounter $(1)/usr/bin/snowflake-distinctcounter
-endef
-
 define Package/snowflake-probetest/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/probetest $(1)/usr/bin/snowflake-probetest
@@ -138,7 +122,6 @@ endef
 
 $(eval $(call BuildPackage,snowflake-broker))
 $(eval $(call BuildPackage,snowflake-client))
-$(eval $(call BuildPackage,snowflake-distinctcounter))
 $(eval $(call BuildPackage,snowflake-probetest))
 $(eval $(call BuildPackage,snowflake-proxy))
 $(eval $(call BuildPackage,snowflake-server))
index 756d2785c0d1adbc59b3c496cae6b3f3b2fd1642..da2e478335a6d2f2780be09f192a209878d8b5c7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
 PKG_VERSION:=0.4.8.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
index 142e2512def11559dcf42df3d47ea40feaaa677e..cb1cb73c5cd4159ba7f634ac19886811c7479f03 100644 (file)
@@ -32,7 +32,7 @@ generate_conf() {
 }
 
 reload_service() {
-       procd_send_signal /usr/sbin/tor
+       procd_send_signal tor
 }
 
 start_service() {
index 0fd6f23b982f965c4350d59fb72ed0d958a4c035..c71f947a32cf76185a047e6baa9d807a6ddb5ebc 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
-PKG_VERSION:=4.0.3
-PKG_RELEASE:=5
+PKG_VERSION:=4.0.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/transmission/transmission/releases/download/$(PKG_VERSION)/
-PKG_HASH:=b6b01fd58e42bb14f7aba0253db932ced050fcd2bba5d9f8469d77ddd8ad545a
+PKG_HASH:=15f7b4318fdfbffb19aa8d9a6b0fd89348e6ef1e86baa21a0806ffd1893bd5a6
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0-or-later
index b04b069cadeae5dd50ee002e35068c1ea42c8beb..eded8aa393ff5849b7e1e835e195f68d9da77c32 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=2.1.0
+PKG_VERSION:=2.1.1
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 69bf321fcc34bff103a75c70f046a1fa4258c2b6..c089e668ea53cf33132ba271127b4aa73008f51b 100644 (file)
@@ -32,7 +32,7 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
 * status & debug logging to syslog
 
 ## Prerequisites
-* [OpenWrt](https://openwrt.org), only compatible with the forthcoming stable 20.x or the latest OpenWrt snapshot
+* [OpenWrt](https://openwrt.org), tested/compatible with current stable 23.x and latest OpenWrt snapshot
 * 'dnsmasq' as dns backend
 * 'iwinfo' for wlan scanning
 * 'curl' for connection checking and all kinds of captive portal magic, e.g. cp detection and auto-logins
@@ -55,7 +55,7 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
 * happy traveling ...
 
 ## Travelmate config options
-* usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' section:
+* usually the pre-configured travelmate setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' section:  
 
 | Option             | Default                            | Description/Valid Values                                                                              |
 | :----------------- | :--------------------------------- | :---------------------------------------------------------------------------------------------------- |
@@ -83,8 +83,11 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
 | trm_mailsender     | no-reply@travelmate                | e-mail sender address for travelmate notifications                                                    |
 | trm_mailtopic      | travelmate connection to '<sta>'   | topic for travelmate notification E-Mails                                                             |
 | trm_mailprofile    | trm_notify                         | profile used by 'msmtp' for travelmate notification E-Mails                                           |
+| trm_stdvpnservice  | -, not set                         | standard vpn service which will be automatically added to new STA profiles                            |
+| trm_stdvpniface    | -, not set                         | standard vpn interface which will be automatically added to new STA profiles                          |
   
-* per uplink exist an additional 'uplink' section in the travelmate config, with the following options:
+
+* per uplink exist an additional 'uplink' section in the travelmate config, with the following options:  
 
 | Option             | Default                            | Description/Valid Values                                                                              |
 | :----------------- | :--------------------------------- | :---------------------------------------------------------------------------------------------------- |
@@ -102,7 +105,7 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
 | vpn                | 0, disabled                        | automatically handle VPN (re-) connections                                                            |
 | vpnservice         | -, not set                         | reference the already configured 'wireguard' or 'openvpn' client instance as vpn provider             |
 | vpniface           | -, not set                         | the logical vpn interface, e.g. 'wg0' or 'tun0'                                                       |
-  
+
 
 ## VPN client setup
 Please follow one of the following guides to get a working vpn client setup on your travel router:
@@ -110,6 +113,7 @@ Please follow one of the following guides to get a working vpn client setup on y
 * [Wireguard client setup guide](https://openwrt.org/docs/guide-user/services/vpn/wireguard/client)
 * [OpenVPN client setup guide](https://openwrt.org/docs/guide-user/services/vpn/openvpn/client)
 
+**Please note:** Make sure to uncheck the "Bring up on boot" option during vpn interface setup, so that netifd doesn't interfere with travelmate.  
 Once your vpn client connection is running, you can reference to that setup in travelmate to handle VPN (re-) connections automatically.
 
 ## E-Mail setup
@@ -161,18 +165,18 @@ Hopefully more scripts for different captive portals will be provided by the com
 
 **receive travelmate runtime information:**
 <pre><code>
-root@2go_ar750s:~# /etc/init.d/travelmate status
+root@2go:~# /etc/init.d/travelmate status
 ::: travelmate runtime information
-  + travelmate_status  : connected (net ok/100)
-  + travelmate_version : 2.0.0
-  + station_id         : radio1/WIFIonICE/-
-  + station_mac        : B2:9D:F5:96:86:A4
-  + station_interface  : trm_wwan
+  + travelmate_status  : connected (net ok/51)
+  + travelmate_version : 2.1.1
+  + station_id         : radio0/403 Forbidden/00:0C:46:24:50:00
+  + station_mac        : 94:83:C4:24:0E:4F
+  + station_interfaces : trm_wwan, wg0
   + wpa_flags          : sae: âœ”, owe: âœ”, eap: âœ”, suiteb192: âœ”
   + run_flags          : captive: âœ”, proactive: âœ”, netcheck: âœ˜, autoadd: âœ˜, randomize: âœ”
-  + ext_hooks          : ntp: Ã¢\9c\94, vpn: Ã¢\9c\98, mail: âœ˜
-  + last_run           : 2020.09.10-15:21:19
-  + system             : GL.iNet GL-AR750S (NOR/NAND), OpenWrt SNAPSHOT r14430-2dda301d40
+  + ext_hooks          : ntp: Ã¢\9c\94, vpn: Ã¢\9c\94, mail: âœ˜
+  + last_run           : 2023.10.21-14:29:14
+  + system             : GL.iNet GL-A1300, OpenWrt SNAPSHOT r24187-bb8fd41f9a
 </code></pre>
 
 To debug travelmate runtime problems, please always enable the 'trm\_debug' flag, restart travelmate and check the system log afterwards (_logread -e "trm-"_)
@@ -182,7 +186,7 @@ Please join the travelmate discussion in this [forum thread](https://forum.lede-
 
 ## Removal
 * stop the travelmate daemon with _/etc/init.d/travelmate stop_
-* optional: remove the travelmate package (_opkg remove luci-app-travelmate_, _opkg remove travelmate_)
+* remove the travelmate package (_opkg remove luci-app-travelmate_, _opkg remove travelmate_)
 
 Have fun!  
 Dirk  
index fd717c34b921145776b5c9dd20836c584ebee8c4..420da90402263ba0cb9f10769b16ec7eb97ae53f 100755 (executable)
@@ -1,15 +1,15 @@
 #!/bin/sh
 # travelmate, a wlan connection manager for travel router
-# Copyright (c) 2016-2022 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2016-2023 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,2086,3040,3043,3057,3060
+# shellcheck disable=all
 
 export LC_ALL=C
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 
-trm_ver="2.1.0"
+trm_ver="2.1.1"
 trm_enabled="0"
 trm_debug="0"
 trm_iface=""
@@ -34,6 +34,8 @@ trm_wpaflags=""
 trm_ovpninfolist=""
 trm_vpnifacelist=""
 trm_vpninfolist=""
+trm_stdvpnservice=""
+trm_stdvpniface=""
 trm_rtfile="/tmp/trm_runtime.json"
 trm_wifi="$(command -v wifi)"
 trm_fetch="$(command -v curl)"
@@ -41,7 +43,7 @@ trm_iwinfo="$(command -v iwinfo)"
 trm_logger="$(command -v logger)"
 trm_wpa="$(command -v wpa_supplicant)"
 trm_captiveurl="http://detectportal.firefox.com"
-trm_useragent="Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
+trm_useragent="Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0"
 trm_ntpfile="/var/state/travelmate.ntp"
 trm_vpnfile="/var/state/travelmate.vpn"
 trm_mailfile="/var/state/travelmate.mail"
@@ -58,7 +60,7 @@ f_env() {
                return
        fi
 
-       unset trm_stalist trm_radiolist trm_uplinklist trm_uplinkcfg trm_activesta trm_opensta
+       unset trm_stalist trm_radiolist trm_uplinklist trm_vpnifacelist trm_uplinkcfg trm_activesta trm_opensta
 
        trm_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -q -e '@.model' -e '@.release.description' |
                awk 'BEGIN{RS="";FS="\n"}{printf "%s, %s",$1,$2}')"
@@ -213,9 +215,6 @@ f_vpn() {
                                        f_log "info" "take down vpn interface '${iface}/${vpn_instance:-"-"}' (initial)"
                                fi
                        done
-                       if [ -f "/etc/init.d/sysntpd" ]; then
-                               /etc/init.d/sysntpd restart >/dev/null 2>&1
-                       fi
                        rm -f "${trm_vpnfile}"
                elif [ "${vpn}" = "1" ] && [ -n "${vpn_iface}" ] && [ "${vpn_action}" = "enable_keep" ]; then
                        for info in ${trm_vpninfolist}; do
@@ -235,7 +234,7 @@ f_vpn() {
                fi
                if [ -x "${trm_vpnpgm}" ] && [ -n "${vpn_service}" ] && [ -n "${vpn_iface}" ]; then
                        if { [ "${vpn_action}" = "disable" ] && [ -f "${trm_vpnfile}" ]; } ||
-                               { [ -f "${trm_ntpfile}" ] && {  [ "${vpn}" = "1" ] && [ "${vpn_action%_*}" = "enable" ] && [ ! -f "${trm_vpnfile}" ]; } ||
+                               { [ -s "${trm_ntpfile}" ] && { [ "${vpn}" = "1" ] && [ "${vpn_action%_*}" = "enable" ] && [ ! -f "${trm_vpnfile}" ]; } ||
                                { [ "${vpn}" != "1" ] && [ "${vpn_action%_*}" = "enable" ] && [ -f "${trm_vpnfile}" ]; }; }; then
                                        result="$(f_net)"
                                        if [ "${result}" = "net ok" ] || [ "${vpn_action}" = "disable" ]; then
@@ -298,22 +297,22 @@ f_ctrack() {
                        "start")
                                uci_remove "travelmate" "${trm_uplinkcfg}" "con_start" 2>/dev/null
                                uci_remove "travelmate" "${trm_uplinkcfg}" "con_end" 2>/dev/null
-                               if [ -f "${trm_ntpfile}" ]; then
+                               if [ -s "${trm_ntpfile}" ]; then
                                        uci_set "travelmate" "${trm_uplinkcfg}" "con_start" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
                                ;;
                        "refresh")
-                               if [ -f "${trm_ntpfile}" ] && [ -z "$(uci_get "travelmate" "${trm_uplinkcfg}" "con_start")" ]; then
+                               if [ -s "${trm_ntpfile}" ] && [ -z "$(uci_get "travelmate" "${trm_uplinkcfg}" "con_start")" ]; then
                                        uci_set "travelmate" "${trm_uplinkcfg}" "con_start" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
                                ;;
                        "end")
-                               if [ -f "${trm_ntpfile}" ]; then
+                               if [ -s "${trm_ntpfile}" ]; then
                                        uci_set "travelmate" "${trm_uplinkcfg}" "con_end" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
                                ;;
                        "start_expiry")
-                               if [ -f "${trm_ntpfile}" ]; then
+                               if [ -s "${trm_ntpfile}" ]; then
                                        expiry="$(uci_get "travelmate" "${trm_uplinkcfg}" "con_start_expiry")"
                                        uci_set "travelmate" "${trm_uplinkcfg}" "enabled" "0"
                                        uci_set "travelmate" "${trm_uplinkcfg}" "con_end" "$(date "+%Y.%m.%d-%H:%M:%S")"
@@ -321,7 +320,7 @@ f_ctrack() {
                                fi
                                ;;
                        "end_expiry")
-                               if [ -f "${trm_ntpfile}" ]; then
+                               if [ -s "${trm_ntpfile}" ]; then
                                        expiry="$(uci_get "travelmate" "${trm_uplinkcfg}" "con_end_expiry")"
                                        uci_set "travelmate" "${trm_uplinkcfg}" "enabled" "1"
                                        uci_remove "travelmate" "${trm_uplinkcfg}" "con_start" 2>/dev/null
@@ -331,7 +330,7 @@ f_ctrack() {
                                ;;
                        "disabled")
                                uci_set "travelmate" "${trm_uplinkcfg}" "enabled" "0"
-                               if [ -f "${trm_ntpfile}" ]; then
+                               if [ -s "${trm_ntpfile}" ]; then
                                        uci_set "travelmate" "${trm_uplinkcfg}" "con_end" "$(date "+%Y.%m.%d-%H:%M:%S")"
                                fi
                                ;;
@@ -536,7 +535,7 @@ f_setif() {
 # add open uplinks
 #
 f_addsta() {
-       local uci_cfg new_uplink="1" offset="1" radio="${1}" essid="${2}"
+       local wifi_cfg trm_cfg new_uplink="1" offset="1" radio="${1}" essid="${2}"
 
        if [ "${trm_maxautoadd}" = "0" ] || [ "${trm_opensta:-0}" -lt "${trm_maxautoadd}" ]; then
                config_cb() {
@@ -557,39 +556,45 @@ f_addsta() {
        fi
 
        if [ "${new_uplink}" = "1" ]; then
-               uci_cfg="trm_uplink$((offset + 1))"
-               while [ -n "$(uci_get "wireless.${uci_cfg}")" ]; do
+               wifi_cfg="trm_uplink$((offset + 1))"
+               while [ -n "$(uci_get "wireless.${wifi_cfg}")" ]; do
                        offset="$((offset + 1))"
-                       uci_cfg="trm_uplink${offset}"
+                       wifi_cfg="trm_uplink${offset}"
                done
                uci -q batch <<-EOC
-                       set wireless."${uci_cfg}"="wifi-iface"
-                       set wireless."${uci_cfg}".mode="sta"
-                       set wireless."${uci_cfg}".network="${trm_iface}"
-                       set wireless."${uci_cfg}".device="${radio}"
-                       set wireless."${uci_cfg}".ssid="${essid}"
-                       set wireless."${uci_cfg}".encryption="none"
-                       set wireless."${uci_cfg}".disabled="1"
+                       set wireless."${wifi_cfg}"="wifi-iface"
+                       set wireless."${wifi_cfg}".mode="sta"
+                       set wireless."${wifi_cfg}".network="${trm_iface}"
+                       set wireless."${wifi_cfg}".device="${radio}"
+                       set wireless."${wifi_cfg}".ssid="${essid}"
+                       set wireless."${wifi_cfg}".encryption="none"
+                       set wireless."${wifi_cfg}".disabled="1"
                EOC
-               uci_cfg="$(uci -q add travelmate uplink)"
+               trm_cfg="$(uci -q add travelmate uplink)"
                uci -q batch <<-EOC
-                       set travelmate."${uci_cfg}".device="${radio}"
-                       set travelmate."${uci_cfg}".ssid="${essid}"
-                       set travelmate."${uci_cfg}".opensta="1"
-                       set travelmate."${uci_cfg}".con_start_expiry="0"
-                       set travelmate."${uci_cfg}".con_end_expiry="0"
-                       set travelmate."${uci_cfg}".enabled="1"
+                       set travelmate."${trm_cfg}".device="${radio}"
+                       set travelmate."${trm_cfg}".ssid="${essid}"
+                       set travelmate."${trm_cfg}".opensta="1"
+                       set travelmate."${trm_cfg}".con_start_expiry="0"
+                       set travelmate."${trm_cfg}".con_end_expiry="0"
+                       set travelmate."${trm_cfg}".enabled="1"
                EOC
-               if [ -n "$(uci -q changes "travelmate")" ] || [ -n "$(uci -q changes "wireless")" ]; then
-                       trm_opensta="$((trm_opensta + 1))"
-                       uci_commit "travelmate"
-                       uci_commit "wireless"
-                       f_wifi
-                       if [ ! -f "${trm_refreshfile}" ]; then
-                               printf "%s" "ui_reload" >"${trm_refreshfile}"
-                       fi
-                       f_log "info" "open uplink '${radio}/${essid}' added to wireless config"
+               if [ -n "${trm_stdvpnservice}" ] && [ -n "${trm_stdvpniface}" ]; then
+                       uci -q batch <<-EOC
+                               set travelmate."${trm_cfg}".vpnservice="${trm_stdvpnservice}"
+                               set travelmate."${trm_cfg}".vpniface="${trm_stdvpniface}"
+                               set travelmate."${trm_cfg}".vpn="1"
+                       EOC
                fi
+               trm_opensta="$((trm_opensta + 1))"
+               uci_commit "travelmate"
+               uci_commit "wireless"
+               f_wifi
+               if [ ! -f "${trm_refreshfile}" ]; then
+                       printf "%s" "ui_reload" >"${trm_refreshfile}"
+               fi
+               f_log "info" "open uplink '${radio}/${essid}' added to wireless config"
+               printf "%s" "${wifi_cfg}-${radio}"
        fi
        f_log "debug" "f_addsta  ::: radio: ${radio:-"-"}, essid: ${essid}, opensta/maxautoadd: ${trm_opensta:-"-"}/${trm_maxautoadd:-"-"}, new_uplink: ${new_uplink}, offset: ${offset}"
 }
@@ -643,7 +648,7 @@ f_net() {
 # check interface status
 #
 f_check() {
-       local ifname radio dev_status result login_script login_script_args cp_domain wait_time="1" enabled="1" mode="${1}" status="${2}" sta_radio="${3}" sta_essid="${4}" sta_bssid="${5}"
+       local ifname radio dev_status result login_script login_script_args cp_domain wait_time="0" enabled="1" mode="${1}" status="${2}" sta_radio="${3}" sta_essid="${4}" sta_bssid="${5}"
 
        if [ "${mode}" = "initial" ] || [ "${mode}" = "dev" ]; then
                json_get_var station_id "station_id"
@@ -663,6 +668,8 @@ f_check() {
                f_wifi
        fi
        while [ "${wait_time}" -le "${trm_maxwait}" ]; do
+               [ "${wait_time}" -gt "0" ] && sleep 1
+               wait_time="$((wait_time + 1))"
                dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
                if [ -n "${dev_status}" ]; then
                        if [ "${mode}" = "dev" ]; then
@@ -681,8 +688,10 @@ f_check() {
                        else
                                ifname="$(printf "%s" "${dev_status}" | jsonfilter -q -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
                                if [ -n "${ifname}" ] && [ "${enabled}" = "1" ]; then
-                                       trm_ifquality="$(${trm_iwinfo} "${ifname}" info 2>/dev/null | awk -F '[ ]' '/Link Quality:/{split($NF,var0,"/");printf "%i\n",(var0[1]*100/var0[2])}')"
-                                       if [ "${trm_ifquality}" -ge "${trm_minquality}" ]; then
+                                       trm_ifquality="$(${trm_iwinfo} "${ifname}" info 2>/dev/null | awk -F '[ ]' '/Link Quality: [0-9]+\/[0-9]+/{split($NF,var0,"/");printf "%i\n",(var0[1]*100/var0[2])}')"
+                                       if [ -z "${trm_ifquality}" ]; then
+                                               continue
+                                       elif [ "${trm_ifquality}" -ge "${trm_minquality}" ]; then
                                                trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -q -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
                                                if [ "${trm_ifstatus}" = "true" ]; then
                                                        result="$(f_net)"
@@ -768,8 +777,6 @@ f_check() {
                        f_jsnup
                        break
                fi
-               wait_time="$((wait_time + 1))"
-               sleep 1
        done
        f_log "debug" "f_check   ::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, enabled: ${enabled}, connection: ${trm_connection:-"-"}, wait: ${wait_time}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}, netcheck: ${trm_netcheck}"
 }
@@ -777,7 +784,7 @@ f_check() {
 # update runtime information
 #
 f_jsnup() {
-       local vpn vpn_iface section last_date last_station sta_iface sta_radio sta_essid sta_bssid sta_mac dev_status last_status status="${trm_ifstatus}" ntp_done="0" vpn_done="0" mail_done="0"
+       local vpn vpn_iface section last_date sta_iface sta_radio sta_essid sta_bssid sta_mac dev_status status="${trm_ifstatus}" ntp_done="0" vpn_done="0" mail_done="0"
 
        if [ "${status}" = "true" ]; then
                status="connected (${trm_connection:-"-"})"
@@ -792,16 +799,7 @@ f_jsnup() {
                        f_getcfg "${sta_radio}" "${sta_essid}" "${sta_bssid}"
                fi
                json_get_var last_date "last_run"
-               json_get_var last_station "station_id"
-               json_get_var last_status "travelmate_status"
-
-               if { [ -f "${trm_ntpfile}" ] && [ ! -s "${trm_ntpfile}" ]; } || [ "${last_status}" = "running (not connected)" ] ||
-                       { [ -n "${last_station}" ] && [ "${last_station}" != "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}" ]; }; then
-                       last_date="$(date "+%Y.%m.%d-%H:%M:%S")"
-                       if [ -f "${trm_ntpfile}" ] && [ ! -s "${trm_ntpfile}" ]; then
-                               printf "%s" "${last_date}" >"${trm_ntpfile}"
-                       fi
-               fi
+
                vpn="$(f_getval "vpn")"
                if  [ "${trm_vpn}" = "1" ] && [ -n "${trm_vpninfolist}" ] && [ "${vpn}" = "1" ] && [ -f "${trm_vpnfile}" ]; then
                        vpn_iface="$(f_getval "vpniface")"                      
@@ -942,6 +940,18 @@ f_main() {
                                        if [ -n "${scan_quality}" ] && [ -n "${scan_open}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]; then
                                                f_log "debug" "f_main-7  ::: radio(sta/scan): ${sta_radio}/${radio}, essid(sta/scan): \"${sta_essid}\"/${scan_essid}, bssid(sta/scan): ${sta_bssid}/${scan_bssid}, quality(min/scan): ${trm_minquality}/${scan_quality}, open: ${scan_open}"
                                                if [ "${scan_quality}" -ge "${trm_minquality}" ]; then
+                                                       if [ "${trm_autoadd}" = "1" ] && [ "${scan_open}" = "+" ] && [ "${scan_essid}" != "unknown" ]; then
+                                                               open_essid="${scan_essid%?}"
+                                                               open_essid="${open_essid:1}"
+                                                               result="$(f_addsta "${radio}" "${open_essid}")"
+                                                               if [ -n "${result}" ]; then
+                                                                       section="${result%%-*}"
+                                                                       sta_radio="$(uci_get "wireless" "${section}" "device")"
+                                                                       sta_essid="$(uci_get "wireless" "${section}" "ssid")"
+                                                                       sta_bssid=""
+                                                                       sta_mac=""
+                                                               fi
+                                                       fi
                                                        if { { [ "${scan_essid}" = "\"${sta_essid}\"" ] && { [ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ]; }; } ||
                                                                { [ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ]; }; } && [ "${radio}" = "${sta_radio}" ]; then
                                                                if [ -n "${config_radio}" ]; then
@@ -984,10 +994,6 @@ f_main() {
                                                                        retrycnt="$((retrycnt + 1))"
                                                                        sleep "$((trm_maxwait / 6))"
                                                                done
-                                                       elif [ "${trm_autoadd}" = "1" ] && [ "${scan_open}" = "+" ] && [ "${scan_essid}" != "unknown" ]; then
-                                                               scan_essid="${scan_essid%?}"
-                                                               scan_essid="${scan_essid:1}"
-                                                               f_addsta "${radio}" "${scan_essid}"
                                                        fi
                                                fi
                                        fi
@@ -1009,6 +1015,13 @@ else
        f_log "err" "system libraries not found"
 fi
 
+# force ntp restart/sync
+#
+if [ -f "/etc/init.d/sysntpd" ] && [ ! -s "${trm_ntpfile}" ]; then
+       /etc/init.d/sysntpd restart >/dev/null 2>&1
+       f_log "debug" "ntp time sync requested"
+fi
+
 # control travelmate actions
 #
 while true; do
index ed8bd30b2e9e409b350f5d23e1f07032797517f1..92793e15b2513b8a0da3b3749d666aaa0eaabdb0 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 # vpn handler called by travelmate
-# Copyright (c) 2020-2022 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2020-2023 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=1091,3040,3043
+# shellcheck disable=all
 
 # Please note: you have to setup the package 'wireguard' or 'openvpn' before using this script
 
@@ -20,19 +20,19 @@ vpn_iface="${4}"
 vpn_instance="${5}"
 trm_maxwait="$(uci_get travelmate global trm_maxwait "30")"
 trm_captiveurl="$(uci_get travelmate global trm_captiveurl "http://detectportal.firefox.com")"
-trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0")"
+trm_useragent="$(uci_get travelmate global trm_useragent "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0")"
 trm_logger="$(command -v logger)"
 trm_fetch="$(command -v curl)"
 trm_vpnfile="/var/state/travelmate.vpn"
 
 f_net() {
-       local json_rc result="net nok"
+       local json_rc
 
        json_rc="$(${trm_fetch} --user-agent "${trm_useragent}" --referer "http://www.example.com" --header "Cache-Control: no-cache, no-store, must-revalidate, max-age=0" --write-out "%{response_code}" --silent --output /dev/null --max-time $((trm_maxwait / 6)) "${trm_captiveurl}")"
        if [ "${json_rc}" = "200" ] || [ "${json_rc}" = "204" ]; then
-               result="net ok"
+               json_rc="net ok"
        fi
-       printf "%s" "${result}"
+       printf "%s" "${json_rc}"
 }
 
 if [ "${vpn}" = "1" ] && [ "${vpn_action%_*}" = "enable" ]; then
@@ -40,6 +40,15 @@ if [ "${vpn}" = "1" ] && [ "${vpn_action%_*}" = "enable" ]; then
                vpn_status="$(ubus -S call network.interface."${vpn_iface}" status 2>/dev/null | jsonfilter -q -l1 -e '@.up')"
        fi
        if [ "${vpn_action}" = "enable" ] || [ "${vpn_status}" != "true" ]; then
+               if [ "${vpn_status}" != "true" ]; then
+                       ifdown "${vpn_iface}"
+                       if [ "${vpn_service}" = "openvpn" ] && [ -n "${vpn_instance}" ] && [ -x "/etc/init.d/openvpn" ] && /etc/init.d/openvpn running "${vpn_instance}"; then
+                               /etc/init.d/openvpn stop "${vpn_instance}"
+                       elif [ "${vpn_service}" = "wireguard" ]; then
+                               ubus -S call network.interface."${vpn_iface}" remove >/dev/null 2>&1
+                       fi
+                       sleep 1
+               fi
                if [ "${vpn_service}" = "openvpn" ] && [ -n "${vpn_instance}" ] && [ -x "/etc/init.d/openvpn" ] && ! /etc/init.d/openvpn running "${vpn_instance}"; then
                        /etc/init.d/openvpn start "${vpn_instance}"
                fi
@@ -59,9 +68,11 @@ if [ "${vpn}" = "1" ] && [ "${vpn_action%_*}" = "enable" ]; then
                                ifdown "${vpn_iface}"
                                if [ "${vpn_service}" = "openvpn" ] && [ -n "${vpn_instance}" ] && [ -x "/etc/init.d/openvpn" ] && /etc/init.d/openvpn running "${vpn_instance}"; then
                                        /etc/init.d/openvpn stop "${vpn_instance}"
+                               elif [ "${vpn_service}" = "wireguard" ]; then
+                                       ubus -S call network.interface."${vpn_iface}" remove >/dev/null 2>&1
                                fi
                                rm -f "${trm_vpnfile}"
-                               "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${vpn_service} client connection can't be established '${vpn_iface}/${vpn_instance:-"-"}'" 2>/dev/null
+                               "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${vpn_service} client connection can't be established '${vpn_iface}/${vpn_instance:-"-", rc: ${net_status:-"-"}}'" 2>/dev/null
                                return 1
                        fi
                        sleep 1
@@ -72,6 +83,8 @@ elif { [ "${vpn}" != "1" ] && [ "${vpn_action%_*}" = "enable" ]; } || [ "${vpn_a
        ifdown "${vpn_iface}"
        if [ "${vpn_service}" = "openvpn" ] && [ -n "${vpn_instance}" ] && [ -x "/etc/init.d/openvpn" ] && /etc/init.d/openvpn running "${vpn_instance}"; then
                /etc/init.d/openvpn stop "${vpn_instance}"
+       elif [ "${vpn_service}" = "wireguard" ]; then
+               ubus -S call network.interface."${vpn_iface}" remove >/dev/null 2>&1
        fi
        rm -f "${trm_vpnfile}"
        "${trm_logger}" -p "info" -t "trm-vpn  [${$}]" "${vpn_service} client connection disabled '${vpn_iface}/${vpn_instance:-"-"}'" 2>/dev/null
index c27bea73d5b1b8f6a682623f1e269701c49a5903..5195c03dc1170a8dfbed6c267e47b2d4a137b48b 100755 (executable)
@@ -1,20 +1,16 @@
 #!/bin/sh
 # ntp hotplug script for travelmate
-# Copyright (c) 2020-2022 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2020-2023 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # set (s)hellcheck exceptions
-# shellcheck disable=3023
+# shellcheck disable=all
 
 trm_init="/etc/init.d/travelmate"
 trm_ntpfile="/var/state/travelmate.ntp"
 trm_logger="$(command -v logger)"
 
-if [ "${ACTION}" = "stratum" ] && [ ! -f "${trm_ntpfile}" ] && "${trm_init}" enabled; then
-       {
-               if flock -xn 1001; then
-                       "${trm_logger}" -p "info" -t "trm-ntp  [${$}]" "get ntp time sync" 2>/dev/null
-                       "${trm_init}" restart
-               fi
-       } 1001>"${trm_ntpfile}"
+if [ "${ACTION}" = "stratum" ] && [ ! -s "${trm_ntpfile}" ] && "${trm_init}" enabled; then
+       printf "%s" "$(date "+%Y.%m.%d-%H:%M:%S")" > "${trm_ntpfile}"
+       "${trm_logger}" -p "info" -t "trm-ntp  [${$}]" "get ntp time sync"
 fi
index b1471c7c08939c9e7f4a31854a6934728f5f9ee1..e415b14d0ec334f0f1e4da2d866e39065442db0e 100644 (file)
@@ -22,6 +22,7 @@ PKG_LICENSE:=GPL-2.0
 PKG_FORTIFY_SOURCE:=0
 PKG_BUILD_PARALLEL:=1
 
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/acpica-unix
@@ -43,6 +44,25 @@ endef
 define Build/Configure
 endef
 
+define Host/Install
+       $(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/bin
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/generate/unix/bin/{acpibin,acpidump} \
+               $(STAGING_DIR_HOST)/usr/bin/
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/generate/unix/bin/{acpiexamples,acpiexec} \
+               $(STAGING_DIR_HOST)/usr/bin/
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/generate/unix/bin/{acpihelp,acpisrc} \
+               $(STAGING_DIR_HOST)/usr/bin/
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/generate/unix/bin/{acpixtract,iasl} \
+               $(STAGING_DIR_HOST)/usr/bin/
+endef
+
+define Host/Clean
+       $(RM) $(STAGING_DIR_HOST)/usr/bin/{acpibin,acpidump}
+       $(RM) $(STAGING_DIR_HOST)/usr/bin/{acpiexamples,acpiexec}
+       $(RM) $(STAGING_DIR_HOST)/usr/bin/{acpihelp,acpisrc}
+       $(RM) $(STAGING_DIR_HOST)/usr/bin/{acpixtract,iasl}
+endef
+
 MAKE_VARS += HOST=_LINUX
 
 MAKE_PATH:=generate/unix
@@ -55,3 +75,4 @@ define Package/acpica-unix/install
 endef
 
 $(eval $(call BuildPackage,acpica-unix))
+$(eval $(call HostBuild))
index 1d3e7424f0dcb1be605f9edee3b08607ad391b27..2f134c300ad9d254ba0c613c3a98eaa7ffb3caf6 100644 (file)
@@ -1,14 +1,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=compose
-PKG_VERSION:=2.22.0
+PKG_VERSION:=2.23.0
 PKG_RELEASE:=1
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/docker/compose/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=82bd4622729cff061b3489bad96b54849a7f4b462345aade1bd374c879db9019
+PKG_HASH:=805ff38df265d05c7b0c9d5df1b77e9391f7995ac5ec66bde0325b03563e7b23
 
 PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 
diff --git a/utils/nerdctl/Makefile b/utils/nerdctl/Makefile
new file mode 100644 (file)
index 0000000..ea19ec4
--- /dev/null
@@ -0,0 +1,38 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nerdctl
+PKG_VERSION:=1.6.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/containerd/nerdctl/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=fb7660f7e598e4c502d4f0c26cf985290fc7bdc80cce1f7402020afdf83ef988
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Luca Barbato <lu_zero@gentoo.org>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_FLAGS:=no-mips16
+
+GO_PKG:=github.com/containerd/nerdctl
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/nerdctl
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=contaiNERD CTL - Docker-compatible CLI for containerd
+  URL:=https://containerd.io
+  DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/nerdctl/description
+  Docker-compatible CLI for containerd, with support for Compose, Rootless,
+  eStargz, OCIcrypt, IPFS, ...
+endef
+
+$(eval $(call GoBinPackage,nerdctl))
+$(eval $(call BuildPackage,nerdctl))
index 41eeb9c18e47c7cbfb35a1b47ebccbfc68e34feb..bb8c6398ec8f9357dd991266784c3be4aa697410 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=procs
-PKG_VERSION:=0.14.1
+PKG_VERSION:=0.14.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/dalance/procs/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=bb4f9d696081807ca105593092f8acd04ca339ae43fff29e0e820c6fc5e3f9ea
+PKG_HASH:=a3012bba984faddcf8da2a72d21eb9a7e9be8d5d86a387d321987743b0080a8c
 
 PKG_MAINTAINER:=Facundo Acevedo <facevedo@disroot.org>
 PKG_LICENSE:=MIT
diff --git a/utils/quectel-timesync/Makefile b/utils/quectel-timesync/Makefile
new file mode 100644 (file)
index 0000000..f624683
--- /dev/null
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=quectel-timesync
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/freifunk-darmstadt/quectel-timesync.git
+PKG_SOURCE_DATE:=2023-10-08
+PKG_SOURCE_VERSION:=4333888cb8025b92511597a95859943fae0a0bc8
+PKG_MIRROR_HASH:=696b878891f884318847069b0590cbdbab2ff48461864ecb418e4575935a29e3
+
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+PKG_LICENSE:=GPL-2.0-only
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/quectel-timesync
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Tool for configuring system clock using Quectel cellular modems
+  DEPENDS:=+kmod-usb-serial-option
+endef
+
+define Package/quectel-timesync/description
+This tool allows for acquiring the current time from
+the cellular network for configuring the local clock.
+Compared to NTP, this has the advantage of nut using up
+mobile traffic.
+
+It takes advantage of the AT+QLTS command found on Quectel
+modems. This functionality depends on support of the mobile
+network.
+endef
+
+define Package/quectel-timesync/conffiles
+/etc/config/quectel-timesync
+endef
+
+define Package/quectel-timesync/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
+
+       $(CP) $(PKG_BUILD_DIR)/openwrt/quectel-timesync/files/quectel-timesync.config $(1)/etc/config/quectel-timesync
+
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/quectel-timesync/files/quectel-timesync.init $(1)/etc/init.d/quectel-timesync   
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/quectel-timesync $(1)/usr/sbin/quectel-timesync
+endef
+
+$(eval $(call BuildPackage,quectel-timesync))
index 890a7be1bfdeceed30fb593737c2c72942cb4bbb..11a4cbf22bfca4de4fde12a254bcc259cb1c1e78 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stress-ng
 PKG_VERSION:=0.17.00
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ColinIanKing/stress-ng/tar.gz/refs/tags/V$(PKG_VERSION)?
diff --git a/utils/stress-ng/patches/002-core-stress-Add-musl-gcc-detection-and-HAVE_COMPILER.patch b/utils/stress-ng/patches/002-core-stress-Add-musl-gcc-detection-and-HAVE_COMPILER.patch
new file mode 100644 (file)
index 0000000..1b16110
--- /dev/null
@@ -0,0 +1,531 @@
+From cd84c46ce780242879e8aaa7d698b9cd87996dbd Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.i.king@gmail.com>
+Date: Sun, 15 Oct 2023 15:50:07 +0100
+Subject: [PATCH] core-*, stress-*: Add musl-gcc detection and
+ HAVE_COMPILER_MUSL
+
+Detect for musl-gcc and define HAVE_COMPILER_MUSL and also define
+HAVE_COMPILER_GCC_OR_MUSL for GCC or MUSL compilers. Allows one
+to differentiate between gcc tool chains with and without glibc/musl
+libc.
+
+Fixes https://github.com/ColinIanKing/stress-ng/issues/325
+
+Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
+---
+ core-attribute.h     | 56 ++++++++++++++++++++++----------------------
+ core-helper.c        |  4 ++--
+ core-pragma.h        | 18 +++++++-------
+ core-shim.c          |  2 +-
+ core-target-clones.h |  2 +-
+ core-vecmath.h       |  4 ++--
+ stress-atomic.c      |  4 ++--
+ stress-flushcache.c  |  2 +-
+ stress-lockbus.c     |  4 ++--
+ stress-malloc.c      |  4 ++--
+ stress-memthrash.c   | 12 +++++-----
+ stress-ng.h          | 32 ++++++++++++++++---------
+ stress-regs.c        |  8 +++----
+ stress-rseq.c        | 14 +++++------
+ stress-vnni.c        |  4 ++++
+ 15 files changed, 92 insertions(+), 78 deletions(-)
+
+--- a/core-attribute.h
++++ b/core-attribute.h
+@@ -20,7 +20,7 @@
+ #define CORE_ATTRIBUTE_H
+ /* warn unused attribute */
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(4, 2, 0)) ||     \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(4, 2, 0)) ||     \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0))
+ #define WARN_UNUSED   __attribute__((warn_unused_result))
+ #else
+@@ -36,7 +36,7 @@
+ #if defined(HAVE_ATTRIBUTE_FAST_MATH) &&              \
+     !defined(HAVE_COMPILER_ICC) &&                    \
+-    defined(HAVE_COMPILER_GCC) &&                     \
++    defined(HAVE_COMPILER_GCC_OR_MUSL) &&             \
+     NEED_GNUC(10, 0, 0)
+ #define OPTIMIZE_FAST_MATH __attribute__((optimize("fast-math")))
+ #else
+@@ -44,7 +44,7 @@
+ #endif
+ /* no return hint */
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(2, 5, 0)) ||     \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(2, 5, 0)) ||     \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0))
+ #define NORETURN      __attribute__((noreturn))
+ #else
+@@ -52,7 +52,7 @@
+ #endif
+ /* weak attribute */
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(4, 0, 0)) ||     \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(4, 0, 0)) ||     \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 4, 0))
+ #define WEAK          __attribute__((weak))
+ #define HAVE_WEAK_ATTRIBUTE
+@@ -64,7 +64,7 @@
+ #undef ALWAYS_INLINE
+ #endif
+ /* force inlining hint */
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(3, 4, 0)                                 \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(3, 4, 0)                         \
+      && ((!defined(__s390__) && !defined(__s390x__)) || NEED_GNUC(6, 0, 1))) ||       \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0))
+ #define ALWAYS_INLINE __attribute__((always_inline))
+@@ -73,7 +73,7 @@
+ #endif
+ /* force no inlining hint */
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(3, 4, 0)) ||     \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(3, 4, 0)) ||     \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0))
+ #define NOINLINE      __attribute__((noinline))
+ #else
+@@ -81,9 +81,9 @@
+ #endif
+ /* -O3 attribute support */
+-#if defined(HAVE_COMPILER_GCC) &&     \
+-    !defined(HAVE_COMPILER_CLANG) &&  \
+-    !defined(HAVE_COMPILER_ICC) &&    \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    !defined(HAVE_COMPILER_CLANG) &&          \
++    !defined(HAVE_COMPILER_ICC) &&            \
+     NEED_GNUC(4, 6, 0)
+ #define OPTIMIZE3     __attribute__((optimize("-O3")))
+ #else
+@@ -91,9 +91,9 @@
+ #endif
+ /* -O2 attribute support */
+-#if defined(HAVE_COMPILER_GCC) &&     \
+-    !defined(HAVE_COMPILER_CLANG) &&  \
+-    !defined(HAVE_COMPILER_ICC) &&    \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    !defined(HAVE_COMPILER_CLANG) &&          \
++    !defined(HAVE_COMPILER_ICC) &&            \
+     NEED_GNUC(4, 6, 0)
+ #define OPTIMIZE2     __attribute__((optimize("-O2")))
+ #else
+@@ -101,9 +101,9 @@
+ #endif
+ /* -O1 attribute support */
+-#if defined(HAVE_COMPILER_GCC) &&     \
+-    !defined(HAVE_COMPILER_CLANG) &&  \
+-    !defined(HAVE_COMPILER_ICC) &&    \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    !defined(HAVE_COMPILER_CLANG) &&          \
++    !defined(HAVE_COMPILER_ICC) &&            \
+     NEED_GNUC(4, 6, 0)
+ #define OPTIMIZE1     __attribute__((optimize("-O1")))
+ #else
+@@ -111,8 +111,8 @@
+ #endif
+ /* -O0 attribute support */
+-#if defined(HAVE_COMPILER_GCC) &&     \
+-    !defined(HAVE_COMPILER_ICC) &&    \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    !defined(HAVE_COMPILER_ICC) &&            \
+     NEED_GNUC(4, 6, 0)
+ #define OPTIMIZE0     __attribute__((optimize("-O0")))
+ #elif (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(10, 0, 0))
+@@ -121,10 +121,10 @@
+ #define OPTIMIZE0
+ #endif
+-#if ((defined(HAVE_COMPILER_GCC) && NEED_GNUC(3, 3, 0)) ||    \
+-     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0)) || \
+-     (defined(HAVE_COMPILER_ICC) && NEED_ICC(2021, 0, 0))) && \
+-    !defined(HAVE_COMPILER_PCC) &&                            \
++#if ((defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(3, 3, 0)) ||    \
++     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0)) ||         \
++     (defined(HAVE_COMPILER_ICC) && NEED_ICC(2021, 0, 0))) &&         \
++    !defined(HAVE_COMPILER_PCC) &&                                    \
+     !defined(__minix__)
+ #define ALIGNED(a)    __attribute__((aligned(a)))
+ #else
+@@ -136,7 +136,7 @@
+ #define ALIGN64               ALIGNED(64)
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(4, 6, 0)) ||     \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(4, 6, 0)) ||     \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0))
+ #if (defined(__APPLE__) && defined(__MACH__))
+ #define SECTION(s)    __attribute__((__section__(# s "," # s)))
+@@ -148,7 +148,7 @@
+ #endif
+ /* GCC hot attribute */
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(4, 6, 0)) ||     \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(4, 6, 0)) ||     \
+     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 3, 0))
+ #define HOT           __attribute__((hot))
+ #else
+@@ -156,10 +156,10 @@
+ #endif
+ /* GCC mlocked data and data section attribute */
+-#if ((defined(HAVE_COMPILER_GCC) && NEED_GNUC(4, 6, 0) ||     \
+-     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0)))) &&       \
+-    !defined(__sun__) &&                                      \
+-    !defined(__APPLE__) &&                                    \
++#if ((defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(4, 6, 0) ||     \
++     (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0)))) &&               \
++    !defined(__sun__) &&                                              \
++    !defined(__APPLE__) &&                                            \
+     !defined(BUILD_STATIC)
+ #define MLOCKED_TEXT  __attribute__((__section__("mlocked_text")))
+ #define MLOCKED_SECTION       (1)
+@@ -168,7 +168,7 @@
+ #endif
+ /* print format attribute */
+-#if ((defined(HAVE_COMPILER_GCC) && NEED_GNUC(3, 2, 0)) ||    \
++#if ((defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(3, 2, 0)) ||    \
+      (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(3, 0, 0)))
+ #define FORMAT(func, a, b) __attribute__((format(func, a, b)))
+ #else
+--- a/core-helper.c
++++ b/core-helper.c
+@@ -3486,8 +3486,8 @@ void NORETURN MLOCKED_TEXT stress_sig_ha
+  *  __stack_chk_fail()
+  *    override stack smashing callback
+  */
+-#if defined(HAVE_COMPILER_GCC) &&     \
+-    !defined(HAVE_COMPILER_CLANG) &&  \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    !defined(HAVE_COMPILER_CLANG) &&          \
+     defined(HAVE_WEAK_ATTRIBUTE)
+ extern void __stack_chk_fail(void);
+--- a/core-pragma.h
++++ b/core-pragma.h
+@@ -22,8 +22,8 @@
+ #define STRESS_PRAGMA_(x) _Pragma (#x)
+ #define STRESS_PRAGMA(x) STRESS_PRAGMA_(x)
+-#if defined(HAVE_PRAGMA_NO_HARD_DFP) &&       \
+-    defined(HAVE_COMPILER_GCC) &&     \
++#if defined(HAVE_PRAGMA_NO_HARD_DFP) &&               \
++    defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
+     defined(HAVE_PRAGMA)
+ #define STRESS_PRAGMA_NO_HARD_DFP      _Pragma("GCC target (\"no-hard-dfp\")")
+ #endif
+@@ -34,8 +34,8 @@
+ #define STRESS_PRAGMA_PUSH            _Pragma("GCC diagnostic push")
+ #define STRESS_PRAGMA_POP             _Pragma("GCC diagnostic pop")
+ #define STRESS_PRAGMA_WARN_OFF                _Pragma("GCC diagnostic ignored \"-Weverything\"")
+-#elif defined(HAVE_COMPILER_GCC) &&   \
+-      defined(HAVE_PRAGMA) &&         \
++#elif defined(HAVE_COMPILER_GCC_OR_MUSL) &&   \
++      defined(HAVE_PRAGMA) &&                 \
+       NEED_GNUC(7, 5, 0)
+ #define STRESS_PRAGMA_PUSH            _Pragma("GCC diagnostic push")
+ #define STRESS_PRAGMA_POP             _Pragma("GCC diagnostic pop")
+@@ -45,8 +45,8 @@
+                                       _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") \
+                                       _Pragma("GCC diagnostic ignored \"-Wnonnull\"") \
+                                       _Pragma("GCC diagnostic ignored \"-Wstringop-overflow\"")
+-#elif defined(HAVE_COMPILER_GCC) &&   \
+-      defined(HAVE_PRAGMA) &&         \
++#elif defined(HAVE_COMPILER_GCC_OR_MUSL) &&   \
++      defined(HAVE_PRAGMA) &&                 \
+       NEED_GNUC(4, 6, 0)
+ #define STRESS_PRAGMA_PUSH            _Pragma("GCC diagnostic push")
+ #define STRESS_PRAGMA_POP             _Pragma("GCC diagnostic pop")
+@@ -65,8 +65,8 @@
+     NEED_CLANG(8, 0, 0) &&            \
+     defined(HAVE_PRAGMA)
+ #define STRESS_PRAGMA_WARN_CPP_OFF    _Pragma("GCC diagnostic ignored \"-Wcpp\"")
+-#elif defined(HAVE_COMPILER_GCC) &&   \
+-      defined(HAVE_PRAGMA) &&         \
++#elif defined(HAVE_COMPILER_GCC_OR_MUSL) &&   \
++      defined(HAVE_PRAGMA) &&                 \
+       NEED_GNUC(10, 0, 0)
+ #define STRESS_PRAGMA_WARN_CPP_OFF    _Pragma("GCC diagnostic ignored \"-Wcpp\"")
+ #else
+@@ -80,7 +80,7 @@
+     NEED_CLANG(9, 0, 0)
+ #define PRAGMA_UNROLL_N(n)    STRESS_PRAGMA(unroll n)
+ #define PRAGMA_UNROLL         STRESS_PRAGMA(unroll)
+-#elif defined(HAVE_COMPILER_GCC) &&      \
++#elif defined(HAVE_COMPILER_GCC_OR_MUSL) &&      \
+     NEED_GNUC(10, 0, 0)
+ #define PRAGMA_UNROLL_N(n)    STRESS_PRAGMA(GCC unroll n)
+ #define PRAGMA_UNROLL         STRESS_PRAGMA(GCC unroll 8)
+--- a/core-shim.c
++++ b/core-shim.c
+@@ -494,7 +494,7 @@ int shim_getrandom(void *buff, size_t bu
+  */
+ void shim_flush_icache(void *begin, void *end)
+ {
+-#if defined(HAVE_COMPILER_GCC) &&     \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
+     defined(STRESS_ARCH_ARM)
+       __clear_cache(begin, end);
+ #elif defined(STRESS_ARCH_RISCV) &&           \
+--- a/core-target-clones.h
++++ b/core-target-clones.h
+@@ -138,7 +138,7 @@
+ #endif
+ #if defined(HAVE_TARGET_CLONES_GRANITERAPIDS) &&      \
+-    defined(HAVE_COMPILER_GCC)
++    defined(HAVE_COMPILER_GCC_OR_MUSL)
+ #define TARGET_CLONE_GRANITERAPIDS "arch=graniterapids",
+ #define TARGET_CLONE_USE
+ #else
+--- a/core-vecmath.h
++++ b/core-vecmath.h
+@@ -38,8 +38,8 @@
+  *  PPC64 for some reason with some flavours of the toolchain
+  *  so disable this test for now
+  */
+-#if defined(STRESS_ARCH_PPC64) && \
+-    defined(HAVE_COMPILER_GCC) && \
++#if defined(STRESS_ARCH_PPC64) &&             \
++    defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
+     __GNUC__ < 6
+ #undef HAVE_VECMATH
+ #endif
+--- a/stress-atomic.c
++++ b/stress-atomic.c
+@@ -71,7 +71,7 @@ typedef int (*atomic_func_t)(const stres
+ #if defined(HAVE_ATOMIC_FETCH_NAND)
+ #define HAVE_ATOMIC_OPS
+-#if defined(HAVE_COMPILER_GCC) && __GNUC__ != 11
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) && __GNUC__ != 11
+ #define       SHIM_ATOMIC_FETCH_NAND(ptr, val, memorder)      \
+       do { __atomic_fetch_nand(ptr, val, memorder); } while (0)
+ #else
+@@ -121,7 +121,7 @@ typedef int (*atomic_func_t)(const stres
+ #if defined(HAVE_ATOMIC_NAND_FETCH)
+ #define HAVE_ATOMIC_OPS
+-#if defined(HAVE_COMPILER_GCC) && __GNUC__ != 11
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) && __GNUC__ != 11
+ #define       SHIM_ATOMIC_NAND_FETCH(ptr, val, memorder)      \
+       do { __atomic_nand_fetch(ptr, val, memorder); } while (0)
+ #else
+--- a/stress-flushcache.c
++++ b/stress-flushcache.c
+@@ -37,7 +37,7 @@ static const stress_help_t help[] = {
+      defined(STRESS_ARCH_S390) ||     \
+      defined(STRESS_ARCH_PPC64)) &&   \
+      defined(HAVE_MPROTECT) &&                \
+-     ((defined(HAVE_COMPILER_GCC) && NEED_GNUC(4,6,0)) ||             \
++     ((defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(4,6,0)) ||     \
+       (defined(HAVE_COMPILER_CLANG) && NEED_CLANG(9,0,0)) ||          \
+       (defined(HAVE_COMPILER_ICX) && NEED_ICX(2023,2,0)) ||           \
+       (defined(HAVE_COMPILER_ICC) && NEED_ICC(2021,0,0)))
+--- a/stress-lockbus.c
++++ b/stress-lockbus.c
+@@ -37,14 +37,14 @@ static const stress_opt_set_func_t opt_s
+       { 0,                    NULL },
+ };
+-#if (((defined(HAVE_COMPILER_GCC) ||                  \
++#if (((defined(HAVE_COMPILER_GCC_OR_MUSL) ||          \
+        defined(HAVE_COMPILER_CLANG) ||                        \
+        defined(HAVE_COMPILER_ICC) ||                  \
+        defined(HAVE_COMPILER_ICX) ||                  \
+        defined(HAVE_COMPILER_TCC) ||                  \
+        defined(HAVE_COMPILER_PCC)) &&                 \
+        defined(STRESS_ARCH_X86)) ||                   \
+-     (defined(HAVE_COMPILER_GCC) &&                   \
++     (defined(HAVE_COMPILER_GCC_OR_MUSL) &&           \
+       (defined(HAVE_ATOMIC_ADD_FETCH) ||              \
+        defined(HAVE_ATOMIC_FETCH_ADD)) &&             \
+       defined(__ATOMIC_SEQ_CST) &&                    \
+--- a/stress-malloc.c
++++ b/stress-malloc.c
+@@ -453,8 +453,8 @@ static int stress_malloc(const stress_ar
+                       malloc_max = MIN_MALLOC_MAX;
+       }
+-#if defined(HAVE_COMPILER_GCC) &&     \
+-    defined(HAVE_MALLOPT) &&          \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    defined(HAVE_MALLOPT) &&                  \
+     defined(M_MMAP_THRESHOLD)
+       {
+               size_t malloc_threshold = DEFAULT_MALLOC_THRESHOLD;
+--- a/stress-memthrash.c
++++ b/stress-memthrash.c
+@@ -94,12 +94,12 @@ static sigset_t set;
+ static stress_memthrash_primes_t stress_memthrash_primes[MEM_SIZE_PRIMES];
+-#if (((defined(HAVE_COMPILER_GCC) || defined(HAVE_COMPILER_CLANG)) &&         \
+-       defined(STRESS_ARCH_X86)) ||                                   \
+-     (defined(HAVE_COMPILER_GCC) &&                                   \
+-      defined(HAVE_ATOMIC_ADD_FETCH) &&                                       \
+-      defined(__ATOMIC_SEQ_CST) &&                                    \
+-      NEED_GNUC(4,7,0) &&                                             \
++#if (((defined(HAVE_COMPILER_GCC_OR_MUSL) || defined(HAVE_COMPILER_CLANG)) && \
++       defined(STRESS_ARCH_X86)) ||                                           \
++     (defined(HAVE_COMPILER_GCC_OR_MUSL) &&                                   \
++      defined(HAVE_ATOMIC_ADD_FETCH) &&                                               \
++      defined(__ATOMIC_SEQ_CST) &&                                            \
++      NEED_GNUC(4,7,0) &&                                                     \
+       defined(STRESS_ARCH_ARM)))
+ #if defined(HAVE_ATOMIC_ADD_FETCH)
+ #define MEM_LOCK(ptr, inc)    __atomic_add_fetch(ptr, inc, __ATOMIC_SEQ_CST)
+--- a/stress-ng.h
++++ b/stress-ng.h
+@@ -22,6 +22,14 @@
+ #include "config.h"
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
++#if defined(HAVE_FEATURES_H)
++#include <features.h>
++#endif
++
+ #if defined(__ICC) &&         \
+     defined(__INTEL_COMPILER)
+ /* Intel ICC compiler */
+@@ -41,15 +49,20 @@
+ #elif defined(__clang__)
+ /* clang */
+ #define HAVE_COMPILER_CLANG
++#elif defined(__GNUC__) &&    \
++      !defined(__USE_GNU)
++/* musl gcc */
++#define HAVE_COMPILER_MUSL
++#define HAVE_COMPILER_GCC_OR_MUSL
+ #elif defined(__GNUC__)
+ /* GNU C compiler */
+ #define HAVE_COMPILER_GCC
++#define HAVE_COMPILER_GCC_OR_MUSL
+ #endif
+-#ifndef _GNU_SOURCE
+-#define _GNU_SOURCE
+-#endif
++#ifndef _ATFILE_SOURCE
+ #define _ATFILE_SOURCE
++#endif
+ #ifndef _LARGEFILE_SOURCE
+ #define _LARGEFILE_SOURCE
+ #endif
+@@ -101,9 +114,6 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
+-#if defined(HAVE_FEATURES_H)
+-#include <features.h>
+-#endif
+ #if defined(HAVE_LIB_PTHREAD)
+ #include <pthread.h>
+ #endif
+@@ -144,7 +154,7 @@
+ #endif
+ #if defined(HAVE_SYS_SYSINFO_H)
+ #include <sys/sysinfo.h>
+-#if defined(HAVE_COMPILER_GCC) &&     \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
+     !defined(__GLIBC__)
+ /* Suppress kernel sysinfo to avoid collision with musl */
+ #define _LINUX_SYSINFO_H
+@@ -237,7 +247,7 @@ typedef struct stress_stressor_info {
+ #if defined(CHECK_UNEXPECTED) &&      \
+     defined(HAVE_PRAGMA) &&           \
+-    defined(HAVE_COMPILER_GCC)
++    defined(HAVE_COMPILER_GCC_OR_MUSL)
+ #define UNEXPECTED_PRAGMA(x) _Pragma (#x)
+ #define UNEXPECTED_XSTR(x) UNEXPECTED_STR(x)
+ #define UNEXPECTED_STR(x) # x
+@@ -427,7 +437,7 @@ typedef struct stressor_info {
+ } stressor_info_t;
+ /* gcc 4.7 and later support vector ops */
+-#if defined(HAVE_COMPILER_GCC) &&     \
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
+     NEED_GNUC(4, 7, 0)
+ #define STRESS_VECTOR (1)
+ #endif
+@@ -508,7 +518,7 @@ extern const char stress_config[];
+ #define PAGE_MAPPED           (0x01)
+ #define PAGE_MAPPED_FAIL      (0x02)
+-#if defined(HAVE_COMPILER_GCC) || defined(HAVE_COMPILER_CLANG)
++#if defined(HAVE_COMPILER_GCC_OR_MUSL) || defined(HAVE_COMPILER_CLANG)
+ #define TYPEOF_CAST(a)        (typeof(a))
+ #else
+ #define       TYPEOF_CAST(a)
+@@ -839,7 +849,7 @@ extern void stress_metrics_set_const_che
+ #if !defined(STRESS_CORE_SHIM) &&     \
+     !defined(HAVE_PEDANTIC) &&                \
+-    (defined(HAVE_COMPILER_GCC) && defined(HAVE_COMPILER_CLANG))
++    (defined(HAVE_COMPILER_GCC_OR_MUSL) && defined(HAVE_COMPILER_CLANG))
+ int unlink(const char *pathname) __attribute__((deprecated("use shim_unlink")));
+ int unlinkat(int dirfd, const char *pathname, int flags) __attribute__((deprecated("use shim_unlinkat")));
+ int rmdir(const char *pathname) __attribute__((deprecated("use shim_rmdir")));
+--- a/stress-regs.c
++++ b/stress-regs.c
+@@ -33,10 +33,10 @@ static const stress_help_t help[] = {
+       { NULL, NULL,           NULL }
+ };
+-#if (defined(HAVE_COMPILER_GCC) && NEED_GNUC(8, 0, 0)) &&     \
+-    !defined(HAVE_COMPILER_CLANG) &&                          \
+-    !defined(HAVE_COMPILER_ICC) &&                            \
+-    !defined(HAVE_COMPILER_PCC) &&                            \
++#if (defined(HAVE_COMPILER_GCC_OR_MUSL) && NEED_GNUC(8, 0, 0)) &&     \
++    !defined(HAVE_COMPILER_CLANG) &&                                  \
++    !defined(HAVE_COMPILER_ICC) &&                                    \
++    !defined(HAVE_COMPILER_PCC) &&                                    \
+     !defined(HAVE_COMPILER_TCC)
+ static volatile uint32_t stash32;
+--- a/stress-rseq.c
++++ b/stress-rseq.c
+@@ -32,13 +32,13 @@ static const stress_help_t help[] = {
+       { NULL, NULL,           NULL }
+ };
+-#if defined(HAVE_LINUX_RSEQ_H) &&     \
+-    defined(HAVE_ASM_NOP) &&          \
+-    defined(__NR_rseq) &&             \
+-    defined(HAVE_SYSCALL) &&          \
+-    defined(HAVE_COMPILER_GCC) &&     \
+-    !defined(HAVE_COMPILER_CLANG) &&  \
+-    !defined(HAVE_COMPILER_ICC) &&    \
++#if defined(HAVE_LINUX_RSEQ_H) &&             \
++    defined(HAVE_ASM_NOP) &&                  \
++    defined(__NR_rseq) &&                     \
++    defined(HAVE_SYSCALL) &&                  \
++    defined(HAVE_COMPILER_GCC_OR_MUSL) &&     \
++    !defined(HAVE_COMPILER_CLANG) &&          \
++    !defined(HAVE_COMPILER_ICC) &&            \
+     !defined(HAVE_COMPILER_ICX)
+ #define STRESS_ACCESS_ONCE(x)     (*(__volatile__  __typeof__(x) *)&(x))
+--- a/stress-vnni.c
++++ b/stress-vnni.c
+@@ -25,6 +25,10 @@
+ #include "core-pragma.h"
+ #include "core-target-clones.h"
++#if defined(HAVE_COMPILER_MUSL)
++#undef HAVE_IMMINTRIN_H
++#endif
++
+ #if defined(HAVE_IMMINTRIN_H)
+ #include <immintrin.h>
+ #endif
diff --git a/utils/stress-ng/test.sh b/utils/stress-ng/test.sh
new file mode 100644 (file)
index 0000000..0b70f7c
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+stress-ng --version | grep "$2"