[pve-devel] [PATCH vncterm 2/2] build: rebase on libvncserver 0.9.13
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Jul 1 13:34:22 CEST 2020
upstream switched to cmake from autotools.
it is possible to drop systemd via a build option now, so use that
instead of patching.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
Makefile | 7 +++---
vncpatches/tls-auth-pluging.patch | 41 +++++++++++++++----------------
debian/control | 3 ++-
vncpatches/series | 1 -
4 files changed, 25 insertions(+), 27 deletions(-)
diff --git a/Makefile b/Makefile
index a84205e..da654d9 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,11 @@ include /usr/share/dpkg/architecture.mk
PACKAGE=vncterm
GITVERSION:=$(shell cat .git/refs/heads/master)
-VNCVER=0.9.11
+VNCVER=0.9.13
VNCREL=LibVNCServer-${VNCVER}
VNCDIR=libvncserver-${VNCREL}
VNCSRC=${VNCREL}.tar.gz
-VNCLIB=${VNCDIR}/libvncserver/.libs/libvncserver.a
+VNCLIB=${VNCDIR}/libvncserver.a
DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
@@ -32,8 +32,7 @@ ${VNCLIB}: ${VNCSRC}
tar xf ${VNCSRC}
ln -s ../vncpatches ${VNCDIR}/patches
cd ${VNCDIR}; quilt push -a
- cd ${VNCDIR}; ./autogen.sh --without-ssl --without-websockets --without-tightvnc-filetransfer;
- cd ${VNCDIR}; $(MAKE)
+ cd ${VNCDIR}; cmake -D WITH_GNUTLS=OFF -D WITH_OPENSSL=OFF -D WITH_WEBSOCKETS=OFF -D WITH_SYSTEMD=OFF -D WITH_TIGHTVNC_FILETRANSFER=OFF -D WITH_GCRYPT=OFF -D BUILD_SHARED_LIBS=OFF .; cmake --build .
vncterm: vncterm.c wchardata.c $(VNCLIB)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(VNC_LIBS)
diff --git a/vncpatches/tls-auth-pluging.patch b/vncpatches/tls-auth-pluging.patch
index 17a8c47..837612f 100644
--- a/vncpatches/tls-auth-pluging.patch
+++ b/vncpatches/tls-auth-pluging.patch
@@ -1,23 +1,22 @@
-Index: vnc/libvncserver/auth.c
+Index: libvncserver-LibVNCServer-0.9.13/libvncserver/auth.c
===================================================================
-@@ -300,8 +300,9 @@
- int32_t securityType = rfbSecTypeInvalid;
+--- libvncserver-LibVNCServer-0.9.13.orig/libvncserver/auth.c
++++ libvncserver-LibVNCServer-0.9.13/libvncserver/auth.c
+@@ -301,7 +301,8 @@ rfbAuthNewClient(rfbClientPtr cl)
if (!cl->screen->authPasswdData || cl->reverseConnection) {
-- /* chk if this condition is valid or not. */
+ /* chk if this condition is valid or not. */
- securityType = rfbSecTypeNone;
-+ /* chk if this condition is valid or not. */
+ /* we disable anonymous auth */
+ // securityType = rfbSecTypeNone;
} else if (cl->screen->authPasswdData) {
securityType = rfbSecTypeVncAuth;
}
-Index: vnc/newterm/Makefile.am
-Index: vnc/libvncserver/sockets.c
+Index: libvncserver-LibVNCServer-0.9.13/libvncserver/sockets.c
===================================================================
---- vnc.orig/libvncserver/sockets.c 2011-01-20 16:42:41.000000000 +0100
-+++ vnc/libvncserver/sockets.c 2011-01-21 10:20:03.000000000 +0100
-@@ -613,7 +613,11 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
+--- libvncserver-LibVNCServer-0.9.13.orig/libvncserver/sockets.c
++++ libvncserver-LibVNCServer-0.9.13/libvncserver/sockets.c
+@@ -638,7 +638,11 @@ rfbReadExactTimeout(rfbClientPtr cl, cha
n = read(sock, buf, len);
}
#else
@@ -30,7 +29,7 @@ Index: vnc/libvncserver/sockets.c
#endif
if (n > 0) {
-@@ -801,7 +805,11 @@ rfbWriteExact(rfbClientPtr cl,
+@@ -826,7 +830,11 @@ rfbWriteExact(rfbClientPtr cl,
n = rfbssl_write(cl, buf, len);
else
#endif
@@ -42,21 +41,21 @@ Index: vnc/libvncserver/sockets.c
if (n > 0) {
-Index: vnc/rfb/rfb.h
+Index: libvncserver-LibVNCServer-0.9.13/rfb/rfb.h
===================================================================
---- vnc.orig/rfb/rfb.h 2011-01-20 16:36:06.000000000 +0100
-+++ vnc/rfb/rfb.h 2011-01-21 06:44:22.000000000 +0100
-@@ -397,6 +397,9 @@
- struct _rfbStatList *Next;
- } rfbStatList;
+--- libvncserver-LibVNCServer-0.9.13.orig/rfb/rfb.h
++++ libvncserver-LibVNCServer-0.9.13/rfb/rfb.h
+@@ -411,6 +411,9 @@ typedef struct _rfbStatList {
+ typedef struct _rfbSslCtx rfbSslCtx;
+ typedef struct _wsCtx wsCtx;
+typedef ssize_t (*sock_read_fn_t)(struct _rfbClientRec *cl, void *buf, size_t count);
+typedef ssize_t (*sock_write_fn_t)(struct _rfbClientRec *cl, const void *buf, size_t count);
+
typedef struct _rfbClientRec {
-
- /* back pointer to the screen */
-@@ -417,6 +420,10 @@
+
+ /** back pointer to the screen */
+@@ -431,6 +434,10 @@ typedef struct _rfbClientRec {
void* clientData;
ClientGoneHookPtr clientGoneHook;
@@ -64,6 +63,6 @@ Index: vnc/rfb/rfb.h
+ sock_read_fn_t sock_read_fn;
+ sock_read_fn_t sock_write_fn;
+
- SOCKET sock;
+ rfbSocket sock;
char *host;
diff --git a/debian/control b/debian/control
index 89c0f5d..cb6c7b2 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,7 @@
Source: vncterm
Maintainer: Proxmox Support Team <support at proxmox.com>
-Build-Depends: debhelper (>= 10~),
+Build-Depends: cmake,
+ debhelper (>= 10~),
libglib2.0-dev,
libgnutls28-dev,
libjpeg62-turbo-dev,
diff --git a/vncpatches/series b/vncpatches/series
index defbfe8..2fb1c30 100644
--- a/vncpatches/series
+++ b/vncpatches/series
@@ -1,2 +1 @@
-remove-systemd-socket-activation.patch
tls-auth-pluging.patch
--
2.20.1
More information about the pve-devel
mailing list