summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO48
-rw-r--r--0001-Fix-avahi-browse-Invalid-service-type.patch27
-rw-r--r--282.patch42
-rw-r--r--PKGBUILD73
4 files changed, 146 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dbc2f0c679a2..0c31474b5a20 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,33 +1,65 @@
pkgbase = avahi-gtk2
pkgdesc = Multicast/unicast DNS-SD framework (with Gtk2 client apps)
- pkgver = 0.7+18+g1b5f401
- pkgrel = 2
+ pkgver = 0.8+22+gfd482a7
+ pkgrel = 1
url = https://github.com/lathiat/avahi
arch = x86_64
arch = i686
license = LGPL
makedepends = git
- makedepends = intltool
makedepends = gobject-introspection
makedepends = gtk2
+ makedepends = gtk3
+ makedepends = qt5-base
makedepends = xmltoman
+ makedepends = python-dbus
+ makedepends = python-gobject
+ makedepends = doxygen
+ makedepends = graphviz
+ makedepends = libevent
depends = expat
depends = libdaemon
depends = glib2
depends = libcap
depends = gdbm
depends = dbus
- optdepends = gtk2: avahi-discover-standalone, bshell, bssh, bvnc, gtk2 bindings
+ optdepends = gtk2: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc
+ optdepends = gtk3: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc
+ optdepends = qt5-base: qt5 bindings
+ optdepends = libevent: libevent bindings
optdepends = nss-mdns: NSS support for mDNS
- provides = avahi=0.7+18+g1b5f401
+ optdepends = python-twisted: avahi-bookmarks
+ optdepends = python-gobject: avahi-bookmarks, avahi-discover
+ optdepends = python-dbus: avahi-bookmarks, avahi-discover
+ provides = libavahi-client.so
+ provides = libavahi-common.so
+ provides = libavahi-core.so
+ provides = libavahi-glib.so
+ provides = libavahi-gobject.so
+ provides = libavahi-libevent.so
+ provides = libavahi-qt5.so
+ provides = libavahi-ui-gtk2.so
+ provides = libavahi-ui-gtk3.so
+ provides = libdns_sd.so
+ provides = avahi=0.8+22+gfd482a7
conflicts = avahi
- options = !emptydirs
backup = etc/avahi/hosts
backup = etc/avahi/avahi-daemon.conf
backup = etc/avahi/avahi-autoipd.action
backup = etc/avahi/avahi-dnsconfd.action
- source = git+https://github.com/lathiat/avahi#commit=1b5f401f64d7bed40c4335b0327acf4125da3086
+ backup = usr/lib/avahi/service-types.db
+ source = git+https://github.com/lathiat/avahi#commit=fd482a74625b8db8547b8cfca3ee3d3c6c721423
+ source = 282.patch
+ source = 0001-Fix-avahi-browse-Invalid-service-type.patch
sha512sums = SKIP
+ sha512sums = 26b1e74450944f5c4385d2f5df18523cfb953e4138f6d9e81061a626453e40d8ed2dee44535cfbb547848eefb3cdca408009d5f0e0c465f144a8803db8593b46
+ sha512sums = e39c17d9a5d534784a3c7b6947da994d0ab5fa354aac5cecde6d3baaa2bb3d57f02f91cc6fb68885a4e98f44efe615b01631a4c7af752aa26f35082cfcc0ddd7
pkgname = avahi-gtk2
-
+ depends = expat
+ depends = libdaemon
+ depends = glib2
+ depends = libcap
+ depends = gdbm
+ depends = dbus
+ depends = libdbus-1.so
diff --git a/0001-Fix-avahi-browse-Invalid-service-type.patch b/0001-Fix-avahi-browse-Invalid-service-type.patch
new file mode 100644
index 000000000000..8511f3b1aaff
--- /dev/null
+++ b/0001-Fix-avahi-browse-Invalid-service-type.patch
@@ -0,0 +1,27 @@
+From 6fe6c44d953edd50c32ff6ce8fec5ac811fa3b69 Mon Sep 17 00:00:00 2001
+From: Asger Hautop Drewsen <asger@princh.com>
+Date: Mon, 9 Aug 2021 14:25:08 +0200
+Subject: [PATCH] Fix avahi-browse: Invalid service type
+
+---
+ avahi-core/browse-service.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c
+index 5531360..2d3fa75 100644
+--- a/avahi-core/browse-service.c
++++ b/avahi-core/browse-service.c
+@@ -103,7 +103,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_prepare(
+ AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+ AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+ AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+- AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_is_valid_service_type_generic(service_type), AVAHI_ERR_INVALID_SERVICE_TYPE);
++
++ if (!avahi_is_valid_service_type_generic(service_type))
++ service_type = "_invalid._tcp";
+
+ if (!domain)
+ domain = server->domain_name;
+--
+2.32.0
+
diff --git a/282.patch b/282.patch
new file mode 100644
index 000000000000..9e38ad06cee7
--- /dev/null
+++ b/282.patch
@@ -0,0 +1,42 @@
+From bcafdcc5465091b6088532460b671f411703f90b Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 24 Apr 2020 11:25:41 +0100
+Subject: [PATCH] avahi-discover: Don't decode unicode strings, only
+ bytestrings
+
+Unicode strings (unicode in Python 2, str or unicode in Python 3) don't
+have a decode method; only bytestrings (str or bytes in Python 2,
+bytes in Python 3) have that. Decode exactly the strings that need
+decoding.
+
+Resolves: https://github.com/lathiat/avahi/issues/275
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ avahi-python/avahi-discover/avahi-discover.py | 8 +++++---
+ 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
+index 4a2b5756..fddf4a51 100755
+--- a/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,
+ txts+="<b>" + _("TXT") + " <i>%s</i></b> = %s\n" % (k,v)
+ else:
+ txts = "<b>" + _("TXT Data:") + "</b> <i>" + _("empty") + "</i>"
+-
+- txts = txts.decode("utf-8")
++
++ if isinstance(txts, bytes): # Python 2
++ txts = txts.decode("utf-8")
+
+ infos = "<b>" + _("Service Type:") + "</b> %s\n"
+ infos += "<b>" + _("Service Name:") + "</b> %s\n"
+ infos += "<b>" + _("Domain Name:") + "</b> %s\n"
+ infos += "<b>" + _("Interface:") + "</b> %s %s\n"
+ infos += "<b>" + _("Address:") + "</b> %s/%s:%i\n%s"
+- infos = infos.decode("utf-8")
++ if isinstance(infos, bytes): # Python 2
++ infos = infos.decode("utf-8")
+ infos = infos % (stype, name, domain, self.siocgifname(interface), self.protoname(protocol), host, address, port, txts.strip())
+ self.info_label.set_markup(infos)
+
diff --git a/PKGBUILD b/PKGBUILD
index 0d6923c35fc2..0f919b74c6e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,23 +5,37 @@
_pkgname=avahi
pkgname=avahi-gtk2
-pkgver=0.7+18+g1b5f401
-pkgrel=2
+pkgver=0.8+22+gfd482a7
+pkgrel=1
pkgdesc='Multicast/unicast DNS-SD framework (with Gtk2 client apps)'
url='https://github.com/lathiat/avahi'
license=(LGPL)
arch=(x86_64 i686)
-options=('!emptydirs')
depends=(expat libdaemon glib2 libcap gdbm dbus)
-makedepends=(git intltool gobject-introspection gtk2 xmltoman)
-provides=("${_pkgname}=${pkgver}")
+makedepends=(git gobject-introspection gtk2 gtk3 qt5-base xmltoman python-dbus
+ python-gobject doxygen graphviz libevent)
+optdepends=('gtk2: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc'
+ 'gtk3: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc'
+ 'qt5-base: qt5 bindings'
+ 'libevent: libevent bindings'
+ 'nss-mdns: NSS support for mDNS'
+ 'python-twisted: avahi-bookmarks'
+ 'python-gobject: avahi-bookmarks, avahi-discover'
+ 'python-dbus: avahi-bookmarks, avahi-discover')
+provides=(libavahi-client.so libavahi-common.so libavahi-core.so
+ libavahi-glib.so libavahi-gobject.so libavahi-libevent.so
+ libavahi-qt5.so libavahi-ui-gtk2.so libavahi-ui-gtk3.so libdns_sd.so
+ "${_pkgname}=${pkgver}")
conflicts=(${_pkgname})
-optdepends=('gtk2: avahi-discover-standalone, bshell, bssh, bvnc, gtk2 bindings'
- 'nss-mdns: NSS support for mDNS')
-backup=(etc/avahi/{hosts,avahi-daemon.conf,avahi-{autoip,dnsconf}d.action})
-_commit=1b5f401f64d7bed40c4335b0327acf4125da3086 # pull/115/merge~2
-source=("git+https://github.com/lathiat/avahi#commit=$_commit")
-sha512sums=('SKIP')
+backup=(etc/avahi/{hosts,avahi-daemon.conf,avahi-{autoip,dnsconf}d.action}
+ usr/lib/avahi/service-types.db)
+_commit=fd482a74625b8db8547b8cfca3ee3d3c6c721423 # master
+source=("git+https://github.com/lathiat/avahi#commit=$_commit"
+ 282.patch
+ 0001-Fix-avahi-browse-Invalid-service-type.patch)
+sha512sums=('SKIP'
+ '26b1e74450944f5c4385d2f5df18523cfb953e4138f6d9e81061a626453e40d8ed2dee44535cfbb547848eefb3cdca408009d5f0e0c465f144a8803db8593b46'
+ 'e39c17d9a5d534784a3c7b6947da994d0ab5fa354aac5cecde6d3baaa2bb3d57f02f91cc6fb68885a4e98f44efe615b01631a4c7af752aa26f35082cfcc0ddd7')
pkgver() {
cd $_pkgname
@@ -31,36 +45,29 @@ pkgver() {
prepare() {
cd $_pkgname
- # CVE-2017-6519 CVE-2018-100084
- git cherry-pick -n e111def44a7df4624a4aa3f85fe98054bffb6b4f
+ # https://bugs.archlinux.org/task/68518
+ # https://github.com/lathiat/avahi/pull/282
+ git apply -3 ../282.patch
+
+ # https://bugs.archlinux.org/task/71781
+ # https://github.com/lathiat/avahi/issues/212
+ git apply -3 ../0001-Fix-avahi-browse-Invalid-service-type.patch
NOCONFIGURE=1 ./autogen.sh
}
build() {
cd $_pkgname
- export MOC_QT4=/usr/bin/moc-qt4
- export PYTHON=/usr/bin/python3
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
- --with-dbus-sys=/usr/share/dbus-1/system.d \
- --disable-monodoc \
- --disable-qt4 \
- --disable-qt5 \
- --disable-gtk3 \
- --disable-python \
- --disable-pygobject \
- --disable-python-dbus \
+ with_dbus_sys=/usr/share/dbus-1/system.d \
+ --enable-gtk \
+ --enable-gtk3 \
--disable-mono \
- --disable-monodoc \
- --disable-doxygen-doc \
- --disable-doxygen-dot \
- --disable-doxygen-xml \
- --disable-doxygen-html \
--enable-compat-libdns_sd \
--with-distro=archlinux \
--with-avahi-priv-access-group=network \
@@ -69,23 +76,17 @@ build() {
--with-systemdsystemunitdir=/usr/lib/systemd/system
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
-# cp -a avahi-python/avahi avahi-python/avahi2
-
make
-# make -C avahi-python/avahi2 PYTHON=/usr/bin/python2
}
package() {
+ depends+=(libdbus-1.so)
+
cd $_pkgname
make DESTDIR="$pkgdir" install
-# make DESTDIR="$pkgdir" -C avahi-python/avahi2 install \
-# PYTHON=/usr/bin/python2 pythondir=/usr/lib/python2.7/site-packages
rmdir "$pkgdir/run"
-# # this isn't ported
-# sed -i '1s|python3|python2|' "$pkgdir/usr/bin/avahi-bookmarks"
-
# mdnsresponder compat
ln -s avahi-compat-libdns_sd/dns_sd.h "$pkgdir/usr/include/dns_sd.h"