[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#928867: unblock: nx-libs/2:3.5.99.19-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package nx-libs

+  * debian/patches (cherry-picked from upstream):
+    + Add 0001_nxagent-Determine-nxagentProgName-only-once.patch. Keep flavour 
+      mode (i.e., running as nxagent or x2goagent) after session resumptions.
+      (Closes: #928760).

The above fix is release relevant. The x2goagent executable (provided as
a symlink in x2goserver-x2goagent pointing to the nxagent executable)
behaves unexpectedly after session resumption. This is esp. noticable
when using NX keystrokes and having them customized. At X2Go session
startup, the keystrokes are read from user/system config files resting in
the X2Go namespace. After session suspend+resume, the keystroke files is
re-read, but then from NX namespace'ish paths.

+    + Add 0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch.
+      Cosmetic fix in nxdialog's error output.

Correct cmdline option referenced in an nxdialog error message.

unblock nx-libs/2:3.5.99.19-2

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru nx-libs-3.5.99.19/debian/changelog nx-libs-3.5.99.19/debian/changelog
--- nx-libs-3.5.99.19/debian/changelog	2019-03-01 23:24:49.000000000 +0100
+++ nx-libs-3.5.99.19/debian/changelog	2019-05-12 11:08:25.000000000 +0200
@@ -1,3 +1,14 @@
+nx-libs (2:3.5.99.19-2) unstable; urgency=medium
+
+  * debian/patches (cherry-picked from upstream):
+    + Add 0001_nxagent-Determine-nxagentProgName-only-once.patch. Keep flavour 
+      mode (i.e., running as nxagent or x2goagent) after session resumptions.
+      (Closes: #928760).
+    + Add 0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch.
+      Cosmetic fix in nxdialog's error output.
+
+ -- Mike Gabriel <sunweaver@debian.org>  Sun, 12 May 2019 11:08:25 +0200
+
 nx-libs (2:3.5.99.19-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru nx-libs-3.5.99.19/debian/patches/0001_nxagent-Determine-nxagentProgName-only-once.patch nx-libs-3.5.99.19/debian/patches/0001_nxagent-Determine-nxagentProgName-only-once.patch
--- nx-libs-3.5.99.19/debian/patches/0001_nxagent-Determine-nxagentProgName-only-once.patch	1970-01-01 01:00:00.000000000 +0100
+++ nx-libs-3.5.99.19/debian/patches/0001_nxagent-Determine-nxagentProgName-only-once.patch	2019-05-12 11:05:05.000000000 +0200
@@ -0,0 +1,86 @@
+From 3c9ee1ff7bc78d91b28eb52f8d15b4f3bf514be1 Mon Sep 17 00:00:00 2001
+From: Ulrich Sibiller <uli42@gmx.de>
+Date: Wed, 8 May 2019 23:21:30 +0200
+Subject: [PATCH] nxagent: Determine nxagentProgName only once
+
+also add TEST prints, init nxagentProgName with NULL and add const
+where it was missing.
+
+Fixes ArcticaProject/nx-libs#803
+---
+ nx-X11/programs/Xserver/hw/nxagent/Args.c | 28 +++++++++++++++++------
+ nx-X11/programs/Xserver/hw/nxagent/Init.c |  7 +++++-
+ 2 files changed, 27 insertions(+), 8 deletions(-)
+
+diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
+index 949892f25..607dab9bf 100644
+--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
++++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
+@@ -126,7 +126,7 @@ extern int _XGetBitsPerPixel(Display *dpy, int depth);
+ 
+ extern char dispatchExceptionAtReset;
+ 
+-char *nxagentProgName;
++const char *nxagentProgName = NULL;
+ 
+ char nxagentDisplayName[NXAGENTDISPLAYNAMELENGTH];
+ Bool nxagentSynchronize = False;
+@@ -186,17 +186,31 @@ char *nxagentKeystrokeFile = NULL;
+ int ddxProcessArgument(int argc, char *argv[], int i)
+ {
+   /*
+-   * Ensure that the options are set to their defaults.
++   * The flavour can never change, so only set it once.
++   *
++   * FIXME: ddxProcessArgument() is called once for every command line
++   * argument, with argv[0] being the argument and not the program
++   * name! We should move this check somewhere else.
+    */
++  if (nxagentProgName == NULL)
++  {
++    char *basec = strdup(argv[0]);
++    nxagentProgName = strdup(basename(basec));
++    free(basec);
+ 
+-  char *basec = strdup(argv[0]);
+-  nxagentProgName = strdup(basename(basec));
+-  free(basec);
++    /*
++     * Check if we are running as X2Go Agent
++     */
++    checkX2goAgent();
++  }
++
++  #ifdef TEST
++  fprintf(stderr, "%s: argv[0] [%s]  nxagentProgName [%s]\n", __func__, argv[0], nxagentProgName);
++  #endif
+ 
+   /*
+-   * Check if we running as X2Go Agent
++   * Ensure that the options are set to their defaults.
+    */
+-  checkX2goAgent();
+ 
+   static Bool resetOptions = True;
+ 
+diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
+index d95c4b70f..d02af3f8d 100644
+--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
++++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
+@@ -194,7 +194,12 @@ int nxagentX2go;
+ 
+ void checkX2goAgent(void)
+ {
+-  extern char *nxagentProgName;
++  extern const char *nxagentProgName;
++
++  #ifdef TEST
++  fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName);
++  #endif
++
+   if( strcasecmp(nxagentProgName,"x2goagent") == 0)
+   {
+     fprintf(stderr, "\nrunning as X2Go Agent\n");
+-- 
+2.20.1
+
diff -Nru nx-libs-3.5.99.19/debian/patches/0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch nx-libs-3.5.99.19/debian/patches/0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch
--- nx-libs-3.5.99.19/debian/patches/0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch	1970-01-01 01:00:00.000000000 +0100
+++ nx-libs-3.5.99.19/debian/patches/0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch	2019-05-12 11:04:53.000000000 +0200
@@ -0,0 +1,27 @@
+From 2a10438f79000d4a4e503db88e5b713f253bfdce Mon Sep 17 00:00:00 2001
+From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+Date: Wed, 17 Apr 2019 10:52:00 +0200
+Subject: [PATCH] nxdialog/bin/nxdialog: Fix error dialog-type-not-supplied
+ error message.
+
+Fixes ArcticaProject/nx-libs#793.
+---
+ nxdialog/bin/nxdialog | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nxdialog/bin/nxdialog b/nxdialog/bin/nxdialog
+index bce1886e3..c8355423d 100755
+--- a/nxdialog/bin/nxdialog
++++ b/nxdialog/bin/nxdialog
+@@ -334,7 +334,7 @@ class NxDialogProgram(object):
+         """ Disconnect/terminate NX session upon user's request. """
+ 
+         if not self.options.dialog_type:
+-            sys.stderr.write("Dialog type not supplied via --type\n")
++            sys.stderr.write("Dialog type not supplied via --dialog\n")
+             sys.exit(EXIT_FAILURE)
+ 
+         dlgtype = self.options.dialog_type
+-- 
+2.20.1
+
diff -Nru nx-libs-3.5.99.19/debian/patches/series nx-libs-3.5.99.19/debian/patches/series
--- nx-libs-3.5.99.19/debian/patches/series	2019-03-01 23:24:33.000000000 +0100
+++ nx-libs-3.5.99.19/debian/patches/series	2019-05-12 11:05:58.000000000 +0200
@@ -2,3 +2,5 @@
 2002_xserver-xext_set-securitypolicy-path.debian.patch
 2003_nxdialog-use-python3.patch
 2004_enforce-lpthread.patch
+0001_nxagent-Determine-nxagentProgName-only-once.patch
+0002_nxdialog-bin-nxdialog-Fix-error-dialog-type-not-supp.patch

Reply to: