armin76     15/02/23 09:54:53

  Added:                001_cookie.patch 005_ldnow.patch
                        010_libvnc-os.patch 015_rh692048.patch
                        025_inetd-nowait.patch 030_manpages.patch
                        035_getmaster.patch 040_format-security-patch.patch
                        055_xstartup.patch
                        1000_server_xserver-1.16-rebased.patch
                        1005_server_xserver-1.17.patch
  Log:
  Add patchset for 1.4.2

Revision  Changes    Path
1.1                  src/patchsets/tigervnc/1.4.2/001_cookie.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/001_cookie.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/001_cookie.patch?rev=1.1&content-type=text/plain

Index: 001_cookie.patch
===================================================================
diff -up tigervnc-1.0.90-20091221svn3929/unix/vncserver.cookie 
tigervnc-1.0.90-20091221svn3929/unix/vncserver
--- tigervnc-1.0.90-20091221svn3929/unix/vncserver.cookie       2009-11-12 
11:39:54.000000000 +0100
+++ tigervnc-1.0.90-20091221svn3929/unix/vncserver      2009-12-21 
16:15:01.907799091 +0100
@@ -189,27 +189,12 @@ $vncPort = 5900 + $displayNumber;
 $desktopLog = "$vncUserDir/$host:$displayNumber.log";
 unlink($desktopLog);
 
-# Make an X server cookie - use /dev/urandom on systems that have it,
-# otherwise use perl's random number generator, seeded with the sum
-# of the current time, our PID and part of the encrypted form of the password.
-
-my $cookie = "";
-if (open(URANDOM, '<', '/dev/urandom')) {
-  my $randata;
-  if (sysread(URANDOM, $randata, 16) == 16) {
-    $cookie = unpack 'h*', $randata;
-  }
-  close(URANDOM);
-}
-if ($cookie eq "") {
-  srand(time+$$+unpack("L",`cat $vncUserDir/passwd`));
-  for (1..16) {
-    $cookie .= sprintf("%02x", int(rand(256)) % 256);
-  }
-}
-
-system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie");
-system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie"); 
+# Make an X server cookie - use mcookie
+$cookie = `/usr/bin/mcookie`;
+open (XAUTH, "|xauth -f $xauthorityFile source -");
+print XAUTH "add $host:$displayNumber . $cookie\n";
+print XAUTH "add $host/unix:$displayNumber . $cookie\n";
+close XAUTH;
 
 if ($opt{'-name'}) {
     $desktopName = $opt{'-name'};



1.1                  src/patchsets/tigervnc/1.4.2/005_ldnow.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/005_ldnow.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/005_ldnow.patch?rev=1.1&content-type=text/plain

Index: 005_ldnow.patch
===================================================================
diff -up tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am.ldnow 
tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am
--- tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am.ldnow        2011-10-31 
09:14:40.000000000 +0100
+++ tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am      2012-08-22 
15:51:47.013241342 +0200
@@ -53,7 +53,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I
        -I$(top_srcdir)/include \
        ${XSERVERLIBS_CFLAGS} -I$(includedir)
 
-libvnc_la_LDFLAGS = -module -avoid-version
+libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
 
 libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS)
 



1.1                  src/patchsets/tigervnc/1.4.2/010_libvnc-os.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/010_libvnc-os.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/010_libvnc-os.patch?rev=1.1&content-type=text/plain

Index: 010_libvnc-os.patch
===================================================================
diff -up tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am.gethomedir 
tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am
--- tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am.gethomedir   2012-08-22 
15:52:01.876216608 +0200
+++ tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am      2012-08-22 
15:52:45.973143684 +0200
@@ -5,6 +5,7 @@ RFB_LIB=$(LIB_DIR)/rfb/librfb.la
 RDR_LIB=$(LIB_DIR)/rdr/librdr.la
 NETWORK_LIB=$(LIB_DIR)/network/libnetwork.la
 XREGION_LIB=$(LIB_DIR)/Xregion/libXregion.la
+OS_LIB=$(LIB_DIR)/os/libos.la
 COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB)
 
 noinst_LTLIBRARIES = libvnccommon.la
@@ -55,7 +56,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I
 
 libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
 
-libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS)
+libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(OS_LIB)
 
 EXTRA_DIST = Xvnc.man
 



1.1                  src/patchsets/tigervnc/1.4.2/015_rh692048.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/015_rh692048.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/015_rh692048.patch?rev=1.1&content-type=text/plain

Index: 015_rh692048.patch
===================================================================
diff -up tigervnc-1.4.2/common/rfb/SecurityClient.cxx.rh692048 
tigervnc-1.4.2/common/rfb/SecurityClient.cxx
--- tigervnc-1.4.2/common/rfb/SecurityClient.cxx.rh692048       2015-02-12 
18:32:50.168861186 +0000
+++ tigervnc-1.4.2/common/rfb/SecurityClient.cxx        2015-02-12 
18:33:13.168003696 +0000
@@ -49,7 +49,7 @@ StringParameter SecurityClient::secTypes
 #endif
  ")",
 #ifdef HAVE_GNUTLS
- "X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None",
+ "VeNCrypt,X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None",
 #else
  "VncAuth,None",
 #endif
diff -up tigervnc-1.4.2/common/rfb/Security.cxx.rh692048 
tigervnc-1.4.2/common/rfb/Security.cxx
--- tigervnc-1.4.2/common/rfb/Security.cxx.rh692048     2015-01-23 
23:37:23.000000000 +0000
+++ tigervnc-1.4.2/common/rfb/Security.cxx      2015-02-12 18:32:50.168861186 
+0000
@@ -68,7 +68,6 @@ const std::list<rdr::U8> Security::GetEn
   list<rdr::U8> result;
   list<U32>::iterator i;
 
-  result.push_back(secTypeVeNCrypt);
   for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++)
     if (*i < 0x100)
       result.push_back(*i);
@@ -106,8 +105,6 @@ bool Security::IsSupported(U32 secType)
   for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++)
     if (*i == secType)
       return true;
-  if (secType == secTypeVeNCrypt)
-    return true;
 
   return false;
 }
diff -up tigervnc-1.4.2/common/rfb/SecurityServer.cxx.rh692048 
tigervnc-1.4.2/common/rfb/SecurityServer.cxx
--- tigervnc-1.4.2/common/rfb/SecurityServer.cxx.rh692048       2015-02-12 
18:32:50.168861186 +0000
+++ tigervnc-1.4.2/common/rfb/SecurityServer.cxx        2015-02-12 
18:33:24.977076868 +0000
@@ -43,7 +43,7 @@ StringParameter SecurityServer::secTypes
 #endif
  ")",
 #ifdef HAVE_GNUTLS
- "TLSVnc,VncAuth",
+ "VncAuth",
 #else
  "VncAuth",
 #endif



1.1                  src/patchsets/tigervnc/1.4.2/025_inetd-nowait.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/025_inetd-nowait.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/025_inetd-nowait.patch?rev=1.1&content-type=text/plain

Index: 025_inetd-nowait.patch
===================================================================
diff -up 
tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.cxx.inetd-nowait 
tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.cxx
--- tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.cxx.inetd-nowait   
2013-05-23 12:20:35.836386218 +0100
+++ tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.cxx        
2013-05-23 12:23:04.698003213 +0100
@@ -325,18 +325,12 @@ bool TcpSocket::cork(int sock, bool enab
 #endif
 }
 
-bool TcpSocket::isSocket(int sock)
+bool TcpSocket::isListening(int sock)
 {
-  struct sockaddr_in info;
-  socklen_t info_size = sizeof(info);
-  return getsockname(sock, (struct sockaddr *)&info, &info_size) >= 0;
-}
-
-bool TcpSocket::isConnected(int sock)
-{
-  struct sockaddr_in info;
-  socklen_t info_size = sizeof(info);
-  return getpeername(sock, (struct sockaddr *)&info, &info_size) >= 0;
+  int listening = 0;
+  socklen_t listening_size = sizeof(listening);
+  return getsockopt(sock, SOL_SOCKET, SO_ACCEPTCONN, &listening,
+                    &listening_size) >= 0 && listening;
 }
 
 int TcpSocket::getSockPort(int sock)
diff -up 
tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.h.inetd-nowait 
tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.h
--- tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.h.inetd-nowait     
2013-05-23 12:20:35.835386220 +0100
+++ tigervnc-1.2.80-20130314svn5065/common/network/TcpSocket.h  2013-05-23 
12:21:58.861730647 +0100
@@ -57,8 +57,7 @@ namespace network {
 
     static bool enableNagles(int sock, bool enable);
     static bool cork(int sock, bool enable);
-    static bool isSocket(int sock);
-    static bool isConnected(int sock);
+    static bool isListening(int sock);
     static int getSockPort(int sock);
   private:
     bool closeFd;
diff -up 
tigervnc-1.2.80-20130314svn5065/unix/xserver/hw/vnc/vncExtInit.cc.inetd-nowait 
tigervnc-1.2.80-20130314svn5065/unix/xserver/hw/vnc/vncExtInit.cc
--- 
tigervnc-1.2.80-20130314svn5065/unix/xserver/hw/vnc/vncExtInit.cc.inetd-nowait  
    2013-03-14 17:11:22.000000000 +0000
+++ tigervnc-1.2.80-20130314svn5065/unix/xserver/hw/vnc/vncExtInit.cc   
2013-05-23 12:21:10.545530308 +0100
@@ -225,8 +225,7 @@ void vncExtensionInit()
         network::TcpListener* listener = 0;
         network::TcpListener* httpListener = 0;
         if (scr == 0 && vncInetdSock != -1) {
-          if (network::TcpSocket::isSocket(vncInetdSock) &&
-              !network::TcpSocket::isConnected(vncInetdSock))
+          if (network::TcpSocket::isListening(vncInetdSock))
           {
             listener = new network::TcpListener(NULL, 0, 0, vncInetdSock, 
true);
             vlog.info("inetd wait");



1.1                  src/patchsets/tigervnc/1.4.2/030_manpages.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/030_manpages.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/030_manpages.patch?rev=1.1&content-type=text/plain

Index: 030_manpages.patch
===================================================================
diff -up tigervnc-1.4.2/unix/vncserver.manpages tigervnc-1.4.2/unix/vncserver
--- tigervnc-1.4.2/unix/vncserver.manpages      2015-02-12 19:39:32.253788841 
+0000
+++ tigervnc-1.4.2/unix/vncserver       2015-02-12 19:39:32.326789294 +0000
@@ -551,6 +551,7 @@ sub Usage
        "                 [-geometry <width>x<height>]\n".
        "                 [-pixelformat rgbNNN|bgrNNN]\n".
        "                 [-fp <font-path>]\n".
+       "                 [-cc <visual>]\n".
        "                 [-fg]\n".
        "                 [-autokill]\n".
        "                 <Xvnc-options>...\n\n".
diff -up tigervnc-1.4.2/vncviewer/vncviewer.cxx.manpages 
tigervnc-1.4.2/vncviewer/vncviewer.cxx
--- tigervnc-1.4.2/vncviewer/vncviewer.cxx.manpages     2015-01-23 
23:37:23.000000000 +0000
+++ tigervnc-1.4.2/vncviewer/vncviewer.cxx      2015-02-12 19:39:32.327789300 
+0000
@@ -265,6 +265,11 @@ static void usage(const char *programNam
           "       %s [parameters] -listen [port] [parameters]\n",
           programName, programName);
   fprintf(stderr,"\n"
+         "Options:\n\n"
+         "  -display Xdisplay - Specifies the X display for the viewer 
window\n"
+         "  -geometry geometry - Standard X position and sizing 
specification.\n");
+
+  fprintf(stderr,"\n"
           "Parameters can be turned on with -<param> or off with -<param>=0\n"
           "Parameters which take a value can be specified as "
           "-<param> <value>\n"
diff -up tigervnc-1.4.2/vncviewer/vncviewer.man.manpages 
tigervnc-1.4.2/vncviewer/vncviewer.man
--- tigervnc-1.4.2/vncviewer/vncviewer.man.manpages     2015-02-12 
19:39:32.327789300 +0000
+++ tigervnc-1.4.2/vncviewer/vncviewer.man      2015-02-13 09:54:55.042903357 
+0000
@@ -219,6 +219,10 @@ This option specifies the preferred enco
 Disable lossy JPEG compression in Tight encoding. Default is off.
 .
 .TP
+.B \-ImprovedHextile
+Try harder to compress data (default).
+.
+.TP
 .B \-QualityLevel \fIlevel\fP
 JPEG quality level. 0 = Low, 9 = High. May be adjusted automatically if
 \fB-AutoSelect\fP is turned on. Default is 8.
@@ -271,6 +275,10 @@ command is executed with the environment
 \fIR\fR, and \fIG\fR taken the values of the local port number, the remote
 host, the port number on the remote host, and the gateway machine
 respectively.
+.
+.TP
+.B \-ZlibLevel
+Zlib compression level.
 
 .SH FILES
 .TP



1.1                  src/patchsets/tigervnc/1.4.2/035_getmaster.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/035_getmaster.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/035_getmaster.patch?rev=1.1&content-type=text/plain

Index: 035_getmaster.patch
===================================================================
diff -up tigervnc-1.4.2/unix/xserver/hw/vnc/InputXKB.cc.getmaster 
tigervnc-1.4.2/unix/xserver/hw/vnc/InputXKB.cc
--- tigervnc-1.4.2/unix/xserver/hw/vnc/InputXKB.cc.getmaster    2015-01-23 
23:37:23.000000000 +0000
+++ tigervnc-1.4.2/unix/xserver/hw/vnc/InputXKB.cc      2015-02-13 
12:32:54.398502082 +0000
@@ -208,10 +208,7 @@ void InputDevice::PrepareInputDevices(vo
 
 unsigned InputDevice::getKeyboardState(void)
 {
-       DeviceIntPtr master;
-
-       master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
-       return XkbStateFieldFromRec(&master->key->xkbInfo->state);
+       return XkbStateFieldFromRec(&keyboardDev->master->key->xkbInfo->state);
 }
 
 unsigned InputDevice::getLevelThreeMask(void)
@@ -232,7 +229,7 @@ unsigned InputDevice::getLevelThreeMask(
                        return 0;
        }
 
-       xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+       xkb = keyboardDev->master->key->xkbInfo->desc;
 
        act = XkbKeyActionPtr(xkb, keycode, state);
        if (act == NULL)
@@ -257,7 +254,7 @@ KeyCode InputDevice::pressShift(void)
        if (state & ShiftMask)
                return 0;
 
-       xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+       xkb = keyboardDev->master->key->xkbInfo->desc;
        for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
                XkbAction *act;
                unsigned char mask;
@@ -294,7 +291,7 @@ std::list<KeyCode> InputDevice::releaseS
        if (!(state & ShiftMask))
                return keys;
 
-       master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
+       master = keyboardDev->master;
        xkb = master->key->xkbInfo->desc;
        for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
                XkbAction *act;
@@ -347,7 +344,7 @@ KeyCode InputDevice::pressLevelThree(voi
                        return 0;
        }
 
-       xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+       xkb = keyboardDev->master->key->xkbInfo->desc;
 
        act = XkbKeyActionPtr(xkb, keycode, state);
        if (act == NULL)
@@ -375,7 +372,7 @@ std::list<KeyCode> InputDevice::releaseL
        if (!(state & mask))
                return keys;
 
-       master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
+       master = keyboardDev->master;
        xkb = master->key->xkbInfo->desc;
        for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
                XkbAction *act;
@@ -416,7 +413,7 @@ KeyCode InputDevice::keysymToKeycode(Key
        if (new_state != NULL)
                *new_state = state;
 
-       xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+       xkb = keyboardDev->master->key->xkbInfo->desc;
        for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
                unsigned int state_out;
                KeySym dummy;
@@ -473,7 +470,7 @@ bool InputDevice::isLockModifier(KeyCode
        XkbDescPtr xkb;
        XkbAction *act;
 
-       xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+       xkb = keyboardDev->master->key->xkbInfo->desc;
 
        act = XkbKeyActionPtr(xkb, keycode, state);
        if (act == NULL)
@@ -511,7 +508,7 @@ bool InputDevice::isAffectedByNumLock(Ke
        if (numlock_keycode == 0)
                return false;
 
-       xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+       xkb = keyboardDev->master->key->xkbInfo->desc;
 
        act = XkbKeyActionPtr(xkb, numlock_keycode, state);
        if (act == NULL)
@@ -545,7 +542,7 @@ KeyCode InputDevice::addKeysym(KeySym ke
        KeySym *syms;
        KeySym upper, lower;
 
-       master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
+       master = keyboardDev->master;
        xkb = master->key->xkbInfo->desc;
        for (key = xkb->max_key_code; key >= xkb->min_key_code; key--) {
                if (XkbKeyNumGroups(xkb, key) == 0)



1.1                  
src/patchsets/tigervnc/1.4.2/040_format-security-patch.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/040_format-security-patch.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/040_format-security-patch.patch?rev=1.1&content-type=text/plain

Index: 040_format-security-patch.patch
===================================================================
diff -up tigervnc-1.3.0/vncviewer/vncviewer.cxx.format-security 
tigervnc-1.3.0/vncviewer/vncviewer.cxx
--- tigervnc-1.3.0/vncviewer/vncviewer.cxx.format-security      2013-12-03 
16:47:04.802800182 +0000
+++ tigervnc-1.3.0/vncviewer/vncviewer.cxx      2013-12-03 16:47:08.680820024 
+0000
@@ -309,7 +309,7 @@ interpretViaParam(char *remoteHost, int
 
   snprintf(vncServerName, VNCSERVERNAMELEN, "localhost::%d", localPort);
   vncServerName[VNCSERVERNAMELEN - 1] = '\0';
-  vlog.error(vncServerName);
+  vlog.error("%s", vncServerName);
 
   return 0;
 }



1.1                  src/patchsets/tigervnc/1.4.2/055_xstartup.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/055_xstartup.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/055_xstartup.patch?rev=1.1&content-type=text/plain

Index: 055_xstartup.patch
===================================================================
diff -up tigervnc-1.3.0/unix/vncserver.xstartup tigervnc-1.3.0/unix/vncserver
--- tigervnc-1.3.0/unix/vncserver.xstartup      2014-02-10 14:52:39.902673875 
+0000
+++ tigervnc-1.3.0/unix/vncserver       2014-02-10 14:53:30.398847723 +0000
@@ -59,27 +59,7 @@ $defaultXStartup
     = ("#!/bin/sh\n\n".
        "unset SESSION_MANAGER\n".
        "unset DBUS_SESSION_BUS_ADDRESS\n".
-       "OS=`uname -s`\n".
-       "if [ \$OS = 'Linux' ]; then\n".
-       "  case \"\$WINDOWMANAGER\" in\n".
-       "    \*gnome\*)\n".
-       "      if [ -e /etc/SuSE-release ]; then\n".
-       "        PATH=\$PATH:/opt/gnome/bin\n".
-       "        export PATH\n".
-       "      fi\n".
-       "      ;;\n".
-       "  esac\n".
-       "fi\n".
-       "if [ -x /etc/X11/xinit/xinitrc ]; then\n".
-       "  exec /etc/X11/xinit/xinitrc\n".
-       "fi\n".
-       "if [ -f /etc/X11/xinit/xinitrc ]; then\n".
-       "  exec sh /etc/X11/xinit/xinitrc\n".
-       "fi\n".
-       "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
-       "xsetroot -solid grey\n".
-       "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
-       "twm &\n");
+       "exec /etc/X11/xinit/xinitrc\n");
 
 chop($host = `uname -n`);
 



1.1                  
src/patchsets/tigervnc/1.4.2/1000_server_xserver-1.16-rebased.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/1000_server_xserver-1.16-rebased.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/1000_server_xserver-1.16-rebased.patch?rev=1.1&content-type=text/plain

Index: 1000_server_xserver-1.16-rebased.patch
===================================================================
diff -up xorg-server-1.17.1/configure.ac.xserver116-rebased 
xorg-server-1.17.1/configure.ac
--- xorg-server-1.17.1/configure.ac.xserver116-rebased  2015-02-10 
22:43:52.000000000 +0000
+++ xorg-server-1.17.1/configure.ac     2015-02-13 16:14:05.074515927 +0000
@@ -74,6 +74,7 @@ dnl forcing an entire recompile.x
 AC_CONFIG_HEADERS(include/version-config.h)
 
 AM_PROG_AS
+AC_PROG_CXX
 AC_PROG_LN_S
 LT_PREREQ([2.2])
 LT_INIT([disable-static win32-dll])
@@ -1795,6 +1796,10 @@ if test "x$XVFB" = xyes; then
        AC_SUBST([XVFB_SYS_LIBS])
 fi
 
+dnl Xvnc DDX
+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"])
+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB 
$RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB 
$MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB 
$XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB"])
+AC_SUBST([XVNC_SYS_LIBS], ["$GLX_SYS_LIBS"])
 
 dnl Xnest DDX
 
@@ -1830,6 +1835,8 @@ if test "x$XORG" = xauto; then
 fi
 AC_MSG_RESULT([$XORG])
 
+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg 
version])
+
 if test "x$XORG" = xyes; then
        XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 
-I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
        XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support 
-I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
@@ -2059,7 +2066,6 @@ if test "x$XORG" = xyes; then
        AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
        AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
        AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-       AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current 
Xorg version])
        AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
        AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
        AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2599,6 +2605,7 @@ hw/dmx/Makefile
 hw/dmx/man/Makefile
 hw/vfb/Makefile
 hw/vfb/man/Makefile
+hw/vnc/Makefile
 hw/xnest/Makefile
 hw/xnest/man/Makefile
 hw/xwin/Makefile
diff -up xorg-server-1.17.1/hw/Makefile.am.xserver116-rebased 
xorg-server-1.17.1/hw/Makefile.am
--- xorg-server-1.17.1/hw/Makefile.am.xserver116-rebased        2014-04-16 
21:24:00.000000000 +0100
+++ xorg-server-1.17.1/hw/Makefile.am   2015-02-13 16:14:05.131516821 +0000
@@ -38,7 +38,8 @@ SUBDIRS =                     \
        $(DMX_SUBDIRS)          \
        $(KDRIVE_SUBDIRS)       \
        $(XQUARTZ_SUBDIRS)      \
-       $(XWAYLAND_SUBDIRS)
+       $(XWAYLAND_SUBDIRS)     \
+       vnc
 
 DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
 
diff -up xorg-server-1.17.1/mi/miinitext.c.xserver116-rebased 
xorg-server-1.17.1/mi/miinitext.c
--- xorg-server-1.17.1/mi/miinitext.c.xserver116-rebased        2015-01-17 
23:42:52.000000000 +0000
+++ xorg-server-1.17.1/mi/miinitext.c   2015-02-13 16:14:05.131516821 +0000
@@ -111,6 +111,10 @@ SOFTWARE.
 #include "micmap.h"
 #include "globals.h"
 
+#ifdef TIGERVNC
+extern void vncExtensionInit(INITARGS);
+#endif
+
 /* The following is only a small first step towards run-time
  * configurable extensions.
  */
@@ -235,6 +239,9 @@ EnableDisableExtensionError(const char *
 
 /* List of built-in (statically linked) extensions */
 static const ExtensionModule staticExtensions[] = {
+#ifdef TIGERVNC
+    {vncExtensionInit, "VNC-EXTENSION", NULL},
+#endif
     {GEExtensionInit, "Generic Event Extension", &noGEExtension},
     {ShapeExtensionInit, "SHAPE", NULL},
 #ifdef MITSHM
diff -up xorg-server-1.17.1/os/WaitFor.c.xserver116-rebased 
xorg-server-1.17.1/os/WaitFor.c
--- xorg-server-1.17.1/os/WaitFor.c.xserver116-rebased  2015-01-26 
18:40:30.000000000 +0000
+++ xorg-server-1.17.1/os/WaitFor.c     2015-02-13 16:14:05.132516837 +0000
@@ -125,6 +125,9 @@ static void DoTimer(OsTimerPtr timer, CA
 static void CheckAllTimers(void);
 static volatile OsTimerPtr timers = NULL;
 
+extern void vncWriteBlockHandler(fd_set *fds);
+extern void vncWriteWakeupHandler(int nfds, fd_set *fds);
+
 /*****************
  * WaitForSomething:
  *     Make the server suspend until there is
@@ -150,6 +153,7 @@ WaitForSomething(int *pClientsReady)
     INT32 timeout = 0;
     fd_set clientsReadable;
     fd_set clientsWritable;
+    fd_set socketsWritable;
     int curclient;
     int selecterr;
     static int nready;
@@ -212,6 +216,9 @@ WaitForSomething(int *pClientsReady)
             XFD_COPYSET(&AllSockets, &LastSelectMask);
         }
 
+        FD_ZERO(&socketsWritable);
+        vncWriteBlockHandler(&socketsWritable);
+
         BlockHandler((void *) &wt, (void *) &LastSelectMask);
         if (NewOutputPending)
             FlushAllOutput();
@@ -223,10 +230,20 @@ WaitForSomething(int *pClientsReady)
             i = Select(MaxClients, &LastSelectMask, &clientsWritable, NULL, 
wt);
         }
         else {
-            i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
+           if (AnyClientsWriteBlocked)
+               XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, 
&socketsWritable);
+
+           if (XFD_ANYSET(&socketsWritable)) {
+               i = Select(MaxClients, &LastSelectMask, &socketsWritable, NULL, 
wt);
+               if (AnyClientsWriteBlocked)
+                   XFD_ANDSET(&clientsWritable, &socketsWritable, 
&ClientsWriteBlocked);
+           } else {
+               i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
+           }
         }
         selecterr = GetErrno();
         WakeupHandler(i, (void *) &LastSelectMask);
+       vncWriteWakeupHandler(i, &socketsWritable);
         if (i <= 0) {           /* An error or timeout occurred */
             if (dispatchException)
                 return 0;



1.1                  src/patchsets/tigervnc/1.4.2/1005_server_xserver-1.17.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/1005_server_xserver-1.17.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/tigervnc/1.4.2/1005_server_xserver-1.17.patch?rev=1.1&content-type=text/plain

Index: 1005_server_xserver-1.17.patch
===================================================================
diff -up tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h.xserver117 
tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h
--- tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h.xserver117        
2015-01-23 23:37:23.000000000 +0000
+++ tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h   2015-02-13 
17:35:29.847294663 +0000
@@ -48,8 +48,10 @@
 #define XORG 115
 #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (16 * 100000) + (99 * 1000))
 #define XORG 116
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000))
+#define XORG 117
 #else
-#error "X.Org newer than 1.16 is not supported"
+#error "X.Org newer than 1.17 is not supported"
 #endif
 
 #endif
diff -up tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc.xserver117 
tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc
--- tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc.xserver117       2015-01-23 
23:37:23.000000000 +0000
+++ tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc  2015-02-13 17:35:27.963265774 
+0000
@@ -717,9 +717,9 @@ vfbInstallColormap(ColormapPtr pmap)
        entries = pmap->pVisual->ColormapEntries;
        pVisual = pmap->pVisual;
 
-       ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
-       prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
-       defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
+       ppix = (Pixel *)malloc(entries * sizeof(Pixel));
+       prgb = (xrgb *)malloc(entries * sizeof(xrgb));
+       defs = (xColorItem *)malloc(entries * sizeof(xColorItem));
 
        for (i = 0; i < entries; i++)  ppix[i] = i;
        /* XXX truecolor */
@@ -738,9 +738,9 @@ vfbInstallColormap(ColormapPtr pmap)
        }
        (*pmap->pScreen->StoreColors)(pmap, entries, defs);
        
-       xfree(ppix);
-       xfree(prgb);
-       xfree(defs);
+       free(ppix);
+       free(prgb);
+       free(defs);
     }
 }
 




Reply via email to