diff options
author | Raúl Porcel <armin76@gentoo.org> | 2007-04-12 21:00:48 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2007-04-12 21:00:48 +0000 |
commit | d715cba9418094bee420aa9a4d0f2ef13af1a590 (patch) | |
tree | a83812f3e389df022ba9ae7f29d17506d15afb06 /net-misc/tightvnc | |
parent | Stable for HPPA (bug #174216). (diff) | |
download | gentoo-2-d715cba9418094bee420aa9a4d0f2ef13af1a590.tar.gz gentoo-2-d715cba9418094bee420aa9a4d0f2ef13af1a590.tar.bz2 gentoo-2-d715cba9418094bee420aa9a4d0f2ef13af1a590.zip |
Add init scripts, bug 39023 and remove vulnerable version
(Portage version: 2.1.2.3)
Diffstat (limited to 'net-misc/tightvnc')
-rw-r--r-- | net-misc/tightvnc/ChangeLog | 7 | ||||
-rw-r--r-- | net-misc/tightvnc/files/digest-tightvnc-1.3.8 | 3 | ||||
-rw-r--r-- | net-misc/tightvnc/files/tightvnc.confd | 9 | ||||
-rw-r--r-- | net-misc/tightvnc/files/tightvnc.initd | 57 | ||||
-rw-r--r-- | net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild | 7 | ||||
-rw-r--r-- | net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild | 7 | ||||
-rw-r--r-- | net-misc/tightvnc/tightvnc-1.3.8.ebuild | 107 |
7 files changed, 82 insertions, 115 deletions
diff --git a/net-misc/tightvnc/ChangeLog b/net-misc/tightvnc/ChangeLog index cf0cce6c489c..8250a9b1b6f4 100644 --- a/net-misc/tightvnc/ChangeLog +++ b/net-misc/tightvnc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-misc/tightvnc # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/ChangeLog,v 1.94 2007/04/12 20:34:21 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/ChangeLog,v 1.95 2007/04/12 21:00:48 armin76 Exp $ + + 12 Apr 2007; Raúl Porcel <armin76@gentoo.org> +files/tightvnc.confd, + +files/tightvnc.initd, tightvnc-1.2.9-r4.ebuild, -tightvnc-1.3.8.ebuild, + tightvnc-1.3.8-r1.ebuild: + Add init scripts, bug 39023 and remove vulnerable version 12 Apr 2007; Jeroen Roovers <jer@gentoo.org> tightvnc-1.3.8-r1.ebuild: Stable for HPPA (bug #174200). diff --git a/net-misc/tightvnc/files/digest-tightvnc-1.3.8 b/net-misc/tightvnc/files/digest-tightvnc-1.3.8 deleted file mode 100644 index bc139c537f55..000000000000 --- a/net-misc/tightvnc/files/digest-tightvnc-1.3.8 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 9b9b0465834289d1b7899982c0096440 tightvnc-1.3.8_unixsrc.tar.bz2 1766473 -RMD160 98013a7074c488d1cfc85ea2d7a9665a05ee2431 tightvnc-1.3.8_unixsrc.tar.bz2 1766473 -SHA256 cd76e1c5c6843fec2a7a5c493158cdb3642eb1ef4caecee7a89bfd2078881178 tightvnc-1.3.8_unixsrc.tar.bz2 1766473 diff --git a/net-misc/tightvnc/files/tightvnc.confd b/net-misc/tightvnc/files/tightvnc.confd new file mode 100644 index 000000000000..757f4b989f80 --- /dev/null +++ b/net-misc/tightvnc/files/tightvnc.confd @@ -0,0 +1,9 @@ +# Config file for /etc/init.d/vnc + +# Specify the user(s) Xvnc(1) should be run for. The syntax is: "username:display". +# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space. +# DISPLAYS="myuser:1" + +# Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information. +# VNC_OPTS="" + diff --git a/net-misc/tightvnc/files/tightvnc.initd b/net-misc/tightvnc/files/tightvnc.initd new file mode 100644 index 000000000000..29adfa8e3633 --- /dev/null +++ b/net-misc/tightvnc/files/tightvnc.initd @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/files/tightvnc.initd,v 1.1 2007/04/12 21:00:48 armin76 Exp $ + +depend() { + need net +} + +checkconfig() { + if [ -n "${DISPLAYS}" ]; then + if [ $1 = "start" ]; then + local user + for user in $DISPLAYS; do + if eval [ ! -f "~${user%%:*}/.vnc/passwd" ]; then + eerror "There are no passwords defined for user ${user%%:*}." + return 1 + elif [ -e "/tmp/.X11-unix/X${user##*:}" ]; then + eerror "Display :${user##*:} appears to be already in use because of /tmp/.X11-unix/X${user##*:}" + eerror "Remove this file if there is no X server $HOSTNAME:${user##*:}" + return 1 + elif [ -e "/tmp/.X${user##*:}-lock" ]; then + eerror "Display :${user##*:} appears to be already in use because of /tmp/.X${user##*:}-lock" + eerror "Remove this file if there is no X server $HOSTNAME:${user##*:}" + return 1 + fi + done + fi + return 0 + else + eerror 'Please define $DISPLAYS in /etc/conf.d/vnc' + return 1 + fi +} + +start() { + checkconfig start || return 1 + ebegin "Starting TightVNC server" + for user in $DISPLAYS; do + su ${user%%:*} -c "cd /home/${user%%:*} && vncserver :${user##*:} $VNC_OPTS" &>/dev/null + done + eend $? +} + +stop() { + checkconfig stop || return 2 + ebegin "Stopping TightVNC server" + for user in $DISPLAYS; do + su ${user%%:*} -c "vncserver -kill :${user##*:}" &>/dev/null + done + eend $? +} + +restart() { + svc_stop + svc_start +} diff --git a/net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild b/net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild index 65caafec63c3..21179198d73c 100644 --- a/net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild +++ b/net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild,v 1.4 2007/04/12 06:39:21 welp Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/tightvnc-1.2.9-r4.ebuild,v 1.5 2007/04/12 21:00:48 armin76 Exp $ inherit eutils toolchain-funcs @@ -97,7 +97,10 @@ src_install() { dodir /usr/share/man/man1 /usr/bin ./vncinstall ${D}/usr/bin ${D}/usr/share/man || die "vncinstall failed" - if ! use server; then + if use server; then + newconfd "${FILESDIR}"/tightvnc.confd vnc + newinitd "${FILESDIR}"/tightvnc.initd vnc + else rm -f ${D}/usr/bin/vncserver rm -f ${D}/usr/share/man/man1/{Xvnc,vncserver}* fi diff --git a/net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild b/net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild index 531e3d30939f..a9ecff620604 100644 --- a/net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild +++ b/net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild,v 1.2 2007/04/12 20:34:21 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/tightvnc-1.3.8-r1.ebuild,v 1.3 2007/04/12 21:00:48 armin76 Exp $ inherit eutils toolchain-funcs @@ -96,7 +96,10 @@ src_install() { dodir /usr/share/man/man1 /usr/bin ./vncinstall ${D}/usr/bin ${D}/usr/share/man || die "vncinstall failed" - if ! use server; then + if use server; then + newconfd "${FILESDIR}"/tightvnc.confd vnc + newinitd "${FILESDIR}"/tightvnc.initd vnc + else rm -f ${D}/usr/bin/vncserver rm -f ${D}/usr/share/man/man1/{Xvnc,vncserver}* fi diff --git a/net-misc/tightvnc/tightvnc-1.3.8.ebuild b/net-misc/tightvnc/tightvnc-1.3.8.ebuild deleted file mode 100644 index afbc31804702..000000000000 --- a/net-misc/tightvnc/tightvnc-1.3.8.ebuild +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tightvnc/tightvnc-1.3.8.ebuild,v 1.5 2007/02/26 12:39:36 armin76 Exp $ - -inherit eutils toolchain-funcs - -IUSE="java tcpd server" - -S="${WORKDIR}/vnc_unixsrc" -DESCRIPTION="A great client/server software package allowing remote network access to graphical desktops." -SRC_URI="mirror://sourceforge/vnc-tight/${P}_unixsrc.tar.bz2" -HOMEPAGE="http://www.tightvnc.com/" - -KEYWORDS="~alpha ~amd64 hppa ~mips ~ppc ~ppc-macos ~sparc ~x86" -LICENSE="GPL-2" -SLOT="0" - -DEPEND="x11-libs/libX11 - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXp - x11-libs/libXt - x11-proto/xextproto - x11-proto/xproto - server? ( - x11-proto/inputproto - x11-proto/kbproto - x11-proto/printproto - ) - >=x11-misc/imake-1 - x11-misc/gccmakedep - ~media-libs/jpeg-6b - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 ) - !net-misc/vnc" - -RDEPEND="${DEPEND} - server? ( - media-fonts/font-misc-misc - media-fonts/font-cursor-misc - x11-apps/rgb - x11-apps/xauth - x11-apps/xsetroot - ) - java? ( || ( >=virtual/jdk-1.3.1 >=virtual/jre-1.3.1 ) )" - -src_unpack() { - - if ! use server; - then - echo - einfo "The 'server' USE flag will build tightvnc's server." - einfo "If '-server' is chosen only the client is built to save space." - einfo "Stop the build now if you need to add 'server' to USE flags.\n" - ebeep - epause 5 - fi - - unpack ${A} && cd ${S} - epatch "${FILESDIR}/${P}-pathfixes.patch" # fixes bug 78385 and 146099 - epatch "${FILESDIR}/${P}-imake-tmpdir.patch" # fixes bug 23483 - epatch "${FILESDIR}/${P}-darwin.patch" # fixes bug 89908 - use amd64 && epatch "${FILESDIR}/${P}-amd64.patch" # fixes bug 82583 - use mips && epatch "${FILESDIR}/${P}-mips.patch" -} - -src_compile() { - xmkmf -a || die "xmkmf failed" - - make CDEBUGFLAGS="${CFLAGS}" World || die - - if use server; then - cd Xvnc && ./configure || die "Configure failed." - if use tcpd; then - local myextra="-lwrap" - use userland_Darwin || myextra="${myextra} -lnss_nis" - make EXTRA_LIBRARIES="${myextra}" \ - CDEBUGFLAGS="${CFLAGS}" \ - EXTRA_DEFINES="-DUSE_LIBWRAP=1" || die - else - make CDEBUGFLAGS="${CFLAGS}" || die - fi - fi - -} - -src_install() { - # the web based interface and the java viewer need the java class files - if use java; then - insinto /usr/share/tightvnc/classes - doins classes/* - fi - - dodir /usr/share/man/man1 /usr/bin - ./vncinstall ${D}/usr/bin ${D}/usr/share/man || die "vncinstall failed" - - if ! use server; then - rm -f ${D}/usr/bin/vncserver - rm -f ${D}/usr/share/man/man1/{Xvnc,vncserver}* - fi - - doicon ${FILESDIR}/vncviewer.png - make_desktop_entry vncviewer vncviewer vncviewer.png Network - - dodoc ChangeLog README WhatsNew - use java && dodoc ${FILESDIR}/README.JavaViewer - newdoc vncviewer/README README.vncviewer -} |