diff options
author | Aisha Tammy <gentoo@aisha.cc> | 2021-02-13 01:35:58 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2021-03-24 12:06:57 -0400 |
commit | 3513ee16314296fb4de6bf6e42f3e7f1c80d3cf7 (patch) | |
tree | 98a567e936a262dca87f55265376f8afabd1f835 /x11-misc | |
parent | app-misc/tpconfig: revbump for d-m-i (diff) | |
download | gentoo-3513ee16314296fb4de6bf6e42f3e7f1c80d3cf7.tar.gz gentoo-3513ee16314296fb4de6bf6e42f3e7f1c80d3cf7.tar.bz2 gentoo-3513ee16314296fb4de6bf6e42f3e7f1c80d3cf7.zip |
x11-misc/x11vnc: revbump for d-m-i
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/x11vnc/files/x11vnc.init.d-r1 | 70 | ||||
-rw-r--r-- | x11-misc/x11vnc/x11vnc-0.9.16-r5.ebuild | 81 |
2 files changed, 151 insertions, 0 deletions
diff --git a/x11-misc/x11vnc/files/x11vnc.init.d-r1 b/x11-misc/x11vnc/files/x11vnc.init.d-r1 new file mode 100644 index 000000000000..04c36ea361db --- /dev/null +++ b/x11-misc/x11vnc/files/x11vnc.init.d-r1 @@ -0,0 +1,70 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="The x11vnc daemon init script" + +depend() { + need net + need display-manager +} + +checkconfig() { + + # Set Defaults + X11VNC_RFBAUTH=${X11VNC_RFBAUTH:-/etc/x11vnc.pass} + X11VNC_RFBPORT=${X11VNC_RFBPORT:-5900} + X11VNC_DISPLAY=${X11VNC_DISPLAY:-:0} + X11VNC_LOG=${X11VNC_LOG:-/var/log/x11vnc} + + X11VNC_AUTH="/var/run/x11vnc-${X11VNC_DISPLAY}" + + if [ -n "${X11VNC_AUTOPORT}" ]; then + X11VNC_PORT="" + fi + + if [ ! -f "${X11VNC_RFBAUTH}" -o ! -s "${X11VNC_RFBAUTH}" ]; then + eerror "VNC Password not set, please set one by running: \`x11vnc -storepasswd ${X11VNC_RFBAUTH}\`" + return 1 + fi + checkpath -q -f -m 0600 -o root:root "${X11VNC_RFBAUTH}" + + # Attempt to find X-Auth file + if ! type xauth > /dev/null 2>&1 || + ! xauth -f /root/.Xauthority extract - "${X11VNC_DISPLAY}" > "${X11VNC_AUTH}" 2>/dev/null || + [ ! -s "${X11VNC_AUTH}" ]; then + # Let x11vnc guess at auth + X11VNC_AUTH_OPTS="--env FD_XDM=1 -auth guess" + else + # We found the proper auth + X11VNC_AUTH_OPTS="-auth ${X11VNC_AUTH}" + fi + + if [ ! -f "${X11VNC_AUTH}" ]; then + eerror "Specified X-Authority file '${X11VNC_AUTH}' not found!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start \ + --exec /usr/bin/x11vnc -- \ + ${X11VNC_AUTH_OPTS} \ + -rfbauth ${X11VNC_RFBAUTH} \ + ${X11VNC_RFBPORT:+-rfbport} ${X11VNC_RFBPORT} \ + ${X11VNC_AUTOPORT:+-autoport} ${X11VNC_AUTOPORT} \ + -display ${X11VNC_DISPLAY} \ + -o ${X11VNC_LOG} \ + -bg -forever \ + ${X11VNC_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop /usr/bin/x11vnc + eend $? +} diff --git a/x11-misc/x11vnc/x11vnc-0.9.16-r5.ebuild b/x11-misc/x11vnc/x11vnc-0.9.16-r5.ebuild new file mode 100644 index 000000000000..e8292188e985 --- /dev/null +++ b/x11-misc/x11vnc/x11vnc-0.9.16-r5.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="VNC server for real X displays" +HOMEPAGE="https://libvnc.github.io/" +SRC_URI="https://github.com/LibVNC/x11vnc/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+-with-openssl-exception" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="crypt fbcon libressl ssl +xcomposite +xdamage +xfixes xinerama +xrandr zeroconf" + +COMMON_DEPEND=" + >=net-libs/libvncserver-0.9.8[ssl=] + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + >=x11-libs/libXtst-1.1.0 + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + xcomposite? ( x11-libs/libXcomposite ) + xdamage? ( x11-libs/libXdamage ) + xfixes? ( x11-libs/libXfixes ) + xinerama? ( x11-libs/libXinerama ) + xrandr? ( x11-libs/libXrandr ) + zeroconf? ( >=net-dns/avahi-0.6.4 ) +" +DEPEND="${COMMON_DEPEND} + x11-base/xorg-proto + x11-libs/libXt +" +# https://bugzilla.redhat.com/show_bug.cgi?id=920554 +RDEPEND="${COMMON_DEPEND} + dev-lang/tk:0 +" + +PATCHES=( + "${FILESDIR}"/${P}-crypto.patch # https://github.com/LibVNC/x11vnc/issues/86 + "${FILESDIR}"/${P}-anonymous-ssl.patch # https://github.com/LibVNC/x11vnc/pull/85 + "${FILESDIR}"/${P}-libressl.patch + "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-CVE-2020-29074.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # --without-v4l because of missing video4linux 2.x support wrt #389079 + local myconf=( + --without-v4l + --without-xkeyboard + --without-fbpm + --without-dpms + $(use_with crypt) + $(use_with fbcon fbdev) + $(use_with ssl) + $(use_with ssl crypto) + $(use_with xcomposite) + $(use_with xdamage) + $(use_with xfixes) + $(use_with xinerama) + $(use_with xrandr) + $(use_with zeroconf avahi) + ) + econf "${myconf[@]}" +} + +src_install() { + default + newinitd "${FILESDIR}/x11vnc.init.d-r1" x11vnc + newconfd "${FILESDIR}/x11vnc.conf.d" x11vnc +} |