From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SMEeg-0002NZ-SK for garchives@archives.gentoo.org; Mon, 23 Apr 2012 08:29:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A014BE086E; Mon, 23 Apr 2012 08:29:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5A8BCE086E for ; Mon, 23 Apr 2012 08:29:47 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98C9E1B4110 for ; Mon, 23 Apr 2012 08:29:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 6183DE5402 for ; Mon, 23 Apr 2012 08:29:45 +0000 (UTC) From: "Michael Weber" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Weber" Message-ID: <1335169776.e5c1d80d2f143ceb4927d19c1fe5e8690adfceb7.xmw@gentoo> Subject: [gentoo-commits] dev/xmw:master commit in: x11-misc/trivdm/, x11-misc/trivdm/files/ X-VCS-Repository: dev/xmw X-VCS-Files: x11-misc/trivdm/ChangeLog x11-misc/trivdm/Manifest x11-misc/trivdm/files/trivdm-0_p20120423 x11-misc/trivdm/trivdm-0_p20120423.ebuild X-VCS-Directories: x11-misc/trivdm/ x11-misc/trivdm/files/ X-VCS-Committer: xmw X-VCS-Committer-Name: Michael Weber X-VCS-Revision: e5c1d80d2f143ceb4927d19c1fe5e8690adfceb7 X-VCS-Branch: master Date: Mon, 23 Apr 2012 08:29:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4417a1e1-4cf6-4c5f-a1bf-60a560c65fba X-Archives-Hash: 2dda5298607e5b80afb7f3dc375da5cc commit: e5c1d80d2f143ceb4927d19c1fe5e8690adfceb7 Author: Michael Weber gentoo org> AuthorDate: Mon Apr 23 08:29:36 2012 +0000 Commit: Michael Weber gentoo org> CommitDate: Mon Apr 23 08:29:36 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/xmw.git;a=3Dco= mmit;h=3De5c1d80d x11-misc/trivdm: Version bump w/ uname -srp (Portage version: 2.1.10.49/git/Linux x86_64, signed Manifest commit with= key 62EEF090) --- x11-misc/trivdm/ChangeLog | 6 +++ x11-misc/trivdm/Manifest | 20 +++++++-- x11-misc/trivdm/files/trivdm-0_p20120423 | 63 +++++++++++++++++++++++= ++++++ x11-misc/trivdm/trivdm-0_p20120423.ebuild | 62 +++++++++++++++++++++++= +++++ 4 files changed, 147 insertions(+), 4 deletions(-) diff --git a/x11-misc/trivdm/ChangeLog b/x11-misc/trivdm/ChangeLog index 8b1375f..e20f793 100644 --- a/x11-misc/trivdm/ChangeLog +++ b/x11-misc/trivdm/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ =20 +*trivdm-0_p20120423 (23 Apr 2012) + + 23 Apr 2012; Michael Weber +files/trivdm-0_p20120423, + +trivdm-0_p20120423.ebuild: + Version bump w/ uname -srp + *trivdm-0_p20120321 (21 Mar 2012) =20 21 Mar 2012; Michael Weber -files/trivdm-0_p20110921, diff --git a/x11-misc/trivdm/Manifest b/x11-misc/trivdm/Manifest index 286719e..9c2f4c1 100644 --- a/x11-misc/trivdm/Manifest +++ b/x11-misc/trivdm/Manifest @@ -1,14 +1,26 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 =20 +- -----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX trivdm-0_p20120321 2538 RMD160 78335c20844ac5ff8e351a72a37356d5bfd99= b3a SHA1 10dbbedd2bf58e0ab06cf7f7fedfc38dcfe53e33 SHA256 64a4639913c9370e= 3f6fb28e244118da272b1382d3ad592d6fe9c8458c531abc +AUX trivdm-0_p20120423 2563 RMD160 c1189819a3855b7018c1b075036cc359de136= 31b SHA1 aea9affda4a0c33c72877733545c36b7907e2c32 SHA256 30be20dd063c4dac= 69c40d7c52c2e1b8b15c83cab601570086b97d657d5a97ca EBUILD trivdm-0_p20120321.ebuild 1716 RMD160 49eebd9c396245e593c826a5b11= 3f13e1ac23eae SHA1 96009deaa3d5cb184a40cc8ca0ef78e8d2fb852c SHA256 f3a860= 912c37d5d51520c0aa725dac6a993631992be535c268c51b20c7b753c4 -MISC ChangeLog 1008 RMD160 2d1950fb8d96b8a9e6ae581f5c406e60c2ccb0b4 SHA1= 04e9a8ef87908ea7397333bede0136a06ea192dc SHA256 d163bb1a825a656efdb37d5e= 6b89a37b24ba5e66b8dc804376affbd8f533716a +EBUILD trivdm-0_p20120423.ebuild 1716 RMD160 49eebd9c396245e593c826a5b11= 3f13e1ac23eae SHA1 96009deaa3d5cb184a40cc8ca0ef78e8d2fb852c SHA256 f3a860= 912c37d5d51520c0aa725dac6a993631992be535c268c51b20c7b753c4 +MISC ChangeLog 1176 RMD160 5154521635b8e442a78dd50cf63a716d8a240c0e SHA1= d75d8994c21b4ef6a47982dd9b4e730bef0a1378 SHA256 affedf1f45f2d68369ca210f= ad9f263a9b939525501c006700cb4b6fb55736b0 MISC metadata.xml 245 RMD160 6b03982a4d5f32d9fa6b9259ae36f9fcb07c8404 SH= A1 fb16c7b4c5ab071dd979f761b8bb075f5396b737 SHA256 375a1da02cd2c393ce2378= a73c1ce08134bc030b3bb378c6a4d6ca9cd5be1f8d +- -----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iF4EAREIAAYFAk+VEswACgkQknrdDGLu8JCktgD/eZxOrmWZgMTLMLMtMN5JwRYP +/GTZv2kMljzQkZr0iKoA/1TxV5DsYfhCrIa11bgfqlRXy9zRAf6nu3XgmVyEcg6h +=3DHRWF +- -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) =20 -iF4EAREIAAYFAk9qMskACgkQknrdDGLu8JAuvgEAmyUqT3+fCKwJyKh4xzmNkuln -UIQm3r1cCklTEU6Qh1cA/jAfVdg5agKe0Z/lc661IKE3zsd4fnHmpOOJA5FWrcr8 -=3DlYKQ +iF4EAREIAAYFAk+VEvAACgkQknrdDGLu8JBDhgD9EAvAT5W7/uIAKsw8TctOsoQ2 +bFcd99q4jEOCbqXPWckA/jCeTNPvZD3xdNeSwzoL4yedIiJzHPDkjMXnphnHZxMK +=3Dn6M2 -----END PGP SIGNATURE----- diff --git a/x11-misc/trivdm/files/trivdm-0_p20120423 b/x11-misc/trivdm/f= iles/trivdm-0_p20120423 new file mode 100644 index 0000000..2470cdd --- /dev/null +++ b/x11-misc/trivdm/files/trivdm-0_p20120423 @@ -0,0 +1,63 @@ +#!/bin/zsh +# trivdm by Christian Neukirchen, Michael Weber root@fs.lmu.de +# wget http://xmw.de/tmp/trivdm -O /usr/local/bin/trivdm +# c7:2345:respawn:/usr/bin/openvt -c 7 -f -w /usr/local/bin/trivdm +# symlinks to /usr/local/bin/{gdmflexiserver,w} and /etc/local.d/trivdm.= start +# groupadd --system trivdm ; useradd --system -g trivdm -G wheel trivdm=20 +# chmod u+s /usr/bin/chvt + +NAME=3D$(basename $0) ; USER=3Dtrivdm ; LANG=3DC +log() { echo "$@" | logger -s -t $NAME } +trap 'read -s -k -t 10 "?Press any key to continue ..." ; exit -1 ' ZERR +w() { ps haxo ruser,tty,comm | grep -v $USER | egrep -v "agetty|login$" = | \ + awk '{ if ( $3 =3D=3D "X" || $2 !=3D "?" ) print $1" "$2 }' | sort -= u | \ + awk '{ ORS=3D"" ; if ( u !=3D $1 ) { u=3D$1 ; print "\n"u"\t" } ; pr= int $2"," }' \ + | sed -e '1d ; s:,$:: ; $a\' } + +case $NAME in + gdmflexiserver) + [ "$1" =3D "-ls" ] && exec chvt 7 || exec /usr/bin/gdmflexiserver $@ ;; + trivdm.start) + chvt 7 ; exec setfont sun12x22 ;; + w) + w ; exec /usr/bin/w $@ ;; + *) + [ "$1" =3D "update" ] && exec wget http://xmw.de/tmp/$NAME -O $0 + [ "$(id -un)" =3D "$USER" ] || exec su -c $0 $USER ;; +esac + +clear +toilet --font mono9 --gay $(hostname) | awk \ + '{a[NR%8]=3Da[NR%8] $0} END {for (i=3D1;i<=3DNR;i++) print a[i];prin= t a[0]}' \ + | sed 's/ *$//g;/^$/d' +echo ; uname -srp ; echo +print -n "Usage: [/]|!halt|!reboot + in ~/.xinitrc (default), Gnome (fallback),\n\t" +find /etc/X11/Sessions -type f ! -name Gnome | \ + awk -F / 'BEGIN { ORS=3D", " } { print $5 }' | sed 's:, $:\n\n:' +print "connected users:\n$({ w | grep '' || print ''} | sed 's:^:\= t:')\n" +read "login?$(hostname)/tty7 x11 login: " + +case $login in + "" ) [ ] ;; + !* ) if [ -z "$(w)" ] ; then sudo -n "${login[2,-1]}" + else log "$login denied, users logged in!" ; fi ; [ ] ;; + */* ) xclient=3D$(find /etc/X11/Sessions -iname "*${login#*/}*" \ + -type f | sort | head -n 1) + [ -n "$xclient" ] || { log invalid session ; [ ] } + login=3D${login%/*} ;; + * ) xclient=3D"~/.xinitrc" ;; +esac + +id "$login" 2>&1 >/dev/null | sed "s|^id:|$NAME:|" +id "$login" 2>/dev/null >/dev/null=20 + +tty=3D$(ps h -eo ruser,tty,comm | grep "^$login " | awk '$3=3D=3D"X" {pr= int $2}') +[ "$tty" ] && { log switching to console $tty ; chvt "${tty#tty}" ; [ ] = } + +dpy=3D0 ; while [ -e /tmp/.X11-unix/X$dpy ] ; do (( dpy +=3D 1 )) done +su -l -c "export xclient=3D$xclient ;=20 + [ -x \"\$xclient\" ] || xclient=3D/etc/X11/Sessions/Gnome ;=20 + /usr/sbin/daemonize -a -e ~/.xorg-stderr -o ~/.xorg-stdout -c ~ \ + /usr/bin/startx \$xclient -- :$dpy -retro" $login=20 +[ ] diff --git a/x11-misc/trivdm/trivdm-0_p20120423.ebuild b/x11-misc/trivdm/= trivdm-0_p20120423.ebuild new file mode 100644 index 0000000..1021f2f --- /dev/null +++ b/x11-misc/trivdm/trivdm-0_p20120423.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D4 + +inherit eutils + +DESCRIPTION=3D"trivial display manager" +HOMEPAGE=3D"http://xmw.de/tmp/trivdm" +SRC_URI=3D"" + +LICENSE=3D"MIT" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" +IUSE=3D"" + +RDEPEND=3D"app-admin/sudo + app-misc/toilet + app-shells/zsh + sys-apps/daemonize + sys-apps/kbd" +DEPEND=3D"" + +S=3D${WORKDIR} + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 /usr/bin/${PN} -1 ${PN} +} + +src_install() { + newbin "${FILESDIR}"/${P} ${PN} || die + dodir /etc/env.d || die + echo "CONFIG_PROTECT=3D\"/usr/bin/${PN}\"" \ + > "${D}"/etc/env.d/90${PN} || die + dodir /etc/sudoers.d || die + echo "#${PN} ALL=3D(root) NOPASSWD: /sbin/reboot,/sbin/halt" \ + > "${D}"/etc/sudoers.d/${PN} || die + chmod 0440 "${D}"/etc/sudoers.d/${PN} || die +} + +pkg_preinst() { + sed -e "/^c7:/d" /etc/inittab > "${ED}"/etc/inittab || die + sed -n -e '/c7:/{s/^.*c7:/c7:/ ; s:/local/:/: ; p}' \ + "${ED}"/usr/bin/${PN} >> "${ED}"/etc/inittab || die + + elog "IMPORTANT NOTE" + elog "Your system needs 5 minor adjustments that" + elog "must not be made by Gentoo portage system:" + elog "1) enable xscreensaver->newlogin compartibility" + elog " ln -s ../../bin/${PN} /usr/local/bin/gdmflexiserver" + elog "2) tune w to display remote login sessions and daemonized X11" + elog " ln -s ../../bin/${PN} /usr/local/bin/w" + elog "3) set a fancy font on framebuffer console on startup" + elog " ln -s ../../usr/bin/${PN} /etc/local.d/${PN}.start" + elog "4) grant chvt to everyone" + elog " chmod u+s /usr/bin/chvt" + elog "5) updated /etc/inittab (etc-update, ...) and reload" + elog " kill -HUP 1" + elog "Install app-admin/sudo and review /etc/sudoers.d/${PN}" +}