From 0f0bce167469de401abb425e45c65aa6d2b743e4 Mon Sep 17 00:00:00 2001 From: Denis Shulyaka Date: Tue, 16 Jul 2024 13:54:54 +0300 Subject: [PATCH 1/3] ddns-scripts: Update knot resolver regexp The output format of `khost` has changed. This commit fixes the regexp for IPv4. It fixes the issue of using a custom DNS to resolve current address. ```bash root@localhost:~# khost ns2.afraid.org ns2.afraid.org. has IPv4 address 69.65.50.223 ns2.afraid.org. has IPv6 address 2001:1850:1:5:800::6b Host ns2.afraid.org. has no MX record root@localhost:~# khost --version khost (Knot DNS), version 3.3.5 ``` Signed-off-by: Denis Shulyaka (cherry picked from commit ebeae334d9ff39d81898a7d8b5275151518318f1) --- net/ddns-scripts/Makefile | 2 +- net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 54dd321178..7f78be9dca 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts PKG_VERSION:=2.8.2 -PKG_RELEASE:=25 +PKG_RELEASE:=26 PKG_LICENSE:=GPL-2.0 diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh index cb345e846b..392191dabd 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh @@ -546,9 +546,12 @@ verify_host_port() { return 2 } # extract IP address - if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then # use BIND host or Knot host if installed + if [ -n "$BIND_HOST" ]; then # use BIND host if installed __IPV4="$(awk -F "address " '/has address/ {print $2; exit}' "$DATFILE")" __IPV6="$(awk -F "address " '/has IPv6/ {print $2; exit}' "$DATFILE")" + elif [ -n "$KNOT_HOST" ]; then # use Knot host if installed + __IPV4="$(awk -F "address " '/has IPv4/ {print $2; exit}' "$DATFILE")" + __IPV6="$(awk -F "address " '/has IPv6/ {print $2; exit}' "$DATFILE")" elif [ -n "$DRILL" ]; then # use drill if installed __IPV4="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV4_REGEX")" __IPV6="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV6_REGEX")" From f88fc60ddb30970619f18eeda51a455b41e729e3 Mon Sep 17 00:00:00 2001 From: Seo Suchan Date: Sun, 12 May 2024 04:20:50 +0900 Subject: [PATCH 2/3] transmission: fix compile with MbedTLS 3.X Backport pending patch, which was submitted to upstream via GitHub to use renamed function to compile it against MbedTLS 3.x. Signed-off-by: Seo Suchan (cherry picked from commit 42140c67e04392898e8372c4619a9c7ebfa876ca) --- net/transmission/Makefile | 2 +- .../patches/010-temp-mbedtls3-compile.patch | 70 +++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 net/transmission/patches/010-temp-mbedtls3-compile.patch diff --git a/net/transmission/Makefile b/net/transmission/Makefile index e795451e20..d688d3691a 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=transmission PKG_VERSION:=4.0.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/transmission/transmission/releases/download/$(PKG_VERSION)/ diff --git a/net/transmission/patches/010-temp-mbedtls3-compile.patch b/net/transmission/patches/010-temp-mbedtls3-compile.patch new file mode 100644 index 0000000000..f3c473bc2a --- /dev/null +++ b/net/transmission/patches/010-temp-mbedtls3-compile.patch @@ -0,0 +1,70 @@ +From da7d6fe0e1b162eac6cc048153ff7f201975b6c4 Mon Sep 17 00:00:00 2001 +From: Seo Suchan +Date: Thu, 2 May 2024 03:34:12 +0900 +Subject: [PATCH] fix compile with mbedtls 3.x + +Signed-off-by: Seo Suchan +--- + libtransmission/crypto-utils-mbedtls.cc | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/libtransmission/crypto-utils-mbedtls.cc ++++ b/libtransmission/crypto-utils-mbedtls.cc +@@ -117,7 +117,7 @@ public: + { + mbedtls_sha1_init(&handle_); + +-#if MBEDTLS_VERSION_NUMBER >= 0x02070000 ++#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 + mbedtls_sha1_starts_ret(&handle_); + #else + mbedtls_sha1_starts(&handle_); +@@ -128,7 +128,7 @@ public: + { + if (data_length > 0U) + { +-#if MBEDTLS_VERSION_NUMBER >= 0x02070000 ++#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 + mbedtls_sha1_update_ret(&handle_, static_cast(data), data_length); + #else + mbedtls_sha1_update(&handle_, static_cast(data), data_length); +@@ -140,7 +140,7 @@ public: + { + auto digest = tr_sha1_digest_t{}; + auto* const digest_as_uchar = reinterpret_cast(std::data(digest)); +-#if MBEDTLS_VERSION_NUMBER >= 0x02070000 ++#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 + mbedtls_sha1_finish_ret(&handle_, digest_as_uchar); + #else + mbedtls_sha1_finish(&handle_, digest_as_uchar); +@@ -168,10 +168,10 @@ public: + { + mbedtls_sha256_init(&handle_); + +-#if MBEDTLS_VERSION_NUMBER >= 0x02070000 ++#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 + mbedtls_sha256_starts_ret(&handle_, 0); + #else +- mbedtls_sha256_starts(&handle_); ++ mbedtls_sha256_starts(&handle_, 0); + #endif + } + +@@ -179,7 +179,7 @@ public: + { + if (data_length > 0U) + { +-#if MBEDTLS_VERSION_NUMBER >= 0x02070000 ++#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 + mbedtls_sha256_update_ret(&handle_, static_cast(data), data_length); + #else + mbedtls_sha256_update(&handle_, static_cast(data), data_length); +@@ -191,7 +191,7 @@ public: + { + auto digest = tr_sha256_digest_t{}; + auto* const digest_as_uchar = reinterpret_cast(std::data(digest)); +-#if MBEDTLS_VERSION_NUMBER >= 0x02070000 ++#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 + mbedtls_sha256_finish_ret(&handle_, digest_as_uchar); + #else + mbedtls_sha256_finish(&handle_, digest_as_uchar); From 3b79b05673a15e7f41f157d1320597244a344a95 Mon Sep 17 00:00:00 2001 From: Karol Kolacinski Date: Sat, 6 Jul 2024 18:12:01 +0200 Subject: [PATCH 3/3] transmission: update to version 4.0.6 Release notes: https://github.com/transmission/transmission/releases/tag/4.0.6 Remove temporary patch included in 4.0.6 release. Signed-off-by: Karol Kolacinski (cherry picked from commit c32139757cf13b78a114fbd900aadba8ae1b94b7) --- net/transmission/Makefile | 6 +- .../patches/010-temp-mbedtls3-compile.patch | 70 ------------------- 2 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 net/transmission/patches/010-temp-mbedtls3-compile.patch diff --git a/net/transmission/Makefile b/net/transmission/Makefile index d688d3691a..d6b297b849 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=transmission -PKG_VERSION:=4.0.5 -PKG_RELEASE:=2 +PKG_VERSION:=4.0.6 +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:=fd68ff114a479200043c30c7e69dba4c1932f7af36ca4c5b5d2edcb5866e6357 +PKG_HASH:=2a38fe6d8a23991680b691c277a335f8875bdeca2b97c6b26b598bc9c7b0c45f PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=GPL-2.0-or-later diff --git a/net/transmission/patches/010-temp-mbedtls3-compile.patch b/net/transmission/patches/010-temp-mbedtls3-compile.patch deleted file mode 100644 index f3c473bc2a..0000000000 --- a/net/transmission/patches/010-temp-mbedtls3-compile.patch +++ /dev/null @@ -1,70 +0,0 @@ -From da7d6fe0e1b162eac6cc048153ff7f201975b6c4 Mon Sep 17 00:00:00 2001 -From: Seo Suchan -Date: Thu, 2 May 2024 03:34:12 +0900 -Subject: [PATCH] fix compile with mbedtls 3.x - -Signed-off-by: Seo Suchan ---- - libtransmission/crypto-utils-mbedtls.cc | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - ---- a/libtransmission/crypto-utils-mbedtls.cc -+++ b/libtransmission/crypto-utils-mbedtls.cc -@@ -117,7 +117,7 @@ public: - { - mbedtls_sha1_init(&handle_); - --#if MBEDTLS_VERSION_NUMBER >= 0x02070000 -+#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 - mbedtls_sha1_starts_ret(&handle_); - #else - mbedtls_sha1_starts(&handle_); -@@ -128,7 +128,7 @@ public: - { - if (data_length > 0U) - { --#if MBEDTLS_VERSION_NUMBER >= 0x02070000 -+#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 - mbedtls_sha1_update_ret(&handle_, static_cast(data), data_length); - #else - mbedtls_sha1_update(&handle_, static_cast(data), data_length); -@@ -140,7 +140,7 @@ public: - { - auto digest = tr_sha1_digest_t{}; - auto* const digest_as_uchar = reinterpret_cast(std::data(digest)); --#if MBEDTLS_VERSION_NUMBER >= 0x02070000 -+#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 - mbedtls_sha1_finish_ret(&handle_, digest_as_uchar); - #else - mbedtls_sha1_finish(&handle_, digest_as_uchar); -@@ -168,10 +168,10 @@ public: - { - mbedtls_sha256_init(&handle_); - --#if MBEDTLS_VERSION_NUMBER >= 0x02070000 -+#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 - mbedtls_sha256_starts_ret(&handle_, 0); - #else -- mbedtls_sha256_starts(&handle_); -+ mbedtls_sha256_starts(&handle_, 0); - #endif - } - -@@ -179,7 +179,7 @@ public: - { - if (data_length > 0U) - { --#if MBEDTLS_VERSION_NUMBER >= 0x02070000 -+#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 - mbedtls_sha256_update_ret(&handle_, static_cast(data), data_length); - #else - mbedtls_sha256_update(&handle_, static_cast(data), data_length); -@@ -191,7 +191,7 @@ public: - { - auto digest = tr_sha256_digest_t{}; - auto* const digest_as_uchar = reinterpret_cast(std::data(digest)); --#if MBEDTLS_VERSION_NUMBER >= 0x02070000 -+#if MBEDTLS_VERSION_NUMBER < 0x03000000 && MBEDTLS_VERSION_NUMBER >= 0x02070000 - mbedtls_sha256_finish_ret(&handle_, digest_as_uchar); - #else - mbedtls_sha256_finish(&handle_, digest_as_uchar);