summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <spyderous@gentoo.org>2005-08-16 02:53:03 +0000
committerDonnie Berkholz <spyderous@gentoo.org>2005-08-16 02:53:03 +0000
commitc0760f9e55e938651e8dfd57ba528768db9c52e3 (patch)
tree31eb1fff22301767a59deb05085c49cce354a53f /x11-apps
parentAdd x11-themes/gentoo-xcursors to modular X mask. (diff)
downloadgentoo-2-c0760f9e55e938651e8dfd57ba528768db9c52e3.tar.gz
gentoo-2-c0760f9e55e938651e8dfd57ba528768db9c52e3.tar.bz2
gentoo-2-c0760f9e55e938651e8dfd57ba528768db9c52e3.zip
Install all the files monolith did, including init script. (#97897) Remove pam_console reference in pam file.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'x11-apps')
-rw-r--r--x11-apps/xdm/ChangeLog9
-rw-r--r--x11-apps/xdm/files/Xsession73
-rw-r--r--x11-apps/xdm/files/digest-xdm-0.99.0-r11
-rw-r--r--x11-apps/xdm/files/xdm.pamd6
-rwxr-xr-xx11-apps/xdm/files/xdm.start150
-rw-r--r--x11-apps/xdm/xdm-0.99.0-r1.ebuild35
6 files changed, 273 insertions, 1 deletions
diff --git a/x11-apps/xdm/ChangeLog b/x11-apps/xdm/ChangeLog
index 91d3ab153e6e..56cb03b0954c 100644
--- a/x11-apps/xdm/ChangeLog
+++ b/x11-apps/xdm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for x11-apps/xdm
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-apps/xdm/ChangeLog,v 1.2 2005/08/08 20:14:19 fmccor Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xdm/ChangeLog,v 1.3 2005/08/16 02:53:03 spyderous Exp $
+
+*xdm-0.99.0-r1 (16 Aug 2005)
+
+ 16 Aug 2005; Donnie Berkholz <spyderous@gentoo.org>; +files/Xsession,
+ +files/xdm.pamd, +files/xdm.start, +xdm-0.99.0-r1.ebuild:
+ Install all the files monolith did, including init script. (#97897) Remove
+ pam_console reference in pam file.
08 Aug 2005; Ferris McCormick <fmccor@gentoo.org> xdm-0.99.0.ebuild:
Add ~sparc keyword (Modular X testing).
diff --git a/x11-apps/xdm/files/Xsession b/x11-apps/xdm/files/Xsession
new file mode 100644
index 000000000000..ffeef4c87420
--- /dev/null
+++ b/x11-apps/xdm/files/Xsession
@@ -0,0 +1,73 @@
+#!/bin/bash --login
+#
+# $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $
+#
+#
+#
+#
+# $XFree86: xc/programs/xdm/config/Xsession,v 1.3 2001/01/17 23:45:24 dawes Exp $
+
+# redirect errors to a file in user's home directory if we can
+for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
+do
+ if ( cp /dev/null "$errfile" 2> /dev/null )
+ then
+ chmod 600 "$errfile"
+ exec > "$errfile" 2>&1
+ break
+ fi
+done
+
+# handle KDM
+if [ -n "$1" ]; then
+ export XSESSION="$1"
+fi
+
+xinitdir=/usr/X11R6/lib/X11/xinit
+startup=$HOME/.xsession
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=$xinitdir/.Xresources
+sysmodmap=$xinitdir/.Xmodmap
+
+# First run the system default. Because KDE uses this
+# to switch sessions, we MUST first check the system
+# default, and then ~/.xsession. If the user Do not
+# want this, he should override XSESSION, or at least
+# clear it.
+if [ -n "`/etc/X11/chooser.sh`" ]; then
+ exec "`/etc/X11/chooser.sh`"
+# If not defined, try the user's ~/.xsession
+elif [ -s "$startup" ]; then
+
+ # merge in defaults and keymaps
+
+ if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+ fi
+
+ if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+ fi
+
+ if [ -f $userresources ]; then
+ xrdb -merge $userresources
+ fi
+
+ if [ -f $usermodmap ]; then
+ xmodmap $usermodmap
+ fi
+
+ if [ -x "$startup" ]; then
+ exec "$startup"
+ else
+ exec /bin/sh "$startup"
+ fi
+# Lastly, xsm as failsafe
+else
+ if [ -r "$userresources" ]; then
+ xrdb -load "$userresources"
+ fi
+ exec xsm
+fi
+
diff --git a/x11-apps/xdm/files/digest-xdm-0.99.0-r1 b/x11-apps/xdm/files/digest-xdm-0.99.0-r1
new file mode 100644
index 000000000000..dd77dcd3bbcb
--- /dev/null
+++ b/x11-apps/xdm/files/digest-xdm-0.99.0-r1
@@ -0,0 +1 @@
+MD5 6946ed1753f8a0f5ddc8a94174f0f8ef xdm-0.99.0.tar.bz2 169521
diff --git a/x11-apps/xdm/files/xdm.pamd b/x11-apps/xdm/files/xdm.pamd
new file mode 100644
index 000000000000..339f4162bb38
--- /dev/null
+++ b/x11-apps/xdm/files/xdm.pamd
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth required pam_stack.so service=system-auth
+auth required pam_nologin.so
+account required pam_stack.so service=system-auth
+password required pam_stack.so service=system-auth
+session required pam_stack.so service=system-auth
diff --git a/x11-apps/xdm/files/xdm.start b/x11-apps/xdm/files/xdm.start
new file mode 100755
index 000000000000..ab8eee1167cf
--- /dev/null
+++ b/x11-apps/xdm/files/xdm.start
@@ -0,0 +1,150 @@
+#!/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/xdm/files/xdm.start,v 1.1 2005/08/16 02:53:03 spyderous Exp $
+
+# This is here to serve as a note to myself, and future developers.
+#
+# Any Display manager (gdm,kdm,xdm) have 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 runleve, as was
+# done previously.
+#
+# This script then just calls "tellinit 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() {
+ use xfs hotplug
+}
+
+setup_dm() {
+ source /etc/profile.env
+ export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
+
+ local MY_XDM="$(echo ${DISPLAYMANAGER} | awk '{ print tolower($1) }')"
+ case "${MY_XDM}" in
+ kdm|kde|kde2|kde3)
+ EXE="$(which kdm)"
+ ;;
+ entrance*)
+ EXE="$(which entranced)"
+ ;;
+ gdm|gnome)
+ EXE=/usr/bin/gdm
+ ;;
+ wdm)
+ EXE=/usr/bin/wdm
+ ;;
+ *)
+ EXE=
+ for x in /usr/bin /usr/X11R6/bin
+ do
+ # Fix #65586, where MY_XDM is empty so EXE=somedir
+ [ -x "${x}/${MY_XDM}" -a -f "${x}/${MY_XDM}" ] \
+ && EXE="${x}/${MY_XDM}"
+ done
+ [ -z "${EXE}" ] && EXE="/usr/X11R6/bin/xdm"
+ ;;
+ esac
+
+ test ! -x "${EXE}" && EXE=/usr/X11R6/bin/xdm
+
+ SERVICE="${EXE##*/}"
+}
+
+cmdline_opt() {
+ if [[ "$#" -ne 1 ]]; then
+ return 1
+ fi
+
+ for opt in $(</proc/cmdline); do
+ case ${opt} in
+ ${1}) eval ${1}="true" ;;
+ esac
+ done
+}
+
+nox() {
+ # Don't start X if we were passed 'nox' at boot (#83680)
+ cmdline_opt nox
+
+ if [[ "$?" -ne 0 ]]; then
+ return 1
+ fi
+
+ if [[ -n "${nox}" ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+start() {
+ setup_dm
+
+ if nox; then
+ einfo "Skipping ${EXE}, received 'nox'"
+ else
+ ebegin "Setting up ${SERVICE}"
+ #save the prefered DM
+ save_options "service" "${EXE}"
+ #tell init to run /etc/X11/startDM.sh after current
+ #runlevel is finished (should *not* be in the "boot"
+ # runlevel).
+ /sbin/telinit a &>/dev/null
+ eend 0
+ fi
+
+}
+
+stop() {
+ local retval=0
+ local curvt="$(fgconsole)"
+ local myexe="$(get_options "service")"
+ local myservice="${myexe##*/}"
+
+ ebegin "Stopping ${myservice}"
+ rm -f ${svcdir}/options/xdm/service
+
+ if [ "$(ps -A | grep -e "${myservice}")" ]
+ then
+ start-stop-daemon --stop --quiet \
+ --exe ${myexe} &>/dev/null
+
+ retval=$?
+ fi
+
+ #switch back to original vt
+ chvt "${curvt}" &>/dev/null
+ eend ${retval} "Error stopping ${myservice}."
+
+ return ${retval}
+}
+
+
+# vim:ts=4
diff --git a/x11-apps/xdm/xdm-0.99.0-r1.ebuild b/x11-apps/xdm/xdm-0.99.0-r1.ebuild
new file mode 100644
index 000000000000..636872653152
--- /dev/null
+++ b/x11-apps/xdm/xdm-0.99.0-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xdm/xdm-0.99.0-r1.ebuild,v 1.1 2005/08/16 02:53:03 spyderous Exp $
+
+# Must be before x-modular eclass is inherited
+#SNAPSHOT="yes"
+
+inherit x-modular
+
+DESCRIPTION="X.Org xdm application"
+KEYWORDS="~sparc ~x86"
+IUSE="xprint ipv6 pam"
+RDEPEND="x11-libs/libXdmcp
+ x11-libs/libXaw"
+DEPEND="${RDEPEND}
+ x11-proto/xproto"
+
+CONFIGURE_OPTIONS="$(use_enable xprint)
+ $(use_enable ipv6)
+ $(use_with pam)"
+
+pkg_setup() {
+ if use xprint && ! built_with_use x11-libs/libXaw xprint; then
+ die "Build x11-libs/libXaw with USE=xprint."
+ fi
+}
+
+src_install() {
+ x-modular_src_install
+ exeinto /etc/X11/xdm
+ doexe ${FILESDIR}/Xsession
+ newinitd ${FILESDIR}/xdm.start xdm
+ insinto /etc/pam.d
+ newins ${FILESDIR}/xdm.pamd xdm
+}