2012-04-14 11:33:31 +02:00
|
|
|
#
|
|
|
|
# spec file for package xdm
|
|
|
|
#
|
2024-03-06 10:26:20 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-04-14 11:33:31 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-08-19 16:54:59 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-04-14 11:33:31 +02:00
|
|
|
#
|
|
|
|
|
2012-12-07 12:11:28 +01:00
|
|
|
|
2021-03-16 23:01:21 +01:00
|
|
|
%define _dminitdir %{_prefix}/lib/X11/displaymanagers
|
2020-09-09 01:59:41 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
%define UsrEtcMove 1
|
|
|
|
%endif
|
2017-11-23 16:08:11 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
2021-03-16 23:01:21 +01:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-23 16:08:11 +01:00
|
|
|
%endif
|
2012-04-14 11:33:31 +02:00
|
|
|
Name: xdm
|
2022-12-04 22:51:34 +01:00
|
|
|
Version: 1.1.14
|
2012-04-14 11:33:31 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: X Display Manager
|
2012-06-29 16:13:08 +02:00
|
|
|
License: MIT
|
2012-04-14 11:33:31 +02:00
|
|
|
Group: System/X11/Utilities
|
2021-03-16 23:01:21 +01:00
|
|
|
URL: https://xorg.freedesktop.org/
|
2022-04-04 12:16:31 +02:00
|
|
|
Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.xz
|
2012-04-14 11:33:31 +02:00
|
|
|
Source1: xdm.tar.bz2
|
|
|
|
Source2: HOWTO.xdm
|
2014-03-21 14:19:15 +01:00
|
|
|
Source4: display-manager.service
|
2016-03-30 15:45:44 +02:00
|
|
|
Source5: xsession.desktop
|
2012-04-14 11:33:31 +02:00
|
|
|
Patch1: xdm-tolerant-hostname-changes.diff
|
2020-09-05 00:49:41 +02:00
|
|
|
Patch2: xdm-tarball.patch
|
2019-03-28 15:17:07 +01:00
|
|
|
Patch3: n_Allow-the-greeter-to-set-the-input-fields-bg-color.patch
|
2020-09-08 17:05:45 +02:00
|
|
|
Patch4: xinit-UsrEtcMove.patch
|
2024-03-06 10:26:20 +01:00
|
|
|
Patch5: u_gcc14-fix.patch
|
2020-09-04 13:19:27 +02:00
|
|
|
BuildRequires: firewall-macros
|
2012-04-14 11:33:31 +02:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pam-devel
|
2017-10-16 10:52:57 +02:00
|
|
|
BuildRequires: pkgconfig
|
2021-03-16 23:01:21 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2012-04-14 11:33:31 +02:00
|
|
|
BuildRequires: pkgconfig(x11)
|
|
|
|
BuildRequires: pkgconfig(xau)
|
|
|
|
BuildRequires: pkgconfig(xaw7)
|
|
|
|
BuildRequires: pkgconfig(xdmcp)
|
|
|
|
BuildRequires: pkgconfig(xext)
|
|
|
|
BuildRequires: pkgconfig(xft)
|
|
|
|
BuildRequires: pkgconfig(xinerama)
|
|
|
|
BuildRequires: pkgconfig(xmu)
|
|
|
|
BuildRequires: pkgconfig(xorg-macros) >= 1.4
|
|
|
|
BuildRequires: pkgconfig(xpm)
|
|
|
|
BuildRequires: pkgconfig(xt)
|
2012-09-13 10:46:15 +02:00
|
|
|
BuildRequires: pkgconfig(xtrans)
|
2020-09-04 12:55:01 +02:00
|
|
|
Requires: %fillup_prereq
|
2020-08-28 13:01:32 +02:00
|
|
|
Requires: /sbin/startproc
|
2023-05-11 14:18:29 +02:00
|
|
|
Requires: cpp
|
2012-04-14 11:33:31 +02:00
|
|
|
Requires: logrotate
|
|
|
|
Requires: sessreg
|
2015-07-29 15:01:12 +02:00
|
|
|
Requires: xconsole
|
2018-03-16 17:46:17 +01:00
|
|
|
Requires: xinit
|
2015-07-29 15:01:12 +02:00
|
|
|
Requires: xli
|
|
|
|
Requires: xmessage
|
2012-04-14 11:33:31 +02:00
|
|
|
Requires: xrdb
|
2015-07-29 15:01:12 +02:00
|
|
|
Requires: xset
|
|
|
|
Requires: xsetroot
|
2021-03-16 23:01:21 +01:00
|
|
|
Requires: xterm-bin
|
2012-04-14 11:33:31 +02:00
|
|
|
Recommends: dbus-1-x11
|
2022-02-09 17:57:55 +01:00
|
|
|
Recommends: xdmbgrd
|
2012-04-14 11:33:31 +02:00
|
|
|
# This was part of the xorg-x11 package up to version 7.6
|
|
|
|
Conflicts: xorg-x11 <= 7.6
|
2016-06-06 11:49:16 +02:00
|
|
|
%{?systemd_requires}
|
2021-03-16 23:01:21 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
Requires: %{_bindir}/pidof
|
|
|
|
%else
|
|
|
|
Requires: /sbin/pidof
|
|
|
|
%endif
|
2014-03-21 14:19:15 +01:00
|
|
|
|
2012-04-14 11:33:31 +02:00
|
|
|
%description
|
|
|
|
Xdm manages a collection of X displays, which may be on the local host
|
|
|
|
or remote servers.
|
|
|
|
|
2016-03-30 15:45:44 +02:00
|
|
|
%package xsession
|
|
|
|
Summary: User/System Xsession Desktop File
|
|
|
|
Group: System/X11/Utilities
|
|
|
|
Requires: xdm
|
2016-06-20 18:49:19 +02:00
|
|
|
Enhances: xdm
|
2016-03-30 15:45:44 +02:00
|
|
|
|
|
|
|
%description xsession
|
2016-06-06 11:49:16 +02:00
|
|
|
This package contains the System desktop file which will cause
|
|
|
|
the execution of a user provided $HOME/.xsession script or pick
|
|
|
|
the system wide DM default set in %{_sysconfdir}/sysconfig/displaymanager.
|
2016-03-30 15:45:44 +02:00
|
|
|
|
2012-04-14 11:33:31 +02:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
cp %{SOURCE2} .
|
2014-07-18 15:53:08 +02:00
|
|
|
pushd xdm
|
2024-02-26 14:53:00 +01:00
|
|
|
%patch -P 1 -p1
|
2014-07-18 15:53:08 +02:00
|
|
|
popd
|
2019-03-28 15:17:07 +01:00
|
|
|
# reverse apply (boo#1130321)
|
2024-02-26 14:53:00 +01:00
|
|
|
%patch -P 3 -p1 -R
|
2024-03-06 10:26:20 +01:00
|
|
|
%patch -P 5 -p1
|
2012-04-14 11:33:31 +02:00
|
|
|
|
|
|
|
%build
|
2014-07-18 15:53:08 +02:00
|
|
|
# needed for patch0
|
|
|
|
autoreconf -fi
|
2012-04-14 11:33:31 +02:00
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
--with-pam \
|
|
|
|
--with-xdmconfigdir=%{_sysconfdir}/X11/xdm \
|
2016-05-04 15:02:08 +02:00
|
|
|
--with-xdmscriptdir=%{_sysconfdir}/X11/xdm \
|
|
|
|
--with-systemdsystemunitdir=no
|
2021-03-16 23:01:21 +01:00
|
|
|
%make_build
|
2012-04-14 11:33:31 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
# Not used anymore by SuSE
|
|
|
|
rm %{buildroot}%{_sysconfdir}/X11/xdm/{GiveConsole,TakeConsole,Xsetup_0}
|
|
|
|
|
|
|
|
pushd %{buildroot}
|
|
|
|
# SuSE default XDM configuration
|
|
|
|
tar xf %{SOURCE1}
|
2020-09-09 01:59:41 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
2020-09-05 00:49:41 +02:00
|
|
|
patch -p0 < %{PATCH2}
|
2021-03-16 23:01:21 +01:00
|
|
|
mkdir -p usr%{_sysconfdir}/X11/xdm
|
|
|
|
mv etc/X11/xdm/* usr%{_sysconfdir}/X11/xdm
|
2020-10-05 16:55:27 +02:00
|
|
|
# Edited by SUSEConfig.xdm, package a copy
|
|
|
|
for i in xdm-config Xservers; do
|
2021-03-16 23:01:21 +01:00
|
|
|
cp usr%{_sysconfdir}/X11/xdm/$i etc/X11/xdm/$i
|
2020-10-05 16:55:27 +02:00
|
|
|
done
|
2022-08-20 10:49:22 +02:00
|
|
|
mkdir -p ./%{_pam_vendordir}
|
2023-04-03 13:33:54 +02:00
|
|
|
rm etc/pam.d/{xdm,xdm-np}.sle15
|
2022-08-20 10:49:22 +02:00
|
|
|
mv etc/pam.d/* ./%{_pam_vendordir}/
|
2020-09-08 17:05:45 +02:00
|
|
|
%else
|
|
|
|
patch -p0 < %{PATCH4}
|
2023-04-03 13:33:54 +02:00
|
|
|
rm etc/pam.d/{xdm,xdm-np}
|
|
|
|
mv etc/pam.d/{xdm.sle15,xdm}
|
|
|
|
mv etc/pam.d/{xdm-np.sle15,xdm-np}
|
2020-09-04 22:26:29 +02:00
|
|
|
%endif
|
2021-03-16 23:01:21 +01:00
|
|
|
%if "%{_fillupdir}" != "%{_localstatedir}/adm/fillup-templates"
|
2017-11-24 13:47:52 +01:00
|
|
|
mkdir -p %{buildroot}$(dirname %{_fillupdir})
|
2021-03-16 23:01:21 +01:00
|
|
|
mv %{buildroot}%{_localstatedir}/adm/fillup-templates \
|
2017-11-24 13:47:52 +01:00
|
|
|
%{buildroot}$(dirname %{_fillupdir})
|
|
|
|
%endif
|
|
|
|
|
2015-03-17 15:17:30 +01:00
|
|
|
%ifarch s390 s390x
|
2012-04-14 11:33:31 +02:00
|
|
|
sed -i -e "s+DISPLAYMANAGER_REMOTE_ACCESS=.*+DISPLAYMANAGER_REMOTE_ACCESS=\"yes\"+g" \
|
2014-03-24 13:02:44 +01:00
|
|
|
-e "s+DISPLAYMANAGER_STARTS_XSERVER=.*+DISPLAYMANAGER_STARTS_XSERVER=\"no\"+g" \
|
2017-11-23 16:08:11 +01:00
|
|
|
%{buildroot}%{_fillupdir}/sysconfig.displaymanager
|
2012-04-14 11:33:31 +02:00
|
|
|
%endif
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Correct location (FHS-2.1)
|
2020-09-09 01:59:41 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
2020-09-04 22:26:29 +02:00
|
|
|
ln -s %{_localstatedir}/lib/xdm/authdir %{buildroot}%{_distconfdir}/X11/xdm/authdir
|
|
|
|
%else
|
2012-04-14 11:33:31 +02:00
|
|
|
ln -s %{_localstatedir}/lib/xdm/authdir %{buildroot}%{_sysconfdir}/X11/xdm/authdir
|
2020-09-04 22:26:29 +02:00
|
|
|
%endif
|
2012-04-14 11:33:31 +02:00
|
|
|
# bnc#223734
|
|
|
|
rm %{buildroot}%{_libdir}/X11/xdm/libXdmGreet.la
|
|
|
|
# for FHS compliance (bnc#21857)
|
|
|
|
mv %{buildroot}%{_libdir}/X11/xdm/chooser %{buildroot}%{_bindir}
|
|
|
|
# fdo#35868 (closed INVALID, but because of above fix, we want it)
|
2019-03-03 10:52:37 +01:00
|
|
|
ln -s xdm.8%{?ext_man} %{buildroot}%{_mandir}/man8/chooser.8%{?ext_man}
|
2016-06-06 11:49:16 +02:00
|
|
|
install -D %{SOURCE5} -m 0644 %{buildroot}%{_datadir}/xsessions/xsession.desktop
|
2014-03-21 14:19:15 +01:00
|
|
|
rm -f %{buildroot}%{_sbindir}/rcxdm
|
2016-06-06 11:49:16 +02:00
|
|
|
install -D %{SOURCE4} -m 0444 %{buildroot}%{_unitdir}/display-manager.service
|
2014-03-21 14:19:15 +01:00
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcdisplay-manager
|
|
|
|
cat > %{buildroot}%{_sbindir}/rcxdm <<-'EOF'
|
|
|
|
#!/bin/bash
|
|
|
|
exec -a rcdisplay-manager %{_sbindir}/rcdisplay-manager ${1+"$@"}
|
|
|
|
EOF
|
|
|
|
chmod 0755 %{buildroot}%{_sbindir}/rcxdm
|
2017-10-16 10:52:57 +02:00
|
|
|
# prepare for defaul-dm to be chosen by means of update-alternatives
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/default-displaymanager
|
2021-03-16 23:01:21 +01:00
|
|
|
ln -s %{_sysconfdir}/alternatives/default-displaymanager %{buildroot}%{_prefix}/lib/X11/displaymanagers/default-displaymanager
|
2017-10-16 10:52:57 +02:00
|
|
|
# Inject a dummy 'console' selection - which used to be choice in /etc/sysconfig/displaymanager
|
2021-03-16 23:01:21 +01:00
|
|
|
touch %{buildroot}%{_prefix}/lib/X11/displaymanagers/console
|
2012-04-14 11:33:31 +02:00
|
|
|
|
2022-07-01 10:44:22 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
|
|
|
mkdir -p %{buildroot}%{_distconfdir}/logrotate.d
|
|
|
|
mv %{buildroot}%{_sysconfdir}/logrotate.d/xdm %{buildroot}%{_distconfdir}/logrotate.d/xdm
|
|
|
|
%endif
|
|
|
|
|
2012-04-14 11:33:31 +02:00
|
|
|
%post
|
2021-11-19 17:14:50 +01:00
|
|
|
# enable Xorg on s390x with virtio (Redhat PCI ID 1af4:1050) on installation (but not upgrade)
|
|
|
|
if [ $1 -eq 1 ] ; then
|
2022-02-10 10:54:15 +01:00
|
|
|
if [ "$(arch)" = "s390x" ]; then
|
2021-11-19 17:14:50 +01:00
|
|
|
if [ -d /dev/dri ]; then
|
|
|
|
sed -i -e "s+DISPLAYMANAGER_REMOTE_ACCESS=.*+DISPLAYMANAGER_REMOTE_ACCESS=\"no\"+g" \
|
|
|
|
-e "s+DISPLAYMANAGER_STARTS_XSERVER=.*+DISPLAYMANAGER_STARTS_XSERVER=\"yes\"+g" \
|
|
|
|
%{_fillupdir}//sysconfig.displaymanager
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2017-07-24 16:23:57 +02:00
|
|
|
%service_add_post display-manager.service
|
|
|
|
%{fillup_only -n displaymanager}
|
2021-03-16 23:01:21 +01:00
|
|
|
%{_sbindir}/update-alternatives --install %{_prefix}/lib/X11/displaymanagers/default-displaymanager \
|
|
|
|
default-displaymanager %{_prefix}/lib/X11/displaymanagers/console 5
|
|
|
|
%{_sbindir}/update-alternatives --install %{_prefix}/lib/X11/displaymanagers/default-displaymanager \
|
|
|
|
default-displaymanager %{_prefix}/lib/X11/displaymanagers/xdm 10
|
2019-02-13 16:55:40 +01:00
|
|
|
# get rid of DISPLAYMANAGER in /etc/sysconfig/displaymanager (boo#1125040)
|
2021-03-16 23:01:21 +01:00
|
|
|
sed -i 's/DISPLAYMANAGER=.*//g' %{_sysconfdir}/sysconfig/displaymanager
|
2018-02-21 15:47:09 +01:00
|
|
|
%firewalld_reload
|
2012-04-14 11:33:31 +02:00
|
|
|
|
2014-05-23 16:11:09 +02:00
|
|
|
%pre
|
2020-09-04 12:55:01 +02:00
|
|
|
%service_add_pre display-manager.service
|
2014-05-23 16:11:09 +02:00
|
|
|
|
2012-04-14 11:33:31 +02:00
|
|
|
%postun
|
2016-03-03 16:34:33 +01:00
|
|
|
# Do not restart DM on update (bnc#886641)
|
2020-12-01 23:28:46 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2020-11-03 16:49:34 +01:00
|
|
|
%service_del_postun_without_restart display-manager.service
|
2020-12-01 23:28:46 +01:00
|
|
|
%else
|
|
|
|
%service_del_postun -n display-manager.service
|
|
|
|
%endif
|
2021-03-16 23:01:21 +01:00
|
|
|
[ -f %{_prefix}/lib/X11/displaymanagers/console ] || %{_sbindir}/update-alternatives \
|
|
|
|
--remove default-displaymanager %{_prefix}/lib/X11/displaymanagers/console
|
|
|
|
[ -f %{_prefix}/lib/X11/displaymanagers/xdm ] || %{_sbindir}/update-alternatives \
|
|
|
|
--remove default-displaymanager %{_prefix}/lib/X11/displaymanagers/xdm
|
2012-04-14 11:33:31 +02:00
|
|
|
|
2014-05-23 16:11:09 +02:00
|
|
|
%preun
|
2020-09-04 12:55:01 +02:00
|
|
|
%service_del_preun display-manager.service
|
2014-05-23 16:11:09 +02:00
|
|
|
|
2012-04-14 11:33:31 +02:00
|
|
|
%files
|
2021-03-16 23:01:21 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS ChangeLog README.md
|
2012-04-14 11:33:31 +02:00
|
|
|
%doc HOWTO.xdm
|
|
|
|
%dir %{_dminitdir}
|
|
|
|
%{_dminitdir}/xdm
|
2017-10-16 10:52:57 +02:00
|
|
|
%{_dminitdir}/console
|
2021-03-16 23:01:21 +01:00
|
|
|
%{_prefix}/lib/X11/displaymanagers/default-displaymanager
|
2017-10-16 10:52:57 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/default-displaymanager
|
2020-09-09 01:59:41 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
2020-09-04 22:26:29 +02:00
|
|
|
%dir %{_distconfdir}/X11
|
|
|
|
%{_distconfdir}/X11/xdm/
|
|
|
|
%endif
|
2020-10-05 16:55:27 +02:00
|
|
|
%config %{_sysconfdir}/X11/xdm/
|
2020-09-09 01:59:41 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
2020-09-04 22:26:29 +02:00
|
|
|
%dir %{_distconfdir}/X11/xdm/scripts
|
|
|
|
%else
|
2016-06-06 11:49:16 +02:00
|
|
|
%dir %{_sysconfdir}/X11/xdm/scripts
|
2020-09-04 22:26:29 +02:00
|
|
|
%endif
|
2021-03-16 23:01:21 +01:00
|
|
|
%dir %{_prefix}/lib/firewalld
|
|
|
|
%dir %{_prefix}/lib/firewalld/services
|
|
|
|
%{_prefix}/lib/firewalld/services/x11.xml
|
2014-03-21 14:19:15 +01:00
|
|
|
%{_unitdir}/display-manager.service
|
2021-03-16 23:01:21 +01:00
|
|
|
%{_prefix}/lib/X11/display-manager
|
2022-07-01 10:44:22 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
|
|
|
%{_distconfdir}/logrotate.d/xdm
|
|
|
|
%else
|
2012-04-14 11:33:31 +02:00
|
|
|
%config %{_sysconfdir}/logrotate.d/xdm
|
2022-07-01 10:44:22 +02:00
|
|
|
%endif
|
2020-09-29 12:03:13 +02:00
|
|
|
%if 0%{?UsrEtcMove}
|
2022-08-20 10:49:22 +02:00
|
|
|
%{_pam_vendordir}/xdm
|
|
|
|
%{_pam_vendordir}/xdm-np
|
2020-09-29 12:03:13 +02:00
|
|
|
%else
|
2017-10-27 19:15:37 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/xdm
|
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/xdm-np
|
2020-09-29 12:03:13 +02:00
|
|
|
%endif
|
2012-04-14 11:33:31 +02:00
|
|
|
%dir %{_localstatedir}/lib/xdm/
|
2017-11-23 16:08:11 +01:00
|
|
|
%{_fillupdir}/sysconfig.displaymanager
|
2012-04-14 11:33:31 +02:00
|
|
|
%{_localstatedir}/lib/xdm/authdir/
|
|
|
|
%ghost %{_localstatedir}/log/xdm.errors
|
|
|
|
%{_bindir}/chooser
|
|
|
|
%{_bindir}/xdm
|
|
|
|
%{_sbindir}/rcxdm
|
2014-03-21 14:19:15 +01:00
|
|
|
%{_sbindir}/rcdisplay-manager
|
2012-04-14 11:33:31 +02:00
|
|
|
%{_libdir}/X11/xdm/
|
|
|
|
%dir %{_datadir}/X11/app-defaults
|
|
|
|
%{_datadir}/X11/app-defaults/Chooser
|
2019-03-03 10:52:37 +01:00
|
|
|
%{_mandir}/man8/chooser.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/xdm.8%{?ext_man}
|
2021-03-16 23:01:21 +01:00
|
|
|
%ifnarch %{ix86}
|
2012-04-14 11:33:31 +02:00
|
|
|
%dir %{_libdir}/X11
|
|
|
|
%endif
|
|
|
|
|
2016-03-30 15:45:44 +02:00
|
|
|
%files xsession
|
|
|
|
%{_datadir}/xsessions/xsession.desktop
|
|
|
|
|
2012-04-14 11:33:31 +02:00
|
|
|
%changelog
|