Accepting request 795382 from GNOME:Next

Add upstream patch, and rebase patches

OBS-URL: https://build.opensuse.org/request/show/795382
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=451
This commit is contained in:
Bjørn Lie 2020-04-23 16:46:46 +00:00 committed by Git OBS Bridge
parent b3dc2bc6cb
commit b60e7bb2d6
10 changed files with 127 additions and 84 deletions

View File

@ -0,0 +1,37 @@
From 141f8bc24401db636c4b1a9dd991c68d7b3282f0 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Fri, 31 Jan 2020 19:27:02 +0100
Subject: [PATCH] configure: Use pkg-config to look for keyutils
Support for pkg-config was added to keyutils somewhat recently in
November 2018 [1], whereas the keyutils dependency was originally added
in August 2016 in commit 31ed6f2b3f1ab45ae07aad41c13a51ba91fd159d.
[1] Keyutils commit d4d758a04616b770
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/commit/?id=d4d758a04616b770
https://gitlab.gnome.org/GNOME/gdm/merge_requests/91
---
configure.ac | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: gdm-3.34.1/configure.ac
===================================================================
--- gdm-3.34.1.orig/configure.ac
+++ gdm-3.34.1/configure.ac
@@ -532,11 +532,10 @@ if test "x$supports_pam_extensions" = "x
AC_DEFINE(SUPPORTS_PAM_EXTENSIONS, 1, [Define if PAM supports GDMs custom extensions])
fi
-AC_CHECK_LIB(keyutils, keyctl_read, [
- AC_DEFINE(HAVE_KEYUTILS, 1, [Define if have keyutils])
- KEYUTILS_LIBS="-lkeyutils"
- KEYUTILS_CFLAGS=""
-])
+PKG_CHECK_MODULES([KEYUTILS],
+ [libkeyutils],
+ [AC_DEFINE([HAVE_KEYUTILS], [1], [Define if have keyutils])],
+ [true])
AC_SUBST(KEYUTILS_LIBS)
AC_SUBST(KEYUTILS_CFLAGS)

View File

@ -9,10 +9,10 @@ X server will be started under root. The same way as if gdm was built with
This allows system to run X server under root if and only-if necessary.
---
Index: gdm-3.32.0+2/daemon/gdm-local-display-factory.c
Index: gdm-3.34.1/daemon/gdm-local-display-factory.c
===================================================================
--- gdm-3.32.0+2.orig/daemon/gdm-local-display-factory.c
+++ gdm-3.32.0+2/daemon/gdm-local-display-factory.c
--- gdm-3.34.1.orig/daemon/gdm-local-display-factory.c
+++ gdm-3.34.1/daemon/gdm-local-display-factory.c
@@ -231,11 +231,12 @@ gdm_local_display_factory_create_transie
g_debug ("GdmLocalDisplayFactory: Creating transient display");
@ -39,7 +39,7 @@ Index: gdm-3.32.0+2/daemon/gdm-local-display-factory.c
g_object_set (display,
"seat-id", "seat0",
@@ -468,7 +468,7 @@ create_display (GdmLocalDisplayFactory *
@@ -502,7 +502,7 @@ create_display (GdmLocalDisplayFactory *
g_debug ("GdmLocalDisplayFactory: Adding display on seat %s", seat_id);
#ifdef ENABLE_USER_DISPLAY_SERVER
@ -48,10 +48,10 @@ Index: gdm-3.32.0+2/daemon/gdm-local-display-factory.c
display = gdm_local_display_new ();
if (session_type != NULL) {
g_object_set (G_OBJECT (display), "session-type", session_type, NULL);
Index: gdm-3.32.0+2/daemon/gdm-session.c
Index: gdm-3.34.1/daemon/gdm-session.c
===================================================================
--- gdm-3.32.0+2.orig/daemon/gdm-session.c
+++ gdm-3.32.0+2/daemon/gdm-session.c
--- gdm-3.34.1.orig/daemon/gdm-session.c
+++ gdm-3.34.1/daemon/gdm-session.c
@@ -373,7 +373,11 @@ get_system_session_dirs (GdmSession *sel
#ifdef ENABLE_WAYLAND_SUPPORT
if (!self->ignore_wayland) {
@ -65,7 +65,7 @@ Index: gdm-3.32.0+2/daemon/gdm-session.c
for (i = 0; system_data_dirs[i]; i++) {
gchar *dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL);
@@ -3276,8 +3280,10 @@ gdm_session_get_display_mode (GdmSession
@@ -3315,8 +3319,10 @@ gdm_session_get_display_mode (GdmSession
* right now. It will die with an error if logind devices
* are paused when handed out.
*/
@ -78,7 +78,7 @@ Index: gdm-3.32.0+2/daemon/gdm-session.c
#ifdef ENABLE_WAYLAND_SUPPORT
/* Wayland sessions are for now assumed to run in a
@@ -3288,7 +3294,6 @@ gdm_session_get_display_mode (GdmSession
@@ -3327,7 +3333,6 @@ gdm_session_get_display_mode (GdmSession
}
#endif
return GDM_SESSION_DISPLAY_MODE_REUSE_VT;

View File

@ -1,8 +1,8 @@
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
index ad5b87d..f964259 100644
--- a/data/61-gdm.rules.in
+++ b/data/61-gdm.rules.in
@@ -4,3 +4,12 @@ ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4"
Index: gdm-3.34.1/data/61-gdm.rules.in
===================================================================
--- gdm-3.34.1.orig/data/61-gdm.rules.in
+++ gdm-3.34.1/data/61-gdm.rules.in
@@ -4,3 +4,12 @@ ATTR{vendor}=="0x1013", ATTR{device}=="0
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="@libexecdir@/gdm-disable-wayland"
# disable Wayland when using the proprietary nvidia driver
DRIVER=="nvidia", RUN+="@libexecdir@/gdm-disable-wayland"

View File

@ -21,11 +21,11 @@ See: #526
libgdm/gdm-user-switching.c | 2 +-
4 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/common/gdm-common.c b/common/gdm-common.c
index 41bdb389..d13cf618 100644
--- a/common/gdm-common.c
+++ b/common/gdm-common.c
@@ -497,7 +497,7 @@ goto_login_session (GDBusConnection *connection,
Index: gdm-3.34.1/common/gdm-common.c
===================================================================
--- gdm-3.34.1.orig/common/gdm-common.c
+++ gdm-3.34.1/common/gdm-common.c
@@ -497,7 +497,7 @@ goto_login_session (GDBusConnection *co
* since the data allocated is from libsystemd-logind, which
* does not use GLib's g_malloc (). */
@ -34,7 +34,7 @@ index 41bdb389..d13cf618 100644
g_propagate_prefixed_error (error, local_error, _("Could not identify the current session: "));
return FALSE;
@@ -898,16 +898,38 @@ _systemd_session_is_active (const char *session_id)
@@ -900,16 +900,38 @@ _systemd_session_is_active (const char *
}
gboolean
@ -76,11 +76,11 @@ index 41bdb389..d13cf618 100644
g_debug ("Finding a graphical session for user %d", uid);
n_sessions = sd_uid_get_sessions (uid,
diff --git a/common/gdm-common.h b/common/gdm-common.h
index 5c3fe137..3d037d68 100644
--- a/common/gdm-common.h
+++ b/common/gdm-common.h
@@ -51,9 +51,10 @@ int gdm_wait_on_and_disown_pid (int pid,
Index: gdm-3.34.1/common/gdm-common.h
===================================================================
--- gdm-3.34.1.orig/common/gdm-common.h
+++ gdm-3.34.1/common/gdm-common.h
@@ -51,9 +51,10 @@ int gdm_wait_on_and_disown_pi
int gdm_signal_pid (int pid,
int signal);
@ -94,11 +94,11 @@ index 5c3fe137..3d037d68 100644
gboolean gdm_get_pwent_for_name (const char *name,
struct passwd **pwentp);
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 907eca37..d8dfa843 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -501,7 +501,7 @@ get_display_and_details_for_bus_sender (GdmManager *self,
Index: gdm-3.34.1/daemon/gdm-manager.c
===================================================================
--- gdm-3.34.1.orig/daemon/gdm-manager.c
+++ gdm-3.34.1/daemon/gdm-manager.c
@@ -501,7 +501,7 @@ get_display_and_details_for_bus_sender (
goto out;
}
@ -107,11 +107,11 @@ index 907eca37..d8dfa843 100644
if (!ret) {
g_debug ("GdmManager: Unable to find display session for uid %d: %s",
diff --git a/libgdm/gdm-user-switching.c b/libgdm/gdm-user-switching.c
index 3a33fcbb..20235fd8 100644
--- a/libgdm/gdm-user-switching.c
+++ b/libgdm/gdm-user-switching.c
@@ -203,7 +203,7 @@ goto_login_session (GDBusConnection *connection,
Index: gdm-3.34.1/libgdm/gdm-user-switching.c
===================================================================
--- gdm-3.34.1.orig/libgdm/gdm-user-switching.c
+++ gdm-3.34.1/libgdm/gdm-user-switching.c
@@ -203,7 +203,7 @@ goto_login_session (GDBusConnection *co
/* Note that we mostly use free () here, instead of g_free ()
* since the data allocated is from libsystemd-logind, which
* does not use GLib's g_malloc (). */
@ -120,6 +120,3 @@ index 3a33fcbb..20235fd8 100644
g_propagate_prefixed_error (error, local_error, _("Could not identify the current session: "));
return FALSE;
--
2.24.1

View File

@ -1,7 +1,7 @@
Index: gdm-3.31.91/data/Init.in
Index: gdm-3.34.1/data/Init.in
===================================================================
--- gdm-3.31.91.orig/data/Init.in 2019-02-21 20:44:14.000000000 +0100
+++ gdm-3.31.91/data/Init.in 2019-02-27 07:46:21.401932235 +0100
--- gdm-3.34.1.orig/data/Init.in
+++ gdm-3.34.1/data/Init.in
@@ -1,4 +1,9 @@
#!/bin/sh
+
@ -12,10 +12,10 @@ Index: gdm-3.31.91/data/Init.in
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
# -George
Index: gdm-3.31.91/data/PostSession.in
Index: gdm-3.34.1/data/PostSession.in
===================================================================
--- gdm-3.31.91.orig/data/PostSession.in 2018-10-12 23:05:26.000000000 +0200
+++ gdm-3.31.91/data/PostSession.in 2019-02-27 07:46:21.401932235 +0100
--- gdm-3.34.1.orig/data/PostSession.in
+++ gdm-3.34.1/data/PostSession.in
@@ -1,3 +1,7 @@
#!/bin/sh
@ -24,10 +24,10 @@ Index: gdm-3.31.91/data/PostSession.in
+fi
+
exit 0
Index: gdm-3.31.91/data/Xsession.in
Index: gdm-3.34.1/data/Xsession.in
===================================================================
--- gdm-3.31.91.orig/data/Xsession.in 2019-02-21 20:44:14.000000000 +0100
+++ gdm-3.31.91/data/Xsession.in 2019-02-27 07:46:21.401932235 +0100
--- gdm-3.34.1.orig/data/Xsession.in
+++ gdm-3.34.1/data/Xsession.in
@@ -1,4 +1,9 @@
#!@XSESSION_SHELL@
+
@ -38,10 +38,10 @@ Index: gdm-3.31.91/data/Xsession.in
#
# This is SORT OF LIKE an X session, but not quite. You get a command as the
# first argument (it could be multiple words, so run it with "eval"). As a
Index: gdm-3.31.91/data/PreSession.in
Index: gdm-3.34.1/data/PreSession.in
===================================================================
--- gdm-3.31.91.orig/data/PreSession.in 2018-10-12 23:05:26.000000000 +0200
+++ gdm-3.31.91/data/PreSession.in 2019-02-27 07:46:21.401932235 +0100
--- gdm-3.34.1.orig/data/PreSession.in
+++ gdm-3.34.1/data/PreSession.in
@@ -6,4 +6,8 @@
#
# Note that output goes into the .xsession-errors file for easy debugging

View File

@ -1,7 +1,7 @@
Index: gdm-3.32.0+2/daemon/main.c
Index: gdm-3.34.1/daemon/main.c
===================================================================
--- gdm-3.32.0+2.orig/daemon/main.c
+++ gdm-3.32.0+2/daemon/main.c
--- gdm-3.34.1.orig/daemon/main.c
+++ gdm-3.34.1/daemon/main.c
@@ -61,6 +61,31 @@ static GdmSettings *settings =
static uid_t gdm_uid = -1;
static gid_t gdm_gid = -1;

View File

@ -8,11 +8,11 @@ Closes #532
daemon/gdm-session-worker.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 1319907e..0ca3dd0c 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -2201,7 +2201,7 @@ set_up_for_new_vt (GdmSessionWorker *worker)
Index: gdm-3.34.1/daemon/gdm-session-worker.c
===================================================================
--- gdm-3.34.1.orig/daemon/gdm-session-worker.c
+++ gdm-3.34.1/daemon/gdm-session-worker.c
@@ -2201,7 +2201,7 @@ set_up_for_new_vt (GdmSessionWorker *wor
return FALSE;
}
@ -21,6 +21,3 @@ index 1319907e..0ca3dd0c 100644
session_vt = GDM_INITIAL_VT;
} else {
if (ioctl(fd, VT_OPENQRY, &session_vt) < 0) {
--
2.16.4

View File

@ -1,8 +1,8 @@
Index: gdm-3.31.91/common/Makefile.am
Index: gdm-3.34.1/common/Makefile.am
===================================================================
--- gdm-3.31.91.orig/common/Makefile.am 2019-02-21 20:44:14.000000000 +0100
+++ gdm-3.31.91/common/Makefile.am 2019-02-27 07:44:47.645367708 +0100
@@ -46,11 +46,15 @@ libgdmcommon_la_SOURCES = \
--- gdm-3.34.1.orig/common/Makefile.am
+++ gdm-3.34.1/common/Makefile.am
@@ -45,11 +45,15 @@ libgdmcommon_la_SOURCES = \
gdm-settings-backend.h \
gdm-settings-desktop-backend.c \
gdm-settings-desktop-backend.h \
@ -18,10 +18,10 @@ Index: gdm-3.31.91/common/Makefile.am
gdm-log.h \
gdm-log.c \
$(NULL)
Index: gdm-3.31.91/common/gdm-settings-system-backend.c
Index: gdm-3.34.1/common/gdm-settings-system-backend.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdm-3.31.91/common/gdm-settings-system-backend.c 2019-02-27 07:44:47.645367708 +0100
--- /dev/null
+++ gdm-3.34.1/common/gdm-settings-system-backend.c
@@ -0,0 +1,369 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -392,10 +392,10 @@ Index: gdm-3.31.91/common/gdm-settings-system-backend.c
+
+ return GDM_SETTINGS_BACKEND (object);
+}
Index: gdm-3.31.91/common/gdm-settings-system-backend.h
Index: gdm-3.34.1/common/gdm-settings-system-backend.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdm-3.31.91/common/gdm-settings-system-backend.h 2019-02-27 07:44:47.645367708 +0100
--- /dev/null
+++ gdm-3.34.1/common/gdm-settings-system-backend.h
@@ -0,0 +1,56 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -453,10 +453,10 @@ Index: gdm-3.31.91/common/gdm-settings-system-backend.h
+G_END_DECLS
+
+#endif /* __GDM_SETTINGS_SYSTEM_BACKEND_H */
Index: gdm-3.31.91/common/gdm-settings.c
Index: gdm-3.34.1/common/gdm-settings.c
===================================================================
--- gdm-3.31.91.orig/common/gdm-settings.c 2019-02-21 20:44:14.000000000 +0100
+++ gdm-3.31.91/common/gdm-settings.c 2019-02-27 07:44:47.645367708 +0100
--- gdm-3.34.1.orig/common/gdm-settings.c
+++ gdm-3.34.1/common/gdm-settings.c
@@ -38,6 +38,7 @@
#include "gdm-settings.h"
@ -474,10 +474,10 @@ Index: gdm-3.31.91/common/gdm-settings.c
backend = gdm_settings_desktop_backend_new (GDM_RUNTIME_CONF);
if (backend)
settings->backends = g_list_prepend (settings->backends, backend);
Index: gdm-3.31.91/common/gdm-sysconfig.c
Index: gdm-3.34.1/common/gdm-sysconfig.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdm-3.31.91/common/gdm-sysconfig.c 2019-02-27 07:44:47.645367708 +0100
--- /dev/null
+++ gdm-3.34.1/common/gdm-sysconfig.c
@@ -0,0 +1,484 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -963,10 +963,10 @@ Index: gdm-3.31.91/common/gdm-sysconfig.c
+ g_strfreev (lines);
+ return result;
+}
Index: gdm-3.31.91/common/gdm-sysconfig.h
Index: gdm-3.34.1/common/gdm-sysconfig.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdm-3.31.91/common/gdm-sysconfig.h 2019-02-27 07:44:47.645367708 +0100
--- /dev/null
+++ gdm-3.34.1/common/gdm-sysconfig.h
@@ -0,0 +1,43 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -1011,10 +1011,10 @@ Index: gdm-3.31.91/common/gdm-sysconfig.h
+G_END_DECLS
+
+#endif /* __GDM_SYSCONFIG_H */
Index: gdm-3.31.91/data/gdm.conf-custom.in
Index: gdm-3.34.1/data/gdm.conf-custom.in
===================================================================
--- gdm-3.31.91.orig/data/gdm.conf-custom.in 2019-02-21 20:44:14.000000000 +0100
+++ gdm-3.31.91/data/gdm.conf-custom.in 2019-02-27 07:44:47.649367731 +0100
--- gdm-3.34.1.orig/data/gdm.conf-custom.in
+++ gdm-3.34.1/data/gdm.conf-custom.in
@@ -1,4 +1,7 @@
# GDM configuration storage
+#

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Apr 18 16:12:21 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
- Add gdm-Use-pkg-config-for-keyutils.patch: configure: Use
pkg-config to look for keyutils. Following this, replace
keyutils-devel pkgconfig(libkeyutils) BuildRequires.
- Rebase/refresh patches with quilt.
-------------------------------------------------------------------
Sat Apr 11 22:24:07 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -67,6 +67,9 @@ Patch14: gdm-switch-user-tty7.patch
Patch15: gdm-disable-wayland-on-mgag200-chipsets.patch
# PATCH-FIX-UPSTREAM gdm-look-for-session-based-on-pid-first.patch bsc#1159950 glgo#GNOME/gdm#526 yfjiang@suse.com -- Look for session based on pid first, then fall back to the uid based approach
Patch16: gdm-look-for-session-based-on-pid-first.patch
# PATCH-FIX-UPSTREAM gdm-Use-pkg-config-for-keyutils.patch -- configure: Use pkg-config to look for keyutils
Patch17: gdm-Use-pkg-config-for-keyutils.patch
### NOTE: Keep please SLE-only patches at bottom (starting on 1000).
# PATCH-FIX-SLE gdm-disable-gnome-initial-setup.patch bnc#1067976 qzhao@suse.com -- Disable gnome-initial-setup runs before gdm, g-i-s will only serve for CJK people to choose the input-method after login.
Patch1000: gdm-disable-gnome-initial-setup.patch
@ -76,7 +79,6 @@ BuildRequires: dconf
BuildRequires: fdupes
BuildRequires: gnome-common
BuildRequires: gnome-session-core
BuildRequires: keyutils-devel
BuildRequires: pam-devel
BuildRequires: pkgconfig
BuildRequires: pwdutils
@ -96,6 +98,7 @@ BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 2.91.1
BuildRequires: pkgconfig(iso-codes)
BuildRequires: pkgconfig(libcanberra-gtk3) >= 0.4
BuildRequires: pkgconfig(libkeyutils)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(ply-boot-client)
BuildRequires: pkgconfig(x11)
@ -224,6 +227,7 @@ cp %{SOURCE8} .
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
# SLE-only patches start at 1000
%if !0%{?is_opensuse}