Compare commits
No commits in common. "imports/c9-beta/libnotify-0.7.9-6.el9" and "c8" have entirely different histories.
imports/c9
...
c8
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/libnotify-0.7.9.tar.xz
|
||||
SOURCES/libnotify-0.7.7.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
75f80afad4d77b4968bfbcd47f4beea5ac2cc87b SOURCES/libnotify-0.7.9.tar.xz
|
||||
4cdf482737df504ac37f5489940b5c7ea5e18d57 SOURCES/libnotify-0.7.7.tar.xz
|
||||
|
@ -0,0 +1,139 @@
|
||||
From d530d52df61731f1e36071a89e4d2a8719a3cfbf Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
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 c0b9eeb..f8d59de 100644
|
||||
--- a/tools/notify-send.c
|
||||
+++ b/tools/notify-send.c
|
||||
@@ -104,61 +104,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},
|
||||
@@ -242,39 +242,49 @@ main (int argc, char *argv[])
|
||||
|
||||
while ((hint = hints[i++])) {
|
||||
tokens = g_strsplit (hint, ":", -1);
|
||||
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.32.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
%define glib2_version 2.26.0
|
||||
|
||||
Name: libnotify
|
||||
Version: 0.7.9
|
||||
Version: 0.7.7
|
||||
Release: 6%{?dist}
|
||||
Summary: Desktop notification library
|
||||
|
||||
@ -9,16 +9,14 @@ License: LGPLv2+
|
||||
URL: http://www.gnome.org
|
||||
Source0: http://ftp.gnome.org/pub/GNOME/sources/libnotify/0.7/%{name}-%{version}.tar.xz
|
||||
|
||||
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
|
||||
Patch10001: 0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: git
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gdk-pixbuf2-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: gobject-introspection-devel
|
||||
Requires: glib2%{?_isa} >= %{glib2_version}
|
||||
|
||||
%description
|
||||
@ -36,16 +34,24 @@ This package contains libraries and header files needed for
|
||||
development of programs using %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -S git
|
||||
|
||||
%build
|
||||
%meson
|
||||
%meson_build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
%make_install
|
||||
|
||||
%ldconfig_scriptlets
|
||||
# Remove lib64 rpaths
|
||||
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/notify-send
|
||||
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
@ -53,7 +59,6 @@ development of programs using %{name}.
|
||||
%{_bindir}/notify-send
|
||||
%{_libdir}/libnotify.so.*
|
||||
%{_libdir}/girepository-1.0/Notify-0.7.typelib
|
||||
%{_mandir}/man1/notify-send.1*
|
||||
|
||||
%files devel
|
||||
%dir %{_includedir}/libnotify
|
||||
@ -63,48 +68,11 @@ development of programs using %{name}.
|
||||
%dir %{_datadir}/gtk-doc/html/libnotify
|
||||
%{_datadir}/gtk-doc/html/libnotify/*
|
||||
%{_datadir}/gir-1.0/Notify-0.7.gir
|
||||
%doc %{_docdir}/libnotify/spec/
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.7.9-6
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.7.9-5
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-3
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Feb 26 2020 Kalev Lember <klember@redhat.com> - 0.7.9-1
|
||||
- Update to 0.7.9
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Apr 16 2019 Adam Williamson <awilliam@redhat.com> - 0.7.8-2
|
||||
- Rebuild with Meson fix for #1699099
|
||||
|
||||
* Sat Apr 06 2019 Kalev Lember <klember@redhat.com> - 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 <releng@fedoraproject.org> - 0.7.7-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.7-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
* Mon Oct 25 2021 Ray Strode <rstrode@redhat.com> - 0.7.7-6
|
||||
- Make notify-send return failure when it fails
|
||||
Resolves: #1834682
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.7-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user