RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/gdm#1329a4a9e746bee96be1615edb7135b1a07d5fee
This commit is contained in:
Petr Šabata 2020-10-15 00:48:53 +02:00
parent 9fed4c580a
commit c832470020
9 changed files with 3601 additions and 0 deletions

134
.gitignore vendored
View File

@ -0,0 +1,134 @@
gdm-2.30.2.tar.bz2
/gdm-2.31.90.tar.bz2
/gdm-2.32.0.tar.bz2
/gdm-2.91.4.tar.bz2
/gdm-2.91.6.tar.bz2
/gdm-2.91.91.tar.bz2
/gdm-2.91.92.tar.bz2
/gdm-2.91.93.tar.bz2
/gdm-2.91.94.tar.bz2
/gdm-3.0.0.tar.bz2
/gdm-3.0.4.tar.bz2
/gdm-3.1.2.tar.xz
/gdm-3.2.0.tar.xz
/gdm-3.2.1.tar.xz
/gdm-3.2.1.1.tar.xz
/gdm-3.3.92.tar.xz
/gdm-3.3.92.1.tar.xz
/gdm-3.4.0.tar.xz
/gdm-3.4.0.1.tar.xz
/gdm-3.4.1.tar.xz
/gdm-3.5.2.tar.xz
/gdm-3.5.4.tar.xz
/gdm-3.5.4.1.tar.xz
/org.gnome.login-screen.gschema.override
/gdm-3.5.4.2.tar.xz
/gdm-3.5.5.tar.xz
/gdm-3.5.90.tar.xz
/gdm-3.5.91.tar.xz
/gdm-3.5.92.1.tar.xz
/gdm-3.6.0.tar.xz
/gdm-3.6.1.tar.xz
/gdm-3.6.2.tar.xz
/gdm-3.7.2.tar.xz
/gdm-3.7.3.1.tar.xz
/gdm-3.7.5.tar.xz
/gdm-3.7.90.tar.xz
/gdm-3.7.91.tar.xz
/gdm-3.7.92.tar.xz
/gdm-3.8.0.tar.xz
/gdm-3.8.1.tar.xz
/gdm-3.8.1.1.tar.xz
/gdm-3.8.3.tar.xz
/gdm-3.8.3.1.tar.xz
/gdm-3.9.5.tar.xz
/gdm-3.9.90.tar.xz
/gdm-3.10.0.tar.xz
/gdm-3.10.0.1.tar.xz
/gdm-3.11.2.tar.xz
/gdm-3.11.3.tar.xz
/gdm-3.11.4.tar.xz
/gdm-3.11.90.tar.xz
/gdm-3.11.92.1.tar.xz
/gdm-3.12.0.tar.xz
/gdm-3.12.1.tar.xz
/gdm-3.12.2.tar.xz
/gdm-3.13.91.tar.xz
/gdm-3.13.92.tar.xz
/gdm-3.14.0.tar.xz
/gdm-3.14.1.tar.xz
/gdm-3.15.2.tar.xz
/gdm-3.15.3.tar.xz
/gdm-3.15.3.1.tar.xz
/gdm-3.15.90.tar.xz
/gdm-3.15.90.1.tar.xz
/gdm-3.15.90.2.tar.xz
/gdm-3.15.90.3.tar.xz
/gdm-3.15.90.4.tar.xz
/gdm-3.15.90.5.tar.xz
/gdm-3.15.91.tar.xz
/gdm-3.15.91.1.tar.xz
/gdm-3.15.91.2.tar.xz
/gdm-3.15.92.tar.xz
/gdm-3.16.0.tar.xz
/gdm-3.16.0.1.tar.xz
/gdm-3.16.1.tar.xz
/gdm-3.16.1.1.tar.xz
/gdm-3.17.2.tar.xz
/gdm-3.17.3.tar.xz
/gdm-3.17.3.1.tar.xz
/gdm-3.17.4.tar.xz
/gdm-3.17.90.tar.xz
/gdm-3.17.92.tar.xz
/gdm-3.18.0.tar.xz
/gdm-3.19.2.tar.xz
/gdm-3.19.4.tar.xz
/gdm-3.19.4.1.tar.xz
/gdm-3.19.90.tar.xz
/gdm-3.19.91.tar.xz
/gdm-3.19.92.tar.xz
/gdm-3.20.0.tar.xz
/gdm-3.20.1.tar.xz
/gdm-3.21.3.tar.xz
/gdm-3.21.4.tar.xz
/gdm-3.21.90.tar.xz
/gdm-3.21.91.tar.xz
/gdm-3.22.0.tar.xz
/gdm-3.22.1.tar.xz
/gdm-3.23.4.tar.xz
/gdm-3.23.91.1.tar.xz
/gdm-3.23.92.tar.xz
/gdm-3.24.0.tar.xz
/gdm-3.24.1.tar.xz
/gdm-3.24.2.tar.xz
/gdm-3.25.3.tar.xz
/gdm-3.25.4.1.tar.xz
/gdm-3.25.90.1.tar.xz
/gdm-3.25.92.tar.xz
/gdm-3.26.0.tar.xz
/gdm-3.26.1.tar.xz
/gdm-3.26.2.1.tar.xz
/gdm-3.27.4.tar.xz
/gdm-3.27.91.tar.xz
/gdm-3.27.92.tar.xz
/gdm-3.28.0.tar.xz
/gdm-3.28.1.tar.xz
/gdm-3.28.2.tar.xz
/gdm-3.29.90.tar.xz
/gdm-3.29.91.tar.xz
/gdm-3.30.0.tar.xz
/gdm-3.30.1.tar.xz
/gdm-3.30.2.tar.xz
/gdm-3.30.3.tar.xz
/gdm-3.31.91.tar.xz
/gdm-3.32.0.tar.xz
/gdm-3.33.4.tar.xz
/gdm-3.33.90.tar.xz
/gdm-3.33.92.tar.xz
/gdm-3.34.0.tar.xz
/gdm-3.34.1.tar.xz
/gdm-3.37.1.tar.xz
/gdm-3.37.3.tar.xz
/gdm-3.37.90.tar.xz
/gdm-3.38.0.tar.xz
/gdm-3.38.1.tar.xz

View File

@ -0,0 +1,70 @@
From 42b18e4c84d470f33cdec5fc1f481cb25c25cf0d Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Mon, 23 Jan 2017 20:19:51 +0100
Subject: [PATCH] Honor initial setup being disabled by distro installer
Sysadmins might want to disable any kind of initial setup for their
users, perhaps because they pre-configure their environments. We
already provide a configuration file option for this but distro
installers might have their own way of requesting this.
At least the anaconda installer provides an option to skip any kind
post-install setup tools so, for now we're only adding support for
that but more might be added in the future.
https://bugzilla.gnome.org/show_bug.cgi?id=777708
---
daemon/Makefile.am | 1 +
daemon/gdm-display.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 5e193f2..878be88 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -1547,6 +1547,31 @@ kernel_cmdline_initial_setup_force_state (gboolean *force_state)
return TRUE;
}
+static gboolean
+initial_setup_disabled_by_anaconda (void)
+{
+ GKeyFile *key_file;
+ const gchar *file_name = SYSCONFDIR "/sysconfig/anaconda";
+ gboolean disabled = FALSE;
+ GError *error = NULL;
+
+ key_file = g_key_file_new ();
+ if (!g_key_file_load_from_file (key_file, file_name, G_KEY_FILE_NONE, &error)) {
+ if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT) &&
+ !g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND)) {
+ g_warning ("Could not read %s: %s", file_name, error->message);
+ }
+ g_error_free (error);
+ goto out;
+ }
+
+ disabled = g_key_file_get_boolean (key_file, "General",
+ "post_install_tools_disabled", NULL);
+ out:
+ g_key_file_unref (key_file);
+ return disabled;
+}
+
static gboolean
wants_initial_setup (GdmDisplay *self)
{
@@ -1587,6 +1612,10 @@ wants_initial_setup (GdmDisplay *self)
return FALSE;
}
+ if (initial_setup_disabled_by_anaconda ()) {
+ return FALSE;
+ }
+
return enabled;
}
--
2.19.0

View File

@ -0,0 +1,23 @@
From 2163c715758a87bc1fa629c692b6e47ed74dcae8 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 31 Jul 2013 17:32:55 -0400
Subject: [PATCH] data: add system dconf databases to gdm profile
This way system settings can affect the login screen.
---
data/dconf/gdm.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/data/dconf/gdm.in b/data/dconf/gdm.in
index 4d8bf1748..510ca311a 100644
--- a/data/dconf/gdm.in
+++ b/data/dconf/gdm.in
@@ -1,2 +1,5 @@
user-db:user
+system-db:local
+system-db:site
+system-db:distro
file-db:@DATADIR@/@PACKAGE@/greeter-dconf-defaults
--
2.25.1

View File

@ -0,0 +1,28 @@
From 07e4fb92c76839ee61cfa311381c63b772067377 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 15 Apr 2019 10:53:25 -0400
Subject: [PATCH] data: disable wayland if modesetting is disabled
wayland requires working modesetting, so don't even
bother trying it if modesetting is disabled.
This is more efficient and side-steps a bug in the fallback
logic if start up is unreasonably slow.
---
data/61-gdm.rules.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
index ba0b697a2..984fdd447 100644
--- a/data/61-gdm.rules.in
+++ b/data/61-gdm.rules.in
@@ -1,4 +1,6 @@
# disable Wayland on Hi1710 chipsets
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"
+# disable Wayland if modesetting is disabled
+IMPORT{cmdline}="nomodeset", RUN+="@libexecdir@/gdm-disable-wayland"
--
2.26.0

View File

@ -0,0 +1,173 @@
From 25abc02995b91351fc48bd41c1824944d9225fe6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 7 Apr 2020 14:37:41 -0400
Subject: [PATCH] session-worker: ensure initial vt is never picked for
!is_initial displays
Normally, a !is_initial display would never "get" tty1, since the system
boots to tty1. But if, for some reason, the user booted to runlevel 3,
then switched to runlevel 5, the login screen could get started when
tty1 is free.
That means, e.g., an autologin user can end up getting allocated tty1,
which is bad, since we assume tty1 is used for the login screen.
This commit opens up /dev/tty1 when querying for available VTs, so that
it never gets returned by the kernel as available.
---
daemon/gdm-session-worker.c | 39 ++++++++++++++------
data/applications/mime-dummy-handler.desktop | 7 +---
2 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 5acf55868..cb983302e 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -2163,105 +2163,120 @@ gdm_session_worker_start_session (GdmSessionWorker *worker,
/* If we end up execing again, make sure we don't use the executable context set up
* by pam_selinux durin pam_open_session
*/
#ifdef HAVE_SELINUX
setexeccon (NULL);
#endif
worker->priv->child_pid = session_pid;
g_debug ("GdmSessionWorker: session opened creating reply...");
g_assert (sizeof (GPid) <= sizeof (int));
g_debug ("GdmSessionWorker: state SESSION_STARTED");
gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_SESSION_STARTED);
gdm_session_worker_watch_child (worker);
out:
if (error_code != PAM_SUCCESS) {
gdm_session_worker_uninitialize_pam (worker, error_code);
return FALSE;
}
return TRUE;
}
static gboolean
set_up_for_new_vt (GdmSessionWorker *worker)
{
- int fd;
+ int initial_vt_fd;
char vt_string[256], tty_string[256];
int session_vt = 0;
- fd = open ("/dev/tty0", O_RDWR | O_NOCTTY);
-
- if (fd < 0) {
- g_debug ("GdmSessionWorker: couldn't open VT master: %m");
+ /* open the initial vt. We need it for two scenarios:
+ *
+ * 1) display_is_initial is TRUE. We need it directly.
+ * 2) display_is_initial is FALSE. We need it to mark
+ * the initial VT as "in use" so it doesn't get returned
+ * by VT_OPENQRY
+ * */
+ g_snprintf (tty_string, sizeof (tty_string), "/dev/tty%d", GDM_INITIAL_VT);
+ initial_vt_fd = open (tty_string, O_RDWR | O_NOCTTY);
+
+ if (initial_vt_fd < 0) {
+ g_debug ("GdmSessionWorker: couldn't open console of initial fd: %m");
return FALSE;
}
if (worker->priv->display_is_initial) {
session_vt = GDM_INITIAL_VT;
} else {
- if (ioctl(fd, VT_OPENQRY, &session_vt) < 0) {
+
+ /* Typically VT_OPENQRY is called on /dev/tty0, but we already
+ * have /dev/tty1 open above, so might as well use it.
+ */
+ if (ioctl (initial_vt_fd, VT_OPENQRY, &session_vt) < 0) {
g_debug ("GdmSessionWorker: couldn't open new VT: %m");
goto fail;
}
}
worker->priv->session_vt = session_vt;
- close (fd);
- fd = -1;
-
g_assert (session_vt > 0);
g_snprintf (vt_string, sizeof (vt_string), "%d", session_vt);
/* Set the VTNR. This is used by logind to configure a session in
* the logind-managed case, but it doesn't hurt to set it always.
* When logind gains support for XDG_VTNR=auto, we can make the
* OPENQRY and this whole path only used by the new VT code. */
gdm_session_worker_set_environment_variable (worker,
"XDG_VTNR",
vt_string);
- g_snprintf (tty_string, 256, "/dev/tty%d", session_vt);
- worker->priv->session_tty_fd = open (tty_string, O_RDWR | O_NOCTTY);
+ if (worker->priv->display_is_initial) {
+ worker->priv->session_tty_fd = initial_vt_fd;
+ } else {
+ g_snprintf (tty_string, sizeof (tty_string), "/dev/tty%d", session_vt);
+ worker->priv->session_tty_fd = open (tty_string, O_RDWR | O_NOCTTY);
+ close (initial_vt_fd);
+ }
+
pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string);
return TRUE;
fail:
- close (fd);
+ close (initial_vt_fd);
return FALSE;
}
static gboolean
set_xdg_vtnr_to_current_vt (GdmSessionWorker *worker)
{
int fd;
char vt_string[256];
struct vt_stat vt_state = { 0 };
fd = open ("/dev/tty0", O_RDWR | O_NOCTTY);
if (fd < 0) {
g_debug ("GdmSessionWorker: couldn't open VT master: %m");
return FALSE;
}
if (ioctl (fd, VT_GETSTATE, &vt_state) < 0) {
g_debug ("GdmSessionWorker: couldn't get current VT: %m");
goto fail;
}
close (fd);
fd = -1;
g_snprintf (vt_string, sizeof (vt_string), "%d", vt_state.v_active);
gdm_session_worker_set_environment_variable (worker,
"XDG_VTNR",
vt_string);
diff --git a/data/applications/mime-dummy-handler.desktop b/data/applications/mime-dummy-handler.desktop
index 8f6623ebc..ca405e5c1 100644
--- a/data/applications/mime-dummy-handler.desktop
+++ b/data/applications/mime-dummy-handler.desktop
@@ -1,6 +1 @@
-[Desktop Entry]
-Type=Application
-Name=Dummy URI Handler
-Exec=true %U
-Terminal=false
-StartupNotify=false
+[Default Applications]
--
2.21.1

10
default.pa-for-gdm Normal file
View File

@ -0,0 +1,10 @@
load-module module-device-restore
load-module module-card-restore
load-module module-udev-detect
load-module module-native-protocol-unix
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-position-event-sounds

3159
gdm.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
[org.gnome.login-screen]
logo='/usr/share/pixmaps/fedora-gdm-logo.png'
enable-smartcard-authentication=false

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (gdm-3.38.1.tar.xz) = 07ac79d1a60175652b9ed30e796783714c210feeaa2428dcd62cb50a32635ae53a3dfa116c160abe73efdaeca7ba9f6a44148442e782e4aedc68b59107a121e9