diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index 6579be4..c8cf73b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,3 @@ /avahi-0.6.31.tar.gz /avahi-0.6.32.tar.gz /avahi-0.7.tar.gz -/avahi-0.8.tar.gz -/v0.9-rc2.tar.gz diff --git a/avahi-0.8-no_undefined.patch b/avahi-0.8-no_undefined.patch deleted file mode 100644 index 1d6f786..0000000 --- a/avahi-0.8-no_undefined.patch +++ /dev/null @@ -1,31 +0,0 @@ -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_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 --git a/avahi-0.9-CVE-2024-52615.patch b/avahi-0.9-CVE-2024-52615.patch deleted file mode 100644 index 3a36c57..0000000 --- a/avahi-0.9-CVE-2024-52615.patch +++ /dev/null @@ -1,224 +0,0 @@ -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-0.9-address-data-size.patch b/avahi-0.9-address-data-size.patch deleted file mode 100644 index 70a64d5..0000000 --- a/avahi-0.9-address-data-size.patch +++ /dev/null @@ -1,30 +0,0 @@ -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 8d2b1d2..1f724de 100644 --- a/avahi.spec +++ b/avahi.spec @@ -1,53 +1,21 @@ -%bcond_with bootstrap -%bcond_without check - -%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 0} -%{?!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 - -# https://bugzilla.redhat.com/show_bug.cgi?id=1751484 -%{?!WITH_PYTHON: %global WITH_PYTHON 0} +%{?!WITH_QT3: %global WITH_QT3 1} +%{?!WITH_QT4: %global WITH_QT4 1} %ifnarch %{mono_arches} %define WITH_MONO 0 %endif -%if 0%{?fedora} -%global WITH_QT3 1 -%global WITH_QT4 1 -%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 -%global WITH_PYTHON 1 -%endif -%endif - -%if 0%{?fedora} == 34 || 0%{?rhel} >= 9 -# https://bugzilla.redhat.com/show_bug.cgi?id=1907727 -%global _lto_cflags %{nil} +%define WITH_MONO 0 + %if 0%{?rhel} >= 6 + %define WITH_QT4 0 + %endif + %if 0%{?rhel} > 7 + %define WITH_QT3 0 + %endif %endif # http://bugzilla.redhat.com/1008395 - no hardened build @@ -56,49 +24,24 @@ # trim changelog included in binary rpms %global _changelog_trimtime %(date +%s -d "1 year ago") -%define rc rc2 - Name: avahi -Version: 0.9%{?rc:~%{rc}} -Release: 7%{?dist} +Version: 0.7 +Release: 13%{?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 +License: LGPLv2+ URL: http://avahi.org Requires: dbus 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 BuildRequires: libtool BuildRequires: dbus-devel >= 0.90 -BuildRequires: desktop-file-utils -%if %{WITH_GTK2} -BuildRequires: gtk2-devel -%endif -%if %{WITH_GTK3} -BuildRequires: gtk3-devel >= 2.99.0 -%endif -#BuildRequires: gobject-introspection-devel -%if %{WITH_QT3} -BuildRequires: qt3-devel -%endif -%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 -BuildRequires: expat-devel -%if %{WITH_PYTHON} -%if %{without bootstrap} -BuildRequires: pygtk2 -%endif +BuildRequires: dbus-glib-devel >= 0.70 %if 0%{?fedora} > 27 %global python2_dbus python2-dbus %global python2_libxml2 python2-libxml2 @@ -108,16 +51,25 @@ BuildRequires: pygtk2 %endif BuildRequires: %{python2_dbus} BuildRequires: %{python2_libxml2} -# really only need interpreter + rpm-macros -- rex +BuildRequires: desktop-file-utils +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel >= 2.99.0 +#BuildRequires: gobject-introspection-devel +%if %{WITH_QT3} +BuildRequires: qt3-devel +%endif +%if %{WITH_QT4} +BuildRequires: qt4-devel +%endif +BuildRequires: libdaemon-devel >= 0.11 +BuildRequires: glib2-devel +BuildRequires: libcap-devel +BuildRequires: expat-devel BuildRequires: python2-devel BuildRequires: python3-devel -%else -Obsoletes: python2-avahi < %{version}-%{release} -Obsoletes: python3-avahi < %{version}-%{release} -%endif BuildRequires: gdbm-devel BuildRequires: pkgconfig(pygobject-3.0) -BuildRequires: pkgconfig(libevent) >= 2.0.21 +BuildRequires: pygtk2 BuildRequires: intltool BuildRequires: perl-XML-Parser BuildRequires: xmltoman @@ -126,26 +78,20 @@ BuildRequires: mono-devel BuildRequires: monodoc-devel %endif BuildRequires: systemd -BuildRequires: systemd-devel +%{?systemd_requires} BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: gettext-devel -%if 0%{?rc:1} -Source0: https://github.com/avahi/avahi/archive/refs/tags/v%{version_no_tilde}.tar.gz +%if 0%{?beta:1} +Source0: https://github.com/lathiat/avahi/archive/%{version}-%{beta}.tar.gz#/%{name}-%{version}-%{beta}.tar.gz %else -Source0: https://github.com/avahi/avahi/releases/download/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz +Source0: https://github.com/lathiat/avahi/releases/download/v%{version}/avahi-%{version}.tar.gz +#Source0: http://avahi.org/download/avahi-%{version}.tar.gz %endif ## 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 -Patch102: avahi-0.8-no_undefined.patch +Patch100: avahi-0.6.30-mono-libdir.patch %description Avahi is a system which facilitates service discovery on @@ -170,16 +116,15 @@ 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 -%if %{WITH_PYTHON} -Requires: gdbm Requires: pygtk2 Requires: pygtk2-libglade -Requires: python2-avahi = %{version}-%{release} +Requires: gdbm Requires: %{python2_dbus} -Requires: python2-gobject-base -%endif +# aka python2-gobject-base +Requires: pygobject3-base %description ui-tools Graphical user interface tools that use Avahi to browse for mDNS services. @@ -213,12 +158,12 @@ 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 necessary for developing programs using avahi-gobject. -%if %{WITH_GTK2} %package ui Summary: Gtk user interface library for Avahi (Gtk+ 2 version) Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -227,9 +172,7 @@ 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} @@ -238,23 +181,17 @@ 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 +#Requires: %{name}-glib-devel = %{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 @@ -292,24 +229,6 @@ 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 @@ -328,7 +247,6 @@ 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 @@ -364,8 +282,8 @@ necessary for developing programs using avahi. %package compat-howl Summary: Libraries for howl compatibility Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Obsoletes: howl-libs < 0.6-16 -Provides: howl-libs = %{version}-%{release} +Obsoletes: howl-libs +Provides: howl-libs %description compat-howl Libraries that are compatible with those provided by the howl package. @@ -374,8 +292,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 < 0.6-16 -Provides: howl-devel = %{version}-%{release} +Obsoletes: howl-devel +Provides: howl-devel %description compat-howl-devel Header files for development with the howl compatibility libraries. @@ -401,6 +319,7 @@ libraries. %package autoipd Summary: Link-local IPv4 address automatic configuration daemon (IPv4LL) +Requires(pre): shadow-utils Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description autoipd @@ -421,7 +340,6 @@ 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 @@ -439,28 +357,18 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n python3-avahi %{summary}. -%endif %prep -%autosetup -n %{name}-%{version_no_tilde} -p1 +%autosetup -n %{name}-%{version}%{?beta:-%{beta}} -p1 rm -fv docs/INSTALL -# Create two sysusers.d config files -cat >avahi.sysusers.conf <avahi-autoipd.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 || : if [ "$1" -eq 1 -a -s /etc/localtime ]; then - /usr/bin/cp -cfp /etc/localtime %{_sysconfdir}/avahi/etc/localtime >/dev/null 2>&1 || : + /usr/bin/cp -cfp /etc/localtime /etc/avahi/etc/localtime >/dev/null 2>&1 || : fi %systemd_post avahi-daemon.socket avahi-daemon.service @@ -599,6 +486,17 @@ fi %{?ldconfig} %systemd_postun_with_restart avahi-daemon.socket avahi-daemon.service +%pre autoipd +getent group avahi-autoipd >/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 @@ -629,16 +527,14 @@ fi %ghost %{_sysconfdir}/avahi/etc/localtime %config(noreplace) %{_sysconfdir}/avahi/hosts %dir %{_sysconfdir}/avahi/services -%ghost %attr(0755, avahi, avahi) %dir %{_localstatedir}/run/avahi-daemon +%ghost %dir %{_localstatedir}/run/avahi-daemon %config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf -%config(noreplace) %{_datadir}/dbus-1/system.d/avahi-dbus.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf %{_sbindir}/avahi-daemon %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 @@ -646,14 +542,12 @@ fi %{_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 %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 @@ -662,66 +556,43 @@ fi %{_unitdir}/avahi-dnsconfd.service %files tools -%{_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 +%{_bindir}/* +%{_mandir}/man1/* +%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* -%{_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* - -%if %{without bootstrap} %files ui-tools -%{_bindir}/bshell -%{_bindir}/bssh -%{_bindir}/bvnc -%{_bindir}/avahi-discover-standalone -%{_mandir}/man1/bshell.1* -%{_mandir}/man1/bssh.1* -%{_mandir}/man1/bvnc.1* -%{_datadir}/applications/b*.desktop -%{_datadir}/avahi/interfaces/ -%if %{WITH_PYTHON} +%{_bindir}/b* +%{_bindir}/avahi-discover # 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 %{_datadir}/applications/avahi-discover.desktop +%{_datadir}/avahi/interfaces/ %{python2_sitelib}/avahi_discover/ -%endif -%endif %files devel %{_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.* @@ -733,38 +604,28 @@ fi %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 %{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 -%{_includedir}/avahi-ui -%if %{WITH_GTK2} %{_libdir}/libavahi-ui.so -%{_libdir}/pkgconfig/avahi-ui.pc -%endif -%if %{WITH_GTK3} %{_libdir}/libavahi-ui-gtk3.so +%{_includedir}/avahi-ui +%{_libdir}/pkgconfig/avahi-ui.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc -%endif -%endif %if %{WITH_QT3} %ldconfig_scriptlets qt3 @@ -790,18 +651,6 @@ fi %{_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 @@ -839,177 +688,20 @@ fi %{_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 -* 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 -- 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 - -* 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 - -* 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 -- 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) - -* 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 - -* 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 - -* 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 - -* 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 -- Provide versioned howl compatibility package -- Correct bootstrap option - -* 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 - -* 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) -- 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 - -* 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 - -* 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 - -* 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) - -* 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) - -* 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) - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 -- 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 - -* 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 - -* 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 - -* Tue Jul 24 2018 Jan Grulich - 0.7-15 +* Tue Jul 24 2018 Jan Grulich - 0.7-13 - 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 - -* 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 diff --git a/plans/main.fmf b/plans/main.fmf deleted file mode 100644 index ae0c305..0000000 --- a/plans/main.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: Run all tests -execute: - how: tmt -discover: - how: fmf - diff --git a/sources b/sources index 965ac12..0e10563 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.9-rc2.tar.gz) = 29d6c9d075d0202b9da2cdf935fa04fad31ba95475ba5de086c9958d25caa405925bbd82ed439a024febf7880325e80c1a032a660284a7708c71dae9076f413b +SHA512 (avahi-0.7.tar.gz) = bae5a1e9204aca90b90e7fd223d19e809e3514d03ba5fa2da1e55bf1d72d3d3b98567f357900c36393613dc17dc98e15ff3ebf0f226f2f6b9766e592452a6ce7 diff --git a/tests/Basic-sanity-test/Makefile b/tests/Basic-sanity-test/Makefile deleted file mode 100644 index ce59f5b..0000000 --- a/tests/Basic-sanity-test/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 deleted file mode 100644 index 1486bec..0000000 --- a/tests/Basic-sanity-test/PURPOSE +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index e477af9..0000000 --- a/tests/Basic-sanity-test/named.conf +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100755 index b027d39..0000000 --- a/tests/Basic-sanity-test/runtest.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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 deleted file mode 100644 index 46b8421..0000000 --- a/tests/Basic-sanity-test/zonefile +++ /dev/null @@ -1,23 +0,0 @@ -$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/got-audit/got-audit.gdb b/tests/got-audit/got-audit.gdb deleted file mode 100644 index 6661297..0000000 --- a/tests/got-audit/got-audit.gdb +++ /dev/null @@ -1,2 +0,0 @@ -gef config gef.disable_color True -got-audit --all diff --git a/tests/got-audit/main.fmf b/tests/got-audit/main.fmf deleted file mode 100644 index 8295e03..0000000 --- a/tests/got-audit/main.fmf +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100755 index 0b48e98..0000000 --- a/tests/got-audit/runtest.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 - -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" - rlRun "pushd $TmpDir" - rlRun "auditfile=\$(mktemp --tmpdir=${TmpDir})" - rlPhaseEnd - - rlPhaseStartTest "Run GEF got-audit" - 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'" - # 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.socket - rlServiceRestore avahi-daemon - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalEnd -rlJournalPrintText diff --git a/tests/main.fmf b/tests/main.fmf deleted file mode 100644 index f225a72..0000000 --- a/tests/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -test: ./runtest.sh -framework: beakerlib diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 5ff2c8d..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- - -# Tests that run in classic context -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - Basic-sanity-test - - got-audit - required_packages: - - avahi - - avahi-tools - - bind - - bind-chroot - - bind-utils - - gdb-gef # needed to test got-audit