From 79e9a5a89de3c8e98e2e732042cbf61b25b01f94 Mon Sep 17 00:00:00 2001 From: George Sapkin Date: Mon, 11 May 2026 20:10:13 +0300 Subject: [PATCH 1/4] avahi: move version checks to override Move existing version checks into override and add explicit package checks. Signed-off-by: George Sapkin (cherry picked from commit f2ff06a648a54ae8ef89a80450b49f9b4200454c) --- libs/avahi/test-version.sh | 43 +++++++++++++++++++++ libs/avahi/test.sh | 79 +++++++++++++++----------------------- 2 files changed, 74 insertions(+), 48 deletions(-) create mode 100755 libs/avahi/test-version.sh diff --git a/libs/avahi/test-version.sh b/libs/avahi/test-version.sh new file mode 100755 index 00000000000000..661e3f055148ee --- /dev/null +++ b/libs/avahi/test-version.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# shellckeck shell=busybox + +_version_check() { + local bin="$1" pkg="$2" ver="$3" + # apk versions use _ where upstream uses - (e.g. 0.9_rc4 vs 0.9-rc4) + local upstream_ver + upstream_ver=$(echo "$ver" | tr '_' '-') + "$bin" -V 2>&1 | grep -F "$upstream_ver" || { + echo "FAIL: $bin -V did not print expected version '$upstream_ver'" + exit 1 + } +} + +case "$PKG_NAME" in +avahi-autoipd) + _version_check avahi-autoipd avahi-autoipd "$PKG_VERSION" + ;; + +avahi-dbus-daemon|\ +avahi-nodbus-daemon) + _version_check avahi-daemon avahi-daemon "$PKG_VERSION" + ;; + +avahi-dnsconfd) + _version_check avahi-dnsconfd avahi-dnsconfd "$PKG_VERSION" + ;; + +avahi-daemon-service-http|\ +avahi-daemon-service-ssh|\ +avahi-utils|\ +libavahi-client|\ +libavahi-dbus-support|\ +libavahi-nodbus-support) + exit 0 + ;; + +*) + echo "Untested package: $PKG_NAME" >&2 + exit 1 + ;; +esac diff --git a/libs/avahi/test.sh b/libs/avahi/test.sh index 4175934ace611a..a57c0f87e22eff 100644 --- a/libs/avahi/test.sh +++ b/libs/avahi/test.sh @@ -1,16 +1,5 @@ #!/bin/sh -_version_check() { - local bin="$1" pkg="$2" ver="$3" - # apk versions use _ where upstream uses - (e.g. 0.9_rc4 vs 0.9-rc4) - local upstream_ver - upstream_ver=$(echo "$ver" | tr '_' '-') - "$bin" -V 2>&1 | grep -F "$upstream_ver" || { - echo "FAIL: $bin -V did not print expected version '$upstream_ver'" - exit 1 - } -} - _lib_check() { local f="$1" [ -e "$f" ] || { echo "FAIL: $f not found"; exit 1; } @@ -20,10 +9,6 @@ _lib_check() { # Works for both dbus and nodbus variants; dbus variant skips the start # test when avahi-utils (which needs dbus) is not installed. _daemon_start_test() { - local ver="$1" - - _version_check avahi-daemon avahi-daemon "$ver" - # Config file from package [ -f /etc/avahi/avahi-daemon.conf ] || { echo "FAIL: /etc/avahi/avahi-daemon.conf not installed" @@ -41,36 +26,36 @@ _daemon_start_test() { # Try to start avahi-daemon with a minimal config and no privilege drop mkdir -p /var/run/avahi-daemon /tmp/avahi-test - cat > /tmp/avahi-test/avahi-daemon.conf << 'EOF' -[server] -host-name=avahi-test -use-ipv4=yes -use-ipv6=no -check-response-ttl=no -use-iff-running=no -enable-dbus=no - -[wide-area] -enable-wide-area=no - -[publish] -publish-addresses=yes -publish-hinfo=no -publish-workstation=no -publish-domain=yes -disable-publishing=no - -[reflector] -enable-reflector=no - -[rlimits] -rlimit-core=0 -rlimit-data=4194304 -rlimit-fsize=0 -rlimit-nofile=30 -rlimit-stack=4194304 -rlimit-nproc=3 -EOF + cat > /tmp/avahi-test/avahi-daemon.conf <<-'EOF' + [server] + host-name=avahi-test + use-ipv4=yes + use-ipv6=no + check-response-ttl=no + use-iff-running=no + enable-dbus=no + + [wide-area] + enable-wide-area=no + + [publish] + publish-addresses=yes + publish-hinfo=no + publish-workstation=no + publish-domain=yes + disable-publishing=no + + [reflector] + enable-reflector=no + + [rlimits] + rlimit-core=0 + rlimit-data=4194304 + rlimit-fsize=0 + rlimit-nofile=30 + rlimit-stack=4194304 + rlimit-nproc=3 + EOF avahi-daemon --no-drop-root --no-chroot \ --file=/tmp/avahi-test/avahi-daemon.conf \ @@ -150,11 +135,10 @@ libavahi-client) ;; avahi-dbus-daemon|avahi-nodbus-daemon) - _daemon_start_test "$2" + _daemon_start_test ;; avahi-autoipd) - _version_check avahi-autoipd avahi-autoipd "$2" [ -x /usr/sbin/avahi-autoipd ] || { echo "FAIL: avahi-autoipd not executable"; exit 1; } [ -x /etc/avahi/avahi-autoipd.action ] || { echo "FAIL: avahi-autoipd.action script not installed" @@ -175,7 +159,6 @@ avahi-daemon-service-ssh) ;; avahi-dnsconfd) - _version_check avahi-dnsconfd avahi-dnsconfd "$2" [ -x /usr/sbin/avahi-dnsconfd ] || { echo "FAIL: avahi-dnsconfd not executable"; exit 1; } [ -x /etc/avahi/avahi-dnsconfd.action ] || { echo "FAIL: avahi-dnsconfd.action not installed" From 5474abdec7392818983464aeaafc81335bc9f9f9 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 3 Jul 2026 16:24:41 +0300 Subject: [PATCH 2/4] avahi: update to 0.9-rc5 / 0.9_rc5 Bump from the 0.9-rc4 pre-release to 0.9-rc5. Update PKG_VERSION, PKG_SOURCE, PKG_SOURCE_URL, PKG_BUILD_DIR and PKG_HASH accordingly. The two carried patches (010-pkgconfig, 020-no-po-subdir) still apply unchanged, and test-version.sh already normalises the underscore in the apk version (0.9_rc5) back to the upstream 0.9-rc5 string. Signed-off-by: Alexandru Ardelean (cherry picked from commit dc11dc66d28c3d5b8fc4552936894b4ce9a2e42f) --- libs/avahi/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/avahi/Makefile b/libs/avahi/Makefile index 618852c3847ea2..b43c66871e695e 100644 --- a/libs/avahi/Makefile +++ b/libs/avahi/Makefile @@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=avahi -PKG_VERSION:=0.9_rc4 +PKG_VERSION:=0.9_rc5 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-0.9-rc4.tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/avahi/avahi/tar.gz/v0.9-rc4? -PKG_HASH:=08fcc57377ed05416ec4b3d8a179da716a7a9376821551a5ae16f8276a1ef0b5 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-0.9-rc4 +PKG_SOURCE:=$(PKG_NAME)-0.9-rc5.tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/avahi/avahi/tar.gz/v0.9-rc5? +PKG_HASH:=5b0a9d88110b0fc8aaafc5cc0a26e83e7d2a4aca3a36bc27c9b626db7ead27b0 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-0.9-rc5 PKG_MAINTAINER:= PKG_LICENSE:=LGPL-2.1-or-later From dd99027ab43722bea2ff296092d94cd3e09ade86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Andr=C3=A9s=20P=C3=A9rez?= Date: Tue, 18 Nov 2025 14:47:47 +0100 Subject: [PATCH 3/4] avahi: define missing DEFAULT_VARIANT and add conflicts - Add DEFAULT_VARIANT to "avahi-daemon" and "libavahi" virtual packages; set to "dbus" variant because it is more compatible. When some package depends on one of these virtual packages an arbitrarily variant it is selected. This avoids that. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add conflicts in order to avoid mixing packages with different variants (when defining a DEFAULT_VARIANT the conflicts definition should be on that side of the dependency to avoid recursive dependencies). - Avoid building unused "dbus" dependency. Fixes: ASU sysupgrade problem with avahi packages https://forum.openwrt.org/t/luci-attended-sysupgrade-support-thread/230552/137 Fixes: https://github.com/openwrt/packages/commit/9bc03b9d9971c2f1e146f7c2d287d1fc16e776f0 Signed-off-by: Mario Andrés Pérez (cherry picked from commit d6facf284c548fd39efc4b2566ee9925263adce4) --- libs/avahi/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/avahi/Makefile b/libs/avahi/Makefile index b43c66871e695e..e0f036e4d6029b 100644 --- a/libs/avahi/Makefile +++ b/libs/avahi/Makefile @@ -82,10 +82,12 @@ define Package/avahi-dbus-daemon $(call Package/avahi/Default) PROVIDES:=avahi-daemon VARIANT:=dbus + DEFAULT_VARIANT:=1 SUBMENU:=IP Addresses and Names DEPENDS:=+libavahi-dbus-support +libexpat +librt +libdaemon TITLE+= (daemon) USERID:=avahi=105:avahi=105 + CONFLICTS:=libavahi-nodbus-support endef define Package/avahi-nodbus-daemon @@ -167,8 +169,10 @@ endef define Package/libavahi-dbus-support $(call Package/libavahi/Default) VARIANT:=dbus - DEPENDS:=+dbus + DEFAULT_VARIANT:=1 + DEPENDS:=+PACKAGE_libavahi-dbus-support:dbus TITLE+= (D-Bus support) + CONFLICTS:=libavahi-nodbus-support endef define Package/libavahi-nodbus-support @@ -207,6 +211,7 @@ define Package/libavahi-client VARIANT:=dbus DEPENDS:=+avahi-dbus-daemon TITLE+= (libavahi-client library) + CONFLICTS:=libavahi-nodbus-support endef define Package/libavahi-client/description @@ -224,6 +229,7 @@ define Package/avahi-utils VARIANT:=dbus DEPENDS:=+libavahi-client +libgdbm TITLE+= (utilities) + CONFLICTS:=libavahi-nodbus-support endef define Package/avahi-utils/description From 577a561a94e735003ab0f16152b5b4404f7fd485 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 9 Jul 2026 16:55:35 +0300 Subject: [PATCH 4/4] avahi: fix typo in version check override Fix the misspelled "shellckeck" directive so shellcheck actually lints test-version.sh as busybox sh. Backport of the avahi portion of the treewide commit; the other 12 packages it touches do not exist on this branch. (cherry picked from commit 6a20260a1e94e0c3d84cbc98d1f6c78a9265ebfe) Signed-off-by: Alexandru Ardelean --- libs/avahi/test-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/avahi/test-version.sh b/libs/avahi/test-version.sh index 661e3f055148ee..2d3601aa3b9c18 100755 --- a/libs/avahi/test-version.sh +++ b/libs/avahi/test-version.sh @@ -1,6 +1,6 @@ #!/bin/sh -# shellckeck shell=busybox +# shellcheck shell=busybox _version_check() { local bin="$1" pkg="$2" ver="$3"