From 09f965f6c29f145799b5da9209fc8c0d617e93ac Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 17 May 2022 04:55:26 -0400 Subject: [PATCH] import libnotify-0.7.9-8.el9 --- .gitignore | 1 + .libnotify.metadata | 1 + ...-failing-exit-code-if-showing-notifi.patch | 139 +++++++ SOURCES/libnotify-0.7.9-consistent-ids.patch | 26 ++ SPECS/libnotify.spec | 348 ++++++++++++++++++ 5 files changed, 515 insertions(+) create mode 100644 .gitignore create mode 100644 .libnotify.metadata create mode 100644 SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch create mode 100644 SOURCES/libnotify-0.7.9-consistent-ids.patch create mode 100644 SPECS/libnotify.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a2078f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libnotify-0.7.9.tar.xz diff --git a/.libnotify.metadata b/.libnotify.metadata new file mode 100644 index 0000000..917bb44 --- /dev/null +++ b/.libnotify.metadata @@ -0,0 +1 @@ +75f80afad4d77b4968bfbcd47f4beea5ac2cc87b SOURCES/libnotify-0.7.9.tar.xz diff --git a/SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch b/SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch new file mode 100644 index 0000000..3cf41c0 --- /dev/null +++ b/SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch @@ -0,0 +1,139 @@ +From 390500fc0c806ed347f76afcfe8a62a74653e81b Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Tue, 12 May 2020 10:12:26 -0400 +Subject: [PATCH] notify-send: Give failing exit code if showing notification + fails + +Right now notify-send will quietly return a successful exit status +even if showing the notification fails. + +This commit changes the behavior to instead fail on failure. + +https://gitlab.gnome.org/GNOME/libnotify/-/merge_requests/13 +--- + tools/notify-send.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/tools/notify-send.c b/tools/notify-send.c +index 67e0b03..52fa46a 100644 +--- a/tools/notify-send.c ++++ b/tools/notify-send.c +@@ -105,61 +105,61 @@ notify_notification_set_hint_variant (NotifyNotification *notification, + N_("Invalid hint type \"%s\". Valid types " + "are int, double, string and byte."), + type); + return FALSE; + } + + if (conv_error) { + *error = g_error_new (G_OPTION_ERROR, + G_OPTION_ERROR_BAD_VALUE, + N_("Value \"%s\" of hint \"%s\" could not be " + "parsed as type \"%s\"."), value, key, + type); + return FALSE; + } + + return TRUE; + } + + int + main (int argc, char *argv[]) + { + static const char *summary = NULL; + char *body; + static const char *type = NULL; + static char *app_name = NULL; + static char *icon_str = NULL; + static char *icons = NULL; + static char **n_text = NULL; + static char **hints = NULL; + static gboolean do_version = FALSE; +- static gboolean hint_error = FALSE; ++ static gboolean hint_error = FALSE, show_error = FALSE; + static glong expire_timeout = NOTIFY_EXPIRES_DEFAULT; + GOptionContext *opt_ctx; + NotifyNotification *notify; + GError *error = NULL; + gboolean retval; + + static const GOptionEntry entries[] = { + {"urgency", 'u', 0, G_OPTION_ARG_CALLBACK, + g_option_arg_urgency_cb, + N_("Specifies the urgency level (low, normal, critical)."), + N_("LEVEL")}, + {"expire-time", 't', 0, G_OPTION_ARG_INT, &expire_timeout, + N_ + ("Specifies the timeout in milliseconds at which to expire the " + "notification."), N_("TIME")}, + {"app-name", 'a', 0, G_OPTION_ARG_STRING, &app_name, + N_("Specifies the app name for the icon"), N_("APP_NAME")}, + {"icon", 'i', 0, G_OPTION_ARG_FILENAME, &icons, + N_("Specifies an icon filename or stock icon to display."), + N_("ICON[,ICON...]")}, + {"category", 'c', 0, G_OPTION_ARG_FILENAME, &type, + N_("Specifies the notification category."), + N_("TYPE[,TYPE...]")}, + {"hint", 'h', 0, G_OPTION_ARG_FILENAME_ARRAY, &hints, + N_ + ("Specifies basic extra data to pass. Valid types are int, double, string and byte."), + N_("TYPE:NAME:VALUE")}, + {"version", 'v', 0, G_OPTION_ARG_NONE, &do_version, + N_("Version of the package."), + NULL}, +@@ -247,39 +247,49 @@ main (int argc, char *argv[]) + + while ((hint = hints[i++])) { + tokens = g_strsplit (hint, ":", 3); + l = g_strv_length (tokens); + + if (l != 3) { + fprintf (stderr, "%s\n", + N_("Invalid hint syntax specified. " + "Use TYPE:NAME:VALUE.")); + hint_error = TRUE; + } else { + retval = notify_notification_set_hint_variant (notify, + tokens[0], + tokens[1], + tokens[2], + &error); + + if (!retval) { + fprintf (stderr, "%s\n", error->message); + g_error_free (error); + hint_error = TRUE; + } + } + + g_strfreev (tokens); + if (hint_error) + break; + } + } + +- if (!hint_error) +- notify_notification_show (notify, NULL); ++ if (!hint_error) { ++ retval = notify_notification_show (notify, &error); ++ ++ if (!retval) { ++ fprintf (stderr, "%s\n", error->message); ++ g_error_free (error); ++ show_error = TRUE; ++ } ++ } + + g_object_unref (G_OBJECT (notify)); + + notify_uninit (); + +- exit (hint_error); ++ if (hint_error || show_error) ++ exit (1); ++ ++ return 0; + } +-- +2.33.1 + diff --git a/SOURCES/libnotify-0.7.9-consistent-ids.patch b/SOURCES/libnotify-0.7.9-consistent-ids.patch new file mode 100644 index 0000000..649cfb9 --- /dev/null +++ b/SOURCES/libnotify-0.7.9-consistent-ids.patch @@ -0,0 +1,26 @@ +From 34bf541f11b57995a019731e5a8d328422458bd3 Mon Sep 17 00:00:00 2001 +From: David King +Date: Mon, 13 Dec 2021 15:20:32 +0000 +Subject: [PATCH] docs: Use consistent IDs in spec build + +This avoids differences between IDs for separate builds of the +specification. + +https://bugzilla.redhat.com/show_bug.cgi?id=1915831 +--- + docs/config.xsl | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/docs/config.xsl b/docs/config.xsl +index 7aa9def..59490e7 100644 +--- a/docs/config.xsl ++++ b/docs/config.xsl +@@ -3,4 +3,5 @@ + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + ++ + +-- +2.33.1 + diff --git a/SPECS/libnotify.spec b/SPECS/libnotify.spec new file mode 100644 index 0000000..f923dad --- /dev/null +++ b/SPECS/libnotify.spec @@ -0,0 +1,348 @@ +%define glib2_version 2.26.0 + +Name: libnotify +Version: 0.7.9 +Release: 8%{?dist} +Summary: Desktop notification library + +License: LGPLv2+ +URL: http://www.gnome.org +Source0: http://ftp.gnome.org/pub/GNOME/sources/libnotify/0.7/%{name}-%{version}.tar.xz +# https://bugzilla.redhat.com/show_bug.cgi?id=1915831# +# https://bugzilla.redhat.com/show_bug.cgi?id=1915831# +# https://bugzilla.redhat.com/show_bug.cgi?id=1915831 +Patch10001: libnotify-0.7.9-consistent-ids.patch + +Patch20001: 0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch + +BuildRequires: docbook-xsl-ns +BuildRequires: gdk-pixbuf2-devel +BuildRequires: glib2-devel >= %{glib2_version} +BuildRequires: gobject-introspection-devel +BuildRequires: gtk3-devel +BuildRequires: gtk-doc +BuildRequires: meson +BuildRequires: xmlto +BuildRequires: /usr/bin/xsltproc + +Requires: glib2%{?_isa} >= %{glib2_version} + +%description +libnotify is a library for sending desktop notifications to a notification +daemon, as defined in the freedesktop.org Desktop Notifications spec. These +notifications can be used to inform the user about an event or display some +form of information without getting in the user's way. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains libraries and header files needed for +development of programs using %{name}. + +%prep +%autosetup -p1 + +%build +%meson +%meson_build + +%install +%meson_install + +%ldconfig_scriptlets + +%files +%license COPYING +%doc NEWS AUTHORS +%{_bindir}/notify-send +%{_libdir}/libnotify.so.* +%{_libdir}/girepository-1.0/Notify-0.7.typelib +%{_mandir}/man1/notify-send.1* + +%files devel +%dir %{_includedir}/libnotify +%{_includedir}/libnotify/* +%{_libdir}/libnotify.so +%{_libdir}/pkgconfig/libnotify.pc +%dir %{_datadir}/gtk-doc/html/libnotify +%{_datadir}/gtk-doc/html/libnotify/* +%{_datadir}/gir-1.0/Notify-0.7.gir +%doc %{_docdir}/libnotify/spec/ + +%changelog +* Wed Dec 22 2021 Ray Strode - 0.7.9-8 +- Make notify-send return failure when it fails + Resolves: #2017158 + +* Mon Dec 13 2021 David King - 0.7.9-7 +- Fix inconsistent IDs in specification (#1915831) + +* Mon Aug 09 2021 Mohan Boddu - 0.7.9-6 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 0.7.9-5 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 0.7.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Aug 01 2020 Fedora Release Engineering - 0.7.9-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.7.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Feb 26 2020 Kalev Lember - 0.7.9-1 +- Update to 0.7.9 + +* Wed Jan 29 2020 Fedora Release Engineering - 0.7.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.7.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Apr 16 2019 Adam Williamson - 0.7.8-2 +- Rebuild with Meson fix for #1699099 + +* Sat Apr 06 2019 Kalev Lember - 0.7.8-1 +- Update to 0.7.8 +- Switch to the meson build system +- Build DocBook documentation + +* Fri Feb 01 2019 Fedora Release Engineering - 0.7.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.7.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.7.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.7.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.7.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.7.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Oct 14 2016 Kalev Lember - 0.7.7-1 +- Update to 0.7.7 +- Remove lib64 rpaths +- Don't set group tags +- Use make_install macro +- Don't manually set deps that pkgconfig dep extractor automatically does +- Drop old, unused build deps +- Tighten deps with the _isa macro + +* Thu Feb 04 2016 Fedora Release Engineering - 0.7.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.7.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Apr 29 2015 Kalev Lember - 0.7.6-6 +- Drop the dependency on desktop-notification-daemon +- Use license macro for the COPYING file + +* Sat Feb 21 2015 Till Maas - 0.7.6-5 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Sun Aug 17 2014 Fedora Release Engineering - 0.7.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 0.7.6-3 +- Rebuilt for gobject-introspection 1.41.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Sep 04 2013 Kalev Lember - 0.7.6-1 +- Update to 0.7.6 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.7.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Mar 22 2013 Dan Mashal - 0.7.5-5 +- Fix RHBZ #925824 +- Update source URL +- Fix mix of spaces and tabs in spec file +- Fix bogus changelog date + +* Thu Feb 14 2013 Fedora Release Engineering - 0.7.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 0.7.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jul 11 2012 Ville Skyttä - 0.7.5-2 +- Fix glib2 dependency version. + +* Wed Mar 28 2012 Richard Hughes - 0.7.5-1 +- Update to 0.7.5 + +* Sun Mar 4 2012 Peter Robinson - 0.7.4-2 +- Merge newer F-16 version into rawhide + +* Tue Aug 30 2011 Matthias Clasen - 0.7.4-1 +- Update to 0.7.4 + +* Wed May 11 2011 Tomas Bzatek - 0.7.3-1 +- Update to 0.7.3 + +* Mon Mar 21 2011 Matthias Clasen - 0.7.2-1 +- Update to 0.7.2 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jan 14 2011 Matthias Clasen - 0.7.1-1 +- Update to 0.7.1 +- Enable introspection + +* Mon Jan 3 2011 Bill Nottingham - 0.7.0-2 +- unbreak firefox and similar apps that free pixbufs they send to set_image_from_pixbuf (#654628) + +* Mon Nov 1 2010 Matthias Clasen - 0.7.0-1 +- Update to 0.7.0 + +* Mon Oct 4 2010 Matthias Clasen - 0.6.0-1 +- Update to 0.6.0 + +* Tue Jun 29 2010 Bastien Nocera 0.5.1-1 +- Update to 0.5.1 + +* Mon Jun 28 2010 Bastien Nocera 0.5.0-1 +- Update to 0.5.0 + +* Wed Nov 11 2009 Matthias Clasen - 0.4.5-4 +- Close notifications with non-default actions on uninit + +* Fri Jul 24 2009 Fedora Release Engineering - 0.4.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0.4.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Nov 22 2008 Matthias Clasen - 0.4.5-1 +- Update to 0.4.5 +- Drop obsolete patches +- Tweak %%summary and %%description + +* Sat Aug 23 2008 Matthias Clasen - 0.4.4-12 +- Handle extra parameter of the closed signal + +* Tue Jun 10 2008 Colin Walters - 0.4.4-11 +- Add patch neccessary for reliable notification positioning + +* Mon Feb 18 2008 Fedora Release Engineering - 0.4.4-10 +- Autorebuild for GCC 4.3 + +* Tue Oct 23 2007 Matthias Clasen - 0.4.4-9 +- Rebuild against new dbus-glib + +* Wed Oct 10 2007 Matthias Clasen - 0.4.4-8 +- Rebuild + +* Tue Aug 7 2007 Matthias Clasen - 0.4.4-7 +- Update licence field + +* Wed Jun 6 2007 Matthias Clasen - 0.4.4-6 +- Re-add notification-daemon requirement again + +* Tue Jun 5 2007 Matthias Clasen - 0.4.4-5 +- Temporarily remove the notification-daemon requires + for bootstrapping + +* Mon Jun 4 2007 Matthias Clasen - 0.4.4-4 +- Re-add notification-daemon requirement + +* Mon Jun 4 2007 Matthias Clasen - 0.4.4-3 +- Temporarily remove the notification-daemon requires + for bootstrapping + +* Sun Mar 25 2007 Matthias Clasen - 0.4.4-2 +- Require gtk2-devel in the -devel package (#216946) + +* Fri Mar 23 2007 Matthias Clasen - 0.4.4-1 +- Update to 0.4.4, which contains important bug fixes + and memory leak fixes +- Require pkgconfig in the -devel package + +* Sat Dec 9 2006 Matthias Clasen - 0.4.3-2 +- Another typo (#214275) + +* Sat Nov 11 2006 Ray Strode - 0.4.3-1 +- Update 0.4.3 + +* Tue Nov 7 2006 Matthias Clasen - 0.4.2-5 +- Fix typos in the spec (#214275) + +* Sun Sep 17 2006 Christopher Aillon - 0.4.2-4 +- Add upstream patch (r2899) to correct an invalid assertion when + creating notifications using status icons + +* Tue Aug 15 2006 Luke Macken - 0.4.2-3 +- Add upstream patch libnotify-0.4.2-status-icon.patch to emit the correct + property change notification 'status-icon' instead of 'attach-icon' + +* Fri Jul 21 2006 John (J5) Palmieri - 0.4.2-2 +- Add developer docs to the devel section + +* Fri Jul 21 2006 John (J5) Palmieri - 0.4.2-1 +- Update to upstream version 0.4.2 +- Add dist tag to release +- Add Requires to devel package + +* Wed Jul 19 2006 John (J5) Palmieri - 0.4.0-3.2 +- reinstate desktop-notification dependency + +* Wed Jul 19 2006 John (J5) Palmieri - 0.4.0-3.1 +- comment out desktop-notification dependency so we can build the + notification daemon + +* Tue Jul 18 2006 John (J5) Palmieri - 0.4.0-3 +- Add BR on dbus-glib-devel + +* Thu Jul 13 2006 Jesse Keating - 0.4.0-2 +- rebuild +- add missing brs + +* Fri May 19 2006 John (J5) Palmieri - 0.4.0-1 +- Update to 0.4.0 + +* Sat Mar 11 2006 Bill Nottingham - 0.3.0-6 +- define %%{glib2_version} if it's in a requirement + +* Thu Mar 2 2006 Ray Strode - 0.3.0-5 +- patch out config.h include from public header + +* Fri Feb 10 2006 Jesse Keating - 0.3.0-4.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.3.0-4.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Thu Jan 12 2006 Christopher Aillon - 0.3.0-4 +- Require a desktop-notification-daemon to be present. Currently, + this is notify-daemon, but libnotify doesn't specifically require + that one. Require 'desktop-notification-daemon' which daemons + providing compatible functionality are now expected to provide. + +* Wed Jan 11 2006 Christopher Aillon - 0.3.0-3 +- Let there be libnotify-devel... + +* Tue Nov 15 2005 John (J5) Palmieri - 0.3.0-2 +- Actual release of the 0.3.x series + +* Tue Nov 15 2005 John (J5) Palmieri - 0.3.0-1 +- Bump version to not conflict with older libnotify libraries + +* Tue Nov 15 2005 John (J5) Palmieri - 0.0.2-1 +- inital build