From b1f394d12229d1f7afc8262c0118ff03ece18eab05dd8663f1cffd47a4ff2ad9 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 4 Sep 2020 22:49:41 +0000 Subject: [PATCH] - xdm-tarball.patch * /usr/etc changes still needed for xdm.tar.bz2; will need more changes once xmodmap and xinit files are also moved to /usr/etc (boo#1173049) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xdm?expand=0&rev=212 --- xdm-tarball.patch | 277 ++++++++++++++++++++++++++++++++++++++++++++++ xdm.changes | 8 ++ xdm.spec | 3 +- 3 files changed, 287 insertions(+), 1 deletion(-) create mode 100644 xdm-tarball.patch diff --git a/xdm-tarball.patch b/xdm-tarball.patch new file mode 100644 index 0000000..a1307f5 --- /dev/null +++ b/xdm-tarball.patch @@ -0,0 +1,277 @@ +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 00:40:17.437336000 +0200 +@@ -9,7 +9,7 @@ + # + LIBDIR=/usr/lib/X11 + ETCDIR=/etc/X11 +- XDMDIR=${ETCDIR}/xdm ++ XDMDIR=/usr/etc/X11/xdm + BINDIR=/usr/bin + + no_exit_on_failed_exec=1 +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-04 23:59:30.125566000 +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-04 23:49:39.498480000 +0200 +@@ -9,7 +9,7 @@ + # Author: Werner Fink, + # + LIBDIR=/usr/lib/X11 +- ETCDIR=/etc/X11 ++ ETCDIR=/usr/etc/X11 + XDMDIR=${ETCDIR}/xdm + BINDIR=/usr/bin + xmessage=${BINDIR}/xmessage +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-04 23:54:10.477826000 +0200 +@@ -34,7 +34,7 @@ + # Some system defaults + # + XETCDIR=/etc/X11 +- XDMDIR=$XETCDIR/xdm ++ XDMDIR=/usr/etc/X11/xdm + XINITDIR=$XETCDIR/xinit + : ${TMPDIR=/tmp} + +@@ -187,7 +187,11 @@ + # + # By default we set system defaults for the language + # +-. /etc/profile.d/lang.sh ++if [ -r /etc/profile.d/lang.sh ]; then ++ . /etc/profile.d/lang.sh ++elif [ -r /usr/etc/profile.d/lang.sh ]; then ++ . /usr/etc/profile.d/lang.sh ++fi + + # + # Handle arguments given by xdm/kdm/gdm. +@@ -261,7 +265,11 @@ + # No window manager? Get system default + # + if test -z "$WINDOWMANAGER" ; then +- . /etc/profile.d/profile.sh ++ if [ -r /etc/profile.d/profile.sh ]; then ++ . /etc/profile.d/profile.sh ++ elif [ -r /usr/etc/profile.d/profile.sh ]; then ++ . /usr/etc/profile.d/profile.sh ++ fi + fi + + # +@@ -291,7 +299,11 @@ + # Source common code shared between the + # X session and X init scripts + # +-. /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-04 23:56:20.188841000 +0200 +@@ -9,7 +9,7 @@ + # + LIBDIR=/usr/lib/X11 + ETCDIR=/etc/X11 +- XDMDIR=${ETCDIR}/xdm ++ XDMDIR=/usr/etc/X11/xdm + BINDIR=/usr/bin + + no_exit_on_failed_exec=1 +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 00:00:28.359409000 +0200 +@@ -9,7 +9,7 @@ + # Author: Werner Fink, + # + LIBDIR=/usr/lib/X11 +- ETCDIR=/etc/X11 ++ ETCDIR=/usr/etc/X11 + XDMDIR=${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-04 23:58:22.567705000 +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 { +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-04 23:55:09.331646000 +0200 +@@ -38,7 +38,7 @@ + argv=("$@") + set -- + +-for script in /etc/X11/xdm/scripts/* ++for script in /usr/etc/X11/xdm/scripts/* + do + test -e $script || continue + test -d $script && continue +@@ -63,7 +63,11 @@ + # + # Use system default xinitrc if the users does not have one. + # +-XINITRCFILE=/etc/X11/xinit/xinitrc ++if [ -r /etc/X11/xinit/xinitrc ]; then ++ XINITRCFILE=/etc/X11/xinit/xinitrc ++elif [ -r /usr/etc/X11/xinit/xinitrc ]; then ++ XINITRCFILE=/usr/etc/X11/xinit/xinitrc ++fi + test -r "$HOME/.xinitrc" && XINITRCFILE="$HOME/.xinitrc" + + if test -f "$XINITRCFILE" ; then +@@ -77,7 +81,11 @@ + # Source common code shared between the + # X session and X init scripts + # +- . /etc/X11/xinit/xinitrc.common ++ if [ -r /etc/X11/xinit/xinitrc ]; then ++ . /etc/X11/xinit/xinitrc.common ++ elif [ -r /usr/etc/X11/xinit/xinitrc ]; 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-04 23:56:41.284679000 +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.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 + ! + ! ATTENTION: `authName' should be in general MIT-MAGIC-COOKIE-1 + ! For XDM-AUTHENTICATION-1 which is default for xterminals see +@@ -27,16 +27,16 @@ + ! The scripts handling the setup, the startup, the session its self, + ! and the reset of an X session. + ! +-DisplayManager.*.setup: /etc/X11/xdm/Xsetup +-DisplayManager.*.chooser: /etc/X11/xdm/RunChooser +-DisplayManager.*.startup: /etc/X11/xdm/Xstartup +-DisplayManager.*.session: /etc/X11/xdm/Xsession +-DisplayManager.*.reset: /etc/X11/xdm/Xreset ++DisplayManager.*.setup: /usr/etc/X11/xdm/Xsetup ++DisplayManager.*.chooser: /usr/etc/X11/xdm/RunChooser ++DisplayManager.*.startup: /usr/etc/X11/xdm/Xstartup ++DisplayManager.*.session: /usr/etc/X11/xdm/Xsession ++DisplayManager.*.reset: /usr/etc/X11/xdm/Xreset + ! + DisplayManager._0.terminateServer: true + DisplayManager._93.terminateServer: true + ! +-DisplayManager*resources: /etc/X11/xdm/Xresources ++DisplayManager*resources: /usr/etc/X11/xdm/Xresources + DisplayManager.*.terminateServer: false + ! + ! SECURITY: do not listen for XDMCP or Chooser requests +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-04 23:48:56.887780000 +0200 +@@ -16,8 +16,11 @@ + . /etc/sysconfig/displaymanager + . /etc/sysconfig/language + . /etc/sysconfig/windowmanager +-test -e /etc/SuSEconfig/profile && . /etc/SuSEconfig/profile +-test -r /etc/profile.d/desktop-data.sh && . /etc/profile.d/desktop-data.sh ++if [ -r /etc/profile.d/desktop-data.sh ]; then ++ . /etc/profile.d/desktop-data.sh ++elif [ -r /usr/etc/profile.d/desktop-data.sh ]; then ++ . /usr/etc/profile.d/desktop-data.sh ++fi + + locale_vars=" \ + LANG \ +@@ -67,14 +70,18 @@ + unset DEFAULT_WM + export WINDOWMANAGER + +-DMDIR=/etc/X11/xdm ++if [ -d /usr/etc/X11/xdm ]; then ++ DMDIR=/usr/etc/X11/xdm ++else ++ DMDIR=/etc/X11/xdm ++fi + RELOADSIGNAL="-HUP" + + PIDFILELNK="/run/displaymanager.pid" + + + xdm_reload_files () { +- if [ -x /etc/X11/xdm/SuSEconfig.xdm ]; then ++ if [ -x $DMDIR/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 +94,8 @@ + fi + fi + MD5DIR="/var/adm/SuSEconfig/md5" \ +- /etc/X11/xdm/SuSEconfig.xdm | \ +- sed 's+\(.*\)+/etc/init.d/xdm: \1+g' | \ ++ $DMDIR/SuSEconfig.xdm | \ ++ sed 's+\(.*\)+/usr/lib/X11/display-manager: \1+g' | \ + /bin/logger + return 0 + fi +@@ -159,8 +166,8 @@ + start) + + # use system keyboard as global X keyboard configuration +- if [ -x /etc/X11/xdm/keytable ]; then +- /etc/X11/xdm/keytable ++ if [ -x $DMDIR/keytable ]; then ++ $DMDIR/keytable + fi + + [ -n "$STARTPROC" ] && $STARTPROC diff --git a/xdm.changes b/xdm.changes index 987bc40..12bd083 100644 --- a/xdm.changes +++ b/xdm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 4 22:33:30 UTC 2020 - Stefan Dirsch + +- xdm-tarball.patch + * /usr/etc changes still needed for xdm.tar.bz2; will need + more changes once xmodmap and xinit files are also moved to + /usr/etc (boo#1173049) + ------------------------------------------------------------------- Fri Sep 4 20:20:05 UTC 2020 - Stefan Dirsch diff --git a/xdm.spec b/xdm.spec index d33b335..10b2cd9 100644 --- a/xdm.spec +++ b/xdm.spec @@ -35,7 +35,7 @@ Source2: HOWTO.xdm Source4: display-manager.service Source5: xsession.desktop Patch1: xdm-tolerant-hostname-changes.diff -# needed for patch0, patch2, patch3, patch4 +Patch2: xdm-tarball.patch Patch3: n_Allow-the-greeter-to-set-the-input-fields-bg-color.patch BuildRequires: firewall-macros BuildRequires: libtool @@ -125,6 +125,7 @@ pushd %{buildroot} # SuSE default XDM configuration tar xf %{SOURCE1} %if 0%{?suse_version} >= 1550 +patch -p0 < %{PATCH2} mkdir -p usr/etc/X11/xdm mv etc/X11/xdm/* usr/etc/X11/xdm mv etc/pam.d usr/etc/