Hello community,

here is the log from the commit of package xorg-x11-Xvnc.1876 for 
openSUSE:12.3:Update checked in at 2013-07-29 14:52:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/xorg-x11-Xvnc.1876 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.xorg-x11-Xvnc.1876.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xorg-x11-Xvnc.1876"

Changes:
--------
New Changes file:

--- /dev/null   2013-07-23 23:44:04.804033756 +0200
+++ 
/work/SRC/openSUSE:12.3:Update/.xorg-x11-Xvnc.1876.new/xorg-x11-Xvnc.changes    
    2013-07-29 14:52:33.000000000 +0200
@@ -0,0 +1,91 @@
+-------------------------------------------------------------------
+Thu Jul 18 15:14:25 UTC 2013 - m...@suse.com
+
+- N_tigervnc_free_xcb_maps.patch
+  * Fix memory leak on key press. (bnc#818033)
+
+-------------------------------------------------------------------
+Thu Jul  4 16:55:26 UTC 2013 - m...@suse.com
+
+- N_tigervnc_level3switch.patch
+  * Use correct keycode for level3 shift. (bnc#809844)
+
+-------------------------------------------------------------------
+Mon Jun 10 16:40:16 UTC 2013 - m...@suse.com
+
+- N_tigervnc_enable-glx.patch
+  * Build with GLX extension. (bnc#823625)
+
+-------------------------------------------------------------------
+Thu Jan 10 10:49:09 UTC 2013 - sndir...@suse.com
+
+- this seperate xorg-x11-Xvnc source package (tigervnc) now
+  replaces the previous xf4vnc in xorg-x11-server source package
+  (disabled there now)
+
+-------------------------------------------------------------------
+Fri Dec  7 15:48:16 UTC 2012 - m...@novell.com
+
+- N_tigervnc_keyboard-layout-handling.patch
+  * Use keyboard handling from tightvnc. 
+
+-------------------------------------------------------------------
+Wed Dec  5 17:32:29 UTC 2012 - m...@novell.com
+
+- Update TigerVNC to 1.2.80 and xserver to 1.13.0. 
+
+-------------------------------------------------------------------
+Wed Feb  9 15:07:34 UTC 2011 - sndir...@novell.com
+
+- added jpeg-devel to BuildRequires 
+
+-------------------------------------------------------------------
+Wed Feb  9 14:00:16 UTC 2011 - sndir...@novell.com
+
+- use system jpeg for building
+- fixed xkb path
+- added more reasonable options for Xvfb building
+
+-------------------------------------------------------------------
+Wed Feb  9 08:57:06 UTC 2011 - sndir...@novell.com
+
+- added Reinhard's xdmcp fix (bnc #625593) 
+
+-------------------------------------------------------------------
+Wed Feb  9 08:50:10 UTC 2011 - sndir...@novell.com
+
+- TigerVNC build
+  * fix fontpatch
+  * cleanup 
+
+-------------------------------------------------------------------
+Wed Feb  9 04:41:24 UTC 2011 - sndir...@novell.com
+
+- build Xvnc of TigerVNC project when %tigervnc is set; make this
+  the default for now
+
+-------------------------------------------------------------------
+Tue Feb  8 17:00:32 UTC 2011 - sndir...@novell.com
+
+- latest version of Perl script
+
+-------------------------------------------------------------------
+Thu Feb  3 17:41:02 UTC 2011 - sndir...@novell.com
+
+- renamed package from xorg-x11-Xvnc-ng to xorg-x11-Xvnc
+
+-------------------------------------------------------------------
+Thu Feb  3 17:26:04 UTC 2011 - sndir...@novell.com
+
+- rewritten wrapper script in Perl 
+
+-------------------------------------------------------------------
+Wed Jan 26 10:07:10 UTC 2011 - sndir...@novell.com
+
+- added services file for SuSEfirewall2 
+
+-------------------------------------------------------------------
+Wed Jan 26 00:43:01 UTC 2011 - sndir...@novell.com
+
+- created package 
+

New:
----
  N_tigervnc_enable-glx.patch
  N_tigervnc_free_xcb_maps.patch
  N_tigervnc_keyboard-layout-handling.patch
  N_tigervnc_level3switch.patch
  Xvnc.pl
  tigervnc-1.2.80-20120905svn4996.tar.bz2
  tigervnc-1.2.80-fix-int-to-pointer.patch
  xorg-server-1.13.0.tar.bz2
  xorg-server-xdmcp.patch
  xorg-x11-Xvnc.changes
  xorg-x11-Xvnc.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xorg-x11-Xvnc.spec ++++++
#
# spec file for package xorg-x11-Xvnc
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define tigervnc 1

Name:           xorg-x11-Xvnc
%if %tigervnc
Version:        7.6_1.0.1
Release:        0
%else
Version:        7.6_0.1
Release:        0
%endif
%if %tigervnc
%else
#License:        MIT License (or similar)
%endif
%if %tigervnc
BuildRequires:  Mesa-devel
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  cmake
BuildRequires:  fltk-devel
BuildRequires:  font-util
BuildRequires:  gcc-c++
BuildRequires:  libXfont-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libtool
BuildRequires:  nasm
BuildRequires:  xorg-x11-server-sdk
%else
Requires:       x11vnc
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %tigervnc
Summary:        TigerVNC implementation of Xvnc
License:        GPL-2.0
Group:          System/X11/Servers/XF86_4
%else
Summary:        Xvnc wrapper script which makes use of Xvfb/x11vnc
Group:          System/X11/Servers/XF86_4
%endif
%if %tigervnc
Source1:        tigervnc-1.2.80-20120905svn4996.tar.bz2
Source2:        xorg-server-1.13.0.tar.bz2
Patch:          xorg-server-xdmcp.patch
Patch1:         tigervnc-1.2.80-fix-int-to-pointer.patch
Patch2:         N_tigervnc_keyboard-layout-handling.patch
Patch3:         N_tigervnc_enable-glx.patch
Patch4:         N_tigervnc_level3switch.patch
Patch5:         N_tigervnc_free_xcb_maps.patch
%else
Source0:        Xvnc.pl
%endif

%description
%if %tigervnc
This is the TigerVNC implementation of Xvnc.
%else
This is a wrapper script, which makes use of Xvfb/x11vnc to implement
a Xvnc server.
%endif

%prep
%if %tigervnc
%setup -T -n tigervnc-1.2.80-20120905svn4996/unix/xserver -b1 -b2
cp -r ../../../xorg-server-*/* .
patch -p1 < ../xserver113.patch
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
cd ../..
%endif

%build
%if %tigervnc
pushd ../..
cmake . -DCMAKE_BUILD_TYPE=Debug
make %{?jobs:-j %jobs}

popd
autoreconf -fi
%configure \
        --disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
        --disable-xwin --disable-xephyr --disable-kdrive --with-pic \
        --disable-static --disable-xinerama \
        --with-xkb-path="/usr/share/X11/xkb" \
        --with-xkb-output="/var/lib/xkb/compiled" \
        --enable-glx --enable-dri --enable-dri2 \
        --disable-config-dbus \
        --disable-config-hal \
        --disable-config-udev \
        --without-dtrace \
        --disable-unit-tests \
        --disable-devel-docs \
        --with-fontrootdir=/usr/share/fonts \
        --disable-selective-werror
make %{?jobs:-j %jobs}
%endif

%install
%if %tigervnc
make install DESTDIR=$RPM_BUILD_ROOT
%else
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 $RPM_SOURCE_DIR/Xvnc.pl  $RPM_BUILD_ROOT/usr/bin/Xvnc
%endif
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
cat > $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name} << EOF
## Name: VNC Server
## Description: Opens ports for VNC Server
TCP="5801 5901"
EOF

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
/etc/sysconfig/SuSEfirewall2.d/services/%{name}
/usr/bin/Xvnc
%if %tigervnc
%{_mandir}/man1/Xvnc.1*
%exclude %{_mandir}/man1/Xserver.1*
%exclude /usr/%{_lib}/xorg/protocol.txt
%exclude /usr/%{_lib}/xorg/modules/extensions/libvnc.la
%exclude /usr/%{_lib}/xorg/modules/extensions/libvnc.so
%exclude /var/lib/xkb/compiled/README.compiled
%exclude /usr/lib/debug/*
%exclude /usr/lib/debug/.*
%endif

%changelog
++++++ N_tigervnc_enable-glx.patch ++++++
Subject: Enagle GLX
Path-Mainline: N/A
References: bnc#823625
Signed-off-by: Michal Srb <m...@suse.com>
diff --git a/hw/vnc/Makefile.am b/hw/vnc/Makefile.am
index 5166ef2..5af9c92 100644
--- a/hw/vnc/Makefile.am
+++ b/hw/vnc/Makefile.am
@@ -7,6 +7,10 @@ NETWORK_LIB=$(LIB_DIR)/network/libnetwork.la
 XREGION_LIB=$(LIB_DIR)/Xregion/libXregion.la
 COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB)
 
+if GLX
+GLX_LIB = $(top_srcdir)/glx/libglx.la
+endif
+
 noinst_LTLIBRARIES = libvnccommon.la
 
 HDRS = RegionHelper.h vncExtInit.h vncHooks.h XserverDesktop.h xorg-version.h \
@@ -34,7 +38,8 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
        -UHAVE_CONFIG_H \
        -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
        -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
-       -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
+       -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir) \
+       -I$(top_srcdir)/glx
 
 Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
        $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
@@ -55,7 +60,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) 
-I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_
 
 libvnc_la_LDFLAGS = -module -avoid-version
 
-libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS)
+libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(GLX_LIB)
 
 EXTRA_DIST = Xvnc.man
 
diff --git a/hw/vnc/xvnc.cc b/hw/vnc/xvnc.cc
index 3b848b2..4ad4466 100644
--- a/hw/vnc/xvnc.cc
+++ b/hw/vnc/xvnc.cc
@@ -87,6 +87,17 @@ extern "C" {
 #include "version-config.h"
 #include "site.h"
 #endif
+
+#if XORG >= 113
+#ifdef GLXEXT
+/* C++ really is the worst */
+#define private _private
+#include "glxserver.h"
+#undef private
+#include "glx_extinit.h"
+#endif
+#endif
+
 #undef class
 #undef public
 }
@@ -1562,6 +1573,16 @@ static void vfbClientStateChange(CallbackListPtr*, 
pointer, pointer) {
   dispatchException &= ~DE_RESET;
 }
 
+#if XORG >= 113
+#ifdef GLXEXT
+static ExtensionModule vnc_glx_ext = {
+    GlxExtensionInit,
+    "GLX",
+    &noGlxExtension
+};
+#endif
+#endif
+
 void
 InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
 {
@@ -1571,6 +1592,12 @@ InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
     int i;
     int NumFormats = 0;
 
+#if XORG >= 113
+#ifdef GLXEXT
+    LoadExtension(&vnc_glx_ext, TRUE);
+#endif
+#endif
+
     /* initialize pixmap formats */
 
     /* must have a pixmap depth to match every screen depth */
++++++ N_tigervnc_free_xcb_maps.patch ++++++
diff -ur tigervnc-1.2.80-20120905svn4996.orig/unix/xserver/hw/vnc/Input.cc 
tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/Input.cc
--- a/hw/vnc/Input.cc   2013-07-18 16:51:39.000000000 +0200
+++ b/hw/vnc/Input.cc   2013-07-18 16:51:53.000000000 +0200
@@ -667,6 +667,7 @@
        * 2011-05-24 mh...@suse.de */
        if (keysym == NoSymbol) {
            ErrorF("KbdAddEvent: ignoring illegal NoSymbol\n");
+           FREE_MAPS;
            return;
        }
 
@@ -733,6 +734,7 @@
                              (int)keysym);
                        free (keySyms->map);
                        free (keySyms);
+                       FREE_MAPS;
                        return;
                }
 
@@ -801,6 +803,8 @@
                }
        }
 
+       FREE_MAPS;
+
        pressKey(inputInfo.keyboard, keyCode, down, "keycode");
 
        if (fakeShiftPress) {
++++++ N_tigervnc_keyboard-layout-handling.patch ++++++
++++ 843 lines (skipped)

++++++ N_tigervnc_level3switch.patch ++++++
Author: Michal Srb <m...@novell.com>
Subject: Fix Level3 press detection.
Patch-Mainline: Never

Use detected keycode of ISO_LEVEL3 key instead of (not always correct) constant.


diff -ur a/hw/vnc/Input.cc b/hw/vnc/Input.cc
--- a/hw/vnc/Input.cc   2013-07-04 18:12:43.365404014 +0200
+++ b/hw/vnc/Input.cc   2013-07-04 18:13:10.317241522 +0200
@@ -672,7 +672,7 @@
 
        xkbInfo = inputInfo.keyboard->key->xkbInfo;
        group   = xkbInfo->state.group;
-       level   = (IS_PRESSED(inputInfo.keyboard->key, ISO_LEVEL3_KEY_CODE) ? 2 
: 0) |
+       level   = (IS_PRESSED(inputInfo.keyboard->key, modeSwitchKeyCode) ? 2 : 
0) |
                  (XkbStateFieldFromRec(&xkbInfo->state) & ShiftMask ? 1 : 0);
 #ifdef DEBUG
        ErrorF ("VNCkbd:\t%s Sym %04x\n", down ? "+":"-", (int)keysym);
@@ -771,7 +771,7 @@
                down ? "+":"-", (int)keysym, keyCode, 
XkbStateFieldFromRec(&xkbInfo->state),
                IS_PRESSED(inputInfo.keyboard->key, SHIFT_L_KEY_CODE) ? "Sl":"",
                IS_PRESSED(inputInfo.keyboard->key, SHIFT_R_KEY_CODE) ? "Sr":"",
-               IS_PRESSED(inputInfo.keyboard->key, ISO_LEVEL3_KEY_CODE) ? 
"L3":"",
+               IS_PRESSED(inputInfo.keyboard->key, modeSwitchKeyCode) ? 
"L3":"",
                shiftMustBePressed ? "+":"", shiftMustBeReleased ? "-":"",
                level3MustBePressed ? "+":"", level3MustBeReleased ? "-":"");
 #endif
++++++ Xvnc.pl ++++++
#!/usr/bin/perl

# Emulate Xvnc by starting x11vnc inside Xvfb
# (c) 2011 Matthias Hopf <mh...@suse.de>
# For a number of additional pitfalls see 
http://www.karlrunge.com/x11vnc/faq.html#faq-xvfb

# TODO:
# - authorization with -query
# - choose a fresh display with -inetd

use POSIX();
use POSIX ":sys_wait_h";
use IO::Handle;

#
# Option parsing
#


@cmd_x11 = ("/usr/bin/Xvfb");
@cmd_vnc = ("/usr/bin/x11vnc");
$display  = "";
$geometry = "800x600";
$depth    = 24;
$rfbport  = "";
$httpdir  = "";
$auth     = "";
$inetd    = 0;

# Preparse options for -inetd (logfile generation)
for $_ (@ARGV) {
    $inetd = 1 if $_ eq "-inetd";
}

# Logfile generation for -inetd
if ($inetd) {
    $logfile = $ENV{HOME}."/.Xvnc.log";
    $logfile = "/var/log/Xvnc.log" if $> == 0;
    unlink "$logfile.old";
    rename $logfile, "$logfile.old";
    close STDERR;
    unless (open STDERR, '>', $logfile) {
        chomp ($logfile=`mktemp /tmp/Xvnc.XXXXXXXXXX`);
        unless (open STDERR, '>', $logfile) {
            unless (open STDERR, '>', "/dev/null") {
                die;
            }
        }
    }
    STDERR->autoflush(1);
    chmod 0600, $logfile;
    STDOUT->autoflush(1);
}

while ($_ = shift @ARGV) {
    # Special handling
    if      (/^:/) {
        $display = $_;
    } elsif ($_ eq "-auth") {
        $auth = shift @ARGV;
    } elsif ($_ eq "-geometry") {
        $geometry = shift @ARGV;
    } elsif ($_ eq "-depth") {
        $depth = shift @ARGV;
    } elsif ($_ eq "-rfbport") {
        $rfbport = shift @ARGV;
    } elsif ($_ eq "-httpd") {
        $httpdir = shift @ARGV;
    } elsif ($_ eq "-inetd") {
    }
    # Pure x11vnc options
    elsif   ($_ eq "-loginauth") {
        push @cmd_vnc, "-unixpw";
    } elsif ($_ eq "-rfbwait") {
        push @cmd_vnc, "-timeout", ((shift @ARGV) + 999) / 1000;
    } elsif ($_ eq "-interface") {
        push @cmd_vnc, "-listen", shift @ARGV;
    }
    # Direct pure x11vnc options
    elsif   
(/^(-viewonly|-localhost|-nocursor|-alwaysshared|-nevershared|-dontdisconnect)$/)
 {
        push @cmd_vnc, $_;
    }
    # Direct pure x11vnc options with 1 argument
    elsif   (/^(-desktop|-rfbauth|-deferupdate|-httpport)$/) {
        push @cmd_vnc, $_, shift @ARGV;
    }
    # Direct pure Xserver options
    elsif   
(/^(-ac|-br|\+bs|-bs|-c|-core|-dpms|-I|-nolock|-logo|nologo|-noreset|-nr|-reset|-pn|-nopn|-r|r|ttyxx|v|-tst|-v|-wm|-wr|-maxbigreqsize|\+xinerama|-xinerama|-dumbSched|-retro|-terminate|-broadcast|-once|-ardelay|-arinterval)$/)
 {
        push @cmd_x11, $_;
    }
    # Direct pure Xserver options with 1 argument
    elsif   
(/^(-a|-audit|c|-cc|-dpi|-deferglyphs|-f|-fc|-fn|-fp|-ld|-lf|-ls|-nolisten|-p|-s|-t|-to|-schedInterval|\+extension|-extension|-query|-indirect|-port|-from|-class|-cookie|-displayID)$/)
 {
        push @cmd_x11, $_, shift @ARGV;
    }
    # Ignore following options for now
    elsif   (/^(-economictranslate|-lazytight)$/) {
    }
    # Ignore following options for now with 1 argument
    elsif   (/^(-pixelformat)$/) {
        shift;
    }
    # Currently unsupported
    elsif   (/^(-render|-multicast|[+-]accessx)$/) {
        # -render [default|mono|gray|color] set render color alloc policy
        #   There is -render <arg> of Xvnc  *and* -render of Xvfb w/o arg...
        # -multicast [addr [hops]] IPv6 multicast for XDMCP
        #   Difficult option parsing, no use with Xvnc
        # [+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
        #                       enable/disable accessx key sequences
        #   Difficult option parsing, gdm overwrites opts anyway
        # -udpinputport port     UDP port for keyboard/pointer data
        #   Unknown how to support
        print STDERR "Xvnc option $_ currently unsupported!\n";
        exit 1;
    }
    else {
        print STDERR <<"EOHELP";
use: Xvnc [:<display>] [option]
-a #                   default pointer acceleration (factor)
-ac                    disable access control restrictions
-audit int             set audit trail level
-auth file             select authorization file
-br                    create root window with black background
+bs                    enable any backing store support
-bs                    disable any backing store support
-c                     turns off key-click
c #                    key-click volume (0-100)
-cc int                default color visual class
-nocursor              disable the cursor
-core                  generate core dump on fatal error
-dpi int               screen resolution in dots per inch
-dpms                  disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f #                   bell base (0-100)
-fc string             cursor font
-fn string             default font name
-fp string             default font path
-help                  prints message with these options
-I                     ignore all remaining arguments
-ld int                limit data space to N Kb
-lf int                limit number of open files to N
-ls int                limit stack space to N Kb
-nolock                disable the locking mechanism
-logo                  enable logo in screen saver
nologo                 disable logo in screen saver
-nolisten string       don't listen on protocol
-noreset               don't reset after last client exists
-nr                    create root window with no background
-reset                 reset after last client exists
-p #                   screen-saver pattern duration (minutes)
-pn                    accept failure to listen on all ports
-nopn                  reject failure to listen on all ports
-r                     turns off auto-repeat
r                      turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-retro                 start with classic stipple and cursor
-s #                   screen-saver timeout (minutes)
-t #                   default pointer threshold (pixels/t)
-terminate             terminate at server reset
-to #                  connection time out
-tst                   disable testing extensions
ttyxx                  server started from init on /dev/ttyxx
v                      video blanking for screen-saver
-v                     screen-saver without video blanking
-wm                    WhenMapped default backing-store
-wr                    create root window with white background
-maxbigreqsize         set maximal bigrequest size
+xinerama              Enable XINERAMA extension
-xinerama              Disable XINERAMA extension
-dumbSched             Disable smart scheduling, enable old behavior
-schedInterval int     Set scheduler interval in msec
+extension name        Enable extension
-extension name        Disable extension
-query host-name       contact named host for XDMCP
-broadcast             broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name    contact named host for indirect XDMCP
-port port-num         UDP port number to send messages to
-from local-address    specify the local address to connect from
-once                  Terminate server after one session
-class display-class   specify display class to send in manage
-cookie xdm-auth-bits  specify the magic cookie for XDMCP
-displayID display-id  manufacturer display ID for request
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
                       enable/disable accessx key sequences
-ardelay               set XKB autorepeat delay
-arinterval            set XKB autorepeat interval
-geometry WxH          set framebuffer width & height
-depth D               set framebuffer depth
-pixelformat format    set pixel format (BGRnnn or RGBnnn)
-udpinputport port     UDP port for keyboard/pointer data
-rfbport port          TCP port for RFB protocol
-rfbwait time          max time in ms to wait for RFB client
-nocursor              don't put up a cursor
-rfbauth passwd-file   use authentication on RFB protocol
-loginauth             use login-style Unix authentication
-httpd dir             serve files via HTTP from here
-httpport port         port for HTTP
-deferupdate time      time in ms to defer updates (default 40)
-economictranslate     less memory-hungry translation
-lazytight             disable "gradient" filter in tight encoding
-desktop name          VNC desktop name (default x11)
-alwaysshared          always treat new clients as shared
-nevershared           never treat new clients as shared
-dontdisconnect        don't disconnect existing clients when a new non-shared
                       connection comes in (refuse new connection instead)
-localhost             only allow connections from localhost
                           to the vnc ports. Use -nolisten tcp to disable
                           remote X clients as well.
-viewonly              let clients only view the desktop
-interface ipaddr      only bind to specified interface address
-inetd                 Xvnc is launched by inetd
EOHELP
        exit 1;
    }
}

#
# Command line generation
#

push @cmd_x11, "-screen", "0", "$geometry"."x$depth";
push @cmd_x11, "-cc", "4" if $depth > 8;
if ($inetd) {
    push @cmd_vnc, "-inetd" if $inetd;
} else {
    push @cmd_vnc, $rfbport eq "" ? ("-N") : ("-rfbport", $rfbport);
    push @cmd_vnc, $httpdir eq "" ? ("-http") : ("-httpdir", $httpdir);
    # -threads doesn't work with -inetd?!?
    push @cmd_vnc, "-shared", "-threads";
}
if ($auth ne "") {
    push @cmd_x11, "-auth", $auth;
    push @cmd_vnc, "-auth", $auth;
}

push @cmd_vnc, "-norc", "-forever";
push @cmd_vnc, "-cursor_drag", "-scrollcopyrect", "always", "-nowireframe";
#-env FD_XDM=1

# Multi-keyboard corrections ?!?
push @cmd_vnc, "-skip_lockkeys", "-add_keysyms", "-clear_all";

push @cmd_x11, $display;
push @cmd_vnc, "-display", $display;

#
# Process startup preparation
#

$ret     = 0;
$pid_x11 = 0;
$pid_vnc = 0;
$pid_pip = 0;
$got_usr1= 0;
$got_usr2= 0;

$orig_usr1 = $SIG{USR1};

# Wait for any process, and check for known processes
# Args: nonblock(1)
sub waitall {
    my $id;
    if ($_[0]) {
        $id = waitpid (-1, WNOHANG);
    } else {
        $id = wait ();
    }
    if ($id > 0 && $ret == 0 && $? != 0) {
        $ret = ($? >> 8);
        $ret = 255 if $? < 256;
    }
    $pid_x11 = 0 if $id == $pid_x11;
    $pid_vnc = 0 if $id == $pid_vnc;
    $pid_pip = 0 if $id == $pid_pip;
    return $id;
}

# Terminate all subprocesses
sub terminate {
    # Wait for all processes to actually end by themselves
    eval {
        alarm 2;
        while ($pid_x11 > 0 || $pid_vnc > 0 || $pid_pip > 0) {
            last if waitall (0) < 0;
        }
        alarm 0;
    };

    # Terminate both main processes
    kill QUIT, $pid_x11 if $pid_x11 > 0;
    kill QUIT, $pid_vnc if $pid_vnc > 0;

    # Wait for both processes to actually end
    eval {
        alarm 5;
        while ($pid_x11 > 0 || $pid_vnc > 0 || $pid_pip > 0) {
            last if waitall (0) < 0;
        }
        alarm 0;
    };

    # Kill leftover processes
    kill KILL, $pid_x11 if $pid_x11 > 0;
    kill KILL, $pid_vnc if $pid_vnc > 0;
    kill KILL, $pid_pip if $pid_pip > 0;
}

sub END {
    terminate();
}

# Signal handler
sub sig_exit {
    terminate();
    $SIG{$_[0]} = "DEFAULT";
    kill $_[0], $$;
}

sub sig_alrm {
    $SIG{ALRM} = \&sig_alrm;
    die;
}

sub sig_usr1 {
    $SIG{USR1} = \&sig_usr1;
    $got_usr1++;
}

sub sig_usr2 {
    $SIG{USR2} = \&sig_usr2;
    $got_usr2++;
}

# Set signal handlers for cleanup
for $s (HUP, INT, QUIT, TERM) {
    $SIG{$s} = \&sig_exit;
}
$SIG{ALRM} = \&sig_alrm;
$SIG{PIPE} = "IGNORE";
# Set signal handlers for IPC
$SIG{USR1} = \&sig_usr1;
$SIG{USR2} = \&sig_usr2;

#
# Process startup
#

eval {
    alarm 30;

    # Start Xserver
    print STDERR "* Starting up Xserver\n* ".join (" ", @cmd_x11)."\n";
    $pid_x11 = fork();
    die "fork failed: $!" unless defined $pid_x11;
    if (! $pid_x11) {
        # Redirect stdout into stderr (for handling inetd)
        close STDOUT;
        open STDOUT, ">&STDERR";
        close STDIN;
        # Ignore USR1 to indicate Xserver to ping us when ready
        $SIG{USR1}="IGNORE";
        #exec "/usr/bin/Xvfb", "-screen", "0", "800x600x24", ":4";
        exec @cmd_x11;
        die "Starting Xvfb";
    }

    # Wait for Xserver to either finish startup, or being killed
    my $retries=10;
    while ($retries > 0 && !$got_usr1) {
        last if waitall (1) > 0;
        sleep 1;
        $retries--;
    }
    exit $ret if !$pid_x11;
    exit 1    if !$got_usr1;

    # Create stdout pipe for vnc server
    pipe R, W;

    # Start vnc server
    print STDERR "* Starting up vnc server\n* ".join (" ", @cmd_vnc)."\n";
    $pid_vnc = fork();
    die "fork failed: $!" unless defined $pid_vnc;
    if (! $pid_vnc) {
        # Don't terminate X server inside child if dying here
        $pid_x11=0;
        # Redirect stderr into pipe
        close R;
        close STDERR;
        open STDERR, ">&W";
        close W;
        #exec "/usr/bin/x11vnc", "-N", "-display", ":4";
        exec @cmd_vnc;
        die "Starting x11vnc";
    }
    close W;

    # Start process for parsing vnc output
    $pid_pip = fork();
    die "fork failed: $!" unless defined $pid_pip;
    if (! $pid_pip) {
        close STDIN;
        close STDOUT;
        while (<R>) {
            print STDERR "vnc: $_";
            kill USR2, getppid() if /^[0-9\/: ]*screen setup finished\.\s*$/;
        }
        exit 0;
    }
    close R;

    # Wait for vnc server being ready
    my $retries=10;
    while ($retries > 0 && !$got_usr2) {
        last if waitall (1) > 0;
        sleep 1;
        $retries--;
    }
    exit $ret if !$pid_vnc;
    exit 1    if !$got_usr2;

    alarm 0;
};

print STDERR "* All up and running\n";
# Ping parent if it wants to get informed about us being ready
kill USR1, getppid() if $orig_usr1 eq "IGNORE";

#
# Wait for shutdown
#

# Wait for one of the processes to terminate
while ($pid_x11 > 0 && $pid_vnc > 0 && $pid_pip > 0) {
    last if waitall (0) < 0;
}

exit $ret;

++++++ tigervnc-1.2.80-fix-int-to-pointer.patch ++++++
--- xserver.orig/hw/vnc/vncExtInit.cc   2012-09-18 14:05:39.276682941 +0200
+++ xserver/hw/vnc/vncExtInit.cc        2012-09-18 14:04:22.734526621 +0200
@@ -1067,7 +1067,7 @@
 {
   REQUEST(xVncExtApproveConnectReq);
   REQUEST_SIZE_MATCH(xVncExtApproveConnectReq);
-  if (queryConnectId == (void*)stuff->opaqueId) {
+  if (queryConnectId == (void*)(intptr_t)stuff->opaqueId) {
     for (int scr = 0; scr < screenInfo.numScreens; scr++) {
       if (desktop[scr]) {
         desktop[scr]->approveConnection(queryConnectId, stuff->approve,
++++++ xorg-server-xdmcp.patch ++++++
--- xorg-server-1.6.5/os/access.c
+++ xorg-server-1.6.5/os/access.c
@@ -781,7 +781,9 @@
 
            /* 
             * ignore 'localhost' entries as they're not useful
-            * on the other end of the wire
+            * on the other end of the wire and because on hosts
+            * with shared home dirs they'll result in conflic
+            * entries in ~/.Xauthority
             */
            if (ifr->ifa_flags & IFF_LOOPBACK) 
                    continue;
@@ -804,6 +806,14 @@
            else if (family == FamilyInternet6 && 
              IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr))
                continue;
+
+            /* Ignore IPv6 link local addresses (fe80::/10), because
+             * they need a scope identifier, which we have no way
+             * of telling to the other end.
+             */
+            if (family == FamilyInternet6 &&
+              IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
+                continue;
 #endif
            XdmcpRegisterConnection(family, (char *)addr, len);
 #if defined(IPv6) && defined(AF_INET6)
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to