Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/gdm/
Date: Sat, 12 Jun 2021 08:07:15
Message-Id: 1623485223.85362b50368869a96875161b162316db4506c1ca.pacho@gentoo
1 commit: 85362b50368869a96875161b162316db4506c1ca
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 12 08:07:03 2021 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 12 08:07:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85362b50
7
8 gnome-base/gdm: Fix udev rules.d installation path
9
10 Closes: https://bugs.gentoo.org/794136
11 Thanks-to: nvaert1986
12 Package-Manager: Portage-3.0.19, Repoman-3.0.3
13 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
14
15 gnome-base/gdm/gdm-40.0-r1.ebuild | 215 ++++++++++++++++++++++++++++++++++++++
16 1 file changed, 215 insertions(+)
17
18 diff --git a/gnome-base/gdm/gdm-40.0-r1.ebuild b/gnome-base/gdm/gdm-40.0-r1.ebuild
19 new file mode 100644
20 index 00000000000..cecd4f89523
21 --- /dev/null
22 +++ b/gnome-base/gdm/gdm-40.0-r1.ebuild
23 @@ -0,0 +1,215 @@
24 +# Copyright 1999-2021 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +inherit desktop gnome2 meson pam readme.gentoo-r1 systemd toolchain-funcs udev
30 +
31 +DESCRIPTION="GNOME Display Manager for managing graphical display servers and user logins"
32 +HOMEPAGE="https://wiki.gnome.org/Projects/GDM"
33 +
34 +SRC_URI="${SRC_URI}
35 + branding? ( https://www.mail-archive.com/tango-artists@×××××××××××××××××.org/msg00043/tango-gentoo-v1.1.tar.gz )
36 +"
37 +
38 +LICENSE="
39 + GPL-2+
40 + branding? ( CC-BY-SA-4.0 )
41 +"
42 +
43 +SLOT="0"
44 +
45 +IUSE="accessibility audit bluetooth-sound branding elogind fprint ipv6 plymouth selinux systemd tcpd test wayland"
46 +RESTRICT="!test? ( test )"
47 +REQUIRED_USE="^^ ( elogind systemd )"
48 +
49 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
50 +
51 +# dconf, dbus and g-s-d are needed at install time for dconf update
52 +# keyutils is automagic dep that makes autologin unlock login keyring when all the passwords match (disk encryption, user pw and login keyring)
53 +# dbus-run-session used at runtime
54 +COMMON_DEPEND="
55 + virtual/udev
56 + >=dev-libs/glib-2.56:2
57 + >=x11-libs/gtk+-2.91.1:3
58 + >=media-libs/libcanberra-0.4[gtk3]
59 + >=sys-apps/accountsservice-0.6.35
60 + x11-libs/libxcb
61 + sys-apps/keyutils:=
62 + selinux? ( sys-libs/libselinux )
63 +
64 + x11-libs/libX11
65 + x11-libs/libXau
66 + x11-base/xorg-server[-minimal]
67 + x11-libs/libXdmcp
68 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
69 +
70 + systemd? ( >=sys-apps/systemd-186:0=[pam] )
71 + elogind? ( >=sys-auth/elogind-239.3[pam] )
72 +
73 + plymouth? ( sys-boot/plymouth )
74 + audit? ( sys-process/audit )
75 +
76 + sys-libs/pam
77 + sys-auth/pambase[elogind?,systemd?]
78 +
79 + >=gnome-base/dconf-0.20
80 + >=gnome-base/gnome-settings-daemon-3.1.4
81 + gnome-base/gsettings-desktop-schemas
82 + sys-apps/dbus
83 +
84 + >=x11-misc/xdg-utils-1.0.2-r3
85 +
86 + >=dev-libs/gobject-introspection-0.9.12:=
87 +"
88 +# XXX: These deps are from session and desktop files in data/ directory
89 +# fprintd is used via dbus by gdm-fingerprint-extension
90 +RDEPEND="${COMMON_DEPEND}
91 + acct-group/gdm
92 + acct-user/gdm
93 + >=gnome-base/gnome-session-3.6
94 + >=gnome-base/gnome-shell-3.1.90
95 + x11-apps/xhost
96 +
97 + accessibility? (
98 + >=app-accessibility/orca-3.10
99 + gnome-extra/mousetweaks
100 + )
101 + fprint? ( sys-auth/fprintd[pam] )
102 +"
103 +DEPEND="${COMMON_DEPEND}
104 + x11-base/xorg-proto
105 +"
106 +BDEPEND="
107 + app-text/docbook-xml-dtd:4.1.2
108 + dev-util/gdbus-codegen
109 + dev-util/glib-utils
110 + dev-util/itstool
111 + >=gnome-base/dconf-0.20
112 + >=sys-devel/gettext-0.19.8
113 + virtual/pkgconfig
114 + test? ( >=dev-libs/check-0.9.4 )
115 + app-text/yelp-tools
116 +"
117 +
118 +DOC_CONTENTS="
119 + To make GDM start at boot with systemd, run:\n
120 + # systemctl enable gdm.service\n
121 + \n
122 + To make GDM start at boot with OpenRC, edit /etc/conf.d to have
123 + DISPLAYMANAGER=\"gdm\" and enable the xdm service:\n
124 + # rc-update add xdm
125 + \n
126 + For passwordless login to unlock your keyring, you need to install
127 + sys-auth/pambase with USE=gnome-keyring and set an empty password
128 + on your keyring. Use app-crypt/seahorse for that.\n
129 + \n
130 + You may need to install app-crypt/coolkey and sys-auth/pam_pkcs11
131 + for smartcard support
132 +"
133 +
134 +PATCHES=(
135 + # Gentoo does not have a fingerprint-auth pam stack
136 + "${FILESDIR}/${PN}-3.8.4-fingerprint-auth.patch"
137 +
138 + # Add elogind support
139 + "${FILESDIR}/${P}-meson-allow-building-with-elogind.patch"
140 +
141 + # Support pam_elogind.so in gdm-launch-environment.pam
142 + "${FILESDIR}/pam-elogind.patch"
143 +
144 + "${FILESDIR}"/${P}-meson-Fix-libwrap-detection.patch
145 +)
146 +
147 +src_prepare() {
148 + default
149 +
150 + # Show logo when branding is enabled
151 + use branding && eapply "${FILESDIR}/${PN}-3.30.3-logo.patch"
152 +}
153 +
154 +src_configure() {
155 + # --with-initial-vt=7 conflicts with plymouth, bug #453392
156 + # gdm-3.30 now reaps (stops) the login screen when the login VT isn't active, which
157 + # saves on memory. However this means if we don't start on VT1, gdm doesn't start up
158 + # before user manually goes to VT7. Thus as-is we can not keep gdm away from VT1,
159 + # so lets try always having it in VT1 and see if that is an issue for people before
160 + # hacking up workarounds for the initial start case.
161 + local emesonargs=(
162 + --localstatedir /var
163 +
164 + -Ddefault-pam-config=exherbo
165 + -Dgdm-xsession=true
166 + -Dgroup=gdm
167 + $(meson_use ipv6)
168 + $(meson_feature audit libaudit)
169 + -Dlogind-provider=$(usex systemd systemd elogind)
170 + -Dpam-mod-dir=$(getpam_mod_dir)
171 + $(meson_feature plymouth)
172 + -Drun-dir=/run/gdm
173 + $(meson_feature selinux)
174 + $(meson_use systemd systemd-journal)
175 + $(meson_use tcpd tcp-wrappers)
176 + -Dudev-dir=$(get_udevdir)/rules.d
177 + -Duser=gdm
178 + -Duser-display-server=true
179 + $(meson_use wayland wayland-support)
180 + -Dxdmcp=enabled
181 + )
182 +
183 + if use elogind; then
184 + emesonargs+=(
185 + -Dinitial-vt=7 # TODO: Revisit together with startDM.sh and other xinit talks; also ignores plymouth possibility
186 + -Dsystemdsystemunitdir=no
187 + -Dsystemduserunitdir=no
188 + )
189 + else
190 + emesonargs+=(
191 + -Dinitial-vt=1
192 + -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
193 + -Dsystemduserunitdir="$(systemd_get_userunitdir)"
194 + )
195 + fi
196 +
197 + meson_src_configure
198 +}
199 +
200 +src_install() {
201 + meson_src_install
202 +
203 + if ! use accessibility ; then
204 + rm "${ED}"/usr/share/gdm/greeter/autostart/orca-autostart.desktop || die
205 + fi
206 +
207 + if ! use bluetooth-sound ; then
208 + # Workaround https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/10
209 + # bug #679526
210 + insinto /var/lib/gdm/.config/pulse
211 + doins "${FILESDIR}"/default.pa
212 + fi
213 +
214 + # install XDG_DATA_DIRS gdm changes
215 + echo 'XDG_DATA_DIRS="/usr/share/gdm"' > 99xdg-gdm
216 + doenvd 99xdg-gdm
217 +
218 + use branding && newicon "${WORKDIR}/tango-gentoo-v1.1/scalable/gentoo.svg" gentoo-gdm.svg
219 +
220 + readme.gentoo_create_doc
221 +}
222 +
223 +pkg_postinst() {
224 + gnome2_pkg_postinst
225 + local d ret
226 +
227 + # bug #669146; gdm may crash if /var/lib/gdm subdirs are not owned by gdm:gdm
228 + ret=0
229 + ebegin "Fixing "${EROOT}"/var/lib/gdm ownership"
230 + chown --no-dereference gdm:gdm "${EROOT}/var/lib/gdm" || ret=1
231 + for d in "${EROOT}/var/lib/gdm/"{.cache,.color,.config,.dbus,.local}; do
232 + [[ ! -e "${d}" ]] || chown --no-dereference -R gdm:gdm "${d}" || ret=1
233 + done
234 + eend ${ret}
235 +
236 + systemd_reenable gdm.service
237 + readme.gentoo_print_elog
238 +}