raveit65 pushed to mate-desktop (epel7). "fix pkexec issue with mate-control-center"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 1 22:20:52 UTC 2015


>From add5d3785cd5f3bc83fc00d6a3769e6cc9688e8b Mon Sep 17 00:00:00 2001
From: raveit65 <chat-to-me at raveit.de>
Date: Thu, 2 Apr 2015 00:20:32 +0200
Subject: fix pkexec issue with mate-control-center


diff --git a/mate-desktop.spec b/mate-desktop.spec
index f2f9df4..0e79c9b 100644
--- a/mate-desktop.spec
+++ b/mate-desktop.spec
@@ -2,17 +2,14 @@ Summary:        Shared code for mate-panel, mate-session, mate-file-manager, etc
 Name:           mate-desktop
 License:        GPLv2+ and LGPLv2+ and MIT
 Version:        1.8.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 URL:            http://mate-desktop.org
 Source0:        http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz
-# fix fedora backgrounds and
-# workaround for x-caja-desktop window issue
 Source1:        mate-rhel.gschema.override
-Source2:        gnu-cat.gif
-Source3:        gnu-cat_navideno_v3.png
 
-#enable gnucat
-Patch0:         mate-desktop_enable_gnucat-f21.patch
+# rhbz (#972534)
+# https://github.com/mate-desktop/mate-desktop/pull/166
+Patch0:         mate-desktop_fix-pkexec-wth-m_c_c.patch
 
 BuildRequires:  dconf-devel
 BuildRequires:  desktop-file-utils
@@ -21,7 +18,6 @@ BuildRequires:  gtk2-devel
 BuildRequires:  itstool
 BuildRequires:  mate-common
 BuildRequires:  startup-notification-devel
-#Unique is deprecated upstream in favor of GtkApplicaton on GTK3 -bochecha #fedora-devel 3/18/2014
 BuildRequires:  unique-devel
 
 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -57,12 +53,8 @@ libmatedesktop.
 %prep
 %setup -q
 #%setup -q -n %%{name}-%%{_internal_version}
-%patch0 -p1 -b .gnucat
-cp %SOURCE2 mate-about/gnu-cat.gif
-cp %SOURCE3 mate-about/gnu-cat_navideno_v3.png
 
-# needed for gnucat patch
-autoreconf -fi
+%patch0 -p1 -b .pkexec
 
 %build
 %configure                                                 \
@@ -138,8 +130,6 @@ fi
 %{_datadir}/mate-about
 %{_datadir}/glib-2.0/schemas/mate-rhel.gschema.override
 %{_mandir}/man1/*
-%{_datadir}/pixmaps/gnu-cat.gif
-%{_datadir}/pixmaps/gnu-cat_navideno_v3.png
 %{_datadir}/help/*/mate-user-guide
 
 %files libs -f %{name}.lang
@@ -154,6 +144,10 @@ fi
 
 
 %changelog
+* Wed Apr 01 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2-2
+- drop gnucat
+- fix rhbz (#972534), fix pkexec issue with mate-control-center
+
 * Fri Mar 13 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2-1
 - update to 1.8.2 release
 
diff --git a/mate-desktop_fix-pkexec-wth-m_c_c.patch b/mate-desktop_fix-pkexec-wth-m_c_c.patch
new file mode 100644
index 0000000..6d29449
--- /dev/null
+++ b/mate-desktop_fix-pkexec-wth-m_c_c.patch
@@ -0,0 +1,50 @@
+diff --git a/libmate-desktop/mate-desktop-item.c b/libmate-desktop/mate-desktop-item.c
+index eb004d9..c0ee1da 100644
+--- a/libmate-desktop/mate-desktop-item.c
++++ b/libmate-desktop/mate-desktop-item.c
+@@ -1721,6 +1721,17 @@ make_environment_for_screen (GdkScreen  *screen,
+ 	return retval;
+ }
+ 
++static void
++dummy_child_watch (GPid         pid,
++		   gint         status,
++		   gpointer user_data)
++{
++	/* Nothing, this is just to ensure we don't double fork
++	 * and break pkexec:
++	 * https://bugzilla.gnome.org/show_bug.cgi?id=675789
++	 */
++}
++
+ static int
+ ditem_execute (const MateDesktopItem *item,
+ 	       const char *exec,
+@@ -1749,6 +1760,7 @@ ditem_execute (const MateDesktopItem *item,
+ 	char *new_exec, *uris, *temp;
+ 	char *exec_locale;
+ 	int launched = 0;
++	GPid pid;
+ #ifdef HAVE_STARTUP_NOTIFICATION
+ 	GdkDisplay *gdkdisplay;
+ 	SnLauncherContext *sn_context;
+@@ -1957,14 +1969,17 @@ ditem_execute (const MateDesktopItem *item,
+ 				      (do_not_reap_child ? G_SPAWN_DO_NOT_REAP_CHILD : 0) | G_SPAWN_SEARCH_PATH /* flags */,
+ 				      NULL, /* child_setup_func */
+ 				      NULL, /* child_setup_func_data */
+-				      &ret /* child_pid */,
++				      (do_not_reap_child ? &pid : NULL) /* child_pid */,
+ 				      error)) {
+ 			/* The error was set for us,
+ 			 * we just can't launch this thingie */
+ 			ret = -1;
+ 			g_strfreev (real_argv);
+ 			break;
++		} else if (do_not_reap_child) {
++			g_child_watch_add (pid, dummy_child_watch, NULL);
+ 		}
++
+ 		launched ++;
+ 
+ 		g_strfreev (real_argv);
+
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/mate-desktop.git/commit/?h=epel7&id=add5d3785cd5f3bc83fc00d6a3769e6cc9688e8b


More information about the scm-commits mailing list