From 80bdd776ca5371cc43fb64dec6a9e991f9cfe0a2 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 21 Dec 2022 17:05:32 +0100 Subject: [PATCH 01/25] acpica-unix: add host build In order to build additional acpi tables during the build process, this package needs to be build for the host. Signed-off-by: Florian Eckert --- utils/acpica-unix/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/utils/acpica-unix/Makefile b/utils/acpica-unix/Makefile index b1471c7c0..e415b14d0 100644 --- a/utils/acpica-unix/Makefile +++ b/utils/acpica-unix/Makefile @@ -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)) From 42cc50eec890b2f86c5f9573938051149a62321d Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Sat, 21 Oct 2023 02:26:02 +0000 Subject: [PATCH 02/25] adblock-fast: bugfix: allow command * fix sed to properly purge allowed domains from block-lists * ensure resolver is restarted on allow command * reduce pause default/max in attempt to make it work with luci Signed-off-by: Stan Grishin --- net/adblock-fast/Makefile | 2 +- net/adblock-fast/files/etc/config/adblock-fast | 1 + net/adblock-fast/files/etc/init.d/adblock-fast | 11 ++++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/net/adblock-fast/Makefile b/net/adblock-fast/Makefile index f923a27b4..5c7936891 100644 --- a/net/adblock-fast/Makefile +++ b/net/adblock-fast/Makefile @@ -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 PKG_LICENSE:=GPL-3.0-or-later diff --git a/net/adblock-fast/files/etc/config/adblock-fast b/net/adblock-fast/files/etc/config/adblock-fast index f459411f0..e55475dd1 100644 --- a/net/adblock-fast/files/etc/config/adblock-fast +++ b/net/adblock-fast/files/etc/config/adblock-fast @@ -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' diff --git a/net/adblock-fast/files/etc/init.d/adblock-fast b/net/adblock-fast/files/etc/init.d/adblock-fast index 8229f0845..57fe5b932 100755 --- a/net/adblock-fast/files/etc/init.d/adblock-fast +++ b/net/adblock-fast/files/etc/init.d/adblock-fast @@ -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' \ From db305165c9a0b9b69a83f6379d0994c3708d58e8 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 9 Oct 2023 18:30:58 +0200 Subject: [PATCH 03/25] shadowsocks-libev: convert to PCRE2 Convert package to PCRE2 by porting a pending patch from a closed PR. The PR is old but the code never changed and is simple enough to check the changes. The patch apply directly with no changes (aside from commenting out the travis CI file) The PR was never merged as PCRE2 at times was too new and they were trying to find a better regex lib. Signed-off-by: Christian Marangi --- net/shadowsocks-libev/Makefile | 8 +- .../patches/100-Upgrade-PCRE-to-PCRE2.patch | 544 ++++++++++++++++++ 2 files changed, 548 insertions(+), 4 deletions(-) create mode 100644 net/shadowsocks-libev/patches/100-Upgrade-PCRE-to-PCRE2.patch diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index 0c4ce1bd6..b10eb32f7 100644 --- a/net/shadowsocks-libev/Makefile +++ b/net/shadowsocks-libev/Makefile @@ -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 index 000000000..91b2e5b9d --- /dev/null +++ b/net/shadowsocks-libev/patches/100-Upgrade-PCRE-to-PCRE2.patch @@ -0,0 +1,544 @@ +From d4f4d9761cbd41c3ab6de79383ff39b9f97bf452 Mon Sep 17 00:00:00 2001 +From: Syrone Wong +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 +[ squash the first 2 patch from PR, drop the last one ] +Signed-off-by: Christian Marangi +--- + .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 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_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_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 + * Copyright (c) 2011 Manuel Kasper ++ * Copyright (c) 2017 Syrone Wong + * 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 + * Copyright (c) 2011 Manuel Kasper ++ * Copyright (c) 2017 Syrone Wong + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -33,17 +34,27 @@ + + #include + +-#ifdef HAVE_PCRE_H +-#include +-#elif HAVE_PCRE_PCRE_H +-#include +-#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 + + 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; From 5a917a2a1cd068081d6f30e6ffc282ae977423bb Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Fri, 13 Oct 2023 08:57:18 +0200 Subject: [PATCH 04/25] ooniprobe: remove unused package This package is not maintained anymore in the OpenWrt packages feed and since we updated Go to 1.21 version, it is not compiled either. Let's hope that with removing this package from our feed, someone will step it and become a maintainer to take care of this package. Signed-off-by: Josef Schlehofer --- net/ooniprobe/Makefile | 53 ------------------------------------------ net/ooniprobe/test.sh | 3 --- 2 files changed, 56 deletions(-) delete mode 100644 net/ooniprobe/Makefile delete mode 100644 net/ooniprobe/test.sh diff --git a/net/ooniprobe/Makefile b/net/ooniprobe/Makefile deleted file mode 100644 index bb7cf4281..000000000 --- a/net/ooniprobe/Makefile +++ /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 -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 index 9ecab82f9..000000000 --- a/net/ooniprobe/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -ooniprobe version | grep "$2" From d191c3d0c409e150d7234a52715718dbe05c1bce Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 28 Sep 2023 23:51:28 +0200 Subject: [PATCH 05/25] micropython-lib: move to PCRE2 Add pending patch converting the package to PCRE2. Signed-off-by: Christian Marangi --- lang/python/micropython-lib/Makefile | 4 +- .../004-unix-ffi-re-convert-to-PCRE2.patch | 148 ++++++++++++++++++ 2 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 lang/python/micropython-lib/patches/004-unix-ffi-re-convert-to-PCRE2.patch diff --git a/lang/python/micropython-lib/Makefile b/lang/python/micropython-lib/Makefile index 7bd167898..490e6e2e7 100644 --- a/lang/python/micropython-lib/Makefile +++ b/lang/python/micropython-lib/Makefile @@ -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 index 000000000..6bf539b14 --- /dev/null +++ b/lang/python/micropython-lib/patches/004-unix-ffi-re-convert-to-PCRE2.patch @@ -0,0 +1,148 @@ +From 1cbe8c4dd653336c5766dfd75eb379ad37f04249 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +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 +--- + 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) + + From bb9d02be0303f71cb6f5fa19b95b8a513c867935 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 5 Oct 2023 16:55:10 +0200 Subject: [PATCH 06/25] nginx: add option to compile STREAM REAL IP module Add option to compile STREAM REAL IP module. Closes: #22310 Signed-off-by: Christian Marangi --- net/nginx/Config_ssl.in | 5 +++++ net/nginx/Makefile | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/net/nginx/Config_ssl.in b/net/nginx/Config_ssl.in index 990a01e81..b02166f36 100644 --- a/net/nginx/Config_ssl.in +++ b/net/nginx/Config_ssl.in @@ -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 diff --git a/net/nginx/Makefile b/net/nginx/Makefile index 66a0c8713..0accdd099 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -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))) From af58942738c13c431f531e78f368d18a0d2dd84d Mon Sep 17 00:00:00 2001 From: ValdikSS ValdikSS Date: Sun, 22 Oct 2023 19:30:04 +0300 Subject: [PATCH 07/25] tor: fix daemon reloading procd requires init script name, not the path to executable Signed-off-by: ValdikSS ValdikSS --- net/tor/Makefile | 2 +- net/tor/files/tor.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tor/Makefile b/net/tor/Makefile index 756d2785c..da2e47833 100644 --- a/net/tor/Makefile +++ b/net/tor/Makefile @@ -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/ \ diff --git a/net/tor/files/tor.init b/net/tor/files/tor.init index 142e2512d..cb1cb73c5 100644 --- a/net/tor/files/tor.init +++ b/net/tor/files/tor.init @@ -32,7 +32,7 @@ generate_conf() { } reload_service() { - procd_send_signal /usr/sbin/tor + procd_send_signal tor } start_service() { From 98bcb56eb3de7ae1ffc1ed66287168750a72a059 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sat, 14 Oct 2023 09:03:52 +0300 Subject: [PATCH 08/25] stress-ng: backport immintrin.h header detection for GCC 13 Backport patch from: https://github.com/ColinIanKing/stress-ng/commit/cd84c46ce780242879e8aaa7d698b9cd87996dbd With GCC 12 there is no issue. With GCC 13, there is a compilation issue on x86_64. Fixes https://github.com/openwrt/packages/issues/22373 Signed-off-by: Alexandru Ardelean --- utils/stress-ng/Makefile | 2 +- ...musl-gcc-detection-and-HAVE_COMPILER.patch | 531 ++++++++++++++++++ utils/stress-ng/test.sh | 3 + 3 files changed, 535 insertions(+), 1 deletion(-) create mode 100644 utils/stress-ng/patches/002-core-stress-Add-musl-gcc-detection-and-HAVE_COMPILER.patch create mode 100644 utils/stress-ng/test.sh diff --git a/utils/stress-ng/Makefile b/utils/stress-ng/Makefile index 890a7be1b..11a4cbf22 100644 --- a/utils/stress-ng/Makefile +++ b/utils/stress-ng/Makefile @@ -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 index 000000000..1b161102d --- /dev/null +++ b/utils/stress-ng/patches/002-core-stress-Add-musl-gcc-detection-and-HAVE_COMPILER.patch @@ -0,0 +1,531 @@ +From cd84c46ce780242879e8aaa7d698b9cd87996dbd Mon Sep 17 00:00:00 2001 +From: Colin Ian King +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 +--- + 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 ++#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 + #include + #include +-#if defined(HAVE_FEATURES_H) +-#include +-#endif + #if defined(HAVE_LIB_PTHREAD) + #include + #endif +@@ -144,7 +154,7 @@ + #endif + #if defined(HAVE_SYS_SYSINFO_H) + #include +-#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 + #endif diff --git a/utils/stress-ng/test.sh b/utils/stress-ng/test.sh new file mode 100644 index 000000000..0b70f7cc3 --- /dev/null +++ b/utils/stress-ng/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh -e + +stress-ng --version | grep "$2" From cf59047d3c3f07baed76751e19f06db9c6541800 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Thu, 12 Oct 2023 16:20:07 +0200 Subject: [PATCH 09/25] perl: add support for riscv64 Required by sifiveu and upcoming riscv targets. Signed-off-by: Zoltan HERPAI --- lang/perl/Makefile | 2 +- lang/perl/files/riscv64.config | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 lang/perl/files/riscv64.config diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 2763de277..7b603b5af 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -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 index 000000000..4596f8cde --- /dev/null +++ b/lang/perl/files/riscv64.config @@ -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' From a2ef62e6699f3e47af6f2a22980b8a832f1ba1f4 Mon Sep 17 00:00:00 2001 From: Facundo Acevedo Date: Sun, 22 Oct 2023 20:01:25 -0300 Subject: [PATCH 10/25] procs: update to v0.14.3 Signed-off-by: Facundo Acevedo --- utils/procs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/procs/Makefile b/utils/procs/Makefile index 41eeb9c18..bb8c6398e 100644 --- a/utils/procs/Makefile +++ b/utils/procs/Makefile @@ -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 PKG_LICENSE:=MIT From 9b0e95c44288580cb7d5f88a6a3d19b83cdb4c07 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 23 Oct 2023 14:20:25 +0200 Subject: [PATCH 11/25] gstreamer1: update to 1.22.6 Signed-off-by: Koen Vandeputte --- multimedia/gstreamer1/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/gstreamer1/Makefile b/multimedia/gstreamer1/Makefile index 81653efac..de77412e0 100644 --- a/multimedia/gstreamer1/Makefile +++ b/multimedia/gstreamer1/Makefile @@ -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 \ From 87c57d0f6f20b15c62d626e85a58807852f73917 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 23 Oct 2023 14:20:41 +0200 Subject: [PATCH 12/25] gst1-libav: update to 1.22.6 Signed-off-by: Koen Vandeputte --- multimedia/gst1-libav/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/gst1-libav/Makefile b/multimedia/gst1-libav/Makefile index 8237ca1c2..9ef7ce8ad 100644 --- a/multimedia/gst1-libav/Makefile +++ b/multimedia/gst1-libav/Makefile @@ -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 \ From e7ad852bdbe20ceb8decbe7a87880beadd6dac8a Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 23 Oct 2023 14:21:27 +0200 Subject: [PATCH 13/25] gst1-plugins-bad: update to 1.22.6 Signed-off-by: Koen Vandeputte --- multimedia/gst1-plugins-bad/Makefile | 4 ++-- multimedia/gst1-plugins-bad/patches/010-distutils.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/gst1-plugins-bad/Makefile b/multimedia/gst1-plugins-bad/Makefile index b5dad4177..0f999a373 100644 --- a/multimedia/gst1-plugins-bad/Makefile +++ b/multimedia/gst1-plugins-bad/Makefile @@ -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 \ diff --git a/multimedia/gst1-plugins-bad/patches/010-distutils.patch b/multimedia/gst1-plugins-bad/patches/010-distutils.patch index 952d52577..856692f1f 100644 --- a/multimedia/gst1-plugins-bad/patches/010-distutils.patch +++ b/multimedia/gst1-plugins-bad/patches/010-distutils.patch @@ -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') From 52da3325dba6cf2fa47e36988c0054667ad8755a Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 23 Oct 2023 14:21:37 +0200 Subject: [PATCH 14/25] gst1-plugins-base: update to 1.22.6 Signed-off-by: Koen Vandeputte --- multimedia/gst1-plugins-base/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/gst1-plugins-base/Makefile b/multimedia/gst1-plugins-base/Makefile index 24907d141..cbfa51c88 100644 --- a/multimedia/gst1-plugins-base/Makefile +++ b/multimedia/gst1-plugins-base/Makefile @@ -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 \ From 2fdf1aa2f5482da2482de99bb62a438b4a5c686a Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 23 Oct 2023 14:21:45 +0200 Subject: [PATCH 15/25] gst1-plugins-good: update to 1.22.6 Signed-off-by: Koen Vandeputte --- multimedia/gst1-plugins-good/Makefile | 4 ++-- multimedia/gst1-plugins-good/patches/010-distutils.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/gst1-plugins-good/Makefile b/multimedia/gst1-plugins-good/Makefile index 3b3853c82..174e8eecd 100644 --- a/multimedia/gst1-plugins-good/Makefile +++ b/multimedia/gst1-plugins-good/Makefile @@ -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 \ diff --git a/multimedia/gst1-plugins-good/patches/010-distutils.patch b/multimedia/gst1-plugins-good/patches/010-distutils.patch index 582df3b62..a0e6365ff 100644 --- a/multimedia/gst1-plugins-good/patches/010-distutils.patch +++ b/multimedia/gst1-plugins-good/patches/010-distutils.patch @@ -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') From 87e5c5e7abb099295bf8afe876be2e35311cfc70 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 23 Oct 2023 14:21:59 +0200 Subject: [PATCH 16/25] gst1-plugins-ugly: update to 1.22.6 Signed-off-by: Koen Vandeputte --- multimedia/gst1-plugins-ugly/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/gst1-plugins-ugly/Makefile b/multimedia/gst1-plugins-ugly/Makefile index 572adda1e..3da36b897 100644 --- a/multimedia/gst1-plugins-ugly/Makefile +++ b/multimedia/gst1-plugins-ugly/Makefile @@ -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 \ From 5dd08fe23f0ad376bcc3f12c7a50d7ac8c73e2bb Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Tue, 24 Oct 2023 02:14:08 +0000 Subject: [PATCH 17/25] https-dns-proxy: bugfix: prevent crashes on IPv6 systems * update service triggers so that procd_add_raw_trigger is only executed on boot and not on other service actions * remove outdated iface hotplug script Signed-off-by: Stan Grishin --- net/https-dns-proxy/Makefile | 2 +- .../etc/hotplug.d/iface/90-https-dns-proxy | 14 ---------- .../files/etc/init.d/https-dns-proxy | 26 +++++++++++++++++-- 3 files changed, 25 insertions(+), 17 deletions(-) delete mode 100644 net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile index 5c6912e2e..e6008ac9f 100644 --- a/net/https-dns-proxy/Makefile +++ b/net/https-dns-proxy/Makefile @@ -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 index 5acf7b7d0..000000000 --- a/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy +++ /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' diff --git a/net/https-dns-proxy/files/etc/init.d/https-dns-proxy b/net/https-dns-proxy/files/etc/init.d/https-dns-proxy index 58fd647c1..5679f6349 100755 --- a/net/https-dns-proxy/files/etc/init.d/https-dns-proxy +++ b/net/https-dns-proxy/files/etc/init.d/https-dns-proxy @@ -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 "$*"; } From 4be4a791b5469ca9a8dae0c31e2563a2d7b751a1 Mon Sep 17 00:00:00 2001 From: Leo Douglas Date: Tue, 24 Oct 2023 10:43:12 +0800 Subject: [PATCH 18/25] sing-box: update to v1.5.4 changelog: https://github.com/SagerNet/sing-box/releases/tag/v1.5.4 Signed-off-by: Leo Douglas --- net/sing-box/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sing-box/Makefile b/net/sing-box/Makefile index 20a7c6dd0..5a4588f1e 100644 --- a/net/sing-box/Makefile +++ b/net/sing-box/Makefile @@ -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 From 86ec7b19bc5f5935152b1423bb4f450ccefaabae Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 23 Oct 2023 11:20:20 +0100 Subject: [PATCH 19/25] exim: update to version 4.96.2 Fixes vulnerabilities: - Improper Neutralization of Special Elements (CVE-2023-42117) - dnsdb Out-Of-Bounds Read (CVE-2023-42119) Signed-off-by: Daniel Golle --- mail/exim/Makefile | 4 ++-- mail/exim/patches/100-localscan_dlopen.patch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mail/exim/Makefile b/mail/exim/Makefile index 69d200bf1..ebc17dcec 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -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 PKG_LICENSE:=GPL-2.0-or-later diff --git a/mail/exim/patches/100-localscan_dlopen.patch b/mail/exim/patches/100-localscan_dlopen.patch index e5efd5e56..115201c05 100644 --- a/mail/exim/patches/100-localscan_dlopen.patch +++ b/mail/exim/patches/100-localscan_dlopen.patch @@ -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); } From 45170d9b672b6e017f51c7ac2cdae9b636f2c0b2 Mon Sep 17 00:00:00 2001 From: Andrew Sim Date: Sun, 22 Oct 2023 08:12:44 +0200 Subject: [PATCH 20/25] transmission: update to 4.0.4 Update Transamission to 4.0.4 stable release Changelog: https://github.com/transmission/transmission/releases/tag/4.0.4 Signed-off-by: Andrew Sim --- net/transmission/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/transmission/Makefile b/net/transmission/Makefile index 0fd6f23b9..c71f947a3 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -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 PKG_LICENSE:=GPL-2.0-or-later From 81658c58236a050b22dbf08309b637576db1a5c9 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Tue, 24 Oct 2023 17:27:40 +0200 Subject: [PATCH 21/25] travelmate: release 2.1.1 * various vpn/wireguard improvements & fixes * improved compatibility with new netifd * added open STA improvements by @brianjmurrell * closes #22227 #22288 #22357 Signed-off-by: Dirk Brenken dev@brenken.org Signed-off-by: Dirk Brenken --- net/travelmate/Makefile | 2 +- net/travelmate/files/README.md | 32 +++-- net/travelmate/files/travelmate.sh | 135 +++++++++++--------- net/travelmate/files/travelmate.vpn | 27 +++- net/travelmate/files/travelmate_ntp.hotplug | 14 +- 5 files changed, 118 insertions(+), 92 deletions(-) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index b04b069ca..eded8aa39 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -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 diff --git a/net/travelmate/files/README.md b/net/travelmate/files/README.md index 69bf321fc..c089e668e 100644 --- a/net/travelmate/files/README.md +++ b/net/travelmate/files/README.md @@ -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 '' | 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:**

-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: ✔, vpn: ✘, mail: ✘
-  + last_run           : 2020.09.10-15:21:19
-  + system             : GL.iNet GL-AR750S (NOR/NAND), OpenWrt SNAPSHOT r14430-2dda301d40
+  + ext_hooks          : ntp: ✔, vpn: ✔, mail: ✘
+  + last_run           : 2023.10.21-14:29:14
+  + system             : GL.iNet GL-A1300, OpenWrt SNAPSHOT r24187-bb8fd41f9a
 
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 diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh index fd717c34b..420da9040 100755 --- a/net/travelmate/files/travelmate.sh +++ b/net/travelmate/files/travelmate.sh @@ -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 diff --git a/net/travelmate/files/travelmate.vpn b/net/travelmate/files/travelmate.vpn index ed8bd30b2..92793e15b 100755 --- a/net/travelmate/files/travelmate.vpn +++ b/net/travelmate/files/travelmate.vpn @@ -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 diff --git a/net/travelmate/files/travelmate_ntp.hotplug b/net/travelmate/files/travelmate_ntp.hotplug index c27bea73d..5195c03dc 100755 --- a/net/travelmate/files/travelmate_ntp.hotplug +++ b/net/travelmate/files/travelmate_ntp.hotplug @@ -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 From ee129c6031e199d418ac183695c337bbe39b82ee Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 23 Oct 2023 09:15:51 +0200 Subject: [PATCH 22/25] nerdctl: update to 1.6.2 Signed-off-by: Luca Barbato --- utils/nerdctl/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/nerdctl/Makefile b/utils/nerdctl/Makefile index 7ae268bad..ea19ec4c0 100644 --- a/utils/nerdctl/Makefile +++ b/utils/nerdctl/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nerdctl -PKG_VERSION:=1.6.0 +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:=a369b1c517d9c3d53d00b29633a6176a05811214a44dd25d339c32cc6a901579 +PKG_HASH:=fb7660f7e598e4c502d4f0c26cf985290fc7bdc80cce1f7402020afdf83ef988 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE From 0d6bbc3bddeb0a0c2b9daaff9d40e3e0361ee763 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 25 Oct 2023 19:40:11 +0800 Subject: [PATCH 23/25] rclone: Update to 1.64.2 Signed-off-by: Tianling Shen --- net/rclone/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rclone/Makefile b/net/rclone/Makefile index 5ae35a4e5..195076e7a 100644 --- a/net/rclone/Makefile +++ b/net/rclone/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rclone -PKG_VERSION:=1.64.1 +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:=c94ad2c2fa79485667aae4a239ed04e786bd6e26bced05f9d95dda6d10f7a014 +PKG_HASH:=85feffc2d60554bcc3c59140750dc4ccf008e109b52c451956a1f52387af1bd6 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From ad8f2b5e8e4d7a84f034bf458221e6721c0efedb Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 25 Oct 2023 19:40:20 +0800 Subject: [PATCH 24/25] dnsproxy: Update to 0.56.2 Signed-off-by: Tianling Shen --- net/dnsproxy/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dnsproxy/Makefile b/net/dnsproxy/Makefile index 61dfe4cbb..04bbd4bec 100644 --- a/net/dnsproxy/Makefile +++ b/net/dnsproxy/Makefile @@ -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 PKG_LICENSE:=Apache-2.0 From 2496d74340e90b8a50ddb312c0841d26f52c4821 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Mon, 23 Oct 2023 14:07:09 +0200 Subject: [PATCH 25/25] snowflake: update to 2.7.0 Release Notes: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/tags/v2.7.0 Proxy churn is removed and because of that also distinctcounter: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/commit/6393af6bab0f7c3c95b11352d5c582d2000062fa Signed-off-by: Nick Hainke --- net/snowflake/Makefile | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/net/snowflake/Makefile b/net/snowflake/Makefile index 73b36d78b..c23fd87dd 100644 --- a/net/snowflake/Makefile +++ b/net/snowflake/Makefile @@ -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))