diff --git a/CVE-2018-1000845.patch b/CVE-2018-1000845.patch deleted file mode 100644 index c1b1dfe..0000000 --- a/CVE-2018-1000845.patch +++ /dev/null @@ -1,45 +0,0 @@ -From e111def44a7df4624a4aa3f85fe98054bffb6b4f Mon Sep 17 00:00:00 2001 -From: Trent Lloyd -Date: Sat, 22 Dec 2018 09:06:07 +0800 -Subject: [PATCH] Drop legacy unicast queries from address not on local link - -When handling legacy unicast queries, ensure that the source IP is -inside a subnet on the local link, otherwise drop the packet. - -Fixes #145 -Fixes #203 -CVE-2017-6519 -CVE-2018-100084 ---- - avahi-core/server.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/avahi-core/server.c b/avahi-core/server.c -index a2cb19a..a2580e3 100644 ---- a/avahi-core/server.c -+++ b/avahi-core/server.c -@@ -930,6 +930,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres - - if (avahi_dns_packet_is_query(p)) { - int legacy_unicast = 0; -+ char t[AVAHI_ADDRESS_STR_MAX]; - - /* For queries EDNS0 might allow ARCOUNT != 0. We ignore the - * AR section completely here, so far. Until the day we add -@@ -947,6 +948,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres - legacy_unicast = 1; - } - -+ if (!is_mdns_mcast_address(dst_address) && -+ !avahi_interface_address_on_link(i, src_address)) { -+ -+ avahi_log_debug("Received non-local unicast query from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol); -+ return; -+ } -+ - if (legacy_unicast) - reflect_legacy_unicast_query_packet(s, p, i, src_address, port); - --- -2.18.0 - diff --git a/add-IT_PROG_INTLTOOL.patch b/add-IT_PROG_INTLTOOL.patch new file mode 100644 index 0000000..4102261 --- /dev/null +++ b/add-IT_PROG_INTLTOOL.patch @@ -0,0 +1,12 @@ +Index: avahi-0.8/configure.ac +=================================================================== +--- avahi-0.8.orig/configure.ac ++++ avahi-0.8/configure.ac +@@ -24,6 +24,7 @@ AC_CONFIG_SRCDIR([avahi-core/server.c]) + AC_CONFIG_MACRO_DIR([common]) + AC_CONFIG_HEADERS([config.h]) + AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax]) ++IT_PROG_INTLTOOL([0.50.1]) + + AC_SUBST(PACKAGE_URL, [http://avahi.org/]) + diff --git a/avahi-0.7-dbm.patch b/avahi-0.7-dbm.patch deleted file mode 100644 index 0a8f996..0000000 --- a/avahi-0.7-dbm.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 63750f1be96ad08c407193b08bf3b9ee74310e2d Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 11 Jul 2017 21:52:37 +0200 -Subject: [PATCH] avahi-python: Use the agnostic DBM interface - -Also fixes configure failing if Python 3 is the build python and GDBM is -enabled, since Py3 only has anydbm under the name of 'dbm'. - -Not enough to make ServiceTypeDatabase.py compatible with Py3, but it's -a start. ---- - avahi-python/avahi/Makefile.am | 15 +-------- - avahi-python/avahi/ServiceTypeDatabase.py.in | 33 ++++++++++++++----- - configure.ac | 9 +++-- - service-type-database/.gitignore | 1 - - service-type-database/Makefile.am | 18 +++------- - .../{build-db.in => build-db} | 13 +++++--- - 6 files changed, 42 insertions(+), 47 deletions(-) - rename service-type-database/{build-db.in => build-db} (87%) - -diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am -index 3eb67d0..c906b9b 100644 ---- a/avahi-python/avahi/Makefile.am -+++ b/avahi-python/avahi/Makefile.am -@@ -25,29 +25,16 @@ avahidir = $(pythondir)/avahi - - if HAVE_GDBM - nodist_avahi_SCRIPTS = ServiceTypeDatabase.py -- --ServiceTypeDatabase.py: ServiceTypeDatabase.py.in -- $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -- -e 's,@DBM\@,gdbm,g' \ -- -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \ -- -e 's,@CHECK_KEY\@,while key is not None:,g' \ -- -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \ -- -e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \ -- chmod +x $@ - endif - - if HAVE_DBM - nodist_avahi_SCRIPTS = ServiceTypeDatabase.py -+endif - - ServiceTypeDatabase.py: ServiceTypeDatabase.py.in - $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -- -e 's,@DBM\@,dbm,g' \ -- -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \ -- -e 's,@CHECK_KEY\@,for key in keys:,g' \ -- -e 's,@NEXT_KEY\@,,g' \ - -e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \ - chmod +x $@ --endif - - avahi_PYTHON = $(avahi_SCRIPTS) - -diff --git a/avahi-python/avahi/ServiceTypeDatabase.py.in b/avahi-python/avahi/ServiceTypeDatabase.py.in -index 4ddd654..d7f9969 100644 ---- a/avahi-python/avahi/ServiceTypeDatabase.py.in -+++ b/avahi-python/avahi/ServiceTypeDatabase.py.in -@@ -17,7 +17,11 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - # USA. - --import @DBM@ -+try: -+ import anydbm as dbm -+except ImportError: -+ import dbm -+ - import locale - import re - -@@ -28,7 +32,7 @@ class ServiceTypeDatabase: - - def __init__(self, filename = "@pkglibdatadir@/service-types.db"): - -- self.db = @DBM@.open(filename, "r") -+ self.db = dbm.open(filename, "r") - - l = locale.getlocale(locale.LC_MESSAGES) - -@@ -90,13 +94,24 @@ class ServiceTypeDatabase: - - def __iter__(self): - -- @FIRST_KEY@ -- @CHECK_KEY@ -- -- if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key) and not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key): -- yield key -- -- @NEXT_KEY@ -+ def want_key(key): -+ if not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key): -+ return False -+ if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key): -+ return False -+ return True -+ -+ try: -+ key = self.db.firstkey() -+ except AttributeError: -+ for key in self.db.keys(): -+ if want_key(key): -+ yield key -+ else: -+ while key is not None: -+ if want_key(key): -+ yield key -+ key = self.db.nextkey(key) - - def __len__(self): - -diff --git a/configure.ac b/configure.ac -index 6678971..fbbf7cf 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -824,11 +824,10 @@ if test "x$HAVE_PYTHON" = "xyes" ; then - fi - - AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)]) -- if test "x$HAVE_GDBM" = "xyes"; then -- AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)]) -- fi -- if test "x$HAVE_DBM" = "xyes"; then -- AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)]) -+ if test "x$HAVE_GDBM" = "xyes" || test "x$HAVE_DBM" = "xyes"; then -+ AM_CHECK_PYMOD(anydbm,,,[ -+ AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)]) -+ ]) - fi - fi - fi -diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am -index d184fde..f9fa082 100644 ---- a/service-type-database/Makefile.am -+++ b/service-type-database/Makefile.am -@@ -15,7 +15,7 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - # USA. - --EXTRA_DIST=build-db.in service-types -+EXTRA_DIST=service-types - - pkglibdatadir=$(libdir)/avahi - -@@ -27,16 +27,11 @@ if HAVE_GDBM - noinst_SCRIPTS=build-db - pkglibdata_DATA+=service-types.db - --build-db: build-db.in -- $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -- -e 's,@DBM\@,gdbm,g' $< > $@ && \ -- chmod +x $@ -- --service-types.db: service-types build-db -+service-types.db: service-types - $(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \ - mv $@.coming $@ - --CLEANFILES = service-types.db build-db -+CLEANFILES = service-types.db - - endif - if HAVE_DBM -@@ -44,11 +39,6 @@ if HAVE_DBM - noinst_SCRIPTS=build-db - pkglibdata_DATA+=service-types.db.pag service-types.db.dir - --build-db: build-db.in -- $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -- -e 's,@DBM\@,dbm,g' $< > $@ && \ -- chmod +x $@ -- - service-types.db.pag: service-types.db - $(AM_V_GEN)mv service-types.db.coming.pag service-types.db.pag - service-types.db.dir: service-types.db -@@ -57,7 +47,7 @@ service-types.db: service-types build-db - $(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \ - if test -f "$@.coming"; then mv $@.coming $@; fi - --CLEANFILES = service-types.db* build-db -+CLEANFILES = service-types.db* - - endif - endif -diff --git a/service-type-database/build-db.in b/service-type-database/build-db -similarity index 87% -rename from service-type-database/build-db.in -rename to service-type-database/build-db -index 4cda425..78ee892 100755 ---- a/service-type-database/build-db.in -+++ b/service-type-database/build-db -@@ -1,4 +1,4 @@ --#!@PYTHON@ -+#!/usr/bin/env python - # -*-python-*- - # This file is part of avahi. - # -@@ -17,7 +17,12 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - # USA. - --import @DBM@, sys -+try: -+ import anydbm as dbm -+except ImportError: -+ import dbm -+ -+import sys - - if len(sys.argv) > 1: - infn = sys.argv[1] -@@ -29,9 +34,9 @@ if len(sys.argv) > 2: - else: - outfn = infn + ".db" - --db = @DBM@.open(outfn, "n") -+db = dbm.open(outfn, "n") - --for ln in file(infn, "r"): -+for ln in open(infn, "r"): - ln = ln.strip(" \r\n\t") - - if ln == "" or ln.startswith("#"): --- -2.18.0 - diff --git a/avahi-0.7-encode-strings-as-utf8.patch b/avahi-0.7-encode-strings-as-utf8.patch deleted file mode 100644 index 92e5863..0000000 --- a/avahi-0.7-encode-strings-as-utf8.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 169e85dbc13dcaae8a699618883e512614f540b7 Mon Sep 17 00:00:00 2001 -From: Simon McVittie -Date: Fri, 27 Apr 2018 11:09:07 +0100 -Subject: [PATCH] avahi-python: Encode unicode strings as UTF-8 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Previously, we would effectively encode anything representable in -Latin-1 as Latin-1, and crash on anything not representable in Latin-1: - ->>> import avahi ->>> avahi.string_to_byte_array(u'©') -[dbus.Byte(169)] ->>> avahi.string_to_byte_array(u'\ufeff') -Traceback (most recent call last): - File "", line 1, in - File "/usr/lib/python2.7/dist-packages/avahi/__init__.py", line 94, in string_to_byte_array - r.append(dbus.Byte(ord(c))) -ValueError: Integer outside range 0-255 - -This is particularly important for Python 3, where the str type -is a Unicode string. - -The b'' syntax for bytestrings is supported since at least Python 2.7. - -These functions now accept either Unicode strings (Python 2 unicode, -Python 3 str), which are encoded in UTF-8, or bytestrings -(Python 2 str, Python 3 bytes) which are taken as-is. - -Signed-off-by: Simon McVittie ---- - avahi-python/avahi/__init__.py | 24 +++++++++++++++++++++--- - 1 file changed, 21 insertions(+), 3 deletions(-) - -diff --git a/avahi-python/avahi/__init__.py b/avahi-python/avahi/__init__.py -index 7b45029..02305b0 100644 ---- a/avahi-python/avahi/__init__.py -+++ b/avahi-python/avahi/__init__.py -@@ -17,6 +17,8 @@ - - # Some definitions matching those in avahi-common/defs.h - -+import sys -+ - import dbus - - SERVER_INVALID, SERVER_REGISTERING, SERVER_RUNNING, SERVER_COLLISION, SERVER_FAILURE = range(0, 5) -@@ -66,6 +68,9 @@ DBUS_INTERFACE_HOST_NAME_RESOLVER = DBUS_NAME + ".HostNameResolver" - DBUS_INTERFACE_SERVICE_RESOLVER = DBUS_NAME + ".ServiceResolver" - DBUS_INTERFACE_RECORD_BROWSER = DBUS_NAME + ".RecordBrowser" - -+if sys.version_info[0] >= 3: -+ unicode = str -+ - def byte_array_to_string(s): - r = "" - -@@ -86,12 +91,19 @@ def txt_array_to_string_array(t): - - return l - -- - def string_to_byte_array(s): -+ if isinstance(s, unicode): -+ s = s.encode('utf-8') -+ - r = [] - - for c in s: -- r.append(dbus.Byte(ord(c))) -+ if isinstance(c, int): -+ # Python 3: iterating over bytes yields ints -+ r.append(dbus.Byte(c)) -+ else: -+ # Python 2: iterating over str yields str -+ r.append(dbus.Byte(ord(c))) - - return r - -@@ -107,6 +119,12 @@ def dict_to_txt_array(txt_dict): - l = [] - - for k,v in txt_dict.items(): -- l.append(string_to_byte_array("%s=%s" % (k,v))) -+ if isinstance(k, unicode): -+ k = k.encode('utf-8') -+ -+ if isinstance(v, unicode): -+ v = v.encode('utf-8') -+ -+ l.append(string_to_byte_array(b"%s=%s" % (k,v))) - - return l --- -2.18.0 - diff --git a/avahi-0.7-python3-bookmarks.patch b/avahi-0.7-python3-bookmarks.patch deleted file mode 100644 index 694637e..0000000 --- a/avahi-0.7-python3-bookmarks.patch +++ /dev/null @@ -1,125 +0,0 @@ -From e6325a8e9f359de3ffed159757886b2535cc49a9 Mon Sep 17 00:00:00 2001 -From: Thomas Jollans -Date: Thu, 4 Oct 2018 01:25:31 +0200 -Subject: [PATCH] Make avahi-bookmarks Python3 compatible - -Should work with Python 2, but this has not been tested. Not that -anybody uses python 2 anymore anyway. ---- - avahi-python/avahi-bookmarks.in | 48 +++++++++++++++++---------------- - 1 file changed, 25 insertions(+), 23 deletions(-) - -diff --git a/avahi-python/avahi-bookmarks.in b/avahi-python/avahi-bookmarks.in -index dea7bef..7a562e3 100755 ---- a/avahi-python/avahi-bookmarks.in -+++ b/avahi-python/avahi-bookmarks.in -@@ -20,9 +20,10 @@ - import sys, getopt, os - - try: -- import avahi, gobject, dbus -+ from gi.repository import GObject -+ import avahi, dbus - except ImportError: -- print "Sorry, to use this tool you need to install Avahi and python-dbus." -+ print("Sorry, to use this tool you need to install Avahi and python-dbus.") - sys.exit(1) - - try: -@@ -95,7 +96,7 @@ class AvahiBookmarks: - else: - t += '
    ' - -- for k, v in self.services.iteritems(): -+ for k, v in self.services.items(): - - if v[3] == 80: - port = '' -@@ -109,7 +110,7 @@ class AvahiBookmarks: - - t += '

    Served by %s

    ' % self.version_string - -- return str(t) -+ return str(t).encode('utf-8') - - - def new_service(self, interface, protocol, name, type, domain, flags): -@@ -138,16 +139,16 @@ class AvahiBookmarks: - - def usage(retval = 0): - -- print "%s [options]\n" % sys.argv[0] -- print " -h --help Show this help" -- print " -c --cgi Run as a CGI instead of as a server (default to server" -- print " unless environment variable GATEWAY_INTERFACE is set)" -- print " -t --timeout MS Specify the max time for CGI browsing (default %u)" % timeout -- print " -p --port PORT Specify the port to use (default %u)" % port -- print " -a --address ADDRESS Specify the address to bind to (default %s)" % address -- print " -H --host-names Show links with real hostnames" -- print " -A --addresses Show links with numeric IP addresses" -- print " -d --domain DOMAIN Specify the domain to browse" -+ print("%s [options]\n" % sys.argv[0]) -+ print(" -h --help Show this help") -+ print(" -c --cgi Run as a CGI instead of as a server (default to server") -+ print(" unless environment variable GATEWAY_INTERFACE is set)") -+ print(" -t --timeout MS Specify the max time for CGI browsing (default %u)" % timeout) -+ print(" -p --port PORT Specify the port to use (default %u)" % port) -+ print(" -a --address ADDRESS Specify the address to bind to (default %s)" % address) -+ print(" -H --host-names Show links with real hostnames") -+ print(" -A --addresses Show links with numeric IP addresses") -+ print(" -d --domain DOMAIN Specify the domain to browse" ) - sys.exit(retval) - - try: -@@ -181,30 +182,31 @@ for o, a in opts: - domain = a - - if use_CGI is None: -- use_CGI = os.environ.has_key("GATEWAY_INTERFACE") -+ use_CGI = "GATEWAY_INTERFACE" in os.environ - - if use_CGI: - cgi = AvahiBookmarks(use_host_names) - -- mainloop = gobject.MainLoop() -- gobject.timeout_add(timeout, mainloop.quit) -+ mainloop = GObject.MainLoop() -+ GObject.timeout_add(timeout, mainloop.quit) - - try: - mainloop.run() - except KeyboardInterrupt: - pass - -- print 'Content-type: text/html\n\n' + cgi.render_html() -+ print('Content-type: text/html\n\n' + cgi.render_html()) - - else: - try: -- from twisted.internet import glib2reactor -- glib2reactor.install() -+ from twisted.internet import gireactor -+ gireactor.install() - from twisted.internet import reactor - from twisted.web import server, resource - except ImportError: -- print "Sorry, to use this tool as a server you need to install twisted and twisted.web.\n" -- sys.exit(1) -+ raise -+ print("Sorry, to use this tool as a server you need to install twisted and twisted.web.\n") -+ sys.exit(1) - - class AvahiBookmarksServer(AvahiBookmarks, resource.Resource): - isLeaf = True -@@ -219,7 +221,7 @@ else: - site = server.Site(AvahiBookmarksServer(use_host_names)) - reactor.listenTCP(port, site, interface=address) - -- print "Now point your web browser to http://%s:%u/!" % (address, port) -+ print("Now point your web browser to http://%s:%u/!" % (address, port)) - - try: - reactor.run() --- -2.18.0 - diff --git a/avahi-0.7.tar.gz b/avahi-0.7.tar.gz deleted file mode 100644 index 9eaa07c..0000000 --- a/avahi-0.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804 -size 1333400 diff --git a/avahi-0.8.tar.gz b/avahi-0.8.tar.gz new file mode 100644 index 0000000..e0b3ff7 --- /dev/null +++ b/avahi-0.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda +size 1591458 diff --git a/avahi-desktop.patch b/avahi-desktop.patch index 6ad21b4..a2c2eb8 100644 --- a/avahi-desktop.patch +++ b/avahi-desktop.patch @@ -2,35 +2,32 @@ Index: avahi-0.6.31/avahi-ui/bssh.desktop.in.in =================================================================== --- avahi-0.6.31.orig/avahi-ui/bssh.desktop.in.in +++ avahi-0.6.31/avahi-ui/bssh.desktop.in.in -@@ -6,6 +6,6 @@ Exec=@bindir@/bssh +@@ -6,5 +6,5 @@ Exec=@bindir@/bssh Terminal=false Type=Application Icon=network-wired -Categories=GNOME;Network; +Categories=GTK;Network;RemoteAccess; StartupNotify=false - GenericName= Index: avahi-0.6.31/avahi-ui/bvnc.desktop.in.in =================================================================== --- avahi-0.6.31.orig/avahi-ui/bvnc.desktop.in.in +++ avahi-0.6.31/avahi-ui/bvnc.desktop.in.in -@@ -6,6 +6,6 @@ Exec=@bindir@/bvnc +@@ -6,5 +6,5 @@ Exec=@bindir@/bvnc Terminal=false Type=Application Icon=network-wired -Categories=GNOME;Network; +Categories=GTK;Network;RemoteAccess; StartupNotify=false - GenericName= Index: avahi-0.6.31/avahi-python/avahi-discover/avahi-discover.desktop.in.in =================================================================== --- avahi-0.6.31.orig/avahi-python/avahi-discover/avahi-discover.desktop.in.in +++ avahi-0.6.31/avahi-python/avahi-discover/avahi-discover.desktop.in.in -@@ -6,6 +6,6 @@ Exec=@bindir@/avahi-discover +@@ -6,5 +6,5 @@ Exec=@bindir@/avahi-discover Terminal=false Type=Application Icon=network-wired -Categories=GNOME;System; +Categories=GTK;Network;Monitor; StartupNotify=false - GenericName= diff --git a/avahi-glib2.changes b/avahi-glib2.changes index 58c8337..235459c 100644 --- a/avahi-glib2.changes +++ b/avahi-glib2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 31 10:21:27 UTC 2020 - Antonio Larrosa + +- Update to version 0.8 + ------------------------------------------------------------------- Thu Aug 6 07:59:00 UTC 2020 - Jan Engelhardt diff --git a/avahi-glib2.spec b/avahi-glib2.spec index 491ce3e..0fe1d59 100644 --- a/avahi-glib2.spec +++ b/avahi-glib2.spec @@ -25,18 +25,22 @@ # NOTE: build_glib2 also controls build of gobject, gtk2, gtk3 and pygobject code. %define build_glib2 1 %define build_mono 0 +%define build_qt5 0 %define avahi_client_sover 3 %define avahi_common_sover 3 %define avahi_core_sover 7 +%define avahi_libevent_sover 1 +%define avahi_libhowl_sover 0 %define avahi_ui_sover 0 %define avahi_glib_sover 1 %define avahi_gobject_sover 0 %define avahi_gtk3_sover 0 +%define avahi_qt5_sover 1 %if %{build_glib2} %define debug_package_requires libavahi-ui%{avahi_ui_sover} = %{version}-%{release} %endif Name: avahi-glib2 -Version: 0.7 +Version: 0.8 Release: 0 Summary: D-Bus Service for Zeroconf and Bonjour License: LGPL-2.1-or-later @@ -55,6 +59,8 @@ Source8: %{_name}_spec-prepare.sh Source9: avahi-autoipd.README.SUSE Source10: avahi-autoipd.if-up Source11: avahi-autoipd.if-down +# File missing from 0.8 tarball +Source12: https://raw.githubusercontent.com/lathiat/avahi/master/service-type-database/build-db Source100: attributes Source101: update_spec.pl Source102: baselibs.conf @@ -66,14 +72,8 @@ Patch1: avahi-desktop.patch Patch4: avahi-daemon-check-dns-suse.patch # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch - # PATCH-FIX-UPSTREAM avahi-0.7-dbm.patch bsc#1076402 mgorse@suse.com -- use the agnostic dbm interface, needed for python 3. -Patch20: avahi-0.7-dbm.patch -# PATCH-FIX-UPSTREAM avahi-0.7-encode-strings-as-utf8.patch boo#1110668 mgorse@suse.com -- encode strings as UTF-8. -Patch21: avahi-0.7-encode-strings-as-utf8.patch -# PATCh-FIX-UPSTREAM avahi-0.7-python3-bookmarks.patch boo#1110668 mgorse@suse.com -- make bookmarks python 3 compatible. -Patch22: avahi-0.7-python3-bookmarks.patch -# PATCH-FIX-UPSTREAM CVE-2018-1000845.patch boo#1110281 mgorse@suse.com -- drop legacy unicast queries from address not on local link (CVE-2018-1000845). -Patch23: CVE-2018-1000845.patch +# PATCH-FIX-UPSTREAM add-IT_PROG_INTLTOOL.patch alarrosa@suse.com -- add IT_PROG_INTLTOOL so intltool works +Patch20: add-IT_PROG_INTLTOOL.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gdbm-devel @@ -89,7 +89,7 @@ BuildRequires: python3-dbus-python BuildRequires: python3-devel BuildRequires: translation-update-upstream # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10). -%if !%{build_glib2} && !%{build_mono} +%if !%{build_glib2} && !%{build_mono} && !%{build_qt5} # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) %endif @@ -100,6 +100,7 @@ BuildRequires: strip-nondeterminism BuildRequires: dbus-1-devel BuildRequires: doxygen BuildRequires: graphviz +BuildRequires: libevent-devel >= 2.1.5 BuildRequires: python3-dbm BuildRequires: zlib-devel BuildRequires: pkgconfig(systemd) @@ -119,20 +120,26 @@ Obsoletes: mDNSResponder < 107.5 %if %{build_glib2} BuildRequires: gobject-introspection-devel BuildRequires: gtk3-devel -BuildRequires: libavahi-devel +BuildRequires: libavahi-devel = %{version} BuildRequires: update-desktop-files BuildRequires: pkgconfig(pygobject-3.0) %endif %if %{build_mono} BuildRequires: gtk-sharp2 -BuildRequires: libavahi-glib-devel +BuildRequires: libavahi-glib-devel = %{version} BuildRequires: mono-devel BuildRequires: monodoc-core # Please copy this line to avahi-mono definition below for build all-in-once: Requires: gtk-sharp2 -Requires: libavahi-client3 >= %{version} -Requires: libavahi-common3 >= %{version} -Requires: libavahi-glib1 >= %{version} +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} +%endif +%if %{build_qt5} +BuildRequires: dbus-1-devel +BuildRequires: libavahi-devel = %{version} +BuildRequires: pkgconfig(Qt5Core) +Requires: libavahi-client%{avahi_client_sover} >= %{version} %endif %description @@ -148,27 +155,35 @@ It passes all tests in the Apple Bonjour conformance test suite. In addition, it supports some nifty things, like correct mDNS reflection across LAN segments. -%package -n libavahi-client3 +%package -n libavahi-client%{avahi_client_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-client3 +%description -n libavahi-client%{avahi_client_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-common3 +%package -n libavahi-common%{avahi_common_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-common3 +%description -n libavahi-common%{avahi_common_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-core7 +%package -n libavahi-core%{avahi_core_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-core7 +%description -n libavahi-core%{avahi_core_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-libevent%{avahi_libevent_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-libevent%{avahi_libevent_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. @@ -196,14 +211,14 @@ Apple mDNSResponder compatibility layer for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libhowl0 +%package -n libhowl%{avahi_libhowl_sover} Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service # Old name used for <= 10.3: Group: System/Libraries Provides: avahi-compat-howl = %{version} Obsoletes: avahi-compat-howl < %{version} -%description -n libhowl0 +%description -n libhowl%{avahi_libhowl_sover} Howl compatibility layer for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS @@ -260,9 +275,9 @@ Group: Development/Libraries/C and C++ Requires: %{_name} = %{version} Requires: dbus-1-devel Requires: glibc-devel -Requires: libavahi-client3 = %{version} -Requires: libavahi-common3 = %{version} -Requires: libavahi-core7 = %{version} +Requires: libavahi-client%{avahi_client_sover} = %{version} +Requires: libavahi-common%{avahi_common_sover} = %{version} +Requires: libavahi-core%{avahi_core_sover} = %{version} # Last appeared in OpenSUSE 10.3: Provides: avahi-devel = %{version} Obsoletes: avahi-devel < %{version} @@ -289,7 +304,7 @@ specifications for Zeroconf Computing. Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service Group: Development/Libraries/C and C++ Requires: libavahi-devel = %{version} -Requires: libhowl0 = %{version} +Requires: libhowl%{avahi_libhowl_sover} = %{version} %description compat-howl-devel Howl compatibility layer for Avahi. @@ -305,24 +320,24 @@ Group: System/Libraries Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-glib1 +%package -n libavahi-glib%{avahi_glib_sover} Summary: Glib Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour # Old name used for <= 10.3: Group: System/Libraries Provides: avahi-glib = %{version} Obsoletes: avahi-glib < %{version} -%description -n libavahi-glib1 +%description -n libavahi-glib%{avahi_glib_sover} GLib support for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-gobject0 +%package -n libavahi-gobject%{avahi_gobject_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-gobject0 +%description -n libavahi-gobject%{avahi_gobject_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. @@ -373,7 +388,7 @@ DNS specifications for Zeroconf Computing. Summary: Header files for Avahi's Glib bindings Group: Development/Libraries/C and C++ Requires: libavahi-devel = %{version} -Requires: libavahi-glib1 = %{version} +Requires: libavahi-glib%{avahi_glib_sover} = %{version} Requires: libavahi-ui-gtk3-%{avahi_gtk3_sover} = %{version} Requires: typelib-1_0-Avahi-0_6 = %{version} # Last appeared in OpenSUSE 10.3: @@ -391,7 +406,7 @@ Group: System/Daemons Requires: glib2-devel Requires: libavahi-devel = %{version} Requires: libavahi-glib-devel -Requires: libavahi-gobject0 = %{version} +Requires: libavahi-gobject%{avahi_gobject_sover} = %{version} %description -n libavahi-gobject-devel Avahi is an implementation of the DNS Service Discovery and Multicast @@ -403,9 +418,9 @@ DNS specifications for Zeroconf Computing. Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Group: Development/Languages/Mono Requires: gtk-sharp2 -Requires: libavahi-client3 >= %{version} -Requires: libavahi-common3 >= %{version} -Requires: libavahi-glib1 >= %{version} +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} %description -n avahi-mono This package provides Mono bindings for avahi. Avahi is an @@ -423,6 +438,30 @@ things, like correct mDNS reflection across LAN segments. %lang_package %endif +%if %{build_qt5} +%package -n libavahi-qt5-%{avahi_qt5_sover} +Summary: Qt5 Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-qt5-%{avahi_qt5_sover} +Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-qt5-devel +Summary: Header files for Avahi's Qt5 bindings +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libavahi-qt5-%{avahi_qt5_sover} = %{version} + +%description -n libavahi-qt5-devel +Development files for the Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. +%endif + %prep %setup -q -n %{_name}-%{version} cp -a %{SOURCE1} %{SOURCE7} . @@ -431,15 +470,14 @@ sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd cp -a %{SOURCE9} avahi-autoipd/README.SUSE sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down +sed -ie "s/libevent-[0-9\.]*/libevent/" avahi-libevent.pc.in +cp -a %{SOURCE12} service-type-database/build-db translation-update-upstream %patch0 %patch1 -p1 %patch4 %patch19 -p1 %patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 %if !%{build_core} # Replace all .la references from local .la files to installed versions @@ -472,9 +510,11 @@ export PYTHON=%{_bindir}/python3 %if %{build_core} --enable-compat-libdns_sd\ --enable-compat-howl\ + --enable-libevent\ %else --disable-compat-libdns_sd\ --disable-compat-howl\ + --disable-libevent\ %endif %if %{build_glib2} --enable-glib\ @@ -498,6 +538,11 @@ export PYTHON=%{_bindir}/python3 --disable-gtk\ %else --disable-mono\ +%endif +%if %{build_qt5} + --enable-qt5\ +%else + --disable-qt5\ %endif --with-avahi-priv-access-group=avahi\ --with-autoipd-user=avahi-autoipd\ @@ -530,6 +575,9 @@ cd avahi-sharp %make_install cd ../avahi-ui-sharp %endif +%if %{build_qt5} && !%{build_core} +cd avahi-qt +%endif %make_install # do not install sysv init scripts rm -rf %{buildroot}%{_sysconfdir}/init.d/ @@ -652,22 +700,28 @@ getent passwd avahi-autoipd >/dev/null || \ # Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11. find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:avahi-autoipd {} + -%post -n libavahi-client3 -p /sbin/ldconfig -%postun -n libavahi-client3 -p /sbin/ldconfig -%post -n libavahi-common3 -p /sbin/ldconfig -%postun -n libavahi-common3 -p /sbin/ldconfig -%post -n libavahi-core7 -p /sbin/ldconfig -%postun -n libavahi-core7 -p /sbin/ldconfig +%post -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%postun -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%post -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%postun -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%post -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%postun -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%post -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig +%postun -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig -%post -n libhowl0 -p /sbin/ldconfig -%postun -n libhowl0 -p /sbin/ldconfig +%post -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig +%postun -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig -%post -n libavahi-gobject0 -p /sbin/ldconfig -%postun -n libavahi-gobject0 -p /sbin/ldconfig -%post -n libavahi-glib1 -p /sbin/ldconfig -%postun -n libavahi-glib1 -p /sbin/ldconfig +%post -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%postun -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%post -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%postun -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%if %{build_qt5} +%post -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%postun -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%endif %post -n python3-avahi-gtk %desktop_database_post @@ -720,21 +774,24 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files lang -f %{name}.lang -%files -n libavahi-client3 +%files -n libavahi-client%{avahi_client_sover} %{_libdir}/libavahi-client*.so.* -%files -n libavahi-common3 +%files -n libavahi-common%{avahi_common_sover} %{_libdir}/libavahi-common*.so.* -%files -n libavahi-core7 +%files -n libavahi-core%{avahi_core_sover} %{_libdir}/libavahi-core*.so.* +%files -n libavahi-libevent%{avahi_libevent_sover} +%{_libdir}/libavahi-libevent*.so.* + %files -n libdns_sd # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: %{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so.* -%files -n libhowl0 +%files -n libhowl%{avahi_libhowl_sover} %{_libdir}/libhowl.so.* %files -n python3-avahi @@ -774,6 +831,7 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %{_includedir}/avahi-client %{_includedir}/avahi-common %{_includedir}/avahi-core +%{_includedir}/avahi-libevent # avahi devel files %{_libdir}/libavahi-client.*a %{_libdir}/libavahi-client*.so @@ -783,8 +841,11 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a # do not remove unless you fix the resulting problems # reference is in libavahi-client.la %{_libdir}/libavahi-common*.*a +%{_libdir}/libavahi-libevent.*a +%{_libdir}/libavahi-libevent*.so %{_libdir}/pkgconfig/avahi-client.pc %{_libdir}/pkgconfig/avahi-core.pc +%{_libdir}/pkgconfig/avahi-libevent.pc %files compat-mDNSResponder-devel %{_includedir}/avahi-compat-libdns_sd @@ -804,10 +865,10 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files -n libavahi-ui-gtk3-%{avahi_gtk3_sover} %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_sover}* -%files -n libavahi-glib1 +%files -n libavahi-glib%{avahi_glib_sover} %{_libdir}/libavahi-glib*.so.* -%files -n libavahi-gobject0 +%files -n libavahi-gobject%{avahi_gobject_sover} %{_libdir}/libavahi-gobject*.so.* %files -n typelib-1_0-Avahi-0_6 @@ -817,7 +878,6 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files -n python3-avahi-gtk %{_bindir}/avahi-discover %{_datadir}/applications/avahi-discover.desktop -%{python3_sitelib}/avahi_discover %files -n avahi-utils-gtk %{_bindir}/bshell @@ -859,4 +919,15 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %{_prefix}/lib/mono/gac/avahi-sharp %endif +%if %{build_qt5} +%files -n libavahi-qt5-%{avahi_qt5_sover} +%{_libdir}/libavahi-qt5.so.* + +%files -n libavahi-qt5-devel +%{_includedir}/avahi-qt5 +%{_libdir}/libavahi-qt5.*a +%{_libdir}/libavahi-qt5.so +%{_libdir}/pkgconfig/avahi-qt5.pc +%endif + %changelog diff --git a/avahi-mono.changes b/avahi-mono.changes index 66c60bd..2441129 100644 --- a/avahi-mono.changes +++ b/avahi-mono.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 31 10:21:27 UTC 2020 - Antonio Larrosa + +- Update to version 0.8 + ------------------------------------------------------------------- Thu Aug 6 07:59:00 UTC 2020 - Jan Engelhardt diff --git a/avahi-mono.spec b/avahi-mono.spec index f147d10..2eb119d 100644 --- a/avahi-mono.spec +++ b/avahi-mono.spec @@ -25,18 +25,22 @@ # NOTE: build_glib2 also controls build of gobject, gtk2, gtk3 and pygobject code. %define build_glib2 0 %define build_mono 1 +%define build_qt5 0 %define avahi_client_sover 3 %define avahi_common_sover 3 %define avahi_core_sover 7 +%define avahi_libevent_sover 1 +%define avahi_libhowl_sover 0 %define avahi_ui_sover 0 %define avahi_glib_sover 1 %define avahi_gobject_sover 0 %define avahi_gtk3_sover 0 +%define avahi_qt5_sover 1 %if %{build_glib2} %define debug_package_requires libavahi-ui%{avahi_ui_sover} = %{version}-%{release} %endif Name: avahi-mono -Version: 0.7 +Version: 0.8 Release: 0 Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour License: LGPL-2.1-or-later @@ -55,6 +59,8 @@ Source8: %{_name}_spec-prepare.sh Source9: avahi-autoipd.README.SUSE Source10: avahi-autoipd.if-up Source11: avahi-autoipd.if-down +# File missing from 0.8 tarball +Source12: https://raw.githubusercontent.com/lathiat/avahi/master/service-type-database/build-db Source100: attributes Source101: update_spec.pl Source102: baselibs.conf @@ -66,14 +72,8 @@ Patch1: avahi-desktop.patch Patch4: avahi-daemon-check-dns-suse.patch # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch - # PATCH-FIX-UPSTREAM avahi-0.7-dbm.patch bsc#1076402 mgorse@suse.com -- use the agnostic dbm interface, needed for python 3. -Patch20: avahi-0.7-dbm.patch -# PATCH-FIX-UPSTREAM avahi-0.7-encode-strings-as-utf8.patch boo#1110668 mgorse@suse.com -- encode strings as UTF-8. -Patch21: avahi-0.7-encode-strings-as-utf8.patch -# PATCh-FIX-UPSTREAM avahi-0.7-python3-bookmarks.patch boo#1110668 mgorse@suse.com -- make bookmarks python 3 compatible. -Patch22: avahi-0.7-python3-bookmarks.patch -# PATCH-FIX-UPSTREAM CVE-2018-1000845.patch boo#1110281 mgorse@suse.com -- drop legacy unicast queries from address not on local link (CVE-2018-1000845). -Patch23: CVE-2018-1000845.patch +# PATCH-FIX-UPSTREAM add-IT_PROG_INTLTOOL.patch alarrosa@suse.com -- add IT_PROG_INTLTOOL so intltool works +Patch20: add-IT_PROG_INTLTOOL.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gdbm-devel @@ -89,7 +89,7 @@ BuildRequires: python3-dbus-python BuildRequires: python3-devel BuildRequires: translation-update-upstream # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10). -%if !%{build_glib2} && !%{build_mono} +%if !%{build_glib2} && !%{build_mono} && !%{build_qt5} # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) %endif @@ -100,6 +100,7 @@ BuildRequires: strip-nondeterminism BuildRequires: dbus-1-devel BuildRequires: doxygen BuildRequires: graphviz +BuildRequires: libevent-devel >= 2.1.5 BuildRequires: python3-dbm BuildRequires: zlib-devel BuildRequires: pkgconfig(systemd) @@ -119,20 +120,26 @@ Obsoletes: mDNSResponder < 107.5 %if %{build_glib2} BuildRequires: gobject-introspection-devel BuildRequires: gtk3-devel -BuildRequires: libavahi-devel +BuildRequires: libavahi-devel = %{version} BuildRequires: update-desktop-files BuildRequires: pkgconfig(pygobject-3.0) %endif %if %{build_mono} BuildRequires: gtk-sharp2 -BuildRequires: libavahi-glib-devel +BuildRequires: libavahi-glib-devel = %{version} BuildRequires: mono-devel BuildRequires: monodoc-core # Please copy this line to avahi-mono definition below for build all-in-once: Requires: gtk-sharp2 -Requires: libavahi-client3 >= %{version} -Requires: libavahi-common3 >= %{version} -Requires: libavahi-glib1 >= %{version} +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} +%endif +%if %{build_qt5} +BuildRequires: dbus-1-devel +BuildRequires: libavahi-devel = %{version} +BuildRequires: pkgconfig(Qt5Core) +Requires: libavahi-client%{avahi_client_sover} >= %{version} %endif %description @@ -147,27 +154,35 @@ SHOULDs of the mDNS and DNS-SD RFCs. It passes all tests in the Apple Bonjour conformance test suite. In addition, it supports some nifty things, like correct mDNS reflection across LAN segments. -%package -n libavahi-client3 +%package -n libavahi-client%{avahi_client_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-client3 +%description -n libavahi-client%{avahi_client_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-common3 +%package -n libavahi-common%{avahi_common_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-common3 +%description -n libavahi-common%{avahi_common_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-core7 +%package -n libavahi-core%{avahi_core_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-core7 +%description -n libavahi-core%{avahi_core_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-libevent%{avahi_libevent_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-libevent%{avahi_libevent_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. @@ -195,14 +210,14 @@ Apple mDNSResponder compatibility layer for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libhowl0 +%package -n libhowl%{avahi_libhowl_sover} Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service # Old name used for <= 10.3: Group: System/Libraries Provides: avahi-compat-howl = %{version} Obsoletes: avahi-compat-howl < %{version} -%description -n libhowl0 +%description -n libhowl%{avahi_libhowl_sover} Howl compatibility layer for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS @@ -259,9 +274,9 @@ Group: Development/Libraries/C and C++ Requires: %{_name} = %{version} Requires: dbus-1-devel Requires: glibc-devel -Requires: libavahi-client3 = %{version} -Requires: libavahi-common3 = %{version} -Requires: libavahi-core7 = %{version} +Requires: libavahi-client%{avahi_client_sover} = %{version} +Requires: libavahi-common%{avahi_common_sover} = %{version} +Requires: libavahi-core%{avahi_core_sover} = %{version} # Last appeared in OpenSUSE 10.3: Provides: avahi-devel = %{version} Obsoletes: avahi-devel < %{version} @@ -288,7 +303,7 @@ specifications for Zeroconf Computing. Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service Group: Development/Libraries/C and C++ Requires: libavahi-devel = %{version} -Requires: libhowl0 = %{version} +Requires: libhowl%{avahi_libhowl_sover} = %{version} %description compat-howl-devel Howl compatibility layer for Avahi. @@ -304,24 +319,24 @@ Group: System/Libraries Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-glib1 +%package -n libavahi-glib%{avahi_glib_sover} Summary: Glib Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour # Old name used for <= 10.3: Group: System/Libraries Provides: avahi-glib = %{version} Obsoletes: avahi-glib < %{version} -%description -n libavahi-glib1 +%description -n libavahi-glib%{avahi_glib_sover} GLib support for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-gobject0 +%package -n libavahi-gobject%{avahi_gobject_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-gobject0 +%description -n libavahi-gobject%{avahi_gobject_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. @@ -372,7 +387,7 @@ DNS specifications for Zeroconf Computing. Summary: Header files for Avahi's Glib bindings Group: Development/Libraries/C and C++ Requires: libavahi-devel = %{version} -Requires: libavahi-glib1 = %{version} +Requires: libavahi-glib%{avahi_glib_sover} = %{version} Requires: libavahi-ui-gtk3-%{avahi_gtk3_sover} = %{version} Requires: typelib-1_0-Avahi-0_6 = %{version} # Last appeared in OpenSUSE 10.3: @@ -390,7 +405,7 @@ Group: System/Daemons Requires: glib2-devel Requires: libavahi-devel = %{version} Requires: libavahi-glib-devel -Requires: libavahi-gobject0 = %{version} +Requires: libavahi-gobject%{avahi_gobject_sover} = %{version} %description -n libavahi-gobject-devel Avahi is an implementation of the DNS Service Discovery and Multicast @@ -403,9 +418,9 @@ Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonj License: LGPL-2.1-or-later Group: Development/Languages/Mono Requires: gtk-sharp2 -Requires: libavahi-client3 >= %{version} -Requires: libavahi-common3 >= %{version} -Requires: libavahi-glib1 >= %{version} +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} %description -n avahi-mono This package provides Mono bindings for avahi. Avahi is an @@ -423,6 +438,30 @@ things, like correct mDNS reflection across LAN segments. %lang_package %endif +%if %{build_qt5} +%package -n libavahi-qt5-%{avahi_qt5_sover} +Summary: Qt5 Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-qt5-%{avahi_qt5_sover} +Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-qt5-devel +Summary: Header files for Avahi's Qt5 bindings +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libavahi-qt5-%{avahi_qt5_sover} = %{version} + +%description -n libavahi-qt5-devel +Development files for the Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. +%endif + %prep %setup -q -n %{_name}-%{version} cp -a %{SOURCE1} %{SOURCE7} . @@ -431,15 +470,14 @@ sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd cp -a %{SOURCE9} avahi-autoipd/README.SUSE sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down +sed -ie "s/libevent-[0-9\.]*/libevent/" avahi-libevent.pc.in +cp -a %{SOURCE12} service-type-database/build-db translation-update-upstream %patch0 %patch1 -p1 %patch4 %patch19 -p1 %patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 %if !%{build_core} # Replace all .la references from local .la files to installed versions @@ -472,9 +510,11 @@ export PYTHON=%{_bindir}/python3 %if %{build_core} --enable-compat-libdns_sd\ --enable-compat-howl\ + --enable-libevent\ %else --disable-compat-libdns_sd\ --disable-compat-howl\ + --disable-libevent\ %endif %if %{build_glib2} --enable-glib\ @@ -498,6 +538,11 @@ export PYTHON=%{_bindir}/python3 --disable-gtk\ %else --disable-mono\ +%endif +%if %{build_qt5} + --enable-qt5\ +%else + --disable-qt5\ %endif --with-avahi-priv-access-group=avahi\ --with-autoipd-user=avahi-autoipd\ @@ -530,6 +575,9 @@ cd avahi-sharp %make_install cd ../avahi-ui-sharp %endif +%if %{build_qt5} && !%{build_core} +cd avahi-qt +%endif %make_install # do not install sysv init scripts rm -rf %{buildroot}%{_sysconfdir}/init.d/ @@ -652,22 +700,28 @@ getent passwd avahi-autoipd >/dev/null || \ # Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11. find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:avahi-autoipd {} + -%post -n libavahi-client3 -p /sbin/ldconfig -%postun -n libavahi-client3 -p /sbin/ldconfig -%post -n libavahi-common3 -p /sbin/ldconfig -%postun -n libavahi-common3 -p /sbin/ldconfig -%post -n libavahi-core7 -p /sbin/ldconfig -%postun -n libavahi-core7 -p /sbin/ldconfig +%post -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%postun -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%post -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%postun -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%post -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%postun -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%post -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig +%postun -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig -%post -n libhowl0 -p /sbin/ldconfig -%postun -n libhowl0 -p /sbin/ldconfig +%post -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig +%postun -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig -%post -n libavahi-gobject0 -p /sbin/ldconfig -%postun -n libavahi-gobject0 -p /sbin/ldconfig -%post -n libavahi-glib1 -p /sbin/ldconfig -%postun -n libavahi-glib1 -p /sbin/ldconfig +%post -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%postun -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%post -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%postun -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%if %{build_qt5} +%post -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%postun -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%endif %post -n python3-avahi-gtk %desktop_database_post @@ -720,21 +774,24 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files lang -f %{name}.lang -%files -n libavahi-client3 +%files -n libavahi-client%{avahi_client_sover} %{_libdir}/libavahi-client*.so.* -%files -n libavahi-common3 +%files -n libavahi-common%{avahi_common_sover} %{_libdir}/libavahi-common*.so.* -%files -n libavahi-core7 +%files -n libavahi-core%{avahi_core_sover} %{_libdir}/libavahi-core*.so.* +%files -n libavahi-libevent%{avahi_libevent_sover} +%{_libdir}/libavahi-libevent*.so.* + %files -n libdns_sd # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: %{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so.* -%files -n libhowl0 +%files -n libhowl%{avahi_libhowl_sover} %{_libdir}/libhowl.so.* %files -n python3-avahi @@ -774,6 +831,7 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %{_includedir}/avahi-client %{_includedir}/avahi-common %{_includedir}/avahi-core +%{_includedir}/avahi-libevent # avahi devel files %{_libdir}/libavahi-client.*a %{_libdir}/libavahi-client*.so @@ -783,8 +841,11 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a # do not remove unless you fix the resulting problems # reference is in libavahi-client.la %{_libdir}/libavahi-common*.*a +%{_libdir}/libavahi-libevent.*a +%{_libdir}/libavahi-libevent*.so %{_libdir}/pkgconfig/avahi-client.pc %{_libdir}/pkgconfig/avahi-core.pc +%{_libdir}/pkgconfig/avahi-libevent.pc %files compat-mDNSResponder-devel %{_includedir}/avahi-compat-libdns_sd @@ -804,10 +865,10 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files -n libavahi-ui-gtk3-%{avahi_gtk3_sover} %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_sover}* -%files -n libavahi-glib1 +%files -n libavahi-glib%{avahi_glib_sover} %{_libdir}/libavahi-glib*.so.* -%files -n libavahi-gobject0 +%files -n libavahi-gobject%{avahi_gobject_sover} %{_libdir}/libavahi-gobject*.so.* %files -n typelib-1_0-Avahi-0_6 @@ -817,7 +878,6 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files -n python3-avahi-gtk %{_bindir}/avahi-discover %{_datadir}/applications/avahi-discover.desktop -%{python3_sitelib}/avahi_discover %files -n avahi-utils-gtk %{_bindir}/bshell @@ -859,4 +919,15 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %{_prefix}/lib/mono/gac/avahi-sharp %endif +%if %{build_qt5} +%files -n libavahi-qt5-%{avahi_qt5_sover} +%{_libdir}/libavahi-qt5.so.* + +%files -n libavahi-qt5-devel +%{_includedir}/avahi-qt5 +%{_libdir}/libavahi-qt5.*a +%{_libdir}/libavahi-qt5.so +%{_libdir}/pkgconfig/avahi-qt5.pc +%endif + %changelog diff --git a/avahi-qt5.changes b/avahi-qt5.changes new file mode 100644 index 0000000..dfd3e15 --- /dev/null +++ b/avahi-qt5.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Aug 31 12:14:11 UTC 2020 - Antonio Larrosa + +- Add initial release of avahi-qt5 flavor diff --git a/avahi-qt5.spec b/avahi-qt5.spec new file mode 100644 index 0000000..64cffc0 --- /dev/null +++ b/avahi-qt5.spec @@ -0,0 +1,933 @@ +# +# spec file for package avahi-qt5 +# +# Copyright (c) 2020 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# Do not edit this auto generated file! Edit avahi.spec. +%define _name avahi +# In automatic build systems you want to enable just one of following options. +# For build all at once, set all to 1. +# If you set build_core to 0, you cannot set more than one other option to 1. +%define build_core 0 +# NOTE: build_glib2 also controls build of gobject, gtk2, gtk3 and pygobject code. +%define build_glib2 0 +%define build_mono 0 +%define build_qt5 1 +%define avahi_client_sover 3 +%define avahi_common_sover 3 +%define avahi_core_sover 7 +%define avahi_libevent_sover 1 +%define avahi_libhowl_sover 0 +%define avahi_ui_sover 0 +%define avahi_glib_sover 1 +%define avahi_gobject_sover 0 +%define avahi_gtk3_sover 0 +%define avahi_qt5_sover 1 +%if %{build_glib2} +%define debug_package_requires libavahi-ui%{avahi_ui_sover} = %{version}-%{release} +%endif +Name: avahi-qt5 +Version: 0.8 +Release: 0 +Summary: D-Bus Service for Zeroconf and Bonjour +License: LGPL-2.1-or-later +Group: System/Daemons +URL: http://www.avahi.org/ +Source: http://avahi.org/download/%{_name}-%{version}.tar.gz +# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz +Source1: avahi-daemon-check-dns.sh +# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel. +Source4: avahi-glib-gettext.m4 +Source5: avahi.sysconfig +Source6: avahi-autoipd.sysconfig +# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz +Source7: avahi-daemon.if-up +Source8: %{_name}_spec-prepare.sh +Source9: avahi-autoipd.README.SUSE +Source10: avahi-autoipd.if-up +Source11: avahi-autoipd.if-down +# File missing from 0.8 tarball +Source12: https://raw.githubusercontent.com/lathiat/avahi/master/service-type-database/build-db +Source100: attributes +Source101: update_spec.pl +Source102: baselibs.conf +# PATCH-FIX-OPENSUSE avahi-gacdir.patch -- Mono libs are in $prefix/lib on suse +Patch0: avahi-gacdir.patch +# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 Avahi#365 -- sbrabec@suse.cz +Patch1: avahi-desktop.patch +# PATCH-FEATURE-OPENSUSE avahi-daemon-check-dns-suse.patch bnc431704 sbrabec@suse.cz -- Port Debian avahi-daemon-check-dns.sh to SUSE, see also http://avahi.org/wiki/AvahiAndUnicastDotLocal +Patch4: avahi-daemon-check-dns-suse.patch +# PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. +Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch +# PATCH-FIX-UPSTREAM add-IT_PROG_INTLTOOL.patch alarrosa@suse.com -- add IT_PROG_INTLTOOL so intltool works +Patch20: add-IT_PROG_INTLTOOL.patch +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: gdbm-devel +BuildRequires: intltool +BuildRequires: libdaemon-devel +BuildRequires: libexpat-devel +# libtool is needed to build all variants: bootstrap is unconditional in the build section +BuildRequires: libtool +BuildRequires: pkgconfig +# Even if we are not building python bindings, we need python to build service types database: +BuildRequires: python3-dbm +BuildRequires: python3-dbus-python +BuildRequires: python3-devel +BuildRequires: translation-update-upstream +# FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10). +%if !%{build_glib2} && !%{build_mono} && !%{build_qt5} +# Create split spec files only when building per partes: +#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) +%endif +%if 0%{?suse_version} >= 1330 +BuildRequires: strip-nondeterminism +%endif +%if %{build_core} +BuildRequires: dbus-1-devel +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: libevent-devel >= 2.1.5 +BuildRequires: python3-dbm +BuildRequires: zlib-devel +BuildRequires: pkgconfig(systemd) +# For python bindings and utilities: +#BuildRequires: python3-dbus-python +#Requires: dbus-1 +Requires: nss-mdns +Requires(pre): shadow +# +# mDNSResponder was used for <= 10.2: +Provides: mDNSResponder = 107.5 +Obsoletes: mDNSResponder < 107.5 +# Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released. +# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2 +#Conflicts: avahi-utils <= 0.6.31-9.2 +%endif +%if %{build_glib2} +BuildRequires: gobject-introspection-devel +BuildRequires: gtk3-devel +BuildRequires: libavahi-devel = %{version} +BuildRequires: update-desktop-files +BuildRequires: pkgconfig(pygobject-3.0) +%endif +%if %{build_mono} +BuildRequires: gtk-sharp2 +BuildRequires: libavahi-glib-devel = %{version} +BuildRequires: mono-devel +BuildRequires: monodoc-core +# Please copy this line to avahi-mono definition below for build all-in-once: +Requires: gtk-sharp2 +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} +%endif +%if %{build_qt5} +BuildRequires: dbus-1-devel +BuildRequires: libavahi-devel = %{version} +BuildRequires: pkgconfig(Qt5Core) +Requires: libavahi-client%{avahi_client_sover} >= %{version} +%endif + +%description +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. It uses D-Bus for +communication between user applications and a system daemon. The daemon +is used to coordinate application efforts in caching replies, necessary +to minimize the traffic imposed on networks. + +The Avahi mDNS responder is now complete with features, implementing +all MUSTs and the majority of the SHOULDs of the mDNS and DNS-SD RFCs. +It passes all tests in the Apple Bonjour conformance test suite. In +addition, it supports some nifty things, like correct mDNS reflection +across LAN segments. + +%package -n libavahi-client%{avahi_client_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-client%{avahi_client_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-common%{avahi_common_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-common%{avahi_common_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-core%{avahi_core_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-core%{avahi_core_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-libevent%{avahi_libevent_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-libevent%{avahi_libevent_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libdns_sd +Summary: mDNSResponder Compatibility Package for the Zeroconf/Bonjour D-Bus service +# mDNSResponder-lib used unversioned soname. +# Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package): +# +# mDNSResponder-lib was used for <= 10.2: +Group: System/Libraries +Provides: mDNSResponder-lib = 107.5 +Obsoletes: mDNSResponder-lib < 107.5 +# Old name used for <= 10.3: +Provides: avahi-compat-mDNSResponder = %{version} +Obsoletes: avahi-compat-mDNSResponder < %{version} +%ifarch ia64 x86_64 ppc64 s390x +Provides: libdns_sd.so()(64bit) +%else +Provides: libdns_sd.so +%endif + +%description -n libdns_sd +Apple mDNSResponder compatibility layer for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libhowl%{avahi_libhowl_sover} +Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service +# Old name used for <= 10.3: +Group: System/Libraries +Provides: avahi-compat-howl = %{version} +Obsoletes: avahi-compat-howl < %{version} + +%description -n libhowl%{avahi_libhowl_sover} +Howl compatibility layer for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n python3-avahi +Summary: A set of Avahi utilities written in Python +Group: Development/Languages/Python +Requires: %{name} = %{version} +Requires: python3-Twisted +Requires: python3-dbm +Requires: python3-dbus-python +# Old name used for <= 10.3: +Provides: avahi-python = %{version} +Obsoletes: avahi-python < %{version} +Obsoletes: python-avahi + +%description -n python3-avahi +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package autoipd +Summary: IPv4LL Service for Zeroconf and Bonjour +# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11. +# Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released. +# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11 +#Conflicts: avahi <= 0.6.31-9.2 +# coreutils contains /usr/bin/chown +Group: Productivity/Networking/Other +Requires(post): coreutils +# shadow contains useradd and groupadd +Requires(pre): shadow +Provides: avahi:%{_sbindir}/avahi-autoipd + +%description autoipd +avahi-autoipd is an implementation of Dynamic Configuration of IPv4 +Link-Local Addresses. + +avahi-autoipd doesn't depend on any other Avahi library, hence it makes +sense to install it even if Avahi itself is not installed. + +%package utils +Summary: Command Line Utilities for the Zeroconf/Bonjour D-Bus service +Group: Productivity/Networking/Other +Requires: %{_name} >= %{version} + +%description utils +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-devel +Summary: Header files for the Zeroconf/Bonjour D-Bus service +Group: Development/Libraries/C and C++ +Requires: %{_name} = %{version} +Requires: dbus-1-devel +Requires: glibc-devel +Requires: libavahi-client%{avahi_client_sover} = %{version} +Requires: libavahi-common%{avahi_common_sover} = %{version} +Requires: libavahi-core%{avahi_core_sover} = %{version} +# Last appeared in OpenSUSE 10.3: +Provides: avahi-devel = %{version} +Obsoletes: avahi-devel < %{version} + +%description -n libavahi-devel +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package compat-mDNSResponder-devel +Summary: mDNSResponder Compatibility Package for the Zeroconf/Bonjour D-Bus service +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libdns_sd = %{version} +Provides: mDNSResponder-devel = 107.5 +Obsoletes: mDNSResponder-devel < 107.5 + +%description compat-mDNSResponder-devel +Apple mDNSResponder compatibility layer for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package compat-howl-devel +Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libhowl%{avahi_libhowl_sover} = %{version} + +%description compat-howl-devel +Howl compatibility layer for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-ui-gtk3-%{avahi_gtk3_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-ui-gtk3-%{avahi_gtk3_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-glib%{avahi_glib_sover} +Summary: Glib Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour +# Old name used for <= 10.3: +Group: System/Libraries +Provides: avahi-glib = %{version} +Obsoletes: avahi-glib < %{version} + +%description -n libavahi-glib%{avahi_glib_sover} +GLib support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-gobject%{avahi_gobject_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-gobject%{avahi_gobject_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n typelib-1_0-Avahi-0_6 +Summary: Introspection bindings for the Zeroconf/Bonjour D-Bus service +Group: System/Libraries + +%description -n typelib-1_0-Avahi-0_6 +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +This package provides the GObject Introspection bindings for Avahi. + +%package -n avahi-utils-gtk +Summary: GTK+ Utilities for the Zeroconf/Bonjour D-Bus service +Group: Productivity/Networking/Other +Requires: %{_name} >= %{version} +# Due to a mistake in the spec file build staging, this package had +# name avahi-glib2-utils-gtk in 11.1 and SLE11 and avahi-utils-gtk in +# all other products. +Provides: avahi-glib2-utils-gtk = %{version} +Obsoletes: avahi-glib2-utils-gtk < %{version} + +%description -n avahi-utils-gtk +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n python3-avahi-gtk +Summary: A set of Avahi utilities written in Python Using python-gtk +Group: Development/Languages/Python +Requires: python3-avahi = %{version} +Requires: python3-gobject +Requires(post): coreutils +Requires(postun): coreutils +# Old name used for <= 10.3: +Provides: avahi-python = %{version} +Obsoletes: avahi-python < %{version} +Obsoletes: python-avahi-gtk +# Provide split-provides for update from <= 11.0: +Provides: python-avahi:%{_bindir}/avahi-bookmarks +Obsoletes: python-avahi < %{version} + +%description -n python3-avahi-gtk +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-glib-devel +Summary: Header files for Avahi's Glib bindings +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libavahi-glib%{avahi_glib_sover} = %{version} +Requires: libavahi-ui-gtk3-%{avahi_gtk3_sover} = %{version} +Requires: typelib-1_0-Avahi-0_6 = %{version} +# Last appeared in OpenSUSE 10.3: +Provides: avahi-devel:%{_libdir}/libavahi-glib.so + +%description -n libavahi-glib-devel +GLib support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-gobject-devel +Summary: Header files for Avahi's GObject bindings +Group: System/Daemons +Requires: glib2-devel +Requires: libavahi-devel = %{version} +Requires: libavahi-glib-devel +Requires: libavahi-gobject%{avahi_gobject_sover} = %{version} + +%description -n libavahi-gobject-devel +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%if %{build_core} +%if %{build_mono} +%package -n avahi-mono +Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour +Group: Development/Languages/Mono +Requires: gtk-sharp2 +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} + +%description -n avahi-mono +This package provides Mono bindings for avahi. Avahi is an +implementation of the DNS Service Discovery and MulticastDNS +specifications for Zeroconf Computing. It uses D-BUS for communication +between user applications and a system daemon. The daemon is used to +coordinate application efforts in caching replies, necessary to +minimize the traffic imposed on networks. The Avahi mDNS responder is +now feature complete, implementing all MUSTs and the majority of the +SHOULDs of the mDNS and DNS-SD RFCs. It passes all tests in the Apple +Bonjour conformance test suite. In addition, it supports some nifty +things, like correct mDNS reflection across LAN segments. + +%endif +%lang_package +%endif + +%if %{build_qt5} +%package -n libavahi-qt5-%{avahi_qt5_sover} +Summary: Qt5 Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-qt5-%{avahi_qt5_sover} +Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-qt5-devel +Summary: Header files for Avahi's Qt5 bindings +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libavahi-qt5-%{avahi_qt5_sover} = %{version} + +%description -n libavahi-qt5-devel +Development files for the Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. +%endif + +%prep +%setup -q -n %{_name}-%{version} +cp -a %{SOURCE1} %{SOURCE7} . +cp -a %{SOURCE5} sysconfig.avahi +sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd +cp -a %{SOURCE9} avahi-autoipd/README.SUSE +sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up +sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down +sed -ie "s/libevent-[0-9\.]*/libevent/" avahi-libevent.pc.in +cp -a %{SOURCE12} service-type-database/build-db +translation-update-upstream +%patch0 +%patch1 -p1 +%patch4 +%patch19 -p1 +%patch20 -p1 + +%if !%{build_core} +# Replace all .la references from local .la files to installed versions +# with exception of libavahi-glib.la. +# It allows to build only the binding subpackage. +%if %{build_mono} +sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am +%else +sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g +s:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g +s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g +' */Makefile.am +%endif +%endif +if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then + cat %{SOURCE4} >>acinclude.m4 +fi +# FIXME: We do not have xmltoman, use original doc, just fix paths. +sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9] +sed -i "s:-DGTK_DISABLE_DEPRECATED=1::" avahi-ui/Makefile.am + +%build +autoreconf -f -i +intltoolize -f +export PYTHON=%{_bindir}/python3 +%configure\ + --libexecdir=%{_prefix}/lib\ + --disable-static\ + --with-distro=suse\ +%if %{build_core} + --enable-compat-libdns_sd\ + --enable-compat-howl\ + --enable-libevent\ +%else + --disable-compat-libdns_sd\ + --disable-compat-howl\ + --disable-libevent\ +%endif +%if %{build_glib2} + --enable-glib\ + --enable-gobject\ + --disable-gtk\ + --enable-gtk3\ + --enable-pygobject\ +%else + --disable-glib\ + --disable-gobject\ + --disable-pygobject\ +%if ! %{build_mono} + --disable-gtk\ +%endif + --disable-gtk3\ +%endif + --disable-qt3\ + --disable-qt4\ +%if %{build_mono} + --enable-mono\ + --disable-gtk\ +%else + --disable-mono\ +%endif +%if %{build_qt5} + --enable-qt5\ +%else + --disable-qt5\ +%endif + --with-avahi-priv-access-group=avahi\ + --with-autoipd-user=avahi-autoipd\ + --with-autoipd-group=avahi-autoipd +%if %{build_glib2} && !%{build_core} +for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do +cd $DIR +%make_build +cd .. +done +%endif +%if %{build_mono} && !%{build_core} +cd avahi-sharp +%make_build +cd ../avahi-ui-sharp +%endif +%make_build + +%install +%if %{build_glib2} && !%{build_core} +for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do +cd $DIR +%make_install +cd .. +done +cd - +%endif +%if %{build_mono} && !%{build_core} +cd avahi-sharp +%make_install +cd ../avahi-ui-sharp +%endif +%if %{build_qt5} && !%{build_core} +cd avahi-qt +%endif +%make_install +# do not install sysv init scripts +rm -rf %{buildroot}%{_sysconfdir}/init.d/ +%if !%{build_core} +cd .. +%make_build install-pkgconfigDATA DESTDIR=%{buildroot} +%endif +%if %{build_core} +# do not remove this unless you plan to fix _all_ the references to +# it. all (multiple) previous attempts have failed already +#rm "%{buildroot}/%{_libdir}/libavahi-common.la" +install -d %{buildroot}/%{_localstatedir}/run/avahi-daemon +ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/ +ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc +install -d %{buildroot}/%{_prefix}/lib/avahi +install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/ +install -d %{buildroot}%{_sysconfdir}/sysconfig/network/if-{up,down}.d +# Note: We do not install the script to if-down.d. Only very obscure use +# cases may fail. (And Debian does the same.) +# (You would have an AUTOIP-only fallback network, then connect network +# to network with .local in DNS without disconnecting from the fallback, +# then disconnect from network with .local in DNS.) +install avahi-daemon.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-daemon +install avahi-autoipd/avahi-autoipd.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-autoipd +install avahi-autoipd/avahi-autoipd.if-down %{buildroot}%{_sysconfdir}/sysconfig/network/if-down.d/avahi-autoipd +install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd +mkdir -p %{buildroot}/%{_sbindir} +ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon +ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd +install -d %{buildroot}/%{_datadir}/pixmaps +install -d %{buildroot}%{_fillupdir} +install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/ +%if ! %{build_glib2} +# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python3-avahi-gtk: +install -d %{buildroot}/%{_datadir}/avahi/interfaces +install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces +%endif +%find_lang %{name} %{?no_lang_C} +%else +# There is no simple way to not install core files. Remove them here. +# The rest is enabled/disabled in configure as needed. +rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc +rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc +%if %{build_glib2} +rm %{buildroot}/%{_bindir}/avahi-bookmarks +rm -r %{buildroot}/%{python3_sitelib}/avahi +rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1* +rm %{buildroot}/%{_mandir}/man1/avahi-browse-domains.1* +rm %{buildroot}/%{_mandir}/man1/avahi-browse.1* +rm %{buildroot}/%{_mandir}/man1/avahi-publish-address.1* +rm %{buildroot}/%{_mandir}/man1/avahi-publish-service.1* +rm %{buildroot}/%{_mandir}/man1/avahi-publish.1* +rm %{buildroot}/%{_mandir}/man1/avahi-resolve-address.1* +rm %{buildroot}/%{_mandir}/man1/avahi-resolve-host-name.1* +rm %{buildroot}/%{_mandir}/man1/avahi-resolve.1* +rm %{buildroot}/%{_mandir}/man1/avahi-set-host-name.1* +rm %{buildroot}/%{_mandir}/man5/avahi-daemon.conf.5* +rm %{buildroot}/%{_mandir}/man5/avahi.hosts.5* +rm %{buildroot}/%{_mandir}/man5/avahi.service.5* +rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.8* +rm %{buildroot}/%{_mandir}/man8/avahi-autoipd.action.8* +rm %{buildroot}/%{_mandir}/man8/avahi-daemon.8* +rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.8* +rm %{buildroot}/%{_mandir}/man8/avahi-dnsconfd.action.8* +# Note: This file was intentionally moved to avahi. It is needed for avahi-utils-gtk and python3-avahi-gtk: +rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui +rmdir %{buildroot}/%{_datadir}/avahi/interfaces +rmdir %{buildroot}/%{_datadir}/avahi +%else +%if %{build_mono} +%if 0%{?suse_version} >= 1330 +strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip +%endif +%endif +%endif +%endif +%if %{build_glib2} +%suse_update_desktop_file avahi-discover +%suse_update_desktop_file bvnc +%suse_update_desktop_file bssh +%endif +%fdupes %{buildroot}/%{_libdir} + +%pre +getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi +getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi +%service_add_pre avahi-dnsconfd.service avahi-daemon.service +# bnc#853845,bnc#851953: do not start by default under +# sysconfig as this breaks vlan,bridge,bonding setups +# in pre to revert old default setting from template. +if test -f %{_fillupdir}/sysconfig.avahi-autoipd -a \ + -f etc/sysconfig/avahi ; then + . %{_fillupdir}/sysconfig.avahi-autoipd + if test "X$AVAHI_AUTOIPD_ENABLE" = "Xyes" ; then + sed -i etc/sysconfig/avahi \ + -e 's/^\(AVAHI_AUTOIPD_ENABLE\)=.*/\1="no"/' + fi +fi + +%post +%{fillup_only -n avahi} +%{fillup_only -ns security checksig} +%service_add_post avahi-dnsconfd.service avahi-daemon.service + +%preun +%service_del_preun avahi-dnsconfd.service avahi-daemon.service + +%postun +%service_del_postun avahi-dnsconfd.service avahi-daemon.service + +%pre autoipd +getent group avahi-autoipd >/dev/null || %{_sbindir}/groupadd -r avahi-autoipd +getent passwd avahi-autoipd >/dev/null || \ + %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" \ + -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd \ + avahi-autoipd + +%post autoipd +%{fillup_only -ns avahi autoipd} +# Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11. +find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:avahi-autoipd {} + + +%post -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%postun -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%post -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%postun -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%post -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%postun -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%post -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig +%postun -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig +%post -n libdns_sd -p /sbin/ldconfig +%postun -n libdns_sd -p /sbin/ldconfig +%post -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig +%postun -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig +%post -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig +%postun -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig +%post -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%postun -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%post -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%postun -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%if %{build_qt5} +%post -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%postun -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%endif + +%post -n python3-avahi-gtk +%desktop_database_post + +%postun -n python3-avahi-gtk +%desktop_database_post + +%post -n avahi-utils-gtk +%desktop_database_post + +%postun -n avahi-utils-gtk +%desktop_database_post + +%if %{build_core} +%files +%license LICENSE +%doc docs/* +%dir %{_libdir}/avahi/ +# Note: This file is intentionally packaged here. It is needed for python3-avahi and avahi-utils: +%{_libdir}/avahi/service-types.db +# avahi creates the directory itself, we do not package it +# since it might be on tmpfs +%attr(-,avahi,avahi) %ghost /run/avahi-daemon +%{_mandir}/man5/*.5%{ext_man} +%{_mandir}/man8/*.8%{ext_man} +%exclude %{_mandir}/man8/avahi-autoipd.8.* +%{_sbindir}/avahi-* +%exclude %{_sbindir}/avahi-autoipd +%{_sbindir}/rcavahi-daemon +%{_sbindir}/rcavahi-dnsconfd +%dir %{_sysconfdir}/avahi +%config %{_sysconfdir}/avahi/avahi-daemon.conf +%{_sysconfdir}/avahi/avahi-dnsconfd.action +%dir %{_sysconfdir}/avahi/services +%{_sysconfdir}/avahi/services/*.service +%config(noreplace) %{_sysconfdir}/avahi/hosts +%{_sysconfdir}/dbus-1/system.d/*.conf +%{_datadir}/dbus-1/interfaces/org.freedesktop.Avahi.*.xml +%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service +%dir %{_prefix}/lib/avahi +%{_prefix}/lib/avahi/avahi-daemon-check-dns.sh +%{_unitdir}/avahi-daemon.service +%{_unitdir}/avahi-daemon.socket +%{_unitdir}/avahi-dnsconfd.service +# Common file for avahi-utils-gtk and python3-avahi-gtk: +%dir %{_datadir}/avahi/ +%{_datadir}/avahi/interfaces +%{_sysconfdir}/sysconfig/network/*/avahi-daemon +%{_fillupdir}/sysconfig.avahi + +%files lang -f %{name}.lang + +%files -n libavahi-client%{avahi_client_sover} +%{_libdir}/libavahi-client*.so.* + +%files -n libavahi-common%{avahi_common_sover} +%{_libdir}/libavahi-common*.so.* + +%files -n libavahi-core%{avahi_core_sover} +%{_libdir}/libavahi-core*.so.* + +%files -n libavahi-libevent%{avahi_libevent_sover} +%{_libdir}/libavahi-libevent*.so.* + +%files -n libdns_sd +# libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: +%{_libdir}/libdns_sd.so +%{_libdir}/libdns_sd.so.* + +%files -n libhowl%{avahi_libhowl_sover} +%{_libdir}/libhowl.so.* + +%files -n python3-avahi +%{_bindir}/avahi-bookmarks +%{_mandir}/man1/avahi-bookmarks.1%{ext_man} +%dir %{python3_sitelib}/avahi +%{python3_sitelib}/avahi/__init__.py* +%dir %{python3_sitelib}/avahi/__pycache__ +%{python3_sitelib}/avahi/__pycache__/__init__* +%{python3_sitelib}/avahi/ServiceTypeDatabase.py + +%files autoipd +%doc avahi-autoipd/README.SUSE +%{_mandir}/man8/avahi-autoipd.8%{ext_man} +%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd +%{_sbindir}/avahi-autoipd +%{_sysconfdir}/avahi/avahi-autoipd.action +%{_sysconfdir}/sysconfig/network/*/avahi-autoipd +%{_fillupdir}/sysconfig.avahi-autoipd + +%files utils +%{_bindir}/avahi-browse* +%{_bindir}/avahi-publish* +%{_bindir}/avahi-resolve* +%{_bindir}/avahi-set-host-name +%dir %{_datadir}/avahi/ +%{_datadir}/avahi/avahi-service.dtd +%{_mandir}/man1/avahi-browse*.1* +%{_mandir}/man1/avahi-publish*.1* +%{_mandir}/man1/avahi-resolve*.1* +%{_mandir}/man1/avahi-set-host-name.1* + +%files -n libavahi-devel +# FIXME: Maybe split to particular subpackages. +#%doc doc/api/html +#%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO +%{_includedir}/avahi-client +%{_includedir}/avahi-common +%{_includedir}/avahi-core +%{_includedir}/avahi-libevent +# avahi devel files +%{_libdir}/libavahi-client.*a +%{_libdir}/libavahi-client*.so +%{_libdir}/libavahi-core.*a +%{_libdir}/libavahi-core*.so +%{_libdir}/libavahi-common*.so +# do not remove unless you fix the resulting problems +# reference is in libavahi-client.la +%{_libdir}/libavahi-common*.*a +%{_libdir}/libavahi-libevent.*a +%{_libdir}/libavahi-libevent*.so +%{_libdir}/pkgconfig/avahi-client.pc +%{_libdir}/pkgconfig/avahi-core.pc +%{_libdir}/pkgconfig/avahi-libevent.pc + +%files compat-mDNSResponder-devel +%{_includedir}/avahi-compat-libdns_sd +%{_includedir}/dns_sd.h +%{_libdir}/libdns_sd.*a +%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc + +%files compat-howl-devel +%{_includedir}/avahi-compat-howl +%{_libdir}/libhowl.so +%{_libdir}/libhowl.*a +%{_libdir}/pkgconfig/avahi-compat-howl.pc +%{_libdir}/pkgconfig/howl.pc +%endif + +%if %{build_glib2} +%files -n libavahi-ui-gtk3-%{avahi_gtk3_sover} +%{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_sover}* + +%files -n libavahi-glib%{avahi_glib_sover} +%{_libdir}/libavahi-glib*.so.* + +%files -n libavahi-gobject%{avahi_gobject_sover} +%{_libdir}/libavahi-gobject*.so.* + +%files -n typelib-1_0-Avahi-0_6 +%{_libdir}/girepository-1.0/Avahi-0.6.typelib +%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib + +%files -n python3-avahi-gtk +%{_bindir}/avahi-discover +%{_datadir}/applications/avahi-discover.desktop + +%files -n avahi-utils-gtk +%{_bindir}/bshell +%{_bindir}/bssh +%{_bindir}/bvnc +%{_bindir}/avahi-discover-standalone +%{_datadir}/applications/bssh.desktop +%{_datadir}/applications/bvnc.desktop + +%files -n libavahi-glib-devel +%{_includedir}/avahi-glib +%{_includedir}/avahi-ui +%{_libdir}/libavahi-glib*.*a +%{_libdir}/libavahi-glib*.so +%{_libdir}/libavahi-ui*.*a +%{_libdir}/libavahi-ui*.*so +%{_libdir}/pkgconfig/avahi-glib.pc +%{_libdir}/pkgconfig/avahi-ui-gtk3.pc + +%files -n libavahi-gobject-devel +%{_includedir}/avahi-gobject +%{_libdir}/libavahi-gobject*.*a +%{_libdir}/libavahi-gobject*.so +%{_libdir}/pkgconfig/avahi-gobject.pc +%{_datadir}/gir-1.0/*.gir +%endif + +%if %{build_mono} +%if %{build_core} +%files -n avahi-mono +%else +%files +%endif +%defattr(-,root,root) +%{_libdir}/pkgconfig/avahi-sharp.pc +%{_libdir}/pkgconfig/avahi-ui-sharp.pc +%{_prefix}/lib/monodoc/sources/*.* +%{_prefix}/lib/mono/avahi-sharp +%{_prefix}/lib/mono/gac/avahi-sharp +%endif + +%if %{build_qt5} +%files -n libavahi-qt5-%{avahi_qt5_sover} +%{_libdir}/libavahi-qt5.so.* + +%files -n libavahi-qt5-devel +%{_includedir}/avahi-qt5 +%{_libdir}/libavahi-qt5.*a +%{_libdir}/libavahi-qt5.so +%{_libdir}/pkgconfig/avahi-qt5.pc +%endif + +%changelog diff --git a/avahi.changes b/avahi.changes index 3d63910..6705160 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,3 +1,109 @@ +------------------------------------------------------------------- +Wed Sep 2 10:11:46 UTC 2020 - Antonio Larrosa + +- Use sover variables all over the spec file + +------------------------------------------------------------------- +Mon Aug 31 10:21:27 UTC 2020 - Antonio Larrosa + +- Update to version 0.8: + + The Avahi 0.8 release brings a number of new features and bug + fix changes including a backward-compatible addition to the + D-Bus API and the avahi-core API. + + The existing API is still fully supported however clients + using the new API will not work with older Avahi releases. + The avahi-client library is not affected. See the "API Changes" + section for further details. + + New Features: + - New options for filtering reflected queries between networks + (reflect-filter) + - New mainloop integration for Qt5 and libevent + - docs/THREADS: Information for multi-threaded avahi-client + apps + - Listen on loopback interfaces by default, allowing local-only + services to be consumed by the local machine + - New D-Bus V2 API and additions to the avahi-core API for + splitting "New" calls into "Prepare" and "Start". See "API + Changes" for more details. + + Notable Changes: + - avahi-autoipd: Initial IP selection based on MAC previously + ignored first octet - this will cause all hosts to select a + different link-local IP than previous versions based on the + same MAC address + - avahi-daemon: Delay sending results on an object for 10ms in + an attempt to give clients enough time to subscribe to + signals from the new object after receiving it's path in + response so the New call. See "API Changes" for more info + + Bug Fixes: + - avahi-python: Various Python 3 enhancements including + encoding unicode strings as UTF-8 + - avahi-common: avahi_string_list_to_string will now escape + embedded quotes, backslashes and control characters. + - avahi-daemon: Fix a crash when txt records have an empty + value in .xml service files + - avahi-daemon: reflector: do not incorrectly cache responses + on outgoing interfaces. Previously we would incorrectly cache + responses reflected from one interface on the outgoing + interface. These responses were later sent to clients on that + network even if the original client had disappeared and could + cause those clients to have a hostname conflict with + themselves on restart. We no longer incorrectly cache such + traffic. + + Security Fixes: + - Drop legacy unicast queries from address not on local link + which can lead to UDP traffic amplification attacks + (CVE-2017-6519) + + API Changes: The avahi-core API and D-Bus API have implemented + a new API where a call to the "New" method can now be split + into a "Prepare" and then "Start" method for some objects. The + previous "New" API is still fully supported and there is no + intention to deprecate it. + This change affects the the following objects: + AsyncAddressResolver, AsyncHostNameResolver, + AsyncServiceResolver, DomainBrowser, RecordBrowser, + ServiceBrowser, ServiceTypeBrowser + This is because the D-Bus implementation in some languages + would only bind to signals of an object after it was created + and had received the new object's path. This led to such + languages missing the initial results sent between the time the + object was created and it had setup a filter to receive it's + signals. + This primarily occured in languages that create dynamic + bindings for D-Bus objects using introspection such as Python. + The avahi-client C api was not affected as it globally binds to + all avahi signals without specifying individual object paths + and still makes use of the V1 API. + The v2 Prepare/Start API is available under the new + org.freedesktop.Avahi.Server2 D-Bus interface and also has + corresponding avahi_s_* calls for users of the embedded + avahi-core library. + The old org.freedesktop.Avahi.Server interface is still + supported and there is no intention to remove this API. + Additionally this problem has also been solved for old clients + by adding a very small 10ms delay before we start sending + results to give the client time to bind to the signals which + should silently fix the issue in most cases without introducing + a noticable or impactful delay. + Clients implementing the new org.freedesktop.Avahi.Server2 + D-Bus interface will not work with older Avahi daemons. It is + suggested that clients may wish to either check for and + fallback to the older API version, or continue to use the OLD + API and rely on the 10ms timer to resolve the issue. + - This release is backwards compatible with Avahi 0.6.x and 0.7. +- Add qt5 bindings in a separate package +- Add patch to add IT_PROG_INTLTOOL to configure.ac so intltoolize + can be used: + * add-IT_PROG_INTLTOOL.patch +- Add file missing from the tarball: + * build-db +- Rebase patch: + * avahi-desktop.patch +- Drop patches already included by upstream: + * avahi-0.7-dbm.patch + * avahi-0.7-encode-strings-as-utf8.patch + * avahi-0.7-python3-bookmarks.patch + * CVE-2018-1000845.patch + ------------------------------------------------------------------- Thu Aug 6 07:59:00 UTC 2020 - Jan Engelhardt diff --git a/avahi.spec b/avahi.spec index bf10dec..2c2cc0b 100644 --- a/avahi.spec +++ b/avahi.spec @@ -27,18 +27,22 @@ # NOTE: build_glib2 also controls build of gobject, gtk2, gtk3 and pygobject code. %define build_glib2 0 %define build_mono 0 +%define build_qt5 0 %define avahi_client_sover 3 %define avahi_common_sover 3 %define avahi_core_sover 7 +%define avahi_libevent_sover 1 +%define avahi_libhowl_sover 0 %define avahi_ui_sover 0 %define avahi_glib_sover 1 %define avahi_gobject_sover 0 %define avahi_gtk3_sover 0 +%define avahi_qt5_sover 1 %if %{build_glib2} %define debug_package_requires libavahi-ui%{avahi_ui_sover} = %{version}-%{release} %endif Name: avahi -Version: 0.7 +Version: 0.8 Release: 0 Summary: D-Bus Service for Zeroconf and Bonjour License: LGPL-2.1-or-later @@ -57,6 +61,8 @@ Source8: %{_name}_spec-prepare.sh Source9: avahi-autoipd.README.SUSE Source10: avahi-autoipd.if-up Source11: avahi-autoipd.if-down +# File missing from 0.8 tarball +Source12: https://raw.githubusercontent.com/lathiat/avahi/master/service-type-database/build-db Source100: attributes Source101: update_spec.pl Source102: baselibs.conf @@ -68,14 +74,8 @@ Patch1: avahi-desktop.patch Patch4: avahi-daemon-check-dns-suse.patch # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch - # PATCH-FIX-UPSTREAM avahi-0.7-dbm.patch bsc#1076402 mgorse@suse.com -- use the agnostic dbm interface, needed for python 3. -Patch20: avahi-0.7-dbm.patch -# PATCH-FIX-UPSTREAM avahi-0.7-encode-strings-as-utf8.patch boo#1110668 mgorse@suse.com -- encode strings as UTF-8. -Patch21: avahi-0.7-encode-strings-as-utf8.patch -# PATCh-FIX-UPSTREAM avahi-0.7-python3-bookmarks.patch boo#1110668 mgorse@suse.com -- make bookmarks python 3 compatible. -Patch22: avahi-0.7-python3-bookmarks.patch -# PATCH-FIX-UPSTREAM CVE-2018-1000845.patch boo#1110281 mgorse@suse.com -- drop legacy unicast queries from address not on local link (CVE-2018-1000845). -Patch23: CVE-2018-1000845.patch +# PATCH-FIX-UPSTREAM add-IT_PROG_INTLTOOL.patch alarrosa@suse.com -- add IT_PROG_INTLTOOL so intltool works +Patch20: add-IT_PROG_INTLTOOL.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gdbm-devel @@ -91,7 +91,7 @@ BuildRequires: python3-dbus-python BuildRequires: python3-devel BuildRequires: translation-update-upstream # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10). -%if !%{build_glib2} && !%{build_mono} +%if !%{build_glib2} && !%{build_mono} && !%{build_qt5} # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) %endif @@ -102,6 +102,7 @@ BuildRequires: strip-nondeterminism BuildRequires: dbus-1-devel BuildRequires: doxygen BuildRequires: graphviz +BuildRequires: libevent-devel >= 2.1.5 BuildRequires: python3-dbm BuildRequires: zlib-devel BuildRequires: pkgconfig(systemd) @@ -121,20 +122,26 @@ Obsoletes: mDNSResponder < 107.5 %if %{build_glib2} BuildRequires: gobject-introspection-devel BuildRequires: gtk3-devel -BuildRequires: libavahi-devel +BuildRequires: libavahi-devel = %{version} BuildRequires: update-desktop-files BuildRequires: pkgconfig(pygobject-3.0) %endif %if %{build_mono} BuildRequires: gtk-sharp2 -BuildRequires: libavahi-glib-devel +BuildRequires: libavahi-glib-devel = %{version} BuildRequires: mono-devel BuildRequires: monodoc-core # Please copy this line to avahi-mono definition below for build all-in-once: Requires: gtk-sharp2 -Requires: libavahi-client3 >= %{version} -Requires: libavahi-common3 >= %{version} -Requires: libavahi-glib1 >= %{version} +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} +%endif +%if %{build_qt5} +BuildRequires: dbus-1-devel +BuildRequires: libavahi-devel = %{version} +BuildRequires: pkgconfig(Qt5Core) +Requires: libavahi-client%{avahi_client_sover} >= %{version} %endif %description @@ -150,27 +157,35 @@ It passes all tests in the Apple Bonjour conformance test suite. In addition, it supports some nifty things, like correct mDNS reflection across LAN segments. -%package -n libavahi-client3 +%package -n libavahi-client%{avahi_client_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-client3 +%description -n libavahi-client%{avahi_client_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-common3 +%package -n libavahi-common%{avahi_common_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-common3 +%description -n libavahi-common%{avahi_common_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-core7 +%package -n libavahi-core%{avahi_core_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-core7 +%description -n libavahi-core%{avahi_core_sover} +Avahi is an implementation of the DNS Service Discovery and Multicast +DNS specifications for Zeroconf Computing. + +%package -n libavahi-libevent%{avahi_libevent_sover} +Summary: D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-libevent%{avahi_libevent_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. @@ -198,14 +213,14 @@ Apple mDNSResponder compatibility layer for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libhowl0 +%package -n libhowl%{avahi_libhowl_sover} Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service # Old name used for <= 10.3: Group: System/Libraries Provides: avahi-compat-howl = %{version} Obsoletes: avahi-compat-howl < %{version} -%description -n libhowl0 +%description -n libhowl%{avahi_libhowl_sover} Howl compatibility layer for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS @@ -262,9 +277,9 @@ Group: Development/Libraries/C and C++ Requires: %{_name} = %{version} Requires: dbus-1-devel Requires: glibc-devel -Requires: libavahi-client3 = %{version} -Requires: libavahi-common3 = %{version} -Requires: libavahi-core7 = %{version} +Requires: libavahi-client%{avahi_client_sover} = %{version} +Requires: libavahi-common%{avahi_common_sover} = %{version} +Requires: libavahi-core%{avahi_core_sover} = %{version} # Last appeared in OpenSUSE 10.3: Provides: avahi-devel = %{version} Obsoletes: avahi-devel < %{version} @@ -291,7 +306,7 @@ specifications for Zeroconf Computing. Summary: Howl Compatibility Package for the Zeroconf/Bonjour D-Bus service Group: Development/Libraries/C and C++ Requires: libavahi-devel = %{version} -Requires: libhowl0 = %{version} +Requires: libhowl%{avahi_libhowl_sover} = %{version} %description compat-howl-devel Howl compatibility layer for Avahi. @@ -307,24 +322,24 @@ Group: System/Libraries Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-glib1 +%package -n libavahi-glib%{avahi_glib_sover} Summary: Glib Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour # Old name used for <= 10.3: Group: System/Libraries Provides: avahi-glib = %{version} Obsoletes: avahi-glib < %{version} -%description -n libavahi-glib1 +%description -n libavahi-glib%{avahi_glib_sover} GLib support for Avahi. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. -%package -n libavahi-gobject0 +%package -n libavahi-gobject%{avahi_gobject_sover} Summary: D-Bus Service for Zeroconf and Bonjour Group: System/Libraries -%description -n libavahi-gobject0 +%description -n libavahi-gobject%{avahi_gobject_sover} Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Computing. @@ -375,7 +390,7 @@ DNS specifications for Zeroconf Computing. Summary: Header files for Avahi's Glib bindings Group: Development/Libraries/C and C++ Requires: libavahi-devel = %{version} -Requires: libavahi-glib1 = %{version} +Requires: libavahi-glib%{avahi_glib_sover} = %{version} Requires: libavahi-ui-gtk3-%{avahi_gtk3_sover} = %{version} Requires: typelib-1_0-Avahi-0_6 = %{version} # Last appeared in OpenSUSE 10.3: @@ -393,7 +408,7 @@ Group: System/Daemons Requires: glib2-devel Requires: libavahi-devel = %{version} Requires: libavahi-glib-devel -Requires: libavahi-gobject0 = %{version} +Requires: libavahi-gobject%{avahi_gobject_sover} = %{version} %description -n libavahi-gobject-devel Avahi is an implementation of the DNS Service Discovery and Multicast @@ -405,9 +420,9 @@ DNS specifications for Zeroconf Computing. Summary: Mono Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour Group: Development/Languages/Mono Requires: gtk-sharp2 -Requires: libavahi-client3 >= %{version} -Requires: libavahi-common3 >= %{version} -Requires: libavahi-glib1 >= %{version} +Requires: libavahi-client%{avahi_client_sover} >= %{version} +Requires: libavahi-common%{avahi_common_sover} >= %{version} +Requires: libavahi-glib%{avahi_glib_sover} >= %{version} %description -n avahi-mono This package provides Mono bindings for avahi. Avahi is an @@ -418,6 +433,30 @@ specifications for Zeroconf Computing. %lang_package %endif +%if %{build_qt5} +%package -n libavahi-qt5-%{avahi_qt5_sover} +Summary: Qt5 Bindings for avahi, the D-Bus Service for Zeroconf and Bonjour +Group: System/Libraries + +%description -n libavahi-qt5-%{avahi_qt5_sover} +Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. + +%package -n libavahi-qt5-devel +Summary: Header files for Avahi's Qt5 bindings +Group: Development/Libraries/C and C++ +Requires: libavahi-devel = %{version} +Requires: libavahi-qt5-%{avahi_qt5_sover} = %{version} + +%description -n libavahi-qt5-devel +Development files for the Qt5 support for Avahi. + +Avahi is an implementation of the DNS Service Discovery and Multicast DNS +specifications for Zeroconf Computing. +%endif + %prep %setup -q -n %{_name}-%{version} cp -a %{SOURCE1} %{SOURCE7} . @@ -426,15 +465,14 @@ sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd cp -a %{SOURCE9} avahi-autoipd/README.SUSE sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down +sed -ie "s/libevent-[0-9\.]*/libevent/" avahi-libevent.pc.in +cp -a %{SOURCE12} service-type-database/build-db translation-update-upstream %patch0 %patch1 -p1 %patch4 %patch19 -p1 %patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 %if !%{build_core} # Replace all .la references from local .la files to installed versions @@ -467,9 +505,11 @@ export PYTHON=%{_bindir}/python3 %if %{build_core} --enable-compat-libdns_sd\ --enable-compat-howl\ + --enable-libevent\ %else --disable-compat-libdns_sd\ --disable-compat-howl\ + --disable-libevent\ %endif %if %{build_glib2} --enable-glib\ @@ -493,6 +533,11 @@ export PYTHON=%{_bindir}/python3 --disable-gtk\ %else --disable-mono\ +%endif +%if %{build_qt5} + --enable-qt5\ +%else + --disable-qt5\ %endif --with-avahi-priv-access-group=avahi\ --with-autoipd-user=avahi-autoipd\ @@ -525,6 +570,9 @@ cd avahi-sharp %make_install cd ../avahi-ui-sharp %endif +%if %{build_qt5} && !%{build_core} +cd avahi-qt +%endif %make_install # do not install sysv init scripts rm -rf %{buildroot}%{_sysconfdir}/init.d/ @@ -647,22 +695,28 @@ getent passwd avahi-autoipd >/dev/null || \ # Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11. find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:avahi-autoipd {} + -%post -n libavahi-client3 -p /sbin/ldconfig -%postun -n libavahi-client3 -p /sbin/ldconfig -%post -n libavahi-common3 -p /sbin/ldconfig -%postun -n libavahi-common3 -p /sbin/ldconfig -%post -n libavahi-core7 -p /sbin/ldconfig -%postun -n libavahi-core7 -p /sbin/ldconfig +%post -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%postun -n libavahi-client%{avahi_client_sover} -p /sbin/ldconfig +%post -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%postun -n libavahi-common%{avahi_common_sover} -p /sbin/ldconfig +%post -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%postun -n libavahi-core%{avahi_core_sover} -p /sbin/ldconfig +%post -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig +%postun -n libavahi-libevent%{avahi_libevent_sover} -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig -%post -n libhowl0 -p /sbin/ldconfig -%postun -n libhowl0 -p /sbin/ldconfig +%post -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig +%postun -n libhowl%{avahi_libhowl_sover} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_sover} -p /sbin/ldconfig -%post -n libavahi-gobject0 -p /sbin/ldconfig -%postun -n libavahi-gobject0 -p /sbin/ldconfig -%post -n libavahi-glib1 -p /sbin/ldconfig -%postun -n libavahi-glib1 -p /sbin/ldconfig +%post -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%postun -n libavahi-gobject%{avahi_gobject_sover} -p /sbin/ldconfig +%post -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%postun -n libavahi-glib%{avahi_glib_sover} -p /sbin/ldconfig +%if %{build_qt5} +%post -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%postun -n libavahi-qt5-%{avahi_qt5_sover} -p /sbin/ldconfig +%endif %post -n python3-avahi-gtk %desktop_database_post @@ -715,21 +769,24 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files lang -f %{name}.lang -%files -n libavahi-client3 +%files -n libavahi-client%{avahi_client_sover} %{_libdir}/libavahi-client*.so.* -%files -n libavahi-common3 +%files -n libavahi-common%{avahi_common_sover} %{_libdir}/libavahi-common*.so.* -%files -n libavahi-core7 +%files -n libavahi-core%{avahi_core_sover} %{_libdir}/libavahi-core*.so.* +%files -n libavahi-libevent%{avahi_libevent_sover} +%{_libdir}/libavahi-libevent*.so.* + %files -n libdns_sd # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: %{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so.* -%files -n libhowl0 +%files -n libhowl%{avahi_libhowl_sover} %{_libdir}/libhowl.so.* %files -n python3-avahi @@ -769,6 +826,7 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %{_includedir}/avahi-client %{_includedir}/avahi-common %{_includedir}/avahi-core +%{_includedir}/avahi-libevent # avahi devel files %{_libdir}/libavahi-client.*a %{_libdir}/libavahi-client*.so @@ -778,8 +836,11 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a # do not remove unless you fix the resulting problems # reference is in libavahi-client.la %{_libdir}/libavahi-common*.*a +%{_libdir}/libavahi-libevent.*a +%{_libdir}/libavahi-libevent*.so %{_libdir}/pkgconfig/avahi-client.pc %{_libdir}/pkgconfig/avahi-core.pc +%{_libdir}/pkgconfig/avahi-libevent.pc %files compat-mDNSResponder-devel %{_includedir}/avahi-compat-libdns_sd @@ -799,10 +860,10 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files -n libavahi-ui-gtk3-%{avahi_gtk3_sover} %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_sover}* -%files -n libavahi-glib1 +%files -n libavahi-glib%{avahi_glib_sover} %{_libdir}/libavahi-glib*.so.* -%files -n libavahi-gobject0 +%files -n libavahi-gobject%{avahi_gobject_sover} %{_libdir}/libavahi-gobject*.so.* %files -n typelib-1_0-Avahi-0_6 @@ -812,7 +873,6 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %files -n python3-avahi-gtk %{_bindir}/avahi-discover %{_datadir}/applications/avahi-discover.desktop -%{python3_sitelib}/avahi_discover %files -n avahi-utils-gtk %{_bindir}/bshell @@ -854,4 +914,15 @@ find %{_localstatedir}/lib/avahi-autoipd -user avahi -exec chown avahi-autoipd:a %{_prefix}/lib/mono/gac/avahi-sharp %endif +%if %{build_qt5} +%files -n libavahi-qt5-%{avahi_qt5_sover} +%{_libdir}/libavahi-qt5.so.* + +%files -n libavahi-qt5-devel +%{_includedir}/avahi-qt5 +%{_libdir}/libavahi-qt5.*a +%{_libdir}/libavahi-qt5.so +%{_libdir}/pkgconfig/avahi-qt5.pc +%endif + %changelog diff --git a/avahi_spec-prepare.sh b/avahi_spec-prepare.sh index 70815b6..6202d0f 100644 --- a/avahi_spec-prepare.sh +++ b/avahi_spec-prepare.sh @@ -3,6 +3,7 @@ # Autobuild doesn't support package names with macros. This script will update versions in package names. ORIG_SPEC=${2%-mono} +ORIG_SPEC=${ORIG_SPEC%-qt5} # Never update -mono file when it is already opened. It will break advanced build scripts: if test "$2" != "$ORIG_SPEC" ; then exit @@ -42,7 +43,22 @@ sed ' perl $1/update_spec.pl $1/$ORIG_SPEC-glib2.spec.new attributes > $1/$ORIG_SPEC-glib2.spec rm $1/$ORIG_SPEC-glib2.spec.new +# Edit file to fit -qt5 build needs: +sed ' + s/spec file for package avahi/spec file for package avahi-qt5/; + s/build_core\ 1/build_core 0/; + s/build_qt5\ 0/build_qt5 1/; + s/^.ame:.*/&-qt5/; + # No more needed. + #s/^..hangelog.*/& qt/; + /^# WARNING: After editing/,/^# to update spec files/d + /^%define[[:space:]]*_name/i \ +# Do not edit this auto generated file! Edit avahi.spec. +' <$1/$ORIG_SPEC.spec >$1/$ORIG_SPEC-qt5.spec.new +perl $1/update_spec.pl $1/$ORIG_SPEC-qt5.spec.new attributes > $1/$ORIG_SPEC-qt5.spec +rm $1/$ORIG_SPEC-qt5.spec.new + # Not wanted for avahi: #cp -a $1/$ORIG_SPEC.changes $1/$ORIG_SPEC-glib2.changes #cp -a $1/$ORIG_SPEC.changes $1/$ORIG_SPEC-mono.changes -#cp -a $1/$ORIG_SPEC.changes $1/$ORIG_SPEC-qt.changes +#cp -a $1/$ORIG_SPEC.changes $1/$ORIG_SPEC-qt5.changes diff --git a/build-db b/build-db new file mode 100644 index 0000000..153f613 --- /dev/null +++ b/build-db @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# -*-python-*- +# This file is part of avahi. +# +# avahi is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# avahi is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with avahi; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +try: + import anydbm as dbm +except ImportError: + import dbm + +import sys + +if len(sys.argv) > 1: + infn = sys.argv[1] +else: + infn = "service-types" + +if len(sys.argv) > 2: + outfn = sys.argv[2] +else: + outfn = infn + ".db" + +db = dbm.open(outfn, "n") + +for ln in open(infn, "r"): + ln = ln.strip(" \r\n\t") + + if ln == "" or ln.startswith("#"): + continue + + t, n = ln.split(":", 1) + + db[t.strip()] = n.strip() + +db.close()