diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2e76eab --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/xinit-1.3.4.tar.bz2 diff --git a/.xorg-x11-xinit.metadata b/.xorg-x11-xinit.metadata new file mode 100644 index 0000000..b7743ca --- /dev/null +++ b/.xorg-x11-xinit.metadata @@ -0,0 +1 @@ +de3469080d73ced1f7d7a1803e813bc6ea352072 SOURCES/xinit-1.3.4.tar.bz2 diff --git a/SOURCES/0001-startx-Pass-keeptty-when-telling-the-server-to-start.patch b/SOURCES/0001-startx-Pass-keeptty-when-telling-the-server-to-start.patch new file mode 100644 index 0000000..f6fa8ff --- /dev/null +++ b/SOURCES/0001-startx-Pass-keeptty-when-telling-the-server-to-start.patch @@ -0,0 +1,34 @@ +From c70ab1d87b4aec8f171615aa8dee4a1fc1104b4b Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 20 Jan 2015 16:18:34 +0100 +Subject: [PATCH xinit] startx: Pass -keeptty when telling the server to start + on the current tty + +Detaching from the tty causes systemd-logind to refuse service to the xserver, +the xserver already tries to detect that it is being asked to run on the +current tty and then automatically enables -keeptty, but this code fails if +all of stdin, stdout and stderr are redirected to a file. So explicitly tell +the xserver to not detach when we're telling it to run on the current tty. + +BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1177513 +Signed-off-by: Hans de Goede +--- + startx.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/startx.cpp b/startx.cpp +index 1c6fce0..45d7bd9 100644 +--- a/startx.cpp ++++ b/startx.cpp +@@ -195,7 +195,7 @@ if [ x"$server" = x ]; then + tty=$(tty) + if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then + tty_num=$(echo "$tty" | grep -oE '[0-9]+$') +- vtarg="vt$tty_num" ++ vtarg="vt$tty_num -keeptty" + fi + #endif + +-- +2.1.0 + diff --git a/SOURCES/0002-startx-Fix-startx-picking-an-already-used-display-nu.patch b/SOURCES/0002-startx-Fix-startx-picking-an-already-used-display-nu.patch new file mode 100644 index 0000000..1db645a --- /dev/null +++ b/SOURCES/0002-startx-Fix-startx-picking-an-already-used-display-nu.patch @@ -0,0 +1,36 @@ +From 848dc9b7f3a95f14efd4ea34188cba51965c9f53 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 20 Mar 2015 14:25:44 +0100 +Subject: [PATCH xinit 2/3] startx: Fix startx picking an already used display + number when -nolock is used + +Currently startx relies on /tmp/.X?-lock being present for automatically +picking a free display number. This does not work if -nolock is used when +starting the server, or if the server is started with -displayfd as -displayfd +implies -nolock. + +This is becoming a problem now that -displayfd is getting used by +display-managers (e.g. gdm), this fixes this by also checking for +/tmp/.X11-unix/X? + +Signed-off-by: Hans de Goede +--- + startx.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/startx.cpp b/startx.cpp +index 8520399..fe49996 100644 +--- a/startx.cpp ++++ b/startx.cpp +@@ -120,7 +120,7 @@ enable_xauth=1 + XCOMM Automatically determine an unused $DISPLAY + d=0 + while true ; do +- [ -e /tmp/.X$d-lock ] || break ++ [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break + d=$(($d + 1)) + done + defaultdisplay=":$d" +-- +2.3.3 + diff --git a/SOURCES/0003-startx-Make-startx-auto-display-select-work-with-per.patch b/SOURCES/0003-startx-Make-startx-auto-display-select-work-with-per.patch new file mode 100644 index 0000000..aa67ba0 --- /dev/null +++ b/SOURCES/0003-startx-Make-startx-auto-display-select-work-with-per.patch @@ -0,0 +1,35 @@ +From 72939fed64b00be4a74dd0e1bf0b418e00ac4c57 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 20 Mar 2015 14:30:08 +0100 +Subject: [PATCH xinit 3/3] startx: Make startx auto display select work with + per user /tmp dirs + +If a separate /tmp per user is used the existing auto display select code +does not work, add an extra check for the unix socket for the display number +existing in /proc/net/unix (linux only). + +Signed-off-by: Hans de Goede +--- + startx.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/startx.cpp b/startx.cpp +index fe49996..3b0dd86 100644 +--- a/startx.cpp ++++ b/startx.cpp +@@ -120,7 +120,11 @@ enable_xauth=1 + XCOMM Automatically determine an unused $DISPLAY + d=0 + while true ; do +- [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break ++ [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || ++#ifdef __linux__ ++ grep -q "/tmp/.X11-unix/X$d" "/proc/net/unix" || ++#endif ++ break + d=$(($d + 1)) + done + defaultdisplay=":$d" +-- +2.3.3 + diff --git a/SOURCES/Xclients b/SOURCES/Xclients new file mode 100755 index 0000000..856f179 --- /dev/null +++ b/SOURCES/Xclients @@ -0,0 +1,70 @@ +#!/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="$(type -p gnome-session)" +STARTKDE="$(type -p startkde)" + +# 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. + +if [ -n "$GSESSION" -a -f /usr/share/xsessions/gnome-classic.desktop ]; then + # by default, we run GNOME. + export GNOME_SHELL_SESSION_MODE=classic + exec "$GSESSION" --session=gnome-classic +elif [ -n "$STARTKDE" ]; then + # if GNOME isn't installed, try KDE. + exec "$STARTKDE" +fi + +# We should also support /etc/X11/xinit/Xclients.d scripts +XCLIENTS_D=/etc/X11/xinit/Xclients.d +if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then + exec -l $SHELL -c "$SSH_AGENT $XCLIENTS_D/Xclients.$1.sh" +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 + [ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45' + + if [ -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 +} diff --git a/SOURCES/Xmodmap b/SOURCES/Xmodmap new file mode 100644 index 0000000..5625f3a --- /dev/null +++ b/SOURCES/Xmodmap @@ -0,0 +1,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 + diff --git a/SOURCES/Xresources b/SOURCES/Xresources new file mode 100644 index 0000000..814e990 --- /dev/null +++ b/SOURCES/Xresources @@ -0,0 +1,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 do not force the stems to integral widths. hintnone, +! hintslight, and hintfull are the other possibilities. +Xft.hintstyle: hintmedium +Xft.hinting: true diff --git a/SOURCES/Xsession b/SOURCES/Xsession new file mode 100644 index 0000000..367a46d --- /dev/null +++ b/SOURCES/Xsession @@ -0,0 +1,93 @@ +#!/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 ( umask 077 && cp /dev/null "$errfile" 2> /dev/null ); then + chmod 600 "$errfile" + [ -x /sbin/restorecon ] && /sbin/restorecon $errfile + exec > "$errfile" 2>&1 + else + errfile=$(mktemp -q /tmp/xses-$USER.XXXXXX) + if [ $? -eq 0 ]; then + exec > "$errfile" 2>&1 + fi + fi +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 [ "$#" -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 +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|gnome-session) + # lack of SSH_AGENT is intentional, see #441123. though + # the whole thing should really happen in xinitrc.d anyway. + exec -l $SHELL -c gnome-session + exec /bin/sh -c "exec -l $SHELL -c \"gnome-session\"" + ;; + kde|kde1|kde2) + exec $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"startkde\"" + ;; + twm) + # fall back to twm + exec $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"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 $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$1\"" + fi + ;; + esac +esac +fi + +# otherwise, take default action +if [ -x "$HOME/.xsession" ]; then + exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.xsession" +elif [ -x "$HOME/.Xclients" ]; then + exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients" +elif [ -x /etc/X11/xinit/Xclients ]; then + exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients" +else + # should never get here; failsafe fallback + exec -l $SHELL -c "xsm" +fi + diff --git a/SOURCES/localuser.sh b/SOURCES/localuser.sh new file mode 100755 index 0000000..0cf6fe6 --- /dev/null +++ b/SOURCES/localuser.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright (C) 2006 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 /usr/bin/xhost ] && [ -x /usr/bin/id ] && + xhost +si:localuser:`id -un` >& /dev/null diff --git a/SOURCES/xinit-1.0.2-client-session.patch b/SOURCES/xinit-1.0.2-client-session.patch new file mode 100644 index 0000000..f463f68 --- /dev/null +++ b/SOURCES/xinit-1.0.2-client-session.patch @@ -0,0 +1,38 @@ +diff -up xinit-1.3.4/xinit.c.client-session xinit-1.3.4/xinit.c +--- xinit-1.3.4/xinit.c.client-session 2014-03-25 10:20:26.000000000 +0100 ++++ xinit-1.3.4/xinit.c 2014-09-11 17:03:30.928360694 +0200 +@@ -89,6 +89,8 @@ char xserverrcbuf[256]; + + #define TRUE 1 + #define FALSE 0 ++#define OK_EXIT 0 ++#define ERR_EXIT 1 + + static char *default_server = "X"; + static char *default_display = ":0"; /* choose most efficient */ +@@ -560,6 +562,7 @@ startClient(char *client_argv[]) + { + clientpid = fork(); + if (clientpid == 0) { ++ int fd; + set_environment(); + setWindowPath(); + +@@ -567,7 +570,16 @@ startClient(char *client_argv[]) + Error("cannot change uid"); + _exit(EXIT_FAILURE); + } +- setpgid(0, getpid()); ++ fd = open ("/dev/null", O_RDONLY); ++ ++ if (fd < 0) { ++ Error("cannot open /dev/null: %s\n", strerror(errno)); ++ _exit(ERR_EXIT); ++ } ++ close (STDIN_FILENO); ++ dup2 (fd, STDIN_FILENO); ++ close (fd); ++ setsid(); + Execute(client_argv); + Error("Unable to run program \"%s\"", client_argv[0]); + diff --git a/SOURCES/xinit-1.0.9-unset.patch b/SOURCES/xinit-1.0.9-unset.patch new file mode 100644 index 0000000..b8ae4ae --- /dev/null +++ b/SOURCES/xinit-1.0.9-unset.patch @@ -0,0 +1,12 @@ +Index: xinit-1.3.1/startx.cpp +=================================================================== +--- xinit-1.3.1.orig/startx.cpp ++++ xinit-1.3.1/startx.cpp +@@ -11,6 +11,7 @@ XCOMM + XCOMM Site administrators are STRONGLY urged to write nicer versions. + XCOMM + ++unset XDG_SESSION_COOKIE + unset DBUS_SESSION_BUS_ADDRESS + unset SESSION_MANAGER + diff --git a/SOURCES/xinit-compat b/SOURCES/xinit-compat new file mode 100644 index 0000000..863956c --- /dev/null +++ b/SOURCES/xinit-compat @@ -0,0 +1,7 @@ +#!/bin/sh +for session in ~/.xsession ~/.Xclients /etc/X11/xinit/Xclients ; +do +if [ -f ${session} ] ; then + exec ${session} +fi +done diff --git a/SOURCES/xinit-compat.desktop b/SOURCES/xinit-compat.desktop new file mode 100644 index 0000000..c11478d --- /dev/null +++ b/SOURCES/xinit-compat.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Name=User script +Comment=This session runs ~/.xsession or ~/.Xclients if available +Exec=/usr/libexec/xinit-compat diff --git a/SOURCES/xinitrc b/SOURCES/xinitrc new file mode 100755 index 0000000..39e5b10 --- /dev/null +++ b/SOURCES/xinitrc @@ -0,0 +1,33 @@ +#!/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 + +# 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 $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \ + exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients +elif [ -f /etc/X11/xinit/Xclients ]; then + exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \ + exec $CK_XINIT_SESSION $SSH_AGENT /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/xsetroot ] && /usr/bin/xsetroot -solid '#222E45' + [ -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 diff --git a/SOURCES/xinitrc-common b/SOURCES/xinitrc-common new file mode 100644 index 0000000..3804b4a --- /dev/null +++ b/SOURCES/xinitrc-common @@ -0,0 +1,67 @@ +# 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 + +[ -r $HOME/.profile ] && . $HOME/.profile + +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 -nocpp -merge "$sysresources" +[ -r "$userresources" ] && xrdb -merge "$userresources" + +# merge in keymaps +if [ -r "$sysxkbmap" ]; then + setxkbmap $(cat "$sysxkbmap") +fi + +if [ -r "$userxkbmap" ]; then + setxkbmap $(cat "$userxkbmap") +fi + +# xkb and xmodmap don't play nice together +if ! [ -r "$sysxkbmap" -o -r "$userxkbmap" ] ; then + [ -r "$sysmodmap" ] && xmodmap "$sysmodmap" + [ -r "$usermodmap" ] && xmodmap "$usermodmap" +fi + +# run all system xinitrc shell scripts. +for file in /etc/X11/xinit/xinitrc.d/* ; do + . $file +done + +# Prefix launch of session with ssh-agent if available and not already running. +SSH_AGENT= +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 + SSH_AGENT="/usr/bin/ssh-agent" + fi +fi + +CK_XINIT_SESSION= +if [ -z "$XDG_SESSION_COOKIE" ] && [ -x /usr/bin/ck-xinit-session ]; then + CK_XINIT_SESSION="/usr/bin/ck-xinit-session" +fi diff --git a/SPECS/xorg-x11-xinit.spec b/SPECS/xorg-x11-xinit.spec new file mode 100644 index 0000000..934acac --- /dev/null +++ b/SPECS/xorg-x11-xinit.spec @@ -0,0 +1,421 @@ +%define pkgname xinit + +Summary: X.Org X11 X Window System xinit startup scripts +Name: xorg-x11-%{pkgname} +Version: 1.3.4 +Release: 2%{?dist} +License: MIT +Group: User Interface/X +URL: http://www.x.org + +Source0: ftp://ftp.x.org/pub/individual/app/%{pkgname}-%{version}.tar.bz2 +Source10: xinitrc-common +Source11: xinitrc +Source12: Xclients +Source13: Xmodmap +Source14: Xresources +# NOTE: Xsession is used by xdm/kdm/gdm and possibly others, so we keep it +# here instead of the xdm package. +Source16: Xsession +Source17: localuser.sh +Source18: xinit-compat.desktop +Source19: xinit-compat + +# Fedora specific patches + +Patch1: xinit-1.0.2-client-session.patch +Patch2: xinit-1.0.9-unset.patch +Patch3: 0001-startx-Pass-keeptty-when-telling-the-server-to-start.patch +Patch4: 0002-startx-Fix-startx-picking-an-already-used-display-nu.patch +Patch5: 0003-startx-Make-startx-auto-display-select-work-with-per.patch + +BuildRequires: pkgconfig +BuildRequires: libX11-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: dbus-devel +BuildRequires: libtool +BuildRequires: xorg-x11-util-macros +# NOTE: startx needs xauth in order to run, but that is not picked up +# automatically by rpm. (Bug #173684) +Requires: xorg-x11-xauth +# next two are for localuser.sh +Requires: coreutils +Requires: xorg-x11-server-utils + +%package session +Summary: Display manager support for ~/.xsession and ~/.Xclients +Group: User Interface/X + +%description +X.Org X11 X Window System xinit startup scripts + +%description session +Allows legacy ~/.xsession and ~/.Xclients files to be used from display managers + +%prep +%setup -q -n %{pkgname}-%{version} +%patch1 -p1 -b .client-session +%patch2 -p1 -b .unset +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +%build +autoreconf +%configure +make %{?_smp_mflags} + +%install +%make_install +install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compat.desktop + +# Install Red Hat custom xinitrc, etc. +{ + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit + + install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc-common + + for script in %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do + install -p -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/} + done + + install -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xmodmap + install -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xresources + + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d + install -p -m 755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/localuser.sh + + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/Xclients.d + + mkdir -p $RPM_BUILD_ROOT%{_libexecdir} + install -p -m 755 %{SOURCE19} $RPM_BUILD_ROOT%{_libexecdir} +} + +%files +%defattr(-,root,root,-) +%doc COPYING README ChangeLog +%{_bindir}/startx +%{_bindir}/xinit +%dir %{_sysconfdir}/X11/xinit +%{_sysconfdir}/X11/xinit/xinitrc +%{_sysconfdir}/X11/xinit/xinitrc-common +%config(noreplace) %{_sysconfdir}/X11/Xmodmap +%config(noreplace) %{_sysconfdir}/X11/Xresources +%dir %{_sysconfdir}/X11/xinit/Xclients.d +%{_sysconfdir}/X11/xinit/Xclients +%{_sysconfdir}/X11/xinit/Xsession +%dir %{_sysconfdir}/X11/xinit/xinitrc.d +%{_sysconfdir}/X11/xinit/xinitrc.d/* +%{_mandir}/man1/startx.1* +%{_mandir}/man1/xinit.1* + +%files session +%defattr(-, root, root,-) +%{_libexecdir}/xinit-compat +%{_datadir}/xsessions/xinit-compat.desktop + +%changelog +* Fri Aug 25 2017 Adam Jackson - 1.3.4-2 +- Make xinitrc-common tolerate set -u + +* Tue May 12 2015 Hans de Goede - 1.3.4-1 +- xinit 1.3.4 +- Drop xorg-x11-xinit-1.3.2-systemd-logind.patch (included upstream in 1.3.4) +- Add patches from Fedora to fix automatically finding a free display-number +- Resolves: rhbz#1194894 + +* Mon Sep 1 2014 Hans de Goede - 1.3.2-14 +- Xclients: only try to start gnome classic session if installed +- Resolves: rhbz#1078948 +- startx: Only specify vt argument automatically when run from a vt +- Resolves: rhbz#1083188 + +* Mon Mar 10 2014 Adam Jackson 1.3.2-13 +- Xclients: Fix --session argument for classic (#1074174) + +* Sat Feb 15 2014 Soren Sandmann - 1.3.2-12 +- XClients: Use classic mode for the GNOME session (#960520) + +* Wed Feb 12 2014 Adam Jackson 1.3.2-11.1 +- Mass rebuild + +* Mon Jan 6 2014 Soren Sandmann - 1.3.2-11 +- Rebuild + +* Fri Dec 27 2013 Daniel Mach - 1.3.2-10 +- Mass rebuild 2013-12-27 + +* Thu Dec 19 2013 Soren Sandmann - 1.3.2-9 +- Fix changelog (#1043626) + +* Fri Feb 15 2013 Fedora Release Engineering - 1.3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Oct 01 2012 Kevin Fenzi 1.3.2-7 +- Add patch to not switch tty's, so systemd-logind works right with startx. +- Partially Fixes bug #806491 + +* Sun Jul 22 2012 Fedora Release Engineering - 1.3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Apr 26 2012 Adam Jackson 1.3.2-5 +- xinit 1.3.2 + +* Thu Mar 08 2012 Adam Jackson 1.3.1-5 +- Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 1.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Nov 16 2011 Adam Jackson 1.3.1-2 +- Drop ConsoleKit integration, being removed in F17 + +* Mon Jul 25 2011 Matěj Cepl - 1.3.1-1 +- New upstream version. Patches updated. + +* Sat May 28 2011 Matěj Cepl - 1.0.9-21 +- xinitrc-common sources ~/.profile (Bug 551508) + +* Tue Feb 08 2011 Fedora Release Engineering - 1.0.9-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Sep 25 2010 Parag Nemade - 1.0.9-19 +- Merge-review cleanup (#226653) + +* Fri Aug 27 2010 Matěj Cepl - 1.0.9-18 +- Fix ownership of files. + +* Tue Aug 24 2010 Adam Tkac - 1.0.9-17 +- rebuild to ensure F14 has higher NVR than F13 + +* Wed Mar 24 2010 Matěj Cepl - 1.0.9-16 +- Remove explicit %%attr from _bindir + +* Thu Feb 04 2010 Matěj Cepl - 1.0.9-15 +- Add xinit-compat script + Patch from Rex Dieter, bug 540546 + Move xinit-compat script to -session subpackage. + +* Fri Jan 29 2010 Ville Skyttä - 1.0.9-14 +- 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 - 1.0.9-13 +- Fix SELinux labels on $errfile (fixes bug# 530419) + +* Mon Jul 27 2009 Fedora Release Engineering - 1.0.9-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 17 2009 Nalin Dahyabhai - 1.0.9-11 +- pull up ck-xinit-session changes for #502258 from from F11 branch + +* Sun Jun 14 2009 Matthias Clasen - 1.0.9-10 +- Don't own /etc/X11, since its already owned by filesystem + +* Mon Jun 08 2009 Matěj Cepl - 1.0.9-9 +- consider scripts in /etc/X11/xinit/Xclients.d/ as well +- add back scripts in Release -7 and -8 from F11 branch. + +* Fri May 22 2009 Nalin Dahyabhai 1.0.9-8 +- have ck-xinit-session tell the session bus to set + XDG_SESSION_COOKIE for services which it autostarts (#502258) +- add direct build dependency on dbus-devel, since we call it + directly now + +* Fri May 08 2009 Adam Jackson 1.0.9-7 +- xinit-1.0.9-unset.patch: Also unset XDG_SESSION_COOKIE in + startx. (#489999) + +* Wed Mar 11 2009 Adam Jackson 1.0.9-6 +- xinitrc-common: Load /etc/X11/Xresources with -nocpp + +* Wed Feb 25 2009 Adam Tkac 1.0.9-5 +- run ck-xinit-session for all sessions where the xdg cookie isn't already + set (#452156, patch from Patrice Dumas) +- add which Requires (#413041, patch from Patrice Dumas) + +* Mon Aug 25 2008 Matthias Clasen 1.0.9-4 +- Make the gnome session actually take the gnome case in the switch (#458694) +- Update patches +- Drop upstreamed patch + +* Mon Aug 11 2008 Jason L Tibbitts III - 1.0.9-3 +- Really fix license tag. + +* Tue Jul 15 2008 Adam Jackson 1.0.9-2 +- Fix license tag. + +* Wed Jun 11 2008 Adam Jackson 1.0.9-1 +- xinit 1.0.9 + +* Tue Apr 08 2008 Adam Jackson 1.0.7-7 +- Xsession: Don't start ssh-agent for gnome sessions anymore, gnome-keyring + acts as an agent now. (#441123) + +* Wed Mar 12 2008 Ray Strode 1.0.7-6 +- Add a new subpackage to add ~/.xsessions and ~/.Xclients + to session list + +* Mon Feb 11 2008 Adam Jackson 1.0.7-5 +- Xresources: s/don't/do not/, cpp is dumb. (#431704) + +* Mon Feb 11 2008 Adam Jackson 1.0.7-4 +- xinit-1.0.7-unset.patch: Unset various session-related environment + variables at the top of startx. (#431899) + +* Mon Feb 4 2008 Ray Strode 1.0.7-3 +- don't special case dbus-launch. dbus-x11 now installs + a script into /etc/X11/xinit/xinitrc.d. +- Drop the weird grep rule for extensions ending in .sh + when sourcing /etc/X11/xinit/xinitrc.d + +* Fri Oct 12 2007 Nalin Dahyabhai 1.0.7-2 +- Try opening the console-kit session after the user's UID has already + been granted access to the server by localuser.sh, so that console-kit-daemon + can connect and ask the server for information just by having switch to the + user's UID (#287941). + +* Mon Sep 24 2007 Adam Jackson 1.0.7-1 +- xinit 1.0.7 + +* Tue Aug 21 2007 Adam Jackson - 1.0.2-27 +- Rebuild for build id + +* Mon Aug 6 2007 Soren Sandmann 1.0.2-26 +- Bump release + +* Mon Aug 6 2007 Soren Sandmann 1.0.2-25 +- Fix typo: s/unask/umask/ - Bug 250882, Jan ONDREJ (ondrejj@salstar.sk) + +* Thu Aug 2 2007 Soren Sandmann 1.0.2-24 +- Fix bug 212167, CVE-2006-5214 + +* Sun Jul 29 2007 Soren Sandmann 1.0.2-23 +- Fix Xsession to run the login shell inside the setgid ssh-agent, rather + than the other way around. This preserves LD_LIBRARY_PRELOAD. + Patch from Stefan Becker, bug 164869. + +* Fri Jul 27 2007 Soren Sandmann 1.0.2-22 +- Remove xinput.sh. Bug 244963. + +* Mon May 21 2007 Adam Jackson 1.0.2-21 +- localuser.sh: Run silently. + +* Sun Apr 22 2007 Matthias Clasen 1.0.2-20 +- Don't install INSTALL + +* Thu Apr 19 2007 Warren Togami 1.0.2-19 +- disable SCIM by default in non-Asian languages #237054 + If you want to use SCIM, use im-chooser to enable it. + +* Mon Apr 02 2007 David Zeuthen 1.0.2-18 +- Man pages are now in section 1, not in section 1x + +* Mon Apr 02 2007 David Zeuthen 1.0.2-17 +- Also BR xorg-x11-util-macros since we autoreconf + +* Mon Apr 02 2007 David Zeuthen 1.0.2-16 +- Add ConsoleKit support (#233183) + +* Mon Nov 27 2006 Adam Jackson 1.0.2-15 +- Bump EVR to fix 6 to 7 updates. + +* Fri Nov 10 2006 Ray Strode - 1.0.2-14 +- start client in its own session with no controlling tty + (bug 214649) + +* Mon Oct 23 2006 Kristian Høgsberg - 1.0.2-13 +- Update Xsession to not use switchdesk for the hard coded kde and twm + cases. + +* Sun Oct 01 2006 Jesse Keating - 1.0.2-12 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Mon Sep 25 2006 Kristian Høgsberg - 1.0.2-11.fc6 +- Bump and rebuild. + +* Mon Sep 25 2006 Kristian Høgsberg - 1.0.2-10.fc6 +- Move hardcoded xsetroot background color to fallback cases (#205901). + +* Thu Aug 17 2006 Kristian Høgsberg - 1.0.2-9.fc6 +- Start ssh-agent for startx also (#169259). + +* Sat Jul 22 2006 Adam Jackson 1.0.2-8.fc6 +- Fix SourceN line for localuser.sh to not collide. + +* Fri Jul 21 2006 Adam Jackson 1.0.2-7.fc6 +- Added localuser.sh. + +* Wed Jul 19 2006 Mike A. Harris 1.0.2-6.fc6 +- Added fix to Xclients script, based on patch from bug (#190799) + +* Wed Jul 12 2006 Jesse Keating 1.0.2-5.1.fc6 +- rebuild + +* Wed Jul 05 2006 Mike A. Harris 1.0.2-5.fc6 +- Implemented changes to xinput.sh based on suggestions from (#194458) + +* Wed Jun 21 2006 Mike A. Harris 1.0.2-4 +- Added documentation to doc macro. + +* Tue Jun 20 2006 Mike A. Harris 1.0.2-3 +- Added xinit-1.0.2-setuid.diff to fix potential security issue (#196094) + +* Tue Jun 06 2006 Mike A. Harris 1.0.2-2 +- Added "BuildRequires: pkgconfig" for bug (#194187) + +* Thu Apr 27 2006 Adam Jackson 1.0.2-1 +- Update xinit to 1.0.2 + +* Thu Feb 16 2006 Mike A. Harris 1.0.1-2 +- Change Conflicts to Obsoletes for xorg-x11 and XFree86 (#181414) + +* Fri Feb 10 2006 Jesse Keating 1.0.1-1.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating 1.0.1-1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Wed Jan 18 2006 Mike A. Harris 1.0.1-1 +- Updated to xinit 1.0.1 from X11R7.0 + +* Fri Dec 16 2005 Mike A. Harris 1.0.0-1 +- Updated to xinit 1.0.0 from X11R7 RC4. +- Changed manpage dir from man1x to man1 to match upstream default. + +* Tue Nov 22 2005 Mike A. Harris 0.99.3-6 +- Add "Requires: xauth" for startx, to fix bug (#173684) + +* Mon Nov 14 2005 Jeremy Katz 0.99.3-5 +- Do not provide xinit anymore, gdm has been fixed and that breaks things + with the obsoletes + +* Sat Nov 12 2005 Mike A. Harris 0.99.3-4 +- Added Xsession script from xinitrc, as it is very similar codebase, which + shares "xinitrc-common" anyway, and all of the display managers use it. + +* Fri Nov 11 2005 Mike A. Harris 0.99.3-3 +- Updated to xinit 0.99.3 from X11R7 RC2. + +* Mon Nov 07 2005 Mike A. Harris 0.99.2-3 +- Added "Provides: xinitrc = 5.0.0-1" for temporary compatibility between + monolithic and modular X. This will be removed however for FC5. + +* Mon Oct 31 2005 Mike A. Harris 0.99.2-2 +- Import custom Red Hat xinit scripts from xinitrc package. +- Obsolete xinitrc package, as we include the scripts/configs here now. +- Fix all scripts/configs to avoid the now obsolete /usr/X11R6 prefix. + +* Mon Oct 31 2005 Mike A. Harris 0.99.2-1 +- Updated to xinit 0.99.2 from X11R7 RC1. +- Change manpage location to 'man1x' in file manifest. + +* Wed Oct 05 2005 Mike A. Harris 0.99.0-2 +- Use Fedora-Extras style BuildRoot tag. +- Update BuildRequires to use new library package names. +- Tidy up spec file a bit. + +* Wed Aug 24 2005 Mike A. Harris 0.99.0-1 +- Initial build.