diff --git a/xdm-tarball.patch b/xdm-tarball.patch index b0f0227..6274537 100644 --- a/xdm-tarball.patch +++ b/xdm-tarball.patch @@ -1,30 +1,21 @@ diff -u -r ../old/etc/X11/xdm/RunChooser ./etc/X11/xdm/RunChooser --- ../old/etc/X11/xdm/RunChooser 2015-07-29 14:46:22.000000000 +0200 -+++ ./etc/X11/xdm/RunChooser 2020-09-05 05:19:59.967153000 +0200 ++++ ./etc/X11/xdm/RunChooser 2020-09-08 22:50:45.711986000 +0200 @@ -9,7 +9,7 @@ # LIBDIR=/usr/lib/X11 ETCDIR=/etc/X11 - XDMDIR=${ETCDIR}/xdm -+ XDMDIR=/usr/etc/X11/xdm ++ XDMDIR=/usr/${ETCDIR}/xdm BINDIR=/usr/bin no_exit_on_failed_exec=1 -@@ -85,7 +85,7 @@ - # - pidof -s gdm > /dev/null 2>&1 - if test $? -eq 0 ; then -- $xrdb -override -retain ${XDMDIR}/Xresources -+ $xrdb -override -retain /usr/etc/X11/Xresources - fi - - # @@ -107,6 +107,8 @@ cat $sysxkbmap | $xkbcomp - $DISPLAY elif test -r $sysmodmap ; then $xmodmap $sysmodmap -+ elif test -r /usr/etc/X11/Xmodmap; then -+ $xmodmap /usr/etc/X11/Xmodmap ++ elif test -r /usr/etc/X11/Xmodmap; then ++ $xmodmap /usr/etc/X11/Xmodmap fi else # TCP/IP connection (remote or local) @@ -32,69 +23,46 @@ diff -u -r ../old/etc/X11/xdm/RunChooser ./etc/X11/xdm/RunChooser cat $defxkbmap | $xkbcomp - $DISPLAY elif test -r $defmodmap ; then $xmodmap $defmodmap -+ elif test -r /usr/etc/X11/Xmodmap.remote; then -+ $xmodmap /usr/etc/X11/Xmodmap.remote ++ elif test -r /usr/etc/X11/Xmodmap.remote; then ++ $xmodmap /usr/etc/X11/Xmodmap.remote fi if test -s $hostxkbmap -a -x $xkbcomp ; then cat $hostxkbmap | $xkbcomp - $DISPLAY -@@ -123,7 +127,6 @@ - fi - fi - -- - # - # Handle background: - # First users choise, if no choise is given -diff -u -r ../old/etc/X11/xdm/SUSEconfig.xdm ./etc/X11/xdm/SUSEconfig.xdm ---- ../old/etc/X11/xdm/SUSEconfig.xdm 2018-07-11 16:42:58.529260339 +0200 -+++ ./etc/X11/xdm/SUSEconfig.xdm 2020-09-05 04:59:05.050486000 +0200 -@@ -69,8 +69,8 @@ - echo "Using MD5DIR=\"$MD5DIR\"..." - } - --if test -r $r/etc/X11/xdm/Xservers -a $r/etc/sysconfig/displaymanager -nt $r/etc/X11/xdm/Xservers; then -- file=$r/etc/X11/xdm/Xservers -+if test -r $r/usr/etc/X11/xdm/Xservers -a $r/etc/sysconfig/displaymanager -nt $r/usr/etc/X11/xdm/Xservers; then -+ file=$r/usr/etc/X11/xdm/Xservers - cp -p $file ${file}.SuSEconfig - if test "$DISPLAYMANAGER_STARTS_XSERVER" = "no" ; then - sed -ri 's/^(:[0-9][[:blank:]]+local[[:blank:]]+)/#\1/g' ${file}.SuSEconfig -@@ -91,8 +91,8 @@ - check_md5_and_move $file - fi - --if test -r $r/etc/X11/xdm/xdm-config -a $r/etc/sysconfig/displaymanager -nt $r/etc/X11/xdm/xdm-config; then -- file=$r/etc/X11/xdm/xdm-config -+if test -r $r/usr/etc/X11/xdm/xdm-config -a $r/etc/sysconfig/displaymanager -nt $r/usr/etc/X11/xdm/xdm-config; then -+ file=$r/usr/etc/X11/xdm/xdm-config - cp -p $file ${file}.SuSEconfig - if test "$DISPLAYMANAGER_REMOTE_ACCESS" = "yes" ; then - sed -ri 's/^(DisplayManager\.requestPort:[[:blank:]]+0)/!\1/g' ${file}.SuSEconfig diff -u -r ../old/etc/X11/xdm/Xreset ./etc/X11/xdm/Xreset --- ../old/etc/X11/xdm/Xreset 2014-12-15 19:34:46.000000000 +0100 -+++ ./etc/X11/xdm/Xreset 2020-09-05 05:21:10.346350000 +0200 -@@ -9,7 +9,7 @@ - # Author: Werner Fink, ++++ ./etc/X11/xdm/Xreset 2020-09-08 22:53:48.699077000 +0200 +@@ -10,7 +10,7 @@ # LIBDIR=/usr/lib/X11 -- ETCDIR=/etc/X11 -+ ETCDIR=/usr/etc/X11 - XDMDIR=${ETCDIR}/xdm + ETCDIR=/etc/X11 +- XDMDIR=${ETCDIR}/xdm ++ XDMDIR=/usr/${ETCDIR}/xdm BINDIR=/usr/bin xmessage=${BINDIR}/xmessage + xconsole=${BINDIR}/xconsole diff -u -r ../old/etc/X11/xdm/Xsession ./etc/X11/xdm/Xsession --- ../old/etc/X11/xdm/Xsession 2017-07-25 11:58:00.067080000 +0200 -+++ ./etc/X11/xdm/Xsession 2020-09-05 05:27:05.666149000 +0200 -@@ -33,7 +33,7 @@ ++++ ./etc/X11/xdm/Xsession 2020-09-08 23:02:03.120815000 +0200 +@@ -35,9 +35,17 @@ # - # Some system defaults - # -- XETCDIR=/etc/X11 -+ XETCDIR=/usr/etc/X11 + XETCDIR=/etc/X11 XDMDIR=$XETCDIR/xdm - XINITDIR=$XETCDIR/xinit +- XINITDIR=$XETCDIR/xinit : ${TMPDIR=/tmp} -@@ -187,7 +187,11 @@ + ++# xinitrc moved to %{_libexecdir}/xinit in xinit package ++if [ -r /usr/libexec/xinit/xinitrc ]; then ++ XINITDIR=/usr/libexec/xinit ++elif [ -r /usr/lib/xinit/xinitrc ]; then ++ XINITDIR=/usr/lib/xinit ++else ++ XINITDIR=$XETCDIR/xinit ++fi ++ + export OPENWINHOME TMPDIR + test -n "$XAUTHORITY" || unset XAUTHORITY + +@@ -187,7 +195,11 @@ # # By default we set system defaults for the language # @@ -107,7 +75,7 @@ diff -u -r ../old/etc/X11/xdm/Xsession ./etc/X11/xdm/Xsession # # Handle arguments given by xdm/kdm/gdm. -@@ -261,7 +265,11 @@ +@@ -261,7 +273,11 @@ # No window manager? Get system default # if test -z "$WINDOWMANAGER" ; then @@ -120,24 +88,29 @@ diff -u -r ../old/etc/X11/xdm/Xsession ./etc/X11/xdm/Xsession fi # -@@ -291,7 +299,7 @@ +@@ -291,7 +307,12 @@ # Source common code shared between the # X session and X init scripts # -. /etc/X11/xinit/xinitrc.common -+. /usr/etc/X11/xinit/xinitrc.common ++ ++if [ -r /etc/X11/xinit/xinitrc.common ]; then ++ . /etc/X11/xinit/xinitrc.common ++elif [ -r /usr/etc/X11/xinit/xinitrc.common ]; then ++ . /usr/etc/X11/xinit/xinitrc.common ++fi # Restore arguments but skip window manager set -- "${argv[@]}" diff -u -r ../old/etc/X11/xdm/Xsetup ./etc/X11/xdm/Xsetup --- ../old/etc/X11/xdm/Xsetup 2020-08-26 15:35:43.014615021 +0200 -+++ ./etc/X11/xdm/Xsetup 2020-09-05 05:31:57.346409000 +0200 ++++ ./etc/X11/xdm/Xsetup 2020-09-08 23:06:32.524239000 +0200 @@ -9,7 +9,7 @@ # LIBDIR=/usr/lib/X11 ETCDIR=/etc/X11 - XDMDIR=${ETCDIR}/xdm -+ XDMDIR=/usr/etc/X11/xdm ++ XDMDIR=/usr/${ETCDIR}/xdm BINDIR=/usr/bin no_exit_on_failed_exec=1 @@ -146,7 +119,7 @@ diff -u -r ../old/etc/X11/xdm/Xsetup ./etc/X11/xdm/Xsetup EOF else - $xrdb $cpp -override -retain ${ETCDIR}/Xresources -+ $xrdb $cpp -override -retain /usr/etc/X11/Xresources ++ $xrdb $cpp -override -retain ${XDMDIR}/Xresources fi # @@ -154,8 +127,8 @@ diff -u -r ../old/etc/X11/xdm/Xsetup ./etc/X11/xdm/Xsetup cat $sysxkbmap | $xkbcomp - $DISPLAY elif test -r $sysmodmap ; then $xmodmap $sysmodmap -+ elif test -r /usr/etc/X11/Xmodmap ; then -+ $xmodmap /usr/etc/X11/Xmodmap ++ elif test -r /usr/etc/X11/Xmodmap ; then ++ $xmodmap /usr/etc/X11/Xmodmap fi else # TCP/IP connection (remote or local) @@ -163,80 +136,87 @@ diff -u -r ../old/etc/X11/xdm/Xsetup ./etc/X11/xdm/Xsetup cat $defxkbmap | $xkbcomp - $DISPLAY elif test -r $defmodmap ; then $xmodmap $defmodmap -+ elif test -r /usr/etc/X11/Xmodmap.remote ; then -+ $xmodmap /usr/etc/X11/Xmodmap.remote ++ elif test -r /usr/etc/X11/Xmodmap.remote ; then ++ $xmodmap /usr/etc/X11/Xmodmap.remote fi if test -s $hostxkbmap -a -x $xkbcomp ; then cat $hostxkbmap | $xkbcomp - $DISPLAY diff -u -r ../old/etc/X11/xdm/Xstartup ./etc/X11/xdm/Xstartup --- ../old/etc/X11/xdm/Xstartup 2020-08-26 15:35:26.270871116 +0200 -+++ ./etc/X11/xdm/Xstartup 2020-09-05 04:59:05.067474000 +0200 -@@ -9,7 +9,7 @@ - # Author: Werner Fink, ++++ ./etc/X11/xdm/Xstartup 2020-09-08 23:13:05.476961000 +0200 +@@ -10,7 +10,7 @@ # LIBDIR=/usr/lib/X11 -- ETCDIR=/etc/X11 -+ ETCDIR=/usr/etc/X11 - XDMDIR=${ETCDIR}/xdm + ETCDIR=/etc/X11 +- XDMDIR=${ETCDIR}/xdm ++ XDMDIR=/usr/${ETCDIR}/xdm BINDIR=/usr/bin xmessage=${BINDIR}/xmessage -diff -u -r ../old/etc/X11/xdm/keytable ./etc/X11/xdm/keytable ---- ../old/etc/X11/xdm/keytable 2017-10-18 16:58:19.074036000 +0200 -+++ ./etc/X11/xdm/keytable 2020-09-05 04:59:05.073490000 +0200 -@@ -6,8 +6,8 @@ - fi - - vconsole_conf_file=/etc/vconsole.conf --previous_x11conf_file=/etc/X11/xorg.conf.d/90-keytable.conf --systemd_x11conf_file=/etc/X11/xorg.conf.d/00-keyboard.conf -+previous_x11conf_file=/usr/etc/X11/xorg.conf.d/90-keytable.conf -+systemd_x11conf_file=/usr/etc/X11/xorg.conf.d/00-keyboard.conf - keyboard_map_systemd=/usr/share/systemd/kbd-model-map - - function setkeyboard { + NOLOGIN=/etc/nologin diff -u -r ../old/etc/X11/xdm/sys.xsession ./etc/X11/xdm/sys.xsession --- ../old/etc/X11/xdm/sys.xsession 2016-06-03 15:25:42.000000000 +0200 -+++ ./etc/X11/xdm/sys.xsession 2020-09-05 05:35:14.220273000 +0200 -@@ -38,7 +38,7 @@ ++++ ./etc/X11/xdm/sys.xsession 2020-09-08 23:34:31.477856000 +0200 +@@ -38,10 +38,16 @@ argv=("$@") set -- -for script in /etc/X11/xdm/scripts/* -+for script in /usr/etc/X11/xdm/scripts/* ++for script in /usr/etc/X11/xdm/scripts/* \ ++ /etc/X11/xdm/scripts/*; do do test -e $script || continue test -d $script && continue -@@ -63,7 +63,7 @@ ++ # higher priority for /etc/X11/xdm/scripts ... ++ if echo $script | grep -q ^/usr; then ++ sname=$(basename $script) ++ test -e /etc/X11/xdm/scripts/$sname && continue ++ fi + case "${script##*/}" in + .*) continue ;; + *.rpm*) continue ;; +@@ -63,7 +69,16 @@ # # Use system default xinitrc if the users does not have one. # -XINITRCFILE=/etc/X11/xinit/xinitrc -+XINITRCFILE=/usr/etc/X11/xinit/xinitrc ++ ++# xinitrc moved to %{_libexecdir}/xinit in xinit package ++if [ -r /usr/libexec/xinit/xinitrc ]; then ++ XINITRCFILE=/usr/libexec/xinit/xinitrc ++elif [ -r /usr/lib/xinit/xinitrc ]; then ++ XINITRCFILE=/usr/lib/xinit/xinitrc ++else ++ XINITRCFILE=/etc/X11/xinit/xinitrc ++fi ++ test -r "$HOME/.xinitrc" && XINITRCFILE="$HOME/.xinitrc" if test -f "$XINITRCFILE" ; then -@@ -77,7 +77,7 @@ +@@ -77,7 +92,11 @@ # Source common code shared between the # X session and X init scripts # - . /etc/X11/xinit/xinitrc.common -+ . /usr/etc/X11/xinit/xinitrc.common ++ if [ -r /etc/X11/xinit/xinitrc.common ]; then ++ . /etc/X11/xinit/xinitrc.common ++ elif [ -r /usr/etc/X11/xinit/xinitrc.common ]; then ++ . /usr/etc/X11/xinit/xinitrc.common ++ fi unset STARTUP WINDOW_MANAGER set -- ${1+"$@"} $WINDOWMANAGER diff -u -r ../old/etc/X11/xdm/xdm-config ./etc/X11/xdm/xdm-config --- ../old/etc/X11/xdm/xdm-config 2020-08-26 15:36:22.290004407 +0200 -+++ ./etc/X11/xdm/xdm-config 2020-09-05 05:35:28.212994000 +0200 ++++ ./etc/X11/xdm/xdm-config 2020-09-08 23:41:18.284830000 +0200 @@ -4,10 +4,10 @@ DisplayManager.errorLogFile: /var/log/xdm.errors DisplayManager.pidFile: /run/xdm.pid DisplayManager.authDir: /var/lib/xdm -DisplayManager.keyFile: /etc/X11/xdm/xdm-keys --DisplayManager.servers: /etc/X11/xdm/Xservers ++DisplayManager.keyFile: /usr/etc/X11/xdm/xdm-keys + DisplayManager.servers: /etc/X11/xdm/Xservers -DisplayManager.accessFile: /etc/X11/xdm/Xaccess -DisplayManager.willing: su nobody -c /etc/X11/xdm/Xwilling -+DisplayManager.keyFile: /usr/etc/X11/xdm/xdm-keys -+DisplayManager.servers: /usr/etc/X11/xdm/Xservers +DisplayManager.accessFile: /usr/etc/X11/xdm/Xaccess +DisplayManager.willing: su nobody -c /usr/etc/X11/xdm/Xwilling ! @@ -265,9 +245,10 @@ diff -u -r ../old/etc/X11/xdm/xdm-config ./etc/X11/xdm/xdm-config DisplayManager.*.terminateServer: false ! ! SECURITY: do not listen for XDMCP or Chooser requests +Only in ./usr/lib/X11: .nfs0000000004cd295200014457 diff -u -r ../old/usr/lib/X11/display-manager ./usr/lib/X11/display-manager --- ../old/usr/lib/X11/display-manager 2020-09-04 13:11:23.054517000 +0200 -+++ ./usr/lib/X11/display-manager 2020-09-05 05:01:39.171143000 +0200 ++++ ./usr/lib/X11/display-manager 2020-09-09 00:01:56.326807000 +0200 @@ -16,8 +16,11 @@ . /etc/sysconfig/displaymanager . /etc/sysconfig/language @@ -282,7 +263,7 @@ diff -u -r ../old/usr/lib/X11/display-manager ./usr/lib/X11/display-manager locale_vars=" \ LANG \ -@@ -67,14 +70,14 @@ +@@ -67,14 +70,23 @@ unset DEFAULT_WM export WINDOWMANAGER @@ -295,11 +276,20 @@ diff -u -r ../old/usr/lib/X11/display-manager ./usr/lib/X11/display-manager xdm_reload_files () { - if [ -x /etc/X11/xdm/SuSEconfig.xdm ]; then -+ if [ -x $DMDIR/SuSEconfig.xdm ]; then ++ test -d /etc/X11/xdm || mkdir -p /etc/X11/xdm ++ # SUSEconfig edits these files appropriate to /etc/sysconfig/displaymanager ++ test -r /etc/X11/xdm/xdm-config || cp $DMDIR/xdm-config /etc/X11/xdm/xdm-config ++ test -r /etc/X11/xdm/Xservers || cp $DMDIR/Xservers /etc/X11/xdm/Xservers ++ # needed by sddm ++ test -r /etc/X11/xdm/Xsession || ln -snf $DMDIR/Xsession /etc/X11/xdm/Xsession ++ test -r /etc/X11/xdm/Xsetup || ln -snf $DMDIR/Xsetup /etc/X11/xdm/Xsetup ++ # possibly needed by who knows ... ++ test -r /etc/X11/xdm/Keyboard.map || ln -snf $DMDIR/Keyboard.map /etc/X11/xdm/Keyboard.map ++ if [ -x $DMIR/SuSEconfig.xdm ]; then # Do no try to start Xserver on platforms which may ship without # graphics card (bsc#1039497) if [ "$(arch)" == "aarch64" -o "$(arch)" == "ppc64le" ]; then -@@ -87,8 +90,8 @@ +@@ -87,8 +99,8 @@ fi fi MD5DIR="/var/adm/SuSEconfig/md5" \ @@ -310,7 +300,7 @@ diff -u -r ../old/usr/lib/X11/display-manager ./usr/lib/X11/display-manager /bin/logger return 0 fi -@@ -159,8 +162,8 @@ +@@ -159,8 +171,8 @@ start) # use system keyboard as global X keyboard configuration @@ -321,3 +311,17 @@ diff -u -r ../old/usr/lib/X11/display-manager ./usr/lib/X11/display-manager fi [ -n "$STARTPROC" ] && $STARTPROC +diff -u -r ../old/usr/lib/X11/displaymanagers/xdm ./usr/lib/X11/displaymanagers/xdm +--- ../old/usr/lib/X11/displaymanagers/xdm 2014-03-04 13:53:31.000000000 +0100 ++++ ./usr/lib/X11/displaymanagers/xdm 2020-09-08 21:58:22.768049000 +0200 +@@ -5,8 +5,8 @@ + } + + xdm_probe_proc() { +- if test $XDMDIR/xdm-config -nt $PIDFILE -o \ +- $XDMDIR/Xservers -nt $PIDFILE ++ if test /etc/X11/xdm/xdm-config -nt $PIDFILE -o \ ++ /etc/X11/xdm/Xservers -nt $PIDFILE + then + echo reload + fi diff --git a/xdm.changes b/xdm.changes index 8701953..f699750 100644 --- a/xdm.changes +++ b/xdm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 8 22:02:59 UTC 2020 - Stefan Dirsch + +- reenabled move to /usr/etc/X11/xdm; updated xdm-tarball.patch + (includes changes from xinit-UsrEtcMove.patch) [boo#1176212] + ------------------------------------------------------------------- Tue Sep 8 15:00:50 UTC 2020 - Stefan Dirsch diff --git a/xdm.spec b/xdm.spec index 33ce282..8f74f89 100644 --- a/xdm.spec +++ b/xdm.spec @@ -16,7 +16,9 @@ # -%define UsrEtcMove 0 +%if 0%{?suse_version} >= 1550 +%define UsrEtcMove 1 +%endif #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} @@ -105,35 +107,25 @@ autoreconf -fi %configure \ --disable-static \ --with-pam \ -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} - --with-xdmconfigdir=%{_distconfdir}/X11/xdm \ - --with-xdmscriptdir=%{_distconfdir}/X11/xdm \ -%else --with-xdmconfigdir=%{_sysconfdir}/X11/xdm \ --with-xdmscriptdir=%{_sysconfdir}/X11/xdm \ -%endif --with-systemdsystemunitdir=no make %{?_smp_mflags} %install %make_install # Not used anymore by SuSE -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} -rm %{buildroot}%{_distconfdir}/X11/xdm/{GiveConsole,TakeConsole,Xsetup_0} -%else rm %{buildroot}%{_sysconfdir}/X11/xdm/{GiveConsole,TakeConsole,Xsetup_0} -%endif pushd %{buildroot} # SuSE default XDM configuration tar xf %{SOURCE1} -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} +%if 0%{?UsrEtcMove} patch -p0 < %{PATCH2} mkdir -p usr/etc/X11/xdm mv etc/X11/xdm/* usr/etc/X11/xdm mv etc/pam.d usr/etc/ -rmdir etc/X11/xdm -rmdir etc/X11 +rmdir etc/X11/xdm etc/X11 %else patch -p0 < %{PATCH4} %endif @@ -151,7 +143,7 @@ sed -i -e "s+DISPLAYMANAGER_REMOTE_ACCESS=.*+DISPLAYMANAGER_REMOTE_ACCESS=\"yes\ popd # Correct location (FHS-2.1) -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} +%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 @@ -212,13 +204,13 @@ sed -i 's/DISPLAYMANAGER=.*//g' /etc/sysconfig/displaymanager %{_dminitdir}/console /usr/lib/X11/displaymanagers/default-displaymanager %ghost %{_sysconfdir}/alternatives/default-displaymanager -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} +%if 0%{?UsrEtcMove} %dir %{_distconfdir}/X11 %{_distconfdir}/X11/xdm/ %else %config %{_sysconfdir}/X11/xdm/ %endif -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} +%if 0%{?UsrEtcMove} %dir %{_distconfdir}/X11/xdm/scripts %else %dir %{_sysconfdir}/X11/xdm/scripts @@ -229,7 +221,7 @@ sed -i 's/DISPLAYMANAGER=.*//g' /etc/sysconfig/displaymanager %{_unitdir}/display-manager.service /usr/lib/X11/display-manager %config %{_sysconfdir}/logrotate.d/xdm -%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove} +%if 0%{?UsrEtcMove} %{_distconfdir}/pam.d/xdm %{_distconfdir}/pam.d/xdm-np %else