Accepting request 534975 from X11:XOrg

- reintroduced /etc/X11/xdm/keytable script and the hook-up in
  /usr/lib/X11/display-manager to setup X11 keymaps, since YaST
  is not able to use localectl already during installation due to
  dbus and appropriate systemd services not running :-( 
  (bsc#1046436)

- 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.

OBS-URL: https://build.opensuse.org/request/show/534975
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xdm?expand=0&rev=61
This commit is contained in:
Dominique Leuenberger 2017-10-20 12:41:37 +00:00 committed by Git OBS Bridge
commit debb63f3b0
4 changed files with 99 additions and 5 deletions

View 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
#

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Oct 18 15:01:24 UTC 2017 - sndirsch@suse.com
- reintroduced /etc/X11/xdm/keytable script and the hook-up in
/usr/lib/X11/display-manager to setup X11 keymaps, since YaST
is not able to use localectl already during installation due to
dbus and appropriate systemd services not running :-(
(bsc#1046436)
-------------------------------------------------------------------
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

View File

@ -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

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d59ef63f70affbfc4311270cebcb14efdf08e65cbe520fe8bb013a6cd4d55f0b
size 22914
oid sha256:e33d18017a26e2f228d5a55dcc045ce3606f9be3e6e5e49fd1ca11984151a2f0
size 23537