]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: | |
3 | # - s=/dev/null=/home/services/xdm= in %%trigger for graceful upgrade from xdm/kdm/gdm 2.2 | |
4 | # - check all /etc/pam.d/gdm-* to be pldized: | |
5 | # gdm-autologin[4] gdm-fingerprint[10] gdm-password[1] gdm-smartcard gdm-launch-environment[11] | |
6 | # | |
7 | # Conditional build: | |
8 | %bcond_without static_libs # static library | |
9 | ||
10 | %define glib2_ver 1:2.68.0 | |
11 | Summary: GNOME Display Manager | |
12 | Summary(es.UTF-8): Administrador de Entrada del GNOME | |
13 | Summary(ja.UTF-8): GNOME ディスプレイマネージャ | |
14 | Summary(pl.UTF-8): gdm - zarządca ekranów GNOME | |
15 | Summary(pt_BR.UTF-8): Gerenciador de Entrada do GNOME | |
16 | Summary(ru.UTF-8): Дисплейный менеджер GNOME | |
17 | Summary(uk.UTF-8): Дисплейний менеджер GNOME | |
18 | Name: gdm | |
19 | Version: 46.2 | |
20 | Release: 1 | |
21 | Epoch: 2 | |
22 | License: GPL v2+ | |
23 | Group: X11/Applications | |
24 | Source0: https://download.gnome.org/sources/gdm/46/%{name}-%{version}.tar.xz | |
25 | # Source0-md5: 1d92ec4dd0643907fa135056aee18066 | |
26 | Source1: %{name}.pamd | |
27 | Source2: %{name}.init | |
28 | Source3: %{name}-pld-logo.png | |
29 | Source4: %{name}-autologin.pamd | |
30 | Source5: %{name}-custom.desktop | |
31 | Source6: %{name}-default.desktop | |
32 | Source9: %{name}.tmpfiles | |
33 | Source10: %{name}-fingerprint.pamd | |
34 | Source11: %{name}-launch-environment.pamd | |
35 | Patch0: %{name}-xdmcp.patch | |
36 | Patch1: %{name}-xsession.patch | |
37 | Patch2: %{name}-defaults.patch | |
38 | Patch3: %{name}-both-libraries.patch | |
39 | URL: https://wiki.gnome.org/Projects/GDM | |
40 | BuildRequires: accountsservice-devel >= 0.6.35 | |
41 | BuildRequires: audit-libs-devel | |
42 | BuildRequires: check-devel >= 0.9.4 | |
43 | BuildRequires: dconf | |
44 | BuildRequires: gettext-tools >= 0.19.8 | |
45 | BuildRequires: glib2-devel >= %{glib2_ver} | |
46 | BuildRequires: gobject-introspection-devel >= 0.9.12 | |
47 | BuildRequires: gtk+3-devel >= 3.0.0 | |
48 | BuildRequires: iso-codes | |
49 | BuildRequires: json-glib-devel >= 1.2.0 | |
50 | BuildRequires: keyutils-devel >= 1.6 | |
51 | BuildRequires: libcanberra-gtk3-devel >= 0.4 | |
52 | BuildRequires: libgudev-devel >= 232 | |
53 | BuildRequires: libselinux-devel | |
54 | BuildRequires: libstdc++-devel | |
55 | BuildRequires: libwrap-devel | |
56 | BuildRequires: libxcb-devel | |
57 | BuildRequires: meson >= 0.57 | |
58 | BuildRequires: ninja >= 1.5 | |
59 | BuildRequires: pam-devel | |
60 | BuildRequires: pkgconfig | |
61 | BuildRequires: plymouth-devel | |
62 | BuildRequires: rpmbuild(find_lang) >= 1.23 | |
63 | BuildRequires: rpmbuild(macros) >= 1.736 | |
64 | BuildRequires: systemd-devel >= 1:209 | |
65 | BuildRequires: tar >= 1:1.22 | |
66 | BuildRequires: udev-devel | |
67 | BuildRequires: xorg-lib-libX11-devel | |
68 | BuildRequires: xorg-lib-libXau-devel | |
69 | BuildRequires: xorg-lib-libXdmcp-devel | |
70 | BuildRequires: xorg-lib-libXext-devel | |
71 | BuildRequires: xorg-lib-libXft-devel | |
72 | BuildRequires: xorg-lib-libXi-devel | |
73 | BuildRequires: xorg-lib-libXinerama-devel | |
74 | # for "XServer disables tcp access by default" detection | |
75 | BuildRequires: xorg-xserver-server-devel >= 1.17 | |
76 | BuildRequires: xz | |
77 | BuildRequires: yelp-tools | |
78 | Requires(post,postun): glib2 >= %{glib2_ver} | |
79 | Requires(post,postun): gtk-update-icon-cache | |
80 | Requires(postun): /usr/sbin/groupdel | |
81 | Requires(postun): /usr/sbin/userdel | |
82 | Requires(pre): /bin/id | |
83 | Requires(pre): /usr/sbin/groupadd | |
84 | Requires(pre): /usr/sbin/useradd | |
85 | Requires(posttrans): dconf | |
86 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
87 | Requires: /usr/bin/X | |
88 | Requires: accountsservice >= 0.6.35 | |
89 | Requires: dbus-x11 | |
90 | Requires: gdm-wm >= 3.2.1 | |
91 | Requires: glib2 >= %{glib2_ver} | |
92 | Requires: gnome-session >= 3.26.0 | |
93 | Requires: gnome-settings-daemon >= 3.26.0 | |
94 | Requires: hicolor-icon-theme | |
95 | Requires: iso-codes | |
96 | Requires: json-glib >= 1.2.0 | |
97 | Requires: libcanberra-gtk3 >= 0.4 | |
98 | Requires: libgudev >= 232 | |
99 | Requires: pam >= 0.99.7.1 | |
100 | Requires: polkit-gnome >= 0.93 | |
101 | Requires: which | |
102 | Requires: xinitrc-ng >= 1.0 | |
103 | Requires: xorg-app-sessreg | |
104 | Requires: xorg-app-xmodmap | |
105 | Suggests: ConsoleKit-x11 >= 0.4.1 | |
106 | Suggests: pam-pam_gnome_keyring | |
107 | Suggests: xorg-xserver-Xephyr >= 1.17 | |
108 | Suggests: zenity | |
109 | Provides: XDM | |
110 | Provides: group(xdm) | |
111 | Provides: user(xdm) | |
112 | Obsoletes: gdm-Xnest < 2:2.28 | |
113 | Obsoletes: gdm-systemd < 2:3.2.1.1-10 | |
114 | Obsoletes: gdm-upstart < 2:3.20 | |
115 | Obsoletes: gdm-user-switch-applet < 2:3.0.0-2 | |
116 | Obsoletes: gnome-applet-fast-user-switch < 2.21 | |
117 | Conflicts: gdkxft | |
118 | Conflicts: systemd < 186 | |
119 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
120 | ||
121 | %description | |
122 | Gdm (the GNOME Display Manager) is a highly configurable | |
123 | reimplementation of xdm, the X Display Manager. Gdm allows you to log | |
124 | into your system with the X Window System running and supports running | |
125 | several different X sessions on your local machine at the same time. | |
126 | ||
127 | %description -l es.UTF-8 | |
128 | Administrador de Entrada del GNOME. | |
129 | ||
130 | %description -l ja.UTF-8 | |
131 | Gdm (the GNOME Display Manager) は、高度に設定可能な xdm X Display Manager | |
132 | の再実装版です。 Gdm を使うと、 X Window System が動いているあなたの | |
133 | システムにいろいろなセッションを選択してログインすることができます。 | |
134 | ||
135 | このバージョンの Gdm では、各種言語や、XIM を選択することも可能です。 | |
136 | ||
137 | %description -l pl.UTF-8 | |
138 | Gdm jest wysokokonfigurowalną reimplementacją xdma. Gdm pozwala | |
139 | logować się do systemu z poziomu X11 i wspiera jednoczesną pracę kilku | |
140 | różnych sesji X na lokalnej maszynie. | |
141 | ||
142 | %description -l pt_BR.UTF-8 | |
143 | Gerenciador de Entrada do GNOME. | |
144 | ||
145 | %description -l ru.UTF-8 | |
146 | GDM (GNOME Display Manager) - это реимплементация xdm (X Display | |
147 | Manager). GDM позволяет вам входить в систему, на которой запущено X | |
148 | Window и поддерживает работу нескольуих разных X сеансов одновременно. | |
149 | ||
150 | %description -l uk.UTF-8 | |
151 | GDM (GNOME Display Manager) - це реімплементація xdm (X Display | |
152 | Manager). GDM дозволяє вам входити в систему, на якій запущено X | |
153 | Window та підтримує роботу кількох різних X сеансів одночасно. | |
154 | ||
155 | %package init | |
156 | Summary: Init script for GDM | |
157 | Summary(pl.UTF-8): Skrypt init dla GDM-a | |
158 | Group: X11/Applications | |
159 | Requires(post,preun): /sbin/chkconfig | |
160 | Requires(post,preun,postun): systemd-units >= 38 | |
161 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
162 | Requires: open | |
163 | Requires: rc-scripts >= 0.4.3.0 | |
164 | Requires: systemd-units >= 38 | |
165 | ||
166 | %description init | |
167 | Init script for GDM. | |
168 | ||
169 | %description init -l pl.UTF-8 | |
170 | Skrypt init dla GDM-a. | |
171 | ||
172 | %package libs | |
173 | Summary: GDM libraries | |
174 | Summary(pl.UTF-8): Biblioteki GDM | |
175 | Group: Libraries | |
176 | Requires: glib2 >= %{glib2_ver} | |
177 | ||
178 | %description libs | |
179 | GDM libraries. | |
180 | ||
181 | %description libs -l pl.UTF-8 | |
182 | Biblioteki GDM. | |
183 | ||
184 | %package devel | |
185 | Summary: Header files for GDM | |
186 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja | |
187 | Group: X11/Development/Libraries | |
188 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
189 | Requires: glib2-devel >= %{glib2_ver} | |
190 | Requires: libselinux-devel | |
191 | Requires: systemd-devel >= 1:209 | |
192 | ||
193 | %description devel | |
194 | This package contains the files necessary to develop applications | |
195 | using GDM's libraries. | |
196 | ||
197 | %description devel -l pl.UTF-8 | |
198 | Pakiet zawiera pliki potrzebne do rozwoju aplikacji używających | |
199 | bibliotek programu GDM. | |
200 | ||
201 | %package static | |
202 | Summary: Static libraries for GDM | |
203 | Summary(pl.UTF-8): Biblioteki statyczne dla GDM | |
204 | Group: X11/Development/Libraries | |
205 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
206 | ||
207 | %description static | |
208 | This package contains static libraries for GDM. | |
209 | ||
210 | %description static -l pl.UTF-8 | |
211 | Pakiet zawiera statyczne biblioteki GDM. | |
212 | ||
213 | %prep | |
214 | %setup -q | |
215 | %patch0 -p1 | |
216 | %patch1 -p1 | |
217 | %patch2 -p1 | |
218 | %patch3 -p1 | |
219 | ||
220 | %build | |
221 | %meson build \ | |
222 | %{!?with_static_libs:--default-library=shared} \ | |
223 | -Dgdm-xsession=true \ | |
224 | -Dgroup=xdm \ | |
225 | -Dinitial-vt=9 \ | |
226 | -Dipv6=true \ | |
227 | -Dpam-mod-dir=/%{_lib}/security \ | |
228 | -Dpam-prefix=/etc \ | |
229 | -Dtcp-wrappers=true \ | |
230 | -Dudev-dir=/lib/udev/rules.d \ | |
231 | -Duser=xdm | |
232 | ||
233 | %ninja_build -C build | |
234 | ||
235 | %install | |
236 | rm -rf $RPM_BUILD_ROOT | |
237 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,security} \ | |
238 | $RPM_BUILD_ROOT{/home/services/xdm,/var/lib/gdm/.local,/var/log/gdm,/var/run/gdm/greeter} \ | |
239 | $RPM_BUILD_ROOT{%{_pixmapsdir},%{_datadir}/xsessions,%{systemdunitdir}} \ | |
240 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} | |
241 | ||
242 | %ninja_install -C build | |
243 | ||
244 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/gdm-password | |
245 | cp -p %{SOURCE10} $RPM_BUILD_ROOT/etc/pam.d/gdm-fingerprint | |
246 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/gdm-autologin | |
247 | cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/pam.d/gdm-launch-environment | |
248 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/gdm | |
249 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir} | |
250 | cp -p %{SOURCE9} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
251 | ||
252 | # replace file with mask (to allow choosing via prefdm.service) | |
253 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/gdm.service | |
254 | ||
255 | touch $RPM_BUILD_ROOT/etc/security/blacklist.gdm | |
256 | ||
257 | %find_lang %{name} --with-gnome | |
258 | ||
259 | # allow executing ~/.Xclients and ~/.xsession | |
260 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/xsessions/custom.desktop | |
261 | cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/xsessions/default.desktop | |
262 | ||
263 | %clean | |
264 | rm -rf $RPM_BUILD_ROOT | |
265 | ||
266 | %posttrans | |
267 | umask 022 | |
268 | /usr/bin/dconf update | |
269 | ||
270 | %pre | |
271 | %groupadd -g 55 -r -f xdm | |
272 | %useradd -u 55 -r -d /home/services/xdm -s /bin/false -c "X Display Manager" -g xdm xdm | |
273 | ||
274 | %post | |
275 | %update_icon_cache hicolor | |
276 | ||
277 | %postun | |
278 | %update_icon_cache hicolor | |
279 | if [ "$1" = "0" ]; then | |
280 | %userremove xdm | |
281 | %groupremove xdm | |
282 | fi | |
283 | ||
284 | %triggerpostun -- %{name} < 2:3.2.1.1-10 | |
285 | if [ -f /etc/X11/gdm/gdm.conf-custom.rpmsave ]; then | |
286 | mv -f /etc/X11/gdm/gdm.conf-custom.rpmsave /etc/gdm/custom.conf | |
287 | fi | |
288 | ||
289 | %post init | |
290 | /sbin/chkconfig --add gdm | |
291 | # -n skips restarting as it would otherise terminate all sessions opened from gdm! | |
292 | %service -n gdm restart | |
293 | %systemd_reload | |
294 | ||
295 | %postun init | |
296 | %systemd_reload | |
297 | ||
298 | %preun init | |
299 | if [ "$1" = "0" ]; then | |
300 | %service gdm stop | |
301 | /sbin/chkconfig --del gdm | |
302 | fi | |
303 | ||
304 | %post libs | |
305 | /sbin/ldconfig | |
306 | %glib_compile_schemas | |
307 | ||
308 | %postun libs | |
309 | /sbin/ldconfig | |
310 | if [ "$1" = "0" ]; then | |
311 | %glib_compile_schemas | |
312 | fi | |
313 | ||
314 | %files -f %{name}.lang | |
315 | %defattr(644,root,root,755) | |
316 | %doc AUTHORS MAINTAINERS NEWS README.md | |
317 | %attr(755,root,root) %{_sbindir}/gdm | |
318 | %attr(755,root,root) %{_bindir}/gdm-config | |
319 | %attr(755,root,root) %{_bindir}/gdm-screenshot | |
320 | %attr(755,root,root) %{_bindir}/gdmflexiserver | |
321 | %attr(755,root,root) %{_libexecdir}/gdm-host-chooser | |
322 | %attr(755,root,root) %{_libexecdir}/gdm-runtime-config | |
323 | %attr(755,root,root) %{_libexecdir}/gdm-session-worker | |
324 | %attr(755,root,root) %{_libexecdir}/gdm-simple-chooser | |
325 | %attr(755,root,root) %{_libexecdir}/gdm-wayland-session | |
326 | %attr(755,root,root) %{_libexecdir}/gdm-x-session | |
327 | %attr(755,root,root) /%{_lib}/security/pam_gdm.so | |
328 | /lib/udev/rules.d/61-gdm.rules | |
329 | %dir %{_sysconfdir}/gdm | |
330 | %dir %{_sysconfdir}/gdm/Init | |
331 | %attr(755,root,root) %config %{_sysconfdir}/gdm/Init/Default | |
332 | %attr(755,root,root) %config %{_sysconfdir}/gdm/PreSession | |
333 | %attr(755,root,root) %config %{_sysconfdir}/gdm/PostSession | |
334 | %attr(755,root,root) %config %{_sysconfdir}/gdm/Xsession | |
335 | %dir %{_sysconfdir}/gdm/PostLogin | |
336 | %config %{_sysconfdir}/gdm/PostLogin/Default.sample | |
337 | %attr(640,root,xdm) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gdm/custom.conf | |
338 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/gdm.conf | |
339 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/gdm-* | |
340 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.gdm | |
341 | %{_datadir}/dconf/profile/gdm | |
342 | %dir %{systemduserunitdir}/gnome-session@gnome-login.target.d | |
343 | %{systemduserunitdir}/gnome-session@gnome-login.target.d/session.conf | |
344 | %attr(1770,root,xdm) %dir /var/lib/gdm | |
345 | %attr(755,xdm,xdm) /var/lib/gdm/.local | |
346 | %attr(750,xdm,xdm) %dir /var/log/gdm | |
347 | %attr(711,root,xdm) %dir /var/run/gdm | |
348 | %attr(755,xdm,xdm) %dir /var/run/gdm/greeter | |
349 | %attr(750,xdm,xdm) /home/services/xdm | |
350 | %{systemdtmpfilesdir}/%{name}.conf | |
351 | %{_pixmapsdir}/gdm-pld-logo.png | |
352 | %{_datadir}/gdm | |
353 | %{_datadir}/gnome-session/sessions/gnome-login.session | |
354 | %{_datadir}/xsessions/custom.desktop | |
355 | %{_datadir}/xsessions/default.desktop | |
356 | ||
357 | %files init | |
358 | %defattr(644,root,root,755) | |
359 | %attr(754,root,root) /etc/rc.d/init.d/gdm | |
360 | %{systemdunitdir}/gdm.service | |
361 | ||
362 | %files libs | |
363 | %defattr(644,root,root,755) | |
364 | %attr(755,root,root) %{_libdir}/libgdm.so.1.0.0 | |
365 | %attr(755,root,root) %ghost %{_libdir}/libgdm.so.1 | |
366 | %{_libdir}/girepository-1.0/Gdm-1.0.typelib | |
367 | %{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.xml | |
368 | ||
369 | %files devel | |
370 | %defattr(644,root,root,755) | |
371 | %attr(755,root,root) %{_libdir}/libgdm.so | |
372 | %{_includedir}/gdm | |
373 | %{_pkgconfigdir}/gdm.pc | |
374 | %{_pkgconfigdir}/gdm-pam-extensions.pc | |
375 | %{_datadir}/gir-1.0/Gdm-1.0.gir | |
376 | ||
377 | %files static | |
378 | %defattr(644,root,root,755) | |
379 | %{_libdir}/libgdm.a |