Bug#990651: unblock: nx-libs/2:3.5.99.26-2

2021-07-04 Thread Mike Gabriel

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: sunwea...@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.0 +0100
+++ nx-libs-3.5.99.26/debian/changelog  2021-07-03 20:42:32.0 +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= session
+  parameter.
+
+ -- Mike Gabriel   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.0 +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.0 +0200
@@ -0,0 +1,86 @@
+From 1b4ebce2ce8ef29c01bd124ed56c9d6a14c9a82d Mon Sep 17 00:00:00 2001
+From: Ulrich Sibiller 
+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 
+---
+ 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 

Bug#990651: unblock: nx-libs/2:3.5.99.26-2

2021-07-04 Thread Sebastian Ramacher
Control: tags -1 moreinfo

On 2021-07-03 22:17:59 +0200, Mike Gabriel wrote:
> Package: release.debian.org
> Severity: normal
> User: release.debian@packages.debian.org
> Usertags: unblock
> 
> Please unblock package nx-libs
> 
> [ Reason ]
> Several important upstream issues have recently been resolved in nx-libs.
> The fixes for those issues have been cherry-picked into this version of
> Debian's nx-libs package.
> 
> +  * debian/patches:
> ++ Add 0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch.
> +  Compext.c: fix comparisons of 16bit sequence numbers. (Closes:
> +  #990647).
> 
> -> Fixes flawed 16 bit comparison. This resolves an "Xlib: unexpected async
> reply (sequence 0x94b01439)!" and clipboard pasting being broken afterwards.
> 
> ++ Add 0002_Forward-ClientMessages-to-nxproxy-side.patch.
> +  Forward ClientMessages to nxproxy side. (Closes: #990649).
> 
> -> Resolve window control problems with client side decorated windows if
> nxagent is used in rootless/seamless session mode.
> 
> ++ 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).
> 
> -> Regression fix of unknown origin. Could be resolved by cherry-picking
> a commit original from X.Org upstream. 
> 
> ++ Add 0004_document-additional-options-only-nxagent-knows-about.patch.
> +  Update man page and --help documentation of nxproxy/nxagent.
> 
> -> Recently, upstream added a documentation improvement that now
> documents various session options that were undocumented before.
> 
> ++ Adjust 0004_document-additional-options-only-nxagent-knows-about.patch.
> +  Version 3.5.99.26 does not yet have the textclipboard= session
> +  parameter.
> 
> -> The above patch added one option that is not yet available in 3.5.99.26,
> So we removed this bit of documenation for nx-libs in Debian (bullseye).
> 
> 
> [ Impact ]
> The "connect to local X11 desktop" (shadow session support) would be broken, 
> 
> The clipboard between nxagent and the local Xserver might break in some 
> situations.
> 
> There would be problems with client side decorated windows.
> 
> There would be undocumented options.
> 
> [ Tests ]
> Manual tests.
> 
> [ Risks ]
> X2Go sessions being busted if some of the above commits is flawed.
> 
> [ Checklist ]
>   [x] all changes are documented in the d/changelog
>   [x] I reviewed all changes and I approve them
>   [x] attach debdiff against the package in testing

The debdiff appears to be missing.

Cheers

> 
> [ Other info ]
> None.
> 
> unblock nx-libs/2:3.5.99.26-2
> 

-- 
Sebastian Ramacher


signature.asc
Description: PGP signature


Bug#990651: unblock: nx-libs/2:3.5.99.26-2

2021-07-03 Thread Mike Gabriel
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

Please unblock package nx-libs

[ Reason ]
Several important upstream issues have recently been resolved in nx-libs.
The fixes for those issues have been cherry-picked into this version of
Debian's nx-libs package.

+  * debian/patches:
++ Add 0001_Compext.c-fix-comparisons-of-16bit-sequence-numbers.patch.
+  Compext.c: fix comparisons of 16bit sequence numbers. (Closes:
+  #990647).

-> Fixes flawed 16 bit comparison. This resolves an "Xlib: unexpected async
reply (sequence 0x94b01439)!" and clipboard pasting being broken afterwards.

++ Add 0002_Forward-ClientMessages-to-nxproxy-side.patch.
+  Forward ClientMessages to nxproxy side. (Closes: #990649).

-> Resolve window control problems with client side decorated windows if
nxagent is used in rootless/seamless session mode.

++ 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).

-> Regression fix of unknown origin. Could be resolved by cherry-picking
a commit original from X.Org upstream. 

++ Add 0004_document-additional-options-only-nxagent-knows-about.patch.
+  Update man page and --help documentation of nxproxy/nxagent.

-> Recently, upstream added a documentation improvement that now
documents various session options that were undocumented before.

++ Adjust 0004_document-additional-options-only-nxagent-knows-about.patch.
+  Version 3.5.99.26 does not yet have the textclipboard= session
+  parameter.

-> The above patch added one option that is not yet available in 3.5.99.26,
So we removed this bit of documenation for nx-libs in Debian (bullseye).


[ Impact ]
The "connect to local X11 desktop" (shadow session support) would be broken, 

The clipboard between nxagent and the local Xserver might break in some 
situations.

There would be problems with client side decorated windows.

There would be undocumented options.

[ Tests ]
Manual tests.

[ Risks ]
X2Go sessions being busted if some of the above commits is flawed.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
None.

unblock nx-libs/2:3.5.99.26-2