* update avahi to 1:0.8+r22+gfd482a7-1

This commit is contained in:
Alexander Baldeck 2023-07-07 16:38:37 +02:00
parent ef9d327bb3
commit efa8ac742f
5 changed files with 174 additions and 64 deletions

View File

@ -1,4 +1,4 @@
From bcafdcc5465091b6088532460b671f411703f90b Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org> From: Simon McVittie <smcv@debian.org>
Date: Fri, 24 Apr 2020 11:25:41 +0100 Date: Fri, 24 Apr 2020 11:25:41 +0100
Subject: [PATCH] avahi-discover: Don't decode unicode strings, only Subject: [PATCH] avahi-discover: Don't decode unicode strings, only
@ -16,10 +16,10 @@ Signed-off-by: Simon McVittie <smcv@debian.org>
1 file changed, 5 insertions(+), 3 deletions(-) 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/avahi-python/avahi-discover/avahi-discover.py b/avahi-python/avahi-discover/avahi-discover.py diff --git a/avahi-python/avahi-discover/avahi-discover.py b/avahi-python/avahi-discover/avahi-discover.py
index 4a2b5756..fddf4a51 100755 index 4a2b5756343f..fddf4a518074 100755
--- a/avahi-python/avahi-discover/avahi-discover.py --- a/avahi-python/avahi-discover/avahi-discover.py
+++ b/avahi-python/avahi-discover/avahi-discover.py +++ b/avahi-python/avahi-discover/avahi-discover.py
@@ -238,15 +238,17 @@ def update_label(self,interface, protocol, name, stype, domain, host, aprotocol, @@ -238,15 +238,17 @@ class Main_window:
txts+="<b>" + _("TXT") + " <i>%s</i></b> = %s\n" % (k,v) txts+="<b>" + _("TXT") + " <i>%s</i></b> = %s\n" % (k,v)
else: else:
txts = "<b>" + _("TXT Data:") + "</b> <i>" + _("empty") + "</i>" txts = "<b>" + _("TXT Data:") + "</b> <i>" + _("empty") + "</i>"

View File

@ -1,4 +1,4 @@
From 6fe6c44d953edd50c32ff6ce8fec5ac811fa3b69 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Asger Hautop Drewsen <asger@princh.com> From: Asger Hautop Drewsen <asger@princh.com>
Date: Mon, 9 Aug 2021 14:25:08 +0200 Date: Mon, 9 Aug 2021 14:25:08 +0200
Subject: [PATCH] Fix avahi-browse: Invalid service type Subject: [PATCH] Fix avahi-browse: Invalid service type
@ -8,7 +8,7 @@ Subject: [PATCH] Fix avahi-browse: Invalid service type
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c
index 5531360..2d3fa75 100644 index 63e0275a5cdb..ac3d2ecb271c 100644
--- a/avahi-core/browse-service.c --- a/avahi-core/browse-service.c
+++ b/avahi-core/browse-service.c +++ b/avahi-core/browse-service.c
@@ -103,7 +103,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_prepare( @@ -103,7 +103,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_prepare(
@ -22,6 +22,3 @@ index 5531360..2d3fa75 100644
if (!domain) if (!domain)
domain = server->domain_name; domain = server->domain_name;
--
2.32.0

View File

@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gustavo Noronha Silva <gustavo@noronha.dev.br>
Date: Sun, 2 Jan 2022 22:29:04 -0300
Subject: [PATCH] Do not disable timeout cleanup on watch cleanup
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.
---
avahi-common/simple-watch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
index 08d8090c7789..2a4a98920c05 100644
--- a/avahi-common/simple-watch.c
+++ b/avahi-common/simple-watch.c
@@ -238,7 +238,7 @@ static void cleanup_watches(AvahiSimplePoll *s, int all) {
destroy_watch(w);
}
- s->timeout_req_cleanup = 0;
+ s->watch_req_cleanup = 0;
}
static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {

View File

@ -0,0 +1,58 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 8 Jun 2023 21:05:22 +0200
Subject: [PATCH] HACK: Install fixes
- Move example services to docs, see
https://bugs.archlinux.org/task/47822
- Don't mkdir rundir
- Install header symlink for compat with mdnsresponder
---
avahi-compat-libdns_sd/Makefile.am | 3 +++
avahi-daemon/Makefile.am | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/avahi-compat-libdns_sd/Makefile.am b/avahi-compat-libdns_sd/Makefile.am
index 9a66bc0d12d9..a6e509133ca9 100644
--- a/avahi-compat-libdns_sd/Makefile.am
+++ b/avahi-compat-libdns_sd/Makefile.am
@@ -27,6 +27,9 @@ avahi_compat_libdns_sddir=$(includedir)/avahi-compat-libdns_sd
avahi_compat_libdns_sd_HEADERS = dns_sd.h
+install-data-local:
+ $(LN_S) avahi-compat-libdns_sd/dns_sd.h "$(DESTDIR)$(includedir)/dns_sd.h"
+
lib_LTLIBRARIES = libdns_sd.la
if ENABLE_TESTS
diff --git a/avahi-daemon/Makefile.am b/avahi-daemon/Makefile.am
index 9645e6e7c2e2..7dd38d99d16e 100644
--- a/avahi-daemon/Makefile.am
+++ b/avahi-daemon/Makefile.am
@@ -27,6 +27,7 @@ pkgsysconfdir=$(sysconfdir)/avahi
servicedir=$(pkgsysconfdir)/services
introspectiondir=$(datadir)/dbus-1/interfaces
dbussystemservicesdir=$(datadir)/dbus-1/system-services
+pkgdocdir=$(datadir)/doc/avahi
AM_CFLAGS+= \
-DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
@@ -69,7 +70,7 @@ pkgsysconf_DATA = \
avahi-daemon.conf \
hosts
-dist_service_DATA = \
+dist_pkgdoc_DATA = \
ssh.service \
sftp-ssh.service
@@ -169,7 +170,7 @@ xmllint:
done
install-data-local:
- test -z "$(avahi_runtime_dir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_runtime_dir)"
+ $(MKDIR_P) "$(DESTDIR)$(servicedir)"
update-systemd:
curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c

View File

@ -4,91 +4,121 @@
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org> # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=avahi pkgname=avahi
pkgver=0.8+22+gfd482a7 pkgver=0.8+r22+gfd482a7
pkgrel=4 pkgrel=1
pkgdesc='Service Discovery for Linux using mDNS/DNS-SD -- compatible with Bonjour' epoch=1
url='https://github.com/lathiat/avahi' pkgdesc="Service Discovery for Linux using mDNS/DNS-SD (compatible with Bonjour)"
url="https://github.com/lathiat/avahi"
license=(LGPL) license=(LGPL)
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
depends=(expat libdaemon glib2 libcap gdbm dbus) depends=(
makedepends=(git gobject-introspection gtk3 qt5-base xmltoman dbus-python dbus
python-gobject doxygen graphviz libevent) expat
optdepends=('gtk3: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc' gdbm
'qt5-base: qt5 bindings' glib2
libcap
libdaemon
)
makedepends=(
doxygen
git
gobject-introspection
graphviz
gtk3
libevent
dbus-python
python-gobject
qt5-base
xmltoman
)
optdepends=(
'gtk3: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc'
'libevent: libevent bindings' 'libevent: libevent bindings'
'nss-mdns: NSS support for mDNS' 'nss-mdns: NSS support for mDNS'
'python-twisted: avahi-bookmarks' 'dbus-python: avahi-bookmarks, avahi-discover'
'python-gobject: avahi-bookmarks, avahi-discover' 'python-gobject: avahi-bookmarks, avahi-discover'
'python-dbus: avahi-bookmarks, avahi-discover') 'python-twisted: avahi-bookmarks'
provides=(libavahi-client.so libavahi-common.so libavahi-core.so 'qt5-base: qt5 bindings'
libavahi-glib.so libavahi-gobject.so libavahi-libevent.so )
libavahi-qt5.so libavahi-ui-gtk3.so libdns_sd.so) provides=(
backup=(etc/avahi/{hosts,avahi-daemon.conf,avahi-{autoip,dnsconf}d.action} libavahi-{client,common,core,glib,gobject,libevent,qt5,ui-gtk3}.so
usr/lib/avahi/service-types.db) libdns_sd.so
)
backup=(
etc/avahi/{hosts,avahi-daemon.conf,avahi-{autoip,dnsconf}d.action}
usr/lib/avahi/service-types.db
)
_commit=fd482a74625b8db8547b8cfca3ee3d3c6c721423 # master _commit=fd482a74625b8db8547b8cfca3ee3d3c6c721423 # master
source=("git+https://github.com/lathiat/avahi#commit=$_commit" source=(
282.patch "git+https://github.com/lathiat/avahi#commit=$_commit"
0001-Fix-avahi-browse-Invalid-service-type.patch) 0001-avahi-discover-Don-t-decode-unicode-strings-only-byt.patch
sha512sums=('SKIP' 0002-Fix-avahi-browse-Invalid-service-type.patch
'26b1e74450944f5c4385d2f5df18523cfb953e4138f6d9e81061a626453e40d8ed2dee44535cfbb547848eefb3cdca408009d5f0e0c465f144a8803db8593b46' 0003-Do-not-disable-timeout-cleanup-on-watch-cleanup.patch
'e39c17d9a5d534784a3c7b6947da994d0ab5fa354aac5cecde6d3baaa2bb3d57f02f91cc6fb68885a4e98f44efe615b01631a4c7af752aa26f35082cfcc0ddd7') 0004-HACK-Install-fixes.patch
)
b2sums=('SKIP'
'a7d26bfbaa2bc488de81e9ec6d32ee64b1eaacd4e1cbecc6f896c263c2e37a036a5510d3f1c50ddcaec50251c4bd265aaf68ebe3c508016de9018aecaf2692e1'
'79a881a7f45b4d6061285257b07aa0f72aa69cedc636c74ec12dd031372b3560b4013f18d821e31b323fd73af5de811a1f5ba94ba0e32ce1b1bb940af3bad54f'
'04a100e1775e10c9dd23fb7e1c4f9f456ac9fd84abe649ca93758dfede262cfcf9dc114c40be08d53645de92bfd26071e8b1a1117e3f391ddad7c64aedc69de0'
'1b3fd8221b3a2d79a9425f5bd630ace0ac345ae7b7c0741957beb6755664aaff5c84d441a5c399d86945ec876eef7bbda4f5162d39e2b1701da2c4b4c233b8cc')
pkgver() { pkgver() {
cd $pkgname cd avahi
git describe --tags | sed 's/^v//;s/-/+/g' git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
} }
prepare() { prepare() {
cd $pkgname cd avahi
# https://bugs.archlinux.org/task/68518 # https://bugs.archlinux.org/task/68518
# https://github.com/lathiat/avahi/pull/282 # https://github.com/lathiat/avahi/pull/282
git apply -3 ../282.patch git apply -3 ../0001-avahi-discover-Don-t-decode-unicode-strings-only-byt.patch
# https://bugs.archlinux.org/task/71781 # https://bugs.archlinux.org/task/71781
# https://github.com/lathiat/avahi/issues/212 # https://github.com/lathiat/avahi/issues/212
git apply -3 ../0001-Fix-avahi-browse-Invalid-service-type.patch git apply -3 ../0002-Fix-avahi-browse-Invalid-service-type.patch
# https://bugs.archlinux.org/task/78644
# https://github.com/lathiat/avahi/pull/366
git apply -3 ../0003-Do-not-disable-timeout-cleanup-on-watch-cleanup.patch
# https://bugs.archlinux.org/task/47822
git apply -3 ../0004-HACK-Install-fixes.patch
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh
} }
build() { build() {
cd $pkgname local configure_options=(
--prefix=/usr
./configure \ --sysconfdir=/etc
--prefix=/usr \ --localstatedir=/var
--sysconfdir=/etc \ --sbindir=/usr/bin
--localstatedir=/var \ --disable-mono
--sbindir=/usr/bin \ --enable-compat-libdns_sd
with_dbus_sys=/usr/share/dbus-1/system.d \ --with-autoipd-group=avahi
--disable-mono \ --with-autoipd-user=avahi
--enable-compat-libdns_sd \ --with-avahi-priv-access-group=network
--with-distro=archlinux \ --with-distro=archlinux
--with-avahi-priv-access-group=network \
--with-autoipd-user=avahi \
--with-autoipd-group=avahi \
--with-systemdsystemunitdir=/usr/lib/systemd/system --with-systemdsystemunitdir=/usr/lib/systemd/system
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool with_dbus_sys=/usr/share/dbus-1/system.d
)
cd avahi
./configure "${configure_options[@]}"
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make make
} }
package() { package() {
depends+=(libdbus-1.so) depends+=(libdbus-1.so)
cd $pkgname cd avahi
make DESTDIR="$pkgdir" install make DESTDIR="$pkgdir" install
rmdir "$pkgdir/run"
# mdnsresponder compat
ln -s avahi-compat-libdns_sd/dns_sd.h "$pkgdir/usr/include/dns_sd.h"
# move example services https://bugs.archlinux.org/task/47822
install -d "$pkgdir/usr/share/doc/$pkgname"
mv "$pkgdir"/etc/avahi/services/{,sftp-}ssh.service \
"$pkgdir/usr/share/doc/$pkgname/"
echo 'u avahi - "Avahi mDNS/DNS-SD daemon"' | echo 'u avahi - "Avahi mDNS/DNS-SD daemon"' |
install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
} }
# vim:set sw=2 sts=-1 et: