diff --git a/.gitignore b/.gitignore index 1de243d..632284d 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,4 @@ gnome-control-center-2.31.6.tar.bz2 /gnome-control-center-3.20.1.tar.xz /gnome-control-center-3.22.0.tar.xz /gnome-control-center-3.22.1.tar.xz +/gnome-control-center-3.23.90.tar.xz diff --git a/0001-info-Get-renderer-from-gnome-session-under-Wayland.patch b/0001-info-Get-renderer-from-gnome-session-under-Wayland.patch deleted file mode 100644 index 915517a..0000000 --- a/0001-info-Get-renderer-from-gnome-session-under-Wayland.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 83c8c57761f849d535da554bc2362608eb4c1bf9 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Tue, 11 Oct 2016 13:41:16 +0200 -Subject: [PATCH 1/2] info: Get renderer from gnome-session under Wayland - -Now that gnome-session's acceleration helper can print the renderer -under Wayland, launch it locally. We need to launch it locally as -Wayland is not available at the time gnome-session would launch the -helper, as there's no Wayland compositor yet. - -Note that this code expects the gnome-session helper scripts to live -in $libexecdir, but distributions can use ---with-gnome-session-libexecdir=DIR to pass another one. - -https://bugzilla.gnome.org/show_bug.cgi?id=756914 ---- - configure.ac | 12 ++++++++++++ - m4/as-ac-expand.m4 | 43 +++++++++++++++++++++++++++++++++++++++++++ - panels/info/Makefile.am | 13 +++++++------ - panels/info/cc-info-panel.c | 39 +++++++++++++++++++++++++++++++-------- - 4 files changed, 93 insertions(+), 14 deletions(-) - create mode 100644 m4/as-ac-expand.m4 - -diff --git a/configure.ac b/configure.ac -index 079777b..709f271 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -340,6 +340,17 @@ AC_SUBST(KRB5_LIBS) - USER_ACCOUNTS_PANEL_CFLAGS="$USER_ACCOUNTS_PANEL_CFLAGS $KRB5_CFLAGS" - USER_ACCOUNTS_PANEL_LIBS="$USER_ACCOUNTS_PANEL_LIBS $KRB5_LIBS" - -+dnl Check for info panel -+AC_ARG_WITH([gnome-session-libexecdir], -+ AS_HELP_STRING([--with-gnome-session-libexecdir=DIR], [Directory for gnome-session s libexecdir]), -+ [], -+ [with_gnome_session_libexecdir=${libexecdir}]) -+if test x$with_gnome_session_libexecdir == xno; then -+ with_gnome_session_libexecdir=${libexecdir} -+fi -+AS_AC_EXPAND(GNOMESESSIONDIR, $with_gnome_session_libexecdir) -+AC_SUBST([gnome_session_libexecdir], [$GNOMESESSIONDIR]) -+ - dnl ======================================= - dnl Panels - dnl ======================================= -@@ -589,4 +600,5 @@ if test "x$enable_ibus" = "xyes"; then - else - AC_MSG_NOTICE([ Region panel IBus support disabled]) - fi -+AC_MSG_NOTICE([** gnome-session libexecdir: $GNOMESESSIONDIR]) - AC_MSG_NOTICE([End options]) -diff --git a/m4/as-ac-expand.m4 b/m4/as-ac-expand.m4 -new file mode 100644 -index 0000000..d6c9e33 ---- /dev/null -+++ b/m4/as-ac-expand.m4 -@@ -0,0 +1,43 @@ -+dnl as-ac-expand.m4 0.2.0 -+dnl autostars m4 macro for expanding directories using configure's prefix -+dnl thomas@apestaart.org -+ -+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) -+dnl example -+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) -+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local -+ -+AC_DEFUN([AS_AC_EXPAND], -+[ -+ EXP_VAR=[$1] -+ FROM_VAR=[$2] -+ -+ dnl first expand prefix and exec_prefix if necessary -+ prefix_save=$prefix -+ exec_prefix_save=$exec_prefix -+ -+ dnl if no prefix given, then use /usr/local, the default prefix -+ if test "x$prefix" = "xNONE"; then -+ prefix="$ac_default_prefix" -+ fi -+ dnl if no exec_prefix given, then use prefix -+ if test "x$exec_prefix" = "xNONE"; then -+ exec_prefix=$prefix -+ fi -+ -+ full_var="$FROM_VAR" -+ dnl loop until it doesn't change anymore -+ while true; do -+ new_full_var="`eval echo $full_var`" -+ if test "x$new_full_var" = "x$full_var"; then break; fi -+ full_var=$new_full_var -+ done -+ -+ dnl clean up -+ full_var=$new_full_var -+ AC_SUBST([$1], "$full_var") -+ -+ dnl restore prefix and exec_prefix -+ prefix=$prefix_save -+ exec_prefix=$exec_prefix_save -+]) -diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am -index 4569fa2..6e6f460 100644 ---- a/panels/info/Makefile.am -+++ b/panels/info/Makefile.am -@@ -1,11 +1,12 @@ - cappletname = info - --AM_CPPFLAGS = \ -- $(PANEL_CFLAGS) \ -- $(INFO_PANEL_CFLAGS) \ -- -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ -- -DDATADIR="\"$(datadir)\"" \ -- -DBINDIR="\"$(bindir)\"" \ -+AM_CPPFLAGS = \ -+ $(PANEL_CFLAGS) \ -+ $(INFO_PANEL_CFLAGS) \ -+ -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ -+ -DDATADIR="\"$(datadir)\"" \ -+ -DGNOME_SESSION_DIR="\"$(gnome_session_libexecdir)\"" \ -+ -DBINDIR="\"$(bindir)\"" \ - $(NULL) - - noinst_LTLIBRARIES = libinfo.la -diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c -index 79729dd..943b4a3 100644 ---- a/panels/info/cc-info-panel.c -+++ b/panels/info/cc-info-panel.c -@@ -235,6 +235,9 @@ prettify_info (const char *info) - { "Graphics Controller", "Graphics"}, - }; - -+ if (*info == '\0') -+ return NULL; -+ - pretty = g_markup_escape_text (info, -1); - - for (i = 0; i < G_N_ELEMENTS (rs); i++) -@@ -322,6 +325,27 @@ get_renderer_from_session (void) - return renderer; - } - -+static char * -+get_renderer_from_helper (void) -+{ -+ int status; -+ char *argv[] = { GNOME_SESSION_DIR "/gnome-session-check-accelerated", NULL }; -+ char *renderer, *ret; -+ -+ if (!g_spawn_sync (NULL, (char **) argv, NULL, 0, NULL, NULL, &renderer, NULL, &status, NULL)) -+ return NULL; -+ -+ if (!g_spawn_check_exit_status (status, NULL)) -+ return NULL; -+ -+ if (renderer == NULL || *renderer == '\0') -+ return NULL; -+ -+ ret = prettify_info (renderer); -+ g_free (renderer); -+ return ret; -+} -+ - static GraphicsData * - get_graphics_data (void) - { -@@ -332,19 +356,18 @@ get_graphics_data (void) - - display = gdk_display_get_default (); - --#ifdef GDK_WINDOWING_X11 -- if (GDK_IS_X11_DISPLAY (display)) -+#if defined(GDK_WINDOWING_X11) || defined(GDK_WINDOWING_WAYLAND) -+ if (GDK_IS_X11_DISPLAY (display) || -+ GDK_IS_WAYLAND_DISPLAY (display)) - { - result->renderer = get_renderer_from_session (); -+ if (!result->renderer) -+ result->renderer = get_renderer_from_helper (); - result->hardware_string = result->renderer; - } -- else --#endif --#ifdef GDK_WINDOWING_WAYLAND -- if (GDK_IS_WAYLAND_DISPLAY (display)) -- result->hardware_string = _("Wayland"); -- else - #endif -+ -+ if (!result->renderer) - result->hardware_string = _("Unknown"); - - return result; --- -2.9.3 - diff --git a/0001-info-Remove-trailing-spaces-in-renderer-strings.patch b/0001-info-Remove-trailing-spaces-in-renderer-strings.patch deleted file mode 100644 index 8b15807..0000000 --- a/0001-info-Remove-trailing-spaces-in-renderer-strings.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 887148033bdc9170d6cd33777854c64b713ac719 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Fri, 21 Oct 2016 19:39:07 +0200 -Subject: [PATCH] info: Remove trailing spaces in renderer strings - -https://bugzilla.gnome.org/show_bug.cgi?id=773213#c4 ---- - panels/info/cc-info-panel.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c -index 96129dc..209f07c 100644 ---- a/panels/info/cc-info-panel.c -+++ b/panels/info/cc-info-panel.c -@@ -237,6 +237,7 @@ prettify_info (const char *info) - return NULL; - - pretty = g_markup_escape_text (info, -1); -+ pretty = g_strchug (g_strchomp (pretty)); - - for (i = 0; i < G_N_ELEMENTS (rs); i++) - { --- -2.9.3 - diff --git a/0002-info-Show-both-GPUs-on-dual-GPU-machines.patch b/0002-info-Show-both-GPUs-on-dual-GPU-machines.patch deleted file mode 100644 index f9c56a0..0000000 --- a/0002-info-Show-both-GPUs-on-dual-GPU-machines.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 3312e428635d81d08cf5ab720de9a650ed967d6e Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 19 Oct 2016 12:38:17 +0200 -Subject: [PATCH 2/2] info: Show both GPUs on dual-GPU machines - -Use "DRI_PRIME=1" trick to launch gnome-session's accelerated checks. - -https://bugzilla.gnome.org/show_bug.cgi?id=773213 ---- - panels/info/cc-info-panel.c | 96 +++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 79 insertions(+), 17 deletions(-) - -diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c -index 943b4a3..96129dc 100644 ---- a/panels/info/cc-info-panel.c -+++ b/panels/info/cc-info-panel.c -@@ -63,10 +63,8 @@ CC_PANEL_REGISTER (CcInfoPanel, cc_info_panel) - (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_INFO_PANEL, CcInfoPanelPrivate)) - - typedef struct { -- /* Will be the string below, or "Unknown" */ -- const char *hardware_string; -- -- char *renderer; -+ /* Will be one or 2 GPU name strings, or "Unknown" */ -+ char *hardware_string; - } GraphicsData; - - typedef struct -@@ -283,7 +281,7 @@ prettify_info (const char *info) - static void - graphics_data_free (GraphicsData *gdata) - { -- g_free (gdata->renderer); -+ g_free (gdata->hardware_string); - g_slice_free (GraphicsData, gdata); - } - -@@ -326,23 +324,75 @@ get_renderer_from_session (void) - } - - static char * --get_renderer_from_helper (void) -+get_renderer_from_helper (gboolean discrete_gpu) - { - int status; - char *argv[] = { GNOME_SESSION_DIR "/gnome-session-check-accelerated", NULL }; -- char *renderer, *ret; -+ char **envp = NULL; -+ char *renderer = NULL; -+ char *ret = NULL; - -- if (!g_spawn_sync (NULL, (char **) argv, NULL, 0, NULL, NULL, &renderer, NULL, &status, NULL)) -- return NULL; -+ if (discrete_gpu) -+ { -+ envp = g_get_environ (); -+ envp = g_environ_setenv (envp, "DRI_PRIME", "1", TRUE); -+ } -+ -+ if (!g_spawn_sync (NULL, (char **) argv, envp, 0, NULL, NULL, &renderer, NULL, &status, NULL)) -+ goto out; - - if (!g_spawn_check_exit_status (status, NULL)) -- return NULL; -+ goto out; - - if (renderer == NULL || *renderer == '\0') -- return NULL; -+ goto out; - - ret = prettify_info (renderer); -+ -+out: - g_free (renderer); -+ g_strfreev (envp); -+ return ret; -+} -+ -+static gboolean -+has_dual_gpu (void) -+{ -+ GDBusProxy *switcheroo_proxy; -+ GVariant *dualgpu_variant; -+ gboolean ret; -+ GError *error = NULL; -+ -+ switcheroo_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, -+ G_DBUS_PROXY_FLAGS_NONE, -+ NULL, -+ "net.hadess.SwitcherooControl", -+ "/net/hadess/SwitcherooControl", -+ "net.hadess.SwitcherooControl", -+ NULL, &error); -+ if (switcheroo_proxy == NULL) -+ { -+ g_debug ("Unable to connect to create a proxy for net.hadess.SwitcherooControl: %s", -+ error->message); -+ g_error_free (error); -+ return FALSE; -+ } -+ -+ dualgpu_variant = g_dbus_proxy_get_cached_property (switcheroo_proxy, "HasDualGpu"); -+ g_object_unref (switcheroo_proxy); -+ -+ if (!dualgpu_variant) -+ { -+ g_debug ("Unable to retrieve net.hadess.SwitcherooControl.HasDualGpu property, the daemon is likely not running"); -+ return FALSE; -+ } -+ -+ ret = g_variant_get_boolean (dualgpu_variant); -+ g_variant_unref (dualgpu_variant); -+ -+ if (ret) -+ g_debug ("Dual-GPU machine detected"); -+ - return ret; - } - -@@ -360,15 +410,27 @@ get_graphics_data (void) - if (GDK_IS_X11_DISPLAY (display) || - GDK_IS_WAYLAND_DISPLAY (display)) - { -- result->renderer = get_renderer_from_session (); -- if (!result->renderer) -- result->renderer = get_renderer_from_helper (); -- result->hardware_string = result->renderer; -+ char *discrete_renderer = NULL; -+ char *renderer; -+ -+ renderer = get_renderer_from_session (); -+ if (!renderer) -+ renderer = get_renderer_from_helper (FALSE); -+ if (has_dual_gpu ()) -+ discrete_renderer = get_renderer_from_helper (TRUE); -+ if (!discrete_renderer) -+ result->hardware_string = g_strdup (renderer); -+ else -+ result->hardware_string = g_strdup_printf ("%s / %s", -+ renderer, -+ discrete_renderer); -+ g_free (renderer); -+ g_free (discrete_renderer); - } - #endif - -- if (!result->renderer) -- result->hardware_string = _("Unknown"); -+ if (!result->hardware_string) -+ result->hardware_string = g_strdup (_("Unknown")); - - return result; - } --- -2.9.3 - diff --git a/control-center.spec b/control-center.spec index 34e1d6c..a73b56a 100644 --- a/control-center.spec +++ b/control-center.spec @@ -9,22 +9,13 @@ Name: control-center Epoch: 1 -Version: 3.22.1 -Release: 4%{?dist} +Version: 3.23.90 +Release: 1%{?dist} Summary: Utilities to configure the GNOME desktop License: GPLv2+ and GFDL URL: http://www.gnome.org -Source0: https://download.gnome.org/sources/gnome-control-center/3.22/gnome-control-center-%{version}.tar.xz - -# https://bugzilla.gnome.org/show_bug.cgi?id=695691 -Patch0: distro-logo.patch - -# https://bugzilla.gnome.org/show_bug.cgi?id=756914 -# https://bugzilla.gnome.org/show_bug.cgi?id=773213 -Patch1: 0001-info-Get-renderer-from-gnome-session-under-Wayland.patch -Patch2: 0002-info-Show-both-GPUs-on-dual-GPU-machines.patch -Patch3: 0001-info-Remove-trailing-spaces-in-renderer-strings.patch +Source0: https://download.gnome.org/sources/gnome-control-center/3.23/gnome-control-center-%{version}.tar.xz BuildRequires: pkgconfig(accountsservice) BuildRequires: pkgconfig(cheese-gtk) >= 3.5.91 @@ -133,10 +124,6 @@ utilities. %prep %setup -q -n gnome-control-center-%{version} -%patch0 -p1 -b .distro-logo -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build %configure \ @@ -222,6 +209,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Feb 15 2017 Richard Hughes - 1:3.23.90-1 +- Update to 3.23.90 + * Fri Feb 10 2017 Fedora Release Engineering - 1:3.22.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/distro-logo.patch b/distro-logo.patch deleted file mode 100644 index 65a2cb4..0000000 --- a/distro-logo.patch +++ /dev/null @@ -1,283 +0,0 @@ -From 12c6bf272242bff469627013ed1e566429b6a571 Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Sun, 31 Mar 2013 20:28:19 -0400 -Subject: [PATCH] info: Switch around GNOME and distro information - -This makes the distribution logo prominent, and puts GNOME version -information in the small print. - -https://bugzilla.gnome.org/show_bug.cgi?id=695691 ---- - panels/info/cc-info-panel.c | 55 +++++++++++++++++--------------- - panels/info/info.ui | 77 ++++++++++++++++++++++++++++++++------------- - 2 files changed, 84 insertions(+), 48 deletions(-) - -diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c -index 79729dd..bc3789f 100644 ---- a/panels/info/cc-info-panel.c -+++ b/panels/info/cc-info-panel.c -@@ -455,42 +455,23 @@ static char * - get_os_type (void) - { - GHashTable *os_info; -- gchar *name, *result, *build_id; -- int bits; -+ gchar *name, *result, *version; - - os_info = get_os_info (); - - if (!os_info) - return NULL; - -- name = g_hash_table_lookup (os_info, "PRETTY_NAME"); -- build_id = g_hash_table_lookup (os_info, "BUILD_ID"); -+ name = g_hash_table_lookup (os_info, "NAME"); -+ version = g_hash_table_lookup (os_info, "VERSION_ID"); - -- if (GLIB_SIZEOF_VOID_P == 8) -- bits = 64; -- else -- bits = 32; -- -- if (build_id) -+ if (name && version) - { -- /* translators: This is the name of the OS, followed by the type -- * of architecture and the build id, for example: -- * "Fedora 18 (Spherical Cow) 64-bit (Build ID: xyz)" or -- * "Ubuntu (Oneric Ocelot) 32-bit (Build ID: jki)" */ -- if (name) -- result = g_strdup_printf (_("%s %d-bit (Build ID: %s)"), name, bits, build_id); -- else -- result = g_strdup_printf (_("%d-bit (Build ID: %s)"), bits, build_id); -+ result = g_strconcat (name, " ", version, NULL); - } -- else -+ else if (name) - { -- /* translators: This is the name of the OS, followed by the type -- * of architecture, for example: -- * "Fedora 18 (Spherical Cow) 64-bit" or "Ubuntu (Oneric Ocelot) 32-bit" */ -- if (name) -- result = g_strdup_printf (_("%s %d-bit"), name, bits); -- else -- result = g_strdup_printf (_("%d-bit"), bits); -+ result = g_strdup (name); - } - - g_clear_pointer (&os_info, g_hash_table_destroy); -@@ -498,6 +479,23 @@ get_os_type (void) - return result; - } - -+static char * -+get_os_description (void) -+{ -+ int bits; -+ gchar *result; -+ -+ if (GLIB_SIZEOF_VOID_P == 8) -+ bits = 64; -+ else -+ bits = 32; -+ -+ /* translators: This is the the type of OS architecture, eg: "64-bit" or "32-bit" */ -+ result = g_strdup_printf (_("%d-bit"), bits); -+ -+ return result; -+} -+ - static void - query_done (GFile *file, - GAsyncResult *res, -@@ -1519,6 +1517,11 @@ info_panel_setup_overview (CcInfoPanel *self) - gtk_label_set_text (GTK_LABEL (widget), text ? text : ""); - g_free (text); - -+ widget = WID ("os_description_label"); -+ text = get_os_description (); -+ gtk_label_set_text (GTK_LABEL (widget), text ? text : ""); -+ g_free (text); -+ - get_primary_disc_info (self); - - widget = WID ("graphics_label"); -diff --git a/panels/info/info.ui b/panels/info/info.ui -index 1967fdf..0bdfc1a 100644 ---- a/panels/info/info.ui -+++ b/panels/info/info.ui -@@ -199,13 +199,14 @@ - - True - False -- 18 -+ 6 - vertical - - - True - False -- /org/gnome/control-center/info/GnomeLogoVerticalMedium.svg -+ 128 -+ fedora-logo-icon - - - False -@@ -214,11 +215,12 @@ - - - -- -+ - True - False - Version 3.0 - True -+ 24 - - - -@@ -282,19 +284,35 @@ - - - -+ -+ True -+ False -+ 1 -+ OS Type -+ os_description_label -+ -+ -+ -+ 3 -+ 4 -+ -+ -+ - - True - False - 1 -- Base system -- os_type_label -+ GNOME -+ version_label - - - -- 4 -- 5 -+ 5 -+ 6 - - - -@@ -309,8 +327,8 @@ - - - -- 6 -- 7 -+ 7 -+ 8 - - - -@@ -354,7 +372,7 @@ - - - -- -+ - True - False - 0 -@@ -364,8 +382,23 @@ - - 1 - 2 -- 4 -- 5 -+ 3 -+ 4 -+ -+ -+ -+ -+ True -+ False -+ 0 -+ Unknown -+ True -+ -+ -+ 1 -+ 2 -+ 5 -+ 6 - - - -@@ -379,8 +412,8 @@ - - 1 - 2 -- 6 -- 7 -+ 7 -+ 8 - - - -@@ -462,8 +495,8 @@ - - - -- 3 -- 4 -+ 4 -+ 5 - - - -@@ -491,8 +524,8 @@ - - 1 - 2 -- 3 -- 4 -+ 4 -+ 5 - - - -@@ -510,8 +543,8 @@ - - - -- 5 -- 6 -+ 6 -+ 7 - - - -@@ -525,8 +558,8 @@ - - 1 - 2 -- 5 -- 6 -+ 6 -+ 7 - - - --- -2.9.3 - diff --git a/sources b/sources index fc022af..ca8f111 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -da949e268254af6aafdda0e8c1702384 gnome-control-center-3.22.1.tar.xz +SHA512 (gnome-control-center-3.23.90.tar.xz) = 96aa32bd0a75d27fdd1670af735173b55206bd3489dccd14c22e446e0fcdb06128d36acb0e90106ec6db72f021bd8f2ab2dfca03e3f7e5a812589db7fa85b2a8