Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/gdm/, gnome-base/gdm/files/
Date: Fri, 30 Apr 2021 16:08:54
Message-Id: 1619798896.b7cbef6cf8bcca85cbb0594e62226c8a6a262b69.mattst88@gentoo
1 commit: b7cbef6cf8bcca85cbb0594e62226c8a6a262b69
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 30 02:27:41 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 30 16:08:16 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7cbef6c
7
8 gnome-base/gdm: Version bump to 40.0
9
10 * Drop 49-keychain and 50-ssh-agent files (bugs #549102, #692648)
11 * Switch to Meson (resolves bug #585976)
12 ** Remove unnecessary fontconfig, libXext, iso-codes, libgudev,
13 libXinerama dependencies
14 * Remove unused introspection, smartcard, xinerama USE flags
15 * Depend on xorg-server[-minimal] (bug #660546)
16 * Resolve bug #613222, resolved upstream in v40.0
17 * Resolve bug #733708, resolved upstream in v3.38
18
19 Bug: https://bugs.gentoo.org/762460
20 Closes: https://bugs.gentoo.org/549102
21 Closes: https://bugs.gentoo.org/585976
22 Closes: https://bugs.gentoo.org/613222
23 Closes: https://bugs.gentoo.org/660546
24 Closes: https://bugs.gentoo.org/692648
25 Closes: https://bugs.gentoo.org/733708
26 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
27
28 gnome-base/gdm/Manifest | 1 +
29 ...dm-40.0-meson-allow-building-with-elogind.patch | 211 +++++++++++++++++++++
30 gnome-base/gdm/gdm-40.0.ebuild | 207 ++++++++++++++++++++
31 3 files changed, 419 insertions(+)
32
33 diff --git a/gnome-base/gdm/Manifest b/gnome-base/gdm/Manifest
34 index 155c24931fb..d8fd955b063 100644
35 --- a/gnome-base/gdm/Manifest
36 +++ b/gnome-base/gdm/Manifest
37 @@ -1,2 +1,3 @@
38 DIST gdm-3.36.4.tar.xz 1235796 BLAKE2B eeac6c3c95993d7a75eecd03b51f0519b2f899eaecce8767dbab01eead68bddde21edc999eaf6b7ce747084ac9f88ab71cd7bf602e3bdc5bfe09038e3b01ad3a SHA512 ee8a4ae4a1c4846e4d52fda0b115dfc79ef76b78a2349977767e4212910b5ad331b908601f252292a8a944973372d1dce3124d9ccb8a2519a98d0e4813a6ec61
39 +DIST gdm-40.0.tar.xz 800296 BLAKE2B 9c2038758cec09f13c18bd79d431e82a29fb1a2b8ab099498a0b8d920cb93896abceab9157edae8cc15312e03d21eb36b649c2cc8761f9af5fec387c5f28a261 SHA512 b20d02f8a80f6aff8909a69c6c621c20c5aa1b25cfedd68bf95faaaa56d5f7cd5d607d1a7388b97aa06510684f1e9e474248042a00203f496c39930e001bb64c
40 DIST tango-gentoo-v1.1.tar.gz 29322 BLAKE2B 83fa2bf37727e60851dd679054fe1b153ebfea58c9a9a40f891f7d68d3b047b02e8effa1d1b4e08d64500a2072ce7200f159c92a352da7124de27e1b05bb6027 SHA512 87d47ddab68361db6d99866c51705dcb3e198f8345a1096859acf2c6cca5099dd23c7fb30d124f52c4933ea38fd45fadffbbe6ecbdfa84f5b60938a4824f9045
41
42 diff --git a/gnome-base/gdm/files/gdm-40.0-meson-allow-building-with-elogind.patch b/gnome-base/gdm/files/gdm-40.0-meson-allow-building-with-elogind.patch
43 new file mode 100644
44 index 00000000000..39cd12dd227
45 --- /dev/null
46 +++ b/gnome-base/gdm/files/gdm-40.0-meson-allow-building-with-elogind.patch
47 @@ -0,0 +1,211 @@
48 +https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/113
49 +
50 +From 462cc0f5346f5913cf7151044f1c232c5d21c1c3 Mon Sep 17 00:00:00 2001
51 +From: Dudemanguy <random342@×××××××.cc>
52 +Date: Mon, 5 Oct 2020 18:41:55 -0500
53 +Subject: [PATCH] meson: allow building with elogind
54 +
55 +Currently, the GDM meson build has a hard dependency on systemd.
56 +However, GDM can function just fine if one is using elogind. This allows
57 +a user to build GDM against libelogind and also disable the systemd
58 +system and user units.
59 +---
60 + common/meson.build | 2 +-
61 + data/meson.build | 62 ++++++++++++++----------
62 + data/pam-arch/gdm-launch-environment.pam | 1 +
63 + libgdm/meson.build | 2 +-
64 + meson.build | 36 +++++++++-----
65 + meson_options.txt | 5 +-
66 + 6 files changed, 66 insertions(+), 42 deletions(-)
67 +
68 +diff --git a/common/meson.build b/common/meson.build
69 +index 074dd92e1..bca58f7c4 100644
70 +--- a/common/meson.build
71 ++++ b/common/meson.build
72 +@@ -11,7 +11,7 @@ libgdmcommon_src = files(
73 + )
74 +
75 + libgdmcommon_deps = [
76 +- libsystemd_dep,
77 ++ logind_dep,
78 + gobject_dep,
79 + gio_dep,
80 + gio_unix_dep,
81 +diff --git a/data/meson.build b/data/meson.build
82 +index 7c5222eaf..403336c31 100644
83 +--- a/data/meson.build
84 ++++ b/data/meson.build
85 +@@ -168,41 +168,53 @@ else
86 + service_config.set('PLYMOUTH_QUIT_SERVICE', '')
87 + endif
88 +
89 +-if get_option('systemdsystemunitdir') != ''
90 +- systemd_systemunitdir = get_option('systemdsystemunitdir')
91 +-else
92 +- systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
93 ++systemdsystemunitdir = get_option('systemdsystemunitdir')
94 ++if systemdsystemunitdir != 'no'
95 ++ assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd system unit dir or disable it')
96 ++ if get_option('systemdsystemunitdir') != ''
97 ++ systemd_systemunitdir = get_option('systemdsystemunitdir')
98 ++ else
99 ++ systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
100 ++ endif
101 + endif
102 +
103 +-if get_option('systemduserunitdir') != ''
104 +- systemd_userunitdir = get_option('systemduserunitdir')
105 +-else
106 +- systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
107 +- define_variable: ['prefix', get_option('prefix')])
108 ++systemduserunitdir = get_option('systemduserunitdir')
109 ++if systemduserunitdir != 'no'
110 ++ assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
111 ++ if get_option('systemduserunitdir') != ''
112 ++ systemd_userunitdir = get_option('systemduserunitdir')
113 ++ else
114 ++ systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
115 ++ define_variable: ['prefix', get_option('prefix')])
116 ++ endif
117 + endif
118 +
119 +-configure_file(
120 +- input: 'gdm.service.in',
121 +- output: '@BASENAME@',
122 +- configuration: service_config,
123 +- install_dir: systemd_systemunitdir,
124 +- format: 'cmake'
125 +-)
126 ++if systemdsystemunitdir != 'no'
127 ++ configure_file(
128 ++ input: 'gdm.service.in',
129 ++ output: '@BASENAME@',
130 ++ configuration: service_config,
131 ++ install_dir: systemd_systemunitdir,
132 ++ format: 'cmake'
133 ++ )
134 ++endif
135 +
136 + gdm_gnome_session_wanted_targets = []
137 + foreach component: gdm_gnome_user_session_wanted_components
138 + gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
139 + endforeach
140 +
141 +-configure_file(
142 +- input: 'session.conf.in',
143 +- output: 'session.conf',
144 +- configuration: {
145 +- 'requires_component': gdm_gnome_shell_component,
146 +- 'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
147 +- },
148 +- install_dir: systemd_userunitdir / 'gnome-session@×××××××××××.target.d',
149 +-)
150 ++if systemduserunitdir != 'no'
151 ++ configure_file(
152 ++ input: 'session.conf.in',
153 ++ output: 'session.conf',
154 ++ configuration: {
155 ++ 'requires_component': gdm_gnome_shell_component,
156 ++ 'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
157 ++ },
158 ++ install_dir: systemd_userunitdir / 'gnome-session@×××××××××××.target.d',
159 ++ )
160 ++endif
161 +
162 + # XSession
163 + if get_option('gdm-xsession')
164 +diff --git a/libgdm/meson.build b/libgdm/meson.build
165 +index 3f8cafbb7..83e95151b 100644
166 +--- a/libgdm/meson.build
167 ++++ b/libgdm/meson.build
168 +@@ -56,7 +56,7 @@ libgdm_deps = [
169 + glib_dep,
170 + gio_dep,
171 + gio_unix_dep,
172 +- libsystemd_dep,
173 ++ logind_dep,
174 + libgdmcommon_dep,
175 + ]
176 +
177 +diff --git a/meson.build b/meson.build
178 +index e6fcf4b8b..a86a486b7 100644
179 +--- a/meson.build
180 ++++ b/meson.build
181 +@@ -92,21 +92,30 @@ xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
182 + if xdmcp_dep.found() and get_option('tcp-wrappers')
183 + libwrap_dep = cc.find_library('libwrap')
184 + endif
185 +-# systemd
186 +-systemd_dep = dependency('systemd')
187 +-libsystemd_dep = dependency('libsystemd')
188 +-if meson.version().version_compare('>= 0.53')
189 +- systemd_multiseat_x = find_program('systemd-multi-seat-x',
190 +- required: false,
191 +- dirs: [
192 +- systemd_dep.get_pkgconfig_variable('systemdutildir'),
193 +- '/lib/systemd',
194 +- '/usr/lib/systemd',
195 +- ])
196 ++
197 ++logind_provider = get_option('logind-provider')
198 ++systemd_dep = dependency('systemd', required: false)
199 ++if logind_provider == 'systemd'
200 ++ libsystemd_dep = dependency('libsystemd')
201 ++ logind_dep = libsystemd_dep
202 ++ if meson.version().version_compare('>= 0.53')
203 ++ systemd_multiseat_x = find_program('systemd-multi-seat-x',
204 ++ required: false,
205 ++ dirs: [
206 ++ systemd_dep.get_pkgconfig_variable('systemdutildir'),
207 ++ '/lib/systemd',
208 ++ '/usr/lib/systemd',
209 ++ ])
210 ++ else
211 ++ systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
212 ++ endif
213 ++ systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
214 + else
215 +- systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
216 ++ elogind_dep = dependency('libelogind')
217 ++ logind_dep = elogind_dep
218 ++ systemd_x_server = 'disabled'
219 + endif
220 +-systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
221 ++
222 + # Plymouth
223 + plymouth_dep = dependency('ply-boot-client', required: get_option('plymouth'))
224 + # Check for Solaris auditing API (ADT)
225 +@@ -313,6 +322,7 @@ summary({
226 + 'PAM Syslog': have_pam_syslog,
227 + 'Supports PAM Extensions': pam_extensions_supported,
228 + 'SeLinux': libselinux_dep.found(),
229 ++ 'Logind Provider': get_option('logind-provider'),
230 + 'Use GDM Xsession': get_option('gdm-xsession'),
231 + 'Use UserDisplayServer': get_option('user-display-server'),
232 + 'Use SystemdJournal': get_option('systemd-journal'),
233 +diff --git a/meson_options.txt b/meson_options.txt
234 +index 14e0b908b..5135d7d66 100644
235 +--- a/meson_options.txt
236 ++++ b/meson_options.txt
237 +@@ -12,6 +12,7 @@ option('initial-vt', type: 'integer', value: 1, description: 'Initial virtual te
238 + option('ipv6', type: 'boolean', value: false, description: 'Enables compilation of IPv6 code.')
239 + option('lang-file', type: 'string', value: '', description: 'File containing default language settings.')
240 + option('libaudit', type: 'feature', value: 'auto', description: 'Add Linux audit support.')
241 ++option('logind-provider', type: 'combo', choices: ['systemd', 'elogind'], value: 'systemd', description: 'Which logind library to use.')
242 + option('log-dir', type: 'string', value: '/var/log/gdm', description: 'Log directory.')
243 + option('pam-mod-dir', type: 'string', value: '', description: 'Directory to install PAM modules in.')
244 + option('pam-prefix', type: 'string', value: '', description: 'Specify where PAM files go.')
245 +@@ -27,8 +28,8 @@ option('solaris', type: 'boolean', value: false, description: 'Build for Solaris
246 + option('split-authentication', type: 'boolean', value: true, description: 'Enable multiple simultaneous PAM conversations during login.')
247 + option('sysconfsubdir', type: 'string', value: 'gdm', description: 'Directory name used under sysconfdir.')
248 + option('systemd-journal', type: 'boolean', value: true, description: 'Use journald support.')
249 +-option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service files.')
250 +-option('systemduserunitdir', type: 'string', value: '', description: 'Directory for systemd user service files.')
251 ++option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service files, or \'no\' to disable.')
252 ++option('systemduserunitdir', type: 'string', value: '', description: 'Directory for systemd user service files, or \'no\' to disable.')
253 + option('tcp-wrappers', type: 'boolean', value: false, description: 'Use TCP wrappers.')
254 + option('udev-dir', type: 'string', value: '', description: 'Directory for udev rules file.')
255 + option('user', type: 'string', value: 'gdm', description: 'GDM\'s username.')
256 +--
257 +GitLab
258 +
259
260 diff --git a/gnome-base/gdm/gdm-40.0.ebuild b/gnome-base/gdm/gdm-40.0.ebuild
261 new file mode 100644
262 index 00000000000..fdfbc1526ef
263 --- /dev/null
264 +++ b/gnome-base/gdm/gdm-40.0.ebuild
265 @@ -0,0 +1,207 @@
266 +# Copyright 1999-2021 Gentoo Authors
267 +# Distributed under the terms of the GNU General Public License v2
268 +
269 +EAPI=7
270 +
271 +inherit desktop gnome2 meson pam readme.gentoo-r1 systemd toolchain-funcs udev
272 +
273 +DESCRIPTION="GNOME Display Manager for managing graphical display servers and user logins"
274 +HOMEPAGE="https://wiki.gnome.org/Projects/GDM"
275 +
276 +SRC_URI="${SRC_URI}
277 + branding? ( https://www.mail-archive.com/tango-artists@×××××××××××××××××.org/msg00043/tango-gentoo-v1.1.tar.gz )
278 +"
279 +
280 +LICENSE="
281 + GPL-2+
282 + branding? ( CC-BY-SA-4.0 )
283 +"
284 +
285 +SLOT="0"
286 +
287 +IUSE="accessibility audit bluetooth-sound branding elogind fprint ipv6 plymouth selinux systemd tcpd test wayland"
288 +RESTRICT="!test? ( test )"
289 +REQUIRED_USE="^^ ( elogind systemd )"
290 +
291 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
292 +
293 +# dconf, dbus and g-s-d are needed at install time for dconf update
294 +# keyutils is automagic dep that makes autologin unlock login keyring when all the passwords match (disk encryption, user pw and login keyring)
295 +# dbus-run-session used at runtime
296 +COMMON_DEPEND="
297 + virtual/udev
298 + >=dev-libs/glib-2.56:2
299 + >=x11-libs/gtk+-2.91.1:3
300 + >=media-libs/libcanberra-0.4[gtk3]
301 + >=sys-apps/accountsservice-0.6.35
302 + x11-libs/libxcb
303 + sys-apps/keyutils:=
304 + selinux? ( sys-libs/libselinux )
305 +
306 + x11-libs/libX11
307 + x11-libs/libXau
308 + x11-base/xorg-server[-minimal]
309 + x11-libs/libXdmcp
310 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
311 +
312 + systemd? ( >=sys-apps/systemd-186:0=[pam] )
313 + elogind? ( >=sys-auth/elogind-239.3[pam] )
314 +
315 + plymouth? ( sys-boot/plymouth )
316 + audit? ( sys-process/audit )
317 +
318 + sys-libs/pam
319 + sys-auth/pambase[elogind?,systemd?]
320 +
321 + >=gnome-base/dconf-0.20
322 + >=gnome-base/gnome-settings-daemon-3.1.4
323 + gnome-base/gsettings-desktop-schemas
324 + sys-apps/dbus
325 +
326 + >=x11-misc/xdg-utils-1.0.2-r3
327 +
328 + >=dev-libs/gobject-introspection-0.9.12:=
329 +"
330 +# XXX: These deps are from session and desktop files in data/ directory
331 +# fprintd is used via dbus by gdm-fingerprint-extension
332 +RDEPEND="${COMMON_DEPEND}
333 + acct-group/gdm
334 + acct-user/gdm
335 + >=gnome-base/gnome-session-3.6
336 + >=gnome-base/gnome-shell-3.1.90
337 + x11-apps/xhost
338 +
339 + accessibility? (
340 + >=app-accessibility/orca-3.10
341 + gnome-extra/mousetweaks
342 + )
343 + fprint? ( sys-auth/fprintd[pam] )
344 +"
345 +DEPEND="${COMMON_DEPEND}
346 + x11-base/xorg-proto
347 +"
348 +BDEPEND="
349 + app-text/docbook-xml-dtd:4.1.2
350 + dev-util/gdbus-codegen
351 + dev-util/glib-utils
352 + dev-util/itstool
353 + >=gnome-base/dconf-0.20
354 + >=sys-devel/gettext-0.19.8
355 + virtual/pkgconfig
356 + test? ( >=dev-libs/check-0.9.4 )
357 + app-text/yelp-tools
358 +"
359 +
360 +DOC_CONTENTS="
361 + To make GDM start at boot with systemd, run:\n
362 + # systemctl enable gdm.service\n
363 + \n
364 + To make GDM start at boot with OpenRC, edit /etc/conf.d to have
365 + DISPLAYMANAGER=\"gdm\" and enable the xdm service:\n
366 + # rc-update add xdm
367 + \n
368 + For passwordless login to unlock your keyring, you need to install
369 + sys-auth/pambase with USE=gnome-keyring and set an empty password
370 + on your keyring. Use app-crypt/seahorse for that.\n
371 + \n
372 + You may need to install app-crypt/coolkey and sys-auth/pam_pkcs11
373 + for smartcard support
374 +"
375 +
376 +PATCHES=(
377 + # Gentoo does not have a fingerprint-auth pam stack
378 + "${FILESDIR}/${PN}-3.8.4-fingerprint-auth.patch"
379 +
380 + # Add elogind support
381 + "${FILESDIR}/${P}-meson-allow-building-with-elogind.patch"
382 +
383 + # Support pam_elogind.so in gdm-launch-environment.pam
384 + "${FILESDIR}/pam-elogind.patch"
385 +)
386 +
387 +src_prepare() {
388 + default
389 +
390 + # Show logo when branding is enabled
391 + use branding && eapply "${FILESDIR}/${PN}-3.30.3-logo.patch"
392 +}
393 +
394 +src_configure() {
395 + # --with-initial-vt=7 conflicts with plymouth, bug #453392
396 + # gdm-3.30 now reaps (stops) the login screen when the login VT isn't active, which
397 + # saves on memory. However this means if we don't start on VT1, gdm doesn't start up
398 + # before user manually goes to VT7. Thus as-is we can not keep gdm away from VT1,
399 + # so lets try always having it in VT1 and see if that is an issue for people before
400 + # hacking up workarounds for the initial start case.
401 + local emesonargs=(
402 + --localstatedir /var
403 +
404 + -Ddefault-pam-config=exherbo
405 + -Dgdm-xsession=true
406 + -Dgroup=gdm
407 + $(meson_use ipv6)
408 + $(meson_feature audit libaudit)
409 + -Dlogind-provider=$(usex systemd systemd elogind)
410 + -Dpam-mod-dir=$(getpam_mod_dir)
411 + $(meson_feature plymouth)
412 + -Drun-dir=/run/gdm
413 + $(meson_feature selinux)
414 + $(meson_use systemd systemd-journal)
415 + -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
416 + -Dsystemduserunitdir="$(systemd_get_userunitdir)"
417 + $(meson_use tcpd tcp-wrappers)
418 + -Dudev-dir=$(get_udevdir)
419 + -Duser=gdm
420 + -Duser-display-server=true
421 + $(meson_use wayland wayland-support)
422 + -Dxdmcp=enabled
423 + )
424 +
425 + if use elogind; then
426 + emesonargs+=(
427 + -Dinitial-vt=7 # TODO: Revisit together with startDM.sh and other xinit talks; also ignores plymouth possibility
428 + )
429 + fi
430 +
431 + meson_src_configure
432 +}
433 +
434 +src_install() {
435 + meson_src_install
436 +
437 + if ! use accessibility ; then
438 + rm "${ED}"/usr/share/gdm/greeter/autostart/orca-autostart.desktop || die
439 + fi
440 +
441 + if ! use bluetooth-sound ; then
442 + # Workaround https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/10
443 + # bug #679526
444 + insinto /var/lib/gdm/.config/pulse
445 + doins "${FILESDIR}"/default.pa
446 + fi
447 +
448 + # install XDG_DATA_DIRS gdm changes
449 + echo 'XDG_DATA_DIRS="/usr/share/gdm"' > 99xdg-gdm
450 + doenvd 99xdg-gdm
451 +
452 + use branding && newicon "${WORKDIR}/tango-gentoo-v1.1/scalable/gentoo.svg" gentoo-gdm.svg
453 +
454 + readme.gentoo_create_doc
455 +}
456 +
457 +pkg_postinst() {
458 + gnome2_pkg_postinst
459 + local d ret
460 +
461 + # bug #669146; gdm may crash if /var/lib/gdm subdirs are not owned by gdm:gdm
462 + ret=0
463 + ebegin "Fixing "${EROOT}"/var/lib/gdm ownership"
464 + chown --no-dereference gdm:gdm "${EROOT}/var/lib/gdm" || ret=1
465 + for d in "${EROOT}/var/lib/gdm/"{.cache,.color,.config,.dbus,.local}; do
466 + [[ ! -e "${d}" ]] || chown --no-dereference -R gdm:gdm "${d}" || ret=1
467 + done
468 + eend ${ret}
469 +
470 + systemd_reenable gdm.service
471 + readme.gentoo_print_elog
472 +}