[Pkg-tigervnc-devel] Bug#985790: unblock: tigervnc/1.11.0+dfsg-2

Joachim Falk joachim.falk at gmx.de
Tue Mar 23 17:39:16 GMT 2021


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock
X-Debbugs-Cc: pkg-tigervnc-devel at lists.alioth.debian.org

Please unblock package tigervnc

[ Reason ]
Fix for bug #985614.

[ Impact ]
Sharing a VNC session is not possible.

[ Tests ]
I applied the bug fix from upstream and tested that this fixes
the reported bug #985614.

[ Risks ]
TigerVNC is a leaf package, the changes are not complex, and
the applied patch has already been tested by upstream.

[ 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

unblock tigervnc/1.11.0+dfsg-2
-------------- next part --------------
diff -Nru tigervnc-1.11.0+dfsg/debian/changelog tigervnc-1.11.0+dfsg/debian/changelog
--- tigervnc-1.11.0+dfsg/debian/changelog	2021-02-22 18:19:01.000000000 +0100
+++ tigervnc-1.11.0+dfsg/debian/changelog	2021-03-22 22:21:28.000000000 +0100
@@ -1,3 +1,11 @@
+tigervnc (1.11.0+dfsg-2) unstable; urgency=medium
+
+  [ Joachim Falk ]
+  * Properly handle boolean configuration values in tigervnc-standalone-server
+    (Closes: #985614).
+
+ -- Joachim Falk <joachim.falk at gmx.de>  Mon, 22 Mar 2021 22:21:54 +0100
+
 tigervnc (1.11.0+dfsg-1) unstable; urgency=medium

   [ Joachim Falk ]
diff -Nru tigervnc-1.11.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm tigervnc-1.11.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm
--- tigervnc-1.11.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm	2021-02-21 15:24:17.000000000 +0100
+++ tigervnc-1.11.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm	2021-03-22 13:46:46.000000000 +0100
@@ -402,7 +402,7 @@
               &{$override}('shared', undef);
             }
           } elsif (defined $options->{'shared'}) {
-            return $options->{'shared'} eq 'never';
+            return $options->{'shared'} eq 'never' ? 1 : 0;
           } else {
             return undef;
           }
@@ -415,7 +415,7 @@
               &{$override}('shared', undef);
             }
           } elsif (defined $options->{'shared'}) {
-            return $options->{'shared'} eq 'always';
+            return $options->{'shared'} eq 'always' ? 1 : 0;
           } else {
             return undef;
           }
diff -Nru tigervnc-1.11.0+dfsg/debian/patches/0300-fix-Xtigervnc-boolparam-parsing.patch tigervnc-1.11.0+dfsg/debian/patches/0300-fix-Xtigervnc-boolparam-parsing.patch
--- tigervnc-1.11.0+dfsg/debian/patches/0300-fix-Xtigervnc-boolparam-parsing.patch	1970-01-01 01:00:00.000000000 +0100
+++ tigervnc-1.11.0+dfsg/debian/patches/0300-fix-Xtigervnc-boolparam-parsing.patch	2021-03-22 13:58:35.000000000 +0100
@@ -0,0 +1,142 @@
+Description: Tolerate specifying -BoolParam 0 and similar
+ .
+ This is needed by vncserver which doesn't know which parameters are boolean,
+ and it cannot use the -Param=Value form as that isn't tolerated by the Xorg
+ code.
+ .
+ This patch is upstream commit 38c6848b30cb1908171f2b4628e345fbf6727b39
+Author: Pierre Ossman <ossman at cendio.se>
+
+diff --git a/unix/vncserver/vncserver.in b/unix/vncserver/vncserver.in
+index 25fbbd31..261b258f 100755
+--- a/unix/vncserver/vncserver.in
++++ b/unix/vncserver/vncserver.in
+@@ -107,7 +107,7 @@ $default_opts{rfbwait} = 30000;
+ $default_opts{rfbauth} = "$vncUserDir/passwd";
+ $default_opts{rfbport} = $vncPort;
+ $default_opts{fp} = $fontPath if ($fontPath);
+-$default_opts{pn} = "";
++$default_opts{pn} = undef;
+
+ # Load user-overrideable system defaults
+ LoadConfig($vncSystemConfigDefaultsFile);
+@@ -242,13 +242,13 @@ push(@cmd, "@CMAKE_INSTALL_FULL_BINDIR@/Xvnc", ":$displayNumber");
+
+ foreach my $k (sort keys %config) {
+   push(@cmd, "-$k");
+-  push(@cmd, $config{$k}) if $config{$k};
++  push(@cmd, $config{$k}) if defined($config{$k});
+   delete $default_opts{$k}; # file options take precedence
+ }
+
+ foreach my $k (sort keys %default_opts) {
+   push(@cmd, "-$k");
+-  push(@cmd, $default_opts{$k}) if $default_opts{$k};
++  push(@cmd, $default_opts{$k}) if defined($default_opts{$k});
+ }
+
+ warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n";
+@@ -291,7 +291,7 @@ sub LoadConfig {
+           # current config file being loaded defined the logical opposite setting
+           # (NeverShared vs. AlwaysShared, etc etc).
+           $toggle = lc($1); # must normalize key case
+-          $config{$toggle} = $k;
++          $config{$toggle} = undef;
+         }
+       }
+       close(IN);
+diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc
+index f108fae4..7c32bea8 100644
+--- a/unix/xserver/hw/vnc/RFBGlue.cc
++++ b/unix/xserver/hw/vnc/RFBGlue.cc
+@@ -143,6 +143,22 @@ const char* vncGetParamDesc(const char *name)
+   return param->getDescription();
+ }
+
++int vncIsParamBool(const char *name)
++{
++  VoidParameter *param;
++  BoolParameter *bparam;
++
++  param = rfb::Configuration::getParam(name);
++  if (param == NULL)
++    return false;
++
++  bparam = dynamic_cast<BoolParameter*>(param);
++  if (bparam == NULL)
++    return false;
++
++  return true;
++}
++
+ int vncGetParamCount(void)
+ {
+   int count;
+diff --git a/unix/xserver/hw/vnc/RFBGlue.h b/unix/xserver/hw/vnc/RFBGlue.h
+index 112405b8..695cea10 100644
+--- a/unix/xserver/hw/vnc/RFBGlue.h
++++ b/unix/xserver/hw/vnc/RFBGlue.h
+@@ -41,6 +41,7 @@ int vncSetParam(const char *name, const char *value);
+ int vncSetParamSimple(const char *nameAndValue);
+ char* vncGetParam(const char *name);
+ const char* vncGetParamDesc(const char *name);
++int vncIsParamBool(const char *name);
+
+ int vncGetParamCount(void);
+ char *vncGetParamList(void);
+diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
+index 4eb0b0b1..5744acac 100644
+--- a/unix/xserver/hw/vnc/xvnc.c
++++ b/unix/xserver/hw/vnc/xvnc.c
+@@ -618,6 +618,20 @@ ddxProcessArgument(int argc, char *argv[], int i)
+         exit(0);
+     }
+
++    /* We need to resolve an ambiguity for booleans */
++    if (argv[i][0] == '-' && i+1 < argc &&
++        vncIsParamBool(&argv[i][1])) {
++        if ((strcasecmp(argv[i+1], "0") == 0) ||
++            (strcasecmp(argv[i+1], "1") == 0) ||
++            (strcasecmp(argv[i+1], "true") == 0) ||
++            (strcasecmp(argv[i+1], "false") == 0) ||
++            (strcasecmp(argv[i+1], "yes") == 0) ||
++            (strcasecmp(argv[i+1], "no") == 0)) {
++            vncSetParam(&argv[i][1], argv[i+1]);
++            return 2;
++        }
++    }
++
+     if (vncSetParamSimple(argv[i]))
+ 	return 1;
+
+diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
+index d4dd3063..77ba3d3f 100644
+--- a/vncviewer/vncviewer.cxx
++++ b/vncviewer/vncviewer.cxx
+@@ -556,6 +556,26 @@ int main(int argc, char** argv)
+   }
+
+   for (int i = 1; i < argc;) {
++    /* We need to resolve an ambiguity for booleans */
++    if (argv[i][0] == '-' && i+1 < argc) {
++        VoidParameter *param;
++
++        param = Configuration::getParam(&argv[i][1]);
++        if ((param != NULL) &&
++            (dynamic_cast<BoolParameter*>(param) != NULL)) {
++          if ((strcasecmp(argv[i+1], "0") == 0) ||
++              (strcasecmp(argv[i+1], "1") == 0) ||
++              (strcasecmp(argv[i+1], "true") == 0) ||
++              (strcasecmp(argv[i+1], "false") == 0) ||
++              (strcasecmp(argv[i+1], "yes") == 0) ||
++              (strcasecmp(argv[i+1], "no") == 0)) {
++              param->setParam(argv[i+1]);
++              i += 2;
++              continue;
++          }
++      }
++    }
++
+     if (Configuration::setParam(argv[i])) {
+       i++;
+       continue;
diff -Nru tigervnc-1.11.0+dfsg/debian/patches/series tigervnc-1.11.0+dfsg/debian/patches/series
--- tigervnc-1.11.0+dfsg/debian/patches/series	2021-02-21 15:24:54.000000000 +0100
+++ tigervnc-1.11.0+dfsg/debian/patches/series	2021-03-22 13:59:06.000000000 +0100
@@ -10,6 +10,7 @@
 0205-defined-CMAKE_INSTALL_FULL_BINDIR.patch
 0210-use-tigervncsession-name.patch
 0220-remove-systemd-service-obsolete-syslog-target.patch
+0300-fix-Xtigervnc-boolparam-parsing.patch

 # These patches are lifted from RedHat
 rh/0904-Added-RH-patch-tigervnc11-rh588342.patch-which-fixes.patch


More information about the Pkg-tigervnc-devel mailing list