Dominique Leuenberger 2019-12-12 12:09:58 +00:00 committed by Git OBS Bridge
parent 6f45e60364
commit 4def2eb578
5 changed files with 92 additions and 5 deletions

View File

@ -0,0 +1,27 @@
From 54caab7b0762b553e1e6663f416474fce77e4c51 Mon Sep 17 00:00:00 2001
From: Ting-Wei Lan <lantw@src.gnome.org>
Date: Thu, 29 Aug 2019 11:58:02 +0800
Subject: [PATCH] user-accounts: Initialize GError* to NULL before use
Otherwise, it causes warnings to be shown on the terminal when it is
used and quickly leads to a crash.
---
panels/user-accounts/user-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/user-accounts/user-utils.c b/panels/user-accounts/user-utils.c
index dfd3a2949..72401e40b 100644
--- a/panels/user-accounts/user-utils.c
+++ b/panels/user-accounts/user-utils.c
@@ -458,7 +458,7 @@ is_valid_username_async (const gchar *username,
isValidUsernameData *data;
gchar *argv[6];
GPid pid;
- GError *error;
+ GError *error = NULL;
task = g_task_new (NULL, cancellable, callback, callback_data);
g_task_set_source_tag (task, is_valid_username_async);
--
2.16.4

View File

@ -0,0 +1,25 @@
From c6be204af030f23905ec7a69ab02c88a80f4a4f5 Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang <xwang@suse.com>
Date: Wed, 11 Dec 2019 15:30:33 +0800
Subject: [PATCH] user-accounts: Use absolute path of command usermod
On distro openSUSE Tumbleweed and SUSE Linux Enterprise the path
of command usermod is not in environment variable PATH, we need to
use absolute path to find command.
---
panels/user-accounts/user-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: gnome-control-center-3.34.2/panels/user-accounts/user-utils.c
===================================================================
--- gnome-control-center-3.34.2.orig/panels/user-accounts/user-utils.c
+++ gnome-control-center-3.34.2/panels/user-accounts/user-utils.c
@@ -486,7 +486,7 @@ is_valid_username_async (const gchar *us
* future, so it would be nice to have some official way for this
* instead of relying on the current "--login" implementation.
*/
- argv[0] = "usermod";
+ argv[0] = "/usr/sbin/usermod";
argv[1] = "--login";
argv[2] = data->username;
argv[3] = "--";

View File

@ -1,12 +1,18 @@
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 3377500..f6fd736 100644
index c31249c..5718c98 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -2060,6 +2060,7 @@ populate_power_button_model (GtkTreeModel *model,
@@ -2169,10 +2169,11 @@ populate_power_button_model (GtkTreeModel *model,
char *name;
GsdPowerButtonActionType value;
} actions[] = {
+ { N_("Shutdown"), GSD_POWER_BUTTON_ACTION_SHUTDOWN },
+ { N_("Nothing"), GSD_POWER_BUTTON_ACTION_NOTHING },
{ N_("Suspend"), GSD_POWER_BUTTON_ACTION_SUSPEND },
{ N_("Power Off"), GSD_POWER_BUTTON_ACTION_INTERACTIVE },
- { N_("Power Off"), GSD_POWER_BUTTON_ACTION_INTERACTIVE },
{ N_("Hibernate"), GSD_POWER_BUTTON_ACTION_HIBERNATE },
- { N_("Nothing"), GSD_POWER_BUTTON_ACTION_NOTHING }
+ { N_("Power Off"), GSD_POWER_BUTTON_ACTION_INTERACTIVE },
+ { N_("Force Off"), GSD_POWER_BUTTON_ACTION_SHUTDOWN }
};
guint i;

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Thu Dec 12 02:25:20 UTC 2019 - Xiaoguang Wang <xwang@suse.com>
- Add gnome-control-center-Initialize-GError-to-NULL-before-use.patch:
backport upstream commit 54caab7b, initialize GError* to NULL
before use, fix g-c-c crash.
-------------------------------------------------------------------
Fri Dec 6 09:21:09 UTC 2019 - QK ZHU <qkzhu@suse.com>
- Rebase gnome-control-center-more-power-button-actions.patch for 3.34:
Rename 'Shutdown' to 'Force Off' and adjust the order by severity
(bsc#1091796, bsc#1158476).
-------------------------------------------------------------------
Thu Dec 5 01:45:59 UTC 2019 - Xiaoguang Wang <xwang@suse.com>
- Add gnome-control-center-can-not-find-usermod.patch:
g-c-c use command usermod to verify user is valid, usermod is in
/usr/sbin, environment PATH doesn't include this path, so g-c-c
can't find this command. Upstream commit c6be204
(bsc#1158341 glgo#GNOME/gnome-control-center!653).
-------------------------------------------------------------------
Mon Nov 25 15:22:25 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package gnome-control-center
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2019 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -34,6 +34,10 @@ Group: System/GUI/GNOME
URL: https://www.gnome.org
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gnome-control-center-can-not-find-usermod.patch bsc#1158341 glgo#GNOME/gnome-control-center!653 xwang@suse.com -- user-accounts: can't find command usermod
Patch1: gnome-control-center-can-not-find-usermod.patch
# PATCH-FIX-UPSTREAM gnome-control-center-Initialize-GError-to-NULL-before-use.patch xwang@suse.com -- user-accounts: Initialize GError* to NULL before use
Patch2: gnome-control-center-Initialize-GError-to-NULL-before-use.patch
### patches for Leap >= 15 plus SLE >= 15, but not TW
# PATCH-FEATURE-SLE gnome-control-center-info-never-use-gnome-software.patch bsc#999336 fezhang@suse.com -- info: Never search for gnome-software as an option when checking for updates on SLE and Leap 42.2, because we use gpk-update-viewer.
Patch1001: gnome-control-center-info-never-use-gnome-software.patch
@ -190,6 +194,8 @@ GNOME control center.
%setup -q
translation-update-upstream po gnome-control-center-2.0
%patch1 -p1
%patch2 -p1
# patches for Leap >= 15 plus SLE >= 15, but not TW
%if 0%{?sle_version} >= 150000
%patch1001 -p1