Install the vncserver script from tigervnc 1.10.1; the newer version

only supports vncserver for systemd and Florian Viehweger reports that
the old one still works. Based on a diff from Florian but done differently.
This commit is contained in:
sthen 2022-01-04 15:39:50 +00:00
parent 3c6cdfb9f0
commit 4f322c076a
5 changed files with 57 additions and 30 deletions

View File

@ -1,17 +1,19 @@
# $OpenBSD: Makefile,v 1.12 2021/11/16 21:30:22 sthen Exp $
# $OpenBSD: Makefile,v 1.13 2022/01/04 15:39:50 sthen Exp $
COMMENT= high performance, multi-platform VNC client and server
GH_ACCOUNT= TigerVNC
GH_PROJECT= tigervnc
GH_TAGNAME= v1.11.0
# 1.12.0 has an issue with connection to vmware's internal VNC which
# results in an exception being thrown relating to the cursor.
REVISION= 0
# skipping 1.12.0 for now, it has an issue with connection to vmware's
# internal VNC which results in an exception being thrown relating to
# the cursor.
DISTFILES= ${GH_DISTFILE} \
xorg-server-1.20.13.tar.xz:0
# update the post-patch target if moving to a new major branch of xorg-server
# there's no patchset in tigervnc for xorg-server-21.1.1.tar.xz:0 yet
DISTFILES= ${GH_DISTFILE} \
xorg-server-1.20.13.tar.xz:0
CATEGORIES= x11 net
@ -31,6 +33,12 @@ WANTLIB += unistring xcb xshmfence z
MASTER_SITES0= https://www.x.org/releases/individual/xserver/
# vncserver script is not included in 1.11.0 so fetch it from an old tag
MASTER_SITES1= https://raw.githubusercontent.com/TigerVNC/tigervnc/v1.10.1/unix/
EXTRACT_ONLY= ${GH_DISTFILE} xorg-server-1.20.13.tar.xz
DISTFILES+= tigervnc-vncserver-1.10.1.pl{vncserver}:1 \
tigervnc-vncserver-1.10.1.man{vncserver.man}:1
# main parts use cmake, Xvnc uses autoconf
# Xvnc requires non-installed files generated in cmake build portion
# so can't be done as a separate port
@ -119,6 +127,8 @@ AC_ARGS+= --sysconfdir='${SYSCONFDIR}' \
post-extract:
cp -R ${WRKDIR}/xorg-server-*/* ${WRKDIST}/unix/xserver
cp ${FULLDISTDIR}/tigervnc-vncserver-1.10.1.pl ${WRKSRC}/vncserver
cp ${FULLDISTDIR}/tigervnc-vncserver-1.10.1.man ${WRKSRC}/vncserver.man
post-patch:
patch -d ${WRKDIST}/unix/xserver/ -p1 < ${WRKDIST}/unix/xserver120.patch
@ -140,7 +150,12 @@ post-install:
TIGERVNC_SRCDIR=${WRKDIST} TIGERVNC_BUILDDIR=${WRKBUILD}
rm -rf ${PREFIX}/lib/xorg
rm ${PREFIX}/etc/tigervnc/vncserver*
rmdir ${PREFIX}/etc/tigervnc ${PREFIX}/etc
mv ${PREFIX}/bin/vncviewer{,.tigervnc} # avoid conflict
mv ${PREFIX}/man/man1/vncviewer{,.tigervnc}.1
${INSTALL_SCRIPT} ${WRKSRC}/vncserver ${PREFIX}/bin/vncserver
${INSTALL_DATA} ${WRKSRC}/vncserver.man ${PREFIX}/man/man1/vncserver.1
rm ${PREFIX}/man/man8/vncserver.8
.include <bsd.port.mk>

View File

@ -1,4 +1,8 @@
SHA256 (tigervnc-1.11.0.tar.gz) = NkjspHKpKk6P5VsnzTl7G/FrrQsko6GYhmH0RVP14sM=
SHA256 (tigervnc-vncserver-1.10.1.man) = SYPtbv1V+i4qPDYNS7s5yfcD77b6Kc5PbY/TRZmb6O0=
SHA256 (tigervnc-vncserver-1.10.1.pl) = QKXeRAhhWcwN8+2dSH1x48qj5JPVNafgdhuNRZG7WuM=
SHA256 (xorg-server-1.20.13.tar.xz) = QKpOlqVqgaMB8VqbEOBqInAPErQtng5FPH8R01Q4YwA=
SIZE (tigervnc-1.11.0.tar.gz) = 1346992
SIZE (tigervnc-vncserver-1.10.1.man) = 7844
SIZE (tigervnc-vncserver-1.10.1.pl) = 24313
SIZE (xorg-server-1.20.13.tar.xz) = 5122260

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-unix_vncserver_vncserver_in,v 1.1 2021/11/14 22:45:25 sthen Exp $
Index: unix/vncserver/vncserver.in
--- unix/vncserver/vncserver.in.orig
+++ unix/vncserver/vncserver.in
@@ -375,6 +375,9 @@ sub CheckDisplayNumber
}
}
+# XXX---------------------------------------------
+# Previous version of this check failed, so this one may also fail
+# XXX---------------------------------------------
my $rfb_port = 5900 + $n;
my $x11_port = 6000 + $n;
@@ -389,6 +392,7 @@ sub CheckDisplayNumber
}
close(S);
}
+# XXX---------------------------------------------
my $x11_unix_domain = "/tmp/.X11-unix/X$n";

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-vncserver,v 1.1 2022/01/04 15:39:50 sthen Exp $
Patch away check which doesn't work on OpenBSD.
Index: vncserver
--- vncserver.orig
+++ vncserver
@@ -524,22 +524,6 @@ sub CheckDisplayNumber
{
local ($n) = @_;
- socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
- eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
- if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
- close(S);
- return 0;
- }
- close(S);
-
- socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
- eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
- if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
- close(S);
- return 0;
- }
- close(S);
-
if (-e "/tmp/.X$n-lock") {
warn "\nWarning: $host:$n is taken because of /tmp/.X$n-lock\n";
warn "Remove this file if there is no X server $host:$n\n";

View File

@ -1,7 +1,8 @@
@comment $OpenBSD: PLIST,v 1.3 2021/11/14 22:45:25 sthen Exp $
@comment $OpenBSD: PLIST,v 1.4 2022/01/04 15:39:50 sthen Exp $
@bin bin/Xvnc
@bin bin/vncconfig
@bin bin/vncpasswd
bin/vncserver
@bin bin/vncviewer.tigervnc
@bin bin/x0vncserver
libexec/vncserver
@ -9,9 +10,9 @@ libexec/vncserver
@man man/man1/Xvnc.1
@man man/man1/vncconfig.1
@man man/man1/vncpasswd.1
@man man/man1/vncserver.1
@man man/man1/vncviewer.tigervnc.1
@man man/man1/x0vncserver.1
@man man/man8/vncserver.8
share/applications/vncviewer.desktop
share/doc/tigervnc/
share/doc/tigervnc/LICENCE.TXT