Stefan Dirsch
93ca6103bc
* fixed include path for generic Xresources in xdm's Xresources file * fixed $XDMDIR in Xsession, so sys.xsession can be found * sys.xsession: fixed syntax error in code, which reads additional xdm scripts * display-manager: also symlink Xstartup and Xreset in /etc/X11/xdm (needed by lighdm) * for now use again /etc/pam.d for xdm/xdm-np PAM files instead of /usr/etc/pam.d (using the latter resulted in "authentificataion failure" with lightdm) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xdm?expand=0&rev=217
255 lines
8.0 KiB
RPMSpec
255 lines
8.0 KiB
RPMSpec
#
|
|
# spec file for package xdm
|
|
#
|
|
# Copyright (c) 2020 SUSE LLC
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%if 0%{?suse_version} >= 1550
|
|
%define UsrEtcMove 1
|
|
%endif
|
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
%if ! %{defined _fillupdir}
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
%endif
|
|
|
|
%define _dminitdir /usr/lib/X11/displaymanagers
|
|
Name: xdm
|
|
Version: 1.1.12
|
|
Release: 0
|
|
Summary: X Display Manager
|
|
License: MIT
|
|
Group: System/X11/Utilities
|
|
URL: http://xorg.freedesktop.org/
|
|
Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
|
|
Source1: xdm.tar.bz2
|
|
Source2: HOWTO.xdm
|
|
Source4: display-manager.service
|
|
Source5: xsession.desktop
|
|
Patch1: xdm-tolerant-hostname-changes.diff
|
|
Patch2: xdm-tarball.patch
|
|
Patch3: n_Allow-the-greeter-to-set-the-input-fields-bg-color.patch
|
|
Patch4: xinit-UsrEtcMove.patch
|
|
BuildRequires: firewall-macros
|
|
BuildRequires: libtool
|
|
BuildRequires: pam-devel
|
|
BuildRequires: pkgconfig
|
|
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)
|
|
BuildRequires: pkgconfig(xtrans)
|
|
Requires: %fillup_prereq
|
|
Requires: /sbin/pidof
|
|
Requires: /sbin/startproc
|
|
Requires: logrotate
|
|
Requires: sessreg
|
|
Requires: xconsole
|
|
Requires: xinit
|
|
Requires: xli
|
|
Requires: xmessage
|
|
Requires: xrdb
|
|
Requires: xset
|
|
Requires: xsetroot
|
|
Recommends: dbus-1-x11
|
|
# This was part of the xorg-x11 package up to version 7.6
|
|
Conflicts: xorg-x11 <= 7.6
|
|
BuildRequires: systemd-rpm-macros
|
|
%{?systemd_requires}
|
|
Requires: xterm-bin
|
|
|
|
%description
|
|
Xdm manages a collection of X displays, which may be on the local host
|
|
or remote servers.
|
|
|
|
%package xsession
|
|
Summary: User/System Xsession Desktop File
|
|
Group: System/X11/Utilities
|
|
Requires: xdm
|
|
Enhances: xdm
|
|
|
|
%description xsession
|
|
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.
|
|
|
|
%prep
|
|
%setup -q
|
|
cp %{SOURCE2} .
|
|
pushd xdm
|
|
%patch1 -p1
|
|
popd
|
|
# reverse apply (boo#1130321)
|
|
%patch3 -p1 -R
|
|
|
|
%build
|
|
# needed for patch0
|
|
autoreconf -fi
|
|
%configure \
|
|
--disable-static \
|
|
--with-pam \
|
|
--with-xdmconfigdir=%{_sysconfdir}/X11/xdm \
|
|
--with-xdmscriptdir=%{_sysconfdir}/X11/xdm \
|
|
--with-systemdsystemunitdir=no
|
|
make %{?_smp_mflags}
|
|
|
|
%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}
|
|
%if 0%{?UsrEtcMove}
|
|
patch -p0 < %{PATCH2}
|
|
mkdir -p usr/etc/X11/xdm
|
|
mv etc/X11/xdm/* usr/etc/X11/xdm
|
|
### authentification error with lightdm when using /usr/etc/pam.d
|
|
#mv etc/pam.d usr/etc/
|
|
rmdir etc/X11/xdm etc/X11
|
|
%else
|
|
patch -p0 < %{PATCH4}
|
|
%endif
|
|
%if "%{_fillupdir}" != "/var/adm/fillup-templates"
|
|
mkdir -p %{buildroot}$(dirname %{_fillupdir})
|
|
mv %{buildroot}/var/adm/fillup-templates \
|
|
%{buildroot}$(dirname %{_fillupdir})
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
|
sed -i -e "s+DISPLAYMANAGER_REMOTE_ACCESS=.*+DISPLAYMANAGER_REMOTE_ACCESS=\"yes\"+g" \
|
|
-e "s+DISPLAYMANAGER_STARTS_XSERVER=.*+DISPLAYMANAGER_STARTS_XSERVER=\"no\"+g" \
|
|
%{buildroot}%{_fillupdir}/sysconfig.displaymanager
|
|
%endif
|
|
popd
|
|
|
|
# Correct location (FHS-2.1)
|
|
%if 0%{?UsrEtcMove}
|
|
ln -s %{_localstatedir}/lib/xdm/authdir %{buildroot}%{_distconfdir}/X11/xdm/authdir
|
|
%else
|
|
ln -s %{_localstatedir}/lib/xdm/authdir %{buildroot}%{_sysconfdir}/X11/xdm/authdir
|
|
%endif
|
|
# 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)
|
|
ln -s xdm.8%{?ext_man} %{buildroot}%{_mandir}/man8/chooser.8%{?ext_man}
|
|
install -D %{SOURCE5} -m 0644 %{buildroot}%{_datadir}/xsessions/xsession.desktop
|
|
rm -f %{buildroot}%{_sbindir}/rcxdm
|
|
install -D %{SOURCE4} -m 0444 %{buildroot}%{_unitdir}/display-manager.service
|
|
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
|
|
# prepare for defaul-dm to be chosen by means of update-alternatives
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/default-displaymanager
|
|
ln -s %{_sysconfdir}/alternatives/default-displaymanager %{buildroot}/usr/lib/X11/displaymanagers/default-displaymanager
|
|
# Inject a dummy 'console' selection - which used to be choice in /etc/sysconfig/displaymanager
|
|
touch %{buildroot}/usr/lib/X11/displaymanagers/console
|
|
|
|
%post
|
|
%service_add_post display-manager.service
|
|
%{fillup_only -n displaymanager}
|
|
%{_sbindir}/update-alternatives --install /usr/lib/X11/displaymanagers/default-displaymanager \
|
|
default-displaymanager /usr/lib/X11/displaymanagers/console 5
|
|
%{_sbindir}/update-alternatives --install /usr/lib/X11/displaymanagers/default-displaymanager \
|
|
default-displaymanager /usr/lib/X11/displaymanagers/xdm 10
|
|
# get rid of DISPLAYMANAGER in /etc/sysconfig/displaymanager (boo#1125040)
|
|
sed -i 's/DISPLAYMANAGER=.*//g' /etc/sysconfig/displaymanager
|
|
%firewalld_reload
|
|
|
|
%pre
|
|
%service_add_pre display-manager.service
|
|
|
|
%postun
|
|
# Do not restart DM on update (bnc#886641)
|
|
%service_del_postun -n display-manager.service
|
|
[ -f /usr/lib/X11/displaymanagers/console ] || %{_sbindir}/update-alternatives \
|
|
--remove default-displaymanager /usr/lib/X11/displaymanagers/console
|
|
[ -f /usr/lib/X11/displaymanagers/xdm ] || %{_sbindir}/update-alternatives \
|
|
--remove default-displaymanager /usr/lib/X11/displaymanagers/xdm
|
|
|
|
%preun
|
|
%service_del_preun display-manager.service
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS ChangeLog COPYING README.md
|
|
%doc HOWTO.xdm
|
|
%dir %{_dminitdir}
|
|
%{_dminitdir}/xdm
|
|
%{_dminitdir}/console
|
|
/usr/lib/X11/displaymanagers/default-displaymanager
|
|
%ghost %{_sysconfdir}/alternatives/default-displaymanager
|
|
%if 0%{?UsrEtcMove}
|
|
%dir %{_distconfdir}/X11
|
|
%{_distconfdir}/X11/xdm/
|
|
%else
|
|
%config %{_sysconfdir}/X11/xdm/
|
|
%endif
|
|
%if 0%{?UsrEtcMove}
|
|
%dir %{_distconfdir}/X11/xdm/scripts
|
|
%else
|
|
%dir %{_sysconfdir}/X11/xdm/scripts
|
|
%endif
|
|
%dir /usr/lib/firewalld
|
|
%dir /usr/lib/firewalld/services
|
|
/usr/lib/firewalld/services/x11.xml
|
|
%{_unitdir}/display-manager.service
|
|
/usr/lib/X11/display-manager
|
|
%config %{_sysconfdir}/logrotate.d/xdm
|
|
### authentification failure with lightdm when using /usr/etc/pam.d
|
|
#%if 0%{?UsrEtcMove}
|
|
#%{_distconfdir}/pam.d/xdm
|
|
#%{_distconfdir}/pam.d/xdm-np
|
|
#%else
|
|
%config(noreplace) %{_sysconfdir}/pam.d/xdm
|
|
%config(noreplace) %{_sysconfdir}/pam.d/xdm-np
|
|
#%endif
|
|
%dir %{_localstatedir}/lib/xdm/
|
|
%{_fillupdir}/sysconfig.displaymanager
|
|
%{_localstatedir}/lib/xdm/authdir/
|
|
%ghost %{_localstatedir}/log/xdm.errors
|
|
%{_bindir}/chooser
|
|
%{_bindir}/xdm
|
|
%{_sbindir}/rcxdm
|
|
%{_sbindir}/rcdisplay-manager
|
|
%{_libdir}/X11/xdm/
|
|
%dir %{_datadir}/X11/app-defaults
|
|
%{_datadir}/X11/app-defaults/Chooser
|
|
%{_mandir}/man8/chooser.8%{?ext_man}
|
|
%{_mandir}/man8/xdm.8%{?ext_man}
|
|
%ifnarch %ix86
|
|
%dir %{_libdir}/X11
|
|
%endif
|
|
|
|
%files xsession
|
|
%dir %{_datadir}/xsessions
|
|
%{_datadir}/xsessions/xsession.desktop
|
|
|
|
%changelog
|