Control: tags -1 - moreinfo On So 04 Jul 2021 21:15:15 CEST, Sebastian Ramacher wrote:
Control: tags -1 moreinfo The debdiff appears to be missing.
Ouch. I forgot that. Now attached. Mike -- mike gabriel aka sunweaver (Debian Developer) mobile: +49 (1520) 1976 148 landline: +49 (4351) 486 14 27 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: sunweaver@debian.org, http://sunweavers.net
diff -Nru nx-libs-3.5.99.26/debian/changelog nx-libs-3.5.99.26/debian/changelog --- nx-libs-3.5.99.26/debian/changelog 2021-02-04 14:46:49.000000000 +0100 +++ nx-libs-3.5.99.26/debian/changelog 2021-07-03 20:42:32.000000000 +0200 @@ -1,3 +1,22 @@ +nx-libs (2:3.5.99.26-2) unstable; urgency=medium + + * debian/patches: + + Add 0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch. + Compext.c: fix comparisons of 16bit sequence numbers. (Closes: + #990647). + + Add 0002_Forward-ClientMessages-to-nxproxy-side.patch. + Forward ClientMessages to nxproxy side. (Closes: #990649). + + Add 0003_randr-Do-not-update-ConnectionInfo-if-NULL.patch. + randr: Do not update ConnectionInfo if NULL (and avoid the nxagent + Xserver from crashing). (Closes: #990650). + + Add 0004_document-additional-options-only-nxagent-knows-about.patch. + Update man page and --help documentation of nxproxy/nxagent. + + Adjust 0004_document-additional-options-only-nxagent-knows-about.patch. + Version 3.5.99.26 does not yet have the textclipboard=<bool> session + parameter. + + -- Mike Gabriel <sunweaver@debian.org> Sat, 03 Jul 2021 20:42:32 +0200 + nx-libs (2:3.5.99.26-1) unstable; urgency=medium * New upstream release. diff -Nru nx-libs-3.5.99.26/debian/patches/0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch nx-libs-3.5.99.26/debian/patches/0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch --- nx-libs-3.5.99.26/debian/patches/0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch 1970-01-01 01:00:00.000000000 +0100 +++ nx-libs-3.5.99.26/debian/patches/0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch 2021-06-09 09:25:13.000000000 +0200 @@ -0,0 +1,86 @@ +From 1b4ebce2ce8ef29c01bd124ed56c9d6a14c9a82d Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller <uli42@gmx.de> +Date: Wed, 17 Mar 2021 22:17:55 +0100 +Subject: [PATCH] Compext.c: fix comparisons of 16bit sequence numbers + +rep->generic.sequenceNumber is of type CARD16 +state->sequence is of type unsigned long + +Converting state->sequence to an int as it has been done since the +first version of nxcomp I know of (1.3.0-18 from 2003) is wrong here +because for numbers > INT_MAX this will result in a negative number, +which, after applying the 16bit modulo, will not match +rep->generic.sequenceNumber. + +Example with numbers: + +CARD16 c = 24565 +unsigned long u = 3179110389 + +c % 65536 = 24565 +u % 65536 = 24565 + +(int)(u) = -1115856907 +(int)(u) % 65536 = -40971 + +-40971 will not match 24565 + +To fix this we need to ensure the number stays positive. We use CARD16 +for this to match the type in the request which is a 16bit number. On +my system CARD16 is unsigned short which is guaranteed to contain _at +least_ the 0-65,535 range. As there is no upper limit of the range we +cannot drop the modulo because we need this value to be 16bit and not +more. + +Thanks to Norm Green for providing log after log until we could +finally identify the reason for him seeing "Xlib: unexpected async +reply (sequence 0x94b01439)!" when pasting stopped working. + +Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +--- + nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c +index 4a8dacaf4..7a6cb9e30 100644 +--- a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c ++++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c +@@ -3435,7 +3435,7 @@ static Bool _NXCollectImageHandler(Display *dpy, xReply *rep, char *buf, + state = (_NXCollectImageState *) data; + + if ((rep -> generic.sequenceNumber % 65536) != +- ((int)(state -> sequence) % 65536)) ++ ((CARD16)(state -> sequence) % 65536)) + { + #ifdef TEST + fprintf(stderr, "******_NXCollectImageHandler: Unmatched sequence [%d] for opcode [%d] " +@@ -3819,7 +3819,7 @@ static Bool _NXCollectPropertyHandler(Display *dpy, xReply *rep, char *buf, + state = (_NXCollectPropertyState *) data; + + if ((rep -> generic.sequenceNumber % 65536) != +- ((int)(state -> sequence) % 65536)) ++ ((CARD16)(state -> sequence) % 65536)) + { + #ifdef TEST + fprintf(stderr, "******_NXCollectPropertyHandler: Unmatched sequence [%d] for opcode [%d] " +@@ -4173,7 +4173,7 @@ static Bool _NXCollectGrabPointerHandler(Display *dpy, xReply *rep, char *buf, + state = (_NXCollectGrabPointerState *) data; + + if ((rep -> generic.sequenceNumber % 65536) != +- ((int)(state -> sequence) % 65536)) ++ ((CARD16)(state -> sequence) % 65536)) + { + #ifdef TEST + fprintf(stderr, "******_NXCollectGrabPointerHandler: Unmatched sequence [%d] for opcode [%d] " +@@ -4447,7 +4447,7 @@ static Bool _NXCollectInputFocusHandler(Display *dpy, xReply *rep, char *buf, + state = (_NXCollectInputFocusState *) data; + + if ((rep -> generic.sequenceNumber % 65536) != +- ((int)(state -> sequence) % 65536)) ++ ((CARD16)(state -> sequence) % 65536)) + { + #ifdef TEST + fprintf(stderr, "******_NXCollectInputFocusHandler: Unmatched sequence [%d] for opcode [%d] " +-- +2.30.2 + diff -Nru nx-libs-3.5.99.26/debian/patches/0002_Forward-ClientMessages-to-nxproxy-side.patch nx-libs-3.5.99.26/debian/patches/0002_Forward-ClientMessages-to-nxproxy-side.patch --- nx-libs-3.5.99.26/debian/patches/0002_Forward-ClientMessages-to-nxproxy-side.patch 1970-01-01 01:00:00.000000000 +0100 +++ nx-libs-3.5.99.26/debian/patches/0002_Forward-ClientMessages-to-nxproxy-side.patch 2021-06-09 09:27:13.000000000 +0200 @@ -0,0 +1,128 @@ +From 36f804e549121fb56aa71979b7da5d75f2cc7cbe Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller <uli42@gmx.de> +Date: Sun, 2 May 2021 18:42:44 +0200 +Subject: [PATCH] Forward ClientMessages to nxproxy side + +This should help with clients requesting window manager actions like +maximizing or minimizing. This is a first version as it only handles +messages of type WM_STATE_CHANGE and _NET_WM_STATE. But ICCCM and EWMH +know some more. + +The other direction, setting of properties by the WM, is already +implemented in Rootless.c. + +Fixes ArcticaProject/nx-libs#1015 + +Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +--- + nx-X11/programs/Xserver/hw/nxagent/Events.c | 64 +++++++++++++++++++ + nx-X11/programs/Xserver/hw/nxagent/Events.h | 2 + + nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 6 ++ + 3 files changed, 72 insertions(+) + +diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c +index a342cdee1..2a3654731 100644 +--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c ++++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c +@@ -4505,6 +4505,70 @@ int nxagentWaitEvents(Display *dpy, useconds_t msec) + return 1; + } + ++void ForwardClientMessage(ClientPtr client, xSendEventReq *stuff) ++{ ++ Atom netwmstate = MakeAtom("_NET_WM_STATE", strlen("_NET_WM_STATE"), False); ++ Atom wmchangestate = MakeAtom("WM_CHANGE_STATE", strlen("WM_CHANGE_STATE"), False); ++ WindowPtr pWin = (WindowPtr)SecurityLookupWindow(stuff->destination, client, ++ DixReadAccess); ++ ++ if (stuff->event.u.clientMessage.u.l.type == netwmstate || stuff->event.u.clientMessage.u.l.type == wmchangestate) ++ { ++ if (pWin->drawable.id == pWin->drawable.pScreen->root->drawable.id) ++ { ++ #ifdef DEBUG ++ fprintf(stderr, "%s: dest [0x%x] window [0x%x] clmsg.type [%d]->[%d]\n", __func__, stuff->destination, stuff->event.u.clientMessage.window, stuff->event.u.clientMessage.u.l.type, nxagentLocalToRemoteAtom(stuff->event.u.clientMessage.u.l.type)); ++ #endif ++ ++ XEvent X = {0}; ++ X.xany.type = ClientMessage; ++ ++ WindowPtr pWin2 = (WindowPtr)SecurityLookupWindow(stuff->event.u.clientMessage.window, client, ++ DixReadAccess); ++ X.xclient.window = nxagentWindowPriv(pWin2)->window; ++ X.xclient.format = stuff->event.u.u.detail; ++ X.xclient.send_event = True; ++ X.xclient.serial = 0; ++ ++ if (X.xclient.format == 32) ++ { ++ X.xclient.message_type = nxagentLocalToRemoteAtom(stuff->event.u.clientMessage.u.l.type); ++ X.xclient.data.l[0] = stuff->event.u.clientMessage.u.l.longs0; ++ X.xclient.data.l[1] = nxagentLocalToRemoteAtom(stuff->event.u.clientMessage.u.l.longs1); ++ X.xclient.data.l[2] = nxagentLocalToRemoteAtom(stuff->event.u.clientMessage.u.l.longs2); ++ X.xclient.data.l[3] = nxagentLocalToRemoteAtom(stuff->event.u.clientMessage.u.l.longs3); ++ X.xclient.data.l[4] = nxagentLocalToRemoteAtom(stuff->event.u.clientMessage.u.l.longs4); ++ //X.xclient.data.l[3] = stuff->event.u.clientMessage.u.l.longs3; ++ //X.xclient.data.l[4] = stuff->event.u.clientMessage.u.l.longs4; ++ #ifdef DEBUG ++ for (int i = 0; i < 5; i++) ++ { ++ fprintf(stderr, "%s: data[%d] [%ld]\n", __func__, i, X.xclient.data.l[i]); ++ } ++ #endif ++ } ++ else ++ return; // ERROR! ++ ++ #ifdef DEBUG ++ fprintf(stderr, "%s: window [0x%lx]\n", __func__, X.xclient.window); ++ fprintf(stderr, "%s: message_type [%ld]\n", __func__, X.xclient.message_type); ++ fprintf(stderr, "%s: format [%d]\n", __func__, X.xclient.format); ++ #endif ++ ++ XlibWindow dest; ++ dest = DefaultRootWindow(nxagentDisplay); ++ ++ Status stat = XSendEvent(nxagentDisplay, dest, stuff->propagate, stuff->eventMask, &X); ++ XFlush(nxagentDisplay); ++ #ifdef DEBUG ++ fprintf(stderr, "%s: send to window [0x%lx]\n", __func__, dest); ++ fprintf(stderr, "%s: return Status [%d]\n", __func__, stat); ++ #endif ++ } ++ } ++} ++ + #ifdef NX_DEBUG_INPUT + + void nxagentGuessDumpInputInfo(ClientPtr client, Atom property, char *data) +diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h +index 42784a8f3..a334897ec 100644 +--- a/nx-X11/programs/Xserver/hw/nxagent/Events.h ++++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h +@@ -222,4 +222,6 @@ int nxagentPendingEvents(Display *dpy); + + int nxagentWaitEvents(Display *, useconds_t msec); + ++void ForwardClientMessage(ClientPtr client, xSendEventReq *stuff); ++ + #endif /* __Events_H__ */ +diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +index 84414c11f..fccc718b0 100644 +--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c ++++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +@@ -425,6 +425,12 @@ ProcSendEvent(ClientPtr client) + + REQUEST_SIZE_MATCH(xSendEventReq); + ++ if (nxagentOption(Rootless) && stuff->event.u.u.type == ClientMessage) ++ { ++ ForwardClientMessage(client, stuff); ++ return Success; ++ } ++ + if (stuff -> event.u.u.type == SelectionNotify) + { + if (nxagentSendNotify(&stuff->event) == 1) +-- +2.30.2 + diff -Nru nx-libs-3.5.99.26/debian/patches/0003_randr-Do-not-update-ConnectionInfo-if-NULL.patch nx-libs-3.5.99.26/debian/patches/0003_randr-Do-not-update-ConnectionInfo-if-NULL.patch --- nx-libs-3.5.99.26/debian/patches/0003_randr-Do-not-update-ConnectionInfo-if-NULL.patch 1970-01-01 01:00:00.000000000 +0100 +++ nx-libs-3.5.99.26/debian/patches/0003_randr-Do-not-update-ConnectionInfo-if-NULL.patch 2021-06-09 09:25:39.000000000 +0200 @@ -0,0 +1,47 @@ +From a14e1a59a4025cbb464b5deeed0f50d5a2898b0c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller <uli42@gmx.de> +Date: Wed, 17 Mar 2021 21:16:26 +0100 +Subject: [PATCH] randr: Do not update ConnectionInfo if NULL + +Backport of this xorg-xserver commit: + + commit 941aeb3b92e644923bd112eef8023f033a140ee6 + Author: Olivier Fourdan <ofourdan@redhat.com> + Date: Fri May 13 08:58:58 2016 +0200 + + randr: Do not update ConnectionInfo if NULL + + RRScreenSizeNotify() will update the connection information block, but + if this occurs during initialization before ConnectionInfo is even + initialized, this will lead to a crash. + + Simply check for ConnectionInfo prior to update it to avoid the crash. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> + +Fixes ArcticaProject/nx-libs#1009 + +Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +--- + nx-X11/programs/Xserver/randr/rrscreen.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c +index 4f59e9aea..90371704a 100644 +--- a/nx-X11/programs/Xserver/randr/rrscreen.c ++++ b/nx-X11/programs/Xserver/randr/rrscreen.c +@@ -66,6 +66,9 @@ RREditConnectionInfo(ScreenPtr pScreen) + int screen = 0; + int d; + ++ if (ConnectionInfo == NULL) ++ return; ++ + connSetup = (xConnSetup *) ConnectionInfo; + vendor = (char *) connSetup + sizeof(xConnSetup); + formats = (xPixmapFormat *) ((char *) vendor + +-- +2.30.2 + diff -Nru nx-libs-3.5.99.26/debian/patches/0004_document-additional-options-only-nxagent-knows-about.patch nx-libs-3.5.99.26/debian/patches/0004_document-additional-options-only-nxagent-knows-about.patch --- nx-libs-3.5.99.26/debian/patches/0004_document-additional-options-only-nxagent-knows-about.patch 1970-01-01 01:00:00.000000000 +0100 +++ nx-libs-3.5.99.26/debian/patches/0004_document-additional-options-only-nxagent-knows-about.patch 2021-07-03 20:40:48.000000000 +0200 @@ -0,0 +1,163 @@ +From 9b1dd340146ab62bfca9fc4c247edfbec2da2356 Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller <uli42@gmx.de> +Date: Sun, 7 Mar 2021 20:21:37 +0100 +Subject: [PATCH] document additional options only nxagent knows about + +Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + +[sunweaver] For Debian 11, shipping nx-libs 3.5.99.26 (with patches), the textclipboard= +[sunweaver] has been removed from this upstream patch. + +--- + .../programs/Xserver/hw/nxagent/man/nxagent.1 | 9 ++++ + nxcomp/src/Misc.cpp | 41 +++++++++-------- + nxproxy/man/nxproxy.1 | 44 +++++++++++-------- + 3 files changed, 58 insertions(+), 36 deletions(-) + +--- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 ++++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +@@ -459,6 +459,9 @@ + .B \-forcenx + force use of NX protocol messages assuming communication through \fBnxproxy\fR + .TP 8 ++.B \-id \fIstring\fP ++The session id. ++.TP 8 + .B \-autograb + enable autograb mode on \fBnxagent\fR startup. The autograb feature can be toggled via nxagent keystrokes + .TP 8 +@@ -740,6 +743,9 @@ + type of connecting operating system (supported: \fIlinux\fR, + \fIwindows\fR, \fIsolaris\fR and \fImacosx\fR) + .TP 8 ++.B clients=<string> ++filename where to log output of the nxagent's clients. This is ignored if no session id has been provided. It then points to stderr. Default: <sessiondir>/clients. ++.TP 8 + .B shadow=<string> + define the display that should be shadowed + .TP 8 +@@ -749,6 +755,9 @@ + .B shadowmode=<bool> + full access (set to \fI1\fR) or viewing-only (set to \fI0\fR, default) + .TP 8 ++.B state=<string> ++filename where to store the state of the nxagent (for easier interoperation with software like x2go. Default: sessiondir/state. ++.TP 8 + .B defer=<int> + defer image updates (enabled for all connection types except LAN), + accepts values \fI0\fR, \fI1\fR and \fI2\fR +--- a/nxcomp/src/Misc.cpp ++++ b/nxcomp/src/Misc.cpp +@@ -326,31 +326,35 @@ + a program providing encryption of the point to point\n\ + communication.\n\ + \n\ +-rootless=b\n\ +-geometry=s\n\ +-resize=b\n\ +-fullscreen=b\n\ +-keyboard=s\n\ +-clipboard=s\n\ +-streaming=n\n\ ++autodpi=b\n\ ++autograb=b\n\ + backingstore=n\n\ ++client=s\n\ ++clients=s\n\ ++clipboard=s\n\ + composite=n\n\ +-xinerama=n\n\ +-shmem=b\n\ +-shpix=b\n\ ++copysize=n\n\ ++defer=n\n\ ++fullscreen=n\n\ ++geometry=s\n\ + kbtype=s\n\ +-client=s\n\ ++keyboard=s\n\ ++keyconv=s\n\ ++magicpixel=b\n\ ++menu=n\n\ ++resize=b\n\ ++rootless=b\n\ + shadow=n\n\ +-shadowuid=n\n\ + shadowmode=s\n\ +-defer=n\n\ +-tile=s\n\ +-menu=n\n\ +-magicpixel=n\n\ +-autodpi=n\n\ ++shadowuid=n\n\ ++shmem=b\n\ ++shpix=b\n\ + sleep=n\n\ ++state=s\n\ ++streaming=n\n\ ++tile=s\n\ + tolerancechecks=s\n\ +-keyconv=s\n\ ++xinerama=b\n\ + These options are interpreted by the NX agent. They\n\ + are ignored by the proxy.\n\ + \n\ +--- a/nxproxy/man/nxproxy.1 ++++ b/nxproxy/man/nxproxy.1 +@@ -305,31 +305,38 @@ + encryption of the point to point communication. + + .TP 8 +-.I These options are interpreted by the nx-NX Agent. They are ignored by the proxy. ++.I The following options are interpreted by the nx-NX Agent. They are ignored by the proxy: + +- rootless=<bool> +- geometry=<string> +- resize=<bool> +- fullscreen=<bool> +- keyboard=<string> +- clipboard=<int> +- streaming=<int> ++ autodpi=<bool> ++ autograb=<bool> + backingstore=<int> ++ client=<string> ++ clients=<string> ++ clipboard=<int> + composite=<int> +- xinerama=<int> +- shmem=<bool> +- shpix=<bool> ++ copysize=<int> ++ defer=<int> ++ fullscreen=<bool> ++ geometry=<string> + kbtype=<string> +- client=<string> ++ keyboard=<string> ++ keyconv=<string> ++ magicpixel=<bool> ++ menu=<int> ++ resize=<bool> ++ rootless=<bool> + shadow=<int> +- shadowuid=<int> + shadowmode=<string> +- defer=<int> +- tile=<string> +- menu=<int> +- magicpixel=<bool> +- autodpi=<bool> ++ shadowuid=<int> ++ shmem=<bool> ++ shpix=<bool> + sleep=<int> ++ state=<string> ++ streaming=<int> ++ tile=<string> ++ tolerancechecks=<int> ++ xinerama=<int> ++ + + .SH NX ENVIRONMENT VARIABLES + diff -Nru nx-libs-3.5.99.26/debian/patches/series nx-libs-3.5.99.26/debian/patches/series --- nx-libs-3.5.99.26/debian/patches/series 2021-02-04 14:44:30.000000000 +0100 +++ nx-libs-3.5.99.26/debian/patches/series 2021-07-03 20:35:05.000000000 +0200 @@ -1,2 +1,6 @@ 2001_nx-X11_install-location.debian.patch 2003_nxdialog-use-python3.patch +0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch +0002_Forward-ClientMessages-to-nxproxy-side.patch +0003_randr-Do-not-update-ConnectionInfo-if-NULL.patch +0004_document-additional-options-only-nxagent-knows-about.patch
Attachment:
pgpdtnNxQBwAN.pgp
Description: Digitale PGP-Signatur