Skip to content

Commit

Permalink
Merge Official Source
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Dec 11, 2024
2 parents 43215b7 + f2f6489 commit dcd652d
Show file tree
Hide file tree
Showing 16 changed files with 359 additions and 146 deletions.
4 changes: 2 additions & 2 deletions lang/python/python-dateutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-dateutil
PKG_VERSION:=2.9.0.post0
PKG_VERSION:=2.9.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause

PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3
PKG_HASH:=78e73e19c63f5b20ffa567001531680d939dc042bf7850431877645523c66709
PKG_MAINTAINER:=Alexandru Ardelean <[email protected]>

PKG_BUILD_DEPENDS:=python-setuptools-scm/host
Expand Down
2 changes: 1 addition & 1 deletion net/adblock-fast/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=adblock-fast
PKG_VERSION:=1.1.2
PKG_RELEASE:=10
PKG_RELEASE:=18
PKG_MAINTAINER:=Stan Grishin <[email protected]>
PKG_LICENSE:=AGPL-3.0-or-later

Expand Down
83 changes: 53 additions & 30 deletions net/adblock-fast/files/etc/init.d/adblock-fast
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi

readonly packageName='adblock-fast'
readonly PKG_VERSION='dev-test'
readonly packageCompat='3'
readonly packageCompat='4'
readonly serviceName="$packageName $PKG_VERSION"
readonly packageConfigFile="/etc/config/${packageName}"
readonly dnsmasqAddnhostsFile="/var/run/${packageName}/dnsmasq.addnhosts"
Expand Down Expand Up @@ -465,9 +465,9 @@ get_url_filesize() {

# shellcheck disable=SC3060
output() {
local v="${verbosity:-1}"
[ -z "$verbosity" ] && verbosity="$(uci_get "$packageName" 'config' 'verbosity' '1')"
[ "$#" -ne '1' ] && {
case "$1" in [0-9]) [ $((v & $1)) -gt 0 ] && shift || return 0;; esac }
case "$1" in [0-9]) [ $((verbosity & $1)) -gt 0 ] && shift || return 0;; esac }
local msg="$*" queue="/dev/shm/$packageName-output"
[ -t 1 ] && printf "%b" "$msg"
[ "$msg" != "${msg//\\n}" ] && {
Expand Down Expand Up @@ -765,9 +765,9 @@ load_environment() {
dns_set_output_values "$dns"

[ "$dns" = 'dnsmasq.addnhosts' ] || rm -f "$dnsmasqAddnhostsFile" "$dnsmasqAddnhostsCache" "${compressed_cache_dir}/${dnsmasqAddnhostsGzip}"
[ "$dns" = 'dnsmasq.conf' ] || rm -f "$dnsmasqConfFile" "$dnsmasqConfCache" "${compressed_cache_dir}/${dnsmasqConfGzip}"
[ "$dns" = 'dnsmasq.ipset' ] || rm -f "$dnsmasqIpsetFile" "$dnsmasqIpsetCache" "${compressed_cache_dir}/${dnsmasqIpsetGzip}"
[ "$dns" = 'dnsmasq.nftset' ] || rm -f "$dnsmasqNftsetFile" "$dnsmasqNftsetCache" "${compressed_cache_dir}/${dnsmasqNftsetGzip}"
[ "$dns" = 'dnsmasq.conf' ] || rm -f "$dnsmasqConfCache" "${compressed_cache_dir}/${dnsmasqConfGzip}"
[ "$dns" = 'dnsmasq.ipset' ] || rm -f "$dnsmasqIpsetCache" "${compressed_cache_dir}/${dnsmasqIpsetGzip}"
[ "$dns" = 'dnsmasq.nftset' ] || rm -f "$dnsmasqNftsetCache" "${compressed_cache_dir}/${dnsmasqNftsetGzip}"
[ "$dns" = 'dnsmasq.servers' ] || rm -f "$dnsmasqServersFile" "$dnsmasqServersCache" "${compressed_cache_dir}/${dnsmasqServersGzip}"
[ "$dns" = 'smartdns.domainset' ] || rm -f "$smartdnsDomainSetFile" "$smartdnsDomainSetCache" "${compressed_cache_dir}/${smartdnsDomainSetGzip}" "$smartdnsDomainSetConfig"
[ "$dns" = 'smartdns.ipset' ] || rm -f "$smartdnsIpsetFile" "$smartdnsIpsetCache" "${compressed_cache_dir}/${smartdnsIpsetGzip}" "$smartdnsIpsetConfig"
Expand All @@ -788,12 +788,11 @@ load_environment() {
if ! is_present '/usr/libexec/grep-gnu' || ! is_present '/usr/libexec/sed-gnu' || \
! is_present '/usr/libexec/sort-coreutils' || ! is_present 'gawk'; then
local s
is_present 'gawk' || s="${s:+$s }gawk"
is_present '/usr/libexec/grep-gnu' || s="${s:+$s }grep"
is_present '/usr/libexec/sed-gnu' || s="${s:+$s }sed"
is_present '/usr/libexec/sort-coreutils' || s="${s:+$s }coreutils-sort"
is_present 'gawk' || { json add warning 'warningMissingRecommendedPackages' 'gawk'; s="${s:+$s }gawk"; }
is_present '/usr/libexec/grep-gnu' || { json add warning 'warningMissingRecommendedPackages' 'grep'; s="${s:+$s }grep"; }
is_present '/usr/libexec/sed-gnu' || { json add warning 'warningMissingRecommendedPackages' 'sed'; s="${s:+$s }sed"; }
is_present '/usr/libexec/sort-coreutils' || { json add warning 'warningMissingRecommendedPackages' 'coreutils-sort'; s="${s:+$s }coreutils-sort"; }
if [ "$param" != 'quiet' ]; then
json add warning 'warningMissingRecommendedPackages' "$s"
output "${_WARNING_}: $(get_text 'warningMissingRecommendedPackages'), install them by running:\n"
output "opkg update; opkg --force-overwrite install $s;\n"
fi
Expand Down Expand Up @@ -855,6 +854,13 @@ resolver() {
uci_add_list_if_new 'dhcp' "$cfg" 'addnhosts' "$dnsmasqAddnhostsFile"
;;
cleanup|unbound.adb_list)
# shellcheck disable=SC2016
if grep -q 'config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq${cfg:+.$cfg}.d"' '/etc/init.d/dnsmasq'; then
config_get confdir "$cfg" 'confdir' "/tmp/dnsmasq${cfg:+.$cfg}.d"
else
config_get confdir "$cfg" 'confdir' '/tmp/dnsmasq.d'
fi
rm -f "${confdir}/${dnsmasqConfFile}" "${confdir}/${dnsmasqIpsetFile}" "${confdir}/${dnsmasqNftsetFile}"
uci_remove_list 'dhcp' "$cfg" 'addnhosts' "$dnsmasqAddnhostsFile"
if [ "$(uci_get 'dhcp' "$cfg" 'serversfile')" = "$dnsmasqServersFile" ]; then
uci_remove 'dhcp' "$cfg" 'serversfile'
Expand All @@ -874,16 +880,20 @@ resolver() {
;;
esac
}
# shellcheck disable=SC2317
# shellcheck disable=SC2016,SC2317
_dnsmasq_instance_init() {
local cfg="$1" param="$2" confdir confdirFile
[ -s "/etc/config/dhcp" ] || return 0
case "$param" in
dnsmasq.conf|dnsmasq.ipset|dnsmasq.nftset)
config_get confdir "$cfg" 'confdir' '/tmp/dnsmasq.d'
if grep -q 'config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq${cfg:+.$cfg}.d"' '/etc/init.d/dnsmasq'; then
config_get confdir "$cfg" 'confdir' "/tmp/dnsmasq${cfg:+.$cfg}.d"
else
config_get confdir "$cfg" 'confdir' '/tmp/dnsmasq.d'
fi
confdirFile="${confdir}/${outputFile}"
if ! str_contains "$dnsmasqFileList" "$confdirFile"; then
dnsmasqFileList="${dnsmasqFileList:+$dnsmasqFileList }${confdirFile}"
if ! str_contains "$outputDnsmasqFileList" "$confdirFile"; then
outputDnsmasqFileList="${outputDnsmasqFileList:+$outputDnsmasqFileList }${confdirFile}"
fi
;;
esac
Expand Down Expand Up @@ -920,9 +930,9 @@ resolver() {
case $1 in
cleanup)
rm -f "$dnsmasqAddnhostsFile" "$dnsmasqAddnhostsCache" "${compressed_cache_dir}/${dnsmasqAddnhostsGzip}"
rm -f "$dnsmasqConfFile" "$dnsmasqConfCache" "${compressed_cache_dir}/${dnsmasqConfGzip}"
rm -f "$dnsmasqIpsetFile" "$dnsmasqIpsetCache" "${compressed_cache_dir}/${dnsmasqIpsetGzip}"
rm -f "$dnsmasqNftsetFile" "$dnsmasqNftsetCache" "${compressed_cache_dir}/${dnsmasqNftsetGzip}"
rm -f "$dnsmasqConfCache" "${compressed_cache_dir}/${dnsmasqConfGzip}"
rm -f "$dnsmasqIpsetCache" "${compressed_cache_dir}/${dnsmasqIpsetGzip}"
rm -f "$dnsmasqNftsetCache" "${compressed_cache_dir}/${dnsmasqNftsetGzip}"
rm -f "$dnsmasqServersFile" "$dnsmasqServersCache" "${compressed_cache_dir}/${dnsmasqServersGzip}"
rm -f "$smartdnsDomainSetFile" "$smartdnsDomainSetCache" "${compressed_cache_dir}/${smartdnsDomainSetGzip}" "$smartdnsDomainSetConfig"
rm -f "$smartdnsIpsetFile" "$smartdnsIpsetCache" "${compressed_cache_dir}/${smartdnsIpsetGzip}" "$smartdnsIpsetConfig"
Expand All @@ -942,7 +952,7 @@ resolver() {
on_load)
case "$dns" in
dnsmasq.conf|dnsmasq.ipset|dnsmasq.nftset)
[ -z "$dnsmasqFileList" ] || return 0
[ -z "$outputDnsmasqFileList" ] || return 0
config_load 'dhcp'
if [ "$dnsmasq_instance" = "*" ]; then
config_foreach _dnsmasq_instance_init 'dnsmasq' "$dns"
Expand All @@ -951,7 +961,7 @@ resolver() {
_dnsmasq_instance_init "@dnsmasq[$i]" "$dns" || _dnsmasq_instance_init "$i" "$dns"
done
fi
outputFile="$(str_first_word "$dnsmasqFileList")"
outputFile="$(str_first_word "$outputDnsmasqFileList")"
;;
esac
;;
Expand Down Expand Up @@ -981,9 +991,9 @@ resolver() {

case "$dns" in
dnsmasq.*)
if [ -n "$dnsmasqFileList" ]; then
if [ -n "$outputDnsmasqFileList" ]; then
local i
for i in $dnsmasqFileList; do
for i in $outputDnsmasqFileList; do
chmod 660 "$i"
chown root:dnsmasq "$i" >/dev/null 2>/dev/null
done
Expand Down Expand Up @@ -1087,9 +1097,9 @@ cache() {
local R_TMP
case "$1" in
create|backup)
if [ -n "$dnsmasqFileList" ]; then
if [ -n "$outputDnsmasqFileList" ]; then
local i __firstFile
for i in $dnsmasqFileList; do
for i in $outputDnsmasqFileList; do
if [ -z "$__firstFile" ]; then
__firstFile="$i"
if ! mv "$i" "$outputCache"; then
Expand All @@ -1107,9 +1117,9 @@ cache() {
fi
;;
restore|use)
if [ -n "$dnsmasqFileList" ]; then
if [ -n "$outputDnsmasqFileList" ]; then
local i __firstFile
for i in $dnsmasqFileList; do
for i in $outputDnsmasqFileList; do
if [ -z "$__firstFile" ]; then
__firstFile="$i"
if ! mv "$outputCache" "$i"; then
Expand Down Expand Up @@ -1170,6 +1180,16 @@ process_file_url_wrapper() {
}

process_file_url() {
_sanitize_source() {
local type="$1" file="$2"
case "$type" in
hosts)
sed -i '/# Title: StevenBlack/,/# Start StevenBlack/d' "$file"
# sed -i -E '/^(.*)[\t ](local|localhost|localhost.localdomain)$/d;/^255.255.255.255[\t ]broadcasthost$/d;/^0.0.0.0[\t ]0.0.0.0$/d' "$file"
# sed -i -E '/^(.*)[\t ](ip6-localhost|ip6-loopback|ip6-localnet|ip6-mcastprefix|ip6-allnodes|ip6-allrouters|ip6-allhosts)/d' "$file"
;;
esac
}
local cfg="$1" new_size
local label type D_TMP R_TMP filter
if [ -z "$cfg" ] || [ -n "${2}${3}" ]; then
Expand Down Expand Up @@ -1219,7 +1239,10 @@ process_file_url() {
dnsmasq2) filter="$dnsmasq2FileFilter";;
dnsmasq3) filter="$dnsmasq3FileFilter";;
domains) filter="$domainsFilter";;
hosts) filter="$hostsFilter";;
hosts)
filter="$hostsFilter"
_sanitize_source 'hosts' "$R_TMP"
;;
*)
output 1 "$_FAIL_"
output 2 "[DL] $type $label $__FAIL__\n"
Expand Down Expand Up @@ -1271,7 +1294,7 @@ download_dnsmasq_file() {
fi
output 2 'Moving dnsmasq file '
local i __firstFile
for i in $dnsmasqFileList; do
for i in $outputDnsmasqFileList; do
if [ -z "$__firstFile" ]; then
__firstFile="$i"
if mv "$B_TMP" "$i"; then
Expand Down Expand Up @@ -1545,7 +1568,7 @@ $(sed '/^[[:space:]]*$/d' "$A_TMP")"
case "$dns" in
dnsmasq.conf|dnsmasq.ipset|dnsmasq.nftset)
local i __firstFile
for i in $dnsmasqFileList; do
for i in $outputDnsmasqFileList; do
if [ -z "$__firstFile" ]; then
__firstFile="$i"
if mv "$B_TMP" "$i"; then
Expand Down Expand Up @@ -1628,7 +1651,7 @@ adb_allow() {
output 2 " $c "
hf="$(echo "$c" | sed 's/\./\\./g')"
local f
for f in ${dnsmasqFileList:-$outputFile}; do
for f in ${outputDnsmasqFileList:-$outputFile}; do
if sed -i "\:\(/\|\.\)${hf}/:d" "$f"; then
output_ok
else
Expand Down
2 changes: 1 addition & 1 deletion net/iperf3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=iperf
PKG_VERSION:=3.17.1
PKG_RELEASE:=3
PKG_RELEASE:=4

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf
Expand Down
19 changes: 19 additions & 0 deletions net/iperf3/patches/030-musl-crash.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 3da07ae96f5b40f76b75e1ccd4b20267f6a5988e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= <[email protected]>
Date: Wed, 28 Aug 2024 09:43:04 +0200
Subject: [PATCH] remove incorrect freeaddrinfo call

---
src/net.c | 1 -
1 file changed, 1 deletion(-)

--- a/src/net.c
+++ b/src/net.c
@@ -145,7 +145,6 @@ create_socket(int domain, int proto, con
if ((gerror = getaddrinfo(server, portstr, &hints, &server_res)) != 0) {
if (local)
freeaddrinfo(local_res);
- freeaddrinfo(server_res);
return -1;
}

4 changes: 2 additions & 2 deletions net/ksmbd-tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ksmbd-tools
PKG_VERSION:=3.5.2
PKG_VERSION:=3.5.3
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/cifsd-team/ksmbd-tools/releases/download/$(PKG_VERSION)
PKG_HASH:=5da7fb4cb4368f9abf56f6f9fbc17b25e387876bed9ff7ee0d6f1140ef07c8d7
PKG_HASH:=e8d55cc53825170d7e5213d48a92b8251dc0d1351601283f6d0995cfd789b4d0

PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
Expand Down
2 changes: 1 addition & 1 deletion net/ksmbd-tools/patches/030-glib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@@ -21,6 +21,7 @@ include_dirs = include_directories(
glib_dep = dependency(
'glib-2.0',
version: '>= 2.44',
version: '>= 2.58',
+ static: true,
)
libnl_dep = dependency(
Expand Down
2 changes: 1 addition & 1 deletion net/microsocks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=microsocks
PKG_VERSION:=1.0.4
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From c81760cc3f1b6db22c7c9694efe7f3be115c2caf Mon Sep 17 00:00:00 2001
From: rofl0r <[email protected]>
Date: Fri, 17 May 2024 14:38:16 +0000
Subject: [PATCH] use a bigger thread stack by default

apparently newer musl versions require more stack for the TCP-based
DNS resolver.

closes #73
---
sockssrv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sockssrv.c
+++ b/sockssrv.c
@@ -47,7 +47,7 @@
#endif

#ifdef PTHREAD_STACK_MIN
-#define THREAD_STACK_SIZE MAX(8*1024, PTHREAD_STACK_MIN)
+#define THREAD_STACK_SIZE MAX(16*1024, PTHREAD_STACK_MIN)
#else
#define THREAD_STACK_SIZE 64*1024
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0343813e0410b469d591bc61b9a546ee2c2c15f6 Mon Sep 17 00:00:00 2001
From: rofl0r <[email protected]>
Date: Fri, 17 May 2024 14:40:11 +0000
Subject: [PATCH] mute warning about shadow declaration of bind_addr

---
sockssrv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/sockssrv.c
+++ b/sockssrv.c
@@ -112,8 +112,8 @@ struct thread {
static void dolog(const char* fmt, ...) { }
#endif

-static struct addrinfo* addr_choose(struct addrinfo* list, union sockaddr_union* bind_addr) {
- int af = SOCKADDR_UNION_AF(bind_addr);
+static struct addrinfo* addr_choose(struct addrinfo* list, union sockaddr_union* bindaddr) {
+ int af = SOCKADDR_UNION_AF(bindaddr);
if(af == AF_UNSPEC) return list;
struct addrinfo* p;
for(p=list; p; p=p->ai_next)
Loading

0 comments on commit dcd652d

Please sign in to comment.