From 850466e70a4d90a454a1e2d2c1a63e5a0aed1c64 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:20:07 +0000 Subject: import avahi-0.6.31-17.el7 --- diff --git a/SOURCES/0007-avahi-daemon-don-t-add-0pointer.de-and-zeroconf.org-.patch b/SOURCES/0007-avahi-daemon-don-t-add-0pointer.de-and-zeroconf.org-.patch new file mode 100644 index 0000000..ea6f878 --- /dev/null +++ b/SOURCES/0007-avahi-daemon-don-t-add-0pointer.de-and-zeroconf.org-.patch @@ -0,0 +1,29 @@ +From 80bed702662a1cbad0f6b54345ab5b21734dc861 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 2 Apr 2012 21:17:19 +0200 +Subject: [PATCH] avahi-daemon: don't add 0pointer.de and zeroconf.org to + default browselist + +(cherry-picked from commit 938b5f883fbaa642e3acb7720e37f95f3d72be62) + +Resolves: #1340837 +--- + avahi-daemon/avahi-daemon.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf +index c992842..1906590 100644 +--- a/avahi-daemon/avahi-daemon.conf ++++ b/avahi-daemon/avahi-daemon.conf +@@ -21,7 +21,7 @@ + [server] + #host-name=foo + #domain-name=local +-browse-domains=0pointer.de, zeroconf.org ++#browse-domains=0pointer.de, zeroconf.org + use-ipv4=yes + use-ipv6=no + #allow-interfaces=eth0 +-- +2.7.4 + diff --git a/SOURCES/0008-avahi_server_set_browse_domains-check-the-provided-d.patch b/SOURCES/0008-avahi_server_set_browse_domains-check-the-provided-d.patch new file mode 100644 index 0000000..b1d7477 --- /dev/null +++ b/SOURCES/0008-avahi_server_set_browse_domains-check-the-provided-d.patch @@ -0,0 +1,29 @@ +From d81e470bc3d7647d85d2456885ebc86a5e19bc1f Mon Sep 17 00:00:00 2001 +From: Trent Lloyd +Date: Tue, 31 Mar 2015 09:00:09 +0800 +Subject: [PATCH] avahi_server_set_browse_domains: check the provided domain + list, instead of the list from the configuration file + +(cherry-picked from commit 1616785d583939aa4c1b859fcf626759214769dd) + +Related: #1340837 +--- + avahi-core/server.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/avahi-core/server.c b/avahi-core/server.c +index 4acf5fc..dd9da99 100644 +--- a/avahi-core/server.c ++++ b/avahi-core/server.c +@@ -1792,7 +1792,7 @@ int avahi_server_set_browse_domains(AvahiServer *s, AvahiStringList *domains) { + + assert(s); + +- for (l = s->config.browse_domains; l; l = l->next) ++ for (l = domains; l; l = l->next) + if (!avahi_is_valid_domain_name((char*) l->text)) + return avahi_server_set_errno(s, AVAHI_ERR_INVALID_DOMAIN_NAME); + +-- +2.7.4 + diff --git a/SOURCES/0009-Fix-not-publishing-entries-if-a-probing-interface-is.patch b/SOURCES/0009-Fix-not-publishing-entries-if-a-probing-interface-is.patch new file mode 100644 index 0000000..f2549f5 --- /dev/null +++ b/SOURCES/0009-Fix-not-publishing-entries-if-a-probing-interface-is.patch @@ -0,0 +1,44 @@ +From 8d7edcaf79ce5a439f40ca50c020a097cbe8d8eb Mon Sep 17 00:00:00 2001 +From: Nicolas Cavallari +Date: Wed, 25 Nov 2015 16:31:39 +0100 +Subject: [PATCH] Fix not publishing entries if a probing interface is removed. + +If an interface is no longer relevant for mDNS while an announcer was +probing on this interface, the announcer is removed but the n_probing +counter of the entry group is not updated. So n_probing would never +reach zero and the entry group would stay forever in the REGISTERING +state. If the entry group is for a host resource record, the daemon +could stay in the registering phase forever and would not publish any +service. + +Fix that by decrementing group->n_probing when removing an announcer +in the PROBING state. Also handle the case where the entry group was +waiting for the deleted announcer to become registered. + +(cherry-picked from PR https://github.com/lathiat/avahi/pull/39) + +Resolves: #1222646 +--- + avahi-core/announce.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/avahi-core/announce.c b/avahi-core/announce.c +index ccdbf15..05053cf 100644 +--- a/avahi-core/announce.c ++++ b/avahi-core/announce.c +@@ -44,6 +44,12 @@ static void remove_announcer(AvahiServer *s, AvahiAnnouncer *a) { + AVAHI_LLIST_REMOVE(AvahiAnnouncer, by_interface, a->interface->announcers, a); + AVAHI_LLIST_REMOVE(AvahiAnnouncer, by_entry, a->entry->announcers, a); + ++ if (a->state == AVAHI_PROBING && a->entry->group) { ++ assert(a->entry->group->n_probing); ++ a->entry->group->n_probing--; ++ avahi_s_entry_group_check_probed(a->entry->group, 1); ++ } ++ + avahi_free(a); + } + +-- +2.7.4 + diff --git a/SOURCES/0010-avahi-ui-Replace-usage-of-deprecated-GTK-Stock-Items.patch b/SOURCES/0010-avahi-ui-Replace-usage-of-deprecated-GTK-Stock-Items.patch new file mode 100644 index 0000000..9fb2307 --- /dev/null +++ b/SOURCES/0010-avahi-ui-Replace-usage-of-deprecated-GTK-Stock-Items.patch @@ -0,0 +1,66 @@ +From 6e109a641be45bc75b6d73f6a318bfdf294c2fbf Mon Sep 17 00:00:00 2001 +From: Trent Lloyd +Date: Thu, 16 Jan 2014 11:14:10 +0800 +Subject: [PATCH] avahi-ui: Replace usage of deprecated GTK Stock Items API + +Converted to recommended label text or icon name from +https://docs.google.com/spreadsheet/pub?key=0AsPAM3pPwxagdGF4THNMMUpjUW5xMXZfdUNzMXhEa2c +--- + avahi-ui/avahi-ui.c | 6 +++--- + avahi-ui/bssh.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/avahi-ui/avahi-ui.c b/avahi-ui/avahi-ui.c +index 92d765a..3845066 100644 +--- a/avahi-ui/avahi-ui.c ++++ b/avahi-ui/avahi-ui.c +@@ -1032,8 +1032,8 @@ static void domain_button_clicked(GtkButton *button G_GNUC_UNUSED, gpointer user + gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(p->domain_progress_bar), 0.1); + gtk_box_pack_end(GTK_BOX(vbox2), p->domain_progress_bar, FALSE, FALSE, 0); + +- gtk_dialog_add_button(GTK_DIALOG(p->domain_dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); +- p->domain_ok_button = GTK_WIDGET(gtk_dialog_add_button(GTK_DIALOG(p->domain_dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT)); ++ gtk_dialog_add_button(GTK_DIALOG(p->domain_dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); ++ p->domain_ok_button = GTK_WIDGET(gtk_dialog_add_button(GTK_DIALOG(p->domain_dialog), _("_OK"), GTK_RESPONSE_ACCEPT)); + gtk_dialog_set_default_response(GTK_DIALOG(p->domain_dialog), GTK_RESPONSE_ACCEPT); + gtk_widget_set_sensitive(p->domain_ok_button, is_valid_domain_suffix(gtk_entry_get_text(GTK_ENTRY(p->domain_entry)))); + +@@ -1164,7 +1164,7 @@ static void aui_service_dialog_init(AuiServiceDialog *d) { + gtk_box_pack_end(GTK_BOX(vbox2), p->service_progress_bar, FALSE, FALSE, 0); + + p->domain_button = gtk_button_new_with_mnemonic(_("_Domain...")); +- gtk_button_set_image(GTK_BUTTON(p->domain_button), gtk_image_new_from_stock(GTK_STOCK_NETWORK, GTK_ICON_SIZE_BUTTON)); ++ gtk_button_set_image(GTK_BUTTON(p->domain_button), gtk_image_new_from_icon_name("network-workgroup", GTK_ICON_SIZE_BUTTON)); + g_signal_connect(p->domain_button, "clicked", G_CALLBACK(domain_button_clicked), d); + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(d))), p->domain_button, FALSE, TRUE, 0); + gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(gtk_dialog_get_action_area(GTK_DIALOG(d))), p->domain_button, TRUE); +diff --git a/avahi-ui/bssh.c b/avahi-ui/bssh.c +index 491380f..ebe8b82 100644 +--- a/avahi-ui/bssh.c ++++ b/avahi-ui/bssh.c +@@ -146,19 +146,19 @@ int main(int argc, char*argv[]) { + break; + + case COMMAND_SHELL: +- d = aui_service_dialog_new(_("Choose Shell Server"), NULL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CONNECT, GTK_RESPONSE_ACCEPT, NULL); ++ d = aui_service_dialog_new(_("Choose Shell Server"), NULL, _("_Cancel"), GTK_RESPONSE_CANCEL, _("C_onnect"), GTK_RESPONSE_ACCEPT, NULL); + aui_service_dialog_set_browse_service_types(AUI_SERVICE_DIALOG(d), "_rfb._tcp", "_ssh._tcp", NULL); + aui_service_dialog_set_service_type_name(AUI_SERVICE_DIALOG(d), "_rfb._tcp", _("Desktop")); + aui_service_dialog_set_service_type_name(AUI_SERVICE_DIALOG(d), "_ssh._tcp", _("Terminal")); + break; + + case COMMAND_VNC: +- d = aui_service_dialog_new(_("Choose VNC server"), NULL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CONNECT, GTK_RESPONSE_ACCEPT, NULL); ++ d = aui_service_dialog_new(_("Choose VNC server"), NULL, _("_Cancel"), GTK_RESPONSE_CANCEL, _("C_onnect"), GTK_RESPONSE_ACCEPT, NULL); + aui_service_dialog_set_browse_service_types(AUI_SERVICE_DIALOG(d), "_rfb._tcp", NULL); + break; + + case COMMAND_SSH: +- d = aui_service_dialog_new(_("Choose SSH server"), NULL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CONNECT, GTK_RESPONSE_ACCEPT, NULL); ++ d = aui_service_dialog_new(_("Choose SSH server"), NULL, _("_Cancel"), GTK_RESPONSE_CANCEL, _("C_onnect"), GTK_RESPONSE_ACCEPT, NULL); + aui_service_dialog_set_browse_service_types(AUI_SERVICE_DIALOG(d), "_ssh._tcp", NULL); + break; + } +-- +2.7.4 + diff --git a/SOURCES/0011-avahi-ui-replace-gtk_vbox_new-with-gtk_box_new-for-G.patch b/SOURCES/0011-avahi-ui-replace-gtk_vbox_new-with-gtk_box_new-for-G.patch new file mode 100644 index 0000000..442efbc --- /dev/null +++ b/SOURCES/0011-avahi-ui-replace-gtk_vbox_new-with-gtk_box_new-for-G.patch @@ -0,0 +1,65 @@ +From d2e1b40ee0bb05a5e7f6b8b208bd2e93a50dd01f Mon Sep 17 00:00:00 2001 +From: Trent Lloyd +Date: Thu, 16 Jan 2014 12:05:51 +0800 +Subject: [PATCH] avahi-ui: replace gtk_vbox_new with gtk_box_new for GTK3 due + to deprecation + +--- + avahi-ui/avahi-ui.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/avahi-ui/avahi-ui.c b/avahi-ui/avahi-ui.c +index 3845066..ff33a89 100644 +--- a/avahi-ui/avahi-ui.c ++++ b/avahi-ui/avahi-ui.c +@@ -991,7 +991,11 @@ static void domain_button_clicked(GtkButton *button G_GNUC_UNUSED, gpointer user + gtk_dialog_set_has_separator(GTK_DIALOG(p->domain_dialog), FALSE); + #endif + ++#if GTK_CHECK_VERSION(3,0,0) ++ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); ++#else + vbox = gtk_vbox_new(FALSE, 8); ++#endif + gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(p->domain_dialog))), vbox, TRUE, TRUE, 0); + +@@ -1002,7 +1006,11 @@ static void domain_button_clicked(GtkButton *button G_GNUC_UNUSED, gpointer user + g_signal_connect(p->domain_entry, "changed", G_CALLBACK(domain_entry_changed_callback), d); + gtk_box_pack_start(GTK_BOX(vbox), p->domain_entry, FALSE, FALSE, 0); + ++#if GTK_CHECK_VERSION(3,0,0) ++ vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); ++#else + vbox2 = gtk_vbox_new(FALSE, 8); ++#endif + gtk_box_pack_start(GTK_BOX(vbox), vbox2, TRUE, TRUE, 0); + + scrolled_window = gtk_scrolled_window_new(NULL, NULL); +@@ -1113,7 +1121,11 @@ static void aui_service_dialog_init(AuiServiceDialog *d) { + + gtk_container_set_border_width(GTK_CONTAINER(d), 5); + ++#if GTK_CHECK_VERSION(3,0,0) ++ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); ++#else + vbox = gtk_vbox_new(FALSE, 8); ++#endif + gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(d))), vbox, TRUE, TRUE, 0); + +@@ -1123,7 +1135,11 @@ static void aui_service_dialog_init(AuiServiceDialog *d) { + gtk_box_pack_start(GTK_BOX(vbox), p->domain_label, FALSE, FALSE, 0); + + ++#if GTK_CHECK_VERSION(3,0,0) ++ vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); ++#else + vbox2 = gtk_vbox_new(FALSE, 8); ++#endif + gtk_box_pack_start(GTK_BOX(vbox), vbox2, TRUE, TRUE, 0); + + scrolled_window = gtk_scrolled_window_new(NULL, NULL); +-- +2.7.4 + diff --git a/SOURCES/0012-avahi-ui-Cannot-use-g_object_unref-to-free-GdkCursor.patch b/SOURCES/0012-avahi-ui-Cannot-use-g_object_unref-to-free-GdkCursor.patch new file mode 100644 index 0000000..764899b --- /dev/null +++ b/SOURCES/0012-avahi-ui-Cannot-use-g_object_unref-to-free-GdkCursor.patch @@ -0,0 +1,30 @@ +From 3a88b01e459d38bbeed05d3ba8f4a1f07f34e0b8 Mon Sep 17 00:00:00 2001 +From: Trent Lloyd +Date: Thu, 16 Jan 2014 12:58:24 +0800 +Subject: [PATCH] avahi-ui: Cannot use g_object_unref to free GdkCursor in GTK2 + +GdkCursor does not use GObject in GTK2 +--- + avahi-ui/avahi-ui.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/avahi-ui/avahi-ui.c b/avahi-ui/avahi-ui.c +index ff33a89..8f90b27 100644 +--- a/avahi-ui/avahi-ui.c ++++ b/avahi-ui/avahi-ui.c +@@ -890,7 +890,11 @@ static void response_callback(GtkDialog *dialog, gint response, gpointer user_da + gtk_widget_set_sensitive(GTK_WIDGET(dialog), FALSE); + cursor = gdk_cursor_new(GDK_WATCH); + gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(dialog)), cursor); +- g_object_unref(G_OBJECT(cursor)); ++#if GTK_CHECK_VERSION(3,0,0) ++ g_object_unref(cursor); ++#else ++ gdk_cursor_unref(cursor); ++#endif + + if (!(d->priv->resolver = avahi_service_resolver_new( + d->priv->client, interface, protocol, name, type, d->priv->domain, +-- +2.7.4 + diff --git a/SOURCES/0013-avahi-ui-Remove-deprecated-usage-of-gtk_widget_push_.patch b/SOURCES/0013-avahi-ui-Remove-deprecated-usage-of-gtk_widget_push_.patch new file mode 100644 index 0000000..0cf03af --- /dev/null +++ b/SOURCES/0013-avahi-ui-Remove-deprecated-usage-of-gtk_widget_push_.patch @@ -0,0 +1,41 @@ +From 305e5c6faab36e01f2ac7a26a9b1690a60e54275 Mon Sep 17 00:00:00 2001 +From: Trent Lloyd +Date: Thu, 16 Jan 2014 13:16:22 +0800 +Subject: [PATCH] avahi-ui: Remove deprecated usage of + gtk_widget_push_composite_child/gtk_widget_pop_composite_child + +The composite API is deprecated in GTK3, it doesn't really do anything other than +hide the container objects from gtk_container_foreach which no one is really doing +with avahi-ui that I can find anyway, so we remove it entirely rather than make it +conditional. + +Ideally avahi-ui should be converted to GtkBuilder where there is a new composite API +--- + avahi-ui/avahi-ui.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/avahi-ui/avahi-ui.c b/avahi-ui/avahi-ui.c +index 8f90b27..e3d38f5 100644 +--- a/avahi-ui/avahi-ui.c ++++ b/avahi-ui/avahi-ui.c +@@ -1121,8 +1121,6 @@ static void aui_service_dialog_init(AuiServiceDialog *d) { + p->service_list_store = p->domain_list_store = NULL; + p->service_type_names = NULL; + +- gtk_widget_push_composite_child(); +- + gtk_container_set_border_width(GTK_CONTAINER(d), 5); + + #if GTK_CHECK_VERSION(3,0,0) +@@ -1198,8 +1196,6 @@ static void aui_service_dialog_init(AuiServiceDialog *d) { + + gtk_widget_show_all(vbox); + +- gtk_widget_pop_composite_child(); +- + p->glib_poll = avahi_glib_poll_new(NULL, G_PRIORITY_DEFAULT); + + p->service_pulse_timeout = g_timeout_add(100, service_pulse_callback, d); +-- +2.7.4 + diff --git a/SPECS/avahi.spec b/SPECS/avahi.spec index 558e18f..f1aa4e2 100644 --- a/SPECS/avahi.spec +++ b/SPECS/avahi.spec @@ -12,7 +12,7 @@ Name: avahi Version: 0.6.31 -Release: 15%{?dist}.1 +Release: 17%{?dist} Summary: Local network service discovery License: LGPLv2+ URL: http://avahi.org @@ -67,6 +67,13 @@ Patch0003: 0003-dbus-don-t-crash-if-we-can-t-determine-alternative-s.patc Patch0004: 0004-avahi-core-reserve-space-for-record-data-when-size-e.patch Patch0005: 0005-Remove-prefix-home-lennart-tmp-avahi-from-references.patch Patch0006: 0006-Silently-ignore-invalid-DNS-packets.patch +Patch0007: 0007-avahi-daemon-don-t-add-0pointer.de-and-zeroconf.org-.patch +Patch0008: 0008-avahi_server_set_browse_domains-check-the-provided-d.patch +Patch0009: 0009-Fix-not-publishing-entries-if-a-probing-interface-is.patch +Patch0010: 0010-avahi-ui-Replace-usage-of-deprecated-GTK-Stock-Items.patch +Patch0011: 0011-avahi-ui-replace-gtk_vbox_new-with-gtk_box_new-for-G.patch +Patch0012: 0012-avahi-ui-Cannot-use-g_object_unref-to-free-GdkCursor.patch +Patch0013: 0013-avahi-ui-Remove-deprecated-usage-of-gtk_widget_push_.patch # due to FTBFS caused by Gtk changes introduced in RHEL-7.2 Patch1000: avahi-0.6.31-no-deprecations.patch @@ -655,8 +662,13 @@ fi %endif %changelog -* Thu Dec 17 2015 Michal Sekletar - 0.6.31-15.1 -- silently ignore non-valid DNS response packets (#1292727) +* Mon Jul 04 2016 Michal Sekletar - 0.6.31-17 +- fix crash due to use of deprecated Gtk3 API (#1263720) +- don't add 0pointer.de and zeroconf.org to default browse list (#1340837) +- fix not publishing entries if a probing interface is removed (#1222646) + +* Thu Dec 17 2015 Michal Sekletar - 0.6.31-16 +- silently ignore non-valid DNS response packets (#1290890) * Tue Apr 21 2015 Michal Sekletar - 0.6.31-15 - enable hardened build (#1092506)