diff --git a/server/misc/libvncserver/actions.py b/server/misc/libvncserver/actions.py index b9d1b8a314..cab0903f41 100644 --- a/server/misc/libvncserver/actions.py +++ b/server/misc/libvncserver/actions.py @@ -6,22 +6,29 @@ from pisi.actionsapi import autotools from pisi.actionsapi import pisitools +from pisi.actionsapi import cmaketools from pisi.actionsapi import get WorkDir = "libvncserver-LibVNCServer-%s" % get.srcVERSION() def setup(): - autotools.autoreconf("-vif") - autotools.configure("--disable-static \ - --disable-dependency-tracking \ - --with-24bpp \ - --with-zlib \ - --with-jpeg") + #autotools.autoreconf("-vif") + #autotools.configure("--disable-static \ + #--disable-dependency-tracking \ + #--with-24bpp \ + #--with-zlib \ + #--with-jpeg") - pisitools.dosed("libtool", " -shared ", " -shared -Wl,--as-needed") + #pisitools.dosed("libtool", " -shared ", " -shared -Wl,--as-needed") + + cmaketools.configure("-DWITH_FFMPEG=OFF \ + -DWITH_SASL=OFF \ + -DWITH_SDL=OFF \ + -DWITH_SYSTEMD=OFF \ + ") def build(): - autotools.make() + cmaketools.make() def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) diff --git a/server/misc/libvncserver/files/krfb-crash-1.patch b/server/misc/libvncserver/files/krfb-crash-1.patch new file mode 100644 index 0000000000..7192b6f6f2 --- /dev/null +++ b/server/misc/libvncserver/files/krfb-crash-1.patch @@ -0,0 +1,32 @@ +From d0a76539835d11c0f4723499f8be4bc9c7724eb9 Mon Sep 17 00:00:00 2001 +From: Rajesh Sahoo +Date: Tue, 11 Jun 2019 15:13:04 +0530 +Subject: [PATCH] avoid pthread_join if backgroundLoop is FALSE + +client_thread is created depending upon backgroundLoop, but joining +without checking for same condition. so we are trying to join a garbage +thread_id. +--- + libvncserver/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libvncserver/main.c b/libvncserver/main.c +index d3cd9b1e..772fb18f 100644 +--- a/libvncserver/main.c ++++ b/libvncserver/main.c +@@ -1112,6 +1112,7 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { + } + + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD ++ if(currentCl->screen->backgroundLoop) { + /* + Notify the thread. This simply writes a NULL byte to the notify pipe in order to get past the select() + in clientInput(), the loop in there will then break because the rfbCloseClient() above has set +@@ -1120,6 +1121,7 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { + write(currentCl->pipe_notify_client_thread[1], "\x00", 1); + /* And wait for it to finish. */ + pthread_join(currentCl->client_thread, NULL); ++ } + #else + rfbClientConnectionGone(currentCl); + #endif diff --git a/server/misc/libvncserver/files/krfb-crash-2.patch b/server/misc/libvncserver/files/krfb-crash-2.patch new file mode 100644 index 0000000000..b8edd35e2f --- /dev/null +++ b/server/misc/libvncserver/files/krfb-crash-2.patch @@ -0,0 +1,25 @@ +From 15c4f144a3783d9f1f2c976acf9f4d85988fd466 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sun, 5 Jan 2020 19:56:57 +0100 +Subject: [PATCH] rfbShutdownServer: Call rfbClientConnectionGone if no + backgroundLoop + +Otherwise the servers that don't use rfbRunEventLoop don't get +notified of client disconnections +--- + libvncserver/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libvncserver/main.c b/libvncserver/main.c +index b51f0ab6..738a501d 100644 +--- a/libvncserver/main.c ++++ b/libvncserver/main.c +@@ -1152,6 +1152,8 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { + write(currentCl->pipe_notify_client_thread[1], "\x00", 1); + /* And wait for it to finish. */ + pthread_join(currentCl->client_thread, NULL); ++ } else { ++ rfbClientConnectionGone(currentCl); + } + #else + rfbClientConnectionGone(currentCl); diff --git a/server/misc/libvncserver/pspec.xml b/server/misc/libvncserver/pspec.xml index 95cdd8d0a0..76e27c8e86 100644 --- a/server/misc/libvncserver/pspec.xml +++ b/server/misc/libvncserver/pspec.xml @@ -12,15 +12,18 @@ app:console Library for creating VNC (Virtual Network Computing) servers libvncserver provides a C library to create VNC servers. - https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.11.tar.gz + https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.12.tar.gz gnutls-devel libjpeg-turbo-devel libgcrypt-devel libpng-devel openssl-devel + lzo-devel + krfb-crash-1.patch + krfb-crash-2.patch @@ -33,6 +36,7 @@ gnutls libjpeg-turbo openssl + lzo /usr/bin/*-config @@ -58,6 +62,13 @@ + + 2020-01-15 + 0.9.12 + Version Bump + İdris Kalp + idriskalp@gmail.com + 2018-08-07 0.9.11