Compare commits
10 Commits
0ce00abad0
...
b0b17f78f9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0b17f78f9 | ||
|
|
bd71ff63a9 | ||
|
|
7428a8b979 | ||
|
|
2a38ba02dc | ||
|
|
73a1c07a64 | ||
|
|
113b74688f | ||
|
|
f1bd396bc7 | ||
|
|
cbbc3303ed | ||
|
|
55f32a2c5e | ||
|
|
b791c9c69f |
121
0001-daemon-Don-t-error-on-shutdown.patch
Normal file
121
0001-daemon-Don-t-error-on-shutdown.patch
Normal file
@ -0,0 +1,121 @@
|
||||
From 9791ab077c5ada6ded2f9d9e5553475ba3428530 Mon Sep 17 00:00:00 2001
|
||||
From: lyn1001 <thistleslyn@163.com>
|
||||
Date: Mon, 8 Apr 2024 13:22:31 +0800
|
||||
Subject: [PATCH] daemon Don't error on shutdown
|
||||
|
||||
|
||||
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
|
||||
index 46d5a77..c785a6a 100644
|
||||
--- a/daemon/gdm-display.c
|
||||
+++ b/daemon/gdm-display.c
|
||||
@@ -93,6 +93,7 @@ typedef struct _GdmDisplayPrivate
|
||||
guint have_existing_user_accounts : 1;
|
||||
guint doing_initial_setup : 1;
|
||||
guint session_registered : 1;
|
||||
+ guint shutting_down : 1;
|
||||
|
||||
GStrv supported_session_types;
|
||||
} GdmDisplayPrivate;
|
||||
@@ -119,6 +120,7 @@ enum {
|
||||
PROP_DOING_INITIAL_SETUP,
|
||||
PROP_SESSION_REGISTERED,
|
||||
PROP_SUPPORTED_SESSION_TYPES,
|
||||
+ PROP_SHUTTING_DOWN,
|
||||
};
|
||||
|
||||
static void gdm_display_class_init (GdmDisplayClass *klass);
|
||||
@@ -691,8 +693,7 @@ gdm_display_unmanage (GdmDisplay *self)
|
||||
g_object_unref (priv->access_file);
|
||||
priv->access_file = NULL;
|
||||
}
|
||||
-
|
||||
- if (!priv->session_registered) {
|
||||
+ if (!priv->session_registered && !priv->shutting_down) {
|
||||
g_warning ("GdmDisplay: Session never registered, failing");
|
||||
_gdm_display_set_status (self, GDM_DISPLAY_FAILED);
|
||||
} else {
|
||||
@@ -878,6 +879,16 @@ _gdm_display_set_session_registered (GdmDisplay *self,
|
||||
priv->session_registered = registered;
|
||||
}
|
||||
|
||||
+static void
|
||||
+_gdm_display_set_shutting_down (GdmDisplay *self,
|
||||
+ gboolean shutting_down)
|
||||
+{
|
||||
+ GdmDisplayPrivate *priv;
|
||||
+
|
||||
+ priv = gdm_display_get_instance_private (self);
|
||||
+ priv->shutting_down = shutting_down;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
_gdm_display_set_launch_environment (GdmDisplay *self,
|
||||
GdmLaunchEnvironment *launch_environment)
|
||||
@@ -989,6 +1000,9 @@ gdm_display_set_property (GObject *object,
|
||||
case PROP_SUPPORTED_SESSION_TYPES:
|
||||
_gdm_display_set_supported_session_types (self, g_value_get_boxed (value));
|
||||
break;
|
||||
+ case PROP_SHUTTING_DOWN:
|
||||
+ _gdm_display_set_shutting_down (self, g_value_get_boolean (value));
|
||||
+ break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -1070,6 +1084,9 @@ gdm_display_get_property (GObject *object,
|
||||
case PROP_SUPPORTED_SESSION_TYPES:
|
||||
g_value_set_boxed (value, priv->supported_session_types);
|
||||
break;
|
||||
+ case PROP_SHUTTING_DOWN:
|
||||
+ g_value_set_boolean (value, priv->shutting_down);
|
||||
+ break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -1424,6 +1441,13 @@ gdm_display_class_init (GdmDisplayClass *klass)
|
||||
"supported session types",
|
||||
G_TYPE_STRV,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||
+
|
||||
+ g_object_class_install_property (object_class,
|
||||
+ PROP_SHUTTING_DOWN,
|
||||
+ g_param_spec_boolean ("shutting-down",
|
||||
+ NULL, NULL,
|
||||
+ FALSE,
|
||||
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
||||
static void
|
||||
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||
index cc61efc..072ae97 100644
|
||||
--- a/daemon/gdm-manager.c
|
||||
+++ b/daemon/gdm-manager.c
|
||||
@@ -2746,11 +2746,14 @@ unexport_display (const char *id,
|
||||
}
|
||||
|
||||
static void
|
||||
-finish_display (const char *id,
|
||||
- GdmDisplay *display,
|
||||
- GdmManager *manager)
|
||||
+shut_down_display (const char *id,
|
||||
+ GdmDisplay *display,
|
||||
+ GdmManager *manager)
|
||||
{
|
||||
gdm_display_stop_greeter_session (display);
|
||||
+
|
||||
+ g_object_set (G_OBJECT (display), "shutting-down", TRUE, NULL);
|
||||
+
|
||||
if (gdm_display_get_status (display) == GDM_DISPLAY_MANAGED)
|
||||
gdm_display_unmanage (display);
|
||||
gdm_display_finish (display);
|
||||
@@ -2802,7 +2805,7 @@ gdm_manager_dispose (GObject *object)
|
||||
}
|
||||
|
||||
gdm_display_store_foreach (manager->priv->display_store,
|
||||
- (GdmDisplayStoreFunc) finish_display,
|
||||
+ (GdmDisplayStoreFunc) shut_down_display,
|
||||
manager);
|
||||
|
||||
gdm_display_store_clear (manager->priv->display_store);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
--- gdm-42.0/meson.build.orig 2022-04-01 14:44:07.292205407 +0800
|
||||
+++ gdm-42.0/meson.build 2022-04-01 14:44:35.215611962 +0800
|
||||
@@ -170,6 +170,7 @@ default_pam_config = get_option('default
|
||||
# If requested, try autodetecting from release files (see NetworkManager source)
|
||||
if default_pam_config == 'autodetect'
|
||||
pam_autodetect_map = {
|
||||
+ '/etc/openEuler-release': 'redhat',
|
||||
'/etc/redhat-release': 'redhat',
|
||||
'/etc/fedora-release': 'redhat',
|
||||
'/etc/exherbo-release': 'exherbo',
|
||||
BIN
gdm-42.0.tar.xz
BIN
gdm-42.0.tar.xz
Binary file not shown.
BIN
gdm-43.0.tar.xz
Normal file
BIN
gdm-43.0.tar.xz
Normal file
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
--- gdm-42.0/data/gdm.service.in.orig 2022-04-01 14:42:08.314733966 +0800
|
||||
+++ gdm-42.0/data/gdm.service.in 2022-04-01 14:42:20.537474205 +0800
|
||||
@@ -20,6 +20,7 @@ After=rc-local.service plymouth-start.se
|
||||
OnFailure=plymouth-quit.service
|
||||
|
||||
[Service]
|
||||
+ExecStartPre=/bin/sh -c "systemctl stop session-c*.scope"
|
||||
ExecStart=${sbindir}/gdm
|
||||
KillMode=mixed
|
||||
Restart=always
|
||||
169
gdm.spec
169
gdm.spec
@ -1,76 +1,118 @@
|
||||
%global _hardened_build 1
|
||||
|
||||
%define libauditver 1.0.6
|
||||
%define gtk3_version 2.99.2
|
||||
%define pam_version 0.99.8.1-11
|
||||
%define desktop_file_utils_version 0.2.90
|
||||
%define nss_version 3.11.1
|
||||
|
||||
Name: gdm
|
||||
Epoch: 1
|
||||
Version: 42.0
|
||||
Release: 1
|
||||
Summary: A graphical display manager
|
||||
License: GPLv2+
|
||||
URL: https://wiki.gnome.org/Projects/GDM
|
||||
Source0: http://download.gnome.org/sources/gdm/42/gdm-%{version}.tar.xz
|
||||
Source1: org.gnome.login-screen.gschema.override
|
||||
Source5: default.pa-for-gdm
|
||||
Name: gdm
|
||||
Epoch: 1
|
||||
Version: 43.0
|
||||
Release: 4
|
||||
Summary: The GNOME Display Manager
|
||||
License: GPLv2+
|
||||
URL: https://wiki.gnome.org/Projects/GDM
|
||||
Source0: http://download.gnome.org/sources/gdm/43/gdm-%{version}.tar.xz
|
||||
Source1: org.gnome.login-screen.gschema.override
|
||||
Source5: default.pa-for-gdm
|
||||
|
||||
Patch0: 0001-data-add-system-dconf-databases-to-gdm-profile.patch
|
||||
Patch1: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch
|
||||
Patch2: gdm-should-recover-automatically.patch
|
||||
Patch3: 9000-add-openeuler-pam-config.patch
|
||||
Patch0: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch
|
||||
Patch1: 0001-data-add-system-dconf-databases-to-gdm-profile.patch
|
||||
Patch2: 0001-daemon-Don-t-error-on-shutdown.patch
|
||||
|
||||
BuildRequires: meson automake autoconf systemd dconf itstool libtool which
|
||||
BuildRequires: systemd-devel libselinux-devel libattr-devel gettext-devel
|
||||
BuildRequires: yelp-devel yelp-tools plymouth-devel libdmx-devel libXdmcp-devel
|
||||
BuildRequires: xorg-x11-server-Xorg xorg-x11-server-devel keyutils-libs-devel accountsservice-devel
|
||||
BuildRequires: pkgconfig(check) pkgconfig(gobject-introspection-1.0) pkgconfig(libcanberra-gtk3)
|
||||
BuildRequires: pkgconfig(iso-codes) pkgconfig(gudev-1.0)
|
||||
BuildRequires: pkgconfig(ply-boot-client) pkgconfig(x11) pkgconfig(xau)
|
||||
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
|
||||
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
|
||||
BuildRequires: nss-devel >= %{nss_version}
|
||||
BuildRequires: pam-devel >= 0:%{pam_version}
|
||||
BuildRequires: audit-devel >= %{libauditver}
|
||||
BuildRequires: accountsservice-devel
|
||||
BuildRequires: audit-libs-devel >= %{libauditver}
|
||||
BuildRequires: dconf
|
||||
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: keyutils-libs-devel
|
||||
BuildRequires: libXdmcp-devel
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: libdmx-devel
|
||||
BuildRequires: meson
|
||||
BuildRequires: nss-devel >= %{nss_version}
|
||||
BuildRequires: pam-devel >= 0:%{pam_version}
|
||||
BuildRequires: pkgconfig(accountsservice) >= 0.6.3
|
||||
BuildRequires: pkgconfig(check)
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
|
||||
BuildRequires: pkgconfig(gudev-1.0)
|
||||
BuildRequires: pkgconfig(iso-codes)
|
||||
BuildRequires: pkgconfig(libcanberra-gtk3)
|
||||
BuildRequires: pkgconfig(libselinux)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(ply-boot-client)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xau)
|
||||
BuildRequires: pkgconfig(xorg-server)
|
||||
BuildRequires: plymouth-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: which
|
||||
BuildRequires: xorg-x11-server-Xorg
|
||||
BuildRequires: xorg-x11-server-devel
|
||||
BuildRequires: yelp-devel
|
||||
BuildRequires: yelp-tools
|
||||
|
||||
Requires: accountsservice
|
||||
Requires: audit-libs >= %{libauditver}
|
||||
Requires: dconf
|
||||
Requires: gnome-keyring-pam
|
||||
Requires: gnome-session
|
||||
Requires: gnome-session-wayland-session
|
||||
Requires: gnome-settings-daemon >= 3.27.90
|
||||
Requires: gnome-shell
|
||||
Requires: iso-codes
|
||||
Requires: libXau >= 1.0.4-4
|
||||
Requires: pam >= 0:%{pam_version}
|
||||
Requires: /sbin/nologin
|
||||
Requires: setxkbmap
|
||||
Requires: systemd >= 186
|
||||
Requires: system-logos
|
||||
Requires: systemd-pam
|
||||
Requires: xhost xmodmap xrdb
|
||||
Requires: xorg-x11-xinit
|
||||
Requires: /usr/bin/dbus-run-session
|
||||
|
||||
Provides: service(graphical-login) = %{name}
|
||||
Provides: gdm-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Provides: gdm-plugin-smartcard = %{epoch}:%{version}-%{release}
|
||||
Provides: gdm-plugin-fingerprint = %{epoch}:%{version}-%{release}
|
||||
Provides: pulseaudio-gdm-hooks = 1:%{version}-%{release}
|
||||
Obsoletes: gdm-libs < 1:%{version}-%{release} gdm-plugin-smartcard < 1:%{version}-%{release}
|
||||
Obsoletes: gdm-plugin-fingerprint < 1:%{version}-%{release} pulseaudio-gdm-hooks < 1:%{version}-%{release}
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
Requires: accountsservice dconf gnome-keyring-pam gnome-session dbus-daemon
|
||||
Requires: gnome-session-wayland-session gnome-settings-daemon >= 3.27.90 gnome-shell iso-codes
|
||||
Requires: libXau >= 1.0.4-4 util-linux systemd >= 186 xorg-x11-xkb-utils
|
||||
Requires: system-logos xorg-x11-server-utils xorg-x11-xinit
|
||||
Requires: audit-libs >= %{libauditver} pam >= 0:%{pam_version}
|
||||
|
||||
Provides: service(graphical-login) = %{name}
|
||||
Provides: gdm-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Provides: gdm-plugin-smartcard = %{epoch}:%{version}-%{release}
|
||||
Provides: gdm-plugin-fingerprint = %{epoch}:%{version}-%{release}
|
||||
Provides: pulseaudio-gdm-hooks = 1:%{version}-%{release}
|
||||
Obsoletes: gdm-libs < 1:%{version}-%{release} gdm-plugin-smartcard < 1:%{version}-%{release}
|
||||
Obsoletes: gdm-plugin-fingerprint < 1:%{version}-%{release} pulseaudio-gdm-hooks < 1:%{version}-%{release}
|
||||
|
||||
%description
|
||||
The GNOME Display Manager is a system service that is responsible for
|
||||
providing graphical log-ins and managing local and remote displays,
|
||||
and if the session doesn't provide a display server, GDM will start
|
||||
the display server. It also provides initiate functionality for
|
||||
user-switching, so multiple users can be logged in at the same time.
|
||||
GDM, the GNOME Display Manager, handles authentication-related backend
|
||||
functionality for logging in a user and unlocking the user's session after
|
||||
it's been locked. GDM also provides functionality for initiating user-switching,
|
||||
so more than one user can be logged in at the same time. It handles
|
||||
graphical session registration with the system for both local and remote
|
||||
sessions (in the latter case, via the XDMCP protocol). In cases where the
|
||||
session doesn't provide it's own display server, GDM can start the display
|
||||
server on behalf of the session.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for gdm
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release} pam-devel
|
||||
Provides: gdm-pam-extensions-devel = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: gdm-pam-extensions-devel < %{epoch}:%{version}-%{release}
|
||||
%package devel
|
||||
Summary: Development files for gdm
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||
Requires: pam-devel
|
||||
Provides: gdm-pam-extensions-devel = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: gdm-pam-extensions-devel < %{epoch}:%{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The gdm-devel package contains header files and others for building
|
||||
applications that use GDM.
|
||||
%description devel
|
||||
The gdm-devel package contains headers and other
|
||||
files needed to build custom greeters.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
sed -i '/ExecStart/i ExecStartPre=\/bin\/sh -c "systemctl stop session-c*.scope"' data/gdm.service.in
|
||||
sed -i "/redhat-release/i \ \ \ \ '\/etc\/%{_vendor}-release': 'redhat'," meson.build
|
||||
|
||||
%build
|
||||
%meson -Dpam-prefix=%{_sysconfdir} \
|
||||
@ -94,6 +136,7 @@ install -d %{buildroot}/run/gdm
|
||||
%meson_install
|
||||
|
||||
install -p -m644 -D %{SOURCE5} %{buildroot}%{_localstatedir}/lib/gdm/.config/pulse/default.pa
|
||||
#install -p -m644 -D %{SOURCE6} %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||
rm -f %{buildroot}%{_sysconfdir}/pam.d/gdm
|
||||
cp -a %{SOURCE1} %{buildroot}%{_datadir}/glib-2.0/schemas
|
||||
rm -rf %{buildroot}/%{_prefix}/doc
|
||||
@ -177,6 +220,7 @@ fi
|
||||
%config %{_sysconfdir}/gdm/PostSession/*
|
||||
%config %{_sysconfdir}/pam.d/gdm-autologin
|
||||
%config %{_sysconfdir}/pam.d/gdm-password
|
||||
# not config files
|
||||
%{_sysconfdir}/gdm/Xsession
|
||||
%{_datadir}/gdm/gdm.schemas
|
||||
%{_sysconfdir}/dbus-1/system.d/gdm.conf
|
||||
@ -225,18 +269,33 @@ fi
|
||||
%{_unitdir}/gdm.service
|
||||
%dir %{_userunitdir}/gnome-session@gnome-login.target.d/
|
||||
%{_userunitdir}/gnome-session@gnome-login.target.d/session.conf
|
||||
#%%{_sysusersdir}/%{name}.conf
|
||||
|
||||
%files devel
|
||||
%dir %{_includedir}/gdm
|
||||
%{_includedir}/gdm/*.h
|
||||
%exclude %{_includedir}/gdm/gdm-pam-extensions.h
|
||||
%dir %{_datadir}/gir-1.0
|
||||
%{_datadir}/gir-1.0/Gdm-1.0.gir
|
||||
%{_libdir}/pkgconfig/gdm.pc
|
||||
%{_libdir}/pkgconfig/gdm-pam-extensions.pc
|
||||
|
||||
%changelog
|
||||
* Apr Fri 15 2022 dillon chen <dillon.chen@gmail.com> - 1:42.0-1
|
||||
* Tue Jan 21 2025 zhangshaoning <zhangshaoning@uniontech.com> - 1:43.0-4
|
||||
- Fix bad date in changelog
|
||||
|
||||
* Mon Apr 8 2024 liyanan <liyanan61@h-partners.com> - 1:43.0-3
|
||||
- fix daemon error on shutdown
|
||||
|
||||
* Wed Mar 13 2024 panchenbo <panchenbo@kylinsec.com.cn> - 1:43.0-2
|
||||
- modify openEuler to %{_vendor}
|
||||
|
||||
* Mon Jan 02 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 1:43.0-1
|
||||
- Update to 43.0
|
||||
|
||||
* Mon Aug 1 2022 caodongxia <caodongxia@h-partners.com> - 1:42.0-2
|
||||
- The installation dependency pam is added to solve the gdm.servic startup problem
|
||||
|
||||
* Fri Apr 15 2022 dillon chen <dillon.chen@gmail.com> - 1:42.0-1
|
||||
- Update to 42.0
|
||||
|
||||
* Tue Aug 17 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-3
|
||||
|
||||
1
gdm.sysusers
Normal file
1
gdm.sysusers
Normal file
@ -0,0 +1 @@
|
||||
u gdm 42 "GNOME Display Manager" /var/lib/gdm
|
||||
Loading…
x
Reference in New Issue
Block a user