================================
xinit:source=1.0.2-1
cvc rdiff xinit -1 /[EMAIL PROTECTED]:1-devel/1.0.2-1
================================
1.0.2-1 Ken VanDine ([EMAIL PROTECTED]) Sun Jul 30 22:48:30 2006
Merged from fl:devel
xinit-1.0.2.tar.bz2: new
xinitrc: new
--- /dev/null
+++ xinitrc
@@ -0,0 +32 @@
+#!/bin/sh
+# Copyright (C) 1999 - 2005 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
+# GNU General Public License version 2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Authors:
+# Mike A. Harris <[EMAIL PROTECTED]>
+
+# Mandatorily source xinitrc-common, which is common code shared between the
+# Xsession and xinitrc scripts which has been factored out to avoid duplication
+. /etc/X11/xinit/xinitrc-common
+
+# The user may have their own clients they want to run. If they don't,
+# fall back to system defaults.
+if [ -f $HOME/.Xclients ]; then
+ exec $DBUS_LAUNCH $HOME/.Xclients || \
+ exec $HOME/.Xclients
+elif [ -f /etc/X11/xinit/Xclients ]; then
+ exec $DBUS_LAUNCH /etc/X11/xinit/Xclients || \
+ exec /etc/X11/xinit/Xclients
+else
+ # Failsafe settings. Although we should never get here
+ # (we provide fallbacks in Xclients as well) it can't hurt.
+ [ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
+ [ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
+ [ -x /usr/bin/twm ] && /usr/bin/twm
+fi
xinput.sh: new
--- /dev/null
+++ xinput.sh
@@ -0,0 +44 @@
+#!/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
+# GNU General Public License version 2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# X Input method setup script
+
+# Load up the user and system locale settings
+oldterm=$TERM
+unset TERM
+if [ -r /etc/profile.d/lang.sh ]; then
+ . /etc/profile.d/lang.sh
+fi
+[ -n "$oldterm" ] && export TERM=$oldterm
+
+tmplang=${LC_CTYPE:-${LANG:-"en_US.UTF-8"}}
+
+## try to source ~/.xinput.d/ll_CC or /etc/X11/xinit/xinput.d/ll_CC to
+## setup the input method for locale (CC is needed for Chinese for example)
+# unset env vars to be safe
+unset XIM XIM_PROGRAM XIM_ARGS XMODIFIERS GTK_IM_MODULE QT_IM_MODULE
+lang_region=$(echo $tmplang | sed -e 's/\..*//')
+for f in $HOME/.xinput.d/${lang_region} \
+ $HOME/.xinput.d/default \
+ /etc/X11/xinit/xinput.d/${lang_region} \
+ /etc/X11/xinit/xinput.d/default ; do
+ [ -r $f ] && source $f && break
+done
+unset lang_region
+
+[ -n "$GTK_IM_MODULE" ] && export GTK_IM_MODULE
+[ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE
+
+# setup XMODIFIERS
+[ -z "$XMODIFIERS" -a -n "$XIM" ] && XMODIFIERS="@im=$XIM"
+[ -n "$XMODIFIERS" ] && export XMODIFIERS
+
+# execute XIM_PROGRAM
+[ -n "$XIM_PROGRAM" ] && which "$XIM_PROGRAM" > /dev/null 2>&1 &&
LANG="$tmplang" "$XIM_PROGRAM" $XIM_ARGS &
xinit.recipe: new
--- /dev/null
+++ xinit.recipe
@@ -0,0 +44 @@
+#
+# Copyright (c) 2005-2006 rPath, Inc.
+# This file is distributed under the terms of the MIT License.
+# A copy is available at http://www.rpath.com/permanent/mit-license.html
+#
+
+loadSuperClass('xorgpackage.recipe')
+class Xinit(XorgPackageRecipe):
+ name = 'xinit'
+ version = '1.0.2'
+ component = 'app'
+
+ buildRequires = [ 'util-linux:runtime' ]
+
+ def setup(r):
+ r.macros.mflags += 'XINITDIR=%(sysconfdir)s/X11/xinit'
+
+ XorgPackageRecipe.setup(r)
+
+ def unpack(r):
+ XorgPackageRecipe.unpack(r)
+
+ # all pulled from Fedora CVS (xorg-x11-xinit, rev. 1.1)
+ r.addSource('Xmodmap', dest='%(sysconfdir)s/X11/', mode=0644)
+ r.addSource('Xresources', dest='%(sysconfdir)s/X11/', mode=0644)
+
+ for script in ('Xclients', 'Xsession', 'xinitrc-common'):
+ r.addSource(script, dest='%(sysconfdir)s/X11/xinit/', mode=0755)
+
+ r.addSource('xinput.sh',
+ dest='%(sysconfdir)s/X11/xinit/xinitrc.d/', mode=0755)
+
+ # must add after the upstream tarball is unpacked so we replace its
copy
+ r.addSource('xinitrc')
+
+ # Security patch for setuid issue
+
r.addPatch('http://xorg.freedesktop.org/releases/X11R7.1/patches/xinit-1.0.2-setuid.diff')
+
+ # XXX: this should go away when upstream is fixed to install xinitrc
+ # with the correct mode
+ def install(r):
+ XorgPackageRecipe.install(r)
+
+ r.SetModes('%(sysconfdir)s/X11/xinit/xinitrc', 0755)
Xmodmap: new
--- /dev/null
+++ Xmodmap
@@ -0,0 +25 @@
+! /etc/X11/Xmodmap
+!
+! global Xmodmap file -- used by both xdm and xinit (startx)
+
+! keycode and keysym remapping should generally be used only if the X
+! server config file has been configured to disable the XKEYBOARD
+! extension
+
+! i386 and alpha
+! keycode 22 = BackSpace
+! keycode 107 = Delete
+
+! powerpc
+! keycode 59 = BackSpace
+! keycode 125 = Delete
+
+! sparc
+! keycode 50 = BackSpace
+! keycode 73 = Delete
+
+! Euro sign support
+! keycode 26 = e E currency
+! keycode 54 = c C cent
+! keycode 113 = Mode_switch Mode_switch Multi_key
+
Xsession: new
--- /dev/null
+++ Xsession
@@ -0,0 +94 @@
+#!/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
+# GNU General Public License version 2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# redirect errors to a file in user's home directory if we can
+if [ -z "$GDMSESSION" ]; then
+ # GDM redirect output itself in a smarter fashion
+ errfile="$HOME/.xsession-errors"
+ if cp /dev/null "$errfile" 2> /dev/null ; then
+ chmod 600 "$errfile"
+ exec > "$errfile" 2>&1
+ else
+ errfile=$(mktemp -q /tmp/xses-$USER.XXXXXX)
+ if [ $? -eq 0 ]; then
+ exec > "$errfile" 2>&1
+ fi
+ fi
+fi
+
+if ! printenv PATH | grep -q /usr/X11R6/bin
+then
+ PATH="${PATH}":/usr/X11R6/bin
+fi
+
+SWITCHDESKPATH=/usr/share/switchdesk
+
+# Mandatorily source xinitrc-common, which is common code shared between the
+# Xsession and xinitrc scripts which has been factored out to avoid duplication
+. /etc/X11/xinit/xinitrc-common
+
+# This Xsession.d implementation, is intended to obsolte and replace the
+# various mechanisms present in the 'case' statement which follows, and to
+# eventually be able to easily remove all hard coded window manager specific
+# content from this script. See bug #142260 for additional explanation and
+# details. All window manager rpm packages and desktop environment
+# packages should be modified to provide the Xsession.d/Xsession.$wm scripts
+# to start themselves up. In the future, the legacy switchdesk mechanisms
+# 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
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $XCLIENTS_D/Xclients.$1.sh"
+else
+# now, we see if xdm/gdm/kdm has asked for a specific environment
+case $# in
+1)
+ if [ -x "$SWITCHDESKPATH/Xclients.$1" ]; then
+ exec -l $SHELL -c "$SWITCHDESKPATH/Xclients.$1";
+ fi;
+
+ case "$1" in
+ failsafe)
+ exec -l $SHELL -c "xterm -geometry 80x24-0-0"
+ ;;
+ gnome)
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH gnome-session"
+ ;;
+ kde|kde1|kde2)
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $SWITCHDESKPATH/Xclients.kde"
+ ;;
+ twm)
+ # fall back to twm
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $SWITCHDESKPATH/Xclients.twm"
+ ;;
+ *)
+ # GDM provies either a command line as the first argument or
+ # provides 'failsafe', 'default' or 'custom'. KDM will do the
+ # same at some point
+ if [ "$1" != "default" -a "$1" != "custom" ]; then
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $1"
+ fi
+ ;;
+ esac
+esac
+fi
+
+# otherwise, take default action
+if [ -x "$HOME/.xsession" ]; then
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.xsession"
+elif [ -x "$HOME/.Xclients" ]; then
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients"
+elif [ -x /etc/X11/xinit/Xclients ]; then
+ exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients"
+else
+ # should never get here; failsafe fallback
+ exec -l $SHELL -c "xsm"
+fi
+
Xclients: new
--- /dev/null
+++ Xclients
@@ -0,0 +65 @@
+#!/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
+# GNU General Public License version 2.
+#
+# You should have received a copy of the GNU General Public License
+# 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)"
+
+# check to see if the user has a preferred desktop
+PREFERRED=
+if [ -f /etc/sysconfig/desktop ]; then
+ . /etc/sysconfig/desktop
+ if [ "$DESKTOP" = "GNOME" ]; then
+ PREFERRED="$GSESSION"
+ elif [ "$DESKTOP" = "KDE" ]; then
+ PREFERRED="$STARTKDE"
+ fi
+fi
+
+if [ -n "$PREFERRED" ]; then
+ exec "$PREFERRED"
+fi
+
+# now if we can reach here, either no desktop file was present,
+# or the desktop requested is not installed.
+
+# by default, we run GNOME.
+if [ -n "$GSESSION" ]; then
+ exec "$GSESSION"
+fi
+
+# if GNOME isn't installed, try KDE.
+if [ -n "$STARTKDE" ]; then
+ exec "$STARTKDE"
+fi
+
+# Failsafe.
+
+# these files are left sitting around by TheNextLevel.
+rm -f $HOME/Xrootenv.0
+
+# Argh! Nothing good is installed. Fall back to twm
+{
+ # gosh, neither fvwm95 nor fvwm2 is available;
+ # fall back to failsafe settings
+ 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 &
+ fi
+ if [ -x /usr/bin/firefox -a -f /usr/share/doc/HTML/index.html ]; then
+ /usr/bin/firefox /usr/share/doc/HTML/index.html &
+ fi
+ if [ -x /usr/bin/twm ] ; then
+ exec /usr/bin/twm
+ fi
+}
xinit-1.0.2-setuid.diff: new
--- /dev/null
+++ xinit-1.0.2-setuid.diff
@@ -0,0 +19 @@
+Index: xinit.c
+===================================================================
+RCS file: /cvs/xorg/app/xinit/xinit.c,v
+retrieving revision 1.4
+diff -u -r1.4 xinit.c
+--- xinit.c 4 Oct 2005 01:27:34 -0000 1.4
++++ xinit.c 19 Jun 2006 21:31:58 -0000
+@@ -692,7 +692,10 @@
+ startClient(char *client[])
+ {
+ if ((clientpid = vfork()) == 0) {
+- setuid(getuid());
++ if (setuid(getuid()) == -1) {
++ Error("cannot change uid: %s\n", strerror(errno));
++ _exit(ERR_EXIT);
++ }
+ setpgrp(0, getpid());
+ environ = newenviron;
+ #ifdef __UNIXOS2__
Xresources: new
--- /dev/null
+++ Xresources
@@ -0,0 +13 @@
+! This is the global resources file that is loaded when
+! all users log in, as well as for the login screen
+
+! Fix the Xft dpi to 96; this prevents tiny fonts
+! or HUGE fonts depending on the screen size.
+Xft.dpi: 96
+
+! hintstyle: medium means that (for Postscript fonts) we
+! position the stems for maximum constrast and consistency
+! but don't force the stems to integral widths. hintnone,
+! hintslight, and hintfull are the other possibilities.
+Xft.hintstyle: hintmedium
+Xft.hinting: true
xinitrc-common: new
--- /dev/null
+++ xinitrc-common
@@ -0,0 +75 @@
+#!/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
+# GNU General Public License version 2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# xinitrc-common
+#
+# This is common code shared by both Xsession and xinitrc scripts. Be sure
+# to take this into account when fixing bugs or adding new functionality.
+
+# Set up i18n environment
+if [ -r /etc/profile.d/lang.sh ]; then
+ . /etc/profile.d/lang.sh
+fi
+
+[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+userxkbmap=$HOME/.Xkbmap
+
+sysresources=/etc/X11/Xresources
+sysmodmap=/etc/X11/Xmodmap
+sysxkbmap=/etc/X11/Xkbmap
+
+# merge in defaults
+[ -r "$sysresources" ] && xrdb -merge "$sysresources"
+[ -r "$userresources" ] && xrdb -merge "$userresources"
+
+# merge in keymaps
+if [ -r "$sysxkbmap" ]; then
+ setxkbmap $(cat "$sysxkbmap")
+ XKB_IN_USE=yes
+fi
+
+if [ -r "$userxkbmap" ]; then
+ setxkbmap $(cat "$userxkbmap")
+ XKB_IN_USE=yes
+fi
+
+# xkb and xmodmap don't play nice together
+if [ -z "$XKB_IN_USE" ]; then
+ [ -r "$sysmodmap" ] && xmodmap "$sysmodmap"
+ [ -r "$usermodmap" ] && xmodmap "$usermodmap"
+fi
+
+unset XKB_IN_USE
+
+# run all system xinitrc shell scripts.
+for file in /etc/X11/xinit/xinitrc.d/* ; do
+ if echo $file | grep -q "\.sh$" ; then
+ . $file
+ else
+ echo "warning: $file does not end in .sh extension, ignoring"
+ fi
+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 [ "x$TMPDIR" != "x" ]; then
+ SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR"
+ else
+ SSH_AGENT="/usr/bin/ssh-agent"
+ fi
+fi
+
+DBUS_LAUNCH=
+[ -x /usr/bin/dbus-launch -a -z "$DBUS_SESSION_BUS_ADDRESS" ] &&
DBUS_LAUNCH="/usr/bin/dbus-launch --exit-with-session"
+
Committed by: krv
_______________________________________________
Desktop-commits mailing list
[email protected]
http://lists.bizrace.com/mailman/listinfo/desktop-commits