commit xfce4-panel-plugin-genmon for openSUSE:Factory
Hello community, here is the log from the commit of package xfce4-panel-plugin-genmon for openSUSE:Factory checked in at Thu Mar 17 11:38:47 CET 2011. -------- New Changes file: --- /dev/null 2010-08-26 16:28:41.000000000 +0200 +++ /mounts/work_src_done/STABLE/xfce4-panel-plugin-genmon/xfce4-panel-plugin-genmon.changes 2011-03-09 22:43:49.000000000 +0100 @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed Mar 9 11:00:00 UTC 2011 - gber@opensuse.org + +- new package (split off from xfce4-panel-plugins) + calling whatdependson for head-i586 New: ---- xfce4-genmon-plugin-3.2.tar.bz2 xfce4-panel-plugin-genmon-3.2-close-unused-pipes.patch xfce4-panel-plugin-genmon-3.2-fix-build-with-4.7.patch xfce4-panel-plugin-genmon-3.2-prevent-zombies.patch xfce4-panel-plugin-genmon.changes xfce4-panel-plugin-genmon.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xfce4-panel-plugin-genmon.spec ++++++ # # spec file for package xfce4-panel-plugin-genmon # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define panel_version 4.8.0 %define plugin_name xfce4-genmon-plugin Name: xfce4-panel-plugin-genmon License: GPLv2+ Version: 3.2 Release: 25 Summary: Generic monitoring plugin for the Xfce panel Url: http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin Source0: xfce4-genmon-plugin-3.2.tar.bz2 # PATCH-FIX-UPSTREAM xfce4-panel-plugin-genmon-3.2-fix-build-with-4.7.patch gber@opensuse.org -- Fixes build with xfce4-panel >= 4.7 Patch0: xfce4-panel-plugin-genmon-3.2-fix-build-with-4.7.patch # PATCH-FIX-UPSTREAM xfce4-panel-plugin-genmon-3.2-prevent-zombies.patch deb#422572 bxo#3896 gber@opensuse.org -- Prevent zombie processes Patch1: xfce4-panel-plugin-genmon-3.2-prevent-zombies.patch # PATCH-FIX-UPSTREAM xfce4-panel-plugin-genmon-3.2-close-unused-pipes.patch bxo#4036 gber@opensuse.org -- Prevent hangs by closing unused pipes Patch2: xfce4-panel-plugin-genmon-3.2-close-unused-pipes.patch Group: System/GUI/XFCE BuildRequires: intltool BuildRequires: fdupes BuildRequires: pkgconfig(libxfce4panel-1.0) BuildRequires: xfce4-dev-tools Requires: xfce4-panel >= 4.8.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The Generic Monitor plugin is intended for custom monitoring tasks and periodically spawns a given application, captures its output and displays the result in form of an image, a bar, a button and a personalized tooltip in the panel. %prep %setup -q -n %{plugin_name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %build xdt-autogen %configure --disable-static make %{_smp_mflags} V=1 %install %make_install rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK} %find_lang %{plugin_name} %{name}.lang %fdupes %{buildroot}%{_datadir} %clean rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root) %{_libexecdir}/xfce4/panel-plugins/xfce4-genmon-plugin %{_datadir}/xfce4/panel-plugins/genmon.desktop %changelog ++++++ xfce4-panel-plugin-genmon-3.2-close-unused-pipes.patch ++++++ diff -ur xfce4-genmon-plugin-3.2.orig/panel-plugin/cmdspawn.c xfce4-genmon-plugin-3.2/panel-plugin/cmdspawn.c --- xfce4-genmon-plugin-3.2.orig/panel-plugin/cmdspawn.c 2007-11-23 16:32:40.000000000 +0100 +++ xfce4-genmon-plugin-3.2/panel-plugin/cmdspawn.c 2011-01-01 11:27:04.000000000 +0100 @@ -184,6 +184,7 @@ return (-1); case 0: /* Redirect stdout/stderr to associated pipe's write-ends */ + close(0); /* stdin is not used in child */ for (i = 0; i < OUT_ERR; i++) { j = i + 1; // stdout/stderr file descriptor close (j); @@ -199,6 +200,9 @@ exit (-1); } + for (i = 0; i < OUT_ERR; i++) + close (aaiPipe[i][WR]); /* close write end of pipes in parent */ + /* Wait for child completion */ if (wait == 1) { @@ -231,10 +235,9 @@ } End: - /* Close created pipes */ + /* Close read end of pipes */ for (i = 0; i < OUT_ERR; i++) - for (j = 0; j < RD_WR; j++) - close (aaiPipe[i][j]); + close (aaiPipe[i][RD]); return (-fError); }// Spawn() ++++++ xfce4-panel-plugin-genmon-3.2-fix-build-with-4.7.patch ++++++ diff -ur xfce4-genmon-plugin-3.2.orig/configure.ac xfce4-genmon-plugin-3.2/configure.ac --- xfce4-genmon-plugin-3.2.orig/configure.ac 2008-03-15 22:38:12.000000000 +0100 +++ xfce4-genmon-plugin-3.2/configure.ac 2010-12-05 00:50:00.000000000 +0100 @@ -32,6 +32,7 @@ dnl configure the panel plugin XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.22]) +XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.22]) dnl Translations XDT_I18N([ca cs en_GB eu fr pl pt_PT sq]) diff -ur xfce4-genmon-plugin-3.2.orig/panel-plugin/Makefile.am xfce4-genmon-plugin-3.2/panel-plugin/Makefile.am --- xfce4-genmon-plugin-3.2.orig/panel-plugin/Makefile.am 2007-11-23 16:32:40.000000000 +0100 +++ xfce4-genmon-plugin-3.2/panel-plugin/Makefile.am 2010-12-05 00:48:30.000000000 +0100 @@ -3,10 +3,12 @@ xfce4_genmon_plugin_CFLAGS = \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ - @LIBXFCE4PANEL_CFLAGS@ + @LIBXFCE4PANEL_CFLAGS@ \ + @LIBXFCEGUI4_CFLAGS@ xfce4_genmon_plugin_LDADD = \ - @LIBXFCE4PANEL_LIBS@ + @LIBXFCE4PANEL_LIBS@ \ + @LIBXFCEGUI4_LIBS@ xfce4_genmon_plugin_SOURCES = \ main.c \ ++++++ xfce4-panel-plugin-genmon-3.2-prevent-zombies.patch ++++++ diff -ur xfce4-genmon-plugin-3.2.orig/panel-plugin/main.c xfce4-genmon-plugin-3.2/panel-plugin/main.c --- xfce4-genmon-plugin-3.2.orig/panel-plugin/main.c 2008-03-15 23:38:18.000000000 +0100 +++ xfce4-genmon-plugin-3.2/panel-plugin/main.c 2011-01-01 11:17:46.000000000 +0100 @@ -32,6 +32,7 @@ #include <libxfce4util/libxfce4util.h> #include <libxfcegui4/dialogs.h> +#include <libxfcegui4/xfce-exec.h> #include <libxfce4panel/xfce-panel-plugin.h> #include <libxfce4panel/xfce-panel-convenience.h> @@ -94,10 +95,18 @@ { struct genmon_t *poPlugin = (genmon_t *) p_pvPlugin; struct monitor_t *poMonitor = &(poPlugin->oMonitor); - char result[256]; + GError *error = NULL; + + xfce_exec(poMonitor->onClickCmd, 0, 0, &error); + if (error) { + char first[256]; + g_snprintf (first, sizeof(first), _("Could not run \"%s\""), poMonitor->onClickCmd); + xfce_message_dialog (NULL, _("Xfce Panel"), + GTK_STOCK_DIALOG_ERROR, first, error->message, + GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL); + g_error_free (error); + } - genmon_SpawnCmd (poMonitor->onClickCmd, result, - sizeof (poMonitor->onClickCmd), 0); } /**************************************************************/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de