From f70ae16a8fedae92705ea534f642e77a9d4125074c3d6efbce926bb7c264e849 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Tue, 8 Sep 2020 15:05:45 +0000 Subject: [PATCH] - xinit-UsrEtcMove.patch * changes needed with xinitrc moving to %{_libexecdir}/xinit and xinitrc.common moving to /usr/etc/X11/xinit/ OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xdm?expand=0&rev=215 --- xdm.changes | 7 +++++ xdm.spec | 3 ++ xinit-UsrEtcMove.patch | 70 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 xinit-UsrEtcMove.patch diff --git a/xdm.changes b/xdm.changes index 14293ba..8701953 100644 --- a/xdm.changes +++ b/xdm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Sep 8 15:00:50 UTC 2020 - Stefan Dirsch + +- xinit-UsrEtcMove.patch + * changes needed with xinitrc moving to %{_libexecdir}/xinit and + xinitrc.common moving to /usr/etc/X11/xinit/ + ------------------------------------------------------------------- Tue Sep 8 09:29:10 UTC 2020 - Stefan Dirsch diff --git a/xdm.spec b/xdm.spec index 882274b..33ce282 100644 --- a/xdm.spec +++ b/xdm.spec @@ -39,6 +39,7 @@ 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 @@ -133,6 +134,8 @@ mv etc/X11/xdm/* usr/etc/X11/xdm mv etc/pam.d usr/etc/ rmdir etc/X11/xdm rmdir etc/X11 +%else +patch -p0 < %{PATCH4} %endif %if "%{_fillupdir}" != "/var/adm/fillup-templates" mkdir -p %{buildroot}$(dirname %{_fillupdir}) diff --git a/xinit-UsrEtcMove.patch b/xinit-UsrEtcMove.patch new file mode 100644 index 0000000..21a4e19 --- /dev/null +++ b/xinit-UsrEtcMove.patch @@ -0,0 +1,70 @@ +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-08 16:49:26.220507000 +0200 +@@ -35,9 +35,17 @@ + # + XETCDIR=/etc/X11 + XDMDIR=$XETCDIR/xdm +- XINITDIR=$XETCDIR/xinit + : ${TMPDIR=/tmp} + ++# 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 + +@@ -291,7 +299,12 @@ + # 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/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-08 16:54:30.682569000 +0200 +@@ -63,7 +63,16 @@ + # + # Use system default xinitrc if the users does not have one. + # +-XINITRCFILE=/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 +86,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 + unset STARTUP WINDOW_MANAGER + + set -- ${1+"$@"} $WINDOWMANAGER