rpms/xorg-x11-xinit/devel Xclients, 1.4, 1.5 Xsession, 1.13, 1.14 xinitrc-common, 1.6, 1.7 xorg-x11-xinit.spec, 1.72, 1.73
Matej Cepl
mcepl at fedoraproject.org
Fri Jan 29 09:33:32 UTC 2010
Author: mcepl
Update of /cvs/pkgs/rpms/xorg-x11-xinit/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15326
Modified Files:
Xclients Xsession xinitrc-common xorg-x11-xinit.spec
Log Message:
Improvements to provided scripts (Resolves #549551)
Index: Xclients
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-xinit/devel/Xclients,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- Xclients 8 Jun 2009 20:54:16 -0000 1.4
+++ Xclients 29 Jan 2010 09:33:31 -0000 1.5
@@ -8,8 +8,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-GSESSION="$(which gnome-session 2>/dev/null)"
-STARTKDE="$(which startkde 2>/dev/null)"
+GSESSION="$(type -p gnome-session)"
+STARTKDE="$(type -p startkde)"
# check to see if the user has a preferred desktop
PREFERRED=
@@ -39,7 +39,7 @@ fi
# We should also support /etc/X11/xinit/Xclients.d scripts
XCLIENTS_D=/etc/X11/xinit/Xclients.d
-if [ -d "$XCLIENTS_D" -a "$#" -eq 1 -a -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
+if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
exec -l $SHELL -c "$SSH_AGENT $XCLIENTS_D/Xclients.$1.sh"
fi
@@ -56,8 +56,6 @@ rm -f $HOME/Xrootenv.0
if [ -x /usr/bin/xclock ] ; then
/usr/bin/xclock -geometry 100x100-5+5 &
- elif [ -x /usr/bin/xclock ] ; then
- /usr/bin/xclock -geometry 100x100-5+5 &
fi
if [ -x /usr/bin/xterm ] ; then
/usr/bin/xterm -geometry 80x50-50+150 &
Index: Xsession
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-xinit/devel/Xsession,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- Xsession 10 Nov 2009 20:20:57 -0000 1.13
+++ Xsession 29 Jan 2010 09:33:32 -0000 1.14
@@ -40,7 +40,7 @@ SWITCHDESKPATH=/usr/share/switchdesk
# and hard coded window managers and desktop environments will be removed from
# this script.
XCLIENTS_D=/etc/X11/xinit/Xclients.d
-if [ -d "$XCLIENTS_D" -a "$#" -eq 1 -a -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
+if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $XCLIENTS_D/Xclients.$1.sh"
else
# now, we see if xdm/gdm/kdm has asked for a specific environment
Index: xinitrc-common
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-xinit/devel/xinitrc-common,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- xinitrc-common 11 Mar 2009 14:09:54 -0000 1.6
+++ xinitrc-common 29 Jan 2010 09:33:32 -0000 1.7
@@ -1,4 +1,3 @@
-#!/bin/bash
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
@@ -56,7 +55,7 @@ done
# Prefix launch of session with ssh-agent if available and not already running.
SSH_AGENT=
-if [ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ]; then
+if [ -z "$SSH_AGENT_PID" ] && [ -x /usr/bin/ssh-agent ]; then
if [ "x$TMPDIR" != "x" ]; then
SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR"
else
@@ -65,6 +64,6 @@ if [ -x /usr/bin/ssh-agent -a -z "$SSH_A
fi
CK_XINIT_SESSION=
-if [ -x /usr/bin/ck-xinit-session -a -z "$XDG_SESSION_COOKIE" ]; then
+if [ -z "$XDG_SESSION_COOKIE" ] && [ -x /usr/bin/ck-xinit-session ]; then
CK_XINIT_SESSION="/usr/bin/ck-xinit-session"
fi
Index: xorg-x11-xinit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-xinit/devel/xorg-x11-xinit.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- xorg-x11-xinit.spec 10 Nov 2009 20:20:57 -0000 1.72
+++ xorg-x11-xinit.spec 29 Jan 2010 09:33:32 -0000 1.73
@@ -41,7 +41,6 @@ Requires: xauth
Requires: coreutils
Requires: xorg-x11-server-utils
Requires: ConsoleKit-x11
-Requires: which
# NOTE: Most of the xinitrc scripts/config files are now in xorg-x11-xinit,
# so the xinitrc package became unnecessary. The xdm configs/scripts move
@@ -90,7 +89,9 @@ install -m644 -D $RPM_SOURCE_DIR/xinit-c
# Install Red Hat custom xinitrc, etc.
{
- for script in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do
+ install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc-common
+
+ for script in %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do
install -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/}
done
@@ -131,6 +132,11 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/xsessions/xinit-compat.desktop
%changelog
+* Tue Dec 22 2009 Ville Skyttä <ville.skytta at iki.fi>
+- Eliminate dependency on which.
+- Change Xclients, Xsession and xinitrc-common to make fewer stat calls.
+- Install xinitrc-common non-executable.
+
* Tue Nov 10 2009 Matěj Cepl <mcepl at redhat.com> - 1.0.9-13
- Fix SELinux labels on $errfile (fixes bug# 530419)
More information about the scm-commits
mailing list