Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/xmw:master commit in: x11-misc/trivdm/files/, x11-misc/trivdm/
Date: Wed, 24 Feb 2016 12:18:33
Message-Id: 1456316295.b6aae916567dd3d1a128b3dfc25a2a622f71e924.xmw@gentoo
1 commit: b6aae916567dd3d1a128b3dfc25a2a622f71e924
2 Author: Michael Weber <michael <AT> xmw <DOT> de>
3 AuthorDate: Wed Feb 24 12:18:15 2016 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 24 12:18:15 2016 +0000
6 URL: https://gitweb.gentoo.org/dev/xmw.git/commit/?id=b6aae916
7
8 x11-misc/trivdm: drop old versions
9
10 Package-Manager: portage-2.2.27
11 Manifest-Sign-Key: 0x71D573A82F434065
12
13 x11-misc/trivdm/files/trivdm-0_p20130707 | 63 ---------------------
14 .../{trivdm-0_p20150709 => trivdm-0_p20160224} | 0
15 x11-misc/trivdm/trivdm-0_p20130707-r1.ebuild | 64 ----------------------
16 x11-misc/trivdm/trivdm-0_p20150709.ebuild | 64 ----------------------
17 4 files changed, 191 deletions(-)
18
19 diff --git a/x11-misc/trivdm/files/trivdm-0_p20130707 b/x11-misc/trivdm/files/trivdm-0_p20130707
20 deleted file mode 100644
21 index 52eecad..0000000
22 --- a/x11-misc/trivdm/files/trivdm-0_p20130707
23 +++ /dev/null
24 @@ -1,63 +0,0 @@
25 -#!/bin/zsh
26 -# trivdm by Christian Neukirchen, Michael Weber root@××××××.de
27 -# wget http://xmw.de/tmp/trivdm -O /usr/local/bin/trivdm
28 -# c7:2345:respawn:/usr/bin/openvt -c 7 -f -w /usr/local/bin/trivdm
29 -# symlinks to /usr/local/bin/{gdmflexiserver,w} and /etc/local.d/trivdm.start
30 -# groupadd --system trivdm ; useradd --system -g trivdm -G wheel trivdm
31 -# chmod u+s /usr/bin/chvt
32 -
33 -NAME=$(basename $0) ; USER=trivdm ; LANG=C ; TTYNUM=7
34 -log() { echo "$@" | logger -s -t $NAME }
35 -trap 'read -s -k -t 10 "?Press any key to continue ..." ; exit -1 ' ZERR
36 -w() { ps haxo ruser,tty,comm | egrep -v "$USER|tty${TTYNUM}|agetty|login$" | \
37 - awk '{ if ( $3 == "X" || $2 != "?" ) print $1" "$2 }' | sort -u | \
38 - awk '{ ORS="" ; if ( u != $1 ) { u=$1 ; print "\n"u"\t" } ; print $2"," }' \
39 - | sed -e '1d ; s:,$:: ; $a\' }
40 -
41 -case $NAME in
42 - gdmflexiserver)
43 - [ "$1" = "-ls" ] && exec chvt 7 || exec /usr/bin/gdmflexiserver $@ ;;
44 - trivdm.start)
45 - chvt ${TTYNUM} ; exec setfont sun12x22 ;;
46 - w)
47 - w ; exec /usr/bin/w $@ ;;
48 - *)
49 - [ "$1" = "update" ] && exec wget http://xmw.de/tmp/$NAME -O $0
50 - [ "$(id -un)" = "$USER" ] || exec su -c $0 $USER ;;
51 -esac
52 -
53 -clear
54 -toilet --font mono9 --metal $(hostname) | awk \
55 - '{a[NR%8]=a[NR%8] $0} END {for (i=1;i<=NR;i++) print a[i];print a[0]}' \
56 - | sed 's/ *$//g;/^$/d' ; echo
57 -( uname -srp ; echo " (" ; date +%H:%M:%S ; echo ")" ) | tr -d '\n'
58 -print -n "\n\nUsage: <username>[/<session type>]|!halt|!reboot
59 - <session type> in ~/.xinitrc (default), Gnome (fallback),\n\t"
60 -find /etc/X11/Sessions -type f ! -name Gnome | \
61 - awk -F / 'BEGIN { ORS=", " } { print $5 }' | sed 's:, $:\n\n:'
62 -print "connected users:\n$({ w | grep '' || print '<none>'} | sed 's:^:\t:')\n"
63 -read "login?$(hostname)/tty7 x11 login: "
64 -
65 -case $login in
66 - "" ) [ ] ;;
67 - !* ) if [ -z "$(w)" ] ; then sudo -n "${login[2,-1]}"
68 - else log "$login denied, users logged in!" ; fi ; [ ] ;;
69 - */* ) xclient=$(find /etc/X11/Sessions -iname "*${login#*/}*" \
70 - -type f | sort | head -n 1)
71 - [ -n "$xclient" ] || { log invalid session ; [ ] }
72 - login=${login%/*} ;;
73 - * ) xclient="~/.xinitrc" ;;
74 -esac
75 -
76 -id "$login" 2>&1 >/dev/null | sed "s|^id:|$NAME:|"
77 -id "$login" 2>/dev/null >/dev/null
78 -
79 -tty=$(ps h -eo ruser,tty,comm | grep "^$login " | awk '$3=="X" {print $2}')
80 -[ "$tty" ] && { log switching to console $tty ; chvt "${tty#tty}" ; [ ] }
81 -
82 -dpy=0 ; while [ -e /tmp/.X11-unix/X$dpy ] ; do (( dpy += 1 )) done
83 -su -l -c "export xclient=$xclient ;
84 - [ -x \"\$xclient\" ] || xclient=/etc/X11/Sessions/Gnome ;
85 - /usr/sbin/daemonize -a -e ~/.xorg-stderr -o ~/.xorg-stdout -c ~ \
86 - /usr/bin/startx \$xclient -- :$dpy -retro" $login
87 -[ ]
88
89 diff --git a/x11-misc/trivdm/files/trivdm-0_p20150709 b/x11-misc/trivdm/files/trivdm-0_p20160224
90 similarity index 100%
91 rename from x11-misc/trivdm/files/trivdm-0_p20150709
92 rename to x11-misc/trivdm/files/trivdm-0_p20160224
93
94 diff --git a/x11-misc/trivdm/trivdm-0_p20130707-r1.ebuild b/x11-misc/trivdm/trivdm-0_p20130707-r1.ebuild
95 deleted file mode 100644
96 index e6060e3..0000000
97 --- a/x11-misc/trivdm/trivdm-0_p20130707-r1.ebuild
98 +++ /dev/null
99 @@ -1,64 +0,0 @@
100 -# Copyright 1999-2013 Gentoo Foundation
101 -# Distributed under the terms of the GNU General Public License v2
102 -# $Header: $
103 -
104 -EAPI=5
105 -
106 -inherit eutils readme.gentoo user
107 -
108 -DESCRIPTION="trivial display manager"
109 -HOMEPAGE="http://xmw.de/tmp/trivdm"
110 -SRC_URI=""
111 -
112 -LICENSE="MIT"
113 -SLOT="0"
114 -KEYWORDS="~amd64 ~x86"
115 -IUSE=""
116 -
117 -RDEPEND="app-admin/sudo
118 - app-misc/toilet
119 - app-shells/zsh
120 - sys-apps/daemonize
121 - sys-apps/kbd"
122 -DEPEND=""
123 -
124 -S=${WORKDIR}
125 -
126 -pkg_postinst() {
127 - enewgroup ${PN}
128 - enewuser ${PN} -1 /usr/bin/${PN} -1 ${PN}
129 -
130 - readme.gentoo_print_elog
131 -}
132 -
133 -src_install() {
134 - newbin "${FILESDIR}"/${P} ${PN}
135 -
136 - echo "CONFIG_PROTECT=\"/usr/bin/${PN}\"" > "${T}"/90${PN} || die
137 - doenvd "${T}"/90${PN}
138 -
139 - echo "#${PN} ALL=(root) NOPASSWD: /sbin/reboot,/sbin/halt" \
140 - > "${T}"/${PN} || die
141 - insopts -m0440
142 - insinto /etc/sudoers.d
143 - doins "${T}"/${PN}
144 -
145 - readme.gentoo_create_doc
146 -}
147 -
148 -DISABLE_AUTOFORMATTING=1
149 -DOC_CONTENTS="Your system needs 5 minor adjustments that
150 -must not be made by Gentoo portage system:
151 -1) enable xscreensaver->newlogin compartibility
152 - ln -s ../../bin/${PN} /usr/local/bin/gdmflexiserver
153 -2) tune w to display remote login sessions and daemonized X11
154 - ln -s ../../bin/${PN} /usr/local/bin/w
155 -3) set a fancy font on framebuffer console on startup
156 - ln -s ../../usr/bin/${PN} /etc/local.d/${PN}.start
157 -4) grant chvt to everyone
158 - chmod u+s /usr/bin/chvt
159 -5) updated /etc/inittab (etc-update, dispatch-conf, ...) and reload
160 - echo \"c7:2345:respawn:/usr/bin/openvt -c 7 -f -w /usr/bin/trivdm\" \
161 - > /etc/inittab
162 - kill -HUP 1
163 -Install app-admin/sudo and review /etc/sudoers.d/${PN}"
164
165 diff --git a/x11-misc/trivdm/trivdm-0_p20150709.ebuild b/x11-misc/trivdm/trivdm-0_p20150709.ebuild
166 deleted file mode 100644
167 index 563e111..0000000
168 --- a/x11-misc/trivdm/trivdm-0_p20150709.ebuild
169 +++ /dev/null
170 @@ -1,64 +0,0 @@
171 -# Copyright 1999-2015 Gentoo Foundation
172 -# Distributed under the terms of the GNU General Public License v2
173 -# $Header: $
174 -
175 -EAPI=5
176 -
177 -inherit eutils readme.gentoo user
178 -
179 -DESCRIPTION="trivial display manager"
180 -HOMEPAGE="http://xmw.de/tmp/trivdm"
181 -SRC_URI=""
182 -
183 -LICENSE="MIT"
184 -SLOT="0"
185 -KEYWORDS="~amd64 ~x86"
186 -IUSE=""
187 -
188 -RDEPEND="app-admin/sudo
189 - app-misc/toilet
190 - app-shells/zsh
191 - sys-apps/daemonize
192 - sys-apps/kbd"
193 -DEPEND=""
194 -
195 -S=${WORKDIR}
196 -
197 -pkg_postinst() {
198 - enewgroup ${PN}
199 - enewuser ${PN} -1 /usr/bin/${PN} -1 ${PN}
200 -
201 - readme.gentoo_print_elog
202 -}
203 -
204 -src_install() {
205 - newbin "${FILESDIR}"/${P} ${PN}
206 -
207 - echo "CONFIG_PROTECT=\"/usr/bin/${PN}\"" > "${T}"/90${PN} || die
208 - doenvd "${T}"/90${PN}
209 -
210 - echo "#${PN} ALL=(root) NOPASSWD: /sbin/reboot,/sbin/halt" \
211 - > "${T}"/${PN} || die
212 - insopts -m0440
213 - insinto /etc/sudoers.d
214 - doins "${T}"/${PN}
215 -
216 - readme.gentoo_create_doc
217 -}
218 -
219 -DISABLE_AUTOFORMATTING=1
220 -DOC_CONTENTS="Your system needs 5 minor adjustments that
221 -must not be made by Gentoo portage system:
222 -1) enable xscreensaver->newlogin compartibility
223 - ln -s ../../bin/${PN} /usr/local/bin/gdmflexiserver
224 -2) tune w to display remote login sessions and daemonized X11
225 - ln -s ../../bin/${PN} /usr/local/bin/w
226 -3) set a fancy font on framebuffer console on startup
227 - ln -s ../../usr/bin/${PN} /etc/local.d/${PN}.start
228 -4) grant chvt to everyone
229 - chmod u+s /usr/bin/chvt
230 -5) updated /etc/inittab (etc-update, dispatch-conf, ...) and reload
231 - echo \"c7:2345:respawn:/usr/bin/openvt -c 7 -f -w /usr/bin/trivdm\" \
232 - > /etc/inittab
233 - kill -HUP 1
234 -Install app-admin/sudo and review /etc/sudoers.d/${PN}"