RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/avahi#2c08e02ed6681b8264cb0362ab440598240023d5
This commit is contained in:
Petr Šabata 2020-10-14 22:09:18 +02:00
parent 48f9d9711b
commit 60395e94c6
16 changed files with 1971 additions and 0 deletions

8
.gitignore vendored
View File

@ -0,0 +1,8 @@
/x86_64
/.build-*.log
/avahi-0.6.3?/
*.src.rpm
/avahi-0.6.31.tar.gz
/avahi-0.6.32.tar.gz
/avahi-0.7.tar.gz
/avahi-0.8.tar.gz

View File

@ -0,0 +1,25 @@
From 9c3a314856affb288f701d2d3ee23278fc98eaee Mon Sep 17 00:00:00 2001
From: Steve Langasek <steve.langasek@ubuntu.com>
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

View File

@ -0,0 +1,35 @@
From f983df44870b602179b493f9c3d113753b378e27 Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
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

View File

@ -0,0 +1,52 @@
From 751be804e891aec5701a059144e2f5cbfc981b36 Mon Sep 17 00:00:00 2001
From: Andreas Henriksson <andreas@fatal.se>
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

View File

@ -0,0 +1,24 @@
From 366e3798bdbd6b7bf24e59379f4a9a51af575ce9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= <tpgxyz@gmail.com>
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

View File

@ -0,0 +1,32 @@
From a94f72081dd1d546a1d95d860311a1242315bb28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89ric=20Araujo?= <merwok@netwok.org>
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+="<b>" + _("TXT") + " <i>%s</i></b> = %s\n" % (k,v)
else:
txts = "<b>" + _("TXT Data:") + "</b> <i>" + _("empty") + "</i>"
+
+ txts = txts.decode("utf-8")
infos = "<b>" + _("Service Type:") + "</b> %s\n"
infos += "<b>" + _("Service Name:") + "</b> %s\n"
infos += "<b>" + _("Domain Name:") + "</b> %s\n"
infos += "<b>" + _("Interface:") + "</b> %s %s\n"
infos += "<b>" + _("Address:") + "</b> %s/%s:%i\n%s"
+ infos = infos.decode("utf-8")
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

View File

@ -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

View File

@ -0,0 +1,50 @@
diff -uNr avahi-0.6.30.old/avahi-sharp/Makefile.am avahi-0.6.30/avahi-sharp/Makefile.am
--- avahi-0.6.30.old/avahi-sharp/Makefile.am 2010-06-29 05:30:35.000000000 +0200
+++ avahi-0.6.30/avahi-sharp/Makefile.am 2011-11-27 17:03:04.933192204 +0100
@@ -73,10 +73,10 @@
endif
install-data-hook: $(ASSEMBLY)
- $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
+ $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
uninstall-hook: $(ASSEMBLY)
- $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /u avahi-sharp /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
+ $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /u avahi-sharp /package avahi-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
endif
endif
diff -uNr avahi-0.6.30.old/avahi-sharp.pc.in avahi-0.6.30/avahi-sharp.pc.in
--- avahi-0.6.30.old/avahi-sharp.pc.in 2010-06-25 02:54:22.000000000 +0200
+++ avahi-0.6.30/avahi-sharp.pc.in 2011-11-27 17:00:05.482192846 +0100
@@ -5,4 +5,4 @@
Name: avahi-sharp
Description: Mono bindings for the Avahi mDNS/DNS-SD stack
Version: @PACKAGE_VERSION@
-Libs: -r:${libdir}/mono/avahi-sharp/avahi-sharp.dll
+Libs: -r:${prefix}/lib/mono/avahi-sharp/avahi-sharp.dll
diff -uNr avahi-0.6.30.old/avahi-ui-sharp/Makefile.am avahi-0.6.30/avahi-ui-sharp/Makefile.am
--- avahi-0.6.30.old/avahi-ui-sharp/Makefile.am 2010-06-29 05:30:35.000000000 +0200
+++ avahi-0.6.30/avahi-ui-sharp/Makefile.am 2011-11-27 17:04:59.812193067 +0100
@@ -60,10 +60,10 @@
endif
install-data-hook: $(ASSEMBLY)
- $(GACUTIL) /i $(ASSEMBLY) /package avahi-ui-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
+ $(GACUTIL) /i $(ASSEMBLY) /package avahi-ui-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
uninstall-hook: $(ASSEMBLY)
- $(GACUTIL) /u avahi-ui-sharp /package avahi-ui-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
+ $(GACUTIL) /u avahi-ui-sharp /package avahi-ui-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
endif
endif
diff -uNr avahi-0.6.30.old/avahi-ui-sharp.pc.in avahi-0.6.30/avahi-ui-sharp.pc.in
--- avahi-0.6.30.old/avahi-ui-sharp.pc.in 2010-06-25 02:54:22.000000000 +0200
+++ avahi-0.6.30/avahi-ui-sharp.pc.in 2011-11-27 17:04:05.077192737 +0100
@@ -6,4 +6,4 @@
Description: Mono bindings for the Avahi mDNS/DNS-SD stack
Version: @PACKAGE_VERSION@
Requires: gtk-sharp-2.0
-Libs: -r:${libdir}/mono/avahi-ui-sharp/avahi-ui-sharp.dll
+Libs: -r:${prefix}/lib/mono/avahi-ui-sharp/avahi-ui-sharp.dll

1486
avahi.spec Normal file

File diff suppressed because it is too large Load Diff

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (avahi-0.8.tar.gz) = c6ba76feb6e92f70289f94b3bf12e5f5c66c11628ce0aeb3cadfb72c13a5d1a9bd56d71bdf3072627a76cd103b9b056d9131aa49ffe11fa334c24ab3b596c7de

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/avahi/Sanity/Basic-sanity-test
# Description: Tests basic functionality of avahi.
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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 <mcermak@redhat.com>" > $(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)

View File

@ -0,0 +1,15 @@
PURPOSE of /CoreOS/avahi/Sanity/Basic-sanity-test
Description: Tests basic functionality of avahi.
Author: Martin Cermak <mcermak@redhat.com>
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.

View File

@ -0,0 +1,11 @@
options {
directory "/var/named";
allow-query { any; };
};
zone "<DOMAIN>" IN {
type master;
file "<DOMAIN>.zone";
allow-update { none; };
};

View File

@ -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 <mcermak@redhat.com>
# Author: Tomas Dolezal <todoleza@redhat.com> - 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/<DOMAIN>/$TDOMAIN/g\" /etc/named.conf"
# set up zonefile
rlRun "cp $ORIGPWD/zonefile $TZONEFILE"
rlRun "chmod a+r $TZONEFILE"
rlRun "sed -i \"s/<DOMAIN>/$TDOMAIN/g\" $TZONEFILE"
rlRun "sed -i \"s/<IP1>/$IP1/g\" $TZONEFILE"
rlRun "sed -i \"s/<IP2>/$IP2/g\" $TZONEFILE"
rlRun "sed -i \"s/<SERIAL>/$(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

View File

@ -0,0 +1,23 @@
$ORIGIN <DOMAIN>.
$TTL 86400
@ IN SOA dns1.<DOMAIN>. hostmaster.<DOMAIN>. (
<SERIAL> ; 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.<DOMAIN>.
IN NS dns2.<DOMAIN>.
IN MX 10 mail.<DOMAIN>.
IN MX 20 mail2.<DOMAIN>.
IN A <IP1>
server1 IN A <IP1>
server2 IN AAAA <IP2>
dns1 IN A <IP1>
dns2 IN A <IP1>

16
tests/tests.yml Normal file
View File

@ -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