From 1f0b377b182c659bcc6c656faab78c3852bf4f08 Mon Sep 17 00:00:00 2001 From: Serhii Turivnyi Date: Wed, 11 Apr 2018 12:51:53 +0300 Subject: [PATCH 01/70] Add CI tests using the standard test interface --- tests/Basic-sanity-test/Makefile | 64 ++++++++++++++++++++ tests/Basic-sanity-test/PURPOSE | 15 +++++ tests/Basic-sanity-test/named.conf | 11 ++++ tests/Basic-sanity-test/runtest.sh | 96 ++++++++++++++++++++++++++++++ tests/Basic-sanity-test/zonefile | 23 +++++++ tests/tests.yml | 16 +++++ 6 files changed, 225 insertions(+) create mode 100644 tests/Basic-sanity-test/Makefile create mode 100644 tests/Basic-sanity-test/PURPOSE create mode 100644 tests/Basic-sanity-test/named.conf create mode 100755 tests/Basic-sanity-test/runtest.sh create mode 100644 tests/Basic-sanity-test/zonefile create mode 100644 tests/tests.yml diff --git a/tests/Basic-sanity-test/Makefile b/tests/Basic-sanity-test/Makefile new file mode 100644 index 0000000..ce59f5b --- /dev/null +++ b/tests/Basic-sanity-test/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/avahi/Sanity/Basic-sanity-test +# Description: Tests basic functionality of avahi. +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program 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 General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/avahi/Sanity/Basic-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf zonefile + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -e runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Tests basic functionality of avahi." >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "RunFor: avahi" >> $(METADATA) + @echo "Requires: avahi avahi-tools bind bind-chroot bind-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RedHatEnterpriseLinux3 -RedHatEnterpriseLinux4" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Basic-sanity-test/PURPOSE b/tests/Basic-sanity-test/PURPOSE new file mode 100644 index 0000000..1486bec --- /dev/null +++ b/tests/Basic-sanity-test/PURPOSE @@ -0,0 +1,15 @@ +PURPOSE of /CoreOS/avahi/Sanity/Basic-sanity-test +Description: Tests basic functionality of avahi. +Author: Martin Cermak + +My objective was to write a very basic sanity test for avahi. +As I'm the avahi newbie, I browsed avahi.org, experimented +a little with RHEL avahi packages and pinged Lennart, which +did not respond. + +My result is a simple test for the avahi domain name resolver. +It requires the avahi-daemon running. As the RHTS/Beaker is/will +shortly be a closed system without the possibility to reach the +outside network, this test contains its own nameserver. + + diff --git a/tests/Basic-sanity-test/named.conf b/tests/Basic-sanity-test/named.conf new file mode 100644 index 0000000..e477af9 --- /dev/null +++ b/tests/Basic-sanity-test/named.conf @@ -0,0 +1,11 @@ +options { + directory "/var/named"; + allow-query { any; }; +}; + +zone "" IN { + type master; + file ".zone"; + allow-update { none; }; +}; + diff --git a/tests/Basic-sanity-test/runtest.sh b/tests/Basic-sanity-test/runtest.sh new file mode 100755 index 0000000..b027d39 --- /dev/null +++ b/tests/Basic-sanity-test/runtest.sh @@ -0,0 +1,96 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/avahi/Sanity/Basic-sanity-test +# Description: Tests basic functionality of avahi. +# Author: Martin Cermak +# Author: Tomas Dolezal - rhel7 updates +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program 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 General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include rhts environment +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh + +TEMPSTR=$(date +%c%N | md5sum | awk '{print $1}' | cut -c -8) +ORIGPWD=$(pwd) + +IP1='127.0.0.1' +IP2='::1' + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm 'avahi' + rlAssertRpm 'avahi-tools' + + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + + ROOTDIR="" #using non-chroot + rlFileBackup /etc/named.conf /etc/resolv.conf + rlFileBackup --clean /var/named/ + cat $ORIGPWD/named.conf > /etc/named.conf + + rlRun "TDOMAIN=$TEMPSTR.cz" + rlRun "TZONEFILE=$ROOTDIR/var/named/$TDOMAIN.zone" + + # set up /etc/named.conf + rlRun "sed -i \"s//$TDOMAIN/g\" /etc/named.conf" + + # set up zonefile + rlRun "cp $ORIGPWD/zonefile $TZONEFILE" + rlRun "chmod a+r $TZONEFILE" + rlRun "sed -i \"s//$TDOMAIN/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP1/g\" $TZONEFILE" + rlRun "sed -i \"s//$IP2/g\" $TZONEFILE" + rlRun "sed -i \"s//$(date +%N)/g\" $TZONEFILE" + + rlServiceStart named #using non-chroot + + # set default resolver + rlRun "echo nameserver 127.0.0.1 > /etc/resolv.conf" + rlPhaseEnd + + rlPhaseStartTest + # check bind + rlRun "dig @localhost server1.$TDOMAIN +short | grep $IP1" + rlRun "dig AAAA @localhost server2.$TDOMAIN +short | grep $IP2" + + # turn on avahi or restart it with new resolv.conf + rlServiceStart "avahi-daemon" + + # the test itself... + rlRun "avahi-resolve -4n server1.$TDOMAIN | grep '127.0.0.1'" 0 "Test the IPv4 avahi DN resolver." + rlRun "avahi-resolve -6n server2.$TDOMAIN | grep '::1'" 0 "Test the IPv6 avahi DN resolver." + + rlPhaseEnd + + rlPhaseStartCleanup + rlFileRestore + rlServiceStart avahi-daemon + rlServiceRestore named avahi-daemon + + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd diff --git a/tests/Basic-sanity-test/zonefile b/tests/Basic-sanity-test/zonefile new file mode 100644 index 0000000..46b8421 --- /dev/null +++ b/tests/Basic-sanity-test/zonefile @@ -0,0 +1,23 @@ +$ORIGIN . +$TTL 86400 +@ IN SOA dns1.. hostmaster.. ( + ; serial + 21600 ; refresh after 6 hours + 3600 ; retry after 1 hour + 604800 ; expire after 1 week + 86400 ) ; minimum TTL of 1 day + + IN NS dns1.. + IN NS dns2.. + + IN MX 10 mail.. + IN MX 20 mail2.. + + IN A + +server1 IN A +server2 IN AAAA + +dns1 IN A +dns2 IN A + diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..09b2613 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +--- + +# Tests that run in classic context +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - Basic-sanity-test + required_packages: + - avahi + - avahi-tools + - bind + - bind-chroot + - bind-utils From 034b3d45569ee0c1d88c8be214206961699235a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 19 Jun 2018 10:40:04 +0200 Subject: [PATCH 02/70] Rebuilt for Python 3.7 --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 8a71b0d..652f861 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -698,6 +698,9 @@ exit 0 %changelog +* Tue Jun 19 2018 Miro Hrončok - 0.7-13 +- Rebuilt for Python 3.7 + * Thu Apr 05 2018 Rex Dieter - 0.7-12 - use %%make_build %%ldconfig_scriptlets %%license - %%build: --enable-shared=yes --enable-static=no --disable-silent-rules From a52f80289e128ce81f18183b3f325d3bc3768368 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 12 Jul 2018 20:49:50 +0000 Subject: [PATCH 03/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 652f861..48aec93 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -698,6 +698,9 @@ exit 0 %changelog +* Thu Jul 12 2018 Fedora Release Engineering - 0.7-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Tue Jun 19 2018 Miro Hrončok - 0.7-13 - Rebuilt for Python 3.7 From fed0baaebaf2980f743994d13afdb29f65a244c8 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 24 Jul 2018 09:21:08 +0200 Subject: [PATCH 04/70] Requires: tigervnc Tigervnc removed old obsoleted provides --- avahi.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 48aec93..79d7306 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -117,7 +117,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} Requires: python2-avahi = %{version}-%{release} -Requires: vnc +Requires: tigervnc Requires: openssh-clients Requires: pygtk2 Requires: pygtk2-libglade @@ -698,6 +698,10 @@ exit 0 %changelog +* Tue Jul 24 2018 Jan Grulich - 0.7-15 +- Requires: tigervnc + Tigervnc removed old obsoleted provides + * Thu Jul 12 2018 Fedora Release Engineering - 0.7-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From b6c8a5aff16e7ce069448e8e7025f3b26e16c215 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 24 Jul 2018 09:21:08 +0200 Subject: [PATCH 05/70] Requires: tigervnc Tigervnc removed old obsoleted provides --- avahi.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 8a71b0d..1f724de 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -117,7 +117,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} Requires: python2-avahi = %{version}-%{release} -Requires: vnc +Requires: tigervnc Requires: openssh-clients Requires: pygtk2 Requires: pygtk2-libglade @@ -698,6 +698,10 @@ exit 0 %changelog +* Tue Jul 24 2018 Jan Grulich - 0.7-13 +- Requires: tigervnc + Tigervnc removed old obsoleted provides + * Thu Apr 05 2018 Rex Dieter - 0.7-12 - use %%make_build %%ldconfig_scriptlets %%license - %%build: --enable-shared=yes --enable-static=no --disable-silent-rules From 63dfef7216b1d18461aec243739441209c42f3bd Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 30 Jul 2018 15:39:38 -0700 Subject: [PATCH 06/70] Update python3 sed hack to avoid '/usr/bin/python32' dep In F28 and earlier /usr/bin/python exists during the build, and the build process decides PYTHON is /usr/bin/python, so this sed command works. In F29+ /usr/bin/python does not exist during the build, so the build process decides /usr/bin/python2 is PYTHON, and when we do 's!/usr/bin/python!/usr/bin/python3!', we wind up with /usr/bin/python32...which is not what we wanted. So, let's fix that. --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 79d7306..5d1a869 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -439,7 +439,7 @@ ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/ mkdir -p %{buildroot}%{python3_sitelib}/avahi/ cp -r %{buildroot}%{python2_sitelib}/avahi/* %{buildroot}%{python3_sitelib}/avahi/ rm -fv %{buildroot}%{buildroot}%{python3_sitelib}/avahi/*.py{c,o} -sed -i 's!/usr/bin/python!/usr/bin/python3!' %{buildroot}%{python3_sitelib}/avahi/ServiceTypeDatabase.py +sed -i 's!/usr/bin/python2!/usr/bin/python3!' %{buildroot}%{python3_sitelib}/avahi/ServiceTypeDatabase.py rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-daemon rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd @@ -698,6 +698,9 @@ exit 0 %changelog +* Mon Jul 30 2018 Adam Williamson - 0.7-16 +- Update python3 sed hack to avoid '/usr/bin/python32' dep + * Tue Jul 24 2018 Jan Grulich - 0.7-15 - Requires: tigervnc Tigervnc removed old obsoleted provides From 7a6630006b0204424d3bb03ad2c8b4fffd7c9475 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 14:14:38 +0000 Subject: [PATCH 07/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 5d1a869..3ec9c35 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -698,6 +698,9 @@ exit 0 %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 0.7-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jul 30 2018 Adam Williamson - 0.7-16 - Update python3 sed hack to avoid '/usr/bin/python32' dep From 21c3d90854d5ae56de026fda4c3638e079e3a006 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 4 Feb 2019 09:28:22 +0100 Subject: [PATCH 08/70] Update requires for pygobject3 -> python2-gobject rename --- avahi.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/avahi.spec b/avahi.spec index 3ec9c35..d4ed185 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -123,8 +123,7 @@ Requires: pygtk2 Requires: pygtk2-libglade Requires: gdbm Requires: %{python2_dbus} -# aka python2-gobject-base -Requires: pygobject3-base +Requires: python2-gobject-base %description ui-tools Graphical user interface tools that use Avahi to browse for mDNS services. @@ -698,6 +697,9 @@ exit 0 %changelog +* Mon Feb 04 2019 Kalev Lember - 0.7-18 +- Update requires for pygobject3 -> python2-gobject rename + * Thu Jan 31 2019 Fedora Release Engineering - 0.7-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From ae12454f639517a0bea826303e6edf33fa458084 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Fri, 22 Feb 2019 11:05:33 +0100 Subject: [PATCH 09/70] Add support for advertising services on the local machine only This patch is not merged upstream yet. However, Ubuntu is already shipping it. Let's merge it to Fedora too so ippusbxd (which depends on this functionality) can get packaged to Fedora. https://github.com/lathiat/avahi/issues/125 https://github.com/lathiat/avahi/pull/161 --- ...dvertise-local-services-localhost-on.patch | 86 +++++++++++++++++++ avahi.spec | 6 +- 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 0001-Add-support-to-advertise-local-services-localhost-on.patch diff --git a/0001-Add-support-to-advertise-local-services-localhost-on.patch b/0001-Add-support-to-advertise-local-services-localhost-on.patch new file mode 100644 index 0000000..3563d18 --- /dev/null +++ b/0001-Add-support-to-advertise-local-services-localhost-on.patch @@ -0,0 +1,86 @@ +From 9283ba29b23dd6dc7faaf138188fd02ab38b30e8 Mon Sep 17 00:00:00 2001 +From: Till Kamppeter +Date: Fri, 15 Dec 2017 10:16:28 -0200 +Subject: [PATCH] Add support to advertise local services ("localhost") on the + local machine only + +This is the patch attached to Issue #125 (on Dec 6, 2017) and also +shown in the readme.md of ippusbxd +(https://github.com/OpenPrinting/ippusbxd). + +It makes also services on the loopback ("lo") interface being +advertised and these records use "localhost" instead of the network +host name of the machine as server host name. This way clients, like +for example CUPS or cups-browsed will find these local services and be +able to work with them as they were network services. +--- + avahi-core/iface-linux.c | 4 ++-- + avahi-core/iface-pfroute.c | 8 ++++---- + avahi-core/resolve-service.c | 3 ++- + 3 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c +index c6c5f77..e116c7b 100644 +--- a/avahi-core/iface-linux.c ++++ b/avahi-core/iface-linux.c +@@ -104,8 +104,8 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat + hw->flags_ok = + (ifinfomsg->ifi_flags & IFF_UP) && + (!m->server->config.use_iff_running || (ifinfomsg->ifi_flags & IFF_RUNNING)) && +- !(ifinfomsg->ifi_flags & IFF_LOOPBACK) && +- (ifinfomsg->ifi_flags & IFF_MULTICAST) && ++ ((ifinfomsg->ifi_flags & IFF_LOOPBACK) || ++ (ifinfomsg->ifi_flags & IFF_MULTICAST)) && + (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT)); + + /* Handle interface attributes */ +diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c +index 9a2e953..27c3443 100644 +--- a/avahi-core/iface-pfroute.c ++++ b/avahi-core/iface-pfroute.c +@@ -80,8 +80,8 @@ static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m) + hw->flags_ok = + (ifm->ifm_flags & IFF_UP) && + (!m->server->config.use_iff_running || (ifm->ifm_flags & IFF_RUNNING)) && +- !(ifm->ifm_flags & IFF_LOOPBACK) && +- (ifm->ifm_flags & IFF_MULTICAST) && ++ ((ifm->ifm_flags & IFF_LOOPBACK) || ++ (ifm->ifm_flags & IFF_MULTICAST)) && + (m->server->config.allow_point_to_point || !(ifm->ifm_flags & IFF_POINTOPOINT)); + + avahi_free(hw->name); +@@ -427,8 +427,8 @@ static void if_add_interface(struct lifreq *lifreq, AvahiInterfaceMonitor *m, in + hw->flags_ok = + (flags & IFF_UP) && + (!m->server->config.use_iff_running || (flags & IFF_RUNNING)) && +- !(flags & IFF_LOOPBACK) && +- (flags & IFF_MULTICAST) && ++ ((flags & IFF_LOOPBACK) || ++ (flags & IFF_MULTICAST)) && + (m->server->config.allow_point_to_point || !(flags & IFF_POINTOPOINT)); + hw->name = avahi_strdup(lifreq->lifr_name); + hw->mtu = mtu; +diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c +index 3377a50..3311b6b 100644 +--- a/avahi-core/resolve-service.c ++++ b/avahi-core/resolve-service.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -129,7 +130,7 @@ static void finish(AvahiSServiceResolver *r, AvahiResolverEvent event) { + r->service_name, + r->service_type, + r->domain_name, +- r->srv_record->data.srv.name, ++ (r->interface == if_nametoindex("lo")) ? "localhost" : r->srv_record->data.srv.name, + r->address_record ? &a : NULL, + r->srv_record->data.srv.port, + r->txt_record ? r->txt_record->data.txt.string_list : NULL, +-- +2.17.2 + diff --git a/avahi.spec b/avahi.spec index d4ed185..4e10ef4 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -92,6 +92,7 @@ Source0: https://github.com/lathiat/avahi/releases/download/v%{version} ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch +Patch101: 0001-Add-support-to-advertise-local-services-localhost-on.patch %description Avahi is a system which facilitates service discovery on @@ -697,6 +698,9 @@ exit 0 %changelog +* Fri Feb 22 2019 Michal Sekletár - 0.7-19 +- add support for advertising services on the local machine only (i.e. on loopback) + * Mon Feb 04 2019 Kalev Lember - 0.7-18 - Update requires for pygobject3 -> python2-gobject rename From 7c9c0f2d3859d6e38056d961574ad10a23b07b4c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 18:52:14 +0000 Subject: [PATCH 10/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 4e10ef4..3bded30 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -698,6 +698,9 @@ exit 0 %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 0.7-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri Feb 22 2019 Michal Sekletár - 0.7-19 - add support for advertising services on the local machine only (i.e. on loopback) From a311802c0418bdf22579315ff6c597e8fe148131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 10:10:21 +0200 Subject: [PATCH 11/70] Rebuilt for Python 3.8 --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 3bded30..a0ce70e 100644 --- a/avahi.spec +++ b/avahi.spec @@ -26,7 +26,7 @@ Name: avahi Version: 0.7 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -698,6 +698,9 @@ exit 0 %changelog +* Mon Aug 19 2019 Miro Hrončok - 0.7-21 +- Rebuilt for Python 3.8 + * Wed Jul 24 2019 Fedora Release Engineering - 0.7-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 8d87c1f62bcb77dd5923805e2e62e4a2091788d1 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 19 Sep 2019 17:07:00 -0500 Subject: [PATCH 12/70] drop python bindings/support (includes -ui-tools that use the bindings) on f31+ (#1751484) --- avahi.spec | 65 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/avahi.spec b/avahi.spec index a0ce70e..d1da670 100644 --- a/avahi.spec +++ b/avahi.spec @@ -3,11 +3,17 @@ %{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1} %{?!WITH_QT3: %global WITH_QT3 1} %{?!WITH_QT4: %global WITH_QT4 1} +%{?!WITH_PYTHON: %global WITH_PYTHON 1} %ifnarch %{mono_arches} %define WITH_MONO 0 %endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1751484 +%if 0%{?fedora} > 30 +%global WITH_PYTHON 0 +%endif + %if 0%{?rhel} %define WITH_MONO 0 %if 0%{?rhel} >= 6 @@ -42,15 +48,6 @@ BuildRequires: automake BuildRequires: libtool BuildRequires: dbus-devel >= 0.90 BuildRequires: dbus-glib-devel >= 0.70 -%if 0%{?fedora} > 27 -%global python2_dbus python2-dbus -%global python2_libxml2 python2-libxml2 -%else -%global python2_dbus dbus-python -%global python2_libxml2 libxml2-python -%endif -BuildRequires: %{python2_dbus} -BuildRequires: %{python2_libxml2} BuildRequires: desktop-file-utils BuildRequires: gtk2-devel BuildRequires: gtk3-devel >= 2.99.0 @@ -65,8 +62,24 @@ BuildRequires: libdaemon-devel >= 0.11 BuildRequires: glib2-devel BuildRequires: libcap-devel BuildRequires: expat-devel +%if %{WITH_PYTHON} +%if 0%{?fedora} > 27 +%global python2_dbus python2-dbus +%global python2_libxml2 python2-libxml2 +%else +%global python2_dbus dbus-python +%global python2_libxml2 libxml2-python +%endif +BuildRequires: %{python2_dbus} +BuildRequires: %{python2_libxml2} +# really only need interpreter + rpm-macros -- rex BuildRequires: python2-devel BuildRequires: python3-devel +%else +Obsoletes: python2-avahi < %{version}-%{release} +Obsoletes: python3-avahi < %{version}-%{release} +Obsoletes: avahi-ui-tools < %{version}-%{release} +%endif BuildRequires: gdbm-devel BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pygtk2 @@ -117,14 +130,16 @@ Requires: %{name} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} -Requires: python2-avahi = %{version}-%{release} Requires: tigervnc Requires: openssh-clients Requires: pygtk2 Requires: pygtk2-libglade Requires: gdbm +%if %{WITH_PYTHON} +Requires: python2-avahi = %{version}-%{release} Requires: %{python2_dbus} Requires: python2-gobject-base +%endif %description ui-tools Graphical user interface tools that use Avahi to browse for mDNS services. @@ -340,6 +355,7 @@ avahi-dnsconfd connects to a running avahi-daemon and runs the script local LAN. This is useful for configuring unicast DNS servers in a DHCP-like fashion with mDNS. +%if %{WITH_PYTHON} %package -n python2-avahi Summary: Python2 Avahi bindings Obsoletes: python-avahi < 0.7 @@ -357,6 +373,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n python3-avahi %{summary}. +%endif %prep @@ -384,6 +401,9 @@ NOCONFIGURE=1 ./autogen.sh --enable-shared=yes \ --enable-static=no \ --disable-silent-rules \ +%if ! %{WITH_PYTHON} + --disable-python \ +%endif %if %{WITH_COMPAT_DNSSD} --enable-compat-libdns_sd \ %endif @@ -435,29 +455,37 @@ ln -s avahi-compat-libdns_sd.pc %{buildroot}/%{_libdir}/pkgconfig/libdns_sd.pc ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/ %endif +%if %{WITH_PYTHON} # Add python3 support mkdir -p %{buildroot}%{python3_sitelib}/avahi/ cp -r %{buildroot}%{python2_sitelib}/avahi/* %{buildroot}%{python3_sitelib}/avahi/ rm -fv %{buildroot}%{buildroot}%{python3_sitelib}/avahi/*.py{c,o} sed -i 's!/usr/bin/python2!/usr/bin/python3!' %{buildroot}%{python3_sitelib}/avahi/ServiceTypeDatabase.py -rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-daemon -rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd - # avoid empty GenericName keys from .desktop files for i in %{buildroot}%{_datadir}/applications/*.desktop ; do if [ -n "$(grep '^GenericName=$' $i)" ]; then desktop-file-edit --copy-name-to-generic-name $i fi done +%else +# unpackaged files +rm -fv %{buildroot}%{_datadir}/applications/{bssh,bvnc}.desktop +rm -fv %{buildroot}%{_datadir}/avahi/interfaces/avahi-discover.ui +%endif + +rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-daemon +rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd %find_lang %{name} %check +%if %{WITH_PYTHON} for i in %{buildroot}%{_datadir}/applications/*.desktop ; do desktop-file-validate $i done +%endif %pre @@ -534,7 +562,9 @@ exit 0 %dir %{_datadir}/avahi %{_datadir}/avahi/*.dtd %dir %{_libdir}/avahi +%if %{WITH_PYTHON} %{_libdir}/avahi/service-types.db +%endif %{_mandir}/man5/* %{_mandir}/man8/avahi-daemon.* %{_unitdir}/avahi-daemon.service @@ -558,6 +588,7 @@ exit 0 %files tools %{_bindir}/* %{_mandir}/man1/* +%if %{WITH_PYTHON} %exclude %{_bindir}/b* %exclude %{_bindir}/avahi-discover* %exclude %{_bindir}/avahi-bookmarks @@ -577,6 +608,7 @@ exit 0 %{_datadir}/applications/avahi-discover.desktop %{_datadir}/avahi/interfaces/ %{python2_sitelib}/avahi_discover/ +%endif %files devel %{_libdir}/libavahi-common.so @@ -688,16 +720,19 @@ exit 0 %{_libdir}/pkgconfig/libdns_sd.pc %endif +%if %{WITH_PYTHON} %files -n python2-avahi -# These are .py files only, so they don't go in lib64 %{python2_sitelib}/avahi/ %files -n python3-avahi -# These are .py files only, so they don't go in lib64 %{python3_sitelib}/avahi/ +%endif %changelog +* Thu Sep 19 2019 Rex Dieter - 0.7-21 +- drop python bindings/support (includes -ui-tools that use the bindings) on f31+ (#1751484) + * Mon Aug 19 2019 Miro Hrončok - 0.7-21 - Rebuilt for Python 3.8 From 9ec12380481c986b80f610a8cac45ca2fc088eb6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 19 Sep 2019 17:07:54 -0500 Subject: [PATCH 13/70] Release++ --- avahi.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index d1da670..5da87ca 100644 --- a/avahi.spec +++ b/avahi.spec @@ -32,7 +32,7 @@ Name: avahi Version: 0.7 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -730,7 +730,7 @@ exit 0 %changelog -* Thu Sep 19 2019 Rex Dieter - 0.7-21 +* Thu Sep 19 2019 Rex Dieter - 0.7-22 - drop python bindings/support (includes -ui-tools that use the bindings) on f31+ (#1751484) * Mon Aug 19 2019 Miro Hrončok - 0.7-21 From 09c496e9c02b9823ad891f5ab1960db2d1e08a94 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 12:32:09 +0000 Subject: [PATCH 14/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 5da87ca..32abd6a 100644 --- a/avahi.spec +++ b/avahi.spec @@ -32,7 +32,7 @@ Name: avahi Version: 0.7 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -730,6 +730,9 @@ exit 0 %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 0.7-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Sep 19 2019 Rex Dieter - 0.7-22 - drop python bindings/support (includes -ui-tools that use the bindings) on f31+ (#1751484) From cbce6b24de7eae9c736ee9c55fbf94d9f8247b8a Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 20 Feb 2020 13:05:31 +0100 Subject: [PATCH 15/70] Don't BuildRequire pygtk2 if building without Python --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 32abd6a..f37a264 100644 --- a/avahi.spec +++ b/avahi.spec @@ -32,7 +32,7 @@ Name: avahi Version: 0.7 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -79,10 +79,10 @@ BuildRequires: python3-devel Obsoletes: python2-avahi < %{version}-%{release} Obsoletes: python3-avahi < %{version}-%{release} Obsoletes: avahi-ui-tools < %{version}-%{release} +BuildRequires: pygtk2 %endif BuildRequires: gdbm-devel BuildRequires: pkgconfig(pygobject-3.0) -BuildRequires: pygtk2 BuildRequires: intltool BuildRequires: perl-XML-Parser BuildRequires: xmltoman @@ -730,6 +730,9 @@ exit 0 %changelog +* Thu Feb 20 2020 Petr Viktorin - 0.7-24 +- Don't BuildRequire pygtk2 if building without Python + * Tue Jan 28 2020 Fedora Release Engineering - 0.7-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From eb82c89c947c7bc94b88ee38efe800e92825afcc Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 22 Mar 2020 18:44:44 +0100 Subject: [PATCH 16/70] Update to release 0.8 - Dropped the patch for the functionality equivalent to what has been done upstream in avahi.git commit 2fd76baeb829 ("Listen on loopback interfaces"). - Added Qt5 - Adjusted for upstream flipping QT3 and QT4 to default off - Packaged the libevent library --- .gitignore | 1 + ...dvertise-local-services-localhost-on.patch | 86 ------------------- avahi.spec | 61 +++++++++++-- sources | 2 +- 4 files changed, 56 insertions(+), 94 deletions(-) delete mode 100644 0001-Add-support-to-advertise-local-services-localhost-on.patch diff --git a/.gitignore b/.gitignore index c8cf73b..004b4bb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /avahi-0.6.31.tar.gz /avahi-0.6.32.tar.gz /avahi-0.7.tar.gz +/avahi-0.8.tar.gz diff --git a/0001-Add-support-to-advertise-local-services-localhost-on.patch b/0001-Add-support-to-advertise-local-services-localhost-on.patch deleted file mode 100644 index 3563d18..0000000 --- a/0001-Add-support-to-advertise-local-services-localhost-on.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 9283ba29b23dd6dc7faaf138188fd02ab38b30e8 Mon Sep 17 00:00:00 2001 -From: Till Kamppeter -Date: Fri, 15 Dec 2017 10:16:28 -0200 -Subject: [PATCH] Add support to advertise local services ("localhost") on the - local machine only - -This is the patch attached to Issue #125 (on Dec 6, 2017) and also -shown in the readme.md of ippusbxd -(https://github.com/OpenPrinting/ippusbxd). - -It makes also services on the loopback ("lo") interface being -advertised and these records use "localhost" instead of the network -host name of the machine as server host name. This way clients, like -for example CUPS or cups-browsed will find these local services and be -able to work with them as they were network services. ---- - avahi-core/iface-linux.c | 4 ++-- - avahi-core/iface-pfroute.c | 8 ++++---- - avahi-core/resolve-service.c | 3 ++- - 3 files changed, 8 insertions(+), 7 deletions(-) - -diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c -index c6c5f77..e116c7b 100644 ---- a/avahi-core/iface-linux.c -+++ b/avahi-core/iface-linux.c -@@ -104,8 +104,8 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat - hw->flags_ok = - (ifinfomsg->ifi_flags & IFF_UP) && - (!m->server->config.use_iff_running || (ifinfomsg->ifi_flags & IFF_RUNNING)) && -- !(ifinfomsg->ifi_flags & IFF_LOOPBACK) && -- (ifinfomsg->ifi_flags & IFF_MULTICAST) && -+ ((ifinfomsg->ifi_flags & IFF_LOOPBACK) || -+ (ifinfomsg->ifi_flags & IFF_MULTICAST)) && - (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT)); - - /* Handle interface attributes */ -diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c -index 9a2e953..27c3443 100644 ---- a/avahi-core/iface-pfroute.c -+++ b/avahi-core/iface-pfroute.c -@@ -80,8 +80,8 @@ static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m) - hw->flags_ok = - (ifm->ifm_flags & IFF_UP) && - (!m->server->config.use_iff_running || (ifm->ifm_flags & IFF_RUNNING)) && -- !(ifm->ifm_flags & IFF_LOOPBACK) && -- (ifm->ifm_flags & IFF_MULTICAST) && -+ ((ifm->ifm_flags & IFF_LOOPBACK) || -+ (ifm->ifm_flags & IFF_MULTICAST)) && - (m->server->config.allow_point_to_point || !(ifm->ifm_flags & IFF_POINTOPOINT)); - - avahi_free(hw->name); -@@ -427,8 +427,8 @@ static void if_add_interface(struct lifreq *lifreq, AvahiInterfaceMonitor *m, in - hw->flags_ok = - (flags & IFF_UP) && - (!m->server->config.use_iff_running || (flags & IFF_RUNNING)) && -- !(flags & IFF_LOOPBACK) && -- (flags & IFF_MULTICAST) && -+ ((flags & IFF_LOOPBACK) || -+ (flags & IFF_MULTICAST)) && - (m->server->config.allow_point_to_point || !(flags & IFF_POINTOPOINT)); - hw->name = avahi_strdup(lifreq->lifr_name); - hw->mtu = mtu; -diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c -index 3377a50..3311b6b 100644 ---- a/avahi-core/resolve-service.c -+++ b/avahi-core/resolve-service.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -129,7 +130,7 @@ static void finish(AvahiSServiceResolver *r, AvahiResolverEvent event) { - r->service_name, - r->service_type, - r->domain_name, -- r->srv_record->data.srv.name, -+ (r->interface == if_nametoindex("lo")) ? "localhost" : r->srv_record->data.srv.name, - r->address_record ? &a : NULL, - r->srv_record->data.srv.port, - r->txt_record ? r->txt_record->data.txt.string_list : NULL, --- -2.17.2 - diff --git a/avahi.spec b/avahi.spec index f37a264..f0ded55 100644 --- a/avahi.spec +++ b/avahi.spec @@ -3,6 +3,7 @@ %{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1} %{?!WITH_QT3: %global WITH_QT3 1} %{?!WITH_QT4: %global WITH_QT4 1} +%{?!WITH_QT5: %global WITH_QT5 1} %{?!WITH_PYTHON: %global WITH_PYTHON 1} %ifnarch %{mono_arches} @@ -18,6 +19,7 @@ %define WITH_MONO 0 %if 0%{?rhel} >= 6 %define WITH_QT4 0 + %define WITH_QT5 0 %endif %if 0%{?rhel} > 7 %define WITH_QT3 0 @@ -31,8 +33,8 @@ %global _changelog_trimtime %(date +%s -d "1 year ago") Name: avahi -Version: 0.7 -Release: 24%{?dist} +Version: 0.8 +Release: 1%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -58,6 +60,9 @@ BuildRequires: qt3-devel %if %{WITH_QT4} BuildRequires: qt4-devel %endif +%if %{WITH_QT5} +BuildRequires: qt5-qtbase-devel +%endif BuildRequires: libdaemon-devel >= 0.11 BuildRequires: glib2-devel BuildRequires: libcap-devel @@ -83,6 +88,7 @@ BuildRequires: pygtk2 %endif BuildRequires: gdbm-devel BuildRequires: pkgconfig(pygobject-3.0) +BuildRequires: pkgconfig(libevent) >= 2.0.21 BuildRequires: intltool BuildRequires: perl-XML-Parser BuildRequires: xmltoman @@ -93,6 +99,7 @@ BuildRequires: monodoc-devel BuildRequires: systemd %{?systemd_requires} BuildRequires: gcc +BuildRequires: gcc-c++ %if 0%{?beta:1} Source0: https://github.com/lathiat/avahi/archive/%{version}-%{beta}.tar.gz#/%{name}-%{version}-%{beta}.tar.gz @@ -105,7 +112,6 @@ Source0: https://github.com/lathiat/avahi/releases/download/v%{version} ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch -Patch101: 0001-Add-support-to-advertise-local-services-localhost-on.patch %description Avahi is a system which facilitates service discovery on @@ -244,6 +250,24 @@ Th avahi-qt4-devel package contains the header files and libraries necessary for developing programs using avahi with Qt4. %endif +%if %{WITH_QT5} +%package qt5 +Summary: Qt5 libraries for avahi +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description qt5 +Libraries for easy use of avahi from Qt5 applications. + +%package qt5-devel +Summary: Libraries and header files for avahi Qt5 development +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-qt5%{?_isa} = %{version}-%{release} + +%description qt5-devel +Th avahi-qt5-devel package contains the header files and libraries +necessary for developing programs using avahi with Qt5. +%endif + %if %{WITH_MONO} %package sharp Summary: Mono language bindings for avahi mono development @@ -401,6 +425,7 @@ NOCONFIGURE=1 ./autogen.sh --enable-shared=yes \ --enable-static=no \ --disable-silent-rules \ + --enable-gtk \ %if ! %{WITH_PYTHON} --disable-python \ %endif @@ -410,11 +435,14 @@ NOCONFIGURE=1 ./autogen.sh %if %{WITH_COMPAT_HOWL} --enable-compat-howl \ %endif -%if ! %{WITH_QT3} - --disable-qt3 \ +%if %{WITH_QT3} + --enable-qt3 \ %endif -%if ! %{WITH_QT4} - --disable-qt4 \ +%if %{WITH_QT4} + --enable-qt4 \ +%endif +%if ! %{WITH_QT5} + --disable-qt5 \ %endif %if ! %{WITH_MONO} --disable-mono \ @@ -614,17 +642,21 @@ exit 0 %{_libdir}/libavahi-common.so %{_libdir}/libavahi-core.so %{_libdir}/libavahi-client.so +%{_libdir}/libavahi-libevent.so %{_includedir}/avahi-client %{_includedir}/avahi-common %{_includedir}/avahi-core +%{_includedir}/avahi-libevent %{_libdir}/pkgconfig/avahi-core.pc %{_libdir}/pkgconfig/avahi-client.pc +%{_libdir}/pkgconfig/avahi-libevent.pc %files libs %doc README %license LICENSE %{_libdir}/libavahi-common.so.* %{_libdir}/libavahi-client.so.* +%{_libdir}/libavahi-libevent.so.* %files glib %{_libdir}/libavahi-glib.so.* @@ -683,6 +715,18 @@ exit 0 %{_libdir}/pkgconfig/avahi-qt4.pc %endif +%if %{WITH_QT5} +%ldconfig_scriptlets qt5 + +%files qt5 +%{_libdir}/libavahi-qt5.so.* + +%files qt5-devel +%{_libdir}/libavahi-qt5.so +%{_includedir}/avahi-qt5/ +%{_libdir}/pkgconfig/avahi-qt5.pc +%endif + %if %{WITH_MONO} %files sharp %{_prefix}/lib/mono/avahi-sharp @@ -730,6 +774,9 @@ exit 0 %changelog +* Sun Mar 22 2020 Lubomir Rintel - 0.8-1 +- Update to version 0.8 + * Thu Feb 20 2020 Petr Viktorin - 0.7-24 - Don't BuildRequire pygtk2 if building without Python diff --git a/sources b/sources index 0e10563..1f07284 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (avahi-0.7.tar.gz) = bae5a1e9204aca90b90e7fd223d19e809e3514d03ba5fa2da1e55bf1d72d3d3b98567f357900c36393613dc17dc98e15ff3ebf0f226f2f6b9766e592452a6ce7 +SHA512 (avahi-0.8.tar.gz) = c6ba76feb6e92f70289f94b3bf12e5f5c66c11628ce0aeb3cadfb72c13a5d1a9bd56d71bdf3072627a76cd103b9b056d9131aa49ffe11fa334c24ab3b596c7de From 29acccc4aa6e2640c971a9ed6eaf0e58d5093a18 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 22 Mar 2020 19:48:28 -0500 Subject: [PATCH 17/70] pull in some upstream fixes --- ...ervice-Drop-Also-avahi-daemon.socket.patch | 25 +++++++++ 0007-man-add-missing-bshell.1-symlink.patch | 35 +++++++++++++ ...ver-1-bssh-1-and-bvnc-1-also-for-GTK.patch | 52 +++++++++++++++++++ 0009-fix-requires-in-pc-file.patch | 24 +++++++++ ...testring-decoding-for-proper-display.patch | 32 ++++++++++++ ..._consume_uint32-fix-potential-undefi.patch | 33 ++++++++++++ avahi.spec | 11 +++- 7 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch create mode 100644 0007-man-add-missing-bshell.1-symlink.patch create mode 100644 0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch create mode 100644 0009-fix-requires-in-pc-file.patch create mode 100644 0010-fix-bytestring-decoding-for-proper-display.patch create mode 100644 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch diff --git a/0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch b/0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch new file mode 100644 index 0000000..d736890 --- /dev/null +++ b/0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch @@ -0,0 +1,25 @@ +From 9c3a314856affb288f701d2d3ee23278fc98eaee Mon Sep 17 00:00:00 2001 +From: Steve Langasek +Date: Tue, 18 Feb 2020 15:43:19 +0800 +Subject: [PATCH 06/11] avahi-dnsconfd.service: Drop "Also=avahi-daemon.socket" + +Also=avahi-daemon.socket' means that 'systemctl disable avahi-dnsconfd' +ill also disable avahi-daemon.socket, which is definitely not what we +ant, and it also causes debhelper to throw an error. Just drop this +entry from the configuration. +--- + avahi-dnsconfd/avahi-dnsconfd.service.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/avahi-dnsconfd/avahi-dnsconfd.service.in b/avahi-dnsconfd/avahi-dnsconfd.service.in +index 95db79f..7c293da 100644 +--- a/avahi-dnsconfd/avahi-dnsconfd.service.in ++++ b/avahi-dnsconfd/avahi-dnsconfd.service.in +@@ -26,4 +26,3 @@ ExecStart=@sbindir@/avahi-dnsconfd -s + + [Install] + WantedBy=multi-user.target +-Also=avahi-daemon.socket +-- +2.25.2 + diff --git a/0007-man-add-missing-bshell.1-symlink.patch b/0007-man-add-missing-bshell.1-symlink.patch new file mode 100644 index 0000000..9a79ec3 --- /dev/null +++ b/0007-man-add-missing-bshell.1-symlink.patch @@ -0,0 +1,35 @@ +From f983df44870b602179b493f9c3d113753b378e27 Mon Sep 17 00:00:00 2001 +From: Michael Biebl +Date: Sun, 17 Sep 2017 12:52:39 +0200 +Subject: [PATCH 07/11] man: add missing bshell.1 symlink + +The bshell binary is missing a symlink to its manual page. It should be +symlinked to the man page for bssh, just like how the bvnc man page is. + +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655190 +--- + man/Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/man/Makefile.am b/man/Makefile.am +index d38267c..77a27bd 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -137,12 +137,13 @@ BSSH_LN = + if HAVE_GTK + if HAVE_GLIB + BSSH_LN += $(LN_S) bssh.1 bvnc.1 && ++BSSH_LN += $(LN_S) bssh.1 bshell.1 && + endif + endif + install-exec-local: + mkdir -p $(DESTDIR)/$(mandir)/man1 && \ + cd $(DESTDIR)/$(mandir)/man1 && \ +- rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 bvnc.1 && \ ++ rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 bvnc.1 bshell.1 && \ + $(BSSH_LN) \ + $(LN_S) avahi-resolve.1 avahi-resolve-host-name.1 && \ + $(LN_S) avahi-resolve.1 avahi-resolve-address.1 && \ +-- +2.25.2 + diff --git a/0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch b/0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch new file mode 100644 index 0000000..fbcebbb --- /dev/null +++ b/0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch @@ -0,0 +1,52 @@ +From 751be804e891aec5701a059144e2f5cbfc981b36 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 24 Aug 2017 17:52:19 +0200 +Subject: [PATCH 08/11] Ship avahi-discover(1), bssh(1) and bvnc(1) also for + GTK3 + +These manpages went missing when you disabled gtk2 builds.... +--- + man/Makefile.am | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/man/Makefile.am b/man/Makefile.am +index 77a27bd..289b942 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -56,7 +56,7 @@ man_MANS += \ + avahi-publish.1 \ + avahi-set-host-name.1 + +-if HAVE_GTK ++if HAVE_GTK2OR3 + man_MANS += \ + bssh.1 + endif +@@ -64,12 +64,13 @@ endif + if HAVE_PYTHON + man_MANS += \ + avahi-bookmarks.1 +-if HAVE_GTK ++endif ++ ++if HAVE_PYGOBJECT + man_MANS += \ + avahi-discover.1 + endif + endif +-endif + + if ENABLE_AUTOIPD + if HAVE_LIBDAEMON +@@ -134,7 +135,7 @@ EXTRA_DIST = \ + if HAVE_DBUS + + BSSH_LN = +-if HAVE_GTK ++if HAVE_GTK2OR3 + if HAVE_GLIB + BSSH_LN += $(LN_S) bssh.1 bvnc.1 && + BSSH_LN += $(LN_S) bssh.1 bshell.1 && +-- +2.25.2 + diff --git a/0009-fix-requires-in-pc-file.patch b/0009-fix-requires-in-pc-file.patch new file mode 100644 index 0000000..a93e5c3 --- /dev/null +++ b/0009-fix-requires-in-pc-file.patch @@ -0,0 +1,24 @@ +From 366e3798bdbd6b7bf24e59379f4a9a51af575ce9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= +Date: Thu, 20 Feb 2020 16:09:40 +0100 +Subject: [PATCH 09/11] fix requires in pc file + +--- + avahi-libevent.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/avahi-libevent.pc.in b/avahi-libevent.pc.in +index a1dca01..3356b0b 100644 +--- a/avahi-libevent.pc.in ++++ b/avahi-libevent.pc.in +@@ -6,6 +6,6 @@ includedir=${prefix}/include + Name: avahi-libevent + Description: Avahi Multicast DNS Responder (libevent Support) + Version: @PACKAGE_VERSION@ +-Requires: libevent-2.1.5 ++Requires: libevent >= 2.1.5 + Libs: -L${libdir} -lavahi-libevent + Cflags: -D_REENTRANT -I${includedir} +-- +2.25.2 + diff --git a/0010-fix-bytestring-decoding-for-proper-display.patch b/0010-fix-bytestring-decoding-for-proper-display.patch new file mode 100644 index 0000000..ce95875 --- /dev/null +++ b/0010-fix-bytestring-decoding-for-proper-display.patch @@ -0,0 +1,32 @@ +From a94f72081dd1d546a1d95d860311a1242315bb28 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=89ric=20Araujo?= +Date: Sat, 29 Feb 2020 19:14:04 -0500 +Subject: [PATCH 10/11] fix bytestring decoding for proper display + +--- + avahi-python/avahi-discover/avahi-discover.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/avahi-python/avahi-discover/avahi-discover.py b/avahi-python/avahi-discover/avahi-discover.py +index 0db705d..4a2b575 100755 +--- a/avahi-python/avahi-discover/avahi-discover.py ++++ b/avahi-python/avahi-discover/avahi-discover.py +@@ -238,12 +238,15 @@ class Main_window: + txts+="" + _("TXT") + " %s = %s\n" % (k,v) + else: + txts = "" + _("TXT Data:") + " " + _("empty") + "" ++ ++ txts = txts.decode("utf-8") + + infos = "" + _("Service Type:") + " %s\n" + infos += "" + _("Service Name:") + " %s\n" + infos += "" + _("Domain Name:") + " %s\n" + infos += "" + _("Interface:") + " %s %s\n" + infos += "" + _("Address:") + " %s/%s:%i\n%s" ++ infos = infos.decode("utf-8") + infos = infos % (stype, name, domain, self.siocgifname(interface), self.protoname(protocol), host, address, port, txts.strip()) + self.info_label.set_markup(infos) + +-- +2.25.2 + diff --git a/0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch b/0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch new file mode 100644 index 0000000..d5bbf20 --- /dev/null +++ b/0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch @@ -0,0 +1,33 @@ +From b897ca43ac100d326d118e5877da710eb7f836f9 Mon Sep 17 00:00:00 2001 +From: traffic-millions <60914101+traffic-millions@users.noreply.github.com> +Date: Tue, 3 Mar 2020 11:15:48 +0800 +Subject: [PATCH 11/11] avahi_dns_packet_consume_uint32: fix potential + undefined behavior + +avahi_dns_packet_consume_uint32 left shifts uint8_t values by 8, 16 and 24 bits to combine them into a 32-bit value. This produces an undefined behavior warning with gcc -fsanitize when fed input values of 128 or 255 however in testing no actual unexpected behavior occurs in practice and the 32-bit uint32_t is always correctly produced as the final value is immediately stored into a uint32_t and the compiler appears to handle this "correctly". + +Cast the intermediate values to uint32_t to prevent this warning and ensure the intended result is explicit. + +Closes: #267 +Closes: #268 +Reference: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19304 +--- + avahi-core/dns.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/avahi-core/dns.c b/avahi-core/dns.c +index 7c38f42..d793b76 100644 +--- a/avahi-core/dns.c ++++ b/avahi-core/dns.c +@@ -455,7 +455,7 @@ int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v) { + return -1; + + d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex); +- *ret_v = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; ++ *ret_v = ((uint32_t)d[0] << 24) | ((uint32_t)d[1] << 16) | ((uint32_t)d[2] << 8) | (uint32_t)d[3]; + p->rindex += sizeof(uint32_t); + + return 0; +-- +2.25.2 + diff --git a/avahi.spec b/avahi.spec index f0ded55..214a557 100644 --- a/avahi.spec +++ b/avahi.spec @@ -34,7 +34,7 @@ Name: avahi Version: 0.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -109,6 +109,12 @@ Source0: https://github.com/lathiat/avahi/releases/download/v%{version} %endif ## upstream patches +Patch6: 0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch +Patch7: 0007-man-add-missing-bshell.1-symlink.patch +Patch8: 0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch +Patch9: 0009-fix-requires-in-pc-file.patch +Patch10: 0010-fix-bytestring-decoding-for-proper-display.patch +Patch11: 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch @@ -774,6 +780,9 @@ exit 0 %changelog +* Sun Mar 22 2020 Rex Dieter - 0.8-2 +- pull in some upstream fixes + * Sun Mar 22 2020 Lubomir Rintel - 0.8-1 - Update to version 0.8 From d48b042164c0e8df622286607a604859acafb69b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 5 May 2020 14:34:42 -0400 Subject: [PATCH 18/70] Minor conditional tweaks for ELN Signed-off-by: Stephen Gallagher --- avahi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 214a557..efa2112 100644 --- a/avahi.spec +++ b/avahi.spec @@ -11,7 +11,7 @@ %endif # https://bugzilla.redhat.com/show_bug.cgi?id=1751484 -%if 0%{?fedora} > 30 +%if 0%{?fedora} > 30 || 0%{?rhel} > 8 %global WITH_PYTHON 0 %endif From 2500cac704d520fff4e8c14db6486f09b3ef04ff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 12:46:16 +0000 Subject: [PATCH 19/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index efa2112..cb97e0f 100644 --- a/avahi.spec +++ b/avahi.spec @@ -34,7 +34,7 @@ Name: avahi Version: 0.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -780,6 +780,9 @@ exit 0 %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 0.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Sun Mar 22 2020 Rex Dieter - 0.8-2 - pull in some upstream fixes From 178fd0a306e8abc1d5947c8f8b38309f5bb7b9c1 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Mon, 7 Sep 2020 09:31:44 +0000 Subject: [PATCH 20/70] Make possible to bootstrap build w/o GTK and Qt5 --- avahi.spec | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/avahi.spec b/avahi.spec index cb97e0f..35d8bd6 100644 --- a/avahi.spec +++ b/avahi.spec @@ -1,9 +1,22 @@ +%bcond_with bootstrap + +%if %{without bootstrap} %{?!WITH_MONO: %global WITH_MONO 1} +%else +%{?!WITH_MONO: %global WITH_MONO 0} +%endif + %{?!WITH_COMPAT_DNSSD: %global WITH_COMPAT_DNSSD 1} %{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1} %{?!WITH_QT3: %global WITH_QT3 1} %{?!WITH_QT4: %global WITH_QT4 1} + +%if %{without bootstrap} %{?!WITH_QT5: %global WITH_QT5 1} +%else +%{?!WITH_QT5: %global WITH_QT5 0} +%endif + %{?!WITH_PYTHON: %global WITH_PYTHON 1} %ifnarch %{mono_arches} @@ -51,8 +64,10 @@ BuildRequires: libtool BuildRequires: dbus-devel >= 0.90 BuildRequires: dbus-glib-devel >= 0.70 BuildRequires: desktop-file-utils +%if %{without bootstrap} BuildRequires: gtk2-devel BuildRequires: gtk3-devel >= 2.99.0 +%endif #BuildRequires: gobject-introspection-devel %if %{WITH_QT3} BuildRequires: qt3-devel @@ -84,8 +99,10 @@ BuildRequires: python3-devel Obsoletes: python2-avahi < %{version}-%{release} Obsoletes: python3-avahi < %{version}-%{release} Obsoletes: avahi-ui-tools < %{version}-%{release} +%if %{without bootstrap} BuildRequires: pygtk2 %endif +%endif BuildRequires: gdbm-devel BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(libevent) >= 2.0.21 @@ -191,6 +208,7 @@ Requires: %{name}-gobject%{?_isa} = %{version}-%{release} The avahi-gobject-devel package contains the header files and libraries necessary for developing programs using avahi-gobject. +%if %{without bootstrap} %package ui Summary: Gtk user interface library for Avahi (Gtk+ 2 version) Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -219,6 +237,7 @@ Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} %description ui-devel The avahi-ui-devel package contains the header files and libraries necessary for developing programs using avahi-ui. +%endif %if %{WITH_QT3} %package qt3 @@ -431,7 +450,12 @@ NOCONFIGURE=1 ./autogen.sh --enable-shared=yes \ --enable-static=no \ --disable-silent-rules \ +%if %{without bootstrap} --enable-gtk \ +%else + --disable-gtk \ + --disable-gtk3 \ +%endif %if ! %{WITH_PYTHON} --disable-python \ %endif @@ -684,6 +708,7 @@ exit 0 #%{_datadir}/gir-1.0/Avahi-0.6.gir #%{_datadir}/gir-1.0/AvahiCore-0.6.gir +%if %{without bootstrap} %files ui %{_libdir}/libavahi-ui.so.* @@ -696,6 +721,7 @@ exit 0 %{_includedir}/avahi-ui %{_libdir}/pkgconfig/avahi-ui.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc +%endif %if %{WITH_QT3} %ldconfig_scriptlets qt3 From 1fc220f76d5422bf5b74009f80f14c84be402f3b Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Mon, 7 Sep 2020 09:44:42 +0000 Subject: [PATCH 21/70] Enable bootstrap --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 35d8bd6..b017efe 100644 --- a/avahi.spec +++ b/avahi.spec @@ -1,4 +1,4 @@ -%bcond_with bootstrap +%bcond_without bootstrap %if %{without bootstrap} %{?!WITH_MONO: %global WITH_MONO 1} @@ -47,7 +47,7 @@ Name: avahi Version: 0.8 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -806,6 +806,9 @@ exit 0 %changelog +* Mon Sep 07 2020 Ondřej Lysoněk - 0.8-4 +- Rebuilt due to libevent rebase + * Mon Jul 27 2020 Fedora Release Engineering - 0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 2c08e02ed6681b8264cb0362ab440598240023d5 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Mon, 21 Sep 2020 16:06:43 +0200 Subject: [PATCH 22/70] Disable bootstrap --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index b017efe..b39c293 100644 --- a/avahi.spec +++ b/avahi.spec @@ -1,4 +1,4 @@ -%bcond_without bootstrap +%bcond_with bootstrap %if %{without bootstrap} %{?!WITH_MONO: %global WITH_MONO 1} @@ -47,7 +47,7 @@ Name: avahi Version: 0.8 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -806,6 +806,9 @@ exit 0 %changelog +* Mon Sep 21 2020 Michal Sekletar - 0.8-5 +- Disable bootstrap + * Mon Sep 07 2020 Ondřej Lysoněk - 0.8-4 - Rebuilt due to libevent rebase From d8904eb58ef03d87f2256ab2c1740232dab0c60b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 15 Oct 2020 11:32:12 -0500 Subject: [PATCH 23/70] resurrect ui-tools, not just for python (#1885513) --- avahi.spec | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/avahi.spec b/avahi.spec index b39c293..39474e1 100644 --- a/avahi.spec +++ b/avahi.spec @@ -98,7 +98,6 @@ BuildRequires: python3-devel %else Obsoletes: python2-avahi < %{version}-%{release} Obsoletes: python3-avahi < %{version}-%{release} -Obsoletes: avahi-ui-tools < %{version}-%{release} %if %{without bootstrap} BuildRequires: pygtk2 %endif @@ -161,10 +160,10 @@ Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} Requires: tigervnc Requires: openssh-clients +%if %{WITH_PYTHON} +Requires: gdbm Requires: pygtk2 Requires: pygtk2-libglade -Requires: gdbm -%if %{WITH_PYTHON} Requires: python2-avahi = %{version}-%{release} Requires: %{python2_dbus} Requires: python2-gobject-base @@ -644,22 +643,37 @@ exit 0 %{_unitdir}/avahi-dnsconfd.service %files tools -%{_bindir}/* -%{_mandir}/man1/* -%if %{WITH_PYTHON} -%exclude %{_bindir}/b* -%exclude %{_bindir}/avahi-discover* -%exclude %{_bindir}/avahi-bookmarks -%exclude %{_mandir}/man1/b* -%exclude %{_mandir}/man1/avahi-discover* -%exclude %{_mandir}/man1/avahi-bookmarks* +%{_bindir}/avahi-browse +%{_bindir}/avahi-browse-domains +%{_bindir}/avahi-publish +%{_bindir}/avahi-publish-address +%{_bindir}/avahi-publish-service +%{_bindir}/avahi-resolve +%{_bindir}/avahi-resolve-address +%{_bindir}/avahi-resolve-host-name +%{_bindir}/avahi-set-host-name + +%{_mandir}/man1/avahi-browse.1* +%{_mandir}/man1/avahi-browse-domains.1* +%{_mandir}/man1/avahi-publish.1* +%{_mandir}/man1/avahi-publish-address.1* +%{_mandir}/man1/avahi-publish-service.1* +%{_mandir}/man1/avahi-resolve.1* +%{_mandir}/man1/avahi-resolve-address.1* +%{_mandir}/man1/avahi-resolve-host-name.1* +%{_mandir}/man1/avahi-set-host-name.1* %files ui-tools -%{_bindir}/b* -%{_bindir}/avahi-discover +%{_bindir}/bshell +%{_bindir}/bssh +%{_bindir}/bvnc +%{_bindir}/avahi-discover-standalone +%{_mandir}/man1/bshell.1* +%{_mandir}/man1/bssh.1* +%{_mandir}/man1/bvnc.1* +%if %{WITH_PYTHON} # avahi-bookmarks is not really a UI tool, but I won't create a seperate package for it... %{_bindir}/avahi-bookmarks -%{_mandir}/man1/b* %{_mandir}/man1/avahi-discover* %{_mandir}/man1/avahi-bookmarks* %{_datadir}/applications/b*.desktop From 4ae18a01681276bb49b5e85cc0475411161ad448 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 15 Oct 2020 11:53:28 -0500 Subject: [PATCH 24/70] Release++, +changelog --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 39474e1..a787a5c 100644 --- a/avahi.spec +++ b/avahi.spec @@ -47,7 +47,7 @@ Name: avahi Version: 0.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -820,6 +820,9 @@ exit 0 %changelog +* Thu Oct 15 2020 Rex Dieter - 0.8-6 +- resurrect ui-tools, not just for python (#1885513) + * Mon Sep 21 2020 Michal Sekletar - 0.8-5 - Disable bootstrap From dd53bfdcda4eceedd14ffc710ec07919891ce738 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 17 Nov 2020 16:54:27 -0600 Subject: [PATCH 25/70] fix undefined symbols in libavahi-qt3 (#1897925) --- 0016-fix-QT3-build.patch | 29 ++++++++++++++++ avahi-0.8-no_undefined.patch | 66 ++++++++++++++++++++++++++++++++++++ avahi.spec | 11 ++++-- 3 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 0016-fix-QT3-build.patch create mode 100644 avahi-0.8-no_undefined.patch diff --git a/0016-fix-QT3-build.patch b/0016-fix-QT3-build.patch new file mode 100644 index 0000000..470c212 --- /dev/null +++ b/0016-fix-QT3-build.patch @@ -0,0 +1,29 @@ +From 66a684b988052664669158819fc123469b714f50 Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Tue, 17 Nov 2020 16:42:00 -0600 +Subject: [PATCH 16/16] fix QT3 build + +recent commit d1e71b320d96d0f213ecb0885c8313039a09f693 adding QT5 +support added a new conditional +but failed to actually set the define. This commit adds that to +allow successful build when enabling QT3 support +--- + avahi-qt/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/avahi-qt/Makefile.am b/avahi-qt/Makefile.am +index 09ce7ca..b404810 100644 +--- a/avahi-qt/Makefile.am ++++ b/avahi-qt/Makefile.am +@@ -38,7 +38,7 @@ libavahi_qt3_la_SOURCES = \ + qt-watch.moc3: qt-watch.cpp + $(AM_V_GEN)$(MOC_QT3) $^ > $@ + +-libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS) ++libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) + libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) + libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) + endif +-- +2.28.0 + diff --git a/avahi-0.8-no_undefined.patch b/avahi-0.8-no_undefined.patch new file mode 100644 index 0000000..04dc068 --- /dev/null +++ b/avahi-0.8-no_undefined.patch @@ -0,0 +1,66 @@ +diff -up avahi-0.8/avahi-qt/Makefile.am.no_undefined avahi-0.8/avahi-qt/Makefile.am +--- avahi-0.8/avahi-qt/Makefile.am.no_undefined 2018-09-14 00:31:28.490023071 -0500 ++++ avahi-0.8/avahi-qt/Makefile.am 2020-11-17 16:35:04.646045499 -0600 +@@ -38,9 +38,9 @@ libavahi_qt3_la_SOURCES = \ + qt-watch.moc3: qt-watch.cpp + $(AM_V_GEN)$(MOC_QT3) $^ > $@ + +-libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) ++libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) + libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) +-libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) ++libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) + endif + + if HAVE_QT4 +@@ -62,7 +62,7 @@ qt-watch.moc4: qt-watch.cpp + + libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS) + libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS) +-libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO) ++libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT4_VERSION_INFO) + endif + + if HAVE_QT5 +@@ -84,7 +84,7 @@ qt-watch.moc5: qt-watch.cpp + + libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS) + libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS) +-libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO) ++libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT5_VERSION_INFO) + endif + + CLEANFILES = $(BUILT_SOURCES) +diff -up avahi-0.8/avahi-qt/Makefile.in.no_undefined avahi-0.8/avahi-qt/Makefile.in +--- avahi-0.8/avahi-qt/Makefile.in.no_undefined 2020-02-18 01:03:16.474614659 -0600 ++++ avahi-0.8/avahi-qt/Makefile.in 2020-11-17 16:36:12.263297534 -0600 +@@ -551,9 +551,9 @@ BUILT_SOURCES = $(am__append_2) $(am__ap + @HAVE_QT3_TRUE@libavahi_qt3_la_SOURCES = \ + @HAVE_QT3_TRUE@ qt-watch.cpp + +-@HAVE_QT3_TRUE@libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS) ++@HAVE_QT3_TRUE@libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) + @HAVE_QT3_TRUE@libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) +-@HAVE_QT3_TRUE@libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) ++@HAVE_QT3_TRUE@libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) + @HAVE_QT4_TRUE@avahiqt4includedir = $(includedir)/avahi-qt4 + @HAVE_QT4_TRUE@avahiqt4include_HEADERS = \ + @HAVE_QT4_TRUE@ qt-watch.h +@@ -563,7 +563,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap + + @HAVE_QT4_TRUE@libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS) + @HAVE_QT4_TRUE@libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS) +-@HAVE_QT4_TRUE@libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO) ++@HAVE_QT4_TRUE@libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT4_VERSION_INFO) + @HAVE_QT5_TRUE@avahiqt5includedir = $(includedir)/avahi-qt5 + @HAVE_QT5_TRUE@avahiqt5include_HEADERS = \ + @HAVE_QT5_TRUE@ qt-watch.h +@@ -573,7 +573,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap + + @HAVE_QT5_TRUE@libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS) + @HAVE_QT5_TRUE@libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS) +-@HAVE_QT5_TRUE@libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO) ++@HAVE_QT5_TRUE@libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT5_VERSION_INFO) + CLEANFILES = $(BUILT_SOURCES) + all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/avahi.spec b/avahi.spec index a787a5c..9ad56d2 100644 --- a/avahi.spec +++ b/avahi.spec @@ -47,7 +47,7 @@ Name: avahi Version: 0.8 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -134,6 +134,10 @@ Patch11: 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1897925 +# https://github.com/lathiat/avahi/pull/312 +Patch101: 0016-fix-QT3-build.patch +Patch102: avahi-0.8-no_undefined.patch %description Avahi is a system which facilitates service discovery on @@ -431,7 +435,7 @@ rm -fv docs/INSTALL %build -# patch100 requires autogen +# patch100/101/102 requires autogen # and kills rpaths a bonus rm -fv missing NOCONFIGURE=1 ./autogen.sh @@ -820,6 +824,9 @@ exit 0 %changelog +* Tue Nov 17 2020 Rex Dieter - 0.8-7 +- fix undefined symbols in libavahi-qt3 (#1897925) + * Thu Oct 15 2020 Rex Dieter - 0.8-6 - resurrect ui-tools, not just for python (#1885513) From 29b5438f14f662e8acae8951aee20646216f0f14 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 17 Dec 2020 02:37:33 +0000 Subject: [PATCH 26/70] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- avahi.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/avahi.spec b/avahi.spec index 9ad56d2..8ec8811 100644 --- a/avahi.spec +++ b/avahi.spec @@ -314,6 +314,7 @@ Requires: %{name}-sharp%{?_isa} = %{version}-%{release} Requires: mono-core >= 1.1.13 Requires: gtk-sharp2 BuildRequires: gtk-sharp2-devel +BuildRequires: make %description ui-sharp The avahi-sharp package contains the files needed to run From 74c72f25ef19ed0277c324aae00b39ee836b6494 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 00:48:31 +0000 Subject: [PATCH 27/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 8ec8811..060955d 100644 --- a/avahi.spec +++ b/avahi.spec @@ -47,7 +47,7 @@ Name: avahi Version: 0.8 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -825,6 +825,9 @@ exit 0 %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 0.8-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Nov 17 2020 Rex Dieter - 0.8-7 - fix undefined symbols in libavahi-qt3 (#1897925) From 865aa4c0e41120c146c6e39ce98ea7070f760edf Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 16 Feb 2021 10:06:28 -0600 Subject: [PATCH 28/70] cleanup/fix conditionals (#1751484) flip defaults (to off) for deprecated items: Qt3, Qt4, Python(2) --- avahi.spec | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/avahi.spec b/avahi.spec index 060955d..ee176ce 100644 --- a/avahi.spec +++ b/avahi.spec @@ -8,8 +8,8 @@ %{?!WITH_COMPAT_DNSSD: %global WITH_COMPAT_DNSSD 1} %{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1} -%{?!WITH_QT3: %global WITH_QT3 1} -%{?!WITH_QT4: %global WITH_QT4 1} +%{?!WITH_QT3: %global WITH_QT3 0} +%{?!WITH_QT4: %global WITH_QT4 0} %if %{without bootstrap} %{?!WITH_QT5: %global WITH_QT5 1} @@ -17,26 +17,24 @@ %{?!WITH_QT5: %global WITH_QT5 0} %endif -%{?!WITH_PYTHON: %global WITH_PYTHON 1} +# https://bugzilla.redhat.com/show_bug.cgi?id=1751484 +%{?!WITH_PYTHON: %global WITH_PYTHON 0} %ifnarch %{mono_arches} %define WITH_MONO 0 %endif -# https://bugzilla.redhat.com/show_bug.cgi?id=1751484 -%if 0%{?fedora} > 30 || 0%{?rhel} > 8 -%global WITH_PYTHON 0 +%if 0%{?fedora} +%global WITH_QT3 1 +%global WITH_QT4 1 %endif %if 0%{?rhel} -%define WITH_MONO 0 - %if 0%{?rhel} >= 6 - %define WITH_QT4 0 - %define WITH_QT5 0 - %endif - %if 0%{?rhel} > 7 - %define WITH_QT3 0 - %endif +%global WITH_MONO 0 +%global WITH_QT5 0 +%if 0%{?rhel} < 8 +%global WITH_PYTHON 1 +%endif %endif # http://bugzilla.redhat.com/1008395 - no hardened build @@ -47,7 +45,7 @@ Name: avahi Version: 0.8 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -83,6 +81,9 @@ BuildRequires: glib2-devel BuildRequires: libcap-devel BuildRequires: expat-devel %if %{WITH_PYTHON} +%if %{without bootstrap} +BuildRequires: pygtk2 +%endif %if 0%{?fedora} > 27 %global python2_dbus python2-dbus %global python2_libxml2 python2-libxml2 @@ -98,9 +99,6 @@ BuildRequires: python3-devel %else Obsoletes: python2-avahi < %{version}-%{release} Obsoletes: python3-avahi < %{version}-%{release} -%if %{without bootstrap} -BuildRequires: pygtk2 -%endif %endif BuildRequires: gdbm-devel BuildRequires: pkgconfig(pygobject-3.0) @@ -825,6 +823,9 @@ exit 0 %changelog +* Tue Feb 16 2021 Rex Dieter - 0.8-9 +- cleanup/fix conditionals (#1751484) + * Tue Jan 26 2021 Fedora Release Engineering - 0.8-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From c71132b246d347c85f4bcff739e19b45ba6cf819 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 16 Feb 2021 11:43:42 -0600 Subject: [PATCH 29/70] disable lto, workaround FTBFS (#1907727) --- avahi.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/avahi.spec b/avahi.spec index ee176ce..074ff95 100644 --- a/avahi.spec +++ b/avahi.spec @@ -37,6 +37,9 @@ %endif %endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1907727 +%global _lto_cflags %{nil} + # http://bugzilla.redhat.com/1008395 - no hardened build %global _hardened_build 1 @@ -825,6 +828,7 @@ exit 0 %changelog * Tue Feb 16 2021 Rex Dieter - 0.8-9 - cleanup/fix conditionals (#1751484) +- disable lto, workaround FTBFS (#1907727) * Tue Jan 26 2021 Fedora Release Engineering - 0.8-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From b14dda007bdd02e26dc41afa561f20ce8cfa64ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:14:10 +0100 Subject: [PATCH 30/70] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- avahi.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 074ff95..4d1d5fa 100644 --- a/avahi.spec +++ b/avahi.spec @@ -48,7 +48,7 @@ Name: avahi Version: 0.8 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -826,6 +826,10 @@ exit 0 %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 0.8-10 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Tue Feb 16 2021 Rex Dieter - 0.8-9 - cleanup/fix conditionals (#1751484) - disable lto, workaround FTBFS (#1907727) From f4b4f57d2774de81cd7b2ee7dc31724a6a86eade Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 29 Apr 2021 16:27:59 -0500 Subject: [PATCH 31/70] avahi libraries missing -fstack-protector-stong (#1817737) --- avahi.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/avahi.spec b/avahi.spec index 4d1d5fa..cbf66f0 100644 --- a/avahi.spec +++ b/avahi.spec @@ -48,7 +48,7 @@ Name: avahi Version: 0.8 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -437,9 +437,10 @@ rm -fv docs/INSTALL %build -# patch100/101/102 requires autogen -# and kills rpaths a bonus -rm -fv missing +## why autogen? +## * kills rpaths +## * fixes -stack-protector flags (once gcc_stack_protect.m4 is removed) +rm -fv missing common/gcc_stack_protect.m4 NOCONFIGURE=1 ./autogen.sh %configure \ @@ -826,6 +827,9 @@ exit 0 %changelog +* Thu Apr 29 2021 Rex Dieter - 0.8-11 +- avahi libraries missing -fstack-protector-stong (#1817737) + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 0.8-10 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From ab3631534727233cc77acae42dc949c3b635d864 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 29 Apr 2021 16:28:26 -0500 Subject: [PATCH 32/70] changelog typo --- avahi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index cbf66f0..fd1bfeb 100644 --- a/avahi.spec +++ b/avahi.spec @@ -828,7 +828,7 @@ exit 0 %changelog * Thu Apr 29 2021 Rex Dieter - 0.8-11 -- avahi libraries missing -fstack-protector-stong (#1817737) +- avahi libraries missing -fstack-protector-strong (#1817737) * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 0.8-10 - Rebuilt for updated systemd-rpm-macros From 64bffa7f65f9708710689c42248f7a9dd754eb98 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 10 May 2021 08:44:09 -0600 Subject: [PATCH 33/70] - Re-enable LTO --- avahi.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/avahi.spec b/avahi.spec index fd1bfeb..889e4a9 100644 --- a/avahi.spec +++ b/avahi.spec @@ -37,9 +37,6 @@ %endif %endif -# https://bugzilla.redhat.com/show_bug.cgi?id=1907727 -%global _lto_cflags %{nil} - # http://bugzilla.redhat.com/1008395 - no hardened build %global _hardened_build 1 @@ -48,7 +45,7 @@ Name: avahi Version: 0.8 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -827,6 +824,9 @@ exit 0 %changelog +* Mon May 10 2021 Jeff Law - 0.8-12 +- Re-enable LTO + * Thu Apr 29 2021 Rex Dieter - 0.8-11 - avahi libraries missing -fstack-protector-strong (#1817737) From c4e0beb0572e26cc2f8542542f068aa2a2c40263 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 13:19:46 +0000 Subject: [PATCH 34/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 7a071ce07109c3c8b048e27077e8a2f1e1bc5471 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 18:15:54 +0000 Subject: [PATCH 35/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 889e4a9..c76232d 100644 --- a/avahi.spec +++ b/avahi.spec @@ -45,7 +45,7 @@ Name: avahi Version: 0.8 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -824,6 +824,9 @@ exit 0 %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 0.8-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon May 10 2021 Jeff Law - 0.8-12 - Re-enable LTO From bee2e8d2f1f6748c95ff111e1a8f99be54252358 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 3 Aug 2021 10:24:11 -0500 Subject: [PATCH 36/70] pull in upstream fix for CVE-2021-36217 (#1989381,#1989382) --- 0016-Fix-NULL-pointer-crashes-from-175.patch | 151 +++++++++++++++++++ avahi.spec | 6 +- 2 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 0016-Fix-NULL-pointer-crashes-from-175.patch diff --git a/0016-Fix-NULL-pointer-crashes-from-175.patch b/0016-Fix-NULL-pointer-crashes-from-175.patch new file mode 100644 index 0000000..878073e --- /dev/null +++ b/0016-Fix-NULL-pointer-crashes-from-175.patch @@ -0,0 +1,151 @@ +From 9d31939e55280a733d930b15ac9e4dda4497680c Mon Sep 17 00:00:00 2001 +From: Tommi Rantala +Date: Mon, 8 Feb 2021 11:04:43 +0200 +Subject: [PATCH 16/16] Fix NULL pointer crashes from #175 + +avahi-daemon is crashing when running "ping .local". +The crash is due to failing assertion from NULL pointer. +Add missing NULL pointer checks to fix it. + +Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd +--- + avahi-core/browse-dns-server.c | 5 ++++- + avahi-core/browse-domain.c | 5 ++++- + avahi-core/browse-service-type.c | 3 +++ + avahi-core/browse-service.c | 3 +++ + avahi-core/browse.c | 3 +++ + avahi-core/resolve-address.c | 5 ++++- + avahi-core/resolve-host-name.c | 5 ++++- + avahi-core/resolve-service.c | 5 ++++- + 8 files changed, 29 insertions(+), 5 deletions(-) + +diff --git a/avahi-core/browse-dns-server.c b/avahi-core/browse-dns-server.c +index 049752e..c2d914f 100644 +--- a/avahi-core/browse-dns-server.c ++++ b/avahi-core/browse-dns-server.c +@@ -343,7 +343,10 @@ AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new( + AvahiSDNSServerBrowser* b; + + b = avahi_s_dns_server_browser_prepare(server, interface, protocol, domain, type, aprotocol, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_dns_server_browser_start(b); + + return b; +-} +\ No newline at end of file ++} +diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c +index f145d56..06fa70c 100644 +--- a/avahi-core/browse-domain.c ++++ b/avahi-core/browse-domain.c +@@ -253,7 +253,10 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new( + AvahiSDomainBrowser *b; + + b = avahi_s_domain_browser_prepare(server, interface, protocol, domain, type, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_domain_browser_start(b); + + return b; +-} +\ No newline at end of file ++} +diff --git a/avahi-core/browse-service-type.c b/avahi-core/browse-service-type.c +index fdd22dc..b1fc7af 100644 +--- a/avahi-core/browse-service-type.c ++++ b/avahi-core/browse-service-type.c +@@ -171,6 +171,9 @@ AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new( + AvahiSServiceTypeBrowser *b; + + b = avahi_s_service_type_browser_prepare(server, interface, protocol, domain, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_service_type_browser_start(b); + + return b; +diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c +index 5531360..63e0275 100644 +--- a/avahi-core/browse-service.c ++++ b/avahi-core/browse-service.c +@@ -184,6 +184,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_new( + AvahiSServiceBrowser *b; + + b = avahi_s_service_browser_prepare(server, interface, protocol, service_type, domain, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_service_browser_start(b); + + return b; +diff --git a/avahi-core/browse.c b/avahi-core/browse.c +index 2941e57..e8a915e 100644 +--- a/avahi-core/browse.c ++++ b/avahi-core/browse.c +@@ -634,6 +634,9 @@ AvahiSRecordBrowser *avahi_s_record_browser_new( + AvahiSRecordBrowser *b; + + b = avahi_s_record_browser_prepare(server, interface, protocol, key, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_record_browser_start_query(b); + + return b; +diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c +index ac0b29b..e61dd24 100644 +--- a/avahi-core/resolve-address.c ++++ b/avahi-core/resolve-address.c +@@ -286,7 +286,10 @@ AvahiSAddressResolver *avahi_s_address_resolver_new( + AvahiSAddressResolver *b; + + b = avahi_s_address_resolver_prepare(server, interface, protocol, address, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_address_resolver_start(b); + + return b; +-} +\ No newline at end of file ++} +diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c +index 808b0e7..4e8e597 100644 +--- a/avahi-core/resolve-host-name.c ++++ b/avahi-core/resolve-host-name.c +@@ -318,7 +318,10 @@ AvahiSHostNameResolver *avahi_s_host_name_resolver_new( + AvahiSHostNameResolver *b; + + b = avahi_s_host_name_resolver_prepare(server, interface, protocol, host_name, aprotocol, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_host_name_resolver_start(b); + + return b; +-} +\ No newline at end of file ++} +diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c +index 66bf3ca..4377176 100644 +--- a/avahi-core/resolve-service.c ++++ b/avahi-core/resolve-service.c +@@ -519,7 +519,10 @@ AvahiSServiceResolver *avahi_s_service_resolver_new( + AvahiSServiceResolver *b; + + b = avahi_s_service_resolver_prepare(server, interface, protocol, name, type, domain, aprotocol, flags, callback, userdata); ++ if (!b) ++ return NULL; ++ + avahi_s_service_resolver_start(b); + + return b; +-} +\ No newline at end of file ++} +-- +2.31.1 + diff --git a/avahi.spec b/avahi.spec index c76232d..0572487 100644 --- a/avahi.spec +++ b/avahi.spec @@ -45,7 +45,7 @@ Name: avahi Version: 0.8 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -129,6 +129,7 @@ Patch8: 0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch Patch9: 0009-fix-requires-in-pc-file.patch Patch10: 0010-fix-bytestring-decoding-for-proper-display.patch Patch11: 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch +Patch16: 0016-Fix-NULL-pointer-crashes-from-175.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch @@ -824,6 +825,9 @@ exit 0 %changelog +* Tue Aug 03 2021 Rex Dieter - 0.8-14 +- pull in upstream fix for CVE-2021-36217 (#1989381,#1989382) + * Wed Jul 21 2021 Fedora Release Engineering - 0.8-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 2ad878bdde7bc552f0a6d9e0a98d8fd564265378 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 3 Aug 2021 11:01:20 -0500 Subject: [PATCH 37/70] revert "Re-enable LTO" on f34 (still needed) --- avahi.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/avahi.spec b/avahi.spec index 0572487..6e15f69 100644 --- a/avahi.spec +++ b/avahi.spec @@ -37,6 +37,11 @@ %endif %endif +%if 0%{?fedora} == 34 +# https://bugzilla.redhat.com/show_bug.cgi?id=1907727 +%global _lto_cflags %{nil} +%endif + # http://bugzilla.redhat.com/1008395 - no hardened build %global _hardened_build 1 @@ -827,6 +832,7 @@ exit 0 %changelog * Tue Aug 03 2021 Rex Dieter - 0.8-14 - pull in upstream fix for CVE-2021-36217 (#1989381,#1989382) +- revert "Re-enable LTO" on f34 (still needed) * Wed Jul 21 2021 Fedora Release Engineering - 0.8-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 3e16de6326974667b24445bf623e4f6e2454e63d Mon Sep 17 00:00:00 2001 From: Marie Loise Nolden Date: Wed, 22 Dec 2021 06:25:56 +0000 Subject: [PATCH 38/70] Update avahi.spec --- avahi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 6e15f69..ef40d1b 100644 --- a/avahi.spec +++ b/avahi.spec @@ -37,7 +37,7 @@ %endif %endif -%if 0%{?fedora} == 34 +%if 0%{?fedora} == 34 || 0%{?rhel} >= 9 # https://bugzilla.redhat.com/show_bug.cgi?id=1907727 %global _lto_cflags %{nil} %endif From 3245ce6e58c9652020b94a03d4b0b43031c749e5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 21:59:40 +0000 Subject: [PATCH 39/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index ef40d1b..099dbc7 100644 --- a/avahi.spec +++ b/avahi.spec @@ -50,7 +50,7 @@ Name: avahi Version: 0.8 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -830,6 +830,9 @@ exit 0 %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 0.8-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Aug 03 2021 Rex Dieter - 0.8-14 - pull in upstream fix for CVE-2021-36217 (#1989381,#1989382) - revert "Re-enable LTO" on f34 (still needed) From 4d3ba397b15b44c81e9ab9a1c3a03c362b325a98 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 21:37:04 +0000 Subject: [PATCH 40/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 099dbc7..2f2e44e 100644 --- a/avahi.spec +++ b/avahi.spec @@ -50,7 +50,7 @@ Name: avahi Version: 0.8 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -830,6 +830,9 @@ exit 0 %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 0.8-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jan 19 2022 Fedora Release Engineering - 0.8-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 3d83a9f66ed8a9dcf4039955d463249890e58348 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 5 Aug 2022 12:01:19 +0200 Subject: [PATCH 41/70] Avoid systemd_requires as per updated packaging guidelines There is no need to have them as systemd correctly handles reloading depending on the transaction ordering (even if systemd is installed _after_ the package that installs the unit file). --- avahi.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 2f2e44e..dce5e05 100644 --- a/avahi.spec +++ b/avahi.spec @@ -50,7 +50,7 @@ Name: avahi Version: 0.8 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -116,7 +116,6 @@ BuildRequires: mono-devel BuildRequires: monodoc-devel %endif BuildRequires: systemd -%{?systemd_requires} BuildRequires: gcc BuildRequires: gcc-c++ @@ -830,6 +829,9 @@ exit 0 %changelog +* Fri Aug 05 2022 Kalev Lember - 0.8-17 +- Avoid systemd_requires as per updated packaging guidelines + * Wed Jul 20 2022 Fedora Release Engineering - 0.8-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From f29dc51363501a541aa4ec6202a45d7e067a5590 Mon Sep 17 00:00:00 2001 From: Christian Krause Date: Tue, 1 Nov 2022 20:23:13 +0100 Subject: [PATCH 42/70] Fix installed files in avahi-ui-tools - Install glade file for avahi-discover-standalone unconditionally (fixes #2036073 and #2126721) - Install desktop files for bssh and bsvn unconditionally --- avahi.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/avahi.spec b/avahi.spec index dce5e05..0ee39ba 100644 --- a/avahi.spec +++ b/avahi.spec @@ -50,7 +50,7 @@ Name: avahi Version: 0.8 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -534,10 +534,6 @@ if [ -n "$(grep '^GenericName=$' $i)" ]; then desktop-file-edit --copy-name-to-generic-name $i fi done -%else -# unpackaged files -rm -fv %{buildroot}%{_datadir}/applications/{bssh,bvnc}.desktop -rm -fv %{buildroot}%{_datadir}/avahi/interfaces/avahi-discover.ui %endif rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-daemon @@ -680,14 +676,14 @@ exit 0 %{_mandir}/man1/bshell.1* %{_mandir}/man1/bssh.1* %{_mandir}/man1/bvnc.1* +%{_datadir}/applications/b*.desktop +%{_datadir}/avahi/interfaces/ %if %{WITH_PYTHON} # avahi-bookmarks is not really a UI tool, but I won't create a seperate package for it... %{_bindir}/avahi-bookmarks %{_mandir}/man1/avahi-discover* %{_mandir}/man1/avahi-bookmarks* -%{_datadir}/applications/b*.desktop %{_datadir}/applications/avahi-discover.desktop -%{_datadir}/avahi/interfaces/ %{python2_sitelib}/avahi_discover/ %endif @@ -829,6 +825,11 @@ exit 0 %changelog +* Tue Nov 01 2022 Christian Krause - 0.8-18 +- Install glade file for avahi-discover-standalone unconditionally + (fixes #2036073 and #2126721) +- Install desktop files for bssh and bvnc unconditionally + * Fri Aug 05 2022 Kalev Lember - 0.8-17 - Avoid systemd_requires as per updated packaging guidelines From bfe1212eb6729a37bdac56347274e4b08f4abfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 11 Nov 2022 01:26:43 +0100 Subject: [PATCH 43/70] Add upstream PR links to patches Removes some warnings in spec as well. --- avahi.spec | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/avahi.spec b/avahi.spec index 0ee39ba..44cebb2 100644 --- a/avahi.spec +++ b/avahi.spec @@ -50,7 +50,7 @@ Name: avahi Version: 0.8 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -123,20 +123,32 @@ BuildRequires: gcc-c++ Source0: https://github.com/lathiat/avahi/archive/%{version}-%{beta}.tar.gz#/%{name}-%{version}-%{beta}.tar.gz %else Source0: https://github.com/lathiat/avahi/releases/download/v%{version}/avahi-%{version}.tar.gz -#Source0: http://avahi.org/download/avahi-%{version}.tar.gz +#Source0: http://avahi.org/download/avahi-%%{version}.tar.gz %endif ## upstream patches +# https://github.com/lathiat/avahi/commit/9c3a314856affb288f701d2d3ee23278fc98eaee Patch6: 0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch +# https://github.com/lathiat/avahi/pull/148 +# https://github.com/lathiat/avahi/commit/f983df44870b602179b493f9c3d113753b378e27 Patch7: 0007-man-add-missing-bshell.1-symlink.patch +# https://github.com/lathiat/avahi/pull/142 Patch8: 0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch +# https://github.com/lathiat/avahi/pull/265 +# https://github.com/lathiat/avahi/commit/366e3798bdbd6b7bf24e59379f4a9a51af575ce9 Patch9: 0009-fix-requires-in-pc-file.patch +# https://github.com/lathiat/avahi/pull/270 +# https://github.com/lathiat/avahi/commit/a94f72081dd1d546a1d95d860311a1242315bb28 Patch10: 0010-fix-bytestring-decoding-for-proper-display.patch +# https://github.com/lathiat/avahi/pull/268 +# https://github.com/lathiat/avahi/commit/b897ca43ac100d326d118e5877da710eb7f836f9 Patch11: 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch +# https://github.com/lathiat/avahi/pull/324 +# https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c Patch16: 0016-Fix-NULL-pointer-crashes-from-175.patch ## downstream patches -Patch100: avahi-0.6.30-mono-libdir.patch +Patch100: avahi-0.6.30-mono-libdir.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1897925 # https://github.com/lathiat/avahi/pull/312 Patch101: 0016-fix-QT3-build.patch @@ -208,7 +220,6 @@ This library contains a GObject wrapper for the Avahi API Summary: Libraries and header files for Avahi GObject development Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-gobject%{?_isa} = %{version}-%{release} -#Requires: %{name}-glib-devel = %{version}-%{release} %description gobject-devel The avahi-gobject-devel package contains the header files and libraries @@ -238,7 +249,6 @@ Summary: Libraries and header files for Avahi UI development Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-ui%{?_isa} = %{version}-%{release} Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} -#Requires: %{name}-glib-devel = %{version}-%{release} %description ui-devel The avahi-ui-devel package contains the header files and libraries @@ -461,11 +471,11 @@ NOCONFIGURE=1 ./autogen.sh %if %{without bootstrap} --enable-gtk \ %else - --disable-gtk \ - --disable-gtk3 \ + --disable-gtk \ + --disable-gtk3 \ %endif %if ! %{WITH_PYTHON} - --disable-python \ + --disable-python \ %endif %if %{WITH_COMPAT_DNSSD} --enable-compat-libdns_sd \ @@ -717,15 +727,15 @@ exit 0 %files gobject %{_libdir}/libavahi-gobject.so.* -#%{_libdir}/girepository-1.0/Avahi-0.6.typelib -#%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib +#%%{_libdir}/girepository-1.0/Avahi-0.6.typelib +#%%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib %files gobject-devel %{_libdir}/libavahi-gobject.so %{_includedir}/avahi-gobject %{_libdir}/pkgconfig/avahi-gobject.pc -#%{_datadir}/gir-1.0/Avahi-0.6.gir -#%{_datadir}/gir-1.0/AvahiCore-0.6.gir +#%%{_datadir}/gir-1.0/Avahi-0.6.gir +#%%{_datadir}/gir-1.0/AvahiCore-0.6.gir %if %{without bootstrap} %files ui @@ -825,6 +835,9 @@ exit 0 %changelog +* Fri Nov 11 2022 Petr Menšík - 0.8-19 +- Add upstream PR links to patches + * Tue Nov 01 2022 Christian Krause - 0.8-18 - Install glade file for avahi-discover-standalone unconditionally (fixes #2036073 and #2126721) From fc2e2af422769fe219516b34f8f5e3c31ac6dd74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 22:31:08 +0000 Subject: [PATCH 44/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 44cebb2..97c28f2 100644 --- a/avahi.spec +++ b/avahi.spec @@ -50,7 +50,7 @@ Name: avahi Version: 0.8 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -835,6 +835,9 @@ exit 0 %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 0.8-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Nov 11 2022 Petr Menšík - 0.8-19 - Add upstream PR links to patches From 17e717768085b6f6e70a94d3bea0a66fa5db859d Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 8 Jan 2023 21:10:36 -0500 Subject: [PATCH 45/70] Fix flatpak build --- avahi.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/avahi.spec b/avahi.spec index 97c28f2..a00c4c3 100644 --- a/avahi.spec +++ b/avahi.spec @@ -519,8 +519,8 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/avahi-autoipd rm -rfv %{buildroot}%{_datadir}/%{name}-%{version} # Make /etc/avahi/etc/localtime owned by avahi: -mkdir -p %{buildroot}/etc/avahi/etc -touch %{buildroot}/etc/avahi/etc/localtime +mkdir -p %{buildroot}%{_sysconfdir}/avahi/etc +touch %{buildroot}%{_sysconfdir}/avahi/etc/localtime # fix bug 197414 - add missing symlinks for avahi-compat-howl and avahi-compat-dns-sd %if %{WITH_COMPAT_HOWL} @@ -575,7 +575,7 @@ exit 0 %{?ldconfig} /usr/bin/dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || : if [ "$1" -eq 1 -a -s /etc/localtime ]; then - /usr/bin/cp -cfp /etc/localtime /etc/avahi/etc/localtime >/dev/null 2>&1 || : + /usr/bin/cp -cfp /etc/localtime %{_sysconfdir}/avahi/etc/localtime >/dev/null 2>&1 || : fi %systemd_post avahi-daemon.socket avahi-daemon.service From edb7728055e939608fe16d83873c672d8aca3743 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 19 Mar 2023 01:17:48 -0400 Subject: [PATCH 46/70] Disable GTK2 in ELN/RHEL10 builds gtk2 is unwanted in ELN and RHEL 10. --- avahi.spec | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/avahi.spec b/avahi.spec index a00c4c3..48baffa 100644 --- a/avahi.spec +++ b/avahi.spec @@ -12,8 +12,12 @@ %{?!WITH_QT4: %global WITH_QT4 0} %if %{without bootstrap} +%{?!WITH_GTK2: %global WITH_GTK2 1} +%{?!WITH_GTK3: %global WITH_GTK3 1} %{?!WITH_QT5: %global WITH_QT5 1} %else +%{?!WITH_GTK2: %global WITH_GTK2 0} +%{?!WITH_GTK3: %global WITH_GTK3 0} %{?!WITH_QT5: %global WITH_QT5 0} %endif @@ -30,6 +34,9 @@ %endif %if 0%{?rhel} +%if 0%{?rhel} > 9 +%global WITH_GTK2 0 +%endif %global WITH_MONO 0 %global WITH_QT5 0 %if 0%{?rhel} < 8 @@ -50,7 +57,7 @@ Name: avahi Version: 0.8 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -67,8 +74,10 @@ BuildRequires: libtool BuildRequires: dbus-devel >= 0.90 BuildRequires: dbus-glib-devel >= 0.70 BuildRequires: desktop-file-utils -%if %{without bootstrap} +%if %{WITH_GTK2} BuildRequires: gtk2-devel +%endif +%if %{WITH_GTK3} BuildRequires: gtk3-devel >= 2.99.0 %endif #BuildRequires: gobject-introspection-devel @@ -225,7 +234,7 @@ Requires: %{name}-gobject%{?_isa} = %{version}-%{release} The avahi-gobject-devel package contains the header files and libraries necessary for developing programs using avahi-gobject. -%if %{without bootstrap} +%if %{WITH_GTK2} %package ui Summary: Gtk user interface library for Avahi (Gtk+ 2 version) Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -234,7 +243,9 @@ Requires: gtk2 %description ui This library contains a Gtk 2.x widget for browsing services. +%endif +%if %{WITH_GTK3} %package ui-gtk3 Summary: Gtk user interface library for Avahi (Gtk+ 3 version) Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -243,12 +254,18 @@ Requires: gtk3 %description ui-gtk3 This library contains a Gtk 3.x widget for browsing services. +%endif +%if %{WITH_GTK2} || %{WITH_GTK3} %package ui-devel Summary: Libraries and header files for Avahi UI development Requires: %{name}-devel%{?_isa} = %{version}-%{release} +%if %{WITH_GTK2} Requires: %{name}-ui%{?_isa} = %{version}-%{release} +%endif +%if %{WITH_GTK3} Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release} +%endif %description ui-devel The avahi-ui-devel package contains the header files and libraries @@ -468,10 +485,14 @@ NOCONFIGURE=1 ./autogen.sh --enable-shared=yes \ --enable-static=no \ --disable-silent-rules \ -%if %{without bootstrap} +%if %{WITH_GTK2} --enable-gtk \ %else --disable-gtk \ +%endif +%if %{WITH_GTK3} + --enable-gtk3 \ +%else --disable-gtk3 \ %endif %if ! %{WITH_PYTHON} @@ -737,20 +758,28 @@ exit 0 #%%{_datadir}/gir-1.0/Avahi-0.6.gir #%%{_datadir}/gir-1.0/AvahiCore-0.6.gir -%if %{without bootstrap} +%if %{WITH_GTK2} %files ui %{_libdir}/libavahi-ui.so.* +%endif +%if %{WITH_GTK3} %files ui-gtk3 %{_libdir}/libavahi-ui-gtk3.so.* +%endif +%if %{WITH_GTK2} || %{WITH_GTK3} %files ui-devel -%{_libdir}/libavahi-ui.so -%{_libdir}/libavahi-ui-gtk3.so %{_includedir}/avahi-ui +%if %{WITH_GTK2} +%{_libdir}/libavahi-ui.so %{_libdir}/pkgconfig/avahi-ui.pc +%endif +%if %{WITH_GTK3} +%{_libdir}/libavahi-ui-gtk3.so %{_libdir}/pkgconfig/avahi-ui-gtk3.pc %endif +%endif %if %{WITH_QT3} %ldconfig_scriptlets qt3 @@ -835,6 +864,9 @@ exit 0 %changelog +* Sun Mar 19 2023 Yaakov Selkowitz - 0.8-21 +- Disable GTK2 in ELN/RHEL10 builds + * Wed Jan 18 2023 Fedora Release Engineering - 0.8-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 0596791a389a4b6b888b4ec6d50f648f45f8aa32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 17 Nov 2022 02:07:14 +0100 Subject: [PATCH 47/70] Prevent crashes on some invalid DBus calls --- ...or-if-requested-service-is-not-found.patch | 56 +++++++++++++++++++ avahi.spec | 7 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 0017-Emit-error-if-requested-service-is-not-found.patch diff --git a/0017-Emit-error-if-requested-service-is-not-found.patch b/0017-Emit-error-if-requested-service-is-not-found.patch new file mode 100644 index 0000000..bb22631 --- /dev/null +++ b/0017-Emit-error-if-requested-service-is-not-found.patch @@ -0,0 +1,56 @@ +From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= +Date: Thu, 17 Nov 2022 01:51:53 +0100 +Subject: [PATCH] Emit error if requested service is not found + +It currently just crashes instead of replying with error. Check return +value and emit error instead of passing NULL pointer to reply. + +Fixes #375 +--- + avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c +index 70d7687..406d0b4 100644 +--- a/avahi-daemon/dbus-protocol.c ++++ b/avahi-daemon/dbus-protocol.c +@@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM + } + + t = avahi_alternative_host_name(n); +- avahi_dbus_respond_string(c, m, t); +- avahi_free(t); ++ if (t) { ++ avahi_dbus_respond_string(c, m, t); ++ avahi_free(t); + +- return DBUS_HANDLER_RESULT_HANDLED; ++ return DBUS_HANDLER_RESULT_HANDLED; ++ } else { ++ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found"); ++ } + } + + static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) { +@@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB + } + + t = avahi_alternative_service_name(n); +- avahi_dbus_respond_string(c, m, t); +- avahi_free(t); ++ if (t) { ++ avahi_dbus_respond_string(c, m, t); ++ avahi_free(t); + +- return DBUS_HANDLER_RESULT_HANDLED; ++ return DBUS_HANDLER_RESULT_HANDLED; ++ } else { ++ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found"); ++ } + } + + static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) { +-- +2.38.1 + diff --git a/avahi.spec b/avahi.spec index 48baffa..f9b1bee 100644 --- a/avahi.spec +++ b/avahi.spec @@ -57,7 +57,7 @@ Name: avahi Version: 0.8 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -155,6 +155,8 @@ Patch11: 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch # https://github.com/lathiat/avahi/pull/324 # https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c Patch16: 0016-Fix-NULL-pointer-crashes-from-175.patch +# https://github.com/lathiat/avahi/pull/407 +Patch17: 0017-Emit-error-if-requested-service-is-not-found.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch @@ -864,6 +866,9 @@ exit 0 %changelog +* Sun Mar 19 2023 Petr Menšík - 0.8-22 +- Prevent crashes on some invalid DBus calls + * Sun Mar 19 2023 Yaakov Selkowitz - 0.8-21 - Disable GTK2 in ELN/RHEL10 builds From e9b6c7fb60b4ffc8008f806d8b0f7e93ebf49767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 17 Nov 2022 20:30:56 +0100 Subject: [PATCH 48/70] Provide versioned howl compatibility package Fixes rpmlint warning. --- avahi.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/avahi.spec b/avahi.spec index f9b1bee..ec0579c 100644 --- a/avahi.spec +++ b/avahi.spec @@ -382,8 +382,8 @@ necessary for developing programs using avahi. %package compat-howl Summary: Libraries for howl compatibility Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Obsoletes: howl-libs -Provides: howl-libs +Obsoletes: howl-libs < 0.6-16 +Provides: howl-libs = %{version}-%{release} %description compat-howl Libraries that are compatible with those provided by the howl package. @@ -392,8 +392,8 @@ Libraries that are compatible with those provided by the howl package. Summary: Header files for development with the howl compatibility libraries Requires: %{name}-compat-howl%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} -Obsoletes: howl-devel -Provides: howl-devel +Obsoletes: howl-devel < 0.6-16 +Provides: howl-devel = %{version}-%{release} %description compat-howl-devel Header files for development with the howl compatibility libraries. @@ -868,6 +868,7 @@ exit 0 %changelog * Sun Mar 19 2023 Petr Menšík - 0.8-22 - Prevent crashes on some invalid DBus calls +- Provide versioned howl compatibility package * Sun Mar 19 2023 Yaakov Selkowitz - 0.8-21 - Disable GTK2 in ELN/RHEL10 builds From df02cf92b5b22dd8b3675c8be7239bf9c16924df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 9 Dec 2022 14:34:35 +0100 Subject: [PATCH 49/70] Correct bootstrap option Some tools moved from python dependency to tools, but they broken option to make the build without UI tools. --- avahi.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/avahi.spec b/avahi.spec index ec0579c..76231ca 100644 --- a/avahi.spec +++ b/avahi.spec @@ -576,10 +576,13 @@ rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd %check +%if %{without bootstrap} + for i in %{buildroot}%{_datadir}/applications/b*.desktop ; do + desktop-file-validate $i + done +%endif %if %{WITH_PYTHON} -for i in %{buildroot}%{_datadir}/applications/*.desktop ; do -desktop-file-validate $i -done + desktop-file-validate %{buildroot}%{_datadir}/applications/avahi-discover.desktop %endif @@ -701,6 +704,7 @@ exit 0 %{_mandir}/man1/avahi-resolve-host-name.1* %{_mandir}/man1/avahi-set-host-name.1* +%if %{without bootstrap} %files ui-tools %{_bindir}/bshell %{_bindir}/bssh @@ -719,6 +723,7 @@ exit 0 %{_datadir}/applications/avahi-discover.desktop %{python2_sitelib}/avahi_discover/ %endif +%endif %files devel %{_libdir}/libavahi-common.so @@ -869,6 +874,7 @@ exit 0 * Sun Mar 19 2023 Petr Menšík - 0.8-22 - Prevent crashes on some invalid DBus calls - Provide versioned howl compatibility package +- Correct bootstrap option * Sun Mar 19 2023 Yaakov Selkowitz - 0.8-21 - Disable GTK2 in ELN/RHEL10 builds From e8ad0f7bbb7fdf82a0f0be128bab07b5928322f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 9 Dec 2022 14:56:22 +0100 Subject: [PATCH 50/70] Enable few unit tests during build Upstream contains some unit tests, but they have to be explicitly enabled during configure. Enable them and run them during check phase. --- avahi.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/avahi.spec b/avahi.spec index 76231ca..0188edb 100644 --- a/avahi.spec +++ b/avahi.spec @@ -1,4 +1,5 @@ %bcond_with bootstrap +%bcond_without check %if %{without bootstrap} %{?!WITH_MONO: %global WITH_MONO 1} @@ -487,6 +488,9 @@ NOCONFIGURE=1 ./autogen.sh --enable-shared=yes \ --enable-static=no \ --disable-silent-rules \ +%if %{with check} + --enable-tests \ +%endif %if %{WITH_GTK2} --enable-gtk \ %else @@ -576,6 +580,9 @@ rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd %check +%if %{with check} + %make_build check +%endif %if %{without bootstrap} for i in %{buildroot}%{_datadir}/applications/b*.desktop ; do desktop-file-validate $i @@ -872,6 +879,7 @@ exit 0 %changelog * Sun Mar 19 2023 Petr Menšík - 0.8-22 +- Enable unit tests during check - Prevent crashes on some invalid DBus calls - Provide versioned howl compatibility package - Correct bootstrap option From 13b4bfb1e7fec8b207fd9ae3b810bf093aae29a9 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Wed, 10 May 2023 14:53:13 +0200 Subject: [PATCH 51/70] Drop BR on dbus-glib as the project is not using it at all --- avahi.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 0188edb..fd8103a 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -73,7 +73,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: automake BuildRequires: libtool BuildRequires: dbus-devel >= 0.90 -BuildRequires: dbus-glib-devel >= 0.70 BuildRequires: desktop-file-utils %if %{WITH_GTK2} BuildRequires: gtk2-devel @@ -878,6 +877,9 @@ exit 0 %changelog +* Wed May 10 2023 Tomas Popela - 0.8-23 +- Drop BR on dbus-glib as the project is not using it at all + * Sun Mar 19 2023 Petr Menšík - 0.8-22 - Enable unit tests during check - Prevent crashes on some invalid DBus calls From 224aade90b3c0003527f4c3b0efc44790c35813d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 14:12:24 +0000 Subject: [PATCH 52/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index fd8103a..2a34945 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -877,6 +877,9 @@ exit 0 %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 0.8-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed May 10 2023 Tomas Popela - 0.8-23 - Drop BR on dbus-glib as the project is not using it at all From a328cd9a38304f8263a13899b7ede70b5cece174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Mon, 31 Jul 2023 11:57:18 +0200 Subject: [PATCH 53/70] migrate to SPDX license format --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index 2a34945..50e5547 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,9 +58,9 @@ Name: avahi Version: 0.8 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Local network service discovery -License: LGPLv2+ +License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org Requires: dbus Requires: expat @@ -877,6 +877,9 @@ exit 0 %changelog +* Wed Jul 26 2023 Lukáš Zaoral - 0.8-25 +- migrate to SPDX license format + * Wed Jul 19 2023 Fedora Release Engineering - 0.8-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 8be6b6a65485c5bf90ba81a27df7fe963dd5f59c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 13:59:12 +0000 Subject: [PATCH 54/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 50e5547..b92637e 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -877,6 +877,9 @@ exit 0 %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 0.8-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 26 2023 Lukáš Zaoral - 0.8-25 - migrate to SPDX license format From acf24e6f23bea4aa5832aecb26f5dfcb2e90fe08 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 23:55:22 +0000 Subject: [PATCH 55/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index b92637e..a023462 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -877,6 +877,9 @@ exit 0 %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 0.8-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 0.8-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e53a1dcbb86cda65a320fdd8fa0bfc77851473ad Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Thu, 4 Apr 2024 19:25:41 +0200 Subject: [PATCH 56/70] Add build dependency on gettext-devel --- avahi.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index a023462..88ab8d0 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 27%{?dist} +Release: 28%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -127,6 +127,7 @@ BuildRequires: monodoc-devel BuildRequires: systemd BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: gettext-devel %if 0%{?beta:1} Source0: https://github.com/lathiat/avahi/archive/%{version}-%{beta}.tar.gz#/%{name}-%{version}-%{beta}.tar.gz @@ -877,6 +878,9 @@ exit 0 %changelog +* Thu Apr 04 2024 Michal Sekletar - 0.8-28 +- Add gettext-devel to build dependencies + * Mon Jan 22 2024 Fedora Release Engineering - 0.8-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 9cbffbccff9c5b87e1385f735ae5c0f4620c19eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 17:53:49 +0000 Subject: [PATCH 57/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 88ab8d0..d2001f0 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 28%{?dist} +Release: 29%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -878,6 +878,9 @@ exit 0 %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 0.8-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Apr 04 2024 Michal Sekletar - 0.8-28 - Add gettext-devel to build dependencies From 439702e4fac94f19db56c7d91517d7bf2396003d Mon Sep 17 00:00:00 2001 From: Gordon Messmer Date: Thu, 1 Aug 2024 11:58:26 -0700 Subject: [PATCH 58/70] Examine the server process GOT for signs of tampering. --- .fmf/version | 1 + plans/main.fmf | 6 +++++ tests/got-audit/got-audit.gdb | 2 ++ tests/got-audit/main.fmf | 7 ++++++ tests/got-audit/runtest.sh | 41 +++++++++++++++++++++++++++++++++++ tests/main.fmf | 2 ++ tests/tests.yml | 2 ++ 7 files changed, 61 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/main.fmf create mode 100644 tests/got-audit/got-audit.gdb create mode 100644 tests/got-audit/main.fmf create mode 100755 tests/got-audit/runtest.sh create mode 100644 tests/main.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..ae0c305 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,6 @@ +summary: Run all tests +execute: + how: tmt +discover: + how: fmf + diff --git a/tests/got-audit/got-audit.gdb b/tests/got-audit/got-audit.gdb new file mode 100644 index 0000000..6661297 --- /dev/null +++ b/tests/got-audit/got-audit.gdb @@ -0,0 +1,2 @@ +gef config gef.disable_color True +got-audit --all diff --git a/tests/got-audit/main.fmf b/tests/got-audit/main.fmf new file mode 100644 index 0000000..8295e03 --- /dev/null +++ b/tests/got-audit/main.fmf @@ -0,0 +1,7 @@ +summary: Audit the GOT for signs of tampering +description: | + Pointers in the server process GOT will be checked to ensure that + each function pointer's value is within a shared object file + that exports a symbol of that name, and that no shared object + files export conflicting symbols. +contact: Gordon Messmer diff --git a/tests/got-audit/runtest.sh b/tests/got-audit/runtest.sh new file mode 100755 index 0000000..aa464a9 --- /dev/null +++ b/tests/got-audit/runtest.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/avahi/Sanity/got-audit +# Description: Check pointers in the server process GOT for signs of tampering +# Author: Gordon Messmer +# + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlServiceStart avahi-daemon + rlRun "TestDir=\$(pwd)" + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "auditfile=\$(mktemp --tmpdir=${TmpDir})" + rlPhaseEnd + + rlPhaseStartTest "Run GEF got-audit" + rlRun "SERVICE_PID=\$( systemctl show --property=MainPID avahi-daemon.service | cut -f2 -d= )" + rlRun "echo SERVICE_PID is '$SERVICE_PID'" + [ -n "$SERVICE_PID" ] || rlFail "No service pid was found" + rlRun "gdb-gef --pid '$SERVICE_PID' --command='$TestDir'/got-audit.gdb --batch > '$auditfile'" + # Basic test: ensure that at least one symbol is found in libc.so, + # to verify that the report looks plausible. + rlAssertGrep " : /.*/libc.so" "$auditfile" + # Ensure the got-audit did not report any errors + rlAssertNotGrep " :: ERROR" "$auditfile" + rlRun "cp '$auditfile' '$TMT_TEST_DATA'/got-audit.txt" + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore avahi-daemon + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..f225a72 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,2 @@ +test: ./runtest.sh +framework: beakerlib diff --git a/tests/tests.yml b/tests/tests.yml index 09b2613..5ff2c8d 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -8,9 +8,11 @@ - classic tests: - Basic-sanity-test + - got-audit required_packages: - avahi - avahi-tools - bind - bind-chroot - bind-utils + - gdb-gef # needed to test got-audit From 7ba6797b779da506f97e5336737237e20a07788b Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Tue, 6 Aug 2024 16:32:01 +0200 Subject: [PATCH 59/70] tests: couple of fixlets for got-audit test case --- tests/got-audit/runtest.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/got-audit/runtest.sh b/tests/got-audit/runtest.sh index aa464a9..0b48e98 100755 --- a/tests/got-audit/runtest.sh +++ b/tests/got-audit/runtest.sh @@ -10,8 +10,11 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 +TEST="/CoreOS/avahi/Sanity/got-audit" + rlJournalStart rlPhaseStartSetup + rlServiceStart avahi-daemon.socket rlServiceStart avahi-daemon rlRun "TestDir=\$(pwd)" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" @@ -20,7 +23,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "Run GEF got-audit" - rlRun "SERVICE_PID=\$( systemctl show --property=MainPID avahi-daemon.service | cut -f2 -d= )" + rlRun "SERVICE_PID=\$(systemctl show --property=MainPID --value avahi-daemon.service)" rlRun "echo SERVICE_PID is '$SERVICE_PID'" [ -n "$SERVICE_PID" ] || rlFail "No service pid was found" rlRun "gdb-gef --pid '$SERVICE_PID' --command='$TestDir'/got-audit.gdb --batch > '$auditfile'" @@ -33,9 +36,10 @@ rlJournalStart rlPhaseEnd rlPhaseStartCleanup + rlServiceRestore avahi-daemon.socket rlServiceRestore avahi-daemon rlRun "popd" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd -rlJournalPrintText rlJournalEnd +rlJournalPrintText From 23aab0f744ffa752048cf24a798743aeeadd35e3 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Wed, 21 Aug 2024 17:02:01 +0200 Subject: [PATCH 60/70] Fix file attributes of /run/avahi-daemon Resolves: rhbz#1608918 --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index d2001f0..84f0ab5 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 29%{?dist} +Release: 30%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -660,7 +660,7 @@ exit 0 %ghost %{_sysconfdir}/avahi/etc/localtime %config(noreplace) %{_sysconfdir}/avahi/hosts %dir %{_sysconfdir}/avahi/services -%ghost %dir %{_localstatedir}/run/avahi-daemon +%ghost %attr(0755, avahi, avahi) %dir %{_localstatedir}/run/avahi-daemon %config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf %{_sbindir}/avahi-daemon @@ -878,6 +878,9 @@ exit 0 %changelog +* Wed Aug 21 2024 Michal Sekletar - 0.8-30 +- fix file attributes of /run/avahi-daemon (rhbz#1608918) + * Wed Jul 17 2024 Fedora Release Engineering - 0.8-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 94ef8a637d945417e4172bd42321684c5f7f0699 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 12:03:16 +0000 Subject: [PATCH 61/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 84f0ab5..74d82f1 100644 --- a/avahi.spec +++ b/avahi.spec @@ -58,7 +58,7 @@ Name: avahi Version: 0.8 -Release: 30%{?dist} +Release: 31%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -878,6 +878,9 @@ exit 0 %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.8-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Aug 21 2024 Michal Sekletar - 0.8-30 - fix file attributes of /run/avahi-daemon (rhbz#1608918) From 2858c1b8d7ec8b67fdf3389e04f2f05b19ab8e0e Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Wed, 8 Jan 2025 15:54:10 +0100 Subject: [PATCH 62/70] Rebase to v0.9-rc2 Resolves: #1392924, #2262378, #1356304, #1540180, #2338453 --- .gitignore | 1 + ...ervice-Drop-Also-avahi-daemon.socket.patch | 25 --- 0007-man-add-missing-bshell.1-symlink.patch | 35 ---- ...ver-1-bssh-1-and-bvnc-1-also-for-GTK.patch | 52 ------ 0009-fix-requires-in-pc-file.patch | 24 --- ...testring-decoding-for-proper-display.patch | 32 ---- ..._consume_uint32-fix-potential-undefi.patch | 33 ---- 0016-Fix-NULL-pointer-crashes-from-175.patch | 151 ------------------ 0016-fix-QT3-build.patch | 29 ---- ...or-if-requested-service-is-not-found.patch | 56 ------- avahi-0.8-no_undefined.patch | 47 +----- avahi.spec | 44 ++--- sources | 2 +- 13 files changed, 20 insertions(+), 511 deletions(-) delete mode 100644 0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch delete mode 100644 0007-man-add-missing-bshell.1-symlink.patch delete mode 100644 0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch delete mode 100644 0009-fix-requires-in-pc-file.patch delete mode 100644 0010-fix-bytestring-decoding-for-proper-display.patch delete mode 100644 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch delete mode 100644 0016-Fix-NULL-pointer-crashes-from-175.patch delete mode 100644 0016-fix-QT3-build.patch delete mode 100644 0017-Emit-error-if-requested-service-is-not-found.patch diff --git a/.gitignore b/.gitignore index 004b4bb..6579be4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /avahi-0.6.32.tar.gz /avahi-0.7.tar.gz /avahi-0.8.tar.gz +/v0.9-rc2.tar.gz diff --git a/0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch b/0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch deleted file mode 100644 index d736890..0000000 --- a/0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9c3a314856affb288f701d2d3ee23278fc98eaee Mon Sep 17 00:00:00 2001 -From: Steve Langasek -Date: Tue, 18 Feb 2020 15:43:19 +0800 -Subject: [PATCH 06/11] avahi-dnsconfd.service: Drop "Also=avahi-daemon.socket" - -Also=avahi-daemon.socket' means that 'systemctl disable avahi-dnsconfd' -ill also disable avahi-daemon.socket, which is definitely not what we -ant, and it also causes debhelper to throw an error. Just drop this -entry from the configuration. ---- - avahi-dnsconfd/avahi-dnsconfd.service.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/avahi-dnsconfd/avahi-dnsconfd.service.in b/avahi-dnsconfd/avahi-dnsconfd.service.in -index 95db79f..7c293da 100644 ---- a/avahi-dnsconfd/avahi-dnsconfd.service.in -+++ b/avahi-dnsconfd/avahi-dnsconfd.service.in -@@ -26,4 +26,3 @@ ExecStart=@sbindir@/avahi-dnsconfd -s - - [Install] - WantedBy=multi-user.target --Also=avahi-daemon.socket --- -2.25.2 - diff --git a/0007-man-add-missing-bshell.1-symlink.patch b/0007-man-add-missing-bshell.1-symlink.patch deleted file mode 100644 index 9a79ec3..0000000 --- a/0007-man-add-missing-bshell.1-symlink.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f983df44870b602179b493f9c3d113753b378e27 Mon Sep 17 00:00:00 2001 -From: Michael Biebl -Date: Sun, 17 Sep 2017 12:52:39 +0200 -Subject: [PATCH 07/11] man: add missing bshell.1 symlink - -The bshell binary is missing a symlink to its manual page. It should be -symlinked to the man page for bssh, just like how the bvnc man page is. - -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655190 ---- - man/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/man/Makefile.am b/man/Makefile.am -index d38267c..77a27bd 100644 ---- a/man/Makefile.am -+++ b/man/Makefile.am -@@ -137,12 +137,13 @@ BSSH_LN = - if HAVE_GTK - if HAVE_GLIB - BSSH_LN += $(LN_S) bssh.1 bvnc.1 && -+BSSH_LN += $(LN_S) bssh.1 bshell.1 && - endif - endif - install-exec-local: - mkdir -p $(DESTDIR)/$(mandir)/man1 && \ - cd $(DESTDIR)/$(mandir)/man1 && \ -- rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 bvnc.1 && \ -+ rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 bvnc.1 bshell.1 && \ - $(BSSH_LN) \ - $(LN_S) avahi-resolve.1 avahi-resolve-host-name.1 && \ - $(LN_S) avahi-resolve.1 avahi-resolve-address.1 && \ --- -2.25.2 - diff --git a/0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch b/0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch deleted file mode 100644 index fbcebbb..0000000 --- a/0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 751be804e891aec5701a059144e2f5cbfc981b36 Mon Sep 17 00:00:00 2001 -From: Andreas Henriksson -Date: Thu, 24 Aug 2017 17:52:19 +0200 -Subject: [PATCH 08/11] Ship avahi-discover(1), bssh(1) and bvnc(1) also for - GTK3 - -These manpages went missing when you disabled gtk2 builds.... ---- - man/Makefile.am | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/man/Makefile.am b/man/Makefile.am -index 77a27bd..289b942 100644 ---- a/man/Makefile.am -+++ b/man/Makefile.am -@@ -56,7 +56,7 @@ man_MANS += \ - avahi-publish.1 \ - avahi-set-host-name.1 - --if HAVE_GTK -+if HAVE_GTK2OR3 - man_MANS += \ - bssh.1 - endif -@@ -64,12 +64,13 @@ endif - if HAVE_PYTHON - man_MANS += \ - avahi-bookmarks.1 --if HAVE_GTK -+endif -+ -+if HAVE_PYGOBJECT - man_MANS += \ - avahi-discover.1 - endif - endif --endif - - if ENABLE_AUTOIPD - if HAVE_LIBDAEMON -@@ -134,7 +135,7 @@ EXTRA_DIST = \ - if HAVE_DBUS - - BSSH_LN = --if HAVE_GTK -+if HAVE_GTK2OR3 - if HAVE_GLIB - BSSH_LN += $(LN_S) bssh.1 bvnc.1 && - BSSH_LN += $(LN_S) bssh.1 bshell.1 && --- -2.25.2 - diff --git a/0009-fix-requires-in-pc-file.patch b/0009-fix-requires-in-pc-file.patch deleted file mode 100644 index a93e5c3..0000000 --- a/0009-fix-requires-in-pc-file.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 366e3798bdbd6b7bf24e59379f4a9a51af575ce9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= -Date: Thu, 20 Feb 2020 16:09:40 +0100 -Subject: [PATCH 09/11] fix requires in pc file - ---- - avahi-libevent.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/avahi-libevent.pc.in b/avahi-libevent.pc.in -index a1dca01..3356b0b 100644 ---- a/avahi-libevent.pc.in -+++ b/avahi-libevent.pc.in -@@ -6,6 +6,6 @@ includedir=${prefix}/include - Name: avahi-libevent - Description: Avahi Multicast DNS Responder (libevent Support) - Version: @PACKAGE_VERSION@ --Requires: libevent-2.1.5 -+Requires: libevent >= 2.1.5 - Libs: -L${libdir} -lavahi-libevent - Cflags: -D_REENTRANT -I${includedir} --- -2.25.2 - diff --git a/0010-fix-bytestring-decoding-for-proper-display.patch b/0010-fix-bytestring-decoding-for-proper-display.patch deleted file mode 100644 index ce95875..0000000 --- a/0010-fix-bytestring-decoding-for-proper-display.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a94f72081dd1d546a1d95d860311a1242315bb28 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=89ric=20Araujo?= -Date: Sat, 29 Feb 2020 19:14:04 -0500 -Subject: [PATCH 10/11] fix bytestring decoding for proper display - ---- - avahi-python/avahi-discover/avahi-discover.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/avahi-python/avahi-discover/avahi-discover.py b/avahi-python/avahi-discover/avahi-discover.py -index 0db705d..4a2b575 100755 ---- a/avahi-python/avahi-discover/avahi-discover.py -+++ b/avahi-python/avahi-discover/avahi-discover.py -@@ -238,12 +238,15 @@ class Main_window: - txts+="" + _("TXT") + " %s = %s\n" % (k,v) - else: - txts = "" + _("TXT Data:") + " " + _("empty") + "" -+ -+ txts = txts.decode("utf-8") - - infos = "" + _("Service Type:") + " %s\n" - infos += "" + _("Service Name:") + " %s\n" - infos += "" + _("Domain Name:") + " %s\n" - infos += "" + _("Interface:") + " %s %s\n" - infos += "" + _("Address:") + " %s/%s:%i\n%s" -+ infos = infos.decode("utf-8") - infos = infos % (stype, name, domain, self.siocgifname(interface), self.protoname(protocol), host, address, port, txts.strip()) - self.info_label.set_markup(infos) - --- -2.25.2 - diff --git a/0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch b/0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch deleted file mode 100644 index d5bbf20..0000000 --- a/0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b897ca43ac100d326d118e5877da710eb7f836f9 Mon Sep 17 00:00:00 2001 -From: traffic-millions <60914101+traffic-millions@users.noreply.github.com> -Date: Tue, 3 Mar 2020 11:15:48 +0800 -Subject: [PATCH 11/11] avahi_dns_packet_consume_uint32: fix potential - undefined behavior - -avahi_dns_packet_consume_uint32 left shifts uint8_t values by 8, 16 and 24 bits to combine them into a 32-bit value. This produces an undefined behavior warning with gcc -fsanitize when fed input values of 128 or 255 however in testing no actual unexpected behavior occurs in practice and the 32-bit uint32_t is always correctly produced as the final value is immediately stored into a uint32_t and the compiler appears to handle this "correctly". - -Cast the intermediate values to uint32_t to prevent this warning and ensure the intended result is explicit. - -Closes: #267 -Closes: #268 -Reference: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19304 ---- - avahi-core/dns.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/avahi-core/dns.c b/avahi-core/dns.c -index 7c38f42..d793b76 100644 ---- a/avahi-core/dns.c -+++ b/avahi-core/dns.c -@@ -455,7 +455,7 @@ int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v) { - return -1; - - d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex); -- *ret_v = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; -+ *ret_v = ((uint32_t)d[0] << 24) | ((uint32_t)d[1] << 16) | ((uint32_t)d[2] << 8) | (uint32_t)d[3]; - p->rindex += sizeof(uint32_t); - - return 0; --- -2.25.2 - diff --git a/0016-Fix-NULL-pointer-crashes-from-175.patch b/0016-Fix-NULL-pointer-crashes-from-175.patch deleted file mode 100644 index 878073e..0000000 --- a/0016-Fix-NULL-pointer-crashes-from-175.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 9d31939e55280a733d930b15ac9e4dda4497680c Mon Sep 17 00:00:00 2001 -From: Tommi Rantala -Date: Mon, 8 Feb 2021 11:04:43 +0200 -Subject: [PATCH 16/16] Fix NULL pointer crashes from #175 - -avahi-daemon is crashing when running "ping .local". -The crash is due to failing assertion from NULL pointer. -Add missing NULL pointer checks to fix it. - -Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd ---- - avahi-core/browse-dns-server.c | 5 ++++- - avahi-core/browse-domain.c | 5 ++++- - avahi-core/browse-service-type.c | 3 +++ - avahi-core/browse-service.c | 3 +++ - avahi-core/browse.c | 3 +++ - avahi-core/resolve-address.c | 5 ++++- - avahi-core/resolve-host-name.c | 5 ++++- - avahi-core/resolve-service.c | 5 ++++- - 8 files changed, 29 insertions(+), 5 deletions(-) - -diff --git a/avahi-core/browse-dns-server.c b/avahi-core/browse-dns-server.c -index 049752e..c2d914f 100644 ---- a/avahi-core/browse-dns-server.c -+++ b/avahi-core/browse-dns-server.c -@@ -343,7 +343,10 @@ AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new( - AvahiSDNSServerBrowser* b; - - b = avahi_s_dns_server_browser_prepare(server, interface, protocol, domain, type, aprotocol, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_dns_server_browser_start(b); - - return b; --} -\ No newline at end of file -+} -diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c -index f145d56..06fa70c 100644 ---- a/avahi-core/browse-domain.c -+++ b/avahi-core/browse-domain.c -@@ -253,7 +253,10 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new( - AvahiSDomainBrowser *b; - - b = avahi_s_domain_browser_prepare(server, interface, protocol, domain, type, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_domain_browser_start(b); - - return b; --} -\ No newline at end of file -+} -diff --git a/avahi-core/browse-service-type.c b/avahi-core/browse-service-type.c -index fdd22dc..b1fc7af 100644 ---- a/avahi-core/browse-service-type.c -+++ b/avahi-core/browse-service-type.c -@@ -171,6 +171,9 @@ AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new( - AvahiSServiceTypeBrowser *b; - - b = avahi_s_service_type_browser_prepare(server, interface, protocol, domain, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_service_type_browser_start(b); - - return b; -diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c -index 5531360..63e0275 100644 ---- a/avahi-core/browse-service.c -+++ b/avahi-core/browse-service.c -@@ -184,6 +184,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_new( - AvahiSServiceBrowser *b; - - b = avahi_s_service_browser_prepare(server, interface, protocol, service_type, domain, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_service_browser_start(b); - - return b; -diff --git a/avahi-core/browse.c b/avahi-core/browse.c -index 2941e57..e8a915e 100644 ---- a/avahi-core/browse.c -+++ b/avahi-core/browse.c -@@ -634,6 +634,9 @@ AvahiSRecordBrowser *avahi_s_record_browser_new( - AvahiSRecordBrowser *b; - - b = avahi_s_record_browser_prepare(server, interface, protocol, key, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_record_browser_start_query(b); - - return b; -diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c -index ac0b29b..e61dd24 100644 ---- a/avahi-core/resolve-address.c -+++ b/avahi-core/resolve-address.c -@@ -286,7 +286,10 @@ AvahiSAddressResolver *avahi_s_address_resolver_new( - AvahiSAddressResolver *b; - - b = avahi_s_address_resolver_prepare(server, interface, protocol, address, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_address_resolver_start(b); - - return b; --} -\ No newline at end of file -+} -diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c -index 808b0e7..4e8e597 100644 ---- a/avahi-core/resolve-host-name.c -+++ b/avahi-core/resolve-host-name.c -@@ -318,7 +318,10 @@ AvahiSHostNameResolver *avahi_s_host_name_resolver_new( - AvahiSHostNameResolver *b; - - b = avahi_s_host_name_resolver_prepare(server, interface, protocol, host_name, aprotocol, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_host_name_resolver_start(b); - - return b; --} -\ No newline at end of file -+} -diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c -index 66bf3ca..4377176 100644 ---- a/avahi-core/resolve-service.c -+++ b/avahi-core/resolve-service.c -@@ -519,7 +519,10 @@ AvahiSServiceResolver *avahi_s_service_resolver_new( - AvahiSServiceResolver *b; - - b = avahi_s_service_resolver_prepare(server, interface, protocol, name, type, domain, aprotocol, flags, callback, userdata); -+ if (!b) -+ return NULL; -+ - avahi_s_service_resolver_start(b); - - return b; --} -\ No newline at end of file -+} --- -2.31.1 - diff --git a/0016-fix-QT3-build.patch b/0016-fix-QT3-build.patch deleted file mode 100644 index 470c212..0000000 --- a/0016-fix-QT3-build.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 66a684b988052664669158819fc123469b714f50 Mon Sep 17 00:00:00 2001 -From: Rex Dieter -Date: Tue, 17 Nov 2020 16:42:00 -0600 -Subject: [PATCH 16/16] fix QT3 build - -recent commit d1e71b320d96d0f213ecb0885c8313039a09f693 adding QT5 -support added a new conditional -but failed to actually set the define. This commit adds that to -allow successful build when enabling QT3 support ---- - avahi-qt/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/avahi-qt/Makefile.am b/avahi-qt/Makefile.am -index 09ce7ca..b404810 100644 ---- a/avahi-qt/Makefile.am -+++ b/avahi-qt/Makefile.am -@@ -38,7 +38,7 @@ libavahi_qt3_la_SOURCES = \ - qt-watch.moc3: qt-watch.cpp - $(AM_V_GEN)$(MOC_QT3) $^ > $@ - --libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS) -+libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) - libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) - libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) - endif --- -2.28.0 - diff --git a/0017-Emit-error-if-requested-service-is-not-found.patch b/0017-Emit-error-if-requested-service-is-not-found.patch deleted file mode 100644 index bb22631..0000000 --- a/0017-Emit-error-if-requested-service-is-not-found.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= -Date: Thu, 17 Nov 2022 01:51:53 +0100 -Subject: [PATCH] Emit error if requested service is not found - -It currently just crashes instead of replying with error. Check return -value and emit error instead of passing NULL pointer to reply. - -Fixes #375 ---- - avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c -index 70d7687..406d0b4 100644 ---- a/avahi-daemon/dbus-protocol.c -+++ b/avahi-daemon/dbus-protocol.c -@@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM - } - - t = avahi_alternative_host_name(n); -- avahi_dbus_respond_string(c, m, t); -- avahi_free(t); -+ if (t) { -+ avahi_dbus_respond_string(c, m, t); -+ avahi_free(t); - -- return DBUS_HANDLER_RESULT_HANDLED; -+ return DBUS_HANDLER_RESULT_HANDLED; -+ } else { -+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found"); -+ } - } - - static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) { -@@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB - } - - t = avahi_alternative_service_name(n); -- avahi_dbus_respond_string(c, m, t); -- avahi_free(t); -+ if (t) { -+ avahi_dbus_respond_string(c, m, t); -+ avahi_free(t); - -- return DBUS_HANDLER_RESULT_HANDLED; -+ return DBUS_HANDLER_RESULT_HANDLED; -+ } else { -+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found"); -+ } - } - - static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) { --- -2.38.1 - diff --git a/avahi-0.8-no_undefined.patch b/avahi-0.8-no_undefined.patch index 04dc068..1d6f786 100644 --- a/avahi-0.8-no_undefined.patch +++ b/avahi-0.8-no_undefined.patch @@ -1,12 +1,10 @@ -diff -up avahi-0.8/avahi-qt/Makefile.am.no_undefined avahi-0.8/avahi-qt/Makefile.am ---- avahi-0.8/avahi-qt/Makefile.am.no_undefined 2018-09-14 00:31:28.490023071 -0500 -+++ avahi-0.8/avahi-qt/Makefile.am 2020-11-17 16:35:04.646045499 -0600 -@@ -38,9 +38,9 @@ libavahi_qt3_la_SOURCES = \ - qt-watch.moc3: qt-watch.cpp - $(AM_V_GEN)$(MOC_QT3) $^ > $@ +diff --git a/avahi-qt/Makefile.am b/avahi-qt/Makefile.am +index b404810..6911db8 100644 +--- a/avahi-qt/Makefile.am ++++ b/avahi-qt/Makefile.am +@@ -40,7 +40,7 @@ qt-watch.moc3: qt-watch.cpp --libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) -+libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) + libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) -libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) +libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) @@ -31,36 +29,3 @@ diff -up avahi-0.8/avahi-qt/Makefile.am.no_undefined avahi-0.8/avahi-qt/Makefile endif CLEANFILES = $(BUILT_SOURCES) -diff -up avahi-0.8/avahi-qt/Makefile.in.no_undefined avahi-0.8/avahi-qt/Makefile.in ---- avahi-0.8/avahi-qt/Makefile.in.no_undefined 2020-02-18 01:03:16.474614659 -0600 -+++ avahi-0.8/avahi-qt/Makefile.in 2020-11-17 16:36:12.263297534 -0600 -@@ -551,9 +551,9 @@ BUILT_SOURCES = $(am__append_2) $(am__ap - @HAVE_QT3_TRUE@libavahi_qt3_la_SOURCES = \ - @HAVE_QT3_TRUE@ qt-watch.cpp - --@HAVE_QT3_TRUE@libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS) -+@HAVE_QT3_TRUE@libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS) - @HAVE_QT3_TRUE@libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) --@HAVE_QT3_TRUE@libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) -+@HAVE_QT3_TRUE@libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO) - @HAVE_QT4_TRUE@avahiqt4includedir = $(includedir)/avahi-qt4 - @HAVE_QT4_TRUE@avahiqt4include_HEADERS = \ - @HAVE_QT4_TRUE@ qt-watch.h -@@ -563,7 +563,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap - - @HAVE_QT4_TRUE@libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS) - @HAVE_QT4_TRUE@libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS) --@HAVE_QT4_TRUE@libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO) -+@HAVE_QT4_TRUE@libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT4_VERSION_INFO) - @HAVE_QT5_TRUE@avahiqt5includedir = $(includedir)/avahi-qt5 - @HAVE_QT5_TRUE@avahiqt5include_HEADERS = \ - @HAVE_QT5_TRUE@ qt-watch.h -@@ -573,7 +573,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap - - @HAVE_QT5_TRUE@libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS) - @HAVE_QT5_TRUE@libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS) --@HAVE_QT5_TRUE@libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO) -+@HAVE_QT5_TRUE@libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT5_VERSION_INFO) - CLEANFILES = $(BUILT_SOURCES) - all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/avahi.spec b/avahi.spec index 74d82f1..fd822b2 100644 --- a/avahi.spec +++ b/avahi.spec @@ -56,9 +56,11 @@ # trim changelog included in binary rpms %global _changelog_trimtime %(date +%s -d "1 year ago") +%define rc rc2 + Name: avahi -Version: 0.8 -Release: 31%{?dist} +Version: 0.9%{?rc:~%{rc}} +Release: 1%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -129,41 +131,16 @@ BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gettext-devel -%if 0%{?beta:1} -Source0: https://github.com/lathiat/avahi/archive/%{version}-%{beta}.tar.gz#/%{name}-%{version}-%{beta}.tar.gz +%if 0%{?rc:1} +Source0: https://github.com/avahi/avahi/archive/refs/tags/v%{version_no_tilde}.tar.gz %else -Source0: https://github.com/lathiat/avahi/releases/download/v%{version}/avahi-%{version}.tar.gz -#Source0: http://avahi.org/download/avahi-%%{version}.tar.gz +Source0: https://github.com/avahi/avahi/releases/download/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz %endif ## upstream patches -# https://github.com/lathiat/avahi/commit/9c3a314856affb288f701d2d3ee23278fc98eaee -Patch6: 0006-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch -# https://github.com/lathiat/avahi/pull/148 -# https://github.com/lathiat/avahi/commit/f983df44870b602179b493f9c3d113753b378e27 -Patch7: 0007-man-add-missing-bshell.1-symlink.patch -# https://github.com/lathiat/avahi/pull/142 -Patch8: 0008-Ship-avahi-discover-1-bssh-1-and-bvnc-1-also-for-GTK.patch -# https://github.com/lathiat/avahi/pull/265 -# https://github.com/lathiat/avahi/commit/366e3798bdbd6b7bf24e59379f4a9a51af575ce9 -Patch9: 0009-fix-requires-in-pc-file.patch -# https://github.com/lathiat/avahi/pull/270 -# https://github.com/lathiat/avahi/commit/a94f72081dd1d546a1d95d860311a1242315bb28 -Patch10: 0010-fix-bytestring-decoding-for-proper-display.patch -# https://github.com/lathiat/avahi/pull/268 -# https://github.com/lathiat/avahi/commit/b897ca43ac100d326d118e5877da710eb7f836f9 -Patch11: 0011-avahi_dns_packet_consume_uint32-fix-potential-undefi.patch -# https://github.com/lathiat/avahi/pull/324 -# https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c -Patch16: 0016-Fix-NULL-pointer-crashes-from-175.patch -# https://github.com/lathiat/avahi/pull/407 -Patch17: 0017-Emit-error-if-requested-service-is-not-found.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1897925 -# https://github.com/lathiat/avahi/pull/312 -Patch101: 0016-fix-QT3-build.patch Patch102: avahi-0.8-no_undefined.patch %description @@ -463,7 +440,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %prep -%autosetup -n %{name}-%{version}%{?beta:-%{beta}} -p1 +%autosetup -n %{name}-%{version_no_tilde} -p1 rm -fv docs/INSTALL @@ -662,7 +639,7 @@ exit 0 %dir %{_sysconfdir}/avahi/services %ghost %attr(0755, avahi, avahi) %dir %{_localstatedir}/run/avahi-daemon %config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf +%config(noreplace) %{_datadir}/dbus-1/system.d/avahi-dbus.conf %{_sbindir}/avahi-daemon %dir %{_datadir}/avahi %{_datadir}/avahi/*.dtd @@ -878,6 +855,9 @@ exit 0 %changelog +- Thu Jan 16 2025 Michal Sekletar - 0.9~rc2-1 +- Rebase to 0.9-rc2 + * Thu Jan 16 2025 Fedora Release Engineering - 0.8-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 1f07284..965ac12 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (avahi-0.8.tar.gz) = c6ba76feb6e92f70289f94b3bf12e5f5c66c11628ce0aeb3cadfb72c13a5d1a9bd56d71bdf3072627a76cd103b9b056d9131aa49ffe11fa334c24ab3b596c7de +SHA512 (v0.9-rc2.tar.gz) = 29d6c9d075d0202b9da2cdf935fa04fad31ba95475ba5de086c9958d25caa405925bbd82ed439a024febf7880325e80c1a032a660284a7708c71dae9076f413b From dd144f1100bfc3b3549dc62af7aad84995adf194 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Thu, 16 Jan 2025 18:58:41 +0100 Subject: [PATCH 63/70] Fix previous changelog entry %changelog entries must start with * --- avahi.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avahi.spec b/avahi.spec index fd822b2..2a3f7af 100644 --- a/avahi.spec +++ b/avahi.spec @@ -60,7 +60,7 @@ Name: avahi Version: 0.9%{?rc:~%{rc}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -855,7 +855,10 @@ exit 0 %changelog -- Thu Jan 16 2025 Michal Sekletar - 0.9~rc2-1 +* Thu Jan 16 2025 Michal Sekletar - 0.9~rc2-2 +- Fix previous changelog entry + +* Thu Jan 16 2025 Michal Sekletar - 0.9~rc2-1 - Rebase to 0.9-rc2 * Thu Jan 16 2025 Fedora Release Engineering - 0.8-31 From 00689142519e3b3cdb1bb3bffb95a6433357be08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 23 Jan 2025 17:43:41 +0100 Subject: [PATCH 64/70] Add sysusers.d config file to allow rpm to create users/groups automatically --- avahi.spec | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/avahi.spec b/avahi.spec index 2a3f7af..2dd6e30 100644 --- a/avahi.spec +++ b/avahi.spec @@ -60,7 +60,7 @@ Name: avahi Version: 0.9%{?rc:~%{rc}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -69,7 +69,6 @@ Requires: expat Requires: libdaemon >= 0.11 # For /usr/bin/dbus-send Requires(post): dbus -Requires(pre): shadow-utils Requires(pre): coreutils Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: automake @@ -397,7 +396,6 @@ libraries. %package autoipd Summary: Link-local IPv4 address automatic configuration daemon (IPv4LL) -Requires(pre): shadow-utils Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description autoipd @@ -444,6 +442,11 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} rm -fv docs/INSTALL +# Create a sysusers.d config file +cat >avahi.sysusers.conf </dev/null || groupadd -f -g 70 -r avahi -if ! getent passwd avahi > /dev/null ; then - if ! getent passwd 70 > /dev/null ; then - useradd -r -l -u 70 -g avahi -d %{_localstatedir}/run/avahi-daemon -s /sbin/nologin -c "Avahi mDNS/DNS-SD Stack" avahi - else - useradd -r -l -g avahi -d %{_localstatedir}/run/avahi-daemon -s /sbin/nologin -c "Avahi mDNS/DNS-SD Stack" avahi - fi -fi -exit 0 - %post %{?ldconfig} /usr/bin/dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || : @@ -654,6 +648,7 @@ exit 0 %{_datadir}/dbus-1/interfaces/*.xml %{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service %{_libdir}/libavahi-core.so.* +%{_sysusersdir}/avahi.conf %files autoipd %{_sbindir}/avahi-autoipd @@ -855,6 +850,9 @@ exit 0 %changelog +* Thu Jan 23 2025 Zbigniew Jędrzejewski-Szmek - 0.9~rc2-3 +- Add sysusers.d config file to allow rpm to create users/groups automatically + * Thu Jan 16 2025 Michal Sekletar - 0.9~rc2-2 - Fix previous changelog entry From 9f7c403b666411b561c272f8c542f880cfb32d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 14 Apr 2025 16:44:43 +0200 Subject: [PATCH 65/70] Also create sysusers.d config file for the avahi-autoipd user Two files are needed because the second second user is for a subpackage. I missed the second user in the first sweep. --- avahi.spec | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/avahi.spec b/avahi.spec index 2dd6e30..76b125d 100644 --- a/avahi.spec +++ b/avahi.spec @@ -60,7 +60,7 @@ Name: avahi Version: 0.9%{?rc:~%{rc}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -442,10 +442,13 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} rm -fv docs/INSTALL -# Create a sysusers.d config file +# Create two sysusers.d config files cat >avahi.sysusers.conf <avahi-autoipd.sysusers.conf </dev/null || groupadd -f -g 170 -r avahi-autoipd -if ! getent passwd avahi-autoipd > /dev/null ; then - if ! getent passwd 170 > /dev/null; then - useradd -r -u 170 -l -g avahi-autoipd -d %{_localstatedir}/lib/avahi-autoipd -s /sbin/nologin -c "Avahi IPv4LL Stack" avahi-autoipd - else - useradd -r -l -g avahi-autoipd -d %{_localstatedir}/lib/avahi-autoipd -s /sbin/nologin -c "Avahi IPv4LL Stack" avahi-autoipd - fi -fi -exit 0 - %post dnsconfd %systemd_post avahi-dnsconfd.service @@ -655,6 +648,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/avahi/avahi-autoipd.action %attr(1770,avahi-autoipd,avahi-autoipd) %dir %{_localstatedir}/lib/avahi-autoipd/ %{_mandir}/man8/avahi-autoipd.* +%{_sysusersdir}/avahi-autoipd.conf %files dnsconfd %config(noreplace) %{_sysconfdir}/avahi/avahi-dnsconfd.action @@ -850,6 +844,9 @@ exit 0 %changelog +* Mon Apr 14 2025 Zbigniew Jędrzejewski-Szmek - 0.9~rc2-4 +- Also create sysusers.d config file for the avahi-autoipd user + * Thu Jan 23 2025 Zbigniew Jędrzejewski-Szmek - 0.9~rc2-3 - Add sysusers.d config file to allow rpm to create users/groups automatically From c167401b13d85b5bd139cb953b39833d09f37d9a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 17:29:07 +0000 Subject: [PATCH 66/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 76b125d..fede254 100644 --- a/avahi.spec +++ b/avahi.spec @@ -60,7 +60,7 @@ Name: avahi Version: 0.9%{?rc:~%{rc}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -844,6 +844,9 @@ fi %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 0.9~rc2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Apr 14 2025 Zbigniew Jędrzejewski-Szmek - 0.9~rc2-4 - Also create sysusers.d config file for the avahi-autoipd user From 4738e71dd587d9503152ea31f6a44f197be49ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 4 Jun 2025 17:00:10 +0200 Subject: [PATCH 67/70] Fix randomization of DNS source port in wide area (CVE-2024-52615) https://github.com/avahi/avahi/pull/662 --- avahi-0.9-CVE-2024-52615.patch | 224 +++++++++++++++++++++++++++++++++ avahi.spec | 7 +- 2 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 avahi-0.9-CVE-2024-52615.patch diff --git a/avahi-0.9-CVE-2024-52615.patch b/avahi-0.9-CVE-2024-52615.patch new file mode 100644 index 0000000..3a36c57 --- /dev/null +++ b/avahi-0.9-CVE-2024-52615.patch @@ -0,0 +1,224 @@ +From 4e2e1ea0908d7e6ad7f38ae04fdcdf2411f8b942 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Wed, 27 Nov 2024 18:07:32 +0100 +Subject: [PATCH] core/wide-area: fix for CVE-2024-52615 + +--- + avahi-core/wide-area.c | 128 ++++++++++++++++++++++------------------- + 1 file changed, 69 insertions(+), 59 deletions(-) + +diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c +index 00a15056e..06df7afc6 100644 +--- a/avahi-core/wide-area.c ++++ b/avahi-core/wide-area.c +@@ -81,6 +81,10 @@ struct AvahiWideAreaLookup { + + AvahiAddress dns_server_used; + ++ int fd; ++ AvahiWatch *watch; ++ AvahiProtocol proto; ++ + AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, lookups); + AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, by_key); + }; +@@ -88,9 +92,6 @@ struct AvahiWideAreaLookup { + struct AvahiWideAreaLookupEngine { + AvahiServer *server; + +- int fd_ipv4, fd_ipv6; +- AvahiWatch *watch_ipv4, *watch_ipv6; +- + /* Cache */ + AVAHI_LLIST_HEAD(AvahiWideAreaCacheEntry, cache); + AvahiHashmap *cache_by_key; +@@ -125,35 +126,67 @@ static AvahiWideAreaLookup* find_lookup(AvahiWideAreaLookupEngine *e, uint16_t i + return l; + } + ++static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata); ++ + static int send_to_dns_server(AvahiWideAreaLookup *l, AvahiDnsPacket *p) { ++ AvahiWideAreaLookupEngine *e; + AvahiAddress *a; ++ AvahiServer *s; ++ AvahiWatch *w; ++ int r; + + assert(l); + assert(p); + +- if (l->engine->n_dns_servers <= 0) ++ e = l->engine; ++ assert(e); ++ ++ s = e->server; ++ assert(s); ++ ++ if (e->n_dns_servers <= 0) + return -1; + +- assert(l->engine->current_dns_server < l->engine->n_dns_servers); ++ assert(e->current_dns_server < e->n_dns_servers); + +- a = &l->engine->dns_servers[l->engine->current_dns_server]; ++ a = &e->dns_servers[e->current_dns_server]; + l->dns_server_used = *a; + +- if (a->proto == AVAHI_PROTO_INET) { ++ if (l->fd >= 0) { ++ /* We are reusing lookup object and sending packet to another server so let's cleanup before we establish connection to new server. */ ++ s->poll_api->watch_free(l->watch); ++ l->watch = NULL; + +- if (l->engine->fd_ipv4 < 0) +- return -1; ++ close(l->fd); ++ l->fd = -EBADF; ++ } + +- return avahi_send_dns_packet_ipv4(l->engine->fd_ipv4, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT); ++ assert(a->proto == AVAHI_PROTO_INET || a->proto == AVAHI_PROTO_INET6); + +- } else { +- assert(a->proto == AVAHI_PROTO_INET6); ++ if (a->proto == AVAHI_PROTO_INET) ++ r = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1; ++ else ++ r = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1; + +- if (l->engine->fd_ipv6 < 0) +- return -1; ++ if (r < 0) { ++ avahi_log_error(__FILE__ ": Failed to create socket for wide area lookup"); ++ return -1; ++ } + +- return avahi_send_dns_packet_ipv6(l->engine->fd_ipv6, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT); ++ w = s->poll_api->watch_new(s->poll_api, r, AVAHI_WATCH_IN, socket_event, l); ++ if (!w) { ++ close(r); ++ avahi_log_error(__FILE__ ": Failed to create socket watch for wide area lookup"); ++ return -1; + } ++ ++ l->fd = r; ++ l->watch = w; ++ l->proto = a->proto; ++ ++ return a->proto == AVAHI_PROTO_INET ? ++ avahi_send_dns_packet_ipv4(l->fd, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT): ++ avahi_send_dns_packet_ipv6(l->fd, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT); + } + + static void next_dns_server(AvahiWideAreaLookupEngine *e) { +@@ -246,6 +279,9 @@ AvahiWideAreaLookup *avahi_wide_area_lookup_new( + l->dead = 0; + l->key = avahi_key_ref(key); + l->cname_key = avahi_key_new_cname(l->key); ++ l->fd = -EBADF; ++ l->watch = NULL; ++ l->proto = AVAHI_PROTO_UNSPEC; + l->callback = callback; + l->userdata = userdata; + +@@ -314,6 +350,12 @@ static void lookup_destroy(AvahiWideAreaLookup *l) { + if (l->cname_key) + avahi_key_unref(l->cname_key); + ++ if (l->watch) ++ l->engine->server->poll_api->watch_free(l->watch); ++ ++ if (l->fd >= 0) ++ close(l->fd); ++ + avahi_free(l); + } + +@@ -572,14 +614,20 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) { + } + + static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata) { +- AvahiWideAreaLookupEngine *e = userdata; ++ AvahiWideAreaLookup *l = userdata; ++ AvahiWideAreaLookupEngine *e = l->engine; + AvahiDnsPacket *p = NULL; + +- if (fd == e->fd_ipv4) +- p = avahi_recv_dns_packet_ipv4(e->fd_ipv4, NULL, NULL, NULL, NULL, NULL); ++ assert(l); ++ assert(e); ++ assert(l->fd == fd); ++ ++ if (l->proto == AVAHI_PROTO_INET) ++ p = avahi_recv_dns_packet_ipv4(l->fd, NULL, NULL, NULL, NULL, NULL); + else { +- assert(fd == e->fd_ipv6); +- p = avahi_recv_dns_packet_ipv6(e->fd_ipv6, NULL, NULL, NULL, NULL, NULL); ++ assert(l->proto == AVAHI_PROTO_INET6); ++ ++ p = avahi_recv_dns_packet_ipv6(l->fd, NULL, NULL, NULL, NULL, NULL); + } + + if (p) { +@@ -598,32 +646,6 @@ AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s) { + e->server = s; + e->cleanup_dead = 0; + +- /* Create sockets */ +- e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1; +- e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1; +- +- if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) { +- avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno)); +- +- if (e->fd_ipv6 >= 0) +- close(e->fd_ipv6); +- +- if (e->fd_ipv4 >= 0) +- close(e->fd_ipv4); +- +- avahi_free(e); +- return NULL; +- } +- +- /* Create watches */ +- +- e->watch_ipv4 = e->watch_ipv6 = NULL; +- +- if (e->fd_ipv4 >= 0) +- e->watch_ipv4 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv4, AVAHI_WATCH_IN, socket_event, e); +- if (e->fd_ipv6 >= 0) +- e->watch_ipv6 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv6, AVAHI_WATCH_IN, socket_event, e); +- + e->n_dns_servers = e->current_dns_server = 0; + + /* Initialize cache */ +@@ -651,18 +673,6 @@ void avahi_wide_area_engine_free(AvahiWideAreaLookupEngine *e) { + avahi_hashmap_free(e->lookups_by_id); + avahi_hashmap_free(e->lookups_by_key); + +- if (e->watch_ipv4) +- e->server->poll_api->watch_free(e->watch_ipv4); +- +- if (e->watch_ipv6) +- e->server->poll_api->watch_free(e->watch_ipv6); +- +- if (e->fd_ipv6 >= 0) +- close(e->fd_ipv6); +- +- if (e->fd_ipv4 >= 0) +- close(e->fd_ipv4); +- + avahi_free(e); + } + +@@ -680,7 +690,7 @@ void avahi_wide_area_set_servers(AvahiWideAreaLookupEngine *e, const AvahiAddres + + if (a) { + for (e->n_dns_servers = 0; n > 0 && e->n_dns_servers < AVAHI_WIDE_AREA_SERVERS_MAX; a++, n--) +- if ((a->proto == AVAHI_PROTO_INET && e->fd_ipv4 >= 0) || (a->proto == AVAHI_PROTO_INET6 && e->fd_ipv6 >= 0)) ++ if (a->proto == AVAHI_PROTO_INET || a->proto == AVAHI_PROTO_INET6) + e->dns_servers[e->n_dns_servers++] = *a; + } else { + assert(n == 0); diff --git a/avahi.spec b/avahi.spec index fede254..40dabf4 100644 --- a/avahi.spec +++ b/avahi.spec @@ -60,7 +60,7 @@ Name: avahi Version: 0.9%{?rc:~%{rc}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -137,6 +137,8 @@ Source0: https://github.com/avahi/avahi/releases/download/v%{version_no %endif ## upstream patches +# https://github.com/avahi/avahi/pull/662 +Patch1: avahi-0.9-CVE-2024-52615.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch @@ -844,6 +846,9 @@ fi %changelog +* Tue Aug 05 2025 Petr Menšík - 0.9~rc2-6 +- Fix port randomization for wide area queries (CVE-2024-52615) + * Wed Jul 23 2025 Fedora Release Engineering - 0.9~rc2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 9391e1eeb38892f1b21ab71edb4f2f926f98601b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 4 Jun 2025 17:03:11 +0200 Subject: [PATCH 68/70] Require systemd-devel --- avahi.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avahi.spec b/avahi.spec index 40dabf4..082ee61 100644 --- a/avahi.spec +++ b/avahi.spec @@ -126,6 +126,7 @@ BuildRequires: mono-devel BuildRequires: monodoc-devel %endif BuildRequires: systemd +BuildRequires: systemd-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gettext-devel @@ -848,6 +849,7 @@ fi %changelog * Tue Aug 05 2025 Petr Menšík - 0.9~rc2-6 - Fix port randomization for wide area queries (CVE-2024-52615) +- Add systemd-devel dependency * Wed Jul 23 2025 Fedora Release Engineering - 0.9~rc2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From b19244db41146b4456d09f0fb9872da5b04a59b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 5 Aug 2025 15:53:59 +0200 Subject: [PATCH 69/70] Fix fortify_source detected issue in test Prevent crash stopped by fortification source hardening. Make it compiled with new defaults. https://github.com/avahi/avahi/pull/707 --- avahi-0.9-address-data-size.patch | 30 ++++++++++++++++++++++++++++++ avahi.spec | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 avahi-0.9-address-data-size.patch diff --git a/avahi-0.9-address-data-size.patch b/avahi-0.9-address-data-size.patch new file mode 100644 index 0000000..70a64d5 --- /dev/null +++ b/avahi-0.9-address-data-size.patch @@ -0,0 +1,30 @@ +From 358e5a3b0122b418614e2ac0fc71f6aad1de06f8 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 23 Jun 2025 16:27:40 +0200 +Subject: [PATCH] Make data member as big as IPv6 address + +Unfortunately, recent FORTIFY_SOURCE hardening for inet_pton() can't +deal with our type independent "data[1]" union member trick. + +Fixes #699 +--- + avahi-common/address.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/avahi-common/address.h b/avahi-common/address.h +index a14104fad..013fa975e 100644 +--- a/avahi-common/address.h ++++ b/avahi-common/address.h +@@ -71,9 +71,9 @@ typedef struct AvahiAddress { + AvahiProtocol proto; /**< Address family */ + + union { +- AvahiIPv6Address ipv6; /**< Address when IPv6 */ +- AvahiIPv4Address ipv4; /**< Address when IPv4 */ +- uint8_t data[1]; /**< Type-independent data field */ ++ AvahiIPv6Address ipv6; /**< Address when IPv6 */ ++ AvahiIPv4Address ipv4; /**< Address when IPv4 */ ++ uint8_t data[sizeof(AvahiIPv6Address)]; /**< Type-independent data field */ + } data; + } AvahiAddress; + diff --git a/avahi.spec b/avahi.spec index 082ee61..7f717b3 100644 --- a/avahi.spec +++ b/avahi.spec @@ -140,6 +140,8 @@ Source0: https://github.com/avahi/avahi/releases/download/v%{version_no ## upstream patches # https://github.com/avahi/avahi/pull/662 Patch1: avahi-0.9-CVE-2024-52615.patch +# https://github.com/avahi/avahi/pull/707 +Patch2: avahi-0.9-address-data-size.patch ## downstream patches Patch100: avahi-0.6.30-mono-libdir.patch @@ -850,6 +852,7 @@ fi * Tue Aug 05 2025 Petr Menšík - 0.9~rc2-6 - Fix port randomization for wide area queries (CVE-2024-52615) - Add systemd-devel dependency +- Fix test crashing because FORTIFY_SOURCE protection * Wed Jul 23 2025 Fedora Release Engineering - 0.9~rc2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 68dfe36cf978254169680ba672a16350de1d4e16 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 04:11:15 +0000 Subject: [PATCH 70/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- avahi.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/avahi.spec b/avahi.spec index 7f717b3..8d2b1d2 100644 --- a/avahi.spec +++ b/avahi.spec @@ -60,7 +60,7 @@ Name: avahi Version: 0.9%{?rc:~%{rc}} -Release: 6%{?dist} +Release: 7%{?dist} Summary: Local network service discovery License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT URL: http://avahi.org @@ -849,6 +849,9 @@ fi %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 0.9~rc2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Tue Aug 05 2025 Petr Menšík - 0.9~rc2-6 - Fix port randomization for wide area queries (CVE-2024-52615) - Add systemd-devel dependency