Accepting request 533960 from home:dimstar:Factory
Resubmit, without breaking Leap 42.x; TW/SLE15 and Leap 15 will all use this method OBS-URL: https://build.opensuse.org/request/show/533960 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xdm?expand=0&rev=148
This commit is contained in:
parent
2b0dfe0e5f
commit
2ef8d8b7ca
38
xdm-with-update-alternative.patch
Normal file
38
xdm-with-update-alternative.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff -ur xdm.old/usr/lib/X11/display-manager xdm.new/usr/lib/X11/display-manager
|
||||
--- xdm.old/usr/lib/X11/display-manager 2017-02-06 14:19:33.541035000 +0100
|
||||
+++ xdm.new/usr/lib/X11/display-manager 2017-10-12 15:44:06.592204792 +0200
|
||||
@@ -109,6 +109,8 @@
|
||||
|
||||
#set -x
|
||||
|
||||
+# DISPLAYMANAGER used to be set in /etc/sysconfig/displaymanager, but the default is now set by update-alternatives
|
||||
+DISPLAYMANAGER=$(realpath --relative-base=/usr/lib/X11/displaymanagers /usr/lib/X11/displaymanagers/default-displaymanager)
|
||||
DM=${DISPLAYMANAGER##*/}
|
||||
|
||||
case "$DM" in
|
||||
@@ -127,6 +129,7 @@
|
||||
do
|
||||
name="${i}_vars"
|
||||
PIDFILE=/var/run/$i.pid;
|
||||
+ type $name > /dev/null || continue;
|
||||
$name $DM && break;
|
||||
done
|
||||
if [ -z "$DISPLAYMANAGER" -o ! -x "$DISPLAYMANAGER" ]
|
||||
diff -ur xdm.old/var/adm/fillup-templates/sysconfig.displaymanager xdm.new/var/adm/fillup-templates/sysconfig.displaymanager
|
||||
--- xdm.old/var/adm/fillup-templates/sysconfig.displaymanager 2017-01-04 11:15:56.259500000 +0100
|
||||
+++ xdm.new/var/adm/fillup-templates/sysconfig.displaymanager 2017-10-12 16:35:23.775259305 +0200
|
||||
@@ -1,14 +1,6 @@
|
||||
## Path: Desktop/Display manager
|
||||
## Description: settings to generate a proper displaymanager config
|
||||
|
||||
-## Type: string(kdm,xdm,gdm,wdm,entrance,console,lightdm,sddm)
|
||||
-## Default: ""
|
||||
-#
|
||||
-# Here you can set the default Display manager (kdm/xdm/gdm/wdm/entrance/console).
|
||||
-# all changes in this file require a restart of the displaymanager
|
||||
-#
|
||||
-DISPLAYMANAGER=""
|
||||
-
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
16
xdm.changes
16
xdm.changes
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 12 10:08:28 UTC 2017 - dimstar@opensuse.org
|
||||
|
||||
- Have update-alternatives handle Xinit's integration of the
|
||||
displaymanager, replacing /etc/sysconfig/displaymanager.
|
||||
- Add a dummy entry for 'console' - which is special-cased in the
|
||||
display-manager script to 'exit early'. In order for it to become
|
||||
an option for update-alternatives, the target needs to exist.
|
||||
- Update /usr/lib/X11/display-manager to get the
|
||||
default-displaymanager from the update-alternative setting
|
||||
instead of reading it from /etc/sysconfig/displaymanager.
|
||||
- Remove DISPLAYMANAGER from displaymanager.sysconfig template.
|
||||
- Add xdm-with-update-alternative.patch so the needed changes can
|
||||
be applied for suse_version >= 1330 only, not breaking Leap 42.x.
|
||||
- All that together solves boo#1053863.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 09:58:56 UTC 2017 - sndirsch@suse.com
|
||||
|
||||
|
39
xdm.spec
39
xdm.spec
@ -36,7 +36,7 @@ Release: 0
|
||||
Summary: X Display Manager
|
||||
License: MIT
|
||||
Group: System/X11/Utilities
|
||||
Url: http://xorg.freedesktop.org/
|
||||
URL: http://xorg.freedesktop.org/
|
||||
Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
|
||||
Source1: xdm.tar.bz2
|
||||
Source2: HOWTO.xdm
|
||||
@ -44,10 +44,12 @@ Source3: xdm-fallbacks.tar.bz2
|
||||
Source4: display-manager.service
|
||||
Source5: xsession.desktop
|
||||
Patch1: xdm-tolerant-hostname-changes.diff
|
||||
# PATCH-FEATURE-OPENSUSE xdm-with-update-alternative.patch dimstar@opensuse.org -- Choice of default DM by means of u-a
|
||||
Patch2: xdm-with-update-alternative.patch
|
||||
# needed for patch0, patch2, patch3, patch4
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xau)
|
||||
BuildRequires: pkgconfig(xaw7)
|
||||
@ -72,7 +74,6 @@ Requires: xsetroot
|
||||
Recommends: dbus-1-x11
|
||||
# This was part of the xorg-x11 package up to version 7.6
|
||||
Conflicts: xorg-x11 <= 7.6
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if !%with_systemd
|
||||
Patch0: xdm-consolekit.diff
|
||||
%endif
|
||||
@ -117,6 +118,8 @@ cp %{SOURCE2} .
|
||||
pushd xdm
|
||||
%patch1 -p1
|
||||
popd
|
||||
# Special note: patch 2 is applied in install section; tagging it here for the source validator only
|
||||
#patch2 -p1
|
||||
|
||||
%build
|
||||
# needed for patch0
|
||||
@ -137,6 +140,9 @@ rm %{buildroot}%{_sysconfdir}/X11/xdm/{GiveConsole,TakeConsole,Xsetup_0}
|
||||
pushd %{buildroot}
|
||||
# SuSE default XDM configuration
|
||||
tar xf %{SOURCE1}
|
||||
%if 0%{?suse_version} >= 1330
|
||||
patch -p1 < %{PATCH2}
|
||||
%endif
|
||||
%if %dm_fallbacks
|
||||
tar xf %{SOURCE3}
|
||||
%endif
|
||||
@ -171,6 +177,14 @@ cat > %{buildroot}%{_sbindir}/rcxdm <<-'EOF'
|
||||
EOF
|
||||
chmod 0755 %{buildroot}%{_sbindir}/rcxdm
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1330
|
||||
# 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}%{_libexecdir}/X11/displaymanagers/default-displaymanager
|
||||
# Inject a dummy 'console' selection - which used to be choice in /etc/sysconfig/displaymanager
|
||||
touch %{buildroot}%{_libexecdir}/X11/displaymanagers/console
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} < 1315
|
||||
@ -184,9 +198,15 @@ chmod 0755 %{buildroot}%{_sbindir}/rcxdm
|
||||
%ifarch aarch64 ppc64le
|
||||
if ! [ -c /dev/fb* -o -d /dev/dri ]; then
|
||||
sed -i -e "s+DISPLAYMANAGER_STARTS_XSERVER=.*+DISPLAYMANAGER_STARTS_XSERVER=\"no\"+g" \
|
||||
/etc/sysconfig/displaymanager
|
||||
%{_sysconfdir}/sysconfig/displaymanager
|
||||
fi
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1330
|
||||
%{_sbindir}/update-alternatives --install %{_libexecdir}/X11/displaymanagers/default-displaymanager \
|
||||
default-displaymanager %{_libexecdir}/X11/displaymanagers/console 5
|
||||
%{_sbindir}/update-alternatives --install %{_libexecdir}/X11/displaymanagers/default-displaymanager \
|
||||
default-displaymanager %{_libexecdir}/X11/displaymanagers/xdm 10
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%if !0%{?suse_version} < 1315
|
||||
@ -200,6 +220,12 @@ fi
|
||||
# Do not restart DM on update (bnc#886641)
|
||||
%service_del_postun -n display-manager.service
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1330
|
||||
[ -f %{_libexecdir}/X11/displaymanagers/console ] || %{_sbindir}/update-alternatives \
|
||||
--remove default-displaymanager %{_libexecdir}/X11/displaymanagers/console
|
||||
[ -f %{_libexecdir}/X11/displaymanagers/xdm ] || %{_sbindir}/update-alternatives \
|
||||
--remove default-displaymanager %{_libexecdir}/X11/displaymanagers/xdm
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if !0%{?suse_version} < 1315
|
||||
@ -212,6 +238,11 @@ fi
|
||||
%doc HOWTO.xdm
|
||||
%dir %{_dminitdir}
|
||||
%{_dminitdir}/xdm
|
||||
%if 0%{?suse_version} >= 1330
|
||||
%{_dminitdir}/console
|
||||
%{_libexecdir}/X11/displaymanagers/default-displaymanager
|
||||
%ghost %{_sysconfdir}/alternatives/default-displaymanager
|
||||
%endif
|
||||
%if %dm_fallbacks
|
||||
%{_dminitdir}/entrance.fallback
|
||||
%{_dminitdir}/gdm.fallback
|
||||
|
Loading…
Reference in New Issue
Block a user