summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2008-05-06 08:16:56 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2008-05-06 08:16:56 +0000
commit0c4aa4af111a94f55c91190cda134cdfa09eb408 (patch)
tree46f2595df60bc635d8cc83f45b9317a07c897a42 /x11-apps
parentmake fdo-mime.eclass ready for eclass-manpages, bug #211223, thank mren for r... (diff)
downloadhistorical-0c4aa4af111a94f55c91190cda134cdfa09eb408.tar.gz
historical-0c4aa4af111a94f55c91190cda134cdfa09eb408.tar.bz2
historical-0c4aa4af111a94f55c91190cda134cdfa09eb408.zip
Fix xdm init-script to be run after lircmd instead of just lircd to be able to use virtual lirc mouse device, Bug #180163.
Package-Manager: portage-2.1.5_rc6
Diffstat (limited to 'x11-apps')
-rw-r--r--x11-apps/xinit/ChangeLog9
-rw-r--r--x11-apps/xinit/Manifest10
-rwxr-xr-xx11-apps/xinit/files/xdm.initd-2204
-rw-r--r--x11-apps/xinit/xinit-1.0.8-r3.ebuild63
4 files changed, 281 insertions, 5 deletions
diff --git a/x11-apps/xinit/ChangeLog b/x11-apps/xinit/ChangeLog
index 03b07632021b..272b07c6d048 100644
--- a/x11-apps/xinit/ChangeLog
+++ b/x11-apps/xinit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for x11-apps/xinit
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-apps/xinit/ChangeLog,v 1.115 2008/04/09 02:08:44 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xinit/ChangeLog,v 1.116 2008/05/06 08:16:56 zzam Exp $
+
+*xinit-1.0.8-r3 (06 May 2008)
+
+ 06 May 2008; Matthias Schwarzott <zzam@gentoo.org> +files/xdm.initd-2,
+ +xinit-1.0.8-r3.ebuild:
+ Fix xdm init-script to be run after lircmd instead of just lircd to be
+ able to use virtual lirc mouse device, Bug #180163.
*xinit-1.0.8-r2 (09 Apr 2008)
diff --git a/x11-apps/xinit/Manifest b/x11-apps/xinit/Manifest
index 933185b8ab93..111630b360e4 100644
--- a/x11-apps/xinit/Manifest
+++ b/x11-apps/xinit/Manifest
@@ -9,6 +9,7 @@ AUX nolisten-tcp-and-black-background.patch 381 RMD160 f767995059b6b3826e662ad71
AUX startDM.sh 858 RMD160 d7ef866ddd09e3d4117b3363aaa6382a9b8cd153 SHA1 1b826dfb4d5a184d6d7cc1995d685b55c9c188ac SHA256 a7aca1e37e5b8fecb49aa96c4e2850547a47e154edabcdbd1cfcb8ab49337549
AUX xdm.confd-1 716 RMD160 e45d7b96d8f12a8d8156d120e9e16514aa38c2ab SHA1 db2612f9c45206ae04c77f14bf3bfe02896eab24 SHA256 2bb4db1bef1c5d16b80ac914447f99bf71bf11d430ac93cc3c8b38fae3bccb72
AUX xdm.initd-1 5207 RMD160 c95d2df2feff76770ece8f0ec86e9bb53d76a257 SHA1 faefdeeca446fff29da2f4e546a3b0bcc94e6372 SHA256 891c7b060c6b47c135b32ffd918a0b6add5e9c7c03893ee0c1d56b64bd7987ea
+AUX xdm.initd-2 5210 RMD160 d553381a62b0f84694794257b532a01a90319a8c SHA1 47a99e43ffeeb7cd8a2c8a2d9bb240b40731d4ea SHA256 0e7e0bbb5de5ebc0a94ca7d8da61e54caf68ed2c34e523e698b959ee47c3d837
AUX xdm.start 3974 RMD160 67f3b69fc9c006146999271935e1ae06d093130a SHA1 12763e84e31632c0421159e8feca2f9855966b7b SHA256 151b697f62e335850118a5d7d113d83fb37f2a75407985cd1e433de93eb55ded
AUX xinit-1.0.4-console-kit.patch 4956 RMD160 286437f158d6a9ec588377b01d2b336d391bff37 SHA1 8d1ef61ec11bdf0308474560f0ed5156a6714d5f SHA256 65fd0800ccdecca979c8943755c5656fd022b54a160b32489ad95495521949e4
AUX xinitrc 1059 RMD160 3f3ae64f6056055d3d42e471a5dd4263aa1b66db SHA1 edd6919448086273a73b1de897afe93e01b046c8 SHA256 53871c9c3198b38d73b08da3837d1331240a5d45e987a5b8135e7116c02d8eff
@@ -21,13 +22,14 @@ EBUILD xinit-1.0.4.ebuild 1336 RMD160 4253fec3c534dbc5eabed0f3247de7e5f9b10cec S
EBUILD xinit-1.0.5-r1.ebuild 1729 RMD160 d7e9031746b070bf3366d94fb585d0f84b7e7d18 SHA1 45d68f717dd260b504fa9c96214b260175a3229c SHA256 dfab86c85357be16beb2a9bbd5616ab1ba7fdf9bbd9e5fbf6fd5358a22d202b8
EBUILD xinit-1.0.5-r2.ebuild 1743 RMD160 fce35ecc6a8814d9778110827b29321a2ef19261 SHA1 a2a28809ad66a9db931b4a3b65f2b503f5bff22f SHA256 d0d94c8a6b98bf1278294261694d9657e305fe773ba81710b98c6fcfef3cdebb
EBUILD xinit-1.0.8-r2.ebuild 1791 RMD160 f2051886d03dcd5a0b41a5590f34f5471b56db37 SHA1 c231b0607108e9c7d964d49c180a58bfff3ad209 SHA256 1ac009b9b8fc2e7159e578c5baaa98d1e768c4547d5d5e799b07e35b4779221b
+EBUILD xinit-1.0.8-r3.ebuild 1786 RMD160 8c4f66a7ab79c51ff552a07d77d000c4d7b00f87 SHA1 13d803aced239a00ab1f76d2353f55dc77eb1225 SHA256 49a2acf55e3c6c7034f2ed4d4bc14580006b3618e392d33116d6046e01299b34
EBUILD xinit-1.0.8.ebuild 1739 RMD160 6c7fb9fc66ae8930f5e58db44eb081ef2c372565 SHA1 5de2601dbce6f5560b3cae7050dbe95f633d9ffe SHA256 28501ccb5b255dd3e1e61fbe3cc0bdcc6b7d15907b8f82943fee9f6d7a939677
-MISC ChangeLog 18164 RMD160 8d0cd4a55037869c1395280e1e95a14f4932770d SHA1 065a658498d143a261b4cd7c2bb2d345646f696f SHA256 77665bee7a66239f1cd634360e322e49777858860cec8fc40d4878998f9f8fbc
+MISC ChangeLog 18417 RMD160 934a7eb4b6e1942eb5fa898759e8f9dfa333aa8b SHA1 8267135e32d4d4170d12e3b4398a8f9b25bc7997 SHA256 703a4ab63345cb2235b33fde74062fa172cca7aa12f4b44e44bae4903e1dbe5e
MISC metadata.xml 156 RMD160 c1274bdccf57603d580de0075ba07a35b7509560 SHA1 6f78f604e3d079d39189b40aaaa1ddb06182ad91 SHA256 5101ab0d4cc8c7125eea733c44e86962769bd77acaf53b69223b9cadcdd29055
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEYEARECAAYFAkf8JRcACgkQiqiDRvmkBmJmjACeNBxNE9pUjkZ9oxRCV4orr2hk
-fToAoINRT5AY8Si8ggeNl3D0lCebdlGm
-=P/qZ
+iEYEARECAAYFAkggFAEACgkQt2vP6XvVdOdiIwCdHFXNfwAMzeC6SBycdwiWLYMe
+lQQAnRcSwMZwS4XlvkCm07pPK0qq3M4j
+=UPjV
-----END PGP SIGNATURE-----
diff --git a/x11-apps/xinit/files/xdm.initd-2 b/x11-apps/xinit/files/xdm.initd-2
new file mode 100755
index 000000000000..5bbee1243aec
--- /dev/null
+++ b/x11-apps/xinit/files/xdm.initd-2
@@ -0,0 +1,204 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xinit/files/xdm.initd-2,v 1.1 2008/05/06 08:16:56 zzam Exp $
+
+# This is here to serve as a note to myself, and future developers.
+#
+# Any Display manager (gdm,kdm,xdm) has the following problem: if
+# it is started before any getty, and no vt is specified, it will
+# usually run on vt2. When the getty on vt2 then starts, and the
+# DM is already started, the getty will take control of the keyboard,
+# leaving us with a "dead" keyboard.
+#
+# Resolution: add the following line to /etc/inittab
+#
+# x:a:once:/etc/X11/startDM.sh
+#
+# and have /etc/X11/startDM.sh start the DM in daemon mode if
+# a lock is present (with the info of what DM should be started),
+# else just fall through.
+#
+# How this basically works, is the "a" runlevel is a additional
+# runlevel that you can use to fork processes with init, but the
+# runlevel never gets changed to this runlevel. Along with the "a"
+# runlevel, the "once" key word means that startDM.sh will only be
+# run when we specify it to run, thus eliminating respawning
+# startDM.sh when "xdm" is not added to the default runlevel, as was
+# done previously.
+#
+# This script then just calls "telinit a", and init will run
+# /etc/X11/startDM.sh after the current runlevel completes (this
+# script should only be added to the actual runlevel the user is
+# using).
+#
+# Martin Schlemmer
+# aka Azarah
+# 04 March 2002
+
+
+# Start X Font Server before X
+depend() {
+ need localmount
+
+ # this should start as early as possible
+ # we can't do 'before *' as that breaks it
+ # (#139824) Start after ypbind and autofs for network authentication
+ # (#145219 #180163) Could use lirc mouse as input device
+ # (#70689 comment #92) Start after consolefont to avoid display corruption
+ after bootmisc consolefont modules netmount
+ after readahead-list ypbind autofs openvpn gpm lircmd
+ before alsasound
+
+ # Start before X
+ use acpid consolekit hald xfs
+}
+
+setup_dm() {
+ local MY_XDM="$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')"
+
+ # Load our root path from profile.env
+ # Needed for kdm
+ PATH="${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")"
+
+ case "${MY_XDM}" in
+ kdm|kde|kde2|kde3)
+ EXE="$(which kdm)"
+ # kdm takes too long to create a pidfile for baselayout-2
+ #PIDFILE=/var/run/kdm.pid
+ PIDFILE=
+ ;;
+ kdm-*)
+ EXE="/usr/kde/${MY_XDM#kdm-}/bin/kdm"
+ PIDFILE=
+ ;;
+ entrance*)
+ EXE=/usr/sbin/entranced
+ PIDFILE=/var/lib/entranced.pid
+ ;;
+ gdm|gnome)
+ EXE=/usr/bin/gdm
+ [ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary
+ PIDFILE=/var/run/gdm.pid
+ ;;
+ wdm)
+ EXE=/usr/bin/wdm
+ PIDFILE=
+ ;;
+ *)
+ EXE=
+ # Fix #65586, where MY_XDM is empty so EXE=somedir
+ [ -x "/usr/bin/${MY_XDM}" ] && [ -f "/usr/bin/${MY_XDM}" ] \
+ && EXE="/usr/bin/${MY_XDM}"
+ if [ -z "${EXE}" ] ; then
+ EXE=/usr/bin/xdm
+ PIDFILE=/var/run/xdm.pid
+ fi
+ ;;
+ esac
+
+ if ! [ -x "${EXE}" ] ; then
+ EXE=/usr/bin/xdm
+ PIDFILE=/var/run/xdm.pid
+ fi
+}
+
+cmdline_opt() {
+ if [ $# -ne 1 ] || ! [ -r /proc/cmdline ]; then
+ return 1
+ fi
+
+ for opt in $(cat /proc/cmdline) ; do
+ [ "${opt}" = "${1}" ] && return 0
+ done
+
+ return 1
+}
+
+# Check to see if something is defined on our VT
+vtstatic() {
+ if [ -e /etc/inittab ] ; then
+ grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab
+ elif [ -e /etc/ttys ] ; then
+ grep -q "^ttyv$(($1 - 1))" /etc/ttys
+ else
+ return 1
+ fi
+}
+
+start() {
+ local EXE= NAME= PIDFILE=
+ setup_dm
+
+ if cmdline_opt nox ; then
+ einfo "Skipping ${EXE}, received 'nox'"
+ return 0
+ fi
+
+ ebegin "Setting up ${EXE##*/}"
+ #save the prefered DM
+ save_options "service" "${EXE}"
+ save_options "name" "${NAME}"
+ save_options "pidfile" "${PIDFILE}"
+
+ if [ -n "${CHECKVT-y}" ] ; then
+ if vtstatic "${CHECKVT:-7}" ; then
+ if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ] ; then
+ ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later"
+ telinit a >/dev/null 2>/dev/null
+ return 0
+ else
+ eerror "Something is already defined on VT ${CHECKVT:-7}, not starting"
+ return 1
+ fi
+ fi
+ fi
+
+ /etc/X11/startDM.sh
+ eend 0
+}
+
+stop() {
+ local retval=0
+ local curvt=
+ if [ -t 0 ] ; then
+ if type fgconsole >/dev/null 2>/dev/null ; then
+ curvt="$(fgconsole 2>/dev/null)"
+ else
+ curvt="$(tty)"
+ case "${curvt}" in
+ /dev/ttyv[0-9]*) curvt="${curvt#/dev/ttyv*}" ;;
+ *) curvt= ;;
+ esac
+ fi
+ fi
+ local myexe="$(get_options "service")"
+ local myname="$(get_options "name")"
+ local mypidfile="$(get_options "pidfile")"
+ local myservice=${myexe##*/}
+
+ [ -z "${myexe}" ] && return 0
+
+ ebegin "Stopping ${myservice}"
+
+ if start-stop-daemon --quiet --test --stop --exec "${myexe}" ; then
+ start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \
+ ${mypidfile:+--pidfile} ${mypidfile} \
+ ${myname:+--name} ${myname}
+ retval=$?
+ fi
+
+ # switch back to original vt
+ if [ -n "${curvt}" ] ; then
+ if type chvt >/dev/null 2>/dev/null ; then
+ chvt "${curvt}"
+ else
+ vidcontrol -s "$((${curvt} + 1))"
+ fi
+ fi
+ eend ${retval} "Error stopping ${myservice}"
+
+ return ${retval}
+}
+
+# vim: set ts=4 :
diff --git a/x11-apps/xinit/xinit-1.0.8-r3.ebuild b/x11-apps/xinit/xinit-1.0.8-r3.ebuild
new file mode 100644
index 000000000000..c10c27fee022
--- /dev/null
+++ b/x11-apps/xinit/xinit-1.0.8-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xinit/xinit-1.0.8-r3.ebuild,v 1.1 2008/05/06 08:16:56 zzam Exp $
+
+# Must be before x-modular eclass is inherited
+# This is enabled due to modified Makefile.am from the patches
+SNAPSHOT="yes"
+
+inherit x-modular pam
+
+DESCRIPTION="X Window System initializer"
+
+LICENSE="${LICENSE} GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="hal minimal pam"
+
+RDEPEND="x11-apps/xauth
+ x11-libs/libX11
+ hal? ( sys-auth/consolekit )"
+DEPEND="${RDEPEND}"
+PDEPEND="!minimal? ( x11-wm/twm
+ x11-apps/xclock
+ x11-apps/xrdb
+ x11-apps/xsm
+ x11-terms/xterm )"
+
+PATCHES="${FILESDIR}/nolisten-tcp-and-black-background.patch
+ ${FILESDIR}/gentoo-startx-customization-1.0.8.patch
+ ${FILESDIR}/xinit-1.0.4-console-kit.patch"
+
+CONFIGURE_OPTIONS="$(use_with hal consolekit)"
+
+pkg_setup() {
+ if use hal; then
+ if ! built_with_use sys-apps/dbus X ; then
+ eerror "You MUST build sys-apps/dbus with the X USE flag enabled."
+ die "You MUST build sys-apps/dbus with the X USE flag enabled."
+ fi
+ fi
+}
+
+src_unpack() {
+ x-modular_unpack_source
+ x-modular_patch_source
+
+ sed -i -e "s:^XINITDIR.*:XINITDIR = \$(sysconfdir)/X11/xinit:g" "${S}/Makefile.am"
+
+ x-modular_reconf_source
+}
+
+src_install() {
+ x-modular_src_install
+ exeinto /etc/X11
+ doexe "${FILESDIR}"/chooser.sh "${FILESDIR}"/startDM.sh || die
+ exeinto /etc/X11/Sessions
+ doexe "${FILESDIR}"/Xsession || die
+ exeinto /etc/X11/xinit
+ doexe "${FILESDIR}"/xinitrc || die
+ newinitd "${FILESDIR}"/xdm.initd-2 xdm
+ newconfd "${FILESDIR}"/xdm.confd-1 xdm
+ newpamd "${FILESDIR}"/xserver.pamd xserver
+ newenvd "${FILESDIR}"/xsession.env.d 90xsession
+}