SHA256
1
0
forked from pool/xinit

- xinit-tarball.patch/xinit.spec

* reenabled move to /usr/etc/X11/xinit
  * fixed remaining issues mentioned in boo#1173052, comment#6
    and boo#1176212, comment#7
- fixed wrong bug number in changelog

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xinit?expand=0&rev=56
This commit is contained in:
2020-09-08 11:43:12 +00:00
committed by Git OBS Bridge
parent 7ac81f565f
commit 45db300bef
3 changed files with 48 additions and 21 deletions

View File

@@ -1,18 +1,22 @@
diff -u -r ../old/etc/X11/xinit/xinitrc ./etc/X11/xinit/xinitrc
--- ../old/etc/X11/xinit/xinitrc 2020-08-23 17:36:47.813664000 +0200
+++ ./etc/X11/xinit/xinitrc 2020-09-05 04:00:24.861796000 +0200
@@ -27,7 +27,7 @@
+++ ./etc/X11/xinit/xinitrc 2020-09-08 12:57:08.577438000 +0200
@@ -27,7 +27,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
#
# Special for twm
diff -u -r ../old/etc/X11/xinit/xinitrc.common ./etc/X11/xinit/xinitrc.common
--- ../old/etc/X11/xinit/xinitrc.common 2020-03-24 12:39:54.076007000 +0100
+++ ./etc/X11/xinit/xinitrc.common 2020-09-05 04:29:58.345399000 +0200
+++ ./etc/X11/xinit/xinitrc.common 2020-09-08 12:56:59.193451000 +0200
@@ -1,4 +1,4 @@
-# /etc/X11/xinit/xinitrc.common
+# /usr/etc/X11/xinit/xinitrc.common
@@ -27,29 +31,37 @@ diff -u -r ../old/etc/X11/xinit/xinitrc.common ./etc/X11/xinit/xinitrc.common
xdefaults=$HOME/.Xdefaults
xresources=$HOME/.Xresources
xmodmap=$HOME/.Xmodmap
@@ -37,7 +38,7 @@
@@ -37,9 +38,15 @@
#
# Run user xinit scripts.
#
-for script in /etc/X11/xinit/xinitrc.d/*; do
+for script in /usr/etc/X11/xinit/xinitrc.d/*; do
+for script in /usr/etc/X11/xinit/xinitrc.d/* \
+ /etc/X11/xinit/xinitrc.d/*; do
test -e $script || continue
test -d $script && continue
+ # higher priority for /etc/X11/xinit/xinitrc.d ...
+ if echo $script | grep -q ^/usr; then
+ sname=$(basename $script)
+ test -e /etc/X11/xinit/xinitrc.d/$sname && continue
+ fi
case "$script" in
@@ -140,7 +141,11 @@
.*) continue ;;
*.rpm*) continue ;;
@@ -140,7 +147,11 @@
#
# Start the XIM server
#
-XIMFILE=/etc/X11/xim
+if [ -r /usr/etc/X11/xim ]; then
+ XIMFILE=/usr/etc/X11/xim
+else
+if [ -r /etc/X11/xim ]; then
+ XIMFILE=/etc/X11/xim
+elif [ -r /usr/etc/X11/xim ]; then
+ XIMFILE=/usr/etc/X11/xim
+fi
test -r $HOME/.xim && XIMFILE=$HOME/.xim
test -r $XIMFILE && source $XIMFILE
@@ -167,12 +172,16 @@
@@ -167,12 +178,16 @@
# apply system's xkb first
if test -s $XETCDIR/Xkbmap; then
test -r $XETCDIR/Xkbmap && cat $XETCDIR/Xkbmap | xkbcomp - $DISPLAY
@@ -66,7 +78,7 @@ diff -u -r ../old/etc/X11/xinit/xinitrc.common ./etc/X11/xinit/xinitrc.common
fi
#
@@ -182,6 +191,9 @@
@@ -182,6 +197,9 @@
if test -r $XETCDIR/Xresources ; then
xrdb -nocpp -load -retain $XETCDIR/Xresources
xrdb -I$HOME -merge "$xdefaults"
@@ -76,7 +88,7 @@ diff -u -r ../old/etc/X11/xinit/xinitrc.common ./etc/X11/xinit/xinitrc.common
else
xrdb -I$HOME -load -retain "$xdefaults"
fi
@@ -192,11 +204,16 @@
@@ -192,11 +210,16 @@
if test -r $XETCDIR/Xresources ; then
xrdb -nocpp -load -retain $XETCDIR/Xresources
xrdb -I$HOME -merge "$xresources"

View File

@@ -1,7 +1,15 @@
-------------------------------------------------------------------
Tue Sep 8 11:36:36 UTC 2020 - Stefan Dirsch <sndirsch@suse.com>
- xinit-tarball.patch/xinit.spec
* reenabled move to /usr/etc/X11/xinit
* fixed remaining issues mentioned in boo#1173052, comment#6
and boo#1176212, comment#7
-------------------------------------------------------------------
Tue Sep 8 09:44:08 UTC 2020 - Stefan Dirsch <sndirsch@suse.com>
- reverted move to /usr/etc/X11/xinit for now (boo#1175123, comment#6)
- reverted move to /usr/etc/X11/xinit for now (boo#1173052, comment#6)
-------------------------------------------------------------------
Sat Sep 5 02:48:39 UTC 2020 - Stefan Dirsch <sndirsch@suse.com>

View File

@@ -16,7 +16,7 @@
#
%define UsrEtcMove 0
%define UsrEtcMove 1
Name: xinit
Version: 1.4.1
@@ -66,7 +66,7 @@ terminate.
%prep
%setup -q
%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove}
sed -i 's+/etc+/usr/etc+' %{PATCH0}
sed -i 's+/etc/X11+%{_libexecdir}+' %{PATCH0}
%endif
%patch0 -p0
%patch1 -p1
@@ -79,7 +79,11 @@ sed -i 's+/etc+/usr/etc+' %{PATCH0}
autoreconf -fi
%build
%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove}
%configure --with-xinitdir=%{_libexecdir}/xinit
%else
%configure
%endif
make %{?_smp_mflags}
%{__cc} %{optflags} -o keygen %{SOURCE2}
@@ -91,12 +95,12 @@ pushd %{buildroot}
tar xf %{SOURCE1}
%if 0%{?suse_version} >= 1550 && 0%{UsrEtcMove}
patch -p0 < %{PATCH5}
mkdir -p usr/etc/X11/xinit
mkdir -p %{buildroot}%{_libexecdir}/xinit
mv etc/X11/xinit/{xinitrc,xserverrc} %{buildroot}%{_libexecdir}/xinit
mkdir -p usr/etc/X11/xinit/xinitrc.d
mv etc/X11/Xresources usr/etc/X11
mv etc/X11/xinit/* usr/etc/X11/xinit
rmdir etc/X11/xinit
rmdir etc/X11
rmdir etc
mv etc/X11/xinit/xinitrc.common usr/etc/X11/xinit
rmdir -p etc/X11/xinit/xinitrc.d
%endif
popd
@@ -107,6 +111,9 @@ popd
%dir %{_distconfdir}/X11
%{_distconfdir}/X11/xinit/
%{_distconfdir}/X11/Xresources
%dir %{_libexecdir}/xinit
%attr(0755,root,root) %{_libexecdir}/xinit/xinitrc
%attr(0755,root,root) %{_libexecdir}/xinit/xserverrc
%else
%config %{_sysconfdir}/X11/xinit/
%config %{_sysconfdir}/X11/Xresources