diff options
author | marino <marino@FreeBSD.org> | 2016-10-05 23:38:16 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2016-10-05 23:38:16 +0800 |
commit | cbbd992d46c9761541c3d143d0bdb6479d4eecc1 (patch) | |
tree | e81915ff26d70fdbd796652a375102ad74fde78f /net | |
parent | 380ca3081d9373a50bf90f6ee3349e6e8116b794 (diff) | |
download | freebsd-ports-gnome-cbbd992d46c9761541c3d143d0bdb6479d4eecc1.tar.gz freebsd-ports-gnome-cbbd992d46c9761541c3d143d0bdb6479d4eecc1.tar.zst freebsd-ports-gnome-cbbd992d46c9761541c3d143d0bdb6479d4eecc1.zip |
net/tigervnc(-devel): runtime and stage-QA fix
Previous attempts to run tigervnc resulted in the server quitting:
vncserver: couldn't find "mcookie" on your PATH
With the attached patch, the vncserver now generates the "magic cookie".
While here, add the missing vietnamese translation to fix stage-QA checks.
The -devel version got the same fix and was revbumped even though it is
still ignored since it's no newer than the stable version.
PR: 213150
Reported by: Zane Bowers-Hadley (vvelox [at] vvelox.net)
Submitted by: maintainer
Diffstat (limited to 'net')
-rw-r--r-- | net/tigervnc-devel/Makefile | 3 | ||||
-rw-r--r-- | net/tigervnc-devel/files/patch-unix_vncserver | 31 | ||||
-rw-r--r-- | net/tigervnc-devel/pkg-plist | 1 | ||||
-rw-r--r-- | net/tigervnc/Makefile | 2 | ||||
-rw-r--r-- | net/tigervnc/files/patch-unix_vncserver | 31 | ||||
-rw-r--r-- | net/tigervnc/pkg-plist | 1 |
6 files changed, 60 insertions, 9 deletions
diff --git a/net/tigervnc-devel/Makefile b/net/tigervnc-devel/Makefile index 084a58171ad9..31832db25417 100644 --- a/net/tigervnc-devel/Makefile +++ b/net/tigervnc-devel/Makefile @@ -3,7 +3,7 @@ PORTNAME= tigervnc PORTVERSION= 1.6.90 -PORTREVISION= 1 +PORTREVISION= 2 DISTVERSIONPREFIX= v CATEGORIES= net x11-servers PKGNAMESUFFIX= -devel @@ -144,5 +144,6 @@ post-build: post-install: @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/Xvnc ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libvnc.so .include <bsd.port.post.mk> diff --git a/net/tigervnc-devel/files/patch-unix_vncserver b/net/tigervnc-devel/files/patch-unix_vncserver index 045d688cd85e..56cd278e9cec 100644 --- a/net/tigervnc-devel/files/patch-unix_vncserver +++ b/net/tigervnc-devel/files/patch-unix_vncserver @@ -1,6 +1,20 @@ ---- unix/vncserver.orig 2012-05-27 21:16:41.000000000 +0900 -+++ unix/vncserver 2012-05-27 21:17:13.000000000 +0900 -@@ -422,7 +422,7 @@ +--- unix/vncserver.orig 2016-10-04 13:33:57.420501000 +0900 ++++ unix/vncserver 2016-10-04 13:18:49.398064000 +0900 +@@ -240,7 +240,13 @@ + + # Make an X server cookie and set up the Xauthority file + ++# mcookie is a part of util-linux, usually only GNU/Linux systems have it. + $cookie = `mcookie`; ++# Alternative method for cookie. For non GNU/Linux operating systems. ++$cookie ||= `dd if=/dev/urandom bs=16 count=1 2>/dev/null| od -x -An | tr -d ' '`; ++if ($cookie eq '') { ++ die "couldn't generate magic cookie.\n"; ++} + + open(XAUTH, "|xauth -f $xauthorityFile source -"); + print XAUTH "add $host:$displayNumber . $cookie\n"; +@@ -470,7 +476,7 @@ socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; @@ -9,7 +23,7 @@ close(S); return 0; } -@@ -430,7 +430,7 @@ +@@ -478,7 +484,7 @@ socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; @@ -18,3 +32,12 @@ close(S); return 0; } +@@ -778,7 +784,7 @@ + # + + cmd: +- foreach $cmd ("uname","mcookie","xauth") { ++ foreach $cmd ("uname","xauth") { + for (split(/:/,$ENV{PATH})) { + if (-x "$_/$cmd") { + next cmd; diff --git a/net/tigervnc-devel/pkg-plist b/net/tigervnc-devel/pkg-plist index ffd84668a434..555014c67813 100644 --- a/net/tigervnc-devel/pkg-plist +++ b/net/tigervnc-devel/pkg-plist @@ -29,6 +29,7 @@ man/man1/Xvnc.1.gz %%NLS%%share/locale/sv/LC_MESSAGES/tigervnc.mo %%NLS%%share/locale/tr/LC_MESSAGES/tigervnc.mo %%NLS%%share/locale/uk/LC_MESSAGES/tigervnc.mo +%%NLS%%share/locale/vi/LC_MESSAGES/tigervnc.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/tigervnc.mo %%PORTDOCS%%%%DOCSDIR%%/README.txt %%PORTDOCS%%%%DOCSDIR%%/LICENCE.TXT diff --git a/net/tigervnc/Makefile b/net/tigervnc/Makefile index 0f9f2e8c159e..d6ff47c616aa 100644 --- a/net/tigervnc/Makefile +++ b/net/tigervnc/Makefile @@ -4,6 +4,7 @@ PORTNAME= tigervnc PORTVERSION= 1.7.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= net x11-servers MAINTAINER= meta+ports@vmeta.jp @@ -141,5 +142,6 @@ post-build: post-install: @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/Xvnc ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libvnc.so .include <bsd.port.post.mk> diff --git a/net/tigervnc/files/patch-unix_vncserver b/net/tigervnc/files/patch-unix_vncserver index 045d688cd85e..1347645b584b 100644 --- a/net/tigervnc/files/patch-unix_vncserver +++ b/net/tigervnc/files/patch-unix_vncserver @@ -1,6 +1,20 @@ ---- unix/vncserver.orig 2012-05-27 21:16:41.000000000 +0900 -+++ unix/vncserver 2012-05-27 21:17:13.000000000 +0900 -@@ -422,7 +422,7 @@ +--- unix/vncserver.orig 2016-09-08 10:31:18 UTC ++++ unix/vncserver +@@ -240,7 +240,13 @@ unlink($desktopLog); + + # Make an X server cookie and set up the Xauthority file + ++# mcookie is a part of util-linux, usually only GNU/Linux systems have it. + $cookie = `mcookie`; ++# Alternative method for cookie. For non GNU/Linux operating systems. ++$cookie ||= `dd if=/dev/urandom bs=16 count=1 2>/dev/null| od -x -An | tr -d ' '`; ++if ($cookie eq '') { ++ die "couldn't generate magic cookie.\n"; ++} + + open(XAUTH, "|xauth -f $xauthorityFile source -"); + print XAUTH "add $host:$displayNumber . $cookie\n"; +@@ -470,7 +476,7 @@ sub CheckDisplayNumber socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; @@ -9,7 +23,7 @@ close(S); return 0; } -@@ -430,7 +430,7 @@ +@@ -478,7 +484,7 @@ sub CheckDisplayNumber socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; @@ -18,3 +32,12 @@ close(S); return 0; } +@@ -778,7 +784,7 @@ sub SanityCheck + # + + cmd: +- foreach $cmd ("uname","mcookie","xauth") { ++ foreach $cmd ("uname","xauth") { + for (split(/:/,$ENV{PATH})) { + if (-x "$_/$cmd") { + next cmd; diff --git a/net/tigervnc/pkg-plist b/net/tigervnc/pkg-plist index ffd84668a434..555014c67813 100644 --- a/net/tigervnc/pkg-plist +++ b/net/tigervnc/pkg-plist @@ -29,6 +29,7 @@ man/man1/Xvnc.1.gz %%NLS%%share/locale/sv/LC_MESSAGES/tigervnc.mo %%NLS%%share/locale/tr/LC_MESSAGES/tigervnc.mo %%NLS%%share/locale/uk/LC_MESSAGES/tigervnc.mo +%%NLS%%share/locale/vi/LC_MESSAGES/tigervnc.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/tigervnc.mo %%PORTDOCS%%%%DOCSDIR%%/README.txt %%PORTDOCS%%%%DOCSDIR%%/LICENCE.TXT |