Commit Graph

47 Commits

Author SHA1 Message Date
George Sapkin 6a20260a1f treewide: fix typos in version check overrides
Fix shellcheck shell configuration in version check overrides.

Signed-off-by: George Sapkin <george@sapk.in>
2026-05-25 08:02:47 +03:00
George Sapkin f2ff06a648 avahi: move version checks to override
Move existing version checks into override and add explicit package checks.

Signed-off-by: George Sapkin <george@sapk.in>
2026-05-17 14:35:31 +03:00
Yanase Yuki b0d8a3d384 treewide: cleanup URLs
This commit converts plain HTTP URLs to HTTPS, and updates
old or outdated URLs.

Signed-off-by: Yanase Yuki <dev@zpc.st>
2026-05-08 22:28:27 +02:00
Alexandru Ardelean 24c3026f94 avahi: update to 0.9-rc4
Fixes https://github.com/openwrt/packages/issues/27952

Update avahi from 0.8 to 0.9-rc4. The 0.9 development line accumulates
four years of bug and security fixes since the 0.8 release (2020-02-18).

Notable improvements in 0.9-rc4 over 0.8:

Security (all CVEs previously backported as patches, now removed):
  - CVE-2023-38469: reject TXT records whose total rdata exceeds
    AVAHI_DNS_RDATA_MAX, preventing heap-buffer reads under crafted mDNS
  - CVE-2023-38470: ensure each DNS label is at least one byte, preventing
    an infinite loop on malformed packets
  - CVE-2023-38471: extract host name via avahi_unescape_label() before
    generating an alternative to avoid operating on a raw escaped string
  - CVE-2023-38472: check that rdata pointer is non-NULL before passing to
    avahi_rdata_parse() from dbus-entry-group
  - CVE-2023-38473: derive alternative host name from its unescaped form,
    fixing incorrect hostname collision resolution with escaped labels

Bug fixes (previously backported):
  - Fix NULL-pointer crashes in avahi_s_*_browser_new() (#175)
  - Avoid infinite loop in avahi-daemon simple-protocol by handling
    AVAHI_WATCH_HUP event in client_work
  - Fix potential undefined behaviour in avahi_dns_packet_consume_uint32:
    cast uint8_t operands to uint32_t before shifting
  - Fix memory/CPU leak in the simple event loop: cleanup_watches() was
    zeroing timeout_req_cleanup instead of watch_req_cleanup, so completed
    watches were never removed from the linked list
  - Emit D-Bus error reply when avahi-daemon cannot resolve a hostname or
    service, rather than crashing with a NULL dereference
  - Increase ini-file-parser line buffer from 256 to 1024 bytes to handle
    longer configuration values without silent truncation

Other changes:
  - P2P tunnel support: IFF_MULTICAST is no longer required for
    point-to-point interfaces when allow-point-to-point=yes
  - Runtime directory: configure.ac now derives the socket path from
    ${runstatedir} (defaults to ${localstatedir}/run), so the
    explicit patch reverting the /run hardcoding is no longer needed
  - Patch 010-pkgconfig.patch (pkgconfig prefix alignment) is retained
    as it has not been merged upstream

Dropped patches (all merged upstream):
  020-revert-runtime-dir-systemd-change.patch
  100-p2p-no-iff_multicast-required.patch
  200-Fix-NULL-pointer-crashes-from-175.patch
  201-Avoid-infinite-loop-in-avahi-daemon-by-handling-HUP-event.patch
  202-avahi_dns_packet_consume_uint32-fix-potential-undefined-b.patch
  203-Do-not-disable-timeout-cleanup-on-watch-cleanup.patch
  204-Emit-error-if-requested-service-is-not-found.patch
  205-conf-file-line-lengths.patch
  300-CVE-2023-38469.patch through 304-CVE-2023-38473.patch

Library SONAMES unchanged: libavahi-common.so.3, libavahi-core.so.7,
libavahi-client.so.3 — no reverse dependency rebuilds required.

Disable libsystemd (not available on OpenWrt)
avahi 0.9-rc4 added --enable-libsystemd which defaults to enabled and
fails configure when libsystemd is not found via pkg-config.  OpenWrt
does not provide libsystemd; disable it explicitly.
Also pass --with-systemdsystemunitdir=no to suppress the pkg-config
lookup for the systemd unit directory.

Drop po/ subdir from build
The 0.9-rc4 tarball is a raw git archive; po/Makefile.in.in is not
pre-generated as it was in the 0.8 release tarball.  autopoint (from
gettext) is needed to install it, but is not available in the OpenWrt
SDK.  Since OpenWrt does not use NLS translations, remove po/ from
SUBDIRS in Makefile.am to avoid the missing po/Makefile.in.in error
during configure.

In 0.9-rc4 the D-Bus system.d directory changed from
$(sysconfdir)/dbus-1/system.d to $(datadir)/dbus-1/system.d,
so avahi-dbus.conf is now installed under usr/share/dbus-1/system.d.
Update the install rule source path accordingly; keep the on-device
destination at /etc/dbus-1/system.d for compatibility.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-05-06 09:05:08 +03:00
Alexandru Ardelean 8d3c004213 treewide: set me where PKG_MAINTAINER empty
Seems a lot of packages are just getting abandoned by people.
Will pick these up and see them through.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-16 21:48:36 +03:00
John Audia 9c563686e2 avahi: fix implementation of avahi user
All avahi subpackages should run the daemon as a dedicated user insteead
of as the nobody user. This is helpful in troubleshooting and better for
security and to help avoid resource conflicts.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc (avahi-dbus-daemon)

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-10-27 17:33:06 -04:00
Rosen Penev 1974a441d5 avahi: backport CVE fixes from upstream
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-02-10 18:34:55 -08:00
Rosen Penev 5ae88c48b7 avahi: remove compat library
It seems this is meant for distributions that lack mdnsresponder. It's
heavier than it as dbus is required.

Since this happens to conflict with mdnsresponder, just remove it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-16 21:08:18 -08:00
Hirokazu MORIKAWA 779af4d40c avahi: Import patches for security fixes
Imported patches included in debian and other package.

* 200-Fix-NULL-pointer-crashes-from-175.patch
  CVE-2021-3502
   A flaw was found in avahi 0.8-5. A reachable assertion is present in avahi_s_host_name_resolver_start function allowing a local attacker to crash the avahi service by requesting hostname resolutions through the avahi socket or dbus methods for invalid hostnames. The highest threat from this vulnerability is to the service availability.

* 201-Avoid-infinite-loop-in-avahi-daemon-by-handling-HUP-event.patch
  CVE-2021-3468
   A flaw was found in avahi in versions 0.6 up to 0.8. The event used to signal the termination of the client connection on the avahi Unix socket is not correctly handled in the client_work function, allowing a local attacker to trigger an infinite loop. The highest threat from this vulnerability is to the availability of the avahi service, which becomes unresponsive after this flaw is triggered.

* 202-avahi_dns_packet_consume_uint32-fix-potential-undefined-b.patch
   avahi_dns_packet_consume_uint32 left shifts uint8_t values by 8, 16 and 24 bits to combine them into a 32-bit value. This produces an undefined behavior warning with gcc -fsanitize when fed input values of 128 or 255 however in testing no actual unexpected behavior occurs in practice and the 32-bit uint32_t is always correctly produced as the final value is immediately stored into a uint32_t and the compiler appears to handle this "correctly".
Cast the intermediate values to uint32_t to prevent this warning and ensure the intended result is explicit.

* 203-Do-not-disable-timeout-cleanup-on-watch-cleanup.patch
   This was causing timeouts to never be removed from the linked list that tracks them, resulting in both memory and CPU usage to grow larger over time.

* 204-Emit-error-if-requested-service-is-not-found.patch
   It currently just crashes instead of replying with error. Check return
value and emit error instead of passing NULL pointer to reply.

* 205-conf-file-line-lengths.patch
   Allow avahi-daemon.conf file to have lines longer than 256 characters (new limit 1024).

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2023-06-09 14:47:07 +03:00
Hirokazu MORIKAWA ccf8450ed2 avahi: Changed the target file for the patch
Fixed the affected issue in the latest commit

  daemon.err avahi-daemon[xxx]: mkdir("/run/avahi-daemon/"): No such file or directory

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2022-02-12 19:35:47 -08:00
Michal Vasilek 8490d7096d avahi: fix build on some distributions
This seems to happen only on some distributions (Void, Arch):

    /usr/lib/libgcc_s.so.1: file not recognized: file format not recognized
    collect2: error: ld returned 1 exit status
    libtool:   error: error: relink 'libdns_sd.la' with the above command before installing it

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-02-09 16:05:14 -08:00
Ilya Lipnitskiy 5d8d4fbbcb treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00
Philip Prindeville 30625ff992 avahi: incorrectly requires IFF_MULTICAST on point-to-point (tunnel) interfaces
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-11-24 13:57:10 -07:00
Rosen Penev 4f883459d0 avahi: remove lssp_nonshared flag
Does not seem to be needed as of b933f9cf0cb254e368027cad6d5799e45b237df5

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-17 20:06:54 -07:00
Ian Cooper 918983044f avahi: fix reliance on config symbol SSP_SUPPORT
The config symbol SSP_SUPPORT is ambiguous and means different
things to different packages: either "toolchain is compiled
with ssp support" or "toolchain uses gcc libssp". The use of the
symbol should be deprecated and the appropriate symbol used
instead.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
2020-05-26 20:27:09 +01:00
Rosen Penev 2a5fa45d72 avahi: remove these pkgconfig workarounds
Backported the upstream patch instead. Less error prone.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-26 15:34:18 -07:00
Rosen Penev d4cdc14e0e avahi: fix dbus issue
Needs an extra configure parameter.

Reverted pkgconfig fix. It's wrong anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-25 15:54:14 -07:00
Rosen Penev 0266fa2d29 avahi: patch client pkgconfig files without dbus
It still gets built without dbus.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-18 18:06:33 -07:00
Rosen Penev 9290d41077 avahi: update to 0.8
Clean up Makefile slightly.

Update configure options for the new version.

Remove first patch and update the other one.

Use a different solution for the stack protector on certain platforms.

Run script through shellcheck. Small quote fix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-25 20:53:35 -08:00
Rosen Penev f41612bc9c avahi: convert to procd
Add license information.

Small cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-08 19:47:49 -08:00
Rosen Penev 736ebb16b6 avahi: Fix pkgconfig files to be cross compile friendly
libdir should not point to the host.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-09-28 17:16:17 -07:00
Rosen Penev 055a813280 libavahi-compat-libdnssd: Fix compilation
The inline if statement does not work correctly. Moved it to a more proper place.

Also changed the install to install the symlinks as well.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-02-02 13:37:09 -08:00
Rosen Penev 61cdf7b4d6 avahi: Add CPE ID to track CVEs
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-08-19 15:05:41 -07:00
Jeremiah McConnell 933037e998 avahi: patch systemd runtime_dir change in 0.7
In avahi 0.7 the runtime_dir was updated to be /run instead of /var/run
for better systemd compatibility.  Patch out that change to fix
avahi-daemon.

Signed-off-by: Jeremiah McConnell <miah@miah.com>
2018-06-15 15:26:19 -06:00
Rosen Penev 1509fd7123 avahi: Update to 0.7
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-06-10 16:43:51 -07:00
Matthias Schiffer 00fce347a5 treewide: fix incorrect *_BUILD_DEPENDS
Build depends refer to source package names, not binary package names.

In many cases, PKG_BUILD_DEPENDS simply duplicated runtime dependencies of
a source package's binary packages; as the corresponding source packages
are implicitly added as bulid dependencies, PKG_BUILD_DEPENDS can simply be
dropped in these cases. In the other cases, *_BUILD_DEPENDS is fixed to
refer to the correct source package name.

Dependency of mysql-server is adjusted from libncursesw to libncurses
(as libncursesw is a virtual package provided by libncurses), so the build
dependency on ncurses is emitted unconditionally.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-09 16:36:02 +01:00
Hirokazu MORIKAWA 367cd73bf0 avahi: Changed the condition of InstallDev
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2017-11-17 16:02:33 +09:00
Etienne Champetier 4006865ae8 treewide: run "make check FIXUP=1"
fix Makefile chmod (644)
replace MD5SUM with HASH
add PKG_MIRROR_HASH when PKG_SOURCE_PROTO:=git

(PKG_SOURCE_PROTO:=svn tarballs are not reproducible for now)

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2017-08-29 21:41:14 -07:00
Ted Hess 050e88ee87 avahi: Change avahi-utils dependency to allow stand-alone selection
Signed-off-by: Ted Hess <thess@kitschensync.net>
2017-03-28 16:29:55 -04:00
Claudiu Brasovean 0312a14a47 avahi: Update to 0.6.32. Add netifd proto handler for avahi-autoipd
You can now specify in '/etc/config/network'

config interface 'eth1_autoip'
	option ifname	'eth1'
	option proto	'autoip'

And netifd would handle the rest of the logic/setup.

Signed-off-by: Claudiu Brasovean <cbrasho@gmail.com>
Signed-off-by: Ted Hess <thess@kitschensync.net>
2016-09-28 14:11:53 -04:00
Alexandru Ardelean 728655ac29 libs/avahi: fix warning with poll.h include on musl
Warning is:
   #warning redirecting incorrect #include <sys/poll.h> to <poll.

Not a big issue.
But it can be annoying when building with -Werror set.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-01-06 16:16:44 +02:00
Ted Hess e3532da370 avahi: Enable IPv6 by default
Signed-off-by: Ted Hess <thess@kitschensync.net>
2015-03-24 11:45:12 -04:00
Stijn Tintel 735a525ee8 avahi: remove optional dependency on libssp
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2015-03-20 17:45:23 +01:00
Daniel Golle 73094db36f avahi: avahi-autoipd uses libssp if SSP_SUPPORT is enabled
Found on an all-y build with SSP enabled:
Package avahi-autoipd is missing dependencies for the following libraries:
libssp.so.0

Adding the missing dependency to address that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2015-03-15 12:12:48 +01:00
Ted Hess 8f10e59f70 libavahi: Fix build dependency in avahi-dnsconfd
Signed-off-by: Ted Hess <thess@kitschensync.net>
2015-01-27 10:22:09 -05:00
Ted Hess 9bc03b9d99 avahi: Build 2 versions and allow selection of dbus vs non-dbus
shairplay: Fixup avahi dependency (select dbus version)
forked-daapd: Fixup avahi dependency (select dbus version)

Signed-off-by: Ted Hess <thess@kitschensync.net>
2015-01-16 16:28:23 -05:00
Michael Heimpold 2154a42b72 avahi-daemon: don't install service files automatically (fixes #757)
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2015-01-09 19:28:23 +01:00
Michael Heimpold d1f7e907a5 avahi: factor out service files into own packages
This allows the user to select individual services to be announced
via Avahi.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2014-12-08 23:04:00 +01:00
Michael Heimpold 36ea069216 avahi: trim descriptions of HTTP and SSH services
This makes the description of the HTTP and SSH services look the
same as in other distributions as suggested by kirelagin in #543.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2014-12-08 23:01:16 +01:00
Ted Hess b80fe2edbc Revert "avahi: Add sftp service"
This reverts commit 49c7e701bc.

Signed-off-by: Ted Hess <thess@kitschensync.net>
2014-11-24 09:27:24 -05:00
Ted Hess 49c7e701bc avahi: Add sftp service
Signed-off-by: Ted Hess <thess@kitschensync.net>
2014-11-23 16:14:41 -05:00
Ted Hess 719da24cd9 libavahi: Don't build libdns_sd if not selected
Signed-off-by: Ted Hess <thess@kitschensync.net>
2014-11-01 18:49:38 -04:00
Álvaro Fernández Rojas f36017a44c avahi: add libavahi-compat-libdnssd support.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2014-10-25 17:14:41 +02:00
Steven Barth a689d930f1 Revert "avahi: remove dbus support for now"
This reverts commit c1675e2bc5.
2014-07-18 11:01:39 +02:00
Steven Barth c1675e2bc5 avahi: remove dbus support for now
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-18 10:52:22 +02:00
Ted Hess 8af95fcaf1 avahi: Update copyright, add myself as pkg maintainer
Signed-off-by: Ted Hess <thess@kitschensync.net>
2014-07-16 15:37:53 -04:00
Ted Hess fa8703665b Import avahi from oldpackages 2014-07-16 12:28:32 -04:00