From 0e6c4367db105a7a653ed8d781fff742ab9835ce Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 8 Jun 2007 11:46:09 +0000 Subject: [PATCH 01/38] - added 24bit support to Xvnc (#242277) - handle RENDER extension better (+ moved module_crash patch into render patch) - updated s390 patch to latest xorg --- vnc-module_crash.patch | 28 ------- vnc-render.patch | 185 ++++++++++++++++++++++++++--------------- vnc-s390.patch | 56 +++++-------- vnc.spec | 13 ++- 4 files changed, 148 insertions(+), 134 deletions(-) delete mode 100644 vnc-module_crash.patch diff --git a/vnc-module_crash.patch b/vnc-module_crash.patch deleted file mode 100644 index da7c412..0000000 --- a/vnc-module_crash.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.module_crash 2007-03-26 20:00:49.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc 2007-03-26 20:05:20.000000000 +0200 -@@ -509,7 +509,12 @@ - BoxRec box; - PictureScreenPtr ps = GetPictureScreen(pScreen); - -- if ((xDst >= 0) && (yDst >= 0)) { -+ ps->Composite = vncHooksScreen->Composite; -+ (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc, -+ xMask, yMask, xDst, yDst, width, height); -+ ps->Composite = vncHooksComposite; -+ -+ if((xDst >= 0) && (yDst >= 0) && pDst->pDrawable->type == DRAWABLE_WINDOW) { - box.x1 = pDst->pDrawable->x + xDst; - box.y1 = pDst->pDrawable->y + yDst; - box.x2 = box.x1 + width; -@@ -518,11 +523,6 @@ - RegionHelper changed(pScreen, &box, 0); - vncHooksScreen->desktop->add_changed(changed.reg); - } -- -- ps->Composite = vncHooksScreen->Composite; -- (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc, -- xMask, yMask, xDst, yDst, width, height); -- ps->Composite = vncHooksComposite; - } - - #endif /* RENDER */ diff --git a/vnc-render.patch b/vnc-render.patch index 678cf90..3e9baa0 100644 --- a/vnc-render.patch +++ b/vnc-render.patch @@ -1,6 +1,17 @@ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.render 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc 2007-03-02 15:56:06.000000000 +0100 -@@ -29,6 +29,9 @@ +--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.render 2007-06-07 15:50:16.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc 2007-06-07 15:57:54.000000000 +0200 +@@ -20,6 +20,10 @@ + #include "XserverDesktop.h" + #include "vncHooks.h" + ++#ifdef HAVE_DIX_CONFIG_H ++#include ++#endif ++ + extern "C" { + #define class c_class + #define private c_private +@@ -29,6 +33,9 @@ extern "C" { #include "regionstr.h" #include "dixfontstr.h" #include "colormapst.h" @@ -10,98 +21,134 @@ #ifdef GC_HAS_COMPOSITE_CLIP #define COMPOSITE_CLIP(gc) ((gc)->pCompositeClip) -@@ -74,6 +77,9 @@ +@@ -74,6 +81,10 @@ typedef struct { StoreColorsProcPtr StoreColors; DisplayCursorProcPtr DisplayCursor; ScreenBlockHandlerProcPtr BlockHandler; +#ifdef RENDER + CompositeProcPtr Composite; ++ GlyphsProcPtr Glyphs; +#endif } vncHooksScreenRec, *vncHooksScreenPtr; typedef struct { -@@ -104,6 +110,13 @@ - static Bool vncHooksDisplayCursor(ScreenPtr pScreen, CursorPtr cursor); +@@ -105,6 +116,15 @@ static Bool vncHooksDisplayCursor(Screen static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask); -+#ifdef RENDER -+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, -+ PicturePtr pDst, INT16 xSrc, INT16 ySrc, -+ INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, -+ CARD16 width, CARD16 height); -+#endif -+ ++// RENDER support ++static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, ++ INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, ++ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); ++ ++static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ++ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, ++ GlyphListPtr list, GlyphPtr *glyphs); ++ // GC "funcs" -@@ -229,6 +242,13 @@ - vncHooksScreen->StoreColors = pScreen->StoreColors; + static void vncHooksValidateGC(GCPtr pGC, unsigned long changes, +@@ -230,6 +250,16 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse vncHooksScreen->DisplayCursor = pScreen->DisplayCursor; vncHooksScreen->BlockHandler = pScreen->BlockHandler; + +#ifdef RENDER -+ PictureScreenPtr ps; -+ ps = GetPictureScreenIfSet(pScreen); ++ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + if (ps) { + vncHooksScreen->Composite = ps->Composite; ++ vncHooksScreen->Glyphs = ps->Glyphs; ++ ps->Composite = vncHooksComposite; ++ ps->Glyphs = vncHooksGlyphs; + } +#endif - ++ pScreen->CloseScreen = vncHooksCloseScreen; pScreen->CreateGC = vncHooksCreateGC; -@@ -241,6 +261,11 @@ - pScreen->StoreColors = vncHooksStoreColors; - pScreen->DisplayCursor = vncHooksDisplayCursor; - pScreen->BlockHandler = vncHooksBlockHandler; -+#ifdef RENDER -+ if (ps) { -+ ps->Composite = vncHooksComposite; -+ } -+#endif + pScreen->PaintWindowBackground = vncHooksPaintWindowBackground; +@@ -1473,3 +1503,80 @@ static void vncHooksPushPixels(GCPtr pGC - return TRUE; + vncHooksScreen->desktop->add_changed(changed.reg); } -@@ -470,6 +495,38 @@ - SCREEN_REWRAP(BlockHandler); - } - -+// Composite - needed for RENDER + +#ifdef RENDER -+void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, -+ PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, -+ INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, -+ CARD16 height) -+{ -+ ScreenPtr pScreen = pDst->pDrawable->pScreen; -+ vncHooksScreenPtr vncHooksScreen = \ -+ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); -+ BoxRec box; -+ PictureScreenPtr ps = GetPictureScreen(pScreen); -+ -+ if ((xDst >= 0) && (yDst >= 0)) { -+ box.x1 = pDst->pDrawable->x + xDst; -+ box.y1 = pDst->pDrawable->y + yDst; -+ box.x2 = box.x1 + width; -+ box.y2 = box.y1 + height; -+ -+ RegionHelper changed(pScreen, &box, 0); -+ vncHooksScreen->desktop->add_changed(changed.reg); -+ } -+ -+ ps->Composite = vncHooksScreen->Composite; -+ (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc, -+ xMask, yMask, xDst, yDst, width, height); -+ ps->Composite = vncHooksComposite; ++#define RENDER_MAKE_BOX(pDrawable,X,Y,W,H) { \ ++ box.x1 = X + pDrawable->x; \ ++ box.x2 = X + pDrawable->x + W; \ ++ box.y1 = Y + pDrawable->y; \ ++ box.y2 = Y + pDrawable->y + H; \ +} + -+#endif /* RENDER */ ++static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, ++ INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, ++ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) ++{ ++ ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ vncHooksScreenPtr vncHooksScreen = \ ++ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); ++ PictureScreenPtr ps = GetPictureScreen(pScreen); ++ BoxRec box; + - - - ///////////////////////////////////////////////////////////////////////////// ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.render 2007-03-02 15:56:06.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-03-02 15:56:37.000000000 +0100 -@@ -130,6 +130,7 @@ ++ ps->Composite = vncHooksScreen->Composite; ++ (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc, ++ xMask, yMask, xDst, yDst, width, height); ++ ps->Composite = vncHooksComposite; ++ ++ if (pDst->pDrawable->type == DRAWABLE_WINDOW) { ++ RENDER_MAKE_BOX(pDst->pDrawable, xDst, yDst, width, height); ++ RegionHelper changed(pScreen, &box, 0); ++ vncHooksScreen->desktop->add_changed(changed.reg); ++ } ++} ++ ++ ++static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ++ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, ++ GlyphListPtr list, GlyphPtr *glyphs) ++{ ++ ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ vncHooksScreenPtr vncHooksScreen = \ ++ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); ++ PictureScreenPtr ps = GetPictureScreen(pScreen); ++ int x, y; ++ int n; ++ GlyphPtr glyph; ++ BoxRec box; ++ ++ ps->Glyphs = vncHooksScreen->Glyphs; ++ (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ++ nlist, list, glyphs); ++ ps->Glyphs = vncHooksGlyphs; ++ ++ if (pDst->pDrawable->type == DRAWABLE_WINDOW) ++ { ++ x = xSrc; ++ y = ySrc; ++ while (nlist--) ++ { ++ x += list->xOff; ++ y += list->yOff; ++ n = list->len; ++ while (n--) ++ { ++ glyph = *glyphs++; ++ RENDER_MAKE_BOX(pDst->pDrawable, ++ x - glyph->info.x, y - glyph->info.y, ++ glyph->info.width, glyph->info.height); ++ RegionHelper changed(pScreen, &box, 0); ++ vncHooksScreen->desktop->add_changed(changed.reg); ++ ++ x += glyph->info.xOff; ++ y += glyph->info.yOff; ++ } ++ list++; ++ } ++ } ++} ++#endif ++ +--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.render 2007-06-07 15:49:32.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-06-07 15:49:32.000000000 +0200 +@@ -130,6 +130,7 @@ static vfbScreenInfo vfbScreens[MAXSCREE static Bool vfbPixmapDepths[33]; static char needswap = 0; static int lastScreen = -1; @@ -109,7 +156,7 @@ static bool displaySpecified = false; static bool wellKnownSocketsCreated = false; -@@ -221,6 +222,10 @@ +@@ -221,6 +222,10 @@ extern "C" { VENDOR_STRING); ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); ErrorF("-pixdepths list-of-int support given pixmap depths\n"); @@ -120,7 +167,7 @@ ErrorF("-linebias n adjust thin line pixelization\n"); ErrorF("-blackpixel n pixel value for black\n"); ErrorF("-whitepixel n pixel value for white\n"); -@@ -317,6 +322,20 @@ +@@ -317,6 +322,20 @@ int ddxProcessArgument(int argc, char *a return ret; } @@ -141,7 +188,7 @@ if (strcmp (argv[i], "-blackpixel") == 0) /* -blackpixel n */ { Pixel pix; -@@ -817,7 +836,12 @@ +@@ -817,7 +836,12 @@ static Bool vfbScreenInit(int index, Scr if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) return FALSE; @@ -155,7 +202,7 @@ switch (pvfb->bitsPerPixel) { case 1: -@@ -938,6 +962,19 @@ +@@ -938,6 +962,19 @@ void InitOutput(ScreenInfo *screenInfo, vfbPixmapDepths[vfbScreens[i].depth] = TRUE; } diff --git a/vnc-s390.patch b/vnc-s390.patch index 1003cac..3da56bc 100644 --- a/vnc-s390.patch +++ b/vnc-s390.patch @@ -1,6 +1,6 @@ ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/int10/Makefile.am.s390 2007-03-01 12:22:04.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/int10/Makefile.am 2007-03-01 12:34:20.000000000 +0100 -@@ -38,7 +38,8 @@ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/int10/Makefile.am.s390 2007-06-06 15:00:23.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/int10/Makefile.am 2007-06-06 15:00:26.000000000 +0200 +@@ -38,7 +38,8 @@ libint10_la_SOURCES = \ endif if INT10_STUB @@ -10,9 +10,9 @@ libint10_la_SOURCES = stub.c xf86int10module.c endif ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h.s390 2007-03-01 12:22:04.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h 2007-03-01 12:22:04.000000000 +0100 -@@ -1353,6 +1353,15 @@ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h.s390 2007-06-06 15:00:24.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h 2007-06-06 15:00:26.000000000 +0200 +@@ -1353,6 +1353,15 @@ do { \ : "0" (_beg), "r" (_end), "r" (_flg)); \ } while (0) @@ -28,9 +28,9 @@ # else /* ix86 */ # define ldq_u(p) (*((unsigned long *)(p))) ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/xf86Helper.c.s390 2007-03-01 12:22:04.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/xf86Helper.c 2007-03-01 12:22:04.000000000 +0100 -@@ -2089,6 +2089,7 @@ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/xf86Helper.c.s390 2007-06-06 15:00:24.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/xf86Helper.c 2007-06-06 15:00:26.000000000 +0200 +@@ -2089,6 +2089,7 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, int maskval, int knownclkindex, int knownclkvalue) { @@ -38,7 +38,7 @@ register int status = vertsyncreg; unsigned long i, cnt, rcnt, sync; -@@ -2182,6 +2183,7 @@ +@@ -2182,6 +2183,7 @@ finish: /* Restore registers that were written on */ (*ClockFunc)(pScrn, CLK_REG_RESTORE); @@ -46,36 +46,26 @@ } _X_EXPORT void ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/linux/lnx_video.c.s390 2007-03-01 12:22:04.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/linux/lnx_video.c 2007-03-01 12:29:36.000000000 +0100 -@@ -62,7 +62,8 @@ - #elif !defined(__powerpc__) && \ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/linux/lnx_video.c.s390 2007-06-06 15:00:24.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/linux/lnx_video.c 2007-06-06 15:03:10.000000000 +0200 +@@ -63,7 +63,8 @@ static Bool ExtendedEnabled = FALSE; !defined(__mc68000__) && \ !defined(__sparc__) && \ -- !defined(__mips__) -+ !defined(__mips__) && \ -+ !defined(__s390__) + !defined(__mips__) && \ +- !defined(__arm__) ++ !defined(__arm__) && \ ++ !defined(__s390) /* * Due to conflicts with "compiler.h", don't rely on to declare -@@ -567,7 +568,7 @@ - #endif - } - close(fd); --#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) -+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) - if (ioperm(0, 1024, 1) || iopl(3)) { - if (errno == ENODEV) - ErrorF("xf86EnableIOPorts: no I/O ports found\n"); ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/misc/SlowBcopy.c.s390 2007-03-01 12:22:04.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/misc/SlowBcopy.c 2007-03-01 12:22:04.000000000 +0100 -@@ -35,7 +35,9 @@ - #if !defined(__sparc__) && \ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/misc/SlowBcopy.c.s390 2007-06-06 15:00:24.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/misc/SlowBcopy.c 2007-06-06 15:03:45.000000000 +0200 +@@ -36,7 +36,8 @@ xf86SlowBcopy(unsigned char *src, unsign !defined(__powerpc__) && \ !defined(__mips__) && \ -- !defined(__ia64__) -+ !defined(__ia64__) && \ -+ !defined(__s390__) && \ + !defined(__ia64__) && \ +- !defined(__arm__) ++ !defined(__arm__) && \ + !defined(__s390x__) outb(0x80, 0x00); #endif diff --git a/vnc.spec b/vnc.spec index 2920a9b..2a6f7db 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 17%{?dist} +Release: 18%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -36,7 +36,7 @@ Patch31: vnc-autotools.patch Patch32: vnc-autotools-compile.patch Patch33: vnc-always_use_fb.patch Patch34: vnc-vsnprintf.patch -Patch35: vnc-module_crash.patch +Patch36: vnc-24bit.patch License: GPL Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -114,7 +114,7 @@ popd %patch32 -p1 -b .autotools-compile %patch33 -p1 -b .always_use_fb %patch34 -p1 -b .vsnprintf -%patch35 -p1 -b .module_crash +%patch36 -p1 -b .24bit cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ unix/xc/programs/Xserver/Xvnc.man \ @@ -142,7 +142,7 @@ make %{?_smp_mflags} cd xorg-x11-server-source aclocal; automake -a; autoconf -%configure --enable-xorg --disable-xnest --disable-xvfb \ +%configure --enable-xorg --disable-xnest --enable-xvfb \ --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ --with-pic \ --disable-xorgcfg \ @@ -313,6 +313,11 @@ fi %{_libdir}/librfb.so.* %changelog +* Thu Jun 08 2007 Adam Tkac 4.1.2-18.fc8 +- added 24bit support to Xvnc +- handle RENDER extension better + (+ moved module_crash patch into render patch) + * Mon Apr 23 2007 Adam Tkac 4.1.2-17.fc7 - removed patch to #188169 because patching this bug could do more things bad than good From bec7d8ef4e1c3ca82d45498333f31396a0518c78 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 8 Jun 2007 11:49:48 +0000 Subject: [PATCH 02/38] - I've forgotten add patch :) --- vnc-24bit.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 vnc-24bit.patch diff --git a/vnc-24bit.patch b/vnc-24bit.patch new file mode 100644 index 0000000..549cf25 --- /dev/null +++ b/vnc-24bit.patch @@ -0,0 +1,42 @@ +--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.24bit 2007-06-07 17:27:46.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-06-07 17:29:01.000000000 +0200 +@@ -762,7 +762,7 @@ static Bool vfbScreenInit(int index, Scr + + miSetPixmapDepths(); + +- switch (pvfb->bitsPerPixel) ++ switch (pvfb->depth) + { + case 8: + miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0); +@@ -771,6 +771,9 @@ static Bool vfbScreenInit(int index, Scr + case 16: + miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f); + break; ++ case 24: ++ miSetVisualTypesAndMasks (24, 1 << TrueColor, 8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff); ++ break; + case 32: + miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00); + break; +@@ -778,15 +781,17 @@ static Bool vfbScreenInit(int index, Scr + return FALSE; + } + +- if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, +- dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) +- return FALSE; ++ ret =fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, ++ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel); + + #ifdef RENDER + if (ret && Render) + fbPictureInit(pScreen, 0, 0); + #endif /* RENDER */ + ++ if (!ret) ++ return FALSE; ++ + pScreen->InstallColormap = vfbInstallColormap; + pScreen->UninstallColormap = vfbUninstallColormap; + pScreen->ListInstalledColormaps = vfbListInstalledColormaps; From ee711f8cf05239a880bddb4e608a1082698af099 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 17 Jul 2007 10:43:40 +0000 Subject: [PATCH 03/38] initscript is ready for parallel booting (#247092) --- vnc-fPIC.patch | 89 -------------------------------------------------- vnc.spec | 5 ++- vncserver.init | 83 +++++++++++++++++++++++++++++++--------------- 3 files changed, 61 insertions(+), 116 deletions(-) delete mode 100644 vnc-fPIC.patch diff --git a/vnc-fPIC.patch b/vnc-fPIC.patch deleted file mode 100644 index 3ffb77d..0000000 --- a/vnc-fPIC.patch +++ /dev/null @@ -1,89 +0,0 @@ ---- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/module/Imakefile.fPIC 2005-03-04 14:33:47.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/module/Imakefile 2005-03-04 14:34:16.000000000 +0000 -@@ -21,7 +21,8 @@ - LinkSourceFile(xf86vncModule.cc,..) - LinkSourceFile(XserverDesktop.cc,..) - --ModuleObjectRule() -+.CCsuf.Osuf: -+ NormalSharedLibObjCplusplusCompile($(_NOOP_)) - /* - LibraryModuleTarget(vnc,$(OBJS) $(VNCLIBS)) - InstallLibraryModule(vnc,$(MODULEDIR),extensions) ---- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Imakefile.fPIC 2005-03-04 14:34:24.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Imakefile 2005-03-04 14:34:52.000000000 +0000 -@@ -36,8 +36,8 @@ - NormalLintTarget($(SRCS)) - - NormalLibraryObjectRule() --NormalCplusplusObjectRule() -- -+.CCsuf.Osuf: -+ NormalSharedLibObjCplusplusCompile($(_NOOP_)) - - MakeSubdirs($(SUBDIRS)) - DependSubdirs($(SUBDIRS)) ---- vnc-4_1-unixsrc/unix/boilerplate.mk.fPIC 2005-03-04 14:35:03.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/boilerplate.mk 2005-03-04 14:35:23.000000000 +0000 -@@ -15,7 +15,7 @@ - CFLAGS = @CFLAGS@ $(DIR_CFLAGS) - CCLD = $(CC) - CXX = @CXX@ --CXXFLAGS = @CXXFLAGS@ -+CXXFLAGS = @CXXFLAGS@ $(DIR_CXXFLAGS) - CXXLD = $(CXX) - CPPFLAGS = @CPPFLAGS@ - DEFS = @DEFS@ ---- vnc-4_1-unixsrc/common/Xregion/Makefile.in.fPIC 2005-03-04 14:32:24.000000000 +0000 -+++ vnc-4_1-unixsrc/common/Xregion/Makefile.in 2005-03-04 14:32:36.000000000 +0000 -@@ -12,4 +12,5 @@ - $(AR) $(library) $(OBJS) - $(RANLIB) $(library) - -+DIR_CFLAGS = -DPIC -fPIC - # followed by boilerplate.mk ---- vnc-4_1-unixsrc/common/network/Makefile.in.fPIC 2005-03-04 14:32:44.000000000 +0000 -+++ vnc-4_1-unixsrc/common/network/Makefile.in 2005-03-04 14:32:58.000000000 +0000 -@@ -14,4 +14,5 @@ - $(AR) $(library) $(OBJS) - $(RANLIB) $(library) - -+DIR_CXXFLAGS = -DPIC -fPIC - # followed by boilerplate.mk ---- vnc-4_1-unixsrc/common/rdr/Makefile.in.fPIC 2005-03-04 14:33:05.000000000 +0000 -+++ vnc-4_1-unixsrc/common/rdr/Makefile.in 2005-03-04 14:33:16.000000000 +0000 -@@ -16,4 +16,5 @@ - $(AR) $(library) $(OBJS) - $(RANLIB) $(library) - -+DIR_CXXFLAGS = -DPIC -fPIC - # followed by boilerplate.mk ---- vnc-4_1-unixsrc/common/rfb/Makefile.in.fPIC 2005-03-04 14:33:20.000000000 +0000 -+++ vnc-4_1-unixsrc/common/rfb/Makefile.in 2005-03-04 14:33:33.000000000 +0000 -@@ -65,4 +65,6 @@ - $(AR) $(library) $(OBJS) - $(RANLIB) $(library) - -+DIR_CFLAGS = -DPIC -fPIC -+DIR_CXXFLAGS = -DPIC -fPIC - # followed by boilerplate.mk ---- vnc-4_1-unixsrc/common/Makefile.in.fPIC 2005-03-04 15:08:57.000000000 +0000 -+++ vnc-4_1-unixsrc/common/Makefile.in 2005-03-04 15:09:25.000000000 +0000 -@@ -1,4 +1,6 @@ - - SUBDIRS = @ZLIB_DIR@ rdr network Xregion rfb - -+DIR_CFLAGS = -DPIC -fPIC -+DIR_CXXFLAGS = -DPIC -fPIC - # followed by boilerplate.mk ---- vnc-4_1-unixsrc/common/boilerplate.mk.fPIC 2005-03-04 15:09:32.000000000 +0000 -+++ vnc-4_1-unixsrc/common/boilerplate.mk 2005-03-04 15:09:49.000000000 +0000 -@@ -15,7 +15,7 @@ - CFLAGS = @CFLAGS@ $(DIR_CFLAGS) - CCLD = $(CC) - CXX = @CXX@ --CXXFLAGS = @CXXFLAGS@ -+CXXFLAGS = @CXXFLAGS@ $(DIR_CXXFLAGS) - CXXLD = $(CXX) - CPPFLAGS = @CPPFLAGS@ - DEFS = @DEFS@ diff --git a/vnc.spec b/vnc.spec index 2a6f7db..5cca13f 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 18%{?dist} +Release: 19%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -313,6 +313,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Tue Jul 17 2007 Adam Tkac 4.1.2-19.fc8 +- initscript is ready for parallel booting (#247092) + * Thu Jun 08 2007 Adam Tkac 4.1.2-18.fc8 - added 24bit support to Xvnc - handle RENDER extension better diff --git a/vncserver.init b/vncserver.init index 9135ebc..5fc5559 100755 --- a/vncserver.init +++ b/vncserver.init @@ -4,48 +4,68 @@ # description: Starts and stops vncserver. \ # used to provide remote X administration services. +### BEGIN INIT INFO +# Provides: vncserver +# Required-Start: $network $named +# Required-Stop: $network $named +# Default-Start: 3 5 +# Default-Stop: 0 1 2 4 6 +# Short-Description: start|stop|restart|try-restart|status|force-reload vncserver +# Description: control vncserver which exports your desktop +### END INIT INFO + # Source function library. . /etc/init.d/functions -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 - -unset VNCSERVERARGS -VNCSERVERS="" -[ -f /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers +[ -r /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers prog=$"VNC server" +RETVAL=0 + start() { + # Source networking configuration. + . /etc/sysconfig/network + + # Check that networking is up. + [ ${NETWORKING} = "no" ] && exit 1 + + [ -x /usr/bin/vncserver ] || exit 5 + [ -x /usr/bin/Xvnc ] || exit 5 + echo -n $"Starting $prog: " - ulimit -S -c 0 >/dev/null 2>&1 RETVAL=0 if [ ! -d /tmp/.X11-unix ] then mkdir -m 1777 /tmp/.X11-unix || : restorecon /tmp/.X11-unix 2>/dev/null || : fi - NOSERV=1 + for display in ${VNCSERVERS} do - NOSERV= + SERVS=1 echo -n "${display} " - unset BASH_ENV ENV DISP="${display%%:*}" - export USER="${display##*:}" - export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}" - runuser -l ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}" + USER="${display##*:}" + VNCUSERARGS="${VNCSERVERARGS[${DISP}]}" + runuser -l ${USER} -c "cd ~${USER} && [ -r .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}" RETVAL=$? - [ "$RETVAL" -ne 0 ] && break + [ "$RETVAL" -eq 0 ] || break done - if test -n "$NOSERV"; then echo -n "no displays configured "; fi - [ "$RETVAL" -eq 0 ] && success $"vncserver startup" || \ - failure $"vncserver start" + if [ -z "$SERVS" ]; then + echo -n "no displays configured " + failure + RETVAL=6 + else + if [ "$RETVAL" -eq 0 ]; then + success $"vncserver startup" + touch /var/lock/subsys/vncserver + else + failure $"vncserver start" + fi + fi echo - [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vncserver + return "$RETVAL" } stop() { @@ -53,7 +73,6 @@ stop() { for display in ${VNCSERVERS} do echo -n "${display} " - unset BASH_ENV ENV export USER="${display##*:}" runuser ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1 done @@ -62,6 +81,7 @@ stop() { failure $"vncserver shutdown" echo [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver + return "$RETVAL" } # See how we were called. @@ -72,23 +92,34 @@ case "$1" in stop) stop ;; - restart|reload) + restart|force-reload) stop sleep 3 start ;; condrestart) - if [ -f /var/lock/subsys/vncserver ]; then + echo "condrestart is obsolete, use try-restart instead" + if [ -e /var/lock/subsys/vncserver ]; then stop sleep 3 start fi ;; + try-restart) + if [ -e /var/lock/subsys/vncserver ]; then + stop + sleep 3 + start + fi + ;; status) status Xvnc + RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 + echo $"Usage: $0 {start|stop|restart|try-restart|status|force-reload}" + exit 3 esac +exit "$RETVAL" + From f74e60378f1b31c5b3543b393195dcbb21a6ee32 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 31 Jul 2007 13:20:58 +0000 Subject: [PATCH 04/38] - vnc service is now disabled in all runlevels by default --- vnc.spec | 5 ++++- vncserver.init | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vnc.spec b/vnc.spec index 5cca13f..5869a15 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 19%{?dist} +Release: 20%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -313,6 +313,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Tue Jul 31 2007 Adam Tkac 4.1.2-20.fc8 +- vnc service is now disabled in all runlevels by default (#250157) + * Tue Jul 17 2007 Adam Tkac 4.1.2-19.fc8 - initscript is ready for parallel booting (#247092) diff --git a/vncserver.init b/vncserver.init index 5fc5559..3a5bf57 100755 --- a/vncserver.init +++ b/vncserver.init @@ -8,8 +8,8 @@ # Provides: vncserver # Required-Start: $network $named # Required-Stop: $network $named -# Default-Start: 3 5 -# Default-Stop: 0 1 2 4 6 +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 # Short-Description: start|stop|restart|try-restart|status|force-reload vncserver # Description: control vncserver which exports your desktop ### END INIT INFO From c31dfbe597f9fd670dbb426c9b13fbdeab729036 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 31 Jul 2007 13:28:26 +0000 Subject: [PATCH 05/38] - removed dist tags from changelog --- vnc.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vnc.spec b/vnc.spec index 5869a15..79442c8 100644 --- a/vnc.spec +++ b/vnc.spec @@ -313,18 +313,18 @@ fi %{_libdir}/librfb.so.* %changelog -* Tue Jul 31 2007 Adam Tkac 4.1.2-20.fc8 +* Tue Jul 31 2007 Adam Tkac 4.1.2-20 - vnc service is now disabled in all runlevels by default (#250157) -* Tue Jul 17 2007 Adam Tkac 4.1.2-19.fc8 +* Tue Jul 17 2007 Adam Tkac 4.1.2-19 - initscript is ready for parallel booting (#247092) -* Thu Jun 08 2007 Adam Tkac 4.1.2-18.fc8 +* Thu Jun 08 2007 Adam Tkac 4.1.2-18 - added 24bit support to Xvnc - handle RENDER extension better (+ moved module_crash patch into render patch) -* Mon Apr 23 2007 Adam Tkac 4.1.2-17.fc7 +* Mon Apr 23 2007 Adam Tkac 4.1.2-17 - removed patch to #188169 because patching this bug could do more things bad than good - removed int10 module from vnc (with-int10 option) From 24e2b5c478a24aec0a0f3a40a0d8f3e195da818c Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 1 Aug 2007 08:03:50 +0000 Subject: [PATCH 06/38] - rebuild --- vnc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vnc.spec b/vnc.spec index 79442c8..590e476 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 20%{?dist} +Release: 20.1%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -313,6 +313,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Aug 01 2007 Adam Tkac 4.1.2-20.1 +- rebuild + * Tue Jul 31 2007 Adam Tkac 4.1.2-20 - vnc service is now disabled in all runlevels by default (#250157) From b4c736353c77839d685db1659f56811ea4421e04 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 6 Aug 2007 10:01:19 +0000 Subject: [PATCH 07/38] - update s390 patch to latest xorg --- vnc-s390.patch | 12 ------------ vnc.spec | 5 ++++- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/vnc-s390.patch b/vnc-s390.patch index 3da56bc..88a19ef 100644 --- a/vnc-s390.patch +++ b/vnc-s390.patch @@ -58,15 +58,3 @@ /* * Due to conflicts with "compiler.h", don't rely on to declare ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/misc/SlowBcopy.c.s390 2007-06-06 15:00:24.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/misc/SlowBcopy.c 2007-06-06 15:03:45.000000000 +0200 -@@ -36,7 +36,8 @@ xf86SlowBcopy(unsigned char *src, unsign - !defined(__powerpc__) && \ - !defined(__mips__) && \ - !defined(__ia64__) && \ -- !defined(__arm__) -+ !defined(__arm__) && \ -+ !defined(__s390x__) - outb(0x80, 0x00); - #endif - } diff --git a/vnc.spec b/vnc.spec index 590e476..5b7ead6 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 20.1%{?dist} +Release: 20.2%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -313,6 +313,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Aug 06 2007 Adam Tkac 4.1.2-20.2 +- updated vnc-s390 patch to latest xorg + * Wed Aug 01 2007 Adam Tkac 4.1.2-20.1 - rebuild From aa556458c118e7ac1f9bfc3a6172958229be7263 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 22 Aug 2007 11:49:06 +0000 Subject: [PATCH 08/38] - rebuild (BuildID feature) - GPLv2 license --- vnc.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vnc.spec b/vnc.spec index 5b7ead6..804a11d 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 20.2%{?dist} +Release: 21%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -37,7 +37,7 @@ Patch32: vnc-autotools-compile.patch Patch33: vnc-always_use_fb.patch Patch34: vnc-vsnprintf.patch Patch36: vnc-24bit.patch -License: GPL +License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: perl @@ -313,6 +313,10 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Aug 22 2007 Adam Tkac 4.1.2-21 +- rebuild (BuildID feature) +- GPLv2 livense + * Mon Aug 06 2007 Adam Tkac 4.1.2-20.2 - updated vnc-s390 patch to latest xorg From 2a911b686280dca735f20626a04ab5078a6116ca Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 24 Sep 2007 14:44:55 +0000 Subject: [PATCH 09/38] - obsoleted vnc-s390.patch - build with --disable-xorg --- vnc-noxorg.patch | 24 +++++++++++++++++++ vnc-s390.patch | 60 ------------------------------------------------ vnc.spec | 19 ++++++++------- 3 files changed, 35 insertions(+), 68 deletions(-) create mode 100644 vnc-noxorg.patch delete mode 100644 vnc-s390.patch diff --git a/vnc-noxorg.patch b/vnc-noxorg.patch new file mode 100644 index 0000000..3b390c8 --- /dev/null +++ b/vnc-noxorg.patch @@ -0,0 +1,24 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.s390 vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.s390 2007-09-21 11:11:58.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-09-21 11:12:46.000000000 +0200 +@@ -27,19 +27,8 @@ Xvnc_SOURCES = \ + $(top_srcdir)/fb/fbcmap.c + + Xvnc_LDADD = $(XORG_CORE_LIBS) \ +- $(XORG_LIBS) \ ++ $(XVFB_LIBS) \ + $(XSERVER_LIBS) \ +- ../../fb/libfb.la \ +- ../../mi/libminimi.la \ +- ../../render/librender.la \ +- ../../xkb/libxkbstubs.la \ +- ../../dbe/libdbe.la \ +- ../../Xext/libXext.la \ +- ../../XTrap/libxtrap.la \ +- ../../record/librecord.la \ +- ../xfree86/os-support/libxorgos.la \ +- ../../os/libos.la \ +- ../xfree86/common/libcommon.la \ + -lX11 \ + libvnccommon.la \ + ../../../../common/rfb/librfb.la diff --git a/vnc-s390.patch b/vnc-s390.patch deleted file mode 100644 index 88a19ef..0000000 --- a/vnc-s390.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/int10/Makefile.am.s390 2007-06-06 15:00:23.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/int10/Makefile.am 2007-06-06 15:00:26.000000000 +0200 -@@ -38,7 +38,8 @@ libint10_la_SOURCES = \ - endif - - if INT10_STUB --AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS) -+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS) \ -+ -I../common -I../os-support -I../os-support/bus - libint10_la_SOURCES = stub.c xf86int10module.c - endif - ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h.s390 2007-06-06 15:00:24.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h 2007-06-06 15:00:26.000000000 +0200 -@@ -1353,6 +1353,15 @@ do { \ - : "0" (_beg), "r" (_end), "r" (_flg)); \ - } while (0) - -+# elif defined(__s390__) || defined(__s390x__) -+ -+#define inb(x) (0) -+#define inw(x) (0) -+#define inl(x) (0) -+#define outb(x,y) (0) -+#define outw(x,y) (0) -+#define outl(x,y) (0) -+ - # else /* ix86 */ - - # define ldq_u(p) (*((unsigned long *)(p))) ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/xf86Helper.c.s390 2007-06-06 15:00:24.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/xf86Helper.c 2007-06-06 15:00:26.000000000 +0200 -@@ -2089,6 +2089,7 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num - void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, - int maskval, int knownclkindex, int knownclkvalue) - { -+#if !defined(__s390__) && !defined(__s390x__) - register int status = vertsyncreg; - unsigned long i, cnt, rcnt, sync; - -@@ -2182,6 +2183,7 @@ finish: - - /* Restore registers that were written on */ - (*ClockFunc)(pScrn, CLK_REG_RESTORE); -+#endif /* !defined(__s390__) && !defined(__s390x__) */ - } - - _X_EXPORT void ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/linux/lnx_video.c.s390 2007-06-06 15:00:24.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/os-support/linux/lnx_video.c 2007-06-06 15:03:10.000000000 +0200 -@@ -63,7 +63,8 @@ static Bool ExtendedEnabled = FALSE; - !defined(__mc68000__) && \ - !defined(__sparc__) && \ - !defined(__mips__) && \ -- !defined(__arm__) -+ !defined(__arm__) && \ -+ !defined(__s390) - - /* - * Due to conflicts with "compiler.h", don't rely on to declare diff --git a/vnc.spec b/vnc.spec index 804a11d..6706d54 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 21%{?dist} +Release: 22%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -22,7 +22,6 @@ Patch8: vnc-restart.patch Patch9: vnc-vncpasswd.patch Patch11: vnc-modular-xorg.patch Patch12: vnc-nohttpd.patch -Patch14: vnc-s390.patch Patch15: vnc-viewer-reparent.patch Patch16: vnc-64bit.patch Patch17: vnc-select.patch @@ -37,6 +36,7 @@ Patch32: vnc-autotools-compile.patch Patch33: vnc-always_use_fb.patch Patch34: vnc-vsnprintf.patch Patch36: vnc-24bit.patch +Patch37: vnc-noxorg.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -98,9 +98,6 @@ cp -r %{_datadir}/xorg-x11-server-source unix %patch9 -p1 -b .vncpasswd %patch11 -p1 -b .modular-xorg %patch12 -p1 -b .nohttpd -pushd unix/xorg-x11-server-source* -%patch14 -p3 -b .s390 -popd %patch15 -p1 -b .viewer-reparent %patch16 -p1 -b .64bit %patch17 -p1 -b .select @@ -115,6 +112,7 @@ popd %patch33 -p1 -b .always_use_fb %patch34 -p1 -b .vsnprintf %patch36 -p1 -b .24bit +%patch37 -p1 -b .nomodule cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ unix/xc/programs/Xserver/Xvnc.man \ @@ -142,7 +140,8 @@ make %{?_smp_mflags} cd xorg-x11-server-source aclocal; automake -a; autoconf -%configure --enable-xorg --disable-xnest --enable-xvfb \ +%configure --disable-xorg \ + --disable-xnest --enable-xvfb \ --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ --with-pic \ --disable-xorgcfg \ @@ -153,7 +152,7 @@ aclocal; automake -a; autoconf --enable-xcsecurity \ --with-default-font-path="unix/:7100,built-ins" \ --with-fontdir=%{_datadir}/X11/fonts \ - --with-os-name="Fedora Core 7" \ + --with-os-name="Fedora Core 8" \ --with-os-vendor="Red Hat, Inc." \ --with-xkb-output=%{_localstatedir}/lib/xkb \ --with-rgb-path=%{_datadir}/X11/rgb \ @@ -313,9 +312,13 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Sep 24 2007 Adam Tkac 4.1.2-22 +- obsoleted vnc-s390.patch +- build with --disable-xorg + * Wed Aug 22 2007 Adam Tkac 4.1.2-21 - rebuild (BuildID feature) -- GPLv2 livense +- GPLv2 license * Mon Aug 06 2007 Adam Tkac 4.1.2-20.2 - updated vnc-s390 patch to latest xorg From 226ea7d01533af279289ac883c219ba417ea6365 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 15 Oct 2007 19:30:13 +0000 Subject: [PATCH 10/38] makefile update to properly grab makefile.common --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3e94b2b..b1cbf0f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,21 @@ # Makefile for source rpm: vnc -# $Id$ +# $Id: Makefile,v 1.1 2004/09/09 14:02:00 cvsdist Exp $ NAME := vnc SPECFILE = $(firstword $(wildcard *.spec)) -include ../common/Makefile.common +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attempt a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) From 16683756f45abaefed049db62b09c2addb22d7a9 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 23 Oct 2007 17:38:06 +0000 Subject: [PATCH 11/38] - disabled Composite extension (#242280, #339811) --- vnc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vnc.spec b/vnc.spec index 6706d54..4f2681e 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 22%{?dist} +Release: 23%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -147,7 +147,7 @@ aclocal; automake -a; autoconf --disable-xorgcfg \ --disable-xprint \ --disable-static \ - --enable-composite \ + --disable-composite \ --enable-xtrap \ --enable-xcsecurity \ --with-default-font-path="unix/:7100,built-ins" \ @@ -312,6 +312,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Tue Oct 23 2007 Adam Tkac 4.1.2-23 +- disabled Composite extension (#242280, #339811) + * Mon Sep 24 2007 Adam Tkac 4.1.2-22 - obsoleted vnc-s390.patch - build with --disable-xorg From cd9b35a585060e5727da52359901e9208e56934d Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 22 Jan 2008 17:16:12 +0000 Subject: [PATCH 12/38] - start use F8 xserver codebase - compat patches and gcc 4.3 patches - use catalogue:/etc/X11/fontpath.d,built-ins as default fontpath (#390971) --- .cvsignore | 1 + sources | 1 + vnc-F9mesa.patch | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ vnc-gcc43.patch | 46 +++++++++++++++++++++++++++ vnc.spec | 34 +++++++++++++++----- 5 files changed, 157 insertions(+), 7 deletions(-) create mode 100644 vnc-F9mesa.patch create mode 100644 vnc-gcc43.patch diff --git a/.cvsignore b/.cvsignore index 6e2b3b3..e7cd54a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ vnc-4_1_2-unixsrc.tar.gz vnc-4_1-javasrc.tar.gz +xserver-1.3.0.0-37.fc8.tar.bz2 diff --git a/sources b/sources index 741660b..97e5b07 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ cf9a6fe8f592286b5e0fdde686504ffb vnc-4_1_2-unixsrc.tar.gz 9407ce1f215aefca77bef12670745280 vnc-4_1-javasrc.tar.gz +db16d9f0e5b19a34ac5e6f353b79ec8d xserver-1.3.0.0-37.fc8.tar.bz2 diff --git a/vnc-F9mesa.patch b/vnc-F9mesa.patch new file mode 100644 index 0000000..4954838 --- /dev/null +++ b/vnc-F9mesa.patch @@ -0,0 +1,82 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c.rawhidemesa vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c.rawhidemesa 2008-01-09 14:38:43.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c 2008-01-09 14:48:56.000000000 +0100 +@@ -5169,31 +5169,6 @@ void __glXDisp_LoadProgramNV(GLbyte * pc + ) ); + } + +-void __glXDisp_ProgramParameter4dvNV(GLbyte * pc) +-{ +-#ifdef __GLX_ALIGN64 +- if ((unsigned long)(pc) & 7) { +- (void) memmove(pc-4, pc, 40); +- pc -= 4; +- } +-#endif +- +- CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( +- *(GLenum *)(pc + 0), +- *(GLuint *)(pc + 4), +- (const GLdouble *)(pc + 8) +- ) ); +-} +- +-void __glXDisp_ProgramParameter4fvNV(GLbyte * pc) +-{ +- CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( +- *(GLenum *)(pc + 0), +- *(GLuint *)(pc + 4), +- (const GLfloat *)(pc + 8) +- ) ); +-} +- + void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) + { + const GLuint num = *(GLuint *)(pc + 8); +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c.rawhidemesa vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c.rawhidemesa 2008-01-09 14:47:05.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c 2008-01-09 14:47:24.000000000 +0100 +@@ -644,7 +644,7 @@ static const void *Render_function_table + /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, + /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, + /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, +- /* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, ++ /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, + /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, + /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, + /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c.rawhidemesa vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c.rawhidemesa 2008-01-09 14:49:12.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c 2008-01-09 14:49:25.000000000 +0100 +@@ -5325,31 +5325,6 @@ void __glXDispSwap_LoadProgramNV(GLbyte + ) ); + } + +-void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc) +-{ +-#ifdef __GLX_ALIGN64 +- if ((unsigned long)(pc) & 7) { +- (void) memmove(pc-4, pc, 40); +- pc -= 4; +- } +-#endif +- +- CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( +- (GLenum )bswap_ENUM ( pc + 0 ), +- (GLuint )bswap_CARD32 ( pc + 4 ), +- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) +- ) ); +-} +- +-void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc) +-{ +- CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( +- (GLenum )bswap_ENUM ( pc + 0 ), +- (GLuint )bswap_CARD32 ( pc + 4 ), +- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) +- ) ); +-} +- + void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) + { + const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); diff --git a/vnc-gcc43.patch b/vnc-gcc43.patch new file mode 100644 index 0000000..3322dfe --- /dev/null +++ b/vnc-gcc43.patch @@ -0,0 +1,46 @@ +diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx +--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 2008-01-09 14:51:54.000000000 +0100 ++++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-01-09 14:51:54.000000000 +0100 +@@ -37,6 +37,9 @@ + #include + #endif + ++extern "C" { ++#include ++} + #include + #include + #include +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h.gcc43 vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h.gcc43 2008-01-09 14:57:58.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h 2008-01-09 14:58:08.000000000 +0100 +@@ -26,6 +26,7 @@ + #ifndef _PICTURESTR_H_ + #define _PICTURESTR_H_ + ++#include + #include "glyphstr.h" + #include "scrnintstr.h" + #include "resource.h" +diff -up vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx +--- vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx 2008-01-09 14:51:54.000000000 +0100 +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + #include + #include +diff -up vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx +--- vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx 2008-01-09 14:51:54.000000000 +0100 +@@ -21,6 +21,7 @@ + + + #include ++#include + #include + #include + #include diff --git a/vnc.spec b/vnc.spec index 4f2681e..6d6609d 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 23%{?dist} +Release: 24%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -12,6 +12,10 @@ Source2: vncserver.init Source3: vnc-16x16.png Source4: vnc-24x24.png Source5: vnc-48x48.png + +# XXX Temporary build with F8 xserver due new Input events handling in 1.4.99 +Source6: xserver-1.3.0.0-37.fc8.tar.bz2 + Patch0: vnc-cookie.patch Patch1: vnc-gcc4.patch Patch2: vnc-use-fb.patch @@ -37,6 +41,8 @@ Patch33: vnc-always_use_fb.patch Patch34: vnc-vsnprintf.patch Patch36: vnc-24bit.patch Patch37: vnc-noxorg.patch +Patch38: vnc-gcc43.patch +Patch39: vnc-F9mesa.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -52,7 +58,7 @@ BuildRequires: xorg-x11-proto-devel, libXext-devel, tcp_wrappers-devel BuildRequires: libXtst-devel, libfontenc-devel, xorg-x11-util-macros BuildRequires: libXt-devel BuildRequires: libstdc++-devel, gcc-c++, libselinux-devel -BuildRequires: xorg-x11-server-source +#BuildRequires: xorg-x11-server-source BuildRequires: mesa-libGL-devel >= 6.5.2, mesa-source >= 6.5.2, libdrm-devel Requires: gtk2 >= 2.6 @@ -87,7 +93,13 @@ Remote framebuffer library which is used by vncviewer and vncserver %prep %setup -q -n vnc-%{vnc_version}-unixsrc -a1 -cp -r %{_datadir}/xorg-x11-server-source unix + +# XXX - new event handling in 1.4.99 xserver +#cp -r %{_datadir}/xorg-x11-server-source unix +pushd unix; mkdir xorg-x11-server-source; cd xorg-x11-server-source +tar xf %{SOURCE6} +popd + %patch0 -p1 -b .cookie %patch1 -p1 -b .gcc4 %patch2 -p1 -b .use-fb @@ -113,6 +125,8 @@ cp -r %{_datadir}/xorg-x11-server-source unix %patch34 -p1 -b .vsnprintf %patch36 -p1 -b .24bit %patch37 -p1 -b .nomodule +%patch38 -p1 -b .gcc43 +%patch39 -p1 -b .F9mesa cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ unix/xc/programs/Xserver/Xvnc.man \ @@ -126,7 +140,7 @@ sed -i -e 's,xor,c_xor,' -e 's,and,c_and,' \ %build cd common -autoreconf --install --force +autoreconf -fiv %configure make %{?_smp_mflags} @@ -134,7 +148,7 @@ cd ../vnc-%{java_vnc_version}-javasrc/java make JAVAC="gcj -C" JAR=fastjar %{?_smp_mflags} cd ../../unix -autoreconf --install --force +autoreconf -fiv %configure make %{?_smp_mflags} @@ -150,9 +164,9 @@ aclocal; automake -a; autoconf --disable-composite \ --enable-xtrap \ --enable-xcsecurity \ - --with-default-font-path="unix/:7100,built-ins" \ + --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ --with-fontdir=%{_datadir}/X11/fonts \ - --with-os-name="Fedora Core 8" \ + --with-os-name="Fedora 9" \ --with-os-vendor="Red Hat, Inc." \ --with-xkb-output=%{_localstatedir}/lib/xkb \ --with-rgb-path=%{_datadir}/X11/rgb \ @@ -312,6 +326,12 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Jan 09 2008 Adam Tkac 4.1.2-24 +- start use F8 xserver codebase +- compat patches and gcc 4.3 patches +- use catalogue:/etc/X11/fontpath.d,built-ins as default fontpath + (#390971) + * Tue Oct 23 2007 Adam Tkac 4.1.2-23 - disabled Composite extension (#242280, #339811) From bbeaf5862847feb100f9fc0a4eff471558277fe1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 18 Feb 2008 20:08:25 +0000 Subject: [PATCH 13/38] - Autorebuild for GCC 4.3 --- vnc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vnc.spec b/vnc.spec index 6d6609d..54bd4a6 100644 --- a/vnc.spec +++ b/vnc.spec @@ -4,7 +4,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 24%{?dist} +Release: 25%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz @@ -326,6 +326,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Feb 18 2008 Fedora Release Engineering - 4.1.2-25 +- Autorebuild for GCC 4.3 + * Wed Jan 09 2008 Adam Tkac 4.1.2-24 - start use F8 xserver codebase - compat patches and gcc 4.3 patches From af923f9b17f6c9d04bb3c149c9ac5afff3ff946f Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 11 Mar 2008 12:50:34 +0000 Subject: [PATCH 14/38] - BuildRequires and Requires cleanup - don't build java viewer (problems due new gcj) - use xorg codebase from xorg-x11-server-source package again - vnc-selection.patch - new xserver selection API/ABI - vnc-xkb.patch - disable XKEYBOARD extension - vnc-paint.patch - PaintWindow{Background,Border} hooks have been removed - vnc-privates.patch - update devPrivates handling - vnc-mieq.patch - use event queue to handle input events --- .cvsignore | 2 - sources | 2 - vnc-allocate.patch | 28 ++ vnc-autotools.patch | 26 -- vnc-gcc43.patch | 11 - vnc-mieq.patch | 690 +++++++++++++++++++++++++++++++++++++++++ vnc-modular-xorg.patch | 139 --------- vnc-noxkb.patch | 12 + vnc-paint.patch | 109 +++++++ vnc-privates.patch | 132 ++++++++ vnc-selections.patch | 78 +++++ vnc.spec | 94 +++--- 12 files changed, 1101 insertions(+), 222 deletions(-) create mode 100644 vnc-allocate.patch create mode 100644 vnc-mieq.patch create mode 100644 vnc-noxkb.patch create mode 100644 vnc-paint.patch create mode 100644 vnc-privates.patch create mode 100644 vnc-selections.patch diff --git a/.cvsignore b/.cvsignore index e7cd54a..43f5d82 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1 @@ vnc-4_1_2-unixsrc.tar.gz -vnc-4_1-javasrc.tar.gz -xserver-1.3.0.0-37.fc8.tar.bz2 diff --git a/sources b/sources index 97e5b07..665d952 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ cf9a6fe8f592286b5e0fdde686504ffb vnc-4_1_2-unixsrc.tar.gz -9407ce1f215aefca77bef12670745280 vnc-4_1-javasrc.tar.gz -db16d9f0e5b19a34ac5e6f353b79ec8d xserver-1.3.0.0-37.fc8.tar.bz2 diff --git a/vnc-allocate.patch b/vnc-allocate.patch new file mode 100644 index 0000000..3035e46 --- /dev/null +++ b/vnc-allocate.patch @@ -0,0 +1,28 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.allocate vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.allocate 2008-02-25 16:38:37.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-02-25 16:54:48.000000000 +0100 +@@ -536,9 +536,9 @@ static void vfbInstallColormap(ColormapP + swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); + swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); + +- ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel)); +- prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb)); +- defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem)); ++ ppix = (Pixel *)xalloc(entries * sizeof(Pixel)); ++ prgb = (xrgb *)xalloc(entries * sizeof(xrgb)); ++ defs = (xColorItem *)xalloc(entries * sizeof(xColorItem)); + + for (i = 0; i < entries; i++) ppix[i] = i; + /* XXX truecolor */ +@@ -553,9 +553,9 @@ static void vfbInstallColormap(ColormapP + } + (*pmap->pScreen->StoreColors)(pmap, entries, defs); + +- DEALLOCATE_LOCAL(ppix); +- DEALLOCATE_LOCAL(prgb); +- DEALLOCATE_LOCAL(defs); ++ xfree(ppix); ++ xfree(prgb); ++ xfree(defs); + } + } diff --git a/vnc-autotools.patch b/vnc-autotools.patch index ff1c42c..ab598f3 100644 --- a/vnc-autotools.patch +++ b/vnc-autotools.patch @@ -366,32 +366,6 @@ + vncviewer/Makefile + x0vncserver/Makefile]) +AC_OUTPUT ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.autotools 2007-02-16 09:52:43.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-02-16 09:53:24.000000000 +0100 -@@ -42,10 +42,7 @@ - ../xfree86/common/libcommon.la \ - -lX11 \ - libvnccommon.la \ -- ../../../../common/rfb/librfb.a \ -- ../../../../common/rdr/librdr.a \ -- ../../../../common/network/libnetwork.a \ -- ../../../../common/Xregion/libXregion.a -+ ../../../../common/rfb/librfb.la - - Xvnc_CFLAGS = -DHAVE_DIX_CONFIG_H \ - -DNO_HW_ONLY_EXTS \ -@@ -68,10 +65,7 @@ - libvnc_la_SOURCES = xf86vncModule.cc - libvnc_la_LIBADD = \ - libvnccommon.la \ -- ../../../../common/rfb/librfb.a \ -- ../../../../common/rdr/librdr.a \ -- ../../../../common/network/libnetwork.a \ -- ../../../../common/Xregion/libXregion.a -+ ../../../../common/rfb/librfb.la - libvnc_la_CXXFLAGS = \ - -I../../../../common \ - -I$(top_srcdir)/hw/xfree86/common \ --- /dev/null 2007-02-16 09:39:42.585819347 +0100 +++ vnc-4_1_2-unixsrc/unix/vncviewer/Makefile.am 2007-02-16 09:51:11.000000000 +0100 @@ -0,0 +1,24 @@ diff --git a/vnc-gcc43.patch b/vnc-gcc43.patch index 3322dfe..b7e035d 100644 --- a/vnc-gcc43.patch +++ b/vnc-gcc43.patch @@ -11,17 +11,6 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 vnc-4_1_2-unixsrc/ #include #include #include -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h.gcc43 vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h.gcc43 2008-01-09 14:57:58.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/render/picturestr.h 2008-01-09 14:58:08.000000000 +0100 -@@ -26,6 +26,7 @@ - #ifndef _PICTURESTR_H_ - #define _PICTURESTR_H_ - -+#include - #include "glyphstr.h" - #include "scrnintstr.h" - #include "resource.h" diff -up vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx --- vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200 +++ vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx 2008-01-09 14:51:54.000000000 +0100 diff --git a/vnc-mieq.patch b/vnc-mieq.patch new file mode 100644 index 0000000..497afbd --- /dev/null +++ b/vnc-mieq.patch @@ -0,0 +1,690 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.mieq vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.mieq 2006-05-15 18:56:20.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-05 12:25:06.000000000 +0100 +@@ -50,12 +50,20 @@ extern char *display; + #include "resource.h" + #include "cursorstr.h" + #include "windowstr.h" ++#include "mi/mi.h" + #define XK_CYRILLIC + #include "keysym.h" + #undef public + #undef class + } + ++static xEvent *eventq = NULL; ++static DeviceIntPtr vncKeyboard = NULL; ++static DeviceIntPtr vncMouse = NULL; ++ ++static int vfbKeybdProc (DeviceIntPtr pDev, int onoff); ++static int vfbMouseProc (DeviceIntPtr pDev, int onoff); ++ + using namespace rfb; + using namespace network; + +@@ -202,6 +210,21 @@ XserverDesktop::XserverDesktop(ScreenPtr + + if (httpListener) + httpServer = new FileHTTPServer(this); ++ ++// XXX Memory leak here, eventq is not free()-d because it has to exist till server exits ++ if (!eventq) ++ eventq = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum()); ++ if (!eventq) ++ FatalError("couldn't allocate room for events\n"); ++ ++ if (vncMouse == NULL) { ++ vncMouse = AddInputDevice(vfbMouseProc, TRUE); ++ RegisterPointerDevice (vncMouse); ++ } ++ if (vncKeyboard == NULL) { ++ vncKeyboard = AddInputDevice(vfbKeybdProc, TRUE); ++ RegisterKeyboardDevice (vncKeyboard); ++ } + } + + XserverDesktop::~XserverDesktop() +@@ -495,7 +518,7 @@ void XserverDesktop::positionCursor() + { + if (!cursorPos.equals(oldCursorPos)) { + oldCursorPos = cursorPos; +- (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE); ++// (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE); + server->setCursorPos(cursorPos); + server->tryUpdate(); + } +@@ -660,8 +683,8 @@ void XserverDesktop::approveConnection(v + + void XserverDesktop::pointerEvent(const Point& pos, int buttonMask) + { +- xEvent ev; +- DevicePtr dev = LookupPointerDevice(); ++ BYTE detail; ++ int i, j, n, valuators[2]; + + // SetCursorPosition seems to be very expensive (at least on XFree86 3.3.6 + // for S3), so we delay calling it until positionCursor() is called at the +@@ -670,14 +693,14 @@ void XserverDesktop::pointerEvent(const + + NewCurrentScreen(pScreen, pos.x, pos.y); + +- ev.u.u.type = MotionNotify; +- ev.u.u.detail = 0; +- ev.u.keyButtonPointer.rootX = pos.x; +- ev.u.keyButtonPointer.rootY = pos.y; +- ev.u.keyButtonPointer.time = GetTimeInMillis(); +- +- if (!pos.equals(cursorPos)) +- (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1); ++ if (!pos.equals(cursorPos)) { ++ valuators[0] = pos.x; ++ valuators[1] = pos.y; ++ n = GetPointerEvents (eventq, vncMouse, MotionNotify, 0, ++ POINTER_ABSOLUTE, 0, 2, valuators); ++ for (i = 0; i < n; i++) ++ mieqEnqueue (vncMouse, eventq + i); ++ } + + for (int i = 0; i < 5; i++) { + if ((buttonMask ^ oldButtonMask) & (1<button->map[i + 1]; ++ detail = vncMouse->button->map[i + 1]; + #else +- ev.u.u.detail = i + 1; ++ detail = i + 1; + #endif +- ev.u.u.type = (buttonMask & (1<processInputProc)(&ev, (DeviceIntPtr)dev, 1); ++ n = GetPointerEvents (eventq, vncMouse, (buttonMask & (1<key; ++ KeyClassPtr keyc = vncKeyboard->key; + if (!(keyc->state & (1<modifierKeyMap[modIndex * keyc->maxKeysPerModifier], + true); +@@ -789,7 +815,7 @@ public: + } + } + void release() { +- KeyClassPtr keyc = dev->key; ++ KeyClassPtr keyc = vncKeyboard->key; + if (keyc->state & (1<maxKeysPerModifier; k++) { + int keycode +@@ -802,20 +828,19 @@ public: + private: + void tempKeyEvent(int keycode, bool down) { + if (keycode) { +- if (!keys) keys = new int[dev->key->maxKeysPerModifier]; ++ if (!keys) keys = new int[vncKeyboard->key->maxKeysPerModifier]; + keys[nKeys++] = keycode; + generateXKeyEvent(keycode, down); + } + } + void generateXKeyEvent(int keycode, bool down) { +- xEvent ev; +- ev.u.u.type = down ? KeyPress : KeyRelease; +- ev.u.u.detail = keycode; +- ev.u.keyButtonPointer.time = GetTimeInMillis(); +- (*dev->c_public.processInputProc)(&ev, dev, 1); ++ int i, n; ++ n = GetKeyboardEvents (eventq, vncKeyboard, ++ down ? KeyPress : KeyRelease, keycode); ++ for (i = 0; i < n; i++) ++ mieqEnqueue (vncKeyboard, eventq + i); + vlog.debug("fake keycode %d %s", keycode, down ? "down" : "up"); + } +- DeviceIntPtr dev; + int modIndex; + int nKeys; + int* keys; +@@ -888,16 +913,16 @@ void XserverDesktop::keyEvent(rdr::U32 k + vlog.debug("Ignoring caps lock"); + return; + } +- DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice(); +- KeyClassPtr keyc = dev->key; ++ KeyClassPtr keyc = vncKeyboard->key; + KeySymsPtr keymap = &keyc->curKeySyms; ++ int i, j, k, n; + + // find which modifier Mode_switch is on. + int modeSwitchMapIndex = 0; +- for (int i = 3; i < 8; i++) { +- for (int k = 0; k < keyc->maxKeysPerModifier; k++) { ++ for (i = 3; i < 8; i++) { ++ for (k = 0; k < keyc->maxKeysPerModifier; k++) { + int keycode = keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k]; +- for (int j = 0; j < keymap->mapWidth; j++) { ++ for (j = 0; j < keymap->mapWidth; j++) { + if (keycode != 0 && + keymap->map[(keycode - keymap->minKeyCode) + * keymap->mapWidth + j] == XK_Mode_switch) +@@ -926,7 +951,7 @@ void XserverDesktop::keyEvent(rdr::U32 k + if (kc == 0) { + // Not a direct match in the local keyboard mapping. Check for alternative + // keysyms with the same meaning. +- for (int i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) { ++ for (i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) { + if (keysym == altKeysym[i].a) + kc = KeysymToKeycode(keymap, altKeysym[i].b, &col); + else if (keysym == altKeysym[i].b) +@@ -954,16 +979,16 @@ void XserverDesktop::keyEvent(rdr::U32 k + + // See if it's a modifier key. If so, then don't do any auto-repeat, because + // the X server will translate each press into a release followed by a press. +- for (int i = 0; i < 8; i++) { +- for (int k = 0; k < keyc->maxKeysPerModifier; k++) { ++ for (i = 0; i < 8; i++) { ++ for (k = 0; k < keyc->maxKeysPerModifier; k++) { + if (kc == keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k] && + IS_PRESSED(keyc,kc) && down) + return; + } + } + +- ModifierState shift(dev, ShiftMapIndex); +- ModifierState modeSwitch(dev, modeSwitchMapIndex); ++ ModifierState shift(ShiftMapIndex); ++ ModifierState modeSwitch(modeSwitchMapIndex); + if (down) { + if (col & 1) + shift.press(); +@@ -977,11 +1002,10 @@ void XserverDesktop::keyEvent(rdr::U32 k + } + } + vlog.debug("keycode %d %s", kc, down ? "down" : "up"); +- xEvent ev; +- ev.u.u.type = down ? KeyPress : KeyRelease; +- ev.u.u.detail = kc; +- ev.u.keyButtonPointer.time = GetTimeInMillis(); +- (*dev->c_public.processInputProc)(&ev, dev, 1); ++ n = GetKeyboardEvents (eventq, vncKeyboard, down ? KeyPress : KeyRelease, ++ kc); ++ for (i = 0; i < n; i++) ++ mieqEnqueue (vncKeyboard, eventq + i); + } + + +@@ -1150,3 +1174,208 @@ static KeyCode KeysymToKeycode(KeySymsPt + } + return 0; + } ++ ++void vncRingBell(int percent, int pitch, int duration) ++{ ++ if (percent > 0) ++ vncBell(); ++} ++ ++/* Fairly standard US PC Keyboard */ ++ ++#define VFB_MIN_KEY 8 ++#define VFB_MAX_KEY 255 ++#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1) ++#define KEYSYMS_PER_KEY 2 ++KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = { ++ NoSymbol, NoSymbol, ++ XK_Escape, NoSymbol, ++ XK_1, XK_exclam, ++ XK_2, XK_at, ++ XK_3, XK_numbersign, ++ XK_4, XK_dollar, ++ XK_5, XK_percent, ++ XK_6, XK_asciicircum, ++ XK_7, XK_ampersand, ++ XK_8, XK_asterisk, ++ XK_9, XK_parenleft, ++ XK_0, XK_parenright, ++ XK_minus, XK_underscore, ++ XK_equal, XK_plus, ++ XK_BackSpace, NoSymbol, ++ XK_Tab, NoSymbol, ++ XK_q, XK_Q, ++ XK_w, XK_W, ++ XK_e, XK_E, ++ XK_r, XK_R, ++ XK_t, XK_T, ++ XK_y, XK_Y, ++ XK_u, XK_U, ++ XK_i, XK_I, ++ XK_o, XK_O, ++ XK_p, XK_P, ++ XK_bracketleft, XK_braceleft, ++ XK_bracketright, XK_braceright, ++ XK_Return, NoSymbol, ++ XK_Control_L, NoSymbol, ++ XK_a, XK_A, ++ XK_s, XK_S, ++ XK_d, XK_D, ++ XK_f, XK_F, ++ XK_g, XK_G, ++ XK_h, XK_H, ++ XK_j, XK_J, ++ XK_k, XK_K, ++ XK_l, XK_L, ++ XK_semicolon, XK_colon, ++ XK_apostrophe, XK_quotedbl, ++ XK_grave, XK_asciitilde, ++ XK_Shift_L, NoSymbol, ++ XK_backslash, XK_bar, ++ XK_z, XK_Z, ++ XK_x, XK_X, ++ XK_c, XK_C, ++ XK_v, XK_V, ++ XK_b, XK_B, ++ XK_n, XK_N, ++ XK_m, XK_M, ++ XK_comma, XK_less, ++ XK_period, XK_greater, ++ XK_slash, XK_question, ++ XK_Shift_R, NoSymbol, ++ XK_KP_Multiply, NoSymbol, ++ XK_Alt_L, XK_Meta_L, ++ XK_space, NoSymbol, ++ /*XK_Caps_Lock*/ NoSymbol, NoSymbol, ++ XK_F1, NoSymbol, ++ XK_F2, NoSymbol, ++ XK_F3, NoSymbol, ++ XK_F4, NoSymbol, ++ XK_F5, NoSymbol, ++ XK_F6, NoSymbol, ++ XK_F7, NoSymbol, ++ XK_F8, NoSymbol, ++ XK_F9, NoSymbol, ++ XK_F10, NoSymbol, ++ XK_Num_Lock, XK_Pointer_EnableKeys, ++ XK_Scroll_Lock, NoSymbol, ++ XK_KP_Home, XK_KP_7, ++ XK_KP_Up, XK_KP_8, ++ XK_KP_Prior, XK_KP_9, ++ XK_KP_Subtract, NoSymbol, ++ XK_KP_Left, XK_KP_4, ++ XK_KP_Begin, XK_KP_5, ++ XK_KP_Right, XK_KP_6, ++ XK_KP_Add, NoSymbol, ++ XK_KP_End, XK_KP_1, ++ XK_KP_Down, XK_KP_2, ++ XK_KP_Next, XK_KP_3, ++ XK_KP_Insert, XK_KP_0, ++ XK_KP_Delete, XK_KP_Decimal, ++ NoSymbol, NoSymbol, ++ NoSymbol, NoSymbol, ++ NoSymbol, NoSymbol, ++ XK_F11, NoSymbol, ++ XK_F12, NoSymbol, ++ XK_Home, NoSymbol, ++ XK_Up, NoSymbol, ++ XK_Prior, NoSymbol, ++ XK_Left, NoSymbol, ++ NoSymbol, NoSymbol, ++ XK_Right, NoSymbol, ++ XK_End, NoSymbol, ++ XK_Down, NoSymbol, ++ XK_Next, NoSymbol, ++ XK_Insert, NoSymbol, ++ XK_Delete, NoSymbol, ++ XK_KP_Enter, NoSymbol, ++ XK_Control_R, NoSymbol, ++ XK_Pause, XK_Break, ++ XK_Print, XK_Execute, ++ XK_KP_Divide, NoSymbol, ++ XK_Alt_R, XK_Meta_R, ++}; ++ ++static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap) ++{ ++ int i; ++ ++ for (i = 0; i < MAP_LENGTH; i++) ++ pModMap[i] = NoSymbol; ++ ++ for (i = 0; i < VFB_MAP_LEN; i++) { ++ if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock) ++ pModMap[i + VFB_MIN_KEY] = LockMask; ++ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L || ++ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R) ++ pModMap[i + VFB_MIN_KEY] = ShiftMask; ++ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L || ++ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) { ++ pModMap[i + VFB_MIN_KEY] = ControlMask; ++ } ++ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L || ++ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R) ++ pModMap[i + VFB_MIN_KEY] = Mod1Mask; ++ } ++ ++ pKeySyms->minKeyCode = VFB_MIN_KEY; ++ pKeySyms->maxKeyCode = VFB_MAX_KEY; ++ pKeySyms->mapWidth = KEYSYMS_PER_KEY; ++ pKeySyms->map = keyboardMap; ++ ++ return TRUE; ++} ++ ++static int vfbKeybdProc(DeviceIntPtr pDev, int onoff) ++{ ++ KeySymsRec keySyms; ++ CARD8 modMap[MAP_LENGTH]; ++ ++ switch (onoff) ++ { ++ case DEVICE_INIT: ++ GetMappings(&keySyms, modMap); ++ InitKeyboardDeviceStruct(&pDev->c_public, &keySyms, modMap, ++ (BellProcPtr)vncRingBell, (KbdCtrlProcPtr)NoopDDA); ++ break; ++ case DEVICE_ON: ++ pDev->c_public.on = TRUE; ++ break; ++ case DEVICE_OFF: ++ pDev->c_public.on = FALSE; ++ break; ++ case DEVICE_CLOSE: ++ break; ++ } ++ return Success; ++} ++ ++static int vfbMouseProc(DeviceIntPtr pDev, int onoff) ++{ ++ BYTE map[6]; ++ ++ switch (onoff) ++ { ++ case DEVICE_INIT: ++ map[1] = 1; ++ map[2] = 2; ++ map[3] = 3; ++ map[4] = 4; ++ map[5] = 5; ++ InitPointerDeviceStruct(&pDev->c_public, map, 5, GetMotionHistory, ++ (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); ++ break; ++ ++ case DEVICE_ON: ++ pDev->c_public.on = TRUE; ++ break; ++ ++ case DEVICE_OFF: ++ pDev->c_public.on = FALSE; ++ break; ++ ++ case DEVICE_CLOSE: ++ break; ++ } ++ return Success; ++} +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.mieq vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.mieq 2008-03-04 12:08:05.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-03-05 11:52:34.000000000 +0100 +@@ -125,6 +125,8 @@ static bool displaySpecified = false; + static bool wellKnownSocketsCreated = false; + static char displayNumStr[16]; + ++extern void vncRingBell (int percent, int pitch, int duration); ++ + #define swapcopy16(_dst, _src) \ + if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \ + else _dst = _src; +@@ -925,7 +927,7 @@ void InitOutput(ScreenInfo *screenInfo, + int SelectWaitTime = 10000; /* usec */ + #endif + +-Bool LegalModifier(unsigned int key, DevicePtr pDev) ++Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) + { + return TRUE; + } +@@ -936,223 +938,14 @@ void ProcessInputEvents() + miPointerUpdate(); + } + +-/* Fairly standard US PC Keyboard */ +- +-#define VFB_MIN_KEY 8 +-#define VFB_MAX_KEY 255 +-#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1) +-#define KEYSYMS_PER_KEY 2 +-KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = { +- NoSymbol, NoSymbol, +- XK_Escape, NoSymbol, +- XK_1, XK_exclam, +- XK_2, XK_at, +- XK_3, XK_numbersign, +- XK_4, XK_dollar, +- XK_5, XK_percent, +- XK_6, XK_asciicircum, +- XK_7, XK_ampersand, +- XK_8, XK_asterisk, +- XK_9, XK_parenleft, +- XK_0, XK_parenright, +- XK_minus, XK_underscore, +- XK_equal, XK_plus, +- XK_BackSpace, NoSymbol, +- XK_Tab, NoSymbol, +- XK_q, XK_Q, +- XK_w, XK_W, +- XK_e, XK_E, +- XK_r, XK_R, +- XK_t, XK_T, +- XK_y, XK_Y, +- XK_u, XK_U, +- XK_i, XK_I, +- XK_o, XK_O, +- XK_p, XK_P, +- XK_bracketleft, XK_braceleft, +- XK_bracketright, XK_braceright, +- XK_Return, NoSymbol, +- XK_Control_L, NoSymbol, +- XK_a, XK_A, +- XK_s, XK_S, +- XK_d, XK_D, +- XK_f, XK_F, +- XK_g, XK_G, +- XK_h, XK_H, +- XK_j, XK_J, +- XK_k, XK_K, +- XK_l, XK_L, +- XK_semicolon, XK_colon, +- XK_apostrophe, XK_quotedbl, +- XK_grave, XK_asciitilde, +- XK_Shift_L, NoSymbol, +- XK_backslash, XK_bar, +- XK_z, XK_Z, +- XK_x, XK_X, +- XK_c, XK_C, +- XK_v, XK_V, +- XK_b, XK_B, +- XK_n, XK_N, +- XK_m, XK_M, +- XK_comma, XK_less, +- XK_period, XK_greater, +- XK_slash, XK_question, +- XK_Shift_R, NoSymbol, +- XK_KP_Multiply, NoSymbol, +- XK_Alt_L, XK_Meta_L, +- XK_space, NoSymbol, +- /*XK_Caps_Lock*/ NoSymbol, NoSymbol, +- XK_F1, NoSymbol, +- XK_F2, NoSymbol, +- XK_F3, NoSymbol, +- XK_F4, NoSymbol, +- XK_F5, NoSymbol, +- XK_F6, NoSymbol, +- XK_F7, NoSymbol, +- XK_F8, NoSymbol, +- XK_F9, NoSymbol, +- XK_F10, NoSymbol, +- XK_Num_Lock, XK_Pointer_EnableKeys, +- XK_Scroll_Lock, NoSymbol, +- XK_KP_Home, XK_KP_7, +- XK_KP_Up, XK_KP_8, +- XK_KP_Prior, XK_KP_9, +- XK_KP_Subtract, NoSymbol, +- XK_KP_Left, XK_KP_4, +- XK_KP_Begin, XK_KP_5, +- XK_KP_Right, XK_KP_6, +- XK_KP_Add, NoSymbol, +- XK_KP_End, XK_KP_1, +- XK_KP_Down, XK_KP_2, +- XK_KP_Next, XK_KP_3, +- XK_KP_Insert, XK_KP_0, +- XK_KP_Delete, XK_KP_Decimal, +- NoSymbol, NoSymbol, +- NoSymbol, NoSymbol, +- NoSymbol, NoSymbol, +- XK_F11, NoSymbol, +- XK_F12, NoSymbol, +- XK_Home, NoSymbol, +- XK_Up, NoSymbol, +- XK_Prior, NoSymbol, +- XK_Left, NoSymbol, +- NoSymbol, NoSymbol, +- XK_Right, NoSymbol, +- XK_End, NoSymbol, +- XK_Down, NoSymbol, +- XK_Next, NoSymbol, +- XK_Insert, NoSymbol, +- XK_Delete, NoSymbol, +- XK_KP_Enter, NoSymbol, +- XK_Control_R, NoSymbol, +- XK_Pause, XK_Break, +- XK_Print, XK_Execute, +- XK_KP_Divide, NoSymbol, +- XK_Alt_R, XK_Meta_R, +-}; +- +-static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap) +-{ +- int i; +- +- for (i = 0; i < MAP_LENGTH; i++) +- pModMap[i] = NoSymbol; +- +- for (i = 0; i < VFB_MAP_LEN; i++) { +- if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock) +- pModMap[i + VFB_MIN_KEY] = LockMask; +- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L || +- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R) +- pModMap[i + VFB_MIN_KEY] = ShiftMask; +- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L || +- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) { +- pModMap[i + VFB_MIN_KEY] = ControlMask; +- } +- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L || +- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R) +- pModMap[i + VFB_MIN_KEY] = Mod1Mask; +- } +- +- pKeySyms->minKeyCode = VFB_MIN_KEY; +- pKeySyms->maxKeyCode = VFB_MAX_KEY; +- pKeySyms->mapWidth = KEYSYMS_PER_KEY; +- pKeySyms->map = keyboardMap; +- +- return TRUE; +-} +- +-static void vfbBell(int percent, DeviceIntPtr device, pointer ctrl, int class_) +-{ +- if (percent > 0) +- vncBell(); +-} +- +-static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff) +-{ +- KeySymsRec keySyms; +- CARD8 modMap[MAP_LENGTH]; +- DevicePtr pDev = (DevicePtr)pDevice; +- +- switch (onoff) +- { +- case DEVICE_INIT: +- GetMappings(&keySyms, modMap); +- InitKeyboardDeviceStruct(pDev, &keySyms, modMap, +- (BellProcPtr)vfbBell, (KbdCtrlProcPtr)NoopDDA); +- break; +- case DEVICE_ON: +- pDev->on = TRUE; +- break; +- case DEVICE_OFF: +- pDev->on = FALSE; +- break; +- case DEVICE_CLOSE: +- break; +- } +- return Success; +-} +- +-static int vfbMouseProc(DeviceIntPtr pDevice, int onoff) ++void DDXRingBell(int percent, int pitch, int duration) + { +- BYTE map[6]; +- DevicePtr pDev = (DevicePtr)pDevice; +- +- switch (onoff) +- { +- case DEVICE_INIT: +- map[1] = 1; +- map[2] = 2; +- map[3] = 3; +- map[4] = 4; +- map[5] = 5; +- InitPointerDeviceStruct(pDev, map, 5, miPointerGetMotionEvents, +- (PtrCtrlProcPtr)NoopDDA, miPointerGetMotionBufferSize()); +- break; +- +- case DEVICE_ON: +- pDev->on = TRUE; +- break; +- +- case DEVICE_OFF: +- pDev->on = FALSE; +- break; +- +- case DEVICE_CLOSE: +- break; +- } +- return Success; ++ vncRingBell (percent, pitch, duration); + } +- + // InitInput is called after InitExtensions, so we're guaranteed that + // vncExtensionInit() has already been called. + + void InitInput(int argc, char *argv[]) + { +- DeviceIntPtr p, k; +- p = AddInputDevice(vfbMouseProc, TRUE); +- k = AddInputDevice(vfbKeybdProc, TRUE); +- RegisterPointerDevice(p); +- RegisterKeyboardDevice(k); +- miRegisterPointerDevice(screenInfo.screens[0], p); +- (void)mieqInit ((DevicePtr)k, (DevicePtr)p); ++ mieqInit (); + } diff --git a/vnc-modular-xorg.patch b/vnc-modular-xorg.patch index 2278120..7c9b8b4 100644 --- a/vnc-modular-xorg.patch +++ b/vnc-modular-xorg.patch @@ -1,142 +1,3 @@ ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.modular-xorg 2007-03-02 15:45:37.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2007-03-02 15:45:38.000000000 +0100 -@@ -283,6 +283,9 @@ - #ifdef MITMISC - extern void MITMiscExtensionInit(INITARGS); - #endif -+#ifdef VNCEXT -+extern void vncExtensionInit(INITARGS); -+#endif - #ifdef XIDLE - extern void XIdleExtensionInit(INITARGS); - #endif -@@ -561,6 +564,9 @@ - #ifdef MITMISC - if (!noMITMiscExtension) MITMiscExtensionInit(); - #endif -+#ifdef VNCEXT -+ vncExtensionInit(); -+#endif - #ifdef XIDLE - if (!noXIdleExtension) XIdleExtensionInit(); - #endif ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.modular-xorg 2007-03-02 15:45:38.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2007-03-02 15:47:10.000000000 +0100 -@@ -30,6 +30,8 @@ - XPRINT_SUBDIRS = xprint - endif - -+XVNC_SUBDIRS = vnc -+ - # need to add darwin support here - - SUBDIRS = \ -@@ -39,6 +41,7 @@ - $(XVFB_SUBDIRS) \ - $(XNEST_SUBDIRS) \ - $(DMX_SUBDIRS) \ -+ $(XVNC_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ - $(XPRINT_SUBDIRS) - ---- /dev/null 2007-03-01 10:25:08.783929433 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-03-02 15:45:38.000000000 +0100 -@@ -0,0 +1,85 @@ -+noinst_LTLIBRARIES = libvnccommon.la -+libvnccommon_la_SOURCES = \ -+ RegionHelper.h \ -+ vncExtInit.cc \ -+ vncExtInit.h \ -+ vncHooks.cc \ -+ vncHooks.h \ -+ XserverDesktop.cc \ -+ XserverDesktop.h -+ -+libvnccommon_la_CXXFLAGS = \ -+ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ -+ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ -+ -DGC_HAS_COMPOSITE_CLIP \ -+ -DVNC_USE_FB \ -+ -I/usr/include/X11 \ -+ -I../../../../common \ -+ -I../../../vncconfig -+ -+bin_PROGRAMS = Xvnc -+ -+Xvnc_SOURCES = \ -+ xvnc.cc \ -+ $(top_srcdir)/Xext/dpmsstubs.c \ -+ $(top_srcdir)/Xi/stubs.c \ -+ $(top_srcdir)/mi/miinitext.c \ -+ $(top_srcdir)/fb/fbcmap.c -+ -+Xvnc_LDADD = $(XORG_CORE_LIBS) \ -+ $(XORG_LIBS) \ -+ $(XSERVER_LIBS) \ -+ ../../fb/libfb.la \ -+ ../../mi/libminimi.la \ -+ ../../render/librender.la \ -+ ../../xkb/libxkbstubs.la \ -+ ../../dbe/libdbe.la \ -+ ../../Xext/libXext.la \ -+ ../../XTrap/libxtrap.la \ -+ ../../record/librecord.la \ -+ ../xfree86/os-support/libxorgos.la \ -+ ../../os/libos.la \ -+ ../xfree86/common/libcommon.la \ -+ -lX11 \ -+ libvnccommon.la \ -+ ../../../../common/rfb/librfb.a \ -+ ../../../../common/rdr/librdr.a \ -+ ../../../../common/network/libnetwork.a \ -+ ../../../../common/Xregion/libXregion.a -+ -+Xvnc_CFLAGS = -DHAVE_DIX_CONFIG_H \ -+ -DNO_HW_ONLY_EXTS \ -+ -DNO_MODULE_EXTS \ -+ -DXFree86Server -DVNCEXT -+ -+Xvnc_CXXFLAGS = $(Xvnc_CFLAGS) \ -+ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ -+ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ -+ -DVNC_USE_FB \ -+ -I../../../../common \ -+ -I../../../vncconfig \ -+ -I../../mi \ -+ -I ../../render \ -+ -I/usr/include/X11 -+ -+libvnc_la_LTLIBRARIES = libvnc.la -+libvnc_la_LDFLAGS = -module -avoid-version -+libvnc_ladir = $(moduledir)/extensions -+libvnc_la_SOURCES = xf86vncModule.cc -+libvnc_la_LIBADD = \ -+ libvnccommon.la \ -+ ../../../../common/rfb/librfb.a \ -+ ../../../../common/rdr/librdr.a \ -+ ../../../../common/network/libnetwork.a \ -+ ../../../../common/Xregion/libXregion.a -+libvnc_la_CXXFLAGS = \ -+ -I../../../../common \ -+ -I$(top_srcdir)/hw/xfree86/common \ -+ -I$(top_srcdir)/hw/xfree86/os-support \ -+ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -+ -DXFree86Module -DXFree86LOADER -DIN_MODULE -+ -+AM_CXXFLAGS = $(CFLAGS) \ -+ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ -+ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -+ ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.modular-xorg 2007-03-02 15:45:38.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2007-03-02 15:45:38.000000000 +0100 -@@ -1793,6 +1793,7 @@ - hw/xnest/Makefile - hw/xwin/Makefile - hw/darwin/Makefile -+hw/vnc/Makefile - hw/kdrive/Makefile - hw/kdrive/ati/Makefile - hw/kdrive/chips/Makefile --- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.modular-xorg 2007-03-02 15:45:38.000000000 +0100 +++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-03-02 15:45:38.000000000 +0100 @@ -36,8 +36,6 @@ diff --git a/vnc-noxkb.patch b/vnc-noxkb.patch new file mode 100644 index 0000000..4a523f4 --- /dev/null +++ b/vnc-noxkb.patch @@ -0,0 +1,12 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.noxkb vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.noxkb 2008-03-05 13:02:23.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-03-05 13:02:41.000000000 +0100 +@@ -1009,7 +1009,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten + + AC_DEFINE(XKB, 1, [Build XKB]) + AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) +-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) ++AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default]) + REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" + XKB_LIB='$(top_builddir)/xkb/libxkb.la' + XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' diff --git a/vnc-paint.patch b/vnc-paint.patch new file mode 100644 index 0000000..955a269 --- /dev/null +++ b/vnc-paint.patch @@ -0,0 +1,109 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc.paint vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc.paint 2008-03-06 14:54:52.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc 2008-03-06 14:56:54.000000000 +0100 +@@ -72,8 +72,6 @@ typedef struct { + + CloseScreenProcPtr CloseScreen; + CreateGCProcPtr CreateGC; +- PaintWindowBackgroundProcPtr PaintWindowBackground; +- PaintWindowBorderProcPtr PaintWindowBorder; + CopyWindowProcPtr CopyWindow; + ClearToBackgroundProcPtr ClearToBackground; + RestoreAreasProcPtr RestoreAreas; +@@ -106,10 +104,6 @@ static DevPrivateKey vncHooksGCPrivateKe + + static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen); + static Bool vncHooksCreateGC(GCPtr pGC); +-static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, +- int what); +-static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, +- int what); + static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr pOldRegion); + static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w, +@@ -231,8 +225,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse + + vncHooksScreen->CloseScreen = pScreen->CloseScreen; + vncHooksScreen->CreateGC = pScreen->CreateGC; +- vncHooksScreen->PaintWindowBackground = pScreen->PaintWindowBackground; +- vncHooksScreen->PaintWindowBorder = pScreen->PaintWindowBorder; + vncHooksScreen->CopyWindow = pScreen->CopyWindow; + vncHooksScreen->ClearToBackground = pScreen->ClearToBackground; + vncHooksScreen->RestoreAreas = pScreen->RestoreAreas; +@@ -253,8 +245,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse + + pScreen->CloseScreen = vncHooksCloseScreen; + pScreen->CreateGC = vncHooksCreateGC; +- pScreen->PaintWindowBackground = vncHooksPaintWindowBackground; +- pScreen->PaintWindowBorder = vncHooksPaintWindowBorder; + pScreen->CopyWindow = vncHooksCopyWindow; + pScreen->ClearToBackground = vncHooksClearToBackground; + pScreen->RestoreAreas = vncHooksRestoreAreas; +@@ -297,8 +287,6 @@ static Bool vncHooksCloseScreen(int i, S + SCREEN_UNWRAP(pScreen_, CloseScreen); + + pScreen->CreateGC = vncHooksScreen->CreateGC; +- pScreen->PaintWindowBackground = vncHooksScreen->PaintWindowBackground; +- pScreen->PaintWindowBorder = vncHooksScreen->PaintWindowBorder; + pScreen->CopyWindow = vncHooksScreen->CopyWindow; + pScreen->ClearToBackground = vncHooksScreen->ClearToBackground; + pScreen->RestoreAreas = vncHooksScreen->RestoreAreas; +@@ -333,38 +321,6 @@ static Bool vncHooksCreateGC(GCPtr pGC) + return ret; + } + +-// PaintWindowBackground - changed region is the given region +- +-static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, +- int what) +-{ +- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBackground); +- +- RegionHelper changed(pScreen, pRegion); +- +- (*pScreen->PaintWindowBackground) (pWin, pRegion, what); +- +- vncHooksScreen->desktop->add_changed(changed.reg); +- +- SCREEN_REWRAP(PaintWindowBackground); +-} +- +-// PaintWindowBorder - changed region is the given region +- +-static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, +- int what) +-{ +- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); +- +- RegionHelper changed(pScreen, pRegion); +- +- (*pScreen->PaintWindowBorder) (pWin, pRegion, what); +- +- vncHooksScreen->desktop->add_changed(changed.reg); +- +- SCREEN_REWRAP(PaintWindowBorder); +-} +- + // CopyWindow - destination of the copy is the old region, clipped by + // borderClip, translated by the delta. This call only does the copy - it + // doesn't affect any other bits. +@@ -534,16 +490,9 @@ static void vncHooksValidateGC(GCPtr pGC + (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable); + + u.vncHooksGC->wrappedOps = 0; +- if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr)pDrawable)->viewable) { +- WindowPtr pWin = (WindowPtr)pDrawable; +- RegionPtr pRegion = &pWin->clipList; +- +- if (pGC->subWindowMode == IncludeInferiors) +- pRegion = &pWin->borderClip; +- if (REGION_NOTEMPTY(pDrawable->pScreen, pRegion)) { +- u.vncHooksGC->wrappedOps = pGC->ops; +- DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n")); +- } ++ if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP) { ++ u.vncHooksGC->wrappedOps = pGC->ops; ++ DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n")); + } + } + diff --git a/vnc-privates.patch b/vnc-privates.patch new file mode 100644 index 0000000..52a5099 --- /dev/null +++ b/vnc-privates.patch @@ -0,0 +1,132 @@ +--- a/bin/xorg/hw/vnc/vncHooks.cc Mon Jan 21 17:29:11 2008 +0100 ++++ b/bin/xorg/hw/vnc/vncHooks.cc Thu Jan 24 09:50:48 2008 +0100 +@@ -86,9 +86,15 @@ typedef struct { + GCOps *wrappedOps; + } vncHooksGCRec, *vncHooksGCPtr; + +-static int vncHooksScreenIndex; +-static int vncHooksGCIndex; ++static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKey; ++static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey; + ++#define vncHooksScreenPrivate(scrn) \ ++ (vncHooksScreenPtr) dixLookupPrivate (&(scrn)->devPrivates, \ ++ vncHooksScrPrivateKey) ++#define vncHooksGCPrivate(pGC) \ ++ (vncHooksGCPtr) dixLookupPrivate (&(pGC)->devPrivates, \ ++ vncHooksGCPrivateKey) + + // screen functions + +@@ -209,26 +215,11 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse + if (vncHooksGeneration != serverGeneration) { + vncHooksGeneration = serverGeneration; + +- vncHooksScreenIndex = AllocateScreenPrivateIndex(); +- if (vncHooksScreenIndex < 0) { +- ErrorF("vncHooksInit: AllocateScreenPrivateIndex failed\n"); +- return FALSE; +- } +- +- vncHooksGCIndex = AllocateGCPrivateIndex(); +- if (vncHooksGCIndex < 0) { +- ErrorF("vncHooksInit: AllocateGCPrivateIndex failed\n"); +- return FALSE; +- } +- } +- +- if (!AllocateGCPrivate(pScreen, vncHooksGCIndex, sizeof(vncHooksGCRec))) { +- ErrorF("vncHooksInit: AllocateGCPrivate failed\n"); +- return FALSE; ++ if (!dixRequestPrivate (vncHooksGCPrivateKey, sizeof (vncHooksGCRec))) ++ return FALSE; + } + + vncHooksScreen = (vncHooksScreenPtr)xnfalloc(sizeof(vncHooksScreenRec)); +- pScreen->devPrivates[vncHooksScreenIndex].ptr = (pointer)vncHooksScreen; + + vncHooksScreen->desktop = desktop; + +@@ -266,6 +257,8 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse + pScreen->DisplayCursor = vncHooksDisplayCursor; + pScreen->BlockHandler = vncHooksBlockHandler; + ++ dixSetPrivate (&pScreen->devPrivates, vncHooksScrPrivateKey, vncHooksScreen); ++ + return TRUE; + } + +@@ -281,11 +274,10 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse + // distinct type, so it would have to use templates, and it's not worth that + // much pain. + +-#define SCREEN_UNWRAP(scrn,field) \ +- ScreenPtr pScreen = scrn; \ +- vncHooksScreenPtr vncHooksScreen \ +- = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \ +- pScreen->field = vncHooksScreen->field; \ ++#define SCREEN_UNWRAP(scrn,field) \ ++ ScreenPtr pScreen = scrn; \ ++ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (scrn); \ ++ pScreen->field = vncHooksScreen->field; \ + DBGPRINT((stderr,"vncHooks" #field " called\n")); + + #define SCREEN_REWRAP(field) pScreen->field = vncHooks##field; +@@ -322,8 +314,7 @@ static Bool vncHooksCreateGC(GCPtr pGC) + { + SCREEN_UNWRAP(pGC->pScreen, CreateGC); + +- vncHooksGCPtr vncHooksGC +- = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr; ++ vncHooksGCPtr vncHooksGC = vncHooksGCPrivate (pGC); + + Bool ret = (*pScreen->CreateGC) (pGC); + +@@ -507,7 +498,7 @@ class GCFuncUnwrapper { + class GCFuncUnwrapper { + public: + GCFuncUnwrapper(GCPtr pGC_) : pGC(pGC_) { +- vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr; ++ vncHooksGC = vncHooksGCPrivate (pGC); + pGC->funcs = vncHooksGC->wrappedFuncs; + if (vncHooksGC->wrappedOps) + pGC->ops = vncHooksGC->wrappedOps; +@@ -592,7 +583,7 @@ public: + GCOpUnwrapper(DrawablePtr pDrawable, GCPtr pGC_) + : pGC(pGC_), pScreen(pDrawable->pScreen) + { +- vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr; ++ vncHooksGC = vncHooksGCPrivate (pGC); + oldFuncs = pGC->funcs; + pGC->funcs = vncHooksGC->wrappedFuncs; + pGC->ops = vncHooksGC->wrappedOps; +@@ -611,8 +602,7 @@ public: + #define GC_OP_UNWRAPPER(pDrawable, pGC, name) \ + GCOpUnwrapper u(pDrawable, pGC); \ + ScreenPtr pScreen = (pDrawable)->pScreen; \ +- vncHooksScreenPtr vncHooksScreen \ +- = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \ ++ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); \ + DBGPRINT((stderr,"vncHooks" #name " called\n")); + + +@@ -1511,8 +1501,7 @@ static void vncHooksComposite(CARD8 op, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) + { + ScreenPtr pScreen = pDst->pDrawable->pScreen; +- vncHooksScreenPtr vncHooksScreen = \ +- ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); ++ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); + PictureScreenPtr ps = GetPictureScreen(pScreen); + BoxRec box; + +@@ -1534,8 +1523,7 @@ static void vncHooksGlyphs(CARD8 op, Pic + GlyphListPtr list, GlyphPtr *glyphs) + { + ScreenPtr pScreen = pDst->pDrawable->pScreen; +- vncHooksScreenPtr vncHooksScreen = \ +- ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); ++ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); + PictureScreenPtr ps = GetPictureScreen(pScreen); + int x, y; + int n; diff --git a/vnc-selections.patch b/vnc-selections.patch new file mode 100644 index 0000000..0f6f514 --- /dev/null +++ b/vnc-selections.patch @@ -0,0 +1,78 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.selections vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.selections 2008-03-10 15:34:24.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc 2008-03-11 10:55:44.000000000 +0100 +@@ -62,11 +62,9 @@ extern "C" { + static void SendSelectionChangeEvent(Atom selection); + static int ProcVncExtDispatch(ClientPtr client); + static int SProcVncExtDispatch(ClientPtr client); ++ static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args); + + extern char *display; +- +- extern Selection *CurrentSelections; +- extern int NumCurrentSelections; + } + + using namespace rfb; +@@ -99,7 +97,6 @@ struct VncInputSelect { + VncInputSelect* next; + }; + +-static int nPrevSelections = 0; + static TimeStamp* prevSelectionTimes = 0; + + static int vncErrorBase = 0; +@@ -147,6 +144,10 @@ void vncExtensionInit() + FatalError("AddCallback failed\n"); + } + ++ if (!AddCallback(&SelectionCallback, vncSelectionCallback, 0)) { ++ FatalError("Add selection callback failed\n"); ++ } ++ + try { + if (!initialised) { + rfb::initStdIOLoggers(); +@@ -212,6 +213,14 @@ static void vncResetProc(ExtensionEntry* + { + } + ++static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args) ++{ ++ SelectionInfoRec *info = (SelectionInfoRec *) args; ++ Selection *selection = info->selection; ++ ++ SendSelectionChangeEvent(selection->selection); ++} ++ + // + // vncBlockHandler - called just before the X server goes into select(). Call + // on to the block handler for each desktop. Then check whether any of the +@@ -227,27 +236,6 @@ static void vncBlockHandler(pointer data + desktop[scr]->blockHandler(fds); + } + } +- +- if (nPrevSelections != NumCurrentSelections) { +- prevSelectionTimes +- = (TimeStamp*)xnfrealloc(prevSelectionTimes, +- NumCurrentSelections * sizeof(TimeStamp)); +- for (int i = nPrevSelections; i < NumCurrentSelections; i++) { +- prevSelectionTimes[i].months = 0; +- prevSelectionTimes[i].milliseconds = 0; +- } +- nPrevSelections = NumCurrentSelections; +- } +- for (int i = 0; i < NumCurrentSelections; i++) { +- if (CurrentSelections[i].lastTimeChanged.months +- != prevSelectionTimes[i].months || +- CurrentSelections[i].lastTimeChanged.milliseconds +- != prevSelectionTimes[i].milliseconds) +- { +- SendSelectionChangeEvent(CurrentSelections[i].selection); +- prevSelectionTimes[i] = CurrentSelections[i].lastTimeChanged; +- } +- } + } + + static void vncWakeupHandler(pointer data, int nfds, pointer readmask) diff --git a/vnc.spec b/vnc.spec index 54bd4a6..1a9d3d4 100644 --- a/vnc.spec +++ b/vnc.spec @@ -1,21 +1,16 @@ %define vnc_version 4_1_2 -%define java_vnc_version 4_1 Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 25%{?dist} +Release: 25.3%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz -Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz Source2: vncserver.init Source3: vnc-16x16.png Source4: vnc-24x24.png Source5: vnc-48x48.png - -# XXX Temporary build with F8 xserver due new Input events handling in 1.4.99 -Source6: xserver-1.3.0.0-37.fc8.tar.bz2 - +Source1: Makefile.am Patch0: vnc-cookie.patch Patch1: vnc-gcc4.patch Patch2: vnc-use-fb.patch @@ -40,30 +35,33 @@ Patch32: vnc-autotools-compile.patch Patch33: vnc-always_use_fb.patch Patch34: vnc-vsnprintf.patch Patch36: vnc-24bit.patch -Patch37: vnc-noxorg.patch Patch38: vnc-gcc43.patch -Patch39: vnc-F9mesa.patch +Patch40: vnc-xorg.patch +Patch41: vnc-privates.patch +Patch42: vnc-mieq.patch +Patch43: vnc-allocate.patch +Patch44: vnc-noxkb.patch +Patch45: vnc-paint.patch +Patch46: vnc-selections.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: perl BuildRequires: zlib-devel libjpeg-devel BuildRequires: desktop-file-utils >= 0.2.92 -BuildRequires: gcc-java BuildRequires: autoconf, automake, libtool, flex, bison, pkgconfig, patchutils BuildRequires: expat-devel, freetype-devel BuildRequires: libX11-devel, xorg-x11-xtrans-devel, libXau-devel BuildRequires: libXdmcp-devel, libxkbfile-devel, libXfont-devel BuildRequires: xorg-x11-proto-devel, libXext-devel, tcp_wrappers-devel BuildRequires: libXtst-devel, libfontenc-devel, xorg-x11-util-macros -BuildRequires: libXt-devel -BuildRequires: libstdc++-devel, gcc-c++, libselinux-devel -#BuildRequires: xorg-x11-server-source +BuildRequires: libXt-devel, libXv-devel, pixman-devel +BuildRequires: libselinux-devel +BuildRequires: xorg-x11-server-source BuildRequires: mesa-libGL-devel >= 6.5.2, mesa-source >= 6.5.2, libdrm-devel Requires: gtk2 >= 2.6 Requires: coreutils -Requires: vnc-libs %description Virtual Network Computing (VNC) is a remote display system which @@ -75,8 +73,7 @@ server. %package server Summary: A VNC server -Requires: bash >= 2.0, util-linux, xorg-x11-fonts-base, xorg-x11-xauth, chkconfig -Requires: vnc-libs +Requires: bash >= 2.0, util-linux, xorg-x11-xauth, chkconfig Group: User Interface/X %description server @@ -93,12 +90,9 @@ Remote framebuffer library which is used by vncviewer and vncserver %prep %setup -q -n vnc-%{vnc_version}-unixsrc -a1 - -# XXX - new event handling in 1.4.99 xserver -#cp -r %{_datadir}/xorg-x11-server-source unix -pushd unix; mkdir xorg-x11-server-source; cd xorg-x11-server-source -tar xf %{SOURCE6} -popd +cp -r %{_datadir}/xorg-x11-server-source unix +mkdir -p unix/xorg-x11-server-source/hw/vnc +cp %{SOURCE1} unix/xorg-x11-server-source/hw/vnc/ %patch0 -p1 -b .cookie %patch1 -p1 -b .gcc4 @@ -109,6 +103,9 @@ popd %patch8 -p1 -b .restart %patch9 -p1 -b .vncpasswd %patch11 -p1 -b .modular-xorg +pushd unix/xorg-x11-server-source +%patch40 -p1 -b .vnc +popd %patch12 -p1 -b .nohttpd %patch15 -p1 -b .viewer-reparent %patch16 -p1 -b .64bit @@ -124,38 +121,42 @@ popd %patch33 -p1 -b .always_use_fb %patch34 -p1 -b .vsnprintf %patch36 -p1 -b .24bit -%patch37 -p1 -b .nomodule %patch38 -p1 -b .gcc43 -%patch39 -p1 -b .F9mesa cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ unix/xc/programs/Xserver/Xvnc.man \ unix/xc/programs/Xserver/vnc/*.{h,cc} \ unix/xorg-x11-server-source/hw/vnc/ -cp -a unix/xorg-x11-server-source/{cfb/cfb.h,hw/vnc} -cp -a unix/xorg-x11-server-source/{fb/fb.h,hw/vnc} -cp -a unix/xorg-x11-server-source/{fb/fbrop.h,hw/vnc} -sed -i -e 's,xor,c_xor,' -e 's,and,c_and,' \ - unix/xorg-x11-server-source/hw/vnc/{cfb,fb,fbrop}.h + +pushd unix/xorg-x11-server-source/hw/vnc +%patch41 -p5 -b .privates +popd +%patch42 -p1 -b .mieq +%patch43 -p1 -b .alloc +%patch44 -p1 -b .noxkb +%patch45 -p1 -b .paint +%patch46 -p1 -b .selections %build -cd common +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" +export CXXFLAGS="$CFLAGS" + +pushd common autoreconf -fiv %configure make %{?_smp_mflags} +popd -cd ../vnc-%{java_vnc_version}-javasrc/java -make JAVAC="gcj -C" JAR=fastjar %{?_smp_mflags} - -cd ../../unix +pushd unix autoreconf -fiv %configure make %{?_smp_mflags} +popd -cd xorg-x11-server-source -aclocal; automake -a; autoconf +pushd unix/xorg-x11-server-source +autoreconf -fiv %configure --disable-xorg \ - --disable-xnest --enable-xvfb \ + --disable-xnest --disable-xvfb \ --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ --with-pic \ --disable-xorgcfg \ @@ -174,9 +175,12 @@ aclocal; automake -a; autoconf --disable-xevie \ --disable-dri \ --enable-glx \ + --disable-config-dbus \ + --disable-config-hal \ --with-mesa-source=%{_datadir}/mesa/source make %{?_smp_mflags} +popd %install rm -rf $RPM_BUILD_ROOT @@ -201,9 +205,6 @@ cd xorg-x11-server-source/hw/vnc make install DESTDIR=$RPM_BUILD_ROOT cd ../../../ -mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes -cp -a ../vnc-%{java_vnc_version}-javasrc/java/{index.vnc,logo150x150.gif,vncviewer.jar} $RPM_BUILD_ROOT%{_datadir}/vnc/classes - mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d install -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vncserver @@ -258,7 +259,7 @@ desktop-file-install --vendor vnc --delete-original \ --add-category Application \ vncviewer.desktop -# removing unwanted files +# remove unwanted files rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.a rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.la rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.so @@ -313,7 +314,6 @@ fi %{_bindir}/vncconfig %{_bindir}/vncserver %{_bindir}/x0vncserver -%{_datadir}/vnc %{_mandir}/man1/Xvnc.1* %{_mandir}/man1/vncpasswd.1* %{_mandir}/man1/vncconfig.1* @@ -326,6 +326,16 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Mar 11 2008 Adam Tkac 4.1.2-25.3 +- BuildRequires and Requires cleanup +- don't build java viewer (problems due new gcj) +- use xorg codebase from xorg-x11-server-source package again + - vnc-selection.patch - new xserver selection API/ABI + - vnc-xkb.patch - disable XKEYBOARD extension + - vnc-paint.patch - PaintWindow{Background,Border} hooks have been removed + - vnc-privates.patch - update devPrivates handling + - vnc-mieq.patch - use event queue to handle input events + * Mon Feb 18 2008 Fedora Release Engineering - 4.1.2-25 - Autorebuild for GCC 4.3 From ac50dc899a4a302420d4fbe6db01887f75b25d92 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 11 Mar 2008 12:54:15 +0000 Subject: [PATCH 15/38] - added Makefile.am for Xvnc --- Makefile.am | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Makefile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..92831a9 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,83 @@ +# Define includes and libraries +LIB_DIR=$(top_srcdir)/../../common +BIN_DIR=$(top_srcdir)/.. + +RFB_LIBS=$(LIB_DIR)/rfb/librfb.la + +noinst_LTLIBRARIES = libvnccommon.la + +libvnccommon_la_SOURCES = \ + vncExtInit.cc vncHooks.cc XserverDesktop.cc + +libvnccommon_la_CPPFLAGS = \ + -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ + -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ + -I/usr/include/X11 -Iinclude -I$(top_srcdir) \ + -I$(LIB_DIR) -I$(BIN_DIR)/vncconfig \ + -DGC_HAS_COMPOSITE_CLIP + +bin_PROGRAMS = Xvnc + +Xvnc_SOURCES = \ + xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c $(top_srcdir)/Xi/stubs.c \ + $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap_mi.c + +nodist_Xvnc_SOURCES = \ + fbrop.h fb.h pixman.h + +Xvnc_CPPFLAGS = \ + -DHAVE_DIX_CONFIG_H -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS -DXFree86Server \ + -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ + -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ + -I$(LIB_DIR) \ + -I$(top_srcdir)/include -I/usr/include/X11 -I$(top_srcdir)/mi \ + -I$(top_srcdir)/render -I$(top_srcdir)/Xext + +Xvnc_LDADD = \ + $(top_srcdir)/Xext/libXext.la $(top_srcdir)/dix/libdix.la \ + $(top_srcdir)/config/libconfig.a $(top_srcdir)/Xi/libXi.la \ + $(top_srcdir)/xkb/libxkb.la $(top_srcdir)/xkb/libxkbstubs.la \ + $(top_srcdir)/record/librecord.la $(top_srcdir)/GL/glx/libglx.la \ + $(top_srcdir)/GL/mesa/libGLcore.la $(top_srcdir)/dbe/libdbe.la \ + $(top_srcdir)/damageext/libdamageext.la $(top_srcdir)/fb/libfb.la \ + $(top_srcdir)/miext/damage/libdamage.la $(top_srcdir)/mi/libmi.la \ + $(top_srcdir)/xfixes/libxfixes.la $(top_srcdir)/XTrap/libxtrap.la \ + $(top_srcdir)/randr/librandr.la $(top_srcdir)/render/librender.la \ + $(top_srcdir)/os/libos.la libvnccommon.la $(RFB_LIBS) \ + -lXfont -lX11 -lpixman-1 -lcrypto -lselinux + +libvnc_la_LTLIBRARIES = libvnc.la +libvnc_ladir = $(moduledir)/extensions + +libvnc_la_SOURCES = \ + xf86vncModule.cc + +libvnc_la_CPPFLAGS = \ + $(RFB_INCS) \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -DXFree86Module -DXFree86LOADER -DIN_MODULE + +libvnc_la_CXXFLAGS = \ + $(COMPILER_FLAGS) + +libvnc_la_LDFLAGS = \ + -module -avoid-version + +libvnc_la_LIBADD = \ + libvnccommon.la $(RFB_LIBS) + +# C++ hacks +BUILT_SOURCES = \ + $(nodist_Xvnc_SOURCES) + +fb.h: $(top_srcdir)/fb/fb.h + cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h + +pixman.h: $(includedir)/pixman-1/pixman.h + cat $(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h + +fbrop.h: $(top_srcdir)/fb/fbrop.h + cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h + From e51c416e982992680d89852c946ee9c21a1f1a28 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 11 Mar 2008 12:54:57 +0000 Subject: [PATCH 16/38] - added vnc-xorg.patch --- vnc-xorg.patch | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 vnc-xorg.patch diff --git a/vnc-xorg.patch b/vnc-xorg.patch new file mode 100644 index 0000000..234125a --- /dev/null +++ b/vnc-xorg.patch @@ -0,0 +1,68 @@ +diff -up xorg-x11-server-source/os/WaitFor.c.orig xorg/os/WaitFor.c +--- xorg-x11-server-source/os/WaitFor.c.orig 2008-01-28 10:20:35.000000000 +0100 ++++ xorg-x11-server-source/os/WaitFor.c 2008-01-28 10:21:08.000000000 +0100 +@@ -332,13 +332,11 @@ WaitForSomething(int *pClientsReady) + + if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable)) + break; +-#ifdef WIN32 + /* Windows keyboard and mouse events are added to the input queue + in Block- and WakupHandlers. There is no device to check if + data is ready. So check here if new input is available */ + if (*checkForInput[0] != *checkForInput[1]) + return 0; +-#endif + } + } + +diff -up xorg-x11-server-source/mi/miinitext.c.orig xorg/mi/miinitext.c +--- xorg-x11-server-source/mi/miinitext.c.orig 2008-01-28 10:18:46.000000000 +0100 ++++ xorg-x11-server-source/mi/miinitext.c 2008-01-28 10:18:58.000000000 +0100 +@@ -289,6 +289,7 @@ extern void BigReqExtensionInit(INITARGS + #ifdef MITMISC + extern void MITMiscExtensionInit(INITARGS); + #endif ++extern void vncExtensionInit(INITARGS); + #ifdef XIDLE + extern void XIdleExtensionInit(INITARGS); + #endif +@@ -560,6 +561,7 @@ InitExtensions(argc, argv) + #ifdef MITMISC + if (!noMITMiscExtension) MITMiscExtensionInit(); + #endif ++ vncExtensionInit(); + #ifdef XIDLE + if (!noXIdleExtension) XIdleExtensionInit(); + #endif +diff -up xorg-x11-server-source/hw/Makefile.am.orig xorg/hw/Makefile.am +--- xorg-x11-server-source/hw/Makefile.am.orig 2008-01-28 10:18:46.000000000 +0100 ++++ xorg-x11-server-source/hw/Makefile.am 2008-01-28 10:18:58.000000000 +0100 +@@ -43,7 +43,8 @@ SUBDIRS = \ + $(DMX_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) \ +- $(XPRINT_SUBDIRS) ++ $(XPRINT_SUBDIRS) \ ++ vnc + + DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint + +diff -up xorg-x11-server-source/configure.ac.orig xorg/configure.ac +--- xorg-x11-server-source/configure.ac.orig 2008-01-28 10:18:45.000000000 +0100 ++++ xorg-x11-server-source/configure.ac 2008-01-28 10:18:58.000000000 +0100 +@@ -29,7 +29,6 @@ AC_PREREQ(2.57) + AC_INIT([xorg-server], 1.4.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) + AC_CONFIG_SRCDIR([Makefile.am]) + AM_INIT_AUTOMAKE([dist-bzip2 foreign]) +-AM_MAINTAINER_MODE + + dnl this gets generated by autoheader, and thus contains all the defines. we + dnl don't ever actually use it, internally. +@@ -2173,6 +2172,7 @@ hw/dmx/input/Makefile + hw/dmx/glxProxy/Makefile + hw/dmx/Makefile + hw/vfb/Makefile ++hw/vnc/Makefile + hw/xgl/Makefile + hw/xgl/egl/Makefile + hw/xgl/egl/module/Makefile From d516b206a0bf4bd64e46cacf5a86fad20ddbe2e0 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 11 Mar 2008 13:25:25 +0000 Subject: [PATCH 17/38] - fixed building issues (typo in Makefile.am and BuildRequires) --- Makefile.am | 2 +- vnc.spec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 92831a9..df703af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,7 @@ libvnc_la_SOURCES = \ xf86vncModule.cc libvnc_la_CPPFLAGS = \ - $(RFB_INCS) \ + -I$(LIB_DIR) \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ diff --git a/vnc.spec b/vnc.spec index 1a9d3d4..13b2f9c 100644 --- a/vnc.spec +++ b/vnc.spec @@ -6,11 +6,11 @@ Version: 4.1.2 Release: 25.3%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz +Source1: Makefile.am Source2: vncserver.init Source3: vnc-16x16.png Source4: vnc-24x24.png Source5: vnc-48x48.png -Source1: Makefile.am Patch0: vnc-cookie.patch Patch1: vnc-gcc4.patch Patch2: vnc-use-fb.patch @@ -46,7 +46,7 @@ Patch46: vnc-selections.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: perl +BuildRequires: perl, openssl-devel, libpciaccess-devel BuildRequires: zlib-devel libjpeg-devel BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: autoconf, automake, libtool, flex, bison, pkgconfig, patchutils @@ -89,7 +89,7 @@ Group: User Interface/X Remote framebuffer library which is used by vncviewer and vncserver %prep -%setup -q -n vnc-%{vnc_version}-unixsrc -a1 +%setup -q -n vnc-%{vnc_version}-unixsrc cp -r %{_datadir}/xorg-x11-server-source unix mkdir -p unix/xorg-x11-server-source/hw/vnc cp %{SOURCE1} unix/xorg-x11-server-source/hw/vnc/ From cf9865122c8ec0019254abee904ef5ba4261c4a0 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 11 Mar 2008 13:46:35 +0000 Subject: [PATCH 18/38] - bump release to 26 - first build against 1.5 xserver --- vnc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnc.spec b/vnc.spec index 13b2f9c..6997281 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 25.3%{?dist} +Release: 26%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -326,7 +326,7 @@ fi %{_libdir}/librfb.so.* %changelog -* Mon Mar 11 2008 Adam Tkac 4.1.2-25.3 +* Mon Mar 11 2008 Adam Tkac 4.1.2-26 - BuildRequires and Requires cleanup - don't build java viewer (problems due new gcj) - use xorg codebase from xorg-x11-server-source package again From ec8fc16dd03ff88737bb459e0e4ac41a711ff308 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Thu, 13 Mar 2008 15:23:57 +0000 Subject: [PATCH 19/38] - removed obsolete vnc-ppc64.patch - minor vncviewer manpage fixes (#427672, #427701) - fixed overflow on heap (#430468) - start vncconfig earlier in vncserver (#430965) - next BuildRequires cleanup --- vnc-F9mesa.patch | 82 --------------------------------------------- vnc-clipboard.patch | 18 ++++++++++ vnc-getimage.patch | 14 ++++++++ vnc-manminor.patch | 25 ++++++++++++++ vnc-ppc64.patch | 11 ------ vnc-xorg.patch | 17 ---------- vnc.spec | 25 ++++++++++---- 7 files changed, 75 insertions(+), 117 deletions(-) delete mode 100644 vnc-F9mesa.patch create mode 100644 vnc-clipboard.patch create mode 100644 vnc-getimage.patch create mode 100644 vnc-manminor.patch delete mode 100644 vnc-ppc64.patch diff --git a/vnc-F9mesa.patch b/vnc-F9mesa.patch deleted file mode 100644 index 4954838..0000000 --- a/vnc-F9mesa.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c.rawhidemesa vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c.rawhidemesa 2008-01-09 14:38:43.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch.c 2008-01-09 14:48:56.000000000 +0100 -@@ -5169,31 +5169,6 @@ void __glXDisp_LoadProgramNV(GLbyte * pc - ) ); - } - --void __glXDisp_ProgramParameter4dvNV(GLbyte * pc) --{ --#ifdef __GLX_ALIGN64 -- if ((unsigned long)(pc) & 7) { -- (void) memmove(pc-4, pc, 40); -- pc -= 4; -- } --#endif -- -- CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( -- *(GLenum *)(pc + 0), -- *(GLuint *)(pc + 4), -- (const GLdouble *)(pc + 8) -- ) ); --} -- --void __glXDisp_ProgramParameter4fvNV(GLbyte * pc) --{ -- CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( -- *(GLenum *)(pc + 0), -- *(GLuint *)(pc + 4), -- (const GLfloat *)(pc + 8) -- ) ); --} -- - void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) - { - const GLuint num = *(GLuint *)(pc + 8); -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c.rawhidemesa vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c.rawhidemesa 2008-01-09 14:47:05.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_table.c 2008-01-09 14:47:24.000000000 +0100 -@@ -644,7 +644,7 @@ static const void *Render_function_table - /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, - /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, - /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, -- /* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, -+ /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, - /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, - /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, - /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c.rawhidemesa vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c.rawhidemesa 2008-01-09 14:49:12.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/GL/glx/indirect_dispatch_swap.c 2008-01-09 14:49:25.000000000 +0100 -@@ -5325,31 +5325,6 @@ void __glXDispSwap_LoadProgramNV(GLbyte - ) ); - } - --void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc) --{ --#ifdef __GLX_ALIGN64 -- if ((unsigned long)(pc) & 7) { -- (void) memmove(pc-4, pc, 40); -- pc -= 4; -- } --#endif -- -- CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( -- (GLenum )bswap_ENUM ( pc + 0 ), -- (GLuint )bswap_CARD32 ( pc + 4 ), -- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) -- ) ); --} -- --void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc) --{ -- CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( -- (GLenum )bswap_ENUM ( pc + 0 ), -- (GLuint )bswap_CARD32 ( pc + 4 ), -- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) -- ) ); --} -- - void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) - { - const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); diff --git a/vnc-clipboard.patch b/vnc-clipboard.patch new file mode 100644 index 0000000..9865ec2 --- /dev/null +++ b/vnc-clipboard.patch @@ -0,0 +1,18 @@ +diff -up vnc-4_1_2-unixsrc/unix/vncserver.clipboard vnc-4_1_2-unixsrc/unix/vncserver +--- vnc-4_1_2-unixsrc/unix/vncserver.clipboard 2008-03-13 16:17:07.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/vncserver 2008-03-13 16:18:14.000000000 +0100 +@@ -42,13 +42,13 @@ $xauthorityFile = "$ENV{XAUTHORITY}" || + + $defaultXStartup + = ("#!/bin/sh\n\n". ++ "vncconfig -iconic &\n". + "# Uncomment the following two lines for normal desktop:\n". + "# unset SESSION_MANAGER\n". + "# exec /etc/X11/xinit/xinitrc\n\n". + "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n". + "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". + "xsetroot -solid grey\n". +- "vncconfig -iconic &\n". + "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". + "twm &\n"); + diff --git a/vnc-getimage.patch b/vnc-getimage.patch new file mode 100644 index 0000000..68940e5 --- /dev/null +++ b/vnc-getimage.patch @@ -0,0 +1,14 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.getimage vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.getimage 2008-03-13 14:53:06.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-13 14:53:51.000000000 +0100 +@@ -746,8 +746,8 @@ void XserverDesktop::grabRegion(const rf + std::vector::iterator i; + region.get_rects(&rects); + for (i = rects.begin(); i != rects.end(); i++) { +- for (int y = i->tl.y; y < i->br.y; y++) { +- (*pScreen->GetImage) ((DrawablePtr)WindowTable[pScreen->myNum], ++ for (int y = i->tl.y; y < i->br.y && y <= pScreen->height; y++) { ++ (*pScreen->GetImage) (&WindowTable[pScreen->myNum]->drawable, + i->tl.x, y, i->width(), 1, + ZPixmap, (unsigned long)~0L, + ((char*)data diff --git a/vnc-manminor.patch b/vnc-manminor.patch new file mode 100644 index 0000000..aadbd9d --- /dev/null +++ b/vnc-manminor.patch @@ -0,0 +1,25 @@ +diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.pedantic vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man +--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.pedantic 2008-03-13 14:55:08.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2008-03-13 14:55:58.000000000 +0100 +@@ -8,6 +8,10 @@ vncviewer \- VNC viewer for X + .br + .B vncviewer + .RI [ options ] ++.RI [ host ][:: port ] ++.br ++.B vncviewer ++.RI [ options ] + .B \-listen + .RI [ port ] + .SH DESCRIPTION +@@ -182,8 +186,8 @@ prefix from the entries in "/usr/include + .TP + \fB\-via\fR \fIgateway\fR + Automatically create encrypted TCP tunnel to the \fIgateway\fR machine +-before connection, connect to the \fIhost\fR through that tunnel +-(TightVNC\-specific). By default, this option invokes SSH local port ++before connection, connect to the \fIhost\fR through that tunnel. By default, ++this option invokes SSH local port + forwarding, assuming that SSH client binary can be accessed as + /usr/bin/ssh. Note that when using the \fB\-via\fR option, the host + machine name should be specified as known to the gateway machine, e.g. diff --git a/vnc-ppc64.patch b/vnc-ppc64.patch deleted file mode 100644 index f473ad3..0000000 --- a/vnc-ppc64.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h.ppc64 2006-11-14 16:10:58.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h 2006-11-14 16:14:11.000000000 +0100 -@@ -1081,7 +1081,7 @@ - #if defined(linux) && defined(__powerpc64__) - # include - # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) --# include -+/*# include */ - # endif - #endif /* defined(linux) && defined(__powerpc64__) */ - #ifndef eieio /* We deal with arch-specific eieio() routines above... */ diff --git a/vnc-xorg.patch b/vnc-xorg.patch index 234125a..b115422 100644 --- a/vnc-xorg.patch +++ b/vnc-xorg.patch @@ -1,20 +1,3 @@ -diff -up xorg-x11-server-source/os/WaitFor.c.orig xorg/os/WaitFor.c ---- xorg-x11-server-source/os/WaitFor.c.orig 2008-01-28 10:20:35.000000000 +0100 -+++ xorg-x11-server-source/os/WaitFor.c 2008-01-28 10:21:08.000000000 +0100 -@@ -332,13 +332,11 @@ WaitForSomething(int *pClientsReady) - - if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable)) - break; --#ifdef WIN32 - /* Windows keyboard and mouse events are added to the input queue - in Block- and WakupHandlers. There is no device to check if - data is ready. So check here if new input is available */ - if (*checkForInput[0] != *checkForInput[1]) - return 0; --#endif - } - } - diff -up xorg-x11-server-source/mi/miinitext.c.orig xorg/mi/miinitext.c --- xorg-x11-server-source/mi/miinitext.c.orig 2008-01-28 10:18:46.000000000 +0100 +++ xorg-x11-server-source/mi/miinitext.c 2008-01-28 10:18:58.000000000 +0100 diff --git a/vnc.spec b/vnc.spec index 6997281..e7e6fd1 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 26%{?dist} +Release: 27%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -24,7 +24,6 @@ Patch12: vnc-nohttpd.patch Patch15: vnc-viewer-reparent.patch Patch16: vnc-64bit.patch Patch17: vnc-select.patch -Patch19: vnc-ppc64.patch Patch21: vnc-newfbsize.patch Patch23: vnc-210617.patch Patch24: vnc-102434.patch @@ -43,6 +42,9 @@ Patch43: vnc-allocate.patch Patch44: vnc-noxkb.patch Patch45: vnc-paint.patch Patch46: vnc-selections.patch +Patch47: vnc-getimage.patch +Patch48: vnc-manminor.patch +Patch49: vnc-clipboard.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -51,10 +53,10 @@ BuildRequires: zlib-devel libjpeg-devel BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: autoconf, automake, libtool, flex, bison, pkgconfig, patchutils BuildRequires: expat-devel, freetype-devel -BuildRequires: libX11-devel, xorg-x11-xtrans-devel, libXau-devel -BuildRequires: libXdmcp-devel, libxkbfile-devel, libXfont-devel -BuildRequires: xorg-x11-proto-devel, libXext-devel, tcp_wrappers-devel -BuildRequires: libXtst-devel, libfontenc-devel, xorg-x11-util-macros +BuildRequires: libX11-devel, xorg-x11-xtrans-devel +BuildRequires: libxkbfile-devel, libXfont-devel +BuildRequires: tcp_wrappers-devel +BuildRequires: libXtst-devel, xorg-x11-util-macros BuildRequires: libXt-devel, libXv-devel, pixman-devel BuildRequires: libselinux-devel BuildRequires: xorg-x11-server-source @@ -110,7 +112,6 @@ popd %patch15 -p1 -b .viewer-reparent %patch16 -p1 -b .64bit %patch17 -p1 -b .select -%patch19 -p1 -b .ppc64 %patch21 -p1 -b .newfbsize %patch23 -p1 -b .ipv6 %patch24 -p1 -b .102434 @@ -136,6 +137,9 @@ popd %patch44 -p1 -b .noxkb %patch45 -p1 -b .paint %patch46 -p1 -b .selections +%patch47 -p1 -b .getimage +%patch48 -p1 -b .misc +%patch49 -p1 -b .clipboard %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" @@ -326,6 +330,13 @@ fi %{_libdir}/librfb.so.* %changelog +* Thu Mar 13 2008 Adam Tkac 4.1.2-27 +- removed obsolete vnc-ppc64.patch +- minor vncviewer manpage fixes (#427672, #427701) +- fixed overflow on heap (#430468) +- start vncconfig earlier in vncserver (#430965) +- next BuildRequires cleanup + * Mon Mar 11 2008 Adam Tkac 4.1.2-26 - BuildRequires and Requires cleanup - don't build java viewer (problems due new gcj) From 84c904536513e9fe05be8a31db754333d7fffeb4 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 14 Mar 2008 12:19:30 +0000 Subject: [PATCH 20/38] - fixed assertion failed when only one scrollbar should be used (#428117) --- vnc-scrollbars.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++ vnc.spec | 9 ++++-- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 vnc-scrollbars.patch diff --git a/vnc-scrollbars.patch b/vnc-scrollbars.patch new file mode 100644 index 0000000..e611c35 --- /dev/null +++ b/vnc-scrollbars.patch @@ -0,0 +1,69 @@ +diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.h +--- vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars 2008-03-14 12:44:19.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.h 2008-03-14 12:44:19.000000000 +0100 +@@ -77,7 +77,8 @@ private: + int xOff, yOff; + rfb::Timer bumpScrollTimer; + bool bumpScroll; +- bool needScrollbars; ++ bool needXScrollbar; ++ bool needYScrollbar; + int bumpScrollX, bumpScrollY; + }; + #endif +diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx +--- vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars 2008-03-14 12:44:19.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx 2008-03-14 13:08:30.000000000 +0100 +@@ -25,7 +25,8 @@ + TXViewport::TXViewport(Display* dpy_, int w, int h, TXWindow* parent_) + : TXWindow(dpy_, w, h, parent_), child(0), hScrollbar(0), + vScrollbar(0), scrollbarSize(15), xOff(0), yOff(0), bumpScrollTimer(this), +- bumpScroll(false), needScrollbars(false), bumpScrollX(0), bumpScrollY(0) ++ bumpScroll(false), needXScrollbar(false), needYScrollbar(false), ++ bumpScrollX(0), bumpScrollY(0) + { + clipper = new TXWindow(dpy, width()-scrollbarSize, height()-scrollbarSize, + this); +@@ -132,13 +133,23 @@ bool TXViewport::handleTimeout(rfb::Time + + void TXViewport::resizeNotify() + { +- needScrollbars = (!bumpScroll && +- (width() < child->width() || height() < child->height()) && +- (width() > scrollbarSize && height() > scrollbarSize)); +- if (needScrollbars) { ++ needXScrollbar = (!bumpScroll && width() < child->width() && ++ height() > scrollbarSize && width() > scrollbarSize); ++ needYScrollbar = (!bumpScroll && height() < child->height() && ++ height() > scrollbarSize && width() > scrollbarSize); ++ ++ if (needXScrollbar && needYScrollbar) { + clipper->resize(width()-scrollbarSize, height()-scrollbarSize); + hScrollbar->map(); + vScrollbar->map(); ++ } else if (needXScrollbar) { ++ clipper->resize(width(), height()-scrollbarSize); ++ hScrollbar->map(); ++ vScrollbar->unmap(); ++ } else if (needYScrollbar) { ++ clipper->resize(width()-scrollbarSize, height()); ++ hScrollbar->unmap(); ++ vScrollbar->map(); + } else { + clipper->resize(width(), height()); + hScrollbar->unmap(); +@@ -147,10 +158,13 @@ void TXViewport::resizeNotify() + + setOffset(xOff, yOff); + +- if (needScrollbars) { ++ if (needXScrollbar) { + hScrollbar->move(0, height()-scrollbarSize); + hScrollbar->resize(width()-scrollbarSize, scrollbarSize); + hScrollbar->set(child->width(), -xOff, width()-scrollbarSize); ++ } ++ ++ if (needYScrollbar) { + vScrollbar->move(width()-scrollbarSize, 0); + vScrollbar->resize(scrollbarSize, height()-scrollbarSize); + vScrollbar->set(child->height(), -yOff, height()-scrollbarSize); diff --git a/vnc.spec b/vnc.spec index e7e6fd1..1a3d729 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 27%{?dist} +Release: 27.1%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -45,6 +45,7 @@ Patch46: vnc-selections.patch Patch47: vnc-getimage.patch Patch48: vnc-manminor.patch Patch49: vnc-clipboard.patch +Patch50: vnc-scrollbars.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -140,6 +141,7 @@ popd %patch47 -p1 -b .getimage %patch48 -p1 -b .misc %patch49 -p1 -b .clipboard +%patch50 -p1 -b .scrollbars %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" @@ -330,6 +332,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Fri Mar 14 2008 Adam Tkac 4.1.2-27.1 +- fixed assertion failed when only one scrollbar should be used (#428117) + * Thu Mar 13 2008 Adam Tkac 4.1.2-27 - removed obsolete vnc-ppc64.patch - minor vncviewer manpage fixes (#427672, #427701) @@ -337,7 +342,7 @@ fi - start vncconfig earlier in vncserver (#430965) - next BuildRequires cleanup -* Mon Mar 11 2008 Adam Tkac 4.1.2-26 +* Tue Mar 11 2008 Adam Tkac 4.1.2-26 - BuildRequires and Requires cleanup - don't build java viewer (problems due new gcj) - use xorg codebase from xorg-x11-server-source package again From 4f4e7572afe7a6a243ce446018bf67a53600d88a Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 19 Mar 2008 11:47:44 +0000 Subject: [PATCH 21/38] - validate framebuffer bounds before GetImage call (#430468, improved fix) --- vnc-bounds.patch | 55 ++++++++++++++++++++++++++++++++++++++++++++++ vnc-getimage.patch | 14 ------------ vnc.spec | 11 ++++++---- 3 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 vnc-bounds.patch delete mode 100644 vnc-getimage.patch diff --git a/vnc-bounds.patch b/vnc-bounds.patch new file mode 100644 index 0000000..93a81c5 --- /dev/null +++ b/vnc-bounds.patch @@ -0,0 +1,55 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds 2008-03-17 16:46:27.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-17 16:59:11.000000000 +0100 +@@ -486,32 +486,36 @@ void XserverDesktop::add_changed(RegionP + { + if (ignoreHooks_) return; + if (grabbing) return; ++ ++ BoxRec screenbox; ++ RegionPtr newreg = REGION_CREATE(pScreen, 0, 0); ++ ++ screenbox.x1 = screenbox.y1 = 0; ++ screenbox.x2 = pScreen->width; ++ screenbox.y2 = pScreen->height; ++ ++ RegionPtr screenreg = REGION_CREATE(pScreen, &screenbox, 0); ++ REGION_INTERSECT(pScreen, newreg, reg, screenreg); ++ REGION_DESTROY (pScreen, screenreg); ++ + try { + rfb::Region rfbReg; +- rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, reg), +- REGION_NUM_RECTS(reg), +- (ShortRect*)REGION_RECTS(reg)); ++ rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, newreg), ++ REGION_NUM_RECTS(newreg), ++ (ShortRect*)REGION_RECTS(newreg)); + server->add_changed(rfbReg); + deferUpdate(); + } catch (rdr::Exception& e) { + vlog.error("XserverDesktop::add_changed: %s",e.str()); + } ++ REGION_DESTROY (pScreen, newreg); + } + + void XserverDesktop::add_copied(RegionPtr dst, int dx, int dy) + { +- if (ignoreHooks_) return; +- if (grabbing) return; +- try { +- rfb::Region rfbReg; +- rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, dst), +- REGION_NUM_RECTS(dst), +- (ShortRect*)REGION_RECTS(dst)); +- server->add_copied(rfbReg, rfb::Point(dx, dy)); +- deferUpdate(); +- } catch (rdr::Exception& e) { +- vlog.error("XserverDesktop::add_copied: %s",e.str()); +- } ++ add_changed (dst); ++ REGION_TRANSLATE (pScreen, dst, -dx, -dy); ++ add_changed (dst); + } + + void XserverDesktop::positionCursor() diff --git a/vnc-getimage.patch b/vnc-getimage.patch deleted file mode 100644 index 68940e5..0000000 --- a/vnc-getimage.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.getimage vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.getimage 2008-03-13 14:53:06.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-13 14:53:51.000000000 +0100 -@@ -746,8 +746,8 @@ void XserverDesktop::grabRegion(const rf - std::vector::iterator i; - region.get_rects(&rects); - for (i = rects.begin(); i != rects.end(); i++) { -- for (int y = i->tl.y; y < i->br.y; y++) { -- (*pScreen->GetImage) ((DrawablePtr)WindowTable[pScreen->myNum], -+ for (int y = i->tl.y; y < i->br.y && y <= pScreen->height; y++) { -+ (*pScreen->GetImage) (&WindowTable[pScreen->myNum]->drawable, - i->tl.x, y, i->width(), 1, - ZPixmap, (unsigned long)~0L, - ((char*)data diff --git a/vnc.spec b/vnc.spec index 1a3d729..7ef4b3e 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 27.1%{?dist} +Release: 28%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -42,10 +42,10 @@ Patch43: vnc-allocate.patch Patch44: vnc-noxkb.patch Patch45: vnc-paint.patch Patch46: vnc-selections.patch -Patch47: vnc-getimage.patch Patch48: vnc-manminor.patch Patch49: vnc-clipboard.patch Patch50: vnc-scrollbars.patch +Patch51: vnc-bounds.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -138,10 +138,10 @@ popd %patch44 -p1 -b .noxkb %patch45 -p1 -b .paint %patch46 -p1 -b .selections -%patch47 -p1 -b .getimage -%patch48 -p1 -b .misc +%patch48 -p1 -b .minor %patch49 -p1 -b .clipboard %patch50 -p1 -b .scrollbars +%patch51 -p1 -b .bounds %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" @@ -332,6 +332,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Mar 19 2008 Adam Tkac 4.1.2-28 +- validate framebuffer bounds before GetImage call (#430468, improved fix) + * Fri Mar 14 2008 Adam Tkac 4.1.2-27.1 - fixed assertion failed when only one scrollbar should be used (#428117) From 0b1af5d49975bfddd52dc90680f4341a87514b78 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 9 Apr 2008 09:56:29 +0000 Subject: [PATCH 22/38] - rebuild with -O2 - fixed some #includes in xvnc.cc --- Makefile.am | 75 ++++++++++++++++------------------------------ vnc-includes.patch | 41 +++++++++++++++++++++++++ vnc-xorg.patch | 30 ++++++++++++------- vnc.spec | 11 +++++-- 4 files changed, 94 insertions(+), 63 deletions(-) create mode 100644 vnc-includes.patch diff --git a/Makefile.am b/Makefile.am index df703af..59386d3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ -# Define includes and libraries LIB_DIR=$(top_srcdir)/../../common BIN_DIR=$(top_srcdir)/.. @@ -6,71 +5,47 @@ RFB_LIBS=$(LIB_DIR)/rfb/librfb.la noinst_LTLIBRARIES = libvnccommon.la -libvnccommon_la_SOURCES = \ - vncExtInit.cc vncHooks.cc XserverDesktop.cc +libvnccommon_la_SOURCES = vncExtInit.cc vncHooks.cc XserverDesktop.cc -libvnccommon_la_CPPFLAGS = \ - -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ - -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ - -I/usr/include/X11 -Iinclude -I$(top_srcdir) \ - -I$(LIB_DIR) -I$(BIN_DIR)/vncconfig \ - -DGC_HAS_COMPOSITE_CLIP +libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ + -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \ + -I$(BIN_DIR)/vncconfig -DGC_HAS_COMPOSITE_CLIP $(XVNC_CPPFLAGS) \ + -I$(includedir)/pixman-1 bin_PROGRAMS = Xvnc -Xvnc_SOURCES = \ - xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c $(top_srcdir)/Xi/stubs.c \ - $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap_mi.c +Xvnc_SOURCES = xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c \ + $(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap_mi.c -nodist_Xvnc_SOURCES = \ - fbrop.h fb.h pixman.h +nodist_Xvnc_SOURCES = fbrop.h fb.h pixman.h -Xvnc_CPPFLAGS = \ - -DHAVE_DIX_CONFIG_H -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS -DXFree86Server \ - -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ - -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ - -I$(LIB_DIR) \ - -I$(top_srcdir)/include -I/usr/include/X11 -I$(top_srcdir)/mi \ - -I$(top_srcdir)/render -I$(top_srcdir)/Xext +Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \ + -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ + -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \ + -I$(top_srcdir)/include -I$(includedir)/pixman-1 -Xvnc_LDADD = \ - $(top_srcdir)/Xext/libXext.la $(top_srcdir)/dix/libdix.la \ - $(top_srcdir)/config/libconfig.a $(top_srcdir)/Xi/libXi.la \ - $(top_srcdir)/xkb/libxkb.la $(top_srcdir)/xkb/libxkbstubs.la \ - $(top_srcdir)/record/librecord.la $(top_srcdir)/GL/glx/libglx.la \ - $(top_srcdir)/GL/mesa/libGLcore.la $(top_srcdir)/dbe/libdbe.la \ - $(top_srcdir)/damageext/libdamageext.la $(top_srcdir)/fb/libfb.la \ - $(top_srcdir)/miext/damage/libdamage.la $(top_srcdir)/mi/libmi.la \ - $(top_srcdir)/xfixes/libxfixes.la $(top_srcdir)/XTrap/libxtrap.la \ - $(top_srcdir)/randr/librandr.la $(top_srcdir)/render/librender.la \ - $(top_srcdir)/os/libos.la libvnccommon.la $(RFB_LIBS) \ - -lXfont -lX11 -lpixman-1 -lcrypto -lselinux +Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \ + $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11 libvnc_la_LTLIBRARIES = libvnc.la libvnc_ladir = $(moduledir)/extensions -libvnc_la_SOURCES = \ - xf86vncModule.cc +libvnc_la_SOURCES = xf86vncModule.cc -libvnc_la_CPPFLAGS = \ - -I$(LIB_DIR) \ - -I$(top_srcdir)/hw/xfree86/common \ - -I$(top_srcdir)/hw/xfree86/os-support \ - -I$(top_srcdir)/hw/xfree86/os-support/bus \ - -DXFree86Module -DXFree86LOADER -DIN_MODULE +libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(LIB_DIR) \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -DXFree86Module -DXFree86LOADER -DIN_MODULE \ + -I$(includedir)/pixman-1 -libvnc_la_CXXFLAGS = \ - $(COMPILER_FLAGS) +libvnc_la_LDFLAGS = -module -avoid-version -libvnc_la_LDFLAGS = \ - -module -avoid-version - -libvnc_la_LIBADD = \ - libvnccommon.la $(RFB_LIBS) +libvnc_la_LIBADD = libvnccommon.la $(RFB_LIBS) # C++ hacks -BUILT_SOURCES = \ - $(nodist_Xvnc_SOURCES) +BUILT_SOURCES = $(nodist_Xvnc_SOURCES) fb.h: $(top_srcdir)/fb/fb.h cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h diff --git a/vnc-includes.patch b/vnc-includes.patch new file mode 100644 index 0000000..ad69b17 --- /dev/null +++ b/vnc-includes.patch @@ -0,0 +1,41 @@ +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.includes 2008-04-04 13:54:24.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc 2008-04-04 13:54:49.000000000 +0200 +@@ -22,8 +22,8 @@ + extern "C" { + #define class c_class + #define NEED_EVENTS +-#include "X.h" +-#include "Xproto.h" ++#include ++#include + #include "misc.h" + #include "os.h" + #include "dixstruct.h" +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.includes 2008-04-04 13:55:07.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-04-04 13:55:29.000000000 +0200 +@@ -50,9 +50,9 @@ extern char *display; + #include "resource.h" + #include "cursorstr.h" + #include "windowstr.h" +-#include "mi/mi.h" ++#include "mi.h" + #define XK_CYRILLIC +-#include "keysym.h" ++#include + #undef public + #undef class + } +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.includes 2008-04-04 13:57:34.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-04-04 13:57:44.000000000 +0200 +@@ -68,7 +68,7 @@ extern "C" { + #include + #include "dix.h" + #include "inputstr.h" +-#include "keysym.h" ++#include + extern int defaultColorVisualClass; + #undef new + #undef class diff --git a/vnc-xorg.patch b/vnc-xorg.patch index b115422..ec1fa34 100644 --- a/vnc-xorg.patch +++ b/vnc-xorg.patch @@ -1,6 +1,6 @@ -diff -up xorg-x11-server-source/mi/miinitext.c.orig xorg/mi/miinitext.c ---- xorg-x11-server-source/mi/miinitext.c.orig 2008-01-28 10:18:46.000000000 +0100 -+++ xorg-x11-server-source/mi/miinitext.c 2008-01-28 10:18:58.000000000 +0100 +diff -up mi/miinitext.c.orig xorg/mi/miinitext.c +--- mi/miinitext.c.orig 2008-01-28 10:18:46.000000000 +0100 ++++ mi/miinitext.c 2008-01-28 10:18:58.000000000 +0100 @@ -289,6 +289,7 @@ extern void BigReqExtensionInit(INITARGS #ifdef MITMISC extern void MITMiscExtensionInit(INITARGS); @@ -17,9 +17,9 @@ diff -up xorg-x11-server-source/mi/miinitext.c.orig xorg/mi/miinitext.c #ifdef XIDLE if (!noXIdleExtension) XIdleExtensionInit(); #endif -diff -up xorg-x11-server-source/hw/Makefile.am.orig xorg/hw/Makefile.am ---- xorg-x11-server-source/hw/Makefile.am.orig 2008-01-28 10:18:46.000000000 +0100 -+++ xorg-x11-server-source/hw/Makefile.am 2008-01-28 10:18:58.000000000 +0100 +diff -up hw/Makefile.am.orig xorg/hw/Makefile.am +--- hw/Makefile.am.orig 2008-01-28 10:18:46.000000000 +0100 ++++ hw/Makefile.am 2008-01-28 10:18:58.000000000 +0100 @@ -43,7 +43,8 @@ SUBDIRS = \ $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ @@ -30,9 +30,9 @@ diff -up xorg-x11-server-source/hw/Makefile.am.orig xorg/hw/Makefile.am DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint -diff -up xorg-x11-server-source/configure.ac.orig xorg/configure.ac ---- xorg-x11-server-source/configure.ac.orig 2008-01-28 10:18:45.000000000 +0100 -+++ xorg-x11-server-source/configure.ac 2008-01-28 10:18:58.000000000 +0100 +diff -up configure.ac.orig xserver/configure.ac +--- configure.ac.orig 2008-03-25 14:32:36.000000000 +0100 ++++ configure.ac 2008-03-26 20:14:16.000000000 +0100 @@ -29,7 +29,6 @@ AC_PREREQ(2.57) AC_INIT([xorg-server], 1.4.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) AC_CONFIG_SRCDIR([Makefile.am]) @@ -41,7 +41,17 @@ diff -up xorg-x11-server-source/configure.ac.orig xorg/configure.ac dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. -@@ -2173,6 +2172,7 @@ hw/dmx/input/Makefile +@@ -1206,6 +1205,9 @@ if test "x$XVFB" = xyes; then + AC_SUBST([XVFB_SYS_LIBS]) + fi + ++dnl Xvnc DDX ++AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) ++AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) + + dnl Xnest DDX + +@@ -2186,6 +2188,7 @@ hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile diff --git a/vnc.spec b/vnc.spec index 7ef4b3e..c22ad19 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 28%{?dist} +Release: 29%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -46,6 +46,7 @@ Patch48: vnc-manminor.patch Patch49: vnc-clipboard.patch Patch50: vnc-scrollbars.patch Patch51: vnc-bounds.patch +Patch52: vnc-includes.patch License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -107,7 +108,7 @@ cp %{SOURCE1} unix/xorg-x11-server-source/hw/vnc/ %patch9 -p1 -b .vncpasswd %patch11 -p1 -b .modular-xorg pushd unix/xorg-x11-server-source -%patch40 -p1 -b .vnc +%patch40 -p0 -b .vnc popd %patch12 -p1 -b .nohttpd %patch15 -p1 -b .viewer-reparent @@ -142,9 +143,10 @@ popd %patch49 -p1 -b .clipboard %patch50 -p1 -b .scrollbars %patch51 -p1 -b .bounds +%patch52 -p1 -b .includes %build -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" export CXXFLAGS="$CFLAGS" pushd common @@ -332,6 +334,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Apr 09 2008 Adam Tkac 4.1.2-29 +- rebuild with -O2 + * Wed Mar 19 2008 Adam Tkac 4.1.2-28 - validate framebuffer bounds before GetImage call (#430468, improved fix) From 83ba1b5097ae087fad2030f1117d0a1e20567036 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 25 Apr 2008 10:43:54 +0000 Subject: [PATCH 23/38] - rebuild against new mesa to fix GLX under anaconda (#443635) --- vnc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vnc.spec b/vnc.spec index c22ad19..4145a20 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 29%{?dist} +Release: 30%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -334,6 +334,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Fri Apr 25 2008 Adam Tkac 4.1.2-30 +- rebuild against new mesa to fix GLX under anaconda (#443635) + * Wed Apr 09 2008 Adam Tkac 4.1.2-29 - rebuild with -O2 From 1342c56e7304c91c7bab21500c6a56abca76b153 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Thu, 29 May 2008 16:37:19 +0000 Subject: [PATCH 24/38] - substituted vnc-210617.patch with improved version - vnc-viewerIPv6.patch (#438422) --- vnc-210617.patch | 67 ------------------ vnc-viewerIPv6.patch | 163 +++++++++++++++++++++++++++++++++++++++++++ vnc.spec | 13 ++-- 3 files changed, 172 insertions(+), 71 deletions(-) delete mode 100644 vnc-210617.patch create mode 100644 vnc-viewerIPv6.patch diff --git a/vnc-210617.patch b/vnc-210617.patch deleted file mode 100644 index b242048..0000000 --- a/vnc-210617.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2006-10-13 11:31:37.000000000 +0100 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2006-10-13 12:05:40.000000000 +0100 -@@ -106,11 +106,29 @@ - TcpSocket::TcpSocket(const char *host, int port) - : closeFd(true) - { -+ struct sockaddr_storage addr; -+ size_t addrlen; -+ struct addrinfo *hostai; - int sock; - -- // - Create a socket - initSockets(); -- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) -+ -+ if (getaddrinfo(host, NULL, NULL, &hostai)) { -+ int e = errorNumber; -+ throw SocketException("unable to resolve host by name", e); -+ } -+ -+ addrlen = hostai->ai_addrlen; -+ memset(&addr, 0, sizeof(addr)); -+ memcpy(&addr, hostai->ai_addr, addrlen); -+ freeaddrinfo(hostai); -+ if (addr.ss_family == AF_INET) -+ ((struct sockaddr_in *)&addr)->sin_port = htons(port); -+ else if (addr.ss_family == AF_INET6) -+ ((struct sockaddr_in6 *)&addr)->sin6_port = htons(port); -+ -+ // - Create a socket -+ if ((sock = socket(addr.ss_family, SOCK_STREAM, 0)) < 0) - throw SocketException("unable to create socket", errorNumber); - - #ifndef WIN32 -@@ -118,30 +136,9 @@ - fcntl(sock, F_SETFD, FD_CLOEXEC); - #endif - -- // - Connect it to something -- -- // Try processing the host as an IP address -- struct sockaddr_in addr; -- memset(&addr, 0, sizeof(addr)); -- addr.sin_family = AF_INET; -- addr.sin_addr.s_addr = inet_addr(host); -- addr.sin_port = htons(port); -- if ((int)addr.sin_addr.s_addr == -1) { -- // Host was not an IP address - try resolving as DNS name -- struct hostent *hostinfo; -- hostinfo = gethostbyname(host); -- if (hostinfo && hostinfo->h_addr) { -- addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; -- } else { -- int e = errorNumber; -- closesocket(sock); -- throw SocketException("unable to resolve host by name", e); -- } -- } -- - // Attempt to connect to the remote host - for (;;) { -- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { -+ if (connect(sock, (struct sockaddr *)&addr, addrlen) != 0) { - int e = errorNumber; - if (e == EINTR) - continue; - diff --git a/vnc-viewerIPv6.patch b/vnc-viewerIPv6.patch new file mode 100644 index 0000000..56c6057 --- /dev/null +++ b/vnc-viewerIPv6.patch @@ -0,0 +1,163 @@ +diff -up vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 vnc-4_1_2-unixsrc/common/network/Makefile.am +--- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 2008-05-29 17:53:53.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2008-05-29 17:53:53.000000000 +0200 +@@ -1,5 +1,7 @@ + noinst_LTLIBRARIES = libnetwork.la + ++libnetwork_la_CPPFLAGS = -DHAVE_IPV6 ++ + libnetwork_la_SOURCES = \ + Socket.h \ + TcpSocket.cxx \ +diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx +--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2008-05-29 17:53:53.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-05-29 18:18:28.000000000 +0200 +@@ -109,50 +109,100 @@ TcpSocket::TcpSocket(int sock, bool clos + TcpSocket::TcpSocket(const char *host, int port) + : closeFd(true) + { +- int sock; ++ int sock, err, family, ret; ++ size_t addrlen; ++ struct sockaddr_storage addr; ++#ifdef HAVE_IPV6 ++ struct addrinfo *hostai, *current, hints; ++ char errstr[256]; ++#endif + + // - Create a socket + initSockets(); +- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) +- throw SocketException("unable to create socket", errorNumber); + +-#ifndef WIN32 +- // - By default, close the socket on exec() +- fcntl(sock, F_SETFD, FD_CLOEXEC); +-#endif ++#ifdef HAVE_IPV6 ++ memset(&hints, 0, sizeof(struct addrinfo)); ++ hints.ai_family = AF_UNSPEC; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_canonname = NULL; ++ hints.ai_addr = NULL; ++ hints.ai_next = NULL; ++ ++ if (getaddrinfo(host, NULL, &hints, &hostai) != 0) { ++ err = errorNumber; ++ if (snprintf(errstr, 256, "unable resolve host by name (%s)", ++ gai_strerror(err)) < 0) ++ throw Exception("unable resolve host by name"); ++ throw Exception(errstr); ++ } ++ ++ for (current = hostai; current != NULL; current = hostai->ai_next) { ++ family = current->ai_family; ++ if (family != AF_INET && family != AF_INET6) ++ continue; ++ ++ addrlen = current->ai_addrlen; ++ memcpy(&addr, current->ai_addr, addrlen); ++ ++ if (family == AF_INET) ++ ((struct sockaddr_in *)&addr)->sin_port = htons(port); ++ else ++ ((struct sockaddr_in6 *)&addr)->sin6_port = htons(port); + +- // - Connect it to something ++#else ++ family = AF_INET; ++ addrlen = sizeof(struct sockaddr_in); + +- // Try processing the host as an IP address +- struct sockaddr_in addr; +- memset(&addr, 0, sizeof(addr)); +- addr.sin_family = AF_INET; +- addr.sin_addr.s_addr = inet_addr(host); +- addr.sin_port = htons(port); +- if ((int)addr.sin_addr.s_addr == -1) { +- // Host was not an IP address - try resolving as DNS name +- struct hostent *hostinfo; +- hostinfo = gethostbyname(host); +- if (hostinfo && hostinfo->h_addr) { +- addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; +- } else { +- int e = errorNumber; +- closesocket(sock); +- throw SocketException("unable to resolve host by name", e); ++ // Try processing the host as an IP address ++ memset(&addr, 0, addrlen); ++ addr.sin_family = AF_INET; ++ addr.sin_addr.s_addr = inet_addr(host); ++ addr.sin_port = htons(port); ++ if ((int)addr.sin_addr.s_addr == -1) { ++ // Host was not an IP address - try resolving as DNS name ++ struct hostent *hostinfo; ++ hostinfo = gethostbyname(host); ++ if (hostinfo && hostinfo->h_addr) { ++ addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; ++ } else { ++ err = errorNumber; ++ strcpy(errstr, "unable to resolve host by name"); ++ goto socket_fail; ++ } ++ } ++#endif ++ sock = socket (family, SOCK_STREAM, 0); ++ if (sock == -1) { ++ err = errno; ++ strcpy(errstr, "unable to create socket"); ++ goto socket_fail; + } +- } + +- // Attempt to connect to the remote host +- for (;;) { +- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { +- int e = errorNumber; +- if (e == EINTR) +- continue; ++ // Attempt to connect to the remote host ++ while ((ret = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) { ++ err = errorNumber; ++ if (err == EINTR) ++ continue; + closesocket(sock); +- throw SocketException("unable to connect to host", e); +- } else break; ++ break; ++ } ++#ifdef HAVE_IPV6 ++ if (ret == 0) ++ break; ++ else ++ continue; ++ } ++#endif ++ if (ret == -1) { ++ strcpy(errstr, "unable to connect to host"); ++ goto socket_fail; + } + ++#ifndef WIN32 ++ // - By default, close the socket on exec() ++ fcntl(sock, F_SETFD, FD_CLOEXEC); ++#endif ++ + // Disable Nagle's algorithm, to reduce latency + enableNagles(sock, false); + +@@ -160,6 +210,14 @@ TcpSocket::TcpSocket(const char *host, i + instream = new FdInStream(sock); + outstream = new FdOutStream(sock); + ownStreams = true; ++ ++ return; ++ ++socket_fail: ++#ifdef HAVE_IPV6 ++ freeaddrinfo(hostai); ++#endif ++ throw SocketException(errstr, err); + } + + TcpSocket::~TcpSocket() { diff --git a/vnc.spec b/vnc.spec index 4145a20..966d8b2 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 30%{?dist} +Release: 31%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -25,7 +25,6 @@ Patch15: vnc-viewer-reparent.patch Patch16: vnc-64bit.patch Patch17: vnc-select.patch Patch21: vnc-newfbsize.patch -Patch23: vnc-210617.patch Patch24: vnc-102434.patch Patch25: vnc-config.patch Patch28: vnc-render.patch @@ -47,6 +46,8 @@ Patch49: vnc-clipboard.patch Patch50: vnc-scrollbars.patch Patch51: vnc-bounds.patch Patch52: vnc-includes.patch +Patch53: vnc-viewerIPv6.patch + License: GPLv2 Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -115,7 +116,6 @@ popd %patch16 -p1 -b .64bit %patch17 -p1 -b .select %patch21 -p1 -b .newfbsize -%patch23 -p1 -b .ipv6 %patch24 -p1 -b .102434 %patch25 -p1 -b .config %patch28 -p1 -b .render @@ -144,9 +144,10 @@ popd %patch50 -p1 -b .scrollbars %patch51 -p1 -b .bounds %patch52 -p1 -b .includes +%patch53 -p1 -b .ipv6 %build -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" export CXXFLAGS="$CFLAGS" pushd common @@ -334,6 +335,10 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed May 29 2008 Adam Tkac 4.1.2-31 +- substituted vnc-210617.patch with improved version - vnc-viewerIPv6.patch + (#438422) + * Fri Apr 25 2008 Adam Tkac 4.1.2-30 - rebuild against new mesa to fix GLX under anaconda (#443635) From 5883a9d4fb936b9c796fa00b53ddeb71b63f41bc Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 3 Jun 2008 08:57:07 +0000 Subject: [PATCH 25/38] - minor cleanup in IPv6 patch --- vnc-viewerIPv6.patch | 133 ++++++++++++++++++++++++++----------------- vnc.spec | 5 +- 2 files changed, 85 insertions(+), 53 deletions(-) diff --git a/vnc-viewerIPv6.patch b/vnc-viewerIPv6.patch index 56c6057..82e4fa0 100644 --- a/vnc-viewerIPv6.patch +++ b/vnc-viewerIPv6.patch @@ -1,28 +1,28 @@ diff -up vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 vnc-4_1_2-unixsrc/common/network/Makefile.am ---- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 2008-05-29 17:53:53.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2008-05-29 17:53:53.000000000 +0200 +--- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 2008-06-02 10:22:17.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2008-06-02 10:52:56.000000000 +0200 @@ -1,5 +1,7 @@ noinst_LTLIBRARIES = libnetwork.la -+libnetwork_la_CPPFLAGS = -DHAVE_IPV6 ++libnetwork_la_CPPFLAGS = -DHAVE_GETADDRINFO + libnetwork_la_SOURCES = \ Socket.h \ TcpSocket.cxx \ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2008-05-29 17:53:53.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-05-29 18:18:28.000000000 +0200 -@@ -109,50 +109,100 @@ TcpSocket::TcpSocket(int sock, bool clos +--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2008-06-02 10:22:17.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-06-02 10:49:04.000000000 +0200 +@@ -109,50 +109,99 @@ TcpSocket::TcpSocket(int sock, bool clos TcpSocket::TcpSocket(const char *host, int port) : closeFd(true) { - int sock; -+ int sock, err, family, ret; ++#define CAST_ADDR(x) (*((struct x *)&addr)) ++ int sock, err, family, result = -1; + size_t addrlen; + struct sockaddr_storage addr; -+#ifdef HAVE_IPV6 -+ struct addrinfo *hostai, *current, hints; -+ char errstr[256]; ++#ifdef HAVE_GETADDRINFO ++ struct addrinfo *ai, *current, hints; +#endif // - Create a socket @@ -34,7 +34,7 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c - // - By default, close the socket on exec() - fcntl(sock, F_SETFD, FD_CLOEXEC); -#endif -+#ifdef HAVE_IPV6 ++#ifdef HAVE_GETADDRINFO + memset(&hints, 0, sizeof(struct addrinfo)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; @@ -42,15 +42,12 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c + hints.ai_addr = NULL; + hints.ai_next = NULL; + -+ if (getaddrinfo(host, NULL, &hints, &hostai) != 0) { -+ err = errorNumber; -+ if (snprintf(errstr, 256, "unable resolve host by name (%s)", -+ gai_strerror(err)) < 0) -+ throw Exception("unable resolve host by name"); -+ throw Exception(errstr); ++ if ((result = getaddrinfo(host, NULL, &hints, &ai)) != 0) { ++ throw Exception("unable to resolve host by name: %s", ++ gai_strerror(result)); + } + -+ for (current = hostai; current != NULL; current = hostai->ai_next) { ++ for (current = ai; current != NULL; current = current->ai_next) { + family = current->ai_family; + if (family != AF_INET && family != AF_INET6) + continue; @@ -59,9 +56,9 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c + memcpy(&addr, current->ai_addr, addrlen); + + if (family == AF_INET) -+ ((struct sockaddr_in *)&addr)->sin_port = htons(port); ++ CAST_ADDR(sockaddr_in).sin_port = htons(port); + else -+ ((struct sockaddr_in6 *)&addr)->sin6_port = htons(port); ++ CAST_ADDR(sockaddr_in6).sin6_port = htons(port); - // - Connect it to something +#else @@ -86,27 +83,29 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c - throw SocketException("unable to resolve host by name", e); + // Try processing the host as an IP address + memset(&addr, 0, addrlen); -+ addr.sin_family = AF_INET; -+ addr.sin_addr.s_addr = inet_addr(host); -+ addr.sin_port = htons(port); -+ if ((int)addr.sin_addr.s_addr == -1) { ++ CAST_ADDR(sockaddr_in).sin_family = AF_INET; ++ CAST_ADDR(sockaddr_in).sin_addr.s_addr = inet_addr(host); ++ CAST_ADDR(sockaddr_in).sin_port = htons(port); ++ if ((int)CAST_ADDR(sockaddr_in).sin_addr.s_addr == -1) { + // Host was not an IP address - try resolving as DNS name + struct hostent *hostinfo; + hostinfo = gethostbyname(host); + if (hostinfo && hostinfo->h_addr) { -+ addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; ++ CAST_ADDR(sockaddr_in).sin_addr.s_addr = ++ ((struct in_addr *)hostinfo->h_addr)->s_addr; + } else { + err = errorNumber; -+ strcpy(errstr, "unable to resolve host by name"); -+ goto socket_fail; ++ throw SocketException("unable to resolve host by name", err); + } + } +#endif + sock = socket (family, SOCK_STREAM, 0); + if (sock == -1) { -+ err = errno; -+ strcpy(errstr, "unable to create socket"); -+ goto socket_fail; ++ err = errorNumber; ++#ifdef HAVE_GETADDRINFO ++ freeaddrinfo(ai); ++#endif ++ throw SocketException("unable to create socket", err); } - } @@ -117,7 +116,7 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c - if (e == EINTR) - continue; + // Attempt to connect to the remote host -+ while ((ret = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) { ++ while ((result = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) { + err = errorNumber; + if (err == EINTR) + continue; @@ -126,18 +125,18 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c - } else break; + break; + } -+#ifdef HAVE_IPV6 -+ if (ret == 0) ++#ifdef HAVE_GETADDRINFO ++ if (result == 0) + break; + else + continue; -+ } -+#endif -+ if (ret == -1) { -+ strcpy(errstr, "unable to connect to host"); -+ goto socket_fail; } ++ freeaddrinfo(ai); ++#endif ++ if (result == -1) ++ throw SocketException("unable connect to socket", err); ++ +#ifndef WIN32 + // - By default, close the socket on exec() + fcntl(sock, F_SETFD, FD_CLOEXEC); @@ -146,18 +145,48 @@ diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/c // Disable Nagle's algorithm, to reduce latency enableNagles(sock, false); -@@ -160,6 +210,14 @@ TcpSocket::TcpSocket(const char *host, i - instream = new FdInStream(sock); - outstream = new FdOutStream(sock); - ownStreams = true; -+ -+ return; -+ -+socket_fail: -+#ifdef HAVE_IPV6 -+ freeaddrinfo(hostai); -+#endif -+ throw SocketException(errstr, err); - } +diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.cxx +--- vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 2008-06-02 10:23:35.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/rdr/Exception.cxx 2008-06-02 10:28:51.000000000 +0200 +@@ -22,8 +22,23 @@ + #include + #endif + ++#include ++ + using namespace rdr; + ++Exception::Exception(const char *format, ...) { ++ va_list ap; ++ int result; ++ ++ va_start(ap, format); ++ result = vsnprintf(str_, len, format, ap); ++ va_end(ap); ++ ++ /* XXX - ensure that string ends correctly */ ++ if (result > len) ++ str_[len - 1] = '\0'; ++} ++ + SystemException::SystemException(const char* s, int err_) + : Exception(s), err(err_) + { +diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.h +--- vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 2008-06-02 10:23:05.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/rdr/Exception.h 2008-06-02 10:28:41.000000000 +0200 +@@ -27,13 +27,7 @@ namespace rdr { + struct Exception { + enum { len = 256 }; + char str_[len]; +- Exception(const char* s=0) { +- str_[0] = 0; +- if (s) +- strncat(str_, s, len-1); +- else +- strcat(str_, "Exception"); +- } ++ Exception(const char *format, ...); + virtual const char* str() const { return str_; } + }; - TcpSocket::~TcpSocket() { diff --git a/vnc.spec b/vnc.spec index 966d8b2..00bcf53 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 31%{?dist} +Release: 31.1%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -335,6 +335,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Jun 02 2008 Adam Tkac 4.1.2-31.1 +- minor cleanup in IPv6 patch + * Wed May 29 2008 Adam Tkac 4.1.2-31 - substituted vnc-210617.patch with improved version - vnc-viewerIPv6.patch (#438422) From 3b9728a31cc8154e2f5bb9b37c05109ff1b428b2 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 2 Jul 2008 11:16:31 +0000 Subject: [PATCH 26/38] - enabled XKEYBOARD extension (#450033) - icons have correct permissions (#453495) --- vnc-noxkb.patch | 12 ------------ vnc.spec | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 vnc-noxkb.patch diff --git a/vnc-noxkb.patch b/vnc-noxkb.patch deleted file mode 100644 index 4a523f4..0000000 --- a/vnc-noxkb.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.noxkb vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.noxkb 2008-03-05 13:02:23.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-03-05 13:02:41.000000000 +0100 -@@ -1009,7 +1009,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten - - AC_DEFINE(XKB, 1, [Build XKB]) - AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) --AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) -+AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default]) - REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" - XKB_LIB='$(top_builddir)/xkb/libxkb.la' - XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' diff --git a/vnc.spec b/vnc.spec index 00bcf53..b5e0851 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 31.1%{?dist} +Release: 32%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -38,7 +38,6 @@ Patch40: vnc-xorg.patch Patch41: vnc-privates.patch Patch42: vnc-mieq.patch Patch43: vnc-allocate.patch -Patch44: vnc-noxkb.patch Patch45: vnc-paint.patch Patch46: vnc-selections.patch Patch48: vnc-manminor.patch @@ -54,7 +53,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: perl, openssl-devel, libpciaccess-devel BuildRequires: zlib-devel libjpeg-devel BuildRequires: desktop-file-utils >= 0.2.92 -BuildRequires: autoconf, automake, libtool, flex, bison, pkgconfig, patchutils +BuildRequires: autoconf, automake, libtool, flex, pkgconfig, patchutils BuildRequires: expat-devel, freetype-devel BuildRequires: libX11-devel, xorg-x11-xtrans-devel BuildRequires: libxkbfile-devel, libXfont-devel @@ -136,7 +135,6 @@ pushd unix/xorg-x11-server-source/hw/vnc popd %patch42 -p1 -b .mieq %patch43 -p1 -b .alloc -%patch44 -p1 -b .noxkb %patch45 -p1 -b .paint %patch46 -p1 -b .selections %patch48 -p1 -b .minor @@ -176,7 +174,7 @@ autoreconf -fiv --enable-xcsecurity \ --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ --with-fontdir=%{_datadir}/X11/fonts \ - --with-os-name="Fedora 9" \ + --with-os-name="Fedora 10" \ --with-os-vendor="Red Hat, Inc." \ --with-xkb-output=%{_localstatedir}/lib/xkb \ --with-rgb-path=%{_datadir}/X11/rgb \ @@ -244,9 +242,9 @@ EOF chmod 644 $RPM_BUILD_ROOT/etc/sysconfig/vncservers mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps -install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/vnc.png -install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/vnc.png -install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/vnc.png +install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/vnc.png +install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/vnc.png +install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/vnc.png mkdir -p $RPM_BUILD_ROOT/etc/X11/applnk/Applications cat > vncviewer.desktop << EOF [Desktop Entry] @@ -335,6 +333,10 @@ fi %{_libdir}/librfb.so.* %changelog +* Tue Jul 01 2008 Adam Tkac 4.1.2-32 +- enabled XKEYBOARD extension (#450033) +- icons have correct permissions (#453495) + * Mon Jun 02 2008 Adam Tkac 4.1.2-31.1 - minor cleanup in IPv6 patch From 339b5324a159a42a9773d8aef75144fa60f8ab36 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 2 Jul 2008 12:37:03 +0000 Subject: [PATCH 27/38] - removed mesa-source from buildrequires --- vnc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnc.spec b/vnc.spec index b5e0851..65c2243 100644 --- a/vnc.spec +++ b/vnc.spec @@ -62,7 +62,7 @@ BuildRequires: libXtst-devel, xorg-x11-util-macros BuildRequires: libXt-devel, libXv-devel, pixman-devel BuildRequires: libselinux-devel BuildRequires: xorg-x11-server-source -BuildRequires: mesa-libGL-devel >= 6.5.2, mesa-source >= 6.5.2, libdrm-devel +BuildRequires: mesa-libGL-devel >= 7.1-0.36, libdrm-devel >= 2.4.0 Requires: gtk2 >= 2.6 Requires: coreutils From ddbf94e1b73cf3696fcd8f41c55704ad0de138de Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Thu, 3 Jul 2008 16:09:26 +0000 Subject: [PATCH 28/38] - build with -rdynamic to make swrast_dri driver happy --- vnc.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vnc.spec b/vnc.spec index 65c2243..c2532d4 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 32%{?dist} +Release: 33%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -145,8 +145,8 @@ popd %patch53 -p1 -b .ipv6 %build -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" -export CXXFLAGS="$CFLAGS" +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0 -rdynamic" +export CXXFLAGS="$CFLAGS -rdynamic" pushd common autoreconf -fiv @@ -183,8 +183,7 @@ autoreconf -fiv --disable-dri \ --enable-glx \ --disable-config-dbus \ - --disable-config-hal \ - --with-mesa-source=%{_datadir}/mesa/source + --disable-config-hal make %{?_smp_mflags} popd @@ -333,6 +332,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Thu Jul 03 2008 Adam Tkac 4.1.2-33 +- build with -rdynamic to make swrast_dri driver happy + * Tue Jul 01 2008 Adam Tkac 4.1.2-32 - enabled XKEYBOARD extension (#450033) - icons have correct permissions (#453495) From 9eaad24cc072fd2010b0942c571b4ea2a773159d Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 4 Jul 2008 09:06:35 +0000 Subject: [PATCH 29/38] - pass -rdynamic in same way as xserver --- Makefile.am | 2 ++ vnc.spec | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 59386d3..e310ac9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,8 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \ Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \ $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11 +Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) + libvnc_la_LTLIBRARIES = libvnc.la libvnc_ladir = $(moduledir)/extensions diff --git a/vnc.spec b/vnc.spec index c2532d4..92b02da 100644 --- a/vnc.spec +++ b/vnc.spec @@ -145,8 +145,8 @@ popd %patch53 -p1 -b .ipv6 %build -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0 -rdynamic" -export CXXFLAGS="$CFLAGS -rdynamic" +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" +export CXXFLAGS="$CFLAGS" pushd common autoreconf -fiv From ddeb9e034b8aa8952d46eda599e97479a76ef760 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 16 Jul 2008 11:40:44 +0000 Subject: [PATCH 30/38] - update patches due rpm 4.6 --- vnc-use-fb.patch | 26 +++++----- vnc-via.patch | 124 ++++++++++++++++++++++++----------------------- vnc-xorg.patch | 102 +++++++++++++++++++------------------- vnc.spec | 9 ++-- 4 files changed, 134 insertions(+), 127 deletions(-) diff --git a/vnc-use-fb.patch b/vnc-use-fb.patch index 55eddd0..ca71bb6 100644 --- a/vnc-use-fb.patch +++ b/vnc-use-fb.patch @@ -1,6 +1,7 @@ ---- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2005-02-28 12:59:09.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2005-03-04 16:13:19.000000000 +0000 -@@ -48,8 +48,12 @@ +diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc +--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2006-05-12 18:50:32.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2008-07-16 13:28:27.000000000 +0200 +@@ -48,8 +48,12 @@ extern "C" { #include "X11/Xos.h" #include "scrnintstr.h" #include "servermd.h" @@ -13,7 +14,7 @@ #include "mi.h" #include "mibstore.h" #include "colormapst.h" -@@ -73,6 +77,7 @@ +@@ -73,6 +77,7 @@ extern "C" { #undef public #undef xor #undef and @@ -21,15 +22,15 @@ extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int); extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int); extern Bool cfb16CreateGC(GCPtr); -@@ -83,6 +88,7 @@ +@@ -83,6 +88,7 @@ extern "C" { unsigned long, char*); extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int, unsigned long, char*); +#endif } - #define XVNCVERSION "Free Edition 4.1" -@@ -482,7 +488,7 @@ + #define XVNCVERSION "Free Edition 4.1.2" +@@ -482,7 +488,7 @@ CARD32 GetTimeInMillis() } #endif @@ -38,7 +39,7 @@ static Bool vfbMultiDepthCreateGC(GCPtr pGC) { switch (vfbBitsPerPixel(pGC->depth)) -@@ -541,6 +547,7 @@ +@@ -541,6 +547,7 @@ vfbMultiDepthGetImage(DrawablePtr pDrawa break; } } @@ -46,7 +47,7 @@ static ColormapPtr InstalledMaps[MAXSCREENS]; -@@ -811,6 +818,11 @@ +@@ -811,6 +818,11 @@ static Bool vfbScreenInit(int index, Scr defaultColorVisualClass = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor; @@ -58,7 +59,7 @@ switch (pvfb->bitsPerPixel) { case 1: -@@ -838,6 +850,7 @@ +@@ -838,6 +850,7 @@ static Bool vfbScreenInit(int index, Scr pScreen->CreateGC = vfbMultiDepthCreateGC; pScreen->GetImage = vfbMultiDepthGetImage; pScreen->GetSpans = vfbMultiDepthGetSpans; @@ -66,7 +67,7 @@ pScreen->InstallColormap = vfbInstallColormap; pScreen->UninstallColormap = vfbUninstallColormap; -@@ -883,6 +896,9 @@ +@@ -883,6 +896,9 @@ static Bool vfbScreenInit(int index, Scr } } @@ -76,10 +77,11 @@ if (pvfb->bitsPerPixel == 1) { ret = mfbCreateDefColormap(pScreen); -@@ -891,6 +907,7 @@ +@@ -891,6 +907,7 @@ static Bool vfbScreenInit(int index, Scr { ret = cfbCreateDefColormap(pScreen); } +#endif miSetZeroLineBias(pScreen, pvfb->lineBias); + diff --git a/vnc-via.patch b/vnc-via.patch index 6554427..3bfbfb2 100644 --- a/vnc-via.patch +++ b/vnc-via.patch @@ -1,6 +1,58 @@ ---- vnc-4_1-unixsrc/unix/vncviewer/vncviewer.cxx.via 2005-03-03 23:20:33.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/vncviewer/vncviewer.cxx 2005-03-03 23:23:33.000000000 +0000 -@@ -41,6 +41,7 @@ +diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.via vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx +--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.via 2006-05-15 18:56:20.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-07-16 13:29:29.000000000 +0200 +@@ -54,6 +54,29 @@ using namespace rdr; + + static rfb::LogWriter vlog("TcpSocket"); + ++/* Tunnelling support. */ ++int network::findFreeTcpPort (void) ++{ ++ int sock, port; ++ struct sockaddr_in addr; ++ memset(&addr, 0, sizeof(addr)); ++ addr.sin_family = AF_INET; ++ addr.sin_addr.s_addr = INADDR_ANY; ++ ++ if ((sock = socket (AF_INET, SOCK_STREAM, 0)) < 0) ++ throw SocketException ("unable to create socket", errorNumber); ++ ++ for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) { ++ addr.sin_port = htons ((unsigned short) port); ++ if (bind (sock, (struct sockaddr *)&addr, sizeof (addr)) == 0) { ++ close (sock); ++ return port; ++ } ++ } ++ throw SocketException ("no free port in range", 0); ++ return 0; ++} ++ + + // -=- Socket initialisation + static bool socketsInitialised = false; +diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.h.via vnc-4_1_2-unixsrc/common/network/TcpSocket.h +--- vnc-4_1_2-unixsrc/common/network/TcpSocket.h.via 2006-05-15 18:56:20.000000000 +0200 ++++ vnc-4_1_2-unixsrc/common/network/TcpSocket.h 2008-07-16 13:29:29.000000000 +0200 +@@ -32,8 +32,14 @@ + + #include + ++/* Tunnelling support. */ ++#define TUNNEL_PORT_OFFSET 5500 ++ + namespace network { + ++ /* Tunnelling support. */ ++ int findFreeTcpPort (void); ++ + class TcpSocket : public Socket { + public: + TcpSocket(int sock, bool close=true); +diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.via vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx +--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.via 2006-05-15 18:56:20.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx 2008-07-16 13:32:28.000000000 +0200 +@@ -41,6 +41,7 @@ rfb::LogWriter vlog("main"); using namespace network; using namespace rfb; @@ -8,7 +60,7 @@ IntParameter pointerEventInterval("PointerEventInterval", "Time in milliseconds to rate-limit" -@@ -95,6 +96,9 @@ +@@ -95,6 +96,9 @@ BoolParameter listenMode("listen", "List StringParameter geometry("geometry", "X geometry specification", ""); StringParameter displayname("display", "The X display", ""); @@ -18,7 +70,7 @@ char aboutText[256]; char* programName; extern char buildtime[]; -@@ -157,6 +161,61 @@ +@@ -157,6 +161,61 @@ static void usage() exit(1); } @@ -79,8 +131,8 @@ + int main(int argc, char** argv) { - sprintf(aboutText, "VNC Viewer Free Edition 4.1 for X - built %s\n" -@@ -190,8 +249,6 @@ + sprintf(aboutText, "VNC Viewer Free Edition 4.1.2 for X - built %s\n" +@@ -190,8 +249,6 @@ int main(int argc, char** argv) usage(); } @@ -89,7 +141,7 @@ vncServerName = argv[i]; } -@@ -207,6 +264,19 @@ +@@ -207,6 +264,19 @@ int main(int argc, char** argv) vlog.error("Could not create .vnc directory: environment variable $HOME not set."); try { @@ -109,9 +161,10 @@ Socket* sock = 0; if (listenMode) { ---- vnc-4_1-unixsrc/unix/vncviewer/vncviewer.man.via 2005-03-03 23:23:41.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/vncviewer/vncviewer.man 2005-03-03 23:24:18.000000000 +0000 -@@ -174,6 +174,23 @@ +diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.via vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man +--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.via 2005-03-03 14:10:40.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2008-07-16 13:29:29.000000000 +0200 +@@ -174,6 +174,23 @@ This option specifies the key which brin specified as an X11 keysym name (these can be obtained by removing the XK_ prefix from the entries in "/usr/include/X11/keysymdef.h"). Default is F8. @@ -135,52 +188,3 @@ .SH SEE ALSO .BR Xvnc (1), .BR vncpasswd (1), ---- vnc-4_1-unixsrc/common/network/TcpSocket.cxx.via 2005-03-03 23:17:55.000000000 +0000 -+++ vnc-4_1-unixsrc/common/network/TcpSocket.cxx 2005-03-03 23:19:49.000000000 +0000 -@@ -54,6 +54,29 @@ - - static rfb::LogWriter vlog("TcpSocket"); - -+/* Tunnelling support. */ -+int network::findFreeTcpPort (void) -+{ -+ int sock, port; -+ struct sockaddr_in addr; -+ memset(&addr, 0, sizeof(addr)); -+ addr.sin_family = AF_INET; -+ addr.sin_addr.s_addr = INADDR_ANY; -+ -+ if ((sock = socket (AF_INET, SOCK_STREAM, 0)) < 0) -+ throw SocketException ("unable to create socket", errorNumber); -+ -+ for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) { -+ addr.sin_port = htons ((unsigned short) port); -+ if (bind (sock, (struct sockaddr *)&addr, sizeof (addr)) == 0) { -+ close (sock); -+ return port; -+ } -+ } -+ throw SocketException ("no free port in range", 0); -+ return 0; -+} -+ - - // -=- Socket initialisation - static bool socketsInitialised = false; ---- vnc-4_1-unixsrc/common/network/TcpSocket.h.via 2005-03-03 23:19:58.000000000 +0000 -+++ vnc-4_1-unixsrc/common/network/TcpSocket.h 2005-03-03 23:20:21.000000000 +0000 -@@ -32,8 +32,14 @@ - - #include - -+/* Tunnelling support. */ -+#define TUNNEL_PORT_OFFSET 5500 -+ - namespace network { - -+ /* Tunnelling support. */ -+ int findFreeTcpPort (void); -+ - class TcpSocket : public Socket { - public: - TcpSocket(int sock, bool close=true); diff --git a/vnc-xorg.patch b/vnc-xorg.patch index ec1fa34..5d50bc8 100644 --- a/vnc-xorg.patch +++ b/vnc-xorg.patch @@ -1,25 +1,35 @@ -diff -up mi/miinitext.c.orig xorg/mi/miinitext.c ---- mi/miinitext.c.orig 2008-01-28 10:18:46.000000000 +0100 -+++ mi/miinitext.c 2008-01-28 10:18:58.000000000 +0100 -@@ -289,6 +289,7 @@ extern void BigReqExtensionInit(INITARGS - #ifdef MITMISC - extern void MITMiscExtensionInit(INITARGS); - #endif -+extern void vncExtensionInit(INITARGS); - #ifdef XIDLE - extern void XIdleExtensionInit(INITARGS); - #endif -@@ -560,6 +561,7 @@ InitExtensions(argc, argv) - #ifdef MITMISC - if (!noMITMiscExtension) MITMiscExtensionInit(); - #endif -+ vncExtensionInit(); - #ifdef XIDLE - if (!noXIdleExtension) XIdleExtensionInit(); - #endif -diff -up hw/Makefile.am.orig xorg/hw/Makefile.am ---- hw/Makefile.am.orig 2008-01-28 10:18:46.000000000 +0100 -+++ hw/Makefile.am 2008-01-28 10:18:58.000000000 +0100 +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc 2008-07-16 13:33:14.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-07-16 13:33:50.000000000 +0200 +@@ -29,7 +29,6 @@ AC_PREREQ(2.57) + AC_INIT([xorg-server], 1.4.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) + AC_CONFIG_SRCDIR([Makefile.am]) + AM_INIT_AUTOMAKE([dist-bzip2 foreign]) +-AM_MAINTAINER_MODE + + dnl this gets generated by autoheader, and thus contains all the defines. we + dnl don't ever actually use it, internally. +@@ -1212,6 +1211,9 @@ if test "x$XVFB" = xyes; then + AC_SUBST([XVFB_SYS_LIBS]) + fi + ++dnl Xvnc DDX ++AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) ++AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) + + dnl Xnest DDX + +@@ -2176,6 +2178,7 @@ hw/dmx/input/Makefile + hw/dmx/glxProxy/Makefile + hw/dmx/Makefile + hw/vfb/Makefile ++hw/vnc/Makefile + hw/xgl/Makefile + hw/xgl/egl/Makefile + hw/xgl/egl/module/Makefile +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc 2008-07-16 13:33:14.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2008-07-16 13:33:15.000000000 +0200 @@ -43,7 +43,8 @@ SUBDIRS = \ $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ @@ -30,32 +40,22 @@ diff -up hw/Makefile.am.orig xorg/hw/Makefile.am DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint -diff -up configure.ac.orig xserver/configure.ac ---- configure.ac.orig 2008-03-25 14:32:36.000000000 +0100 -+++ configure.ac 2008-03-26 20:14:16.000000000 +0100 -@@ -29,7 +29,6 @@ AC_PREREQ(2.57) - AC_INIT([xorg-server], 1.4.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) - AC_CONFIG_SRCDIR([Makefile.am]) - AM_INIT_AUTOMAKE([dist-bzip2 foreign]) --AM_MAINTAINER_MODE - - dnl this gets generated by autoheader, and thus contains all the defines. we - dnl don't ever actually use it, internally. -@@ -1206,6 +1205,9 @@ if test "x$XVFB" = xyes; then - AC_SUBST([XVFB_SYS_LIBS]) - fi - -+dnl Xvnc DDX -+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) -+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) - - dnl Xnest DDX - -@@ -2186,6 +2188,7 @@ hw/dmx/input/Makefile - hw/dmx/glxProxy/Makefile - hw/dmx/Makefile - hw/vfb/Makefile -+hw/vnc/Makefile - hw/xgl/Makefile - hw/xgl/egl/Makefile - hw/xgl/egl/module/Makefile +diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc 2008-07-16 13:33:14.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2008-07-16 13:33:15.000000000 +0200 +@@ -292,6 +292,7 @@ extern void BigReqExtensionInit(INITARGS + #ifdef MITMISC + extern void MITMiscExtensionInit(INITARGS); + #endif ++extern void vncExtensionInit(INITARGS); + #ifdef XIDLE + extern void XIdleExtensionInit(INITARGS); + #endif +@@ -566,6 +567,7 @@ InitExtensions(argc, argv) + #ifdef MITMISC + if (!noMITMiscExtension) MITMiscExtensionInit(); + #endif ++ vncExtensionInit(); + #ifdef XIDLE + if (!noXIdleExtension) XIdleExtensionInit(); + #endif diff --git a/vnc.spec b/vnc.spec index 92b02da..7e2fc9a 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 33%{?dist} +Release: 33.1%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -107,9 +107,7 @@ cp %{SOURCE1} unix/xorg-x11-server-source/hw/vnc/ %patch8 -p1 -b .restart %patch9 -p1 -b .vncpasswd %patch11 -p1 -b .modular-xorg -pushd unix/xorg-x11-server-source -%patch40 -p0 -b .vnc -popd +%patch40 -p1 -b .vnc %patch12 -p1 -b .nohttpd %patch15 -p1 -b .viewer-reparent %patch16 -p1 -b .64bit @@ -332,6 +330,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Jul 16 2008 Adam Tkac 4.1.2-33.1 +- update patches due rpm 4.6 + * Thu Jul 03 2008 Adam Tkac 4.1.2-33 - build with -rdynamic to make swrast_dri driver happy From 14ae131d2335b9eed121bab78dff2053cdf903a7 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Thu, 17 Jul 2008 11:17:36 +0000 Subject: [PATCH 31/38] - vncserver script returns error when Xvnc fails to start --- vnc-rh212985.patch | 33 +++++++++++++++++++++++++++++++++ vnc.spec | 7 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 vnc-rh212985.patch diff --git a/vnc-rh212985.patch b/vnc-rh212985.patch new file mode 100644 index 0000000..fa45c6b --- /dev/null +++ b/vnc-rh212985.patch @@ -0,0 +1,33 @@ +diff -up vnc-4_1_2-unixsrc/unix/vncserver.rh212985 vnc-4_1_2-unixsrc/unix/vncserver +--- vnc-4_1_2-unixsrc/unix/vncserver.rh212985 2008-07-16 13:55:29.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/vncserver 2008-07-16 14:17:53.000000000 +0200 +@@ -168,11 +168,25 @@ $cmd .= " >> " . "edString($desktopL + # Run $cmd and record the process ID. + + $pidFile = "$vncUserDir/$host:$displayNumber.pid"; +-system("$cmd & echo \$! >$pidFile"); ++system( ++"rm -f $pidFile ++ $cmd & ++ PID_TEMP=\$! ++ PID_NUM=\$PID_TEMP ++ ++ # Give Xvnc a chance to start up ++ ++ sleep 3; ++ ++ if ps -p \$PID_NUM -o comm= | grep -q Xvnc; then ++ echo \$PID_NUM > $pidFile ++ fi" ++); + +-# Give Xvnc a chance to start up +- +-sleep(3); ++if (!(-e "$pidFile")) { ++ warn "Unable to start Xvnc, exiting\n"; ++ exit; ++} + + warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n"; + diff --git a/vnc.spec b/vnc.spec index 7e2fc9a..dfe50d9 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 33.1%{?dist} +Release: 34%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -46,6 +46,7 @@ Patch50: vnc-scrollbars.patch Patch51: vnc-bounds.patch Patch52: vnc-includes.patch Patch53: vnc-viewerIPv6.patch +Patch54: vnc-rh212985.patch License: GPLv2 Group: User Interface/Desktops @@ -141,6 +142,7 @@ popd %patch51 -p1 -b .bounds %patch52 -p1 -b .includes %patch53 -p1 -b .ipv6 +%patch54 -p1 -b .rh212985 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" @@ -330,6 +332,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Thu Jul 17 2008 Adam Tkac 4.1.2-34 +- vncserver script returns error when Xvnc fails to start + * Wed Jul 16 2008 Adam Tkac 4.1.2-33.1 - update patches due rpm 4.6 From 8a31d5ffd96b24b7e5ae0cd0f043ad62d21e9eb3 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 18 Jul 2008 10:12:36 +0000 Subject: [PATCH 32/38] - fixed buildroot --- vnc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vnc.spec b/vnc.spec index dfe50d9..ca89299 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 34%{?dist} +Release: 34.1%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -50,7 +50,7 @@ Patch54: vnc-rh212985.patch License: GPLv2 Group: User Interface/Desktops -BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl, openssl-devel, libpciaccess-devel BuildRequires: zlib-devel libjpeg-devel BuildRequires: desktop-file-utils >= 0.2.92 @@ -332,6 +332,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Fri Jul 18 2008 Adam Tkac 4.1.2-34.1 +- fixed buildroot + * Thu Jul 17 2008 Adam Tkac 4.1.2-34 - vncserver script returns error when Xvnc fails to start From a8f1d3813e128c4b7380a15463fbcbaceb76cf5b Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 18 Jul 2008 10:22:23 +0000 Subject: [PATCH 33/38] - removed buildroot variable (no longer needed) --- vnc.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vnc.spec b/vnc.spec index ca89299..31aa7e9 100644 --- a/vnc.spec +++ b/vnc.spec @@ -50,7 +50,6 @@ Patch54: vnc-rh212985.patch License: GPLv2 Group: User Interface/Desktops -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl, openssl-devel, libpciaccess-devel BuildRequires: zlib-devel libjpeg-devel BuildRequires: desktop-file-utils >= 0.2.92 @@ -333,7 +332,7 @@ fi %changelog * Fri Jul 18 2008 Adam Tkac 4.1.2-34.1 -- fixed buildroot +- removed buildroot * Thu Jul 17 2008 Adam Tkac 4.1.2-34 - vncserver script returns error when Xvnc fails to start From b61ae5f2e4b8bb56177c8d832f3d0e40a644db26 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 28 Jul 2008 14:19:38 +0000 Subject: [PATCH 34/38] - removed initscript %%config attribute --- vnc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vnc.spec b/vnc.spec index 31aa7e9..4c7be35 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 34.1%{?dist} +Release: 34.2%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -312,7 +312,7 @@ fi %files server %defattr(-,root,root) -%attr(0755,root,root) %config /etc/rc.d/init.d/vncserver +%attr(0755,root,root) /etc/rc.d/init.d/vncserver %config(noreplace) /etc/sysconfig/vncservers %{_bindir}/Xvnc %{_bindir}/vncpasswd @@ -331,6 +331,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Mon Jul 28 2008 Adam Tkac 4.1.2-34.2 +- removed initscript %%config attribute + * Fri Jul 18 2008 Adam Tkac 4.1.2-34.1 - removed buildroot From f4c02036e402cff6356cc7ecfa58c139dcfa709f Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 3 Oct 2008 12:51:55 +0000 Subject: [PATCH 35/38] - updated patches due rpm 4.6 (#465099) - build with -O2 --- vnc-xorg.patch | 24 ++++++++++++++---------- vnc.spec | 15 ++++++++++----- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/vnc-xorg.patch b/vnc-xorg.patch index 5d50bc8..ead9870 100644 --- a/vnc-xorg.patch +++ b/vnc-xorg.patch @@ -1,25 +1,29 @@ diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc 2008-07-16 13:33:14.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-07-16 13:33:50.000000000 +0200 -@@ -29,7 +29,6 @@ AC_PREREQ(2.57) - AC_INIT([xorg-server], 1.4.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc 2008-10-03 14:27:43.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-10-03 14:29:10.000000000 +0200 +@@ -30,7 +30,6 @@ AC_INIT([xorg-server], 1.5.1, [https://b + RELEASE_DATE="23 September 2008" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) -AM_MAINTAINER_MODE dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. -@@ -1212,6 +1211,9 @@ if test "x$XVFB" = xyes; then +@@ -1214,6 +1213,13 @@ if test "x$XVFB" = xyes; then AC_SUBST([XVFB_SYS_LIBS]) fi ++dnl Xvnc DDX ++AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) ++AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) ++ +dnl Xvnc DDX +AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) +AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) dnl Xnest DDX -@@ -2176,6 +2178,7 @@ hw/dmx/input/Makefile +@@ -2178,6 +2184,7 @@ hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile @@ -28,8 +32,8 @@ diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc vnc-4_1_ hw/xgl/egl/Makefile hw/xgl/egl/module/Makefile diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc 2008-07-16 13:33:14.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2008-07-16 13:33:15.000000000 +0200 +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc 2008-10-03 14:27:44.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2008-10-03 14:27:47.000000000 +0200 @@ -43,7 +43,8 @@ SUBDIRS = \ $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ @@ -41,8 +45,8 @@ diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc vnc-4_ DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc 2008-07-16 13:33:14.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2008-07-16 13:33:15.000000000 +0200 +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc 2008-10-03 14:27:44.000000000 +0200 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2008-10-03 14:27:47.000000000 +0200 @@ -292,6 +292,7 @@ extern void BigReqExtensionInit(INITARGS #ifdef MITMISC extern void MITMiscExtensionInit(INITARGS); diff --git a/vnc.spec b/vnc.spec index 4c7be35..3570c82 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 34.2%{?dist} +Release: 35%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -144,7 +144,7 @@ popd %patch54 -p1 -b .rh212985 %build -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0" +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" export CXXFLAGS="$CFLAGS" pushd common @@ -169,7 +169,7 @@ autoreconf -fiv --disable-xprint \ --disable-static \ --disable-composite \ - --enable-xtrap \ + --disable-xtrap \ --enable-xcsecurity \ --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ --with-fontdir=%{_datadir}/X11/fonts \ @@ -179,10 +179,11 @@ autoreconf -fiv --with-rgb-path=%{_datadir}/X11/rgb \ --enable-install-libxf86config \ --disable-xevie \ - --disable-dri \ + --disable-dri2 \ --enable-glx \ --disable-config-dbus \ - --disable-config-hal + --disable-config-hal \ + --with-dri-driver-path=%{_libdir}/dri make %{?_smp_mflags} popd @@ -331,6 +332,10 @@ fi %{_libdir}/librfb.so.* %changelog +* Fri Oct 03 2008 Adam Tkac 4.1.2-35 +- updated patches due rpm 4.6 (#465099) +- build with -O2 + * Mon Jul 28 2008 Adam Tkac 4.1.2-34.2 - removed initscript %%config attribute From 4bc6843466f295493675c1e09e050d096e190817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Sun, 18 Jan 2009 15:03:56 +0000 Subject: [PATCH 36/38] - rebuild with new openssl --- vnc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vnc.spec b/vnc.spec index 3570c82..2f7b8c5 100644 --- a/vnc.spec +++ b/vnc.spec @@ -3,7 +3,7 @@ Summary: A remote display system Name: vnc Version: 4.1.2 -Release: 35%{?dist} +Release: 36%{?dist} URL: http://www.realvnc.com Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz Source1: Makefile.am @@ -332,6 +332,9 @@ fi %{_libdir}/librfb.so.* %changelog +* Sun Jan 18 2009 Tomas Mraz 4.1.2-36 +- rebuild with new openssl + * Fri Oct 03 2008 Adam Tkac 4.1.2-35 - updated patches due rpm 4.6 (#465099) - build with -O2 From 34b4cf53555bb1bf2259e5a7565da39b710b53fc Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 21 Jan 2009 19:02:02 +0000 Subject: [PATCH 37/38] vnc has been retired in favor of tightvnc --- Makefile | 21 - Makefile.am | 60 --- dead.package | 2 + sources | 1 - vnc-102434.patch | 61 --- vnc-16x16.png | Bin 416 -> 0 bytes vnc-24bit.patch | 42 -- vnc-24x24.png | Bin 505 -> 0 bytes vnc-48x48.png | Bin 819 -> 0 bytes vnc-64bit.patch | 39 -- vnc-allocate.patch | 28 -- vnc-always_use_fb.patch | 210 --------- vnc-authentication.patch | 18 - vnc-autotools-compile.patch | 11 - vnc-autotools.patch | 418 ----------------- vnc-bounds.patch | 55 --- vnc-clipboard.patch | 18 - vnc-config.patch | 18 - vnc-cookie.patch | 27 -- vnc-gcc4.patch | 11 - vnc-gcc43.patch | 35 -- vnc-idle.patch | 11 - vnc-includes.patch | 41 -- vnc-manminor.patch | 25 -- vnc-mieq.patch | 690 ---------------------------- vnc-modular-xorg.patch | 41 -- vnc-newfbsize.patch | 11 - vnc-nohttpd.patch | 55 --- vnc-noxorg.patch | 24 - vnc-paint.patch | 109 ----- vnc-privates.patch | 132 ------ vnc-render.patch | 224 --------- vnc-restart.patch | 21 - vnc-rh212985.patch | 33 -- vnc-scrollbars.patch | 69 --- vnc-select.patch | 10 - vnc-selections.patch | 78 ---- vnc-use-fb.patch | 87 ---- vnc-via.patch | 190 -------- vnc-viewer-reparent.patch | 115 ----- vnc-viewerIPv6.patch | 192 -------- vnc-vncpasswd.patch | 22 - vnc-vsnprintf.patch | 20 - vnc-xclients.patch | 13 - vnc-xorg.patch | 65 --- vnc.spec | 872 ------------------------------------ vncserver.init | 125 ------ 47 files changed, 2 insertions(+), 4348 deletions(-) delete mode 100644 Makefile delete mode 100644 Makefile.am create mode 100644 dead.package delete mode 100644 sources delete mode 100644 vnc-102434.patch delete mode 100644 vnc-16x16.png delete mode 100644 vnc-24bit.patch delete mode 100644 vnc-24x24.png delete mode 100644 vnc-48x48.png delete mode 100644 vnc-64bit.patch delete mode 100644 vnc-allocate.patch delete mode 100644 vnc-always_use_fb.patch delete mode 100644 vnc-authentication.patch delete mode 100644 vnc-autotools-compile.patch delete mode 100644 vnc-autotools.patch delete mode 100644 vnc-bounds.patch delete mode 100644 vnc-clipboard.patch delete mode 100644 vnc-config.patch delete mode 100644 vnc-cookie.patch delete mode 100644 vnc-gcc4.patch delete mode 100644 vnc-gcc43.patch delete mode 100644 vnc-idle.patch delete mode 100644 vnc-includes.patch delete mode 100644 vnc-manminor.patch delete mode 100644 vnc-mieq.patch delete mode 100644 vnc-modular-xorg.patch delete mode 100644 vnc-newfbsize.patch delete mode 100644 vnc-nohttpd.patch delete mode 100644 vnc-noxorg.patch delete mode 100644 vnc-paint.patch delete mode 100644 vnc-privates.patch delete mode 100644 vnc-render.patch delete mode 100644 vnc-restart.patch delete mode 100644 vnc-rh212985.patch delete mode 100644 vnc-scrollbars.patch delete mode 100644 vnc-select.patch delete mode 100644 vnc-selections.patch delete mode 100644 vnc-use-fb.patch delete mode 100644 vnc-via.patch delete mode 100644 vnc-viewer-reparent.patch delete mode 100644 vnc-viewerIPv6.patch delete mode 100644 vnc-vncpasswd.patch delete mode 100644 vnc-vsnprintf.patch delete mode 100644 vnc-xclients.patch delete mode 100644 vnc-xorg.patch delete mode 100644 vnc.spec delete mode 100755 vncserver.init diff --git a/Makefile b/Makefile deleted file mode 100644 index b1cbf0f..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vnc -# $Id: Makefile,v 1.1 2004/09/09 14:02:00 cvsdist Exp $ -NAME := vnc -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index e310ac9..0000000 --- a/Makefile.am +++ /dev/null @@ -1,60 +0,0 @@ -LIB_DIR=$(top_srcdir)/../../common -BIN_DIR=$(top_srcdir)/.. - -RFB_LIBS=$(LIB_DIR)/rfb/librfb.la - -noinst_LTLIBRARIES = libvnccommon.la - -libvnccommon_la_SOURCES = vncExtInit.cc vncHooks.cc XserverDesktop.cc - -libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ - -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \ - -I$(BIN_DIR)/vncconfig -DGC_HAS_COMPOSITE_CLIP $(XVNC_CPPFLAGS) \ - -I$(includedir)/pixman-1 - -bin_PROGRAMS = Xvnc - -Xvnc_SOURCES = xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap_mi.c - -nodist_Xvnc_SOURCES = fbrop.h fb.h pixman.h - -Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \ - -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ - -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \ - -I$(top_srcdir)/include -I$(includedir)/pixman-1 - -Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \ - $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11 - -Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) - -libvnc_la_LTLIBRARIES = libvnc.la -libvnc_ladir = $(moduledir)/extensions - -libvnc_la_SOURCES = xf86vncModule.cc - -libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(LIB_DIR) \ - -I$(top_srcdir)/hw/xfree86/common \ - -I$(top_srcdir)/hw/xfree86/os-support \ - -I$(top_srcdir)/hw/xfree86/os-support/bus \ - -DXFree86Module -DXFree86LOADER -DIN_MODULE \ - -I$(includedir)/pixman-1 - -libvnc_la_LDFLAGS = -module -avoid-version - -libvnc_la_LIBADD = libvnccommon.la $(RFB_LIBS) - -# C++ hacks -BUILT_SOURCES = $(nodist_Xvnc_SOURCES) - -fb.h: $(top_srcdir)/fb/fb.h - cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h - -pixman.h: $(includedir)/pixman-1/pixman.h - cat $(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h - -fbrop.h: $(top_srcdir)/fb/fbrop.h - cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..aaf29be --- /dev/null +++ b/dead.package @@ -0,0 +1,2 @@ +RealVNC has been replaced by TightVNC. Checkout "tightvnc" module if you want +current Fedora source. diff --git a/sources b/sources deleted file mode 100644 index 665d952..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -cf9a6fe8f592286b5e0fdde686504ffb vnc-4_1_2-unixsrc.tar.gz diff --git a/vnc-102434.patch b/vnc-102434.patch deleted file mode 100644 index 0272ac2..0000000 --- a/vnc-102434.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.102434 2006-12-01 13:37:27.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx 2006-12-01 13:37:27.000000000 +0100 -@@ -52,6 +52,7 @@ - "manager decoration around a window", 24); - StringParameter passwordFile("PasswordFile", - "Password file for VNC authentication", ""); -+BoolParameter passwdInput("passwdInput", "Gets password from stdin", false); - AliasParameter rfbauth("passwd", "Alias for PasswordFile", &passwordFile); - - BoolParameter useLocalCursor("UseLocalCursor", ---- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.102434 2006-12-01 13:37:27.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2006-12-01 13:37:27.000000000 +0100 -@@ -108,6 +108,11 @@ - "~/.vnc/passwd". - - .TP -+.B \-passwdInput \fItrue, false\fP -+Force standard vnc dialog to getting password and reads password from stdin. -+Default is false(shows dialog window) -+ -+.TP - .B \-Shared - When you make a connection to a VNC server, all other existing connections are - normally closed. This option requests that they be left open, allowing you to ---- vnc-4_1_2-unixsrc/unix/vncviewer/parameters.h.102434 2006-12-01 13:37:27.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/parameters.h 2006-12-01 13:37:27.000000000 +0100 -@@ -38,6 +38,7 @@ - extern rfb::BoolParameter fullScreen; - extern rfb::StringParameter geometry; - extern rfb::StringParameter embedParent; -+extern rfb::BoolParameter passwdInput; - - extern char aboutText[]; - extern char* programName; ---- vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx.102434 2006-12-01 13:37:27.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx 2006-12-01 13:41:42.000000000 +0100 -@@ -37,6 +37,8 @@ - #include "ServerDialog.h" - #include "PasswdDialog.h" - #include "parameters.h" -+#include -+#include - - using namespace rfb; - -@@ -206,6 +208,15 @@ - return; - } - -+ if(passwdInput) -+ { -+ std::string s; -+ std::cin >> s; -+ *password = strdup(s.c_str()); -+ if(user) *user = 0; -+ return; -+ } -+ - const char* secType = secTypeName(getCurrentCSecurity()->getType()); - const char* titlePrefix = "VNC Authentication"; - CharArray title(strlen(titlePrefix) + strlen(secType) + 4); diff --git a/vnc-16x16.png b/vnc-16x16.png deleted file mode 100644 index 37efe6d41cf4504d162d535bba80dd29b1c3833c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmV;R0bl-!P)WFU8GbZ8({Xk{QrNlj4iWF>9@009I^L_t(|+QpN-jlw_> zg+EplKnG_k03n3P&JnRoa0xEKNEG0Z3}^uDRd99(M+cA-m>eOJx7Ns*pX^4mc4uby z&GVZb_;2fddeALyo$)?^+q+-+DR46RFJKG6nnd{oD1idFI2}9!F_5(iq>9&o*QE%^ z2GiE+Uy5t?+a~}ao=dBsS>AL( zRw)qy8(<*60=S;%CGe+su%&A;@-OIn0fx@RZ3cmE*6~}Yaslif9+I(xXpU9wU~;v< zYkdHf>kzguqFKwNk5@a(W)|Guy`6>YY8tlRR``#G={A`?&D{YK96i-1fm2BU0000< KMNUMnLSTYa*`!ne diff --git a/vnc-24bit.patch b/vnc-24bit.patch deleted file mode 100644 index 549cf25..0000000 --- a/vnc-24bit.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.24bit 2007-06-07 17:27:46.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-06-07 17:29:01.000000000 +0200 -@@ -762,7 +762,7 @@ static Bool vfbScreenInit(int index, Scr - - miSetPixmapDepths(); - -- switch (pvfb->bitsPerPixel) -+ switch (pvfb->depth) - { - case 8: - miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0); -@@ -771,6 +771,9 @@ static Bool vfbScreenInit(int index, Scr - case 16: - miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f); - break; -+ case 24: -+ miSetVisualTypesAndMasks (24, 1 << TrueColor, 8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff); -+ break; - case 32: - miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00); - break; -@@ -778,15 +781,17 @@ static Bool vfbScreenInit(int index, Scr - return FALSE; - } - -- if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -- dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) -- return FALSE; -+ ret =fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel); - - #ifdef RENDER - if (ret && Render) - fbPictureInit(pScreen, 0, 0); - #endif /* RENDER */ - -+ if (!ret) -+ return FALSE; -+ - pScreen->InstallColormap = vfbInstallColormap; - pScreen->UninstallColormap = vfbUninstallColormap; - pScreen->ListInstalledColormaps = vfbListInstalledColormaps; diff --git a/vnc-24x24.png b/vnc-24x24.png deleted file mode 100644 index dadbb794571e9bfd0a5a2b24b777709d98ba4e80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmVWFU8GbZ8({Xk{QrNlj4iWF>9@00CV|L_t(|+Rc?cPQySD zg`chT;Q}bWL0r&>iq^gXK7x-xK~E%_6e+?5kbMMBKym`xH;8*gXvWslW7jc8L5#H0 zdOVtM{&qLOFC@JCJZm!xU&HBy&4?gyVfhn40^mezK4AYucJHQ3092%}OxFWS05v&D z2LSwUZH@{65$Pk-t++(R2*6St6$Sx-z5R=9-v!VEb^=&9069Cqe%^q9DS*aSX1bUG zhY@8;CHk1Y8`>XyQ^Z+h;yeLxW&5L)bo7`qAeJ&|^z9TtLk;3A<_^H*gXStzD&;9@ za&B#@^!k|tu%>xlO7wjIRl9A0?Hho5(?H-D)I`;YM!Wc=Lar%!|qw9f4XzM{PH?00000NkvXXu0mjfl5)<9 diff --git a/vnc-48x48.png b/vnc-48x48.png deleted file mode 100644 index 1e9ef452e6edf01bd5e438be69f415bf51e0bf16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 819 zcmV-31I+x1P)WFU8GbZ8({Xk{QrNlj4iWF>9@00NguL_t(|+U=Mza@#Nv zMV~q8rJR7gfs~o_mQNt&1mY2r6U3fLAEk3=<^mq6b)~c^66*%k4ai>ONdsmu$N~gF zQYp->Admv~FaGX+5GI>!vdJcU&2|NlJSJ;kCp>=!-bJoG18QNu1~Q=G{@l)80|k%+ zbM4&&Py*le1zw(#zvFhaw`{fq(ntV>Wqt=V+V8K*(ZX;ZV5I>3w)v50<1)~ZcmVfj zRP-N!j~;6+6&un^0Z7%R5`Fe+{MoU##D=-#qYmH*RKg!KU=au)chINJ4>R(WqRbWW zR_%KbD7CQxz>>%@r(mPSRs%RUBEABCXmcmvMgWn!0Bi#zD%nCs4Uv`4pz zjD9(mlt=p)?l(YILoygVhJ0t0>1b)j+9^{$IfY7v385@r9``OABo z1o3K?$*-Sxz9+C(&Sio=U#K?Um;2Yit*LQ3?9L~NeHCia1HeY{do@NC@@ZA z9|GVMaI8MO&W4g3Nx-}1!0(N&g<>3wy|`qT0MK~kf^YOqZFB38>4O1aKmet10teNV z2k!$WfZB3#u_;emQP>)vOqSZo9DK!HD1gSHP(yWptACaO{iQdBY#p?UsN;=twAY0v x2Eb9BK&?5SNABMMA2c8}lT9|+WRqRe{s0EFoFTl7a`gZJ002ovPDHLkV1ifJV?6)> diff --git a/vnc-64bit.patch b/vnc-64bit.patch deleted file mode 100644 index 34b2d6d..0000000 --- a/vnc-64bit.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.h.64bit 2005-03-11 15:08:41.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.h 2005-12-06 14:31:11.000000000 +0000 -@@ -29,6 +29,8 @@ - #include - #include - -+#include "xorg-server.h" -+ - extern "C" { - #define class c_class; - #include ---- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.64bit 2005-12-06 14:31:24.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2005-12-06 14:31:30.000000000 +0000 -@@ -973,25 +973,6 @@ - - } /* end InitOutput */ - --#ifdef DPMSExtension --extern "C" { --#if NeedFunctionPrototypes -- void DPMSSet(CARD16 level) --#else -- void DPMSSet(level) -- CARD16 level; --#endif -- { -- return; -- } -- -- Bool DPMSSupported() -- { -- return FALSE; -- } --} --#endif -- - /* this is just to get the server to link on AIX */ - #ifdef AIXV3 - int SelectWaitTime = 10000; /* usec */ diff --git a/vnc-allocate.patch b/vnc-allocate.patch deleted file mode 100644 index 3035e46..0000000 --- a/vnc-allocate.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.allocate vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.allocate 2008-02-25 16:38:37.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-02-25 16:54:48.000000000 +0100 -@@ -536,9 +536,9 @@ static void vfbInstallColormap(ColormapP - swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); - swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); - -- ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel)); -- prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb)); -- defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem)); -+ ppix = (Pixel *)xalloc(entries * sizeof(Pixel)); -+ prgb = (xrgb *)xalloc(entries * sizeof(xrgb)); -+ defs = (xColorItem *)xalloc(entries * sizeof(xColorItem)); - - for (i = 0; i < entries; i++) ppix[i] = i; - /* XXX truecolor */ -@@ -553,9 +553,9 @@ static void vfbInstallColormap(ColormapP - } - (*pmap->pScreen->StoreColors)(pmap, entries, defs); - -- DEALLOCATE_LOCAL(ppix); -- DEALLOCATE_LOCAL(prgb); -- DEALLOCATE_LOCAL(defs); -+ xfree(ppix); -+ xfree(prgb); -+ xfree(defs); - } - } diff --git a/vnc-always_use_fb.patch b/vnc-always_use_fb.patch deleted file mode 100644 index b9e49d0..0000000 --- a/vnc-always_use_fb.patch +++ /dev/null @@ -1,210 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.always_use_fb 2007-03-05 14:03:21.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-03-05 14:10:57.000000000 +0100 -@@ -33,27 +33,28 @@ - #include - #include "vncExtInit.h" - -+#ifdef HAVE_DIX_CONFIG_H -+#include -+#endif -+ - extern "C" { - #define class c_class - #define public c_public -+#define new c_new - #ifdef WIN32 - #include - #endif - #include --#include "X11/X.h" -+#include - #define NEED_EVENTS --#include "X11/Xproto.h" --#include "X11/Xos.h" -+#include -+#include - #include "scrnintstr.h" - #include "servermd.h" --#ifdef VNC_USE_FB - #include "fb.h" --#else --#define PSZ 8 --#include "cfb.h" --#endif - #include "mi.h" --#include "mibstore.h" -+#include "micmap.h" -+#include "miline.h" - #include "colormapst.h" - #include "gcstruct.h" - #include "input.h" -@@ -66,24 +67,12 @@ - #endif - #include - #include "dix.h" --#include "miline.h" - #include "inputstr.h" - #include "keysym.h" - extern int defaultColorVisualClass; -+#undef new - #undef class - #undef public --#ifndef VNC_USE_FB -- extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int); -- extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int); -- extern Bool cfb16CreateGC(GCPtr); -- extern Bool cfb32CreateGC(GCPtr); -- extern void cfb16GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*); -- extern void cfb32GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*); -- extern void cfb16GetImage(DrawablePtr, int, int, int, int, unsigned int, -- unsigned long, char*); -- extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int, -- unsigned long, char*); --#endif - } - - #define XVNCVERSION "Free Edition 4.1.2" -@@ -502,67 +491,6 @@ - } - #endif - --#ifndef VNC_USE_FB --static Bool vfbMultiDepthCreateGC(GCPtr pGC) --{ -- switch (vfbBitsPerPixel(pGC->depth)) -- { -- case 1: return mfbCreateGC (pGC); -- case 8: return cfbCreateGC (pGC); -- case 16: return cfb16CreateGC (pGC); -- case 32: return cfb32CreateGC (pGC); -- default: return FALSE; -- } --} -- --static void vfbMultiDepthGetSpans( -- DrawablePtr pDrawable, /* drawable from which to get bits */ -- int wMax, /* largest value of all *pwidths */ -- register DDXPointPtr ppt, /* points to start copying from */ -- int *pwidth, /* list of number of bits to copy */ -- int nspans, /* number of scanlines to copy */ -- char *pdstStart) /* where to put the bits */ --{ -- switch (pDrawable->bitsPerPixel) { -- case 1: -- mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); -- break; -- case 8: -- cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); -- break; -- case 16: -- cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); -- break; -- case 32: -- cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); -- break; -- } -- return; --} -- --static void --vfbMultiDepthGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, -- unsigned int format, unsigned long planeMask, -- char *pdstLine) --{ -- switch (pDrawable->bitsPerPixel) -- { -- case 1: -- mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); -- break; -- case 8: -- cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); -- break; -- case 16: -- cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); -- break; -- case 32: -- cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); -- break; -- } --} --#endif -- - static ColormapPtr InstalledMaps[MAXSCREENS]; - - static int vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) -@@ -832,44 +760,32 @@ - defaultColorVisualClass - = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor; - --#ifdef VNC_USE_FB -- if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -- dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) -- return FALSE; -+ miSetPixmapDepths(); - --#ifdef RENDER -- if (ret && Render) -- fbPictureInit(pScreen, 0, 0); --#endif /* RENDER */ --#else /* VNC_USE_FB */ - switch (pvfb->bitsPerPixel) - { -- case 1: -- ret = mfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -- dpi, dpi, pvfb->paddedWidth); -- break; - case 8: -- ret = cfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -- dpi, dpi, pvfb->paddedWidth); -+ miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0); -+ - break; - case 16: -- ret = cfb16ScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -- dpi, dpi, pvfb->paddedWidth); -+ miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f); - break; - case 32: -- ret = cfb32ScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -- dpi, dpi, pvfb->paddedWidth); -+ miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00); - break; - default: - return FALSE; - } - -- if (!ret) return FALSE; -+ if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) -+ return FALSE; - -- pScreen->CreateGC = vfbMultiDepthCreateGC; -- pScreen->GetImage = vfbMultiDepthGetImage; -- pScreen->GetSpans = vfbMultiDepthGetSpans; --#endif -+#ifdef RENDER -+ if (ret && Render) -+ fbPictureInit(pScreen, 0, 0); -+#endif /* RENDER */ - - pScreen->InstallColormap = vfbInstallColormap; - pScreen->UninstallColormap = vfbUninstallColormap; -@@ -915,18 +831,7 @@ - } - } - --#ifdef VNC_USE_FB - ret = fbCreateDefColormap(pScreen); --#else -- if (pvfb->bitsPerPixel == 1) -- { -- ret = mfbCreateDefColormap(pScreen); -- } -- else -- { -- ret = cfbCreateDefColormap(pScreen); -- } --#endif - - miSetZeroLineBias(pScreen, pvfb->lineBias); - diff --git a/vnc-authentication.patch b/vnc-authentication.patch deleted file mode 100644 index 2bbaf3d..0000000 --- a/vnc-authentication.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- vnc-4_1_1-unixsrc/common/rfb/SConnection.cxx.authentication 2005-03-11 16:08:41.000000000 +0100 -+++ vnc-4_1_1-unixsrc/common/rfb/SConnection.cxx 2006-05-17 16:15:54.000000000 +0200 -@@ -181,6 +181,15 @@ - vlog.info("Client requests security type %s(%d)", - secTypeName(secType),secType); - -+ // Verify that the requested security type should be offered -+ std::list secTypes; -+ std::list::iterator i; -+ securityFactory->getSecTypes(&secTypes, reverseConnection); -+ for (i=secTypes.begin(); i!=secTypes.end(); i++) -+ if (*i == secType) break; -+ if (i == secTypes.end()) -+ throw Exception("Requested security type not available"); -+ - try { - state_ = RFBSTATE_SECURITY; - security = securityFactory->getSSecurity(secType, reverseConnection); diff --git a/vnc-autotools-compile.patch b/vnc-autotools-compile.patch deleted file mode 100644 index 523d878..0000000 --- a/vnc-autotools-compile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.autotools-compile 2007-02-15 18:56:52.000000000 +0100 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2007-02-15 18:57:21.000000000 +0100 -@@ -42,7 +42,7 @@ - #include - - #ifndef VNC_SOCKLEN_T --#define VNC_SOCKLEN_T int -+#define VNC_SOCKLEN_T socklen_t - #endif - - #ifndef INADDR_NONE diff --git a/vnc-autotools.patch b/vnc-autotools.patch deleted file mode 100644 index ab598f3..0000000 --- a/vnc-autotools.patch +++ /dev/null @@ -1,418 +0,0 @@ ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/common/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,5 @@ -+SUBDIRS = \ -+ rdr \ -+ network \ -+ Xregion \ -+ rfb ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/common/rfb/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,136 @@ -+lib_LTLIBRARIES = librfb.la -+ -+librfb_la_SOURCES = \ -+ Blacklist.cxx \ -+ Blacklist.h \ -+ CConnection.cxx \ -+ CConnection.h \ -+ CMsgHandler.cxx \ -+ CMsgHandler.h \ -+ CMsgReader.cxx \ -+ CMsgReader.h \ -+ CMsgReaderV3.cxx \ -+ CMsgReaderV3.h \ -+ CMsgWriter.cxx \ -+ CMsgWriter.h \ -+ CMsgWriterV3.cxx \ -+ CMsgWriterV3.h \ -+ ColourCube.h \ -+ ColourMap.h \ -+ ComparingUpdateTracker.cxx \ -+ ComparingUpdateTracker.h \ -+ Configuration.cxx \ -+ Configuration.h \ -+ ConnParams.cxx \ -+ ConnParams.h \ -+ CSecurity.h \ -+ CSecurityNone.h \ -+ CSecurityVncAuth.cxx \ -+ CSecurityVncAuth.h \ -+ Cursor.cxx \ -+ Cursor.h \ -+ Decoder.cxx \ -+ Decoder.h \ -+ d3des.c \ -+ d3des.h \ -+ Encoder.cxx \ -+ Encoder.h \ -+ encodings.cxx \ -+ encodings.h \ -+ Exception.h \ -+ hextileConstants.h \ -+ hextileDecode.h \ -+ HextileDecoder.cxx \ -+ HextileDecoder.h \ -+ hextileEncode.h \ -+ HextileEncoder.cxx \ -+ HextileEncoder.h \ -+ Hostname.h \ -+ HTTPServer.cxx \ -+ HTTPServer.h \ -+ ImageGetter.h \ -+ InputHandler.h \ -+ KeyRemapper.cxx \ -+ KeyRemapper.h \ -+ keysymdef.h \ -+ Logger.cxx \ -+ Logger_file.cxx \ -+ Logger_file.h \ -+ Logger.h \ -+ Logger_stdio.cxx \ -+ Logger_stdio.h \ -+ LogWriter.cxx \ -+ LogWriter.h \ -+ msgTypes.h \ -+ Password.cxx \ -+ Password.h \ -+ PixelBuffer.cxx \ -+ PixelBuffer.h \ -+ PixelFormat.cxx \ -+ PixelFormat.h \ -+ Pixel.h \ -+ RawDecoder.cxx \ -+ RawDecoder.h \ -+ RawEncoder.cxx \ -+ RawEncoder.h \ -+ Rect.h \ -+ Region.cxx \ -+ Region.h \ -+ rreDecode.h \ -+ RREDecoder.cxx \ -+ RREDecoder.h \ -+ rreEncode.h \ -+ RREEncoder.cxx \ -+ RREEncoder.h \ -+ SConnection.cxx \ -+ SConnection.h \ -+ SDesktop.h \ -+ secTypes.cxx \ -+ secTypes.h \ -+ ServerCore.cxx \ -+ ServerCore.h \ -+ SMsgHandler.cxx \ -+ SMsgHandler.h \ -+ SMsgReader.cxx \ -+ SMsgReader.h \ -+ SMsgReaderV3.cxx \ -+ SMsgReaderV3.h \ -+ SMsgWriter.cxx \ -+ SMsgWriter.h \ -+ SMsgWriterV3.cxx \ -+ SMsgWriterV3.h \ -+ SSecurityFactoryStandard.cxx \ -+ SSecurityFactoryStandard.h \ -+ SSecurity.h \ -+ SSecurityNone.h \ -+ SSecurityVncAuth.cxx \ -+ SSecurityVncAuth.h \ -+ Threading.h \ -+ Timer.cxx \ -+ Timer.h \ -+ TransImageGetter.cxx \ -+ TransImageGetter.h \ -+ transInitTempl.h \ -+ transTempl.h \ -+ TrueColourMap.h \ -+ UpdateTracker.cxx \ -+ UpdateTracker.h \ -+ UserPasswdGetter.h \ -+ util.cxx \ -+ util.h \ -+ VNCSConnectionST.cxx \ -+ VNCSConnectionST.h \ -+ VNCServer.h \ -+ VNCServerST.cxx \ -+ VNCServerST.h \ -+ zrleDecode.h \ -+ ZRLEDecoder.cxx \ -+ ZRLEDecoder.h \ -+ zrleEncode.h \ -+ ZRLEEncoder.cxx \ -+ ZRLEEncoder.h -+ -+librfb_la_LIBADD = \ -+ $(top_srcdir)/network/libnetwork.la \ -+ $(top_srcdir)/rdr/librdr.la \ -+ $(top_srcdir)/Xregion/libXregion.la ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/common/rdr/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,30 @@ -+noinst_LTLIBRARIES = librdr.la -+ -+librdr_la_SOURCES = \ -+ Exception.cxx \ -+ FdInStream.h \ -+ FixedMemOutStream.h \ -+ HexOutStream.cxx \ -+ InStream.h \ -+ OutStream.h \ -+ SubstitutingInStream.h \ -+ ZlibInStream.h \ -+ Exception.h \ -+ FdOutStream.cxx \ -+ HexInStream.cxx \ -+ HexOutStream.h \ -+ MemInStream.h \ -+ RandomStream.cxx \ -+ types.h \ -+ ZlibOutStream.cxx \ -+ FdInStream.cxx \ -+ FdOutStream.h \ -+ HexInStream.h \ -+ InStream.cxx \ -+ MemOutStream.h \ -+ RandomStream.h \ -+ ZlibInStream.cxx \ -+ ZlibOutStream.h -+ -+librdr_la_LIBADD = \ -+ -lz ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/common/configure.ac 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,42 @@ -+# -*- Autoconf -*- -+# Process this file with autoconf to produce a configure script. -+ -+AC_PREREQ(2.61) -+AC_INIT([vnc-libs], 4.1.2, [bugzilla.redhat.com]) -+AC_CONFIG_HEADER([config.h]) -+AM_INIT_AUTOMAKE([-Wall -Werror foreign]) -+ -+# Checks for programs. -+AC_PROG_CXX -+AC_PROG_CC -+AC_PROG_LIBTOOL -+ -+# Checks for libraries. -+ -+# Checks for header files. -+AC_HEADER_STDC -+AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h unistd.h]) -+ -+# Checks for typedefs, structures, and compiler characteristics. -+AC_HEADER_STDBOOL -+AC_C_CONST -+AC_C_INLINE -+AC_TYPE_SIZE_T -+AC_HEADER_TIME -+AC_STRUCT_TM -+ -+# Checks for library functions. -+AC_FUNC_ERROR_AT_LINE -+AC_FUNC_MEMCMP -+AC_FUNC_SELECT_ARGTYPES -+AC_TYPE_SIGNAL -+AC_FUNC_STRFTIME -+AC_FUNC_VPRINTF -+AC_CHECK_FUNCS([ftime gethostbyname getpass gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strncasecmp]) -+ -+AC_CONFIG_FILES([Makefile -+ Xregion/Makefile -+ network/Makefile -+ rdr/Makefile -+ rfb/Makefile]) -+AC_OUTPUT ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/common/Xregion/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,6 @@ -+noinst_LTLIBRARIES = libXregion.la -+ -+libXregion_la_SOURCES = \ -+ Region.c \ -+ region.h \ -+ Xregion.h ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,6 @@ -+noinst_LTLIBRARIES = libnetwork.la -+ -+libnetwork_la_SOURCES = \ -+ Socket.h \ -+ TcpSocket.cxx \ -+ TcpSocket.h ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,6 @@ -+SUBDIRS = \ -+ tx \ -+ vncpasswd \ -+ vncviewer \ -+ vncconfig \ -+ x0vncserver ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/tx/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,25 @@ -+noinst_LTLIBRARIES = libtx.la -+ -+libtx_la_SOURCES = \ -+ TXButton.h \ -+ TXDialog.h \ -+ TXEntry.h \ -+ TXCheckbox.h \ -+ TXImage.cxx \ -+ TXImage.h \ -+ TXLabel.h \ -+ TXMenu.cxx \ -+ TXMenu.h \ -+ TXMsgBox.h \ -+ TXScrollbar.cxx \ -+ TXScrollbar.h \ -+ TXViewport.cxx \ -+ TXViewport.h \ -+ TXWindow.cxx \ -+ TXWindow.h -+ -+AM_CPPFLAGS = \ -+ -I$(top_srcdir)/../common/ -+ -+libtx_la_LIBADD = \ -+ -lX11 ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncpasswd/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,10 @@ -+bin_PROGRAMS = vncpasswd -+ -+vncpasswd_SOURCES = \ -+ vncpasswd.cxx -+ -+AM_CPPFLAGS = \ -+ -I$(top_srcdir)/../common -+ -+vncpasswd_LDADD = \ -+ $(top_srcdir)/../common/rfb/librfb.la ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncconfig/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,17 @@ -+bin_PROGRAMS = vncconfig -+ -+vncconfig_SOURCES = \ -+ buildtime.c \ -+ QueryConnectDialog.cxx \ -+ QueryConnectDialog.h \ -+ vncconfig.cxx \ -+ vncExt.c \ -+ vncExt.h -+ -+AM_CPPFLAGS = \ -+ -I$(top_srcdir)/../common \ -+ -I$(top_srcdir)/tx -+ -+vncconfig_LDADD = \ -+ $(top_srcdir)/../common/rfb/librfb.la \ -+ $(top_srcdir)/tx/libtx.la ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/configure.ac 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,52 @@ -+# -*- Autoconf -*- -+# Process this file with autoconf to produce a configure script. -+ -+AC_PREREQ(2.61) -+AC_INIT([vnc], 4.1.2, [bugzilla.redhat.com]) -+AC_CONFIG_SRCDIR([x0vncserver/buildtime.c]) -+AC_CONFIG_HEADER([config.h]) -+AM_INIT_AUTOMAKE([-Wall -Werror foreign]) -+ -+# Checks for programs. -+AC_PROG_CXX -+AC_PROG_CC -+AC_PROG_LIBTOOL -+ -+# Checks for libraries. -+ -+# Checks for header files. -+AC_PATH_X -+AC_HEADER_STDC -+AC_HEADER_SYS_WAIT -+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h strings.h sys/time.h termios.h unistd.h]) -+ -+# Checks for typedefs, structures, and compiler characteristics. -+AC_HEADER_STDBOOL -+AC_C_CONST -+AC_C_INLINE -+AC_C_RESTRICT -+AC_TYPE_SIZE_T -+AC_HEADER_TIME -+ -+# Checks for library functions. -+AC_FUNC_ERROR_AT_LINE -+AC_FUNC_FORK -+AC_FUNC_LSTAT -+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK -+AC_FUNC_MALLOC -+AC_FUNC_MEMCMP -+AC_FUNC_REALLOC -+AC_FUNC_SELECT_ARGTYPES -+AC_TYPE_SIGNAL -+AC_FUNC_STAT -+AC_FUNC_VPRINTF -+AC_FUNC_WAIT3 -+AC_CHECK_FUNCS([memset mkdir select setenv strchr strdup strerror strspn strtol]) -+ -+AC_CONFIG_FILES([Makefile -+ tx/Makefile -+ vncconfig/Makefile -+ vncpasswd/Makefile -+ vncviewer/Makefile -+ x0vncserver/Makefile]) -+AC_OUTPUT ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,24 @@ -+bin_PROGRAMS = vncviewer -+ -+vncviewer_SOURCES = \ -+ AboutDialog.h \ -+ buildtime.c \ -+ CConn.cxx \ -+ CConn.h \ -+ DesktopWindow.cxx \ -+ DesktopWindow.h \ -+ InfoDialog.h \ -+ OptionsDialog.h \ -+ parameters.h \ -+ PasswdDialog.h \ -+ ServerDialog.h \ -+ vncviewer.cxx -+ -+AM_CPPFLAGS = \ -+ -I$(top_srcdir)/../common \ -+ -I$(top_srcdir)/tx -+ -+vncviewer_LDADD = \ -+ $(top_srcdir)/../common/rfb/librfb.la \ -+ $(top_srcdir)/tx/libtx.la \ -+ -lXext ---- /dev/null 2007-02-16 09:39:42.585819347 +0100 -+++ vnc-4_1_2-unixsrc/unix/x0vncserver/Makefile.am 2007-02-16 09:51:11.000000000 +0100 -@@ -0,0 +1,20 @@ -+bin_PROGRAMS = x0vncserver -+ -+x0vncserver_SOURCES = \ -+ buildtime.c \ -+ Image.cxx \ -+ Image.h \ -+ x0vncserver.cxx \ -+ $(top_srcdir)/vncconfig/QueryConnectDialog.h \ -+ $(top_srcdir)/vncconfig/QueryConnectDialog.cxx -+ -+AM_CPPFLAGS = \ -+ -I$(top_srcdir)/../common \ -+ -I$(top_srcdir)/vncconfig \ -+ -I$(top_srcdir)/tx -+ -+x0vncserver_LDADD = \ -+ $(top_srcdir)/../common/rfb/librfb.la \ -+ $(top_srcdir)/tx/libtx.la \ -+ -lXext \ -+ -lXtst diff --git a/vnc-bounds.patch b/vnc-bounds.patch deleted file mode 100644 index 93a81c5..0000000 --- a/vnc-bounds.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds 2008-03-17 16:46:27.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-17 16:59:11.000000000 +0100 -@@ -486,32 +486,36 @@ void XserverDesktop::add_changed(RegionP - { - if (ignoreHooks_) return; - if (grabbing) return; -+ -+ BoxRec screenbox; -+ RegionPtr newreg = REGION_CREATE(pScreen, 0, 0); -+ -+ screenbox.x1 = screenbox.y1 = 0; -+ screenbox.x2 = pScreen->width; -+ screenbox.y2 = pScreen->height; -+ -+ RegionPtr screenreg = REGION_CREATE(pScreen, &screenbox, 0); -+ REGION_INTERSECT(pScreen, newreg, reg, screenreg); -+ REGION_DESTROY (pScreen, screenreg); -+ - try { - rfb::Region rfbReg; -- rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, reg), -- REGION_NUM_RECTS(reg), -- (ShortRect*)REGION_RECTS(reg)); -+ rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, newreg), -+ REGION_NUM_RECTS(newreg), -+ (ShortRect*)REGION_RECTS(newreg)); - server->add_changed(rfbReg); - deferUpdate(); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::add_changed: %s",e.str()); - } -+ REGION_DESTROY (pScreen, newreg); - } - - void XserverDesktop::add_copied(RegionPtr dst, int dx, int dy) - { -- if (ignoreHooks_) return; -- if (grabbing) return; -- try { -- rfb::Region rfbReg; -- rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, dst), -- REGION_NUM_RECTS(dst), -- (ShortRect*)REGION_RECTS(dst)); -- server->add_copied(rfbReg, rfb::Point(dx, dy)); -- deferUpdate(); -- } catch (rdr::Exception& e) { -- vlog.error("XserverDesktop::add_copied: %s",e.str()); -- } -+ add_changed (dst); -+ REGION_TRANSLATE (pScreen, dst, -dx, -dy); -+ add_changed (dst); - } - - void XserverDesktop::positionCursor() diff --git a/vnc-clipboard.patch b/vnc-clipboard.patch deleted file mode 100644 index 9865ec2..0000000 --- a/vnc-clipboard.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/vncserver.clipboard vnc-4_1_2-unixsrc/unix/vncserver ---- vnc-4_1_2-unixsrc/unix/vncserver.clipboard 2008-03-13 16:17:07.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncserver 2008-03-13 16:18:14.000000000 +0100 -@@ -42,13 +42,13 @@ $xauthorityFile = "$ENV{XAUTHORITY}" || - - $defaultXStartup - = ("#!/bin/sh\n\n". -+ "vncconfig -iconic &\n". - "# Uncomment the following two lines for normal desktop:\n". - "# unset SESSION_MANAGER\n". - "# exec /etc/X11/xinit/xinitrc\n\n". - "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n". - "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". - "xsetroot -solid grey\n". -- "vncconfig -iconic &\n". - "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". - "twm &\n"); - diff --git a/vnc-config.patch b/vnc-config.patch deleted file mode 100644 index 026b2ba..0000000 --- a/vnc-config.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.config 2006-10-25 12:35:00.000000000 +0200 -+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc 2006-10-25 12:35:24.000000000 +0200 -@@ -17,6 +17,7 @@ - */ - - #include -+#include "XserverDesktop.h" - - extern "C" { - #define class c_class -@@ -48,7 +49,6 @@ - #undef min - #include - --#include "XserverDesktop.h" - #include "vncHooks.h" - #include "vncExtInit.h" - diff --git a/vnc-cookie.patch b/vnc-cookie.patch deleted file mode 100644 index d653f3a..0000000 --- a/vnc-cookie.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- vnc-4_1-unixsrc/unix/vncserver.cookie 2005-02-23 12:28:18.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/vncserver 2005-03-03 22:04:28.000000000 +0000 -@@ -116,18 +116,12 @@ - $desktopLog = "$vncUserDir/$host:$displayNumber.log"; - unlink($desktopLog); - --# Make an X server cookie - use as the seed the sum of the current time, our --# PID and part of the encrypted form of the password. Ideally we'd use --# /dev/urandom, but that's only available on Linux. -- --srand(time+$$+unpack("L",`cat $vncUserDir/passwd`)); --$cookie = ""; --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'}; diff --git a/vnc-gcc4.patch b/vnc-gcc4.patch deleted file mode 100644 index 5228b8c..0000000 --- a/vnc-gcc4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.gcc4 2005-03-04 13:52:03.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc 2005-03-04 13:52:24.000000000 +0000 -@@ -751,7 +751,7 @@ - rep.timeout = qcTimeout; - rep.addrLen = qcTimeout ? strlen(qcAddress) : 0; - rep.userLen = qcTimeout ? strlen(qcUsername) : 0; -- rep.opaqueId = (CARD32)queryConnectId; -+ rep.opaqueId = (CARD32)(long)queryConnectId; - rep.length = (rep.userLen + rep.addrLen + 3) >> 2; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); diff --git a/vnc-gcc43.patch b/vnc-gcc43.patch deleted file mode 100644 index b7e035d..0000000 --- a/vnc-gcc43.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 2008-01-09 14:51:54.000000000 +0100 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-01-09 14:51:54.000000000 +0100 -@@ -37,6 +37,9 @@ - #include - #endif - -+extern "C" { -+#include -+} - #include - #include - #include -diff -up vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx ---- vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx 2008-01-09 14:51:54.000000000 +0100 -@@ -22,6 +22,7 @@ - - #include - #include -+#include - #include - #include - #include -diff -up vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx ---- vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx 2008-01-09 14:51:54.000000000 +0100 -@@ -21,6 +21,7 @@ - - - #include -+#include - #include - #include - #include diff --git a/vnc-idle.patch b/vnc-idle.patch deleted file mode 100644 index 411672f..0000000 --- a/vnc-idle.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vnc-4_1-unixsrc/common/rfb/ServerCore.cxx.idle 2005-03-03 15:42:21.000000000 +0000 -+++ vnc-4_1-unixsrc/common/rfb/ServerCore.cxx 2005-03-03 23:11:14.000000000 +0000 -@@ -29,7 +29,7 @@ - ("IdleTimeout", - "The number of seconds after which an idle VNC connection will be dropped " - "(zero means no timeout)", -- 3600, 0); -+ 0, 0); - rfb::IntParameter rfb::Server::clientWaitTimeMillis - ("ClientWaitTimeMillis", - "The number of milliseconds to wait for a client which is no longer " diff --git a/vnc-includes.patch b/vnc-includes.patch deleted file mode 100644 index ad69b17..0000000 --- a/vnc-includes.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.includes 2008-04-04 13:54:24.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc 2008-04-04 13:54:49.000000000 +0200 -@@ -22,8 +22,8 @@ - extern "C" { - #define class c_class - #define NEED_EVENTS --#include "X.h" --#include "Xproto.h" -+#include -+#include - #include "misc.h" - #include "os.h" - #include "dixstruct.h" -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.includes 2008-04-04 13:55:07.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-04-04 13:55:29.000000000 +0200 -@@ -50,9 +50,9 @@ extern char *display; - #include "resource.h" - #include "cursorstr.h" - #include "windowstr.h" --#include "mi/mi.h" -+#include "mi.h" - #define XK_CYRILLIC --#include "keysym.h" -+#include - #undef public - #undef class - } -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.includes 2008-04-04 13:57:34.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-04-04 13:57:44.000000000 +0200 -@@ -68,7 +68,7 @@ extern "C" { - #include - #include "dix.h" - #include "inputstr.h" --#include "keysym.h" -+#include - extern int defaultColorVisualClass; - #undef new - #undef class diff --git a/vnc-manminor.patch b/vnc-manminor.patch deleted file mode 100644 index aadbd9d..0000000 --- a/vnc-manminor.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.pedantic vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man ---- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.pedantic 2008-03-13 14:55:08.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2008-03-13 14:55:58.000000000 +0100 -@@ -8,6 +8,10 @@ vncviewer \- VNC viewer for X - .br - .B vncviewer - .RI [ options ] -+.RI [ host ][:: port ] -+.br -+.B vncviewer -+.RI [ options ] - .B \-listen - .RI [ port ] - .SH DESCRIPTION -@@ -182,8 +186,8 @@ prefix from the entries in "/usr/include - .TP - \fB\-via\fR \fIgateway\fR - Automatically create encrypted TCP tunnel to the \fIgateway\fR machine --before connection, connect to the \fIhost\fR through that tunnel --(TightVNC\-specific). By default, this option invokes SSH local port -+before connection, connect to the \fIhost\fR through that tunnel. By default, -+this option invokes SSH local port - forwarding, assuming that SSH client binary can be accessed as - /usr/bin/ssh. Note that when using the \fB\-via\fR option, the host - machine name should be specified as known to the gateway machine, e.g. diff --git a/vnc-mieq.patch b/vnc-mieq.patch deleted file mode 100644 index 497afbd..0000000 --- a/vnc-mieq.patch +++ /dev/null @@ -1,690 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.mieq vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.mieq 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-05 12:25:06.000000000 +0100 -@@ -50,12 +50,20 @@ extern char *display; - #include "resource.h" - #include "cursorstr.h" - #include "windowstr.h" -+#include "mi/mi.h" - #define XK_CYRILLIC - #include "keysym.h" - #undef public - #undef class - } - -+static xEvent *eventq = NULL; -+static DeviceIntPtr vncKeyboard = NULL; -+static DeviceIntPtr vncMouse = NULL; -+ -+static int vfbKeybdProc (DeviceIntPtr pDev, int onoff); -+static int vfbMouseProc (DeviceIntPtr pDev, int onoff); -+ - using namespace rfb; - using namespace network; - -@@ -202,6 +210,21 @@ XserverDesktop::XserverDesktop(ScreenPtr - - if (httpListener) - httpServer = new FileHTTPServer(this); -+ -+// XXX Memory leak here, eventq is not free()-d because it has to exist till server exits -+ if (!eventq) -+ eventq = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum()); -+ if (!eventq) -+ FatalError("couldn't allocate room for events\n"); -+ -+ if (vncMouse == NULL) { -+ vncMouse = AddInputDevice(vfbMouseProc, TRUE); -+ RegisterPointerDevice (vncMouse); -+ } -+ if (vncKeyboard == NULL) { -+ vncKeyboard = AddInputDevice(vfbKeybdProc, TRUE); -+ RegisterKeyboardDevice (vncKeyboard); -+ } - } - - XserverDesktop::~XserverDesktop() -@@ -495,7 +518,7 @@ void XserverDesktop::positionCursor() - { - if (!cursorPos.equals(oldCursorPos)) { - oldCursorPos = cursorPos; -- (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE); -+// (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE); - server->setCursorPos(cursorPos); - server->tryUpdate(); - } -@@ -660,8 +683,8 @@ void XserverDesktop::approveConnection(v - - void XserverDesktop::pointerEvent(const Point& pos, int buttonMask) - { -- xEvent ev; -- DevicePtr dev = LookupPointerDevice(); -+ BYTE detail; -+ int i, j, n, valuators[2]; - - // SetCursorPosition seems to be very expensive (at least on XFree86 3.3.6 - // for S3), so we delay calling it until positionCursor() is called at the -@@ -670,14 +693,14 @@ void XserverDesktop::pointerEvent(const - - NewCurrentScreen(pScreen, pos.x, pos.y); - -- ev.u.u.type = MotionNotify; -- ev.u.u.detail = 0; -- ev.u.keyButtonPointer.rootX = pos.x; -- ev.u.keyButtonPointer.rootY = pos.y; -- ev.u.keyButtonPointer.time = GetTimeInMillis(); -- -- if (!pos.equals(cursorPos)) -- (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1); -+ if (!pos.equals(cursorPos)) { -+ valuators[0] = pos.x; -+ valuators[1] = pos.y; -+ n = GetPointerEvents (eventq, vncMouse, MotionNotify, 0, -+ POINTER_ABSOLUTE, 0, 2, valuators); -+ for (i = 0; i < n; i++) -+ mieqEnqueue (vncMouse, eventq + i); -+ } - - for (int i = 0; i < 5; i++) { - if ((buttonMask ^ oldButtonMask) & (1<button->map[i + 1]; -+ detail = vncMouse->button->map[i + 1]; - #else -- ev.u.u.detail = i + 1; -+ detail = i + 1; - #endif -- ev.u.u.type = (buttonMask & (1<processInputProc)(&ev, (DeviceIntPtr)dev, 1); -+ n = GetPointerEvents (eventq, vncMouse, (buttonMask & (1<key; -+ KeyClassPtr keyc = vncKeyboard->key; - if (!(keyc->state & (1<modifierKeyMap[modIndex * keyc->maxKeysPerModifier], - true); -@@ -789,7 +815,7 @@ public: - } - } - void release() { -- KeyClassPtr keyc = dev->key; -+ KeyClassPtr keyc = vncKeyboard->key; - if (keyc->state & (1<maxKeysPerModifier; k++) { - int keycode -@@ -802,20 +828,19 @@ public: - private: - void tempKeyEvent(int keycode, bool down) { - if (keycode) { -- if (!keys) keys = new int[dev->key->maxKeysPerModifier]; -+ if (!keys) keys = new int[vncKeyboard->key->maxKeysPerModifier]; - keys[nKeys++] = keycode; - generateXKeyEvent(keycode, down); - } - } - void generateXKeyEvent(int keycode, bool down) { -- xEvent ev; -- ev.u.u.type = down ? KeyPress : KeyRelease; -- ev.u.u.detail = keycode; -- ev.u.keyButtonPointer.time = GetTimeInMillis(); -- (*dev->c_public.processInputProc)(&ev, dev, 1); -+ int i, n; -+ n = GetKeyboardEvents (eventq, vncKeyboard, -+ down ? KeyPress : KeyRelease, keycode); -+ for (i = 0; i < n; i++) -+ mieqEnqueue (vncKeyboard, eventq + i); - vlog.debug("fake keycode %d %s", keycode, down ? "down" : "up"); - } -- DeviceIntPtr dev; - int modIndex; - int nKeys; - int* keys; -@@ -888,16 +913,16 @@ void XserverDesktop::keyEvent(rdr::U32 k - vlog.debug("Ignoring caps lock"); - return; - } -- DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice(); -- KeyClassPtr keyc = dev->key; -+ KeyClassPtr keyc = vncKeyboard->key; - KeySymsPtr keymap = &keyc->curKeySyms; -+ int i, j, k, n; - - // find which modifier Mode_switch is on. - int modeSwitchMapIndex = 0; -- for (int i = 3; i < 8; i++) { -- for (int k = 0; k < keyc->maxKeysPerModifier; k++) { -+ for (i = 3; i < 8; i++) { -+ for (k = 0; k < keyc->maxKeysPerModifier; k++) { - int keycode = keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k]; -- for (int j = 0; j < keymap->mapWidth; j++) { -+ for (j = 0; j < keymap->mapWidth; j++) { - if (keycode != 0 && - keymap->map[(keycode - keymap->minKeyCode) - * keymap->mapWidth + j] == XK_Mode_switch) -@@ -926,7 +951,7 @@ void XserverDesktop::keyEvent(rdr::U32 k - if (kc == 0) { - // Not a direct match in the local keyboard mapping. Check for alternative - // keysyms with the same meaning. -- for (int i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) { -+ for (i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) { - if (keysym == altKeysym[i].a) - kc = KeysymToKeycode(keymap, altKeysym[i].b, &col); - else if (keysym == altKeysym[i].b) -@@ -954,16 +979,16 @@ void XserverDesktop::keyEvent(rdr::U32 k - - // See if it's a modifier key. If so, then don't do any auto-repeat, because - // the X server will translate each press into a release followed by a press. -- for (int i = 0; i < 8; i++) { -- for (int k = 0; k < keyc->maxKeysPerModifier; k++) { -+ for (i = 0; i < 8; i++) { -+ for (k = 0; k < keyc->maxKeysPerModifier; k++) { - if (kc == keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k] && - IS_PRESSED(keyc,kc) && down) - return; - } - } - -- ModifierState shift(dev, ShiftMapIndex); -- ModifierState modeSwitch(dev, modeSwitchMapIndex); -+ ModifierState shift(ShiftMapIndex); -+ ModifierState modeSwitch(modeSwitchMapIndex); - if (down) { - if (col & 1) - shift.press(); -@@ -977,11 +1002,10 @@ void XserverDesktop::keyEvent(rdr::U32 k - } - } - vlog.debug("keycode %d %s", kc, down ? "down" : "up"); -- xEvent ev; -- ev.u.u.type = down ? KeyPress : KeyRelease; -- ev.u.u.detail = kc; -- ev.u.keyButtonPointer.time = GetTimeInMillis(); -- (*dev->c_public.processInputProc)(&ev, dev, 1); -+ n = GetKeyboardEvents (eventq, vncKeyboard, down ? KeyPress : KeyRelease, -+ kc); -+ for (i = 0; i < n; i++) -+ mieqEnqueue (vncKeyboard, eventq + i); - } - - -@@ -1150,3 +1174,208 @@ static KeyCode KeysymToKeycode(KeySymsPt - } - return 0; - } -+ -+void vncRingBell(int percent, int pitch, int duration) -+{ -+ if (percent > 0) -+ vncBell(); -+} -+ -+/* Fairly standard US PC Keyboard */ -+ -+#define VFB_MIN_KEY 8 -+#define VFB_MAX_KEY 255 -+#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1) -+#define KEYSYMS_PER_KEY 2 -+KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = { -+ NoSymbol, NoSymbol, -+ XK_Escape, NoSymbol, -+ XK_1, XK_exclam, -+ XK_2, XK_at, -+ XK_3, XK_numbersign, -+ XK_4, XK_dollar, -+ XK_5, XK_percent, -+ XK_6, XK_asciicircum, -+ XK_7, XK_ampersand, -+ XK_8, XK_asterisk, -+ XK_9, XK_parenleft, -+ XK_0, XK_parenright, -+ XK_minus, XK_underscore, -+ XK_equal, XK_plus, -+ XK_BackSpace, NoSymbol, -+ XK_Tab, NoSymbol, -+ XK_q, XK_Q, -+ XK_w, XK_W, -+ XK_e, XK_E, -+ XK_r, XK_R, -+ XK_t, XK_T, -+ XK_y, XK_Y, -+ XK_u, XK_U, -+ XK_i, XK_I, -+ XK_o, XK_O, -+ XK_p, XK_P, -+ XK_bracketleft, XK_braceleft, -+ XK_bracketright, XK_braceright, -+ XK_Return, NoSymbol, -+ XK_Control_L, NoSymbol, -+ XK_a, XK_A, -+ XK_s, XK_S, -+ XK_d, XK_D, -+ XK_f, XK_F, -+ XK_g, XK_G, -+ XK_h, XK_H, -+ XK_j, XK_J, -+ XK_k, XK_K, -+ XK_l, XK_L, -+ XK_semicolon, XK_colon, -+ XK_apostrophe, XK_quotedbl, -+ XK_grave, XK_asciitilde, -+ XK_Shift_L, NoSymbol, -+ XK_backslash, XK_bar, -+ XK_z, XK_Z, -+ XK_x, XK_X, -+ XK_c, XK_C, -+ XK_v, XK_V, -+ XK_b, XK_B, -+ XK_n, XK_N, -+ XK_m, XK_M, -+ XK_comma, XK_less, -+ XK_period, XK_greater, -+ XK_slash, XK_question, -+ XK_Shift_R, NoSymbol, -+ XK_KP_Multiply, NoSymbol, -+ XK_Alt_L, XK_Meta_L, -+ XK_space, NoSymbol, -+ /*XK_Caps_Lock*/ NoSymbol, NoSymbol, -+ XK_F1, NoSymbol, -+ XK_F2, NoSymbol, -+ XK_F3, NoSymbol, -+ XK_F4, NoSymbol, -+ XK_F5, NoSymbol, -+ XK_F6, NoSymbol, -+ XK_F7, NoSymbol, -+ XK_F8, NoSymbol, -+ XK_F9, NoSymbol, -+ XK_F10, NoSymbol, -+ XK_Num_Lock, XK_Pointer_EnableKeys, -+ XK_Scroll_Lock, NoSymbol, -+ XK_KP_Home, XK_KP_7, -+ XK_KP_Up, XK_KP_8, -+ XK_KP_Prior, XK_KP_9, -+ XK_KP_Subtract, NoSymbol, -+ XK_KP_Left, XK_KP_4, -+ XK_KP_Begin, XK_KP_5, -+ XK_KP_Right, XK_KP_6, -+ XK_KP_Add, NoSymbol, -+ XK_KP_End, XK_KP_1, -+ XK_KP_Down, XK_KP_2, -+ XK_KP_Next, XK_KP_3, -+ XK_KP_Insert, XK_KP_0, -+ XK_KP_Delete, XK_KP_Decimal, -+ NoSymbol, NoSymbol, -+ NoSymbol, NoSymbol, -+ NoSymbol, NoSymbol, -+ XK_F11, NoSymbol, -+ XK_F12, NoSymbol, -+ XK_Home, NoSymbol, -+ XK_Up, NoSymbol, -+ XK_Prior, NoSymbol, -+ XK_Left, NoSymbol, -+ NoSymbol, NoSymbol, -+ XK_Right, NoSymbol, -+ XK_End, NoSymbol, -+ XK_Down, NoSymbol, -+ XK_Next, NoSymbol, -+ XK_Insert, NoSymbol, -+ XK_Delete, NoSymbol, -+ XK_KP_Enter, NoSymbol, -+ XK_Control_R, NoSymbol, -+ XK_Pause, XK_Break, -+ XK_Print, XK_Execute, -+ XK_KP_Divide, NoSymbol, -+ XK_Alt_R, XK_Meta_R, -+}; -+ -+static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap) -+{ -+ int i; -+ -+ for (i = 0; i < MAP_LENGTH; i++) -+ pModMap[i] = NoSymbol; -+ -+ for (i = 0; i < VFB_MAP_LEN; i++) { -+ if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock) -+ pModMap[i + VFB_MIN_KEY] = LockMask; -+ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L || -+ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R) -+ pModMap[i + VFB_MIN_KEY] = ShiftMask; -+ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L || -+ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) { -+ pModMap[i + VFB_MIN_KEY] = ControlMask; -+ } -+ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L || -+ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R) -+ pModMap[i + VFB_MIN_KEY] = Mod1Mask; -+ } -+ -+ pKeySyms->minKeyCode = VFB_MIN_KEY; -+ pKeySyms->maxKeyCode = VFB_MAX_KEY; -+ pKeySyms->mapWidth = KEYSYMS_PER_KEY; -+ pKeySyms->map = keyboardMap; -+ -+ return TRUE; -+} -+ -+static int vfbKeybdProc(DeviceIntPtr pDev, int onoff) -+{ -+ KeySymsRec keySyms; -+ CARD8 modMap[MAP_LENGTH]; -+ -+ switch (onoff) -+ { -+ case DEVICE_INIT: -+ GetMappings(&keySyms, modMap); -+ InitKeyboardDeviceStruct(&pDev->c_public, &keySyms, modMap, -+ (BellProcPtr)vncRingBell, (KbdCtrlProcPtr)NoopDDA); -+ break; -+ case DEVICE_ON: -+ pDev->c_public.on = TRUE; -+ break; -+ case DEVICE_OFF: -+ pDev->c_public.on = FALSE; -+ break; -+ case DEVICE_CLOSE: -+ break; -+ } -+ return Success; -+} -+ -+static int vfbMouseProc(DeviceIntPtr pDev, int onoff) -+{ -+ BYTE map[6]; -+ -+ switch (onoff) -+ { -+ case DEVICE_INIT: -+ map[1] = 1; -+ map[2] = 2; -+ map[3] = 3; -+ map[4] = 4; -+ map[5] = 5; -+ InitPointerDeviceStruct(&pDev->c_public, map, 5, GetMotionHistory, -+ (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); -+ break; -+ -+ case DEVICE_ON: -+ pDev->c_public.on = TRUE; -+ break; -+ -+ case DEVICE_OFF: -+ pDev->c_public.on = FALSE; -+ break; -+ -+ case DEVICE_CLOSE: -+ break; -+ } -+ return Success; -+} -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.mieq vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.mieq 2008-03-04 12:08:05.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-03-05 11:52:34.000000000 +0100 -@@ -125,6 +125,8 @@ static bool displaySpecified = false; - static bool wellKnownSocketsCreated = false; - static char displayNumStr[16]; - -+extern void vncRingBell (int percent, int pitch, int duration); -+ - #define swapcopy16(_dst, _src) \ - if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \ - else _dst = _src; -@@ -925,7 +927,7 @@ void InitOutput(ScreenInfo *screenInfo, - int SelectWaitTime = 10000; /* usec */ - #endif - --Bool LegalModifier(unsigned int key, DevicePtr pDev) -+Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) - { - return TRUE; - } -@@ -936,223 +938,14 @@ void ProcessInputEvents() - miPointerUpdate(); - } - --/* Fairly standard US PC Keyboard */ -- --#define VFB_MIN_KEY 8 --#define VFB_MAX_KEY 255 --#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1) --#define KEYSYMS_PER_KEY 2 --KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = { -- NoSymbol, NoSymbol, -- XK_Escape, NoSymbol, -- XK_1, XK_exclam, -- XK_2, XK_at, -- XK_3, XK_numbersign, -- XK_4, XK_dollar, -- XK_5, XK_percent, -- XK_6, XK_asciicircum, -- XK_7, XK_ampersand, -- XK_8, XK_asterisk, -- XK_9, XK_parenleft, -- XK_0, XK_parenright, -- XK_minus, XK_underscore, -- XK_equal, XK_plus, -- XK_BackSpace, NoSymbol, -- XK_Tab, NoSymbol, -- XK_q, XK_Q, -- XK_w, XK_W, -- XK_e, XK_E, -- XK_r, XK_R, -- XK_t, XK_T, -- XK_y, XK_Y, -- XK_u, XK_U, -- XK_i, XK_I, -- XK_o, XK_O, -- XK_p, XK_P, -- XK_bracketleft, XK_braceleft, -- XK_bracketright, XK_braceright, -- XK_Return, NoSymbol, -- XK_Control_L, NoSymbol, -- XK_a, XK_A, -- XK_s, XK_S, -- XK_d, XK_D, -- XK_f, XK_F, -- XK_g, XK_G, -- XK_h, XK_H, -- XK_j, XK_J, -- XK_k, XK_K, -- XK_l, XK_L, -- XK_semicolon, XK_colon, -- XK_apostrophe, XK_quotedbl, -- XK_grave, XK_asciitilde, -- XK_Shift_L, NoSymbol, -- XK_backslash, XK_bar, -- XK_z, XK_Z, -- XK_x, XK_X, -- XK_c, XK_C, -- XK_v, XK_V, -- XK_b, XK_B, -- XK_n, XK_N, -- XK_m, XK_M, -- XK_comma, XK_less, -- XK_period, XK_greater, -- XK_slash, XK_question, -- XK_Shift_R, NoSymbol, -- XK_KP_Multiply, NoSymbol, -- XK_Alt_L, XK_Meta_L, -- XK_space, NoSymbol, -- /*XK_Caps_Lock*/ NoSymbol, NoSymbol, -- XK_F1, NoSymbol, -- XK_F2, NoSymbol, -- XK_F3, NoSymbol, -- XK_F4, NoSymbol, -- XK_F5, NoSymbol, -- XK_F6, NoSymbol, -- XK_F7, NoSymbol, -- XK_F8, NoSymbol, -- XK_F9, NoSymbol, -- XK_F10, NoSymbol, -- XK_Num_Lock, XK_Pointer_EnableKeys, -- XK_Scroll_Lock, NoSymbol, -- XK_KP_Home, XK_KP_7, -- XK_KP_Up, XK_KP_8, -- XK_KP_Prior, XK_KP_9, -- XK_KP_Subtract, NoSymbol, -- XK_KP_Left, XK_KP_4, -- XK_KP_Begin, XK_KP_5, -- XK_KP_Right, XK_KP_6, -- XK_KP_Add, NoSymbol, -- XK_KP_End, XK_KP_1, -- XK_KP_Down, XK_KP_2, -- XK_KP_Next, XK_KP_3, -- XK_KP_Insert, XK_KP_0, -- XK_KP_Delete, XK_KP_Decimal, -- NoSymbol, NoSymbol, -- NoSymbol, NoSymbol, -- NoSymbol, NoSymbol, -- XK_F11, NoSymbol, -- XK_F12, NoSymbol, -- XK_Home, NoSymbol, -- XK_Up, NoSymbol, -- XK_Prior, NoSymbol, -- XK_Left, NoSymbol, -- NoSymbol, NoSymbol, -- XK_Right, NoSymbol, -- XK_End, NoSymbol, -- XK_Down, NoSymbol, -- XK_Next, NoSymbol, -- XK_Insert, NoSymbol, -- XK_Delete, NoSymbol, -- XK_KP_Enter, NoSymbol, -- XK_Control_R, NoSymbol, -- XK_Pause, XK_Break, -- XK_Print, XK_Execute, -- XK_KP_Divide, NoSymbol, -- XK_Alt_R, XK_Meta_R, --}; -- --static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap) --{ -- int i; -- -- for (i = 0; i < MAP_LENGTH; i++) -- pModMap[i] = NoSymbol; -- -- for (i = 0; i < VFB_MAP_LEN; i++) { -- if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock) -- pModMap[i + VFB_MIN_KEY] = LockMask; -- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L || -- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R) -- pModMap[i + VFB_MIN_KEY] = ShiftMask; -- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L || -- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) { -- pModMap[i + VFB_MIN_KEY] = ControlMask; -- } -- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L || -- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R) -- pModMap[i + VFB_MIN_KEY] = Mod1Mask; -- } -- -- pKeySyms->minKeyCode = VFB_MIN_KEY; -- pKeySyms->maxKeyCode = VFB_MAX_KEY; -- pKeySyms->mapWidth = KEYSYMS_PER_KEY; -- pKeySyms->map = keyboardMap; -- -- return TRUE; --} -- --static void vfbBell(int percent, DeviceIntPtr device, pointer ctrl, int class_) --{ -- if (percent > 0) -- vncBell(); --} -- --static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff) --{ -- KeySymsRec keySyms; -- CARD8 modMap[MAP_LENGTH]; -- DevicePtr pDev = (DevicePtr)pDevice; -- -- switch (onoff) -- { -- case DEVICE_INIT: -- GetMappings(&keySyms, modMap); -- InitKeyboardDeviceStruct(pDev, &keySyms, modMap, -- (BellProcPtr)vfbBell, (KbdCtrlProcPtr)NoopDDA); -- break; -- case DEVICE_ON: -- pDev->on = TRUE; -- break; -- case DEVICE_OFF: -- pDev->on = FALSE; -- break; -- case DEVICE_CLOSE: -- break; -- } -- return Success; --} -- --static int vfbMouseProc(DeviceIntPtr pDevice, int onoff) -+void DDXRingBell(int percent, int pitch, int duration) - { -- BYTE map[6]; -- DevicePtr pDev = (DevicePtr)pDevice; -- -- switch (onoff) -- { -- case DEVICE_INIT: -- map[1] = 1; -- map[2] = 2; -- map[3] = 3; -- map[4] = 4; -- map[5] = 5; -- InitPointerDeviceStruct(pDev, map, 5, miPointerGetMotionEvents, -- (PtrCtrlProcPtr)NoopDDA, miPointerGetMotionBufferSize()); -- break; -- -- case DEVICE_ON: -- pDev->on = TRUE; -- break; -- -- case DEVICE_OFF: -- pDev->on = FALSE; -- break; -- -- case DEVICE_CLOSE: -- break; -- } -- return Success; -+ vncRingBell (percent, pitch, duration); - } -- - // InitInput is called after InitExtensions, so we're guaranteed that - // vncExtensionInit() has already been called. - - void InitInput(int argc, char *argv[]) - { -- DeviceIntPtr p, k; -- p = AddInputDevice(vfbMouseProc, TRUE); -- k = AddInputDevice(vfbKeybdProc, TRUE); -- RegisterPointerDevice(p); -- RegisterKeyboardDevice(k); -- miRegisterPointerDevice(screenInfo.screens[0], p); -- (void)mieqInit ((DevicePtr)k, (DevicePtr)p); -+ mieqInit (); - } diff --git a/vnc-modular-xorg.patch b/vnc-modular-xorg.patch deleted file mode 100644 index 7c9b8b4..0000000 --- a/vnc-modular-xorg.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.modular-xorg 2007-03-02 15:45:38.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-03-02 15:45:38.000000000 +0100 -@@ -36,8 +36,6 @@ - extern "C" { - #define class c_class - #define public c_public --#define xor c_xor --#define and c_and - #ifdef WIN32 - #include - #endif -@@ -72,11 +70,8 @@ - #include "inputstr.h" - #include "keysym.h" - extern int defaultColorVisualClass; -- extern char buildtime[]; - #undef class - #undef public --#undef xor --#undef and - #ifndef VNC_USE_FB - extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int); - extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int); -@@ -221,7 +216,7 @@ - - void ddxUseMsg() - { -- ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); -+ ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT); - ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, - VENDOR_STRING); - ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); -@@ -927,7 +922,7 @@ - - void InitOutput(ScreenInfo *screenInfo, int argc, char **argv) - { -- ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); -+ ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT); - ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, - VENDOR_STRING); - wellKnownSocketsCreated = true; diff --git a/vnc-newfbsize.patch b/vnc-newfbsize.patch deleted file mode 100644 index be0b11d..0000000 --- a/vnc-newfbsize.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx.newfbsize 2006-07-15 12:24:08.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx 2006-07-15 12:23:29.000000000 +0200 -@@ -305,6 +305,8 @@ - if (encoding != encodingCopyRect) { - lastServerEncoding = encoding; - } -+ if (encoding == pseudoEncodingDesktopSize) -+ setDesktopSize( r.width(), r.height() ); - } - - void CConn::endRect(const Rect& r, unsigned int encoding) diff --git a/vnc-nohttpd.patch b/vnc-nohttpd.patch deleted file mode 100644 index 3bf9632..0000000 --- a/vnc-nohttpd.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- vnc-4_1_1-unixsrc/unix/vncserver.nohttpd 2005-08-08 15:51:09.000000000 +0100 -+++ vnc-4_1_1-unixsrc/unix/vncserver 2005-08-11 12:13:59.000000000 +0100 -@@ -58,6 +58,7 @@ - # Check command line options - - &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1, -+ "-nohttpd",0, - "-help",0,"-h",0,"--help",0); - - &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'}); -@@ -78,6 +79,12 @@ - if ($opt{'-pixelformat'}) { - $pixelformat = $opt{'-pixelformat'}; - } -+if ($opt{'-nohttpd'}) { -+ $nohttpd = 1; -+ } -+else { -+ $nohttpd = 0; -+} - - &CheckGeometryAndDepth(); - -@@ -137,7 +144,7 @@ - - $cmd = "Xvnc :$displayNumber"; - $cmd .= " -desktop " . "edString($desktopName); --$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles); -+$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles && ! $nohttpd); - $cmd .= " -auth $xauthorityFile"; - $cmd .= " -geometry $geometry" if ($geometry); - $cmd .= " -depth $depth" if ($depth); -@@ -413,7 +420,7 @@ - - sub Usage - { -- die("\nusage: $prog [:] [-name ] [-depth ]\n". -+ die("\nusage: $prog [:] [-nohttpd] [-name ] [-depth ]\n". - " [-geometry x]\n". - " [-pixelformat rgbNNN|bgrNNN]\n". - " ...\n\n". ---- vnc-4_1_1-unixsrc/unix/vncserver.man.nohttpd 2005-08-11 12:17:46.000000000 +0100 -+++ vnc-4_1_1-unixsrc/unix/vncserver.man 2005-08-11 12:19:35.000000000 +0100 -@@ -77,6 +77,11 @@ - must be 8 bits deep. - - .TP -+.B \-nohttpd -+Do not instruct Xvnc to run a mini-httpd if the VNC Java applet is -+found. -+ -+.TP - .B \-kill :\fIdisplay#\fP - This kills a VNC desktop previously started with vncserver. It does this by - killing the Xvnc process, whose process ID is stored in the file diff --git a/vnc-noxorg.patch b/vnc-noxorg.patch deleted file mode 100644 index 3b390c8..0000000 --- a/vnc-noxorg.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.s390 vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.s390 2007-09-21 11:11:58.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-09-21 11:12:46.000000000 +0200 -@@ -27,19 +27,8 @@ Xvnc_SOURCES = \ - $(top_srcdir)/fb/fbcmap.c - - Xvnc_LDADD = $(XORG_CORE_LIBS) \ -- $(XORG_LIBS) \ -+ $(XVFB_LIBS) \ - $(XSERVER_LIBS) \ -- ../../fb/libfb.la \ -- ../../mi/libminimi.la \ -- ../../render/librender.la \ -- ../../xkb/libxkbstubs.la \ -- ../../dbe/libdbe.la \ -- ../../Xext/libXext.la \ -- ../../XTrap/libxtrap.la \ -- ../../record/librecord.la \ -- ../xfree86/os-support/libxorgos.la \ -- ../../os/libos.la \ -- ../xfree86/common/libcommon.la \ - -lX11 \ - libvnccommon.la \ - ../../../../common/rfb/librfb.la diff --git a/vnc-paint.patch b/vnc-paint.patch deleted file mode 100644 index 955a269..0000000 --- a/vnc-paint.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc.paint vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc.paint 2008-03-06 14:54:52.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc 2008-03-06 14:56:54.000000000 +0100 -@@ -72,8 +72,6 @@ typedef struct { - - CloseScreenProcPtr CloseScreen; - CreateGCProcPtr CreateGC; -- PaintWindowBackgroundProcPtr PaintWindowBackground; -- PaintWindowBorderProcPtr PaintWindowBorder; - CopyWindowProcPtr CopyWindow; - ClearToBackgroundProcPtr ClearToBackground; - RestoreAreasProcPtr RestoreAreas; -@@ -106,10 +104,6 @@ static DevPrivateKey vncHooksGCPrivateKe - - static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen); - static Bool vncHooksCreateGC(GCPtr pGC); --static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, -- int what); --static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, -- int what); - static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, - RegionPtr pOldRegion); - static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w, -@@ -231,8 +225,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse - - vncHooksScreen->CloseScreen = pScreen->CloseScreen; - vncHooksScreen->CreateGC = pScreen->CreateGC; -- vncHooksScreen->PaintWindowBackground = pScreen->PaintWindowBackground; -- vncHooksScreen->PaintWindowBorder = pScreen->PaintWindowBorder; - vncHooksScreen->CopyWindow = pScreen->CopyWindow; - vncHooksScreen->ClearToBackground = pScreen->ClearToBackground; - vncHooksScreen->RestoreAreas = pScreen->RestoreAreas; -@@ -253,8 +245,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse - - pScreen->CloseScreen = vncHooksCloseScreen; - pScreen->CreateGC = vncHooksCreateGC; -- pScreen->PaintWindowBackground = vncHooksPaintWindowBackground; -- pScreen->PaintWindowBorder = vncHooksPaintWindowBorder; - pScreen->CopyWindow = vncHooksCopyWindow; - pScreen->ClearToBackground = vncHooksClearToBackground; - pScreen->RestoreAreas = vncHooksRestoreAreas; -@@ -297,8 +287,6 @@ static Bool vncHooksCloseScreen(int i, S - SCREEN_UNWRAP(pScreen_, CloseScreen); - - pScreen->CreateGC = vncHooksScreen->CreateGC; -- pScreen->PaintWindowBackground = vncHooksScreen->PaintWindowBackground; -- pScreen->PaintWindowBorder = vncHooksScreen->PaintWindowBorder; - pScreen->CopyWindow = vncHooksScreen->CopyWindow; - pScreen->ClearToBackground = vncHooksScreen->ClearToBackground; - pScreen->RestoreAreas = vncHooksScreen->RestoreAreas; -@@ -333,38 +321,6 @@ static Bool vncHooksCreateGC(GCPtr pGC) - return ret; - } - --// PaintWindowBackground - changed region is the given region -- --static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, -- int what) --{ -- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBackground); -- -- RegionHelper changed(pScreen, pRegion); -- -- (*pScreen->PaintWindowBackground) (pWin, pRegion, what); -- -- vncHooksScreen->desktop->add_changed(changed.reg); -- -- SCREEN_REWRAP(PaintWindowBackground); --} -- --// PaintWindowBorder - changed region is the given region -- --static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, -- int what) --{ -- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); -- -- RegionHelper changed(pScreen, pRegion); -- -- (*pScreen->PaintWindowBorder) (pWin, pRegion, what); -- -- vncHooksScreen->desktop->add_changed(changed.reg); -- -- SCREEN_REWRAP(PaintWindowBorder); --} -- - // CopyWindow - destination of the copy is the old region, clipped by - // borderClip, translated by the delta. This call only does the copy - it - // doesn't affect any other bits. -@@ -534,16 +490,9 @@ static void vncHooksValidateGC(GCPtr pGC - (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable); - - u.vncHooksGC->wrappedOps = 0; -- if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr)pDrawable)->viewable) { -- WindowPtr pWin = (WindowPtr)pDrawable; -- RegionPtr pRegion = &pWin->clipList; -- -- if (pGC->subWindowMode == IncludeInferiors) -- pRegion = &pWin->borderClip; -- if (REGION_NOTEMPTY(pDrawable->pScreen, pRegion)) { -- u.vncHooksGC->wrappedOps = pGC->ops; -- DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n")); -- } -+ if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP) { -+ u.vncHooksGC->wrappedOps = pGC->ops; -+ DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n")); - } - } - diff --git a/vnc-privates.patch b/vnc-privates.patch deleted file mode 100644 index 52a5099..0000000 --- a/vnc-privates.patch +++ /dev/null @@ -1,132 +0,0 @@ ---- a/bin/xorg/hw/vnc/vncHooks.cc Mon Jan 21 17:29:11 2008 +0100 -+++ b/bin/xorg/hw/vnc/vncHooks.cc Thu Jan 24 09:50:48 2008 +0100 -@@ -86,9 +86,15 @@ typedef struct { - GCOps *wrappedOps; - } vncHooksGCRec, *vncHooksGCPtr; - --static int vncHooksScreenIndex; --static int vncHooksGCIndex; -+static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKey; -+static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey; - -+#define vncHooksScreenPrivate(scrn) \ -+ (vncHooksScreenPtr) dixLookupPrivate (&(scrn)->devPrivates, \ -+ vncHooksScrPrivateKey) -+#define vncHooksGCPrivate(pGC) \ -+ (vncHooksGCPtr) dixLookupPrivate (&(pGC)->devPrivates, \ -+ vncHooksGCPrivateKey) - - // screen functions - -@@ -209,26 +215,11 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse - if (vncHooksGeneration != serverGeneration) { - vncHooksGeneration = serverGeneration; - -- vncHooksScreenIndex = AllocateScreenPrivateIndex(); -- if (vncHooksScreenIndex < 0) { -- ErrorF("vncHooksInit: AllocateScreenPrivateIndex failed\n"); -- return FALSE; -- } -- -- vncHooksGCIndex = AllocateGCPrivateIndex(); -- if (vncHooksGCIndex < 0) { -- ErrorF("vncHooksInit: AllocateGCPrivateIndex failed\n"); -- return FALSE; -- } -- } -- -- if (!AllocateGCPrivate(pScreen, vncHooksGCIndex, sizeof(vncHooksGCRec))) { -- ErrorF("vncHooksInit: AllocateGCPrivate failed\n"); -- return FALSE; -+ if (!dixRequestPrivate (vncHooksGCPrivateKey, sizeof (vncHooksGCRec))) -+ return FALSE; - } - - vncHooksScreen = (vncHooksScreenPtr)xnfalloc(sizeof(vncHooksScreenRec)); -- pScreen->devPrivates[vncHooksScreenIndex].ptr = (pointer)vncHooksScreen; - - vncHooksScreen->desktop = desktop; - -@@ -266,6 +257,8 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse - pScreen->DisplayCursor = vncHooksDisplayCursor; - pScreen->BlockHandler = vncHooksBlockHandler; - -+ dixSetPrivate (&pScreen->devPrivates, vncHooksScrPrivateKey, vncHooksScreen); -+ - return TRUE; - } - -@@ -281,11 +274,10 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse - // distinct type, so it would have to use templates, and it's not worth that - // much pain. - --#define SCREEN_UNWRAP(scrn,field) \ -- ScreenPtr pScreen = scrn; \ -- vncHooksScreenPtr vncHooksScreen \ -- = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \ -- pScreen->field = vncHooksScreen->field; \ -+#define SCREEN_UNWRAP(scrn,field) \ -+ ScreenPtr pScreen = scrn; \ -+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (scrn); \ -+ pScreen->field = vncHooksScreen->field; \ - DBGPRINT((stderr,"vncHooks" #field " called\n")); - - #define SCREEN_REWRAP(field) pScreen->field = vncHooks##field; -@@ -322,8 +314,7 @@ static Bool vncHooksCreateGC(GCPtr pGC) - { - SCREEN_UNWRAP(pGC->pScreen, CreateGC); - -- vncHooksGCPtr vncHooksGC -- = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr; -+ vncHooksGCPtr vncHooksGC = vncHooksGCPrivate (pGC); - - Bool ret = (*pScreen->CreateGC) (pGC); - -@@ -507,7 +498,7 @@ class GCFuncUnwrapper { - class GCFuncUnwrapper { - public: - GCFuncUnwrapper(GCPtr pGC_) : pGC(pGC_) { -- vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr; -+ vncHooksGC = vncHooksGCPrivate (pGC); - pGC->funcs = vncHooksGC->wrappedFuncs; - if (vncHooksGC->wrappedOps) - pGC->ops = vncHooksGC->wrappedOps; -@@ -592,7 +583,7 @@ public: - GCOpUnwrapper(DrawablePtr pDrawable, GCPtr pGC_) - : pGC(pGC_), pScreen(pDrawable->pScreen) - { -- vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr; -+ vncHooksGC = vncHooksGCPrivate (pGC); - oldFuncs = pGC->funcs; - pGC->funcs = vncHooksGC->wrappedFuncs; - pGC->ops = vncHooksGC->wrappedOps; -@@ -611,8 +602,7 @@ public: - #define GC_OP_UNWRAPPER(pDrawable, pGC, name) \ - GCOpUnwrapper u(pDrawable, pGC); \ - ScreenPtr pScreen = (pDrawable)->pScreen; \ -- vncHooksScreenPtr vncHooksScreen \ -- = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \ -+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); \ - DBGPRINT((stderr,"vncHooks" #name " called\n")); - - -@@ -1511,8 +1501,7 @@ static void vncHooksComposite(CARD8 op, - INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) - { - ScreenPtr pScreen = pDst->pDrawable->pScreen; -- vncHooksScreenPtr vncHooksScreen = \ -- ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); -+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); - PictureScreenPtr ps = GetPictureScreen(pScreen); - BoxRec box; - -@@ -1534,8 +1523,7 @@ static void vncHooksGlyphs(CARD8 op, Pic - GlyphListPtr list, GlyphPtr *glyphs) - { - ScreenPtr pScreen = pDst->pDrawable->pScreen; -- vncHooksScreenPtr vncHooksScreen = \ -- ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); -+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); - PictureScreenPtr ps = GetPictureScreen(pScreen); - int x, y; - int n; diff --git a/vnc-render.patch b/vnc-render.patch deleted file mode 100644 index 3e9baa0..0000000 --- a/vnc-render.patch +++ /dev/null @@ -1,224 +0,0 @@ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.render 2007-06-07 15:50:16.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc 2007-06-07 15:57:54.000000000 +0200 -@@ -20,6 +20,10 @@ - #include "XserverDesktop.h" - #include "vncHooks.h" - -+#ifdef HAVE_DIX_CONFIG_H -+#include -+#endif -+ - extern "C" { - #define class c_class - #define private c_private -@@ -29,6 +33,9 @@ extern "C" { - #include "regionstr.h" - #include "dixfontstr.h" - #include "colormapst.h" -+#ifdef RENDER -+#include "../../render/picturestr.h" -+#endif - - #ifdef GC_HAS_COMPOSITE_CLIP - #define COMPOSITE_CLIP(gc) ((gc)->pCompositeClip) -@@ -74,6 +81,10 @@ typedef struct { - StoreColorsProcPtr StoreColors; - DisplayCursorProcPtr DisplayCursor; - ScreenBlockHandlerProcPtr BlockHandler; -+#ifdef RENDER -+ CompositeProcPtr Composite; -+ GlyphsProcPtr Glyphs; -+#endif - } vncHooksScreenRec, *vncHooksScreenPtr; - - typedef struct { -@@ -105,6 +116,15 @@ static Bool vncHooksDisplayCursor(Screen - static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout, - pointer pReadmask); - -+// RENDER support -+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, -+ INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, -+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); -+ -+static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, -+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, -+ GlyphListPtr list, GlyphPtr *glyphs); -+ - // GC "funcs" - - static void vncHooksValidateGC(GCPtr pGC, unsigned long changes, -@@ -230,6 +250,16 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse - vncHooksScreen->DisplayCursor = pScreen->DisplayCursor; - vncHooksScreen->BlockHandler = pScreen->BlockHandler; - -+#ifdef RENDER -+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -+ if (ps) { -+ vncHooksScreen->Composite = ps->Composite; -+ vncHooksScreen->Glyphs = ps->Glyphs; -+ ps->Composite = vncHooksComposite; -+ ps->Glyphs = vncHooksGlyphs; -+ } -+#endif -+ - pScreen->CloseScreen = vncHooksCloseScreen; - pScreen->CreateGC = vncHooksCreateGC; - pScreen->PaintWindowBackground = vncHooksPaintWindowBackground; -@@ -1473,3 +1503,80 @@ static void vncHooksPushPixels(GCPtr pGC - - vncHooksScreen->desktop->add_changed(changed.reg); - } -+ -+#ifdef RENDER -+#define RENDER_MAKE_BOX(pDrawable,X,Y,W,H) { \ -+ box.x1 = X + pDrawable->x; \ -+ box.x2 = X + pDrawable->x + W; \ -+ box.y1 = Y + pDrawable->y; \ -+ box.y2 = Y + pDrawable->y + H; \ -+} -+ -+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, -+ INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, -+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) -+{ -+ ScreenPtr pScreen = pDst->pDrawable->pScreen; -+ vncHooksScreenPtr vncHooksScreen = \ -+ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); -+ PictureScreenPtr ps = GetPictureScreen(pScreen); -+ BoxRec box; -+ -+ ps->Composite = vncHooksScreen->Composite; -+ (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc, -+ xMask, yMask, xDst, yDst, width, height); -+ ps->Composite = vncHooksComposite; -+ -+ if (pDst->pDrawable->type == DRAWABLE_WINDOW) { -+ RENDER_MAKE_BOX(pDst->pDrawable, xDst, yDst, width, height); -+ RegionHelper changed(pScreen, &box, 0); -+ vncHooksScreen->desktop->add_changed(changed.reg); -+ } -+} -+ -+ -+static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, -+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, -+ GlyphListPtr list, GlyphPtr *glyphs) -+{ -+ ScreenPtr pScreen = pDst->pDrawable->pScreen; -+ vncHooksScreenPtr vncHooksScreen = \ -+ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); -+ PictureScreenPtr ps = GetPictureScreen(pScreen); -+ int x, y; -+ int n; -+ GlyphPtr glyph; -+ BoxRec box; -+ -+ ps->Glyphs = vncHooksScreen->Glyphs; -+ (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, -+ nlist, list, glyphs); -+ ps->Glyphs = vncHooksGlyphs; -+ -+ if (pDst->pDrawable->type == DRAWABLE_WINDOW) -+ { -+ x = xSrc; -+ y = ySrc; -+ while (nlist--) -+ { -+ x += list->xOff; -+ y += list->yOff; -+ n = list->len; -+ while (n--) -+ { -+ glyph = *glyphs++; -+ RENDER_MAKE_BOX(pDst->pDrawable, -+ x - glyph->info.x, y - glyph->info.y, -+ glyph->info.width, glyph->info.height); -+ RegionHelper changed(pScreen, &box, 0); -+ vncHooksScreen->desktop->add_changed(changed.reg); -+ -+ x += glyph->info.xOff; -+ y += glyph->info.yOff; -+ } -+ list++; -+ } -+ } -+} -+#endif -+ ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.render 2007-06-07 15:49:32.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-06-07 15:49:32.000000000 +0200 -@@ -130,6 +130,7 @@ static vfbScreenInfo vfbScreens[MAXSCREE - static Bool vfbPixmapDepths[33]; - static char needswap = 0; - static int lastScreen = -1; -+static Bool Render = TRUE; - - static bool displaySpecified = false; - static bool wellKnownSocketsCreated = false; -@@ -221,6 +222,10 @@ extern "C" { - VENDOR_STRING); - ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); - ErrorF("-pixdepths list-of-int support given pixmap depths\n"); -+#ifdef RENDER -+ ErrorF("+/-render turn on/off RENDER extension support" -+ "(default on)\n"); -+#endif - ErrorF("-linebias n adjust thin line pixelization\n"); - ErrorF("-blackpixel n pixel value for black\n"); - ErrorF("-whitepixel n pixel value for white\n"); -@@ -317,6 +322,20 @@ int ddxProcessArgument(int argc, char *a - return ret; - } - -+#ifdef RENDER -+ if (strcmp (argv[i], "+render") == 0) /* +render */ -+ { -+ Render = TRUE; -+ return 1; -+ } -+ -+ if (strcmp (argv[i], "-render") == 0) /* -render */ -+ { -+ Render = FALSE; -+ return 1; -+ } -+#endif -+ - if (strcmp (argv[i], "-blackpixel") == 0) /* -blackpixel n */ - { - Pixel pix; -@@ -817,7 +836,12 @@ static Bool vfbScreenInit(int index, Scr - if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, - dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) - return FALSE; --#else -+ -+#ifdef RENDER -+ if (ret && Render) -+ fbPictureInit(pScreen, 0, 0); -+#endif /* RENDER */ -+#else /* VNC_USE_FB */ - switch (pvfb->bitsPerPixel) - { - case 1: -@@ -938,6 +962,19 @@ void InitOutput(ScreenInfo *screenInfo, - vfbPixmapDepths[vfbScreens[i].depth] = TRUE; - } - -+#ifdef RENDER -+ /* RENDER needs a good set of pixmaps. */ -+ if (Render) { -+ vfbPixmapDepths[1] = TRUE; -+ vfbPixmapDepths[4] = TRUE; -+ vfbPixmapDepths[8] = TRUE; -+/* vfbPixmapDepths[15] = TRUE; */ -+ vfbPixmapDepths[16] = TRUE; -+ vfbPixmapDepths[24] = TRUE; -+ vfbPixmapDepths[32] = TRUE; -+ } -+#endif -+ - for (i = 1; i <= 32; i++) - { - if (vfbPixmapDepths[i]) diff --git a/vnc-restart.patch b/vnc-restart.patch deleted file mode 100644 index 976cc59..0000000 --- a/vnc-restart.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- vnc-4_1-unixsrc/common/network/TcpSocket.cxx.restart 2005-03-04 09:02:21.000000000 +0000 -+++ vnc-4_1-unixsrc/common/network/TcpSocket.cxx 2005-03-04 09:03:05.000000000 +0000 -@@ -140,10 +140,14 @@ - } - - // Attempt to connect to the remote host -- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { -- int e = errorNumber; -- closesocket(sock); -- throw SocketException("unable to connect to host", e); -+ for (;;) { -+ if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { -+ int e = errorNumber; -+ if (e == EINTR) -+ continue; -+ closesocket(sock); -+ throw SocketException("unable to connect to host", e); -+ } else break; - } - - // Disable Nagle's algorithm, to reduce latency diff --git a/vnc-rh212985.patch b/vnc-rh212985.patch deleted file mode 100644 index fa45c6b..0000000 --- a/vnc-rh212985.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/vncserver.rh212985 vnc-4_1_2-unixsrc/unix/vncserver ---- vnc-4_1_2-unixsrc/unix/vncserver.rh212985 2008-07-16 13:55:29.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/vncserver 2008-07-16 14:17:53.000000000 +0200 -@@ -168,11 +168,25 @@ $cmd .= " >> " . "edString($desktopL - # Run $cmd and record the process ID. - - $pidFile = "$vncUserDir/$host:$displayNumber.pid"; --system("$cmd & echo \$! >$pidFile"); -+system( -+"rm -f $pidFile -+ $cmd & -+ PID_TEMP=\$! -+ PID_NUM=\$PID_TEMP -+ -+ # Give Xvnc a chance to start up -+ -+ sleep 3; -+ -+ if ps -p \$PID_NUM -o comm= | grep -q Xvnc; then -+ echo \$PID_NUM > $pidFile -+ fi" -+); - --# Give Xvnc a chance to start up -- --sleep(3); -+if (!(-e "$pidFile")) { -+ warn "Unable to start Xvnc, exiting\n"; -+ exit; -+} - - warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n"; - diff --git a/vnc-scrollbars.patch b/vnc-scrollbars.patch deleted file mode 100644 index e611c35..0000000 --- a/vnc-scrollbars.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.h ---- vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars 2008-03-14 12:44:19.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.h 2008-03-14 12:44:19.000000000 +0100 -@@ -77,7 +77,8 @@ private: - int xOff, yOff; - rfb::Timer bumpScrollTimer; - bool bumpScroll; -- bool needScrollbars; -+ bool needXScrollbar; -+ bool needYScrollbar; - int bumpScrollX, bumpScrollY; - }; - #endif -diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx ---- vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars 2008-03-14 12:44:19.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx 2008-03-14 13:08:30.000000000 +0100 -@@ -25,7 +25,8 @@ - TXViewport::TXViewport(Display* dpy_, int w, int h, TXWindow* parent_) - : TXWindow(dpy_, w, h, parent_), child(0), hScrollbar(0), - vScrollbar(0), scrollbarSize(15), xOff(0), yOff(0), bumpScrollTimer(this), -- bumpScroll(false), needScrollbars(false), bumpScrollX(0), bumpScrollY(0) -+ bumpScroll(false), needXScrollbar(false), needYScrollbar(false), -+ bumpScrollX(0), bumpScrollY(0) - { - clipper = new TXWindow(dpy, width()-scrollbarSize, height()-scrollbarSize, - this); -@@ -132,13 +133,23 @@ bool TXViewport::handleTimeout(rfb::Time - - void TXViewport::resizeNotify() - { -- needScrollbars = (!bumpScroll && -- (width() < child->width() || height() < child->height()) && -- (width() > scrollbarSize && height() > scrollbarSize)); -- if (needScrollbars) { -+ needXScrollbar = (!bumpScroll && width() < child->width() && -+ height() > scrollbarSize && width() > scrollbarSize); -+ needYScrollbar = (!bumpScroll && height() < child->height() && -+ height() > scrollbarSize && width() > scrollbarSize); -+ -+ if (needXScrollbar && needYScrollbar) { - clipper->resize(width()-scrollbarSize, height()-scrollbarSize); - hScrollbar->map(); - vScrollbar->map(); -+ } else if (needXScrollbar) { -+ clipper->resize(width(), height()-scrollbarSize); -+ hScrollbar->map(); -+ vScrollbar->unmap(); -+ } else if (needYScrollbar) { -+ clipper->resize(width()-scrollbarSize, height()); -+ hScrollbar->unmap(); -+ vScrollbar->map(); - } else { - clipper->resize(width(), height()); - hScrollbar->unmap(); -@@ -147,10 +158,13 @@ void TXViewport::resizeNotify() - - setOffset(xOff, yOff); - -- if (needScrollbars) { -+ if (needXScrollbar) { - hScrollbar->move(0, height()-scrollbarSize); - hScrollbar->resize(width()-scrollbarSize, scrollbarSize); - hScrollbar->set(child->width(), -xOff, width()-scrollbarSize); -+ } -+ -+ if (needYScrollbar) { - vScrollbar->move(width()-scrollbarSize, 0); - vScrollbar->resize(scrollbarSize, height()-scrollbarSize); - vScrollbar->set(child->height(), -yOff, height()-scrollbarSize); diff --git a/vnc-select.patch b/vnc-select.patch deleted file mode 100644 index b888071..0000000 --- a/vnc-select.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- vnc-4_1_1-unixsrc/unix/x0vncserver/x0vncserver.cxx.select 2005-12-05 10:02:30.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/x0vncserver/x0vncserver.cxx 2005-12-05 10:02:32.000000000 +0000 -@@ -302,6 +302,7 @@ - fd_set rfds; - std::list sockets; - std::list::iterator i; -+ tv.tv_usec = tv.tv_sec = 0; - - // Process any incoming X events - TXWindow::handleXEvents(dpy); diff --git a/vnc-selections.patch b/vnc-selections.patch deleted file mode 100644 index 0f6f514..0000000 --- a/vnc-selections.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.selections vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.selections 2008-03-10 15:34:24.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc 2008-03-11 10:55:44.000000000 +0100 -@@ -62,11 +62,9 @@ extern "C" { - static void SendSelectionChangeEvent(Atom selection); - static int ProcVncExtDispatch(ClientPtr client); - static int SProcVncExtDispatch(ClientPtr client); -+ static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args); - - extern char *display; -- -- extern Selection *CurrentSelections; -- extern int NumCurrentSelections; - } - - using namespace rfb; -@@ -99,7 +97,6 @@ struct VncInputSelect { - VncInputSelect* next; - }; - --static int nPrevSelections = 0; - static TimeStamp* prevSelectionTimes = 0; - - static int vncErrorBase = 0; -@@ -147,6 +144,10 @@ void vncExtensionInit() - FatalError("AddCallback failed\n"); - } - -+ if (!AddCallback(&SelectionCallback, vncSelectionCallback, 0)) { -+ FatalError("Add selection callback failed\n"); -+ } -+ - try { - if (!initialised) { - rfb::initStdIOLoggers(); -@@ -212,6 +213,14 @@ static void vncResetProc(ExtensionEntry* - { - } - -+static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args) -+{ -+ SelectionInfoRec *info = (SelectionInfoRec *) args; -+ Selection *selection = info->selection; -+ -+ SendSelectionChangeEvent(selection->selection); -+} -+ - // - // vncBlockHandler - called just before the X server goes into select(). Call - // on to the block handler for each desktop. Then check whether any of the -@@ -227,27 +236,6 @@ static void vncBlockHandler(pointer data - desktop[scr]->blockHandler(fds); - } - } -- -- if (nPrevSelections != NumCurrentSelections) { -- prevSelectionTimes -- = (TimeStamp*)xnfrealloc(prevSelectionTimes, -- NumCurrentSelections * sizeof(TimeStamp)); -- for (int i = nPrevSelections; i < NumCurrentSelections; i++) { -- prevSelectionTimes[i].months = 0; -- prevSelectionTimes[i].milliseconds = 0; -- } -- nPrevSelections = NumCurrentSelections; -- } -- for (int i = 0; i < NumCurrentSelections; i++) { -- if (CurrentSelections[i].lastTimeChanged.months -- != prevSelectionTimes[i].months || -- CurrentSelections[i].lastTimeChanged.milliseconds -- != prevSelectionTimes[i].milliseconds) -- { -- SendSelectionChangeEvent(CurrentSelections[i].selection); -- prevSelectionTimes[i] = CurrentSelections[i].lastTimeChanged; -- } -- } - } - - static void vncWakeupHandler(pointer data, int nfds, pointer readmask) diff --git a/vnc-use-fb.patch b/vnc-use-fb.patch deleted file mode 100644 index ca71bb6..0000000 --- a/vnc-use-fb.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc ---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2006-05-12 18:50:32.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2008-07-16 13:28:27.000000000 +0200 -@@ -48,8 +48,12 @@ extern "C" { - #include "X11/Xos.h" - #include "scrnintstr.h" - #include "servermd.h" -+#ifdef VNC_USE_FB -+#include "fb.h" -+#else - #define PSZ 8 - #include "cfb.h" -+#endif - #include "mi.h" - #include "mibstore.h" - #include "colormapst.h" -@@ -73,6 +77,7 @@ extern "C" { - #undef public - #undef xor - #undef and -+#ifndef VNC_USE_FB - extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int); - extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int); - extern Bool cfb16CreateGC(GCPtr); -@@ -83,6 +88,7 @@ extern "C" { - unsigned long, char*); - extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int, - unsigned long, char*); -+#endif - } - - #define XVNCVERSION "Free Edition 4.1.2" -@@ -482,7 +488,7 @@ CARD32 GetTimeInMillis() - } - #endif - -- -+#ifndef VNC_USE_FB - static Bool vfbMultiDepthCreateGC(GCPtr pGC) - { - switch (vfbBitsPerPixel(pGC->depth)) -@@ -541,6 +547,7 @@ vfbMultiDepthGetImage(DrawablePtr pDrawa - break; - } - } -+#endif - - static ColormapPtr InstalledMaps[MAXSCREENS]; - -@@ -811,6 +818,11 @@ static Bool vfbScreenInit(int index, Scr - defaultColorVisualClass - = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor; - -+#ifdef VNC_USE_FB -+ if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, -+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) -+ return FALSE; -+#else - switch (pvfb->bitsPerPixel) - { - case 1: -@@ -838,6 +850,7 @@ static Bool vfbScreenInit(int index, Scr - pScreen->CreateGC = vfbMultiDepthCreateGC; - pScreen->GetImage = vfbMultiDepthGetImage; - pScreen->GetSpans = vfbMultiDepthGetSpans; -+#endif - - pScreen->InstallColormap = vfbInstallColormap; - pScreen->UninstallColormap = vfbUninstallColormap; -@@ -883,6 +896,9 @@ static Bool vfbScreenInit(int index, Scr - } - } - -+#ifdef VNC_USE_FB -+ ret = fbCreateDefColormap(pScreen); -+#else - if (pvfb->bitsPerPixel == 1) - { - ret = mfbCreateDefColormap(pScreen); -@@ -891,6 +907,7 @@ static Bool vfbScreenInit(int index, Scr - { - ret = cfbCreateDefColormap(pScreen); - } -+#endif - - miSetZeroLineBias(pScreen, pvfb->lineBias); - diff --git a/vnc-via.patch b/vnc-via.patch deleted file mode 100644 index 3bfbfb2..0000000 --- a/vnc-via.patch +++ /dev/null @@ -1,190 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.via vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.via 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-07-16 13:29:29.000000000 +0200 -@@ -54,6 +54,29 @@ using namespace rdr; - - static rfb::LogWriter vlog("TcpSocket"); - -+/* Tunnelling support. */ -+int network::findFreeTcpPort (void) -+{ -+ int sock, port; -+ struct sockaddr_in addr; -+ memset(&addr, 0, sizeof(addr)); -+ addr.sin_family = AF_INET; -+ addr.sin_addr.s_addr = INADDR_ANY; -+ -+ if ((sock = socket (AF_INET, SOCK_STREAM, 0)) < 0) -+ throw SocketException ("unable to create socket", errorNumber); -+ -+ for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) { -+ addr.sin_port = htons ((unsigned short) port); -+ if (bind (sock, (struct sockaddr *)&addr, sizeof (addr)) == 0) { -+ close (sock); -+ return port; -+ } -+ } -+ throw SocketException ("no free port in range", 0); -+ return 0; -+} -+ - - // -=- Socket initialisation - static bool socketsInitialised = false; -diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.h.via vnc-4_1_2-unixsrc/common/network/TcpSocket.h ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.h.via 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.h 2008-07-16 13:29:29.000000000 +0200 -@@ -32,8 +32,14 @@ - - #include - -+/* Tunnelling support. */ -+#define TUNNEL_PORT_OFFSET 5500 -+ - namespace network { - -+ /* Tunnelling support. */ -+ int findFreeTcpPort (void); -+ - class TcpSocket : public Socket { - public: - TcpSocket(int sock, bool close=true); -diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.via vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx ---- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.via 2006-05-15 18:56:20.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx 2008-07-16 13:32:28.000000000 +0200 -@@ -41,6 +41,7 @@ rfb::LogWriter vlog("main"); - - using namespace network; - using namespace rfb; -+using namespace std; - - IntParameter pointerEventInterval("PointerEventInterval", - "Time in milliseconds to rate-limit" -@@ -95,6 +96,9 @@ BoolParameter listenMode("listen", "List - StringParameter geometry("geometry", "X geometry specification", ""); - StringParameter displayname("display", "The X display", ""); - -+/* Support for tunnelling */ -+StringParameter via("via", "Gateway to tunnel via", ""); -+ - char aboutText[256]; - char* programName; - extern char buildtime[]; -@@ -157,6 +161,61 @@ static void usage() - exit(1); - } - -+/* Tunnelling support. */ -+static void -+interpretViaParam (char **gatewayHost, char **remoteHost, -+ int *remotePort, char **vncServerName, -+ int localPort) -+{ -+ const int SERVER_PORT_OFFSET = 5900; -+ char *pos = strchr (*vncServerName, ':'); -+ if (pos == NULL) -+ *remotePort = SERVER_PORT_OFFSET; -+ else { -+ int portOffset = SERVER_PORT_OFFSET; -+ size_t len; -+ *pos++ = '\0'; -+ len = strlen (pos); -+ if (*pos == ':') { -+ /* Two colons is an absolute port number, not an offset. */ -+ pos++; -+ len--; -+ portOffset = 0; -+ } -+ if (!len || strspn (pos, "-0123456789") != len ) -+ usage (); -+ *remotePort = atoi (pos) + portOffset; -+ } -+ -+ if (**vncServerName != '\0') -+ *remoteHost = *vncServerName; -+ -+ *gatewayHost = strDup (via.getValueStr ()); -+ *vncServerName = new char[50]; -+ sprintf (*vncServerName, "localhost::%d", localPort); -+} -+ -+static void -+createTunnel (const char *gatewayHost, const char *remoteHost, -+ int remotePort, int localPort) -+{ -+ char *cmd = getenv ("VNC_VIA_CMD"); -+ char *percent; -+ char lport[10], rport[10]; -+ sprintf (lport, "%d", localPort); -+ sprintf (rport, "%d", remotePort); -+ setenv ("G", gatewayHost, 1); -+ setenv ("H", remoteHost, 1); -+ setenv ("R", rport, 1); -+ setenv ("L", lport, 1); -+ if (!cmd) -+ cmd = "/usr/bin/ssh -f -L \"$L\":\"$H\":\"$R\" \"$G\" sleep 20"; -+ /* Compatibility with TightVNC's method. */ -+ while ((percent = strchr (cmd, '%')) != NULL) -+ *percent = '$'; -+ system (cmd); -+} -+ - int main(int argc, char** argv) - { - sprintf(aboutText, "VNC Viewer Free Edition 4.1.2 for X - built %s\n" -@@ -190,8 +249,6 @@ int main(int argc, char** argv) - usage(); - } - -- if (vncServerName) -- usage(); - vncServerName = argv[i]; - } - -@@ -207,6 +264,19 @@ int main(int argc, char** argv) - vlog.error("Could not create .vnc directory: environment variable $HOME not set."); - - try { -+ /* Tunnelling support. */ -+ if (strlen (via.getValueStr ()) > 0) { -+ char *gatewayHost = ""; -+ char *remoteHost = "localhost"; -+ int localPort = findFreeTcpPort (); -+ int remotePort; -+ if (!vncServerName) -+ usage(); -+ interpretViaParam (&gatewayHost, &remoteHost, &remotePort, -+ &vncServerName, localPort); -+ createTunnel (gatewayHost, remoteHost, remotePort, localPort); -+ } -+ - Socket* sock = 0; - - if (listenMode) { -diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.via vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man ---- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.via 2005-03-03 14:10:40.000000000 +0100 -+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2008-07-16 13:29:29.000000000 +0200 -@@ -174,6 +174,23 @@ This option specifies the key which brin - specified as an X11 keysym name (these can be obtained by removing the XK_ - prefix from the entries in "/usr/include/X11/keysymdef.h"). Default is F8. - -+.TP -+\fB\-via\fR \fIgateway\fR -+Automatically create encrypted TCP tunnel to the \fIgateway\fR machine -+before connection, connect to the \fIhost\fR through that tunnel -+(TightVNC\-specific). By default, this option invokes SSH local port -+forwarding, assuming that SSH client binary can be accessed as -+/usr/bin/ssh. Note that when using the \fB\-via\fR option, the host -+machine name should be specified as known to the gateway machine, e.g. -+"localhost" denotes the \fIgateway\fR, not the machine where vncviewer -+was launched. The environment variable \fIVNC_VIA_CMD\fR can override -+the default tunnel command of -+\fB/usr/bin/ssh\ -f\ -L\ "$L":"$H":"$R"\ "$G"\ sleep\ 20\fR. The tunnel -+command is executed with the environment variables \fIL\fR, \fIH\fR, -+\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. -+ - .SH SEE ALSO - .BR Xvnc (1), - .BR vncpasswd (1), diff --git a/vnc-viewer-reparent.patch b/vnc-viewer-reparent.patch deleted file mode 100644 index 5c5ff23..0000000 --- a/vnc-viewer-reparent.patch +++ /dev/null @@ -1,115 +0,0 @@ ---- vnc-4_1_1-unixsrc/unix/tx/TXWindow.h.viewer-reparent 2005-03-11 15:08:41.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/tx/TXWindow.h 2005-12-01 17:55:38.000000000 +0000 -@@ -183,6 +183,9 @@ - - Display* const dpy; - -+ TXEventHandler* eventHandler; -+ long eventMask; -+ - int xPad, yPad, bevel; - - private: -@@ -195,9 +198,7 @@ - TXWindow* parent; - Window win_; - int width_, height_; -- TXEventHandler* eventHandler; - TXDeleteWindowCallback* dwc; -- long eventMask; - XSizeHints sizeHints; - std::map selectionOwnTime; - std::map selectionOwner_; ---- vnc-4_1_1-unixsrc/unix/tx/TXViewport.cxx.viewer-reparent 2005-03-11 15:08:41.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/tx/TXViewport.cxx 2005-12-01 17:55:38.000000000 +0000 -@@ -43,6 +43,21 @@ - delete vScrollbar; - } - -+void TXViewport::reparent(long embed_window) -+{ -+ XReparentWindow(dpy, win(), (Window)embed_window, 0, 0); -+ XSelectInput(dpy, embed_window, child->eventMask); -+ if (!eventHandler) -+ this->setEventHandler(this); -+} -+ -+void TXViewport::handleEvent(TXWindow* w, XEvent* ev) -+{ -+ if (child && child->eventHandler) -+ ((TXEventHandler *)child->eventHandler)->handleEvent(child, ev); -+} -+ -+ - void TXViewport::setChild(TXWindow* child_) - { - child = child_; ---- vnc-4_1_1-unixsrc/unix/tx/TXViewport.h.viewer-reparent 2005-03-11 15:08:41.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/tx/TXViewport.h 2005-12-01 17:55:38.000000000 +0000 -@@ -32,8 +32,8 @@ - #include "TXWindow.h" - #include "TXScrollbar.h" - --class TXViewport : public TXWindow, public TXScrollbarCallback, -- public rfb::Timer::Callback { -+class TXViewport : public TXWindow, public TXScrollbarCallback, -+ public TXEventHandler, public rfb::Timer::Callback { - public: - TXViewport(Display* dpy_, int width, int height, TXWindow* parent_=0); - virtual ~TXViewport(); -@@ -59,6 +59,12 @@ - // normally. - bool bumpScrollEvent(XMotionEvent* ev); - -+ // reparent the viewport into a new window -+ void reparent(long embed_window); -+ -+ // event handler -+ void handleEvent(TXWindow* w, XEvent* ev); -+ - private: - virtual void resizeNotify(); - virtual void scrollbarPos(int x, int y, TXScrollbar* sb); ---- vnc-4_1_1-unixsrc/unix/vncviewer/parameters.h.viewer-reparent 2005-03-11 15:08:41.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/vncviewer/parameters.h 2005-12-01 17:55:38.000000000 +0000 -@@ -37,6 +37,7 @@ - extern rfb::BoolParameter sendPrimary; - extern rfb::BoolParameter fullScreen; - extern rfb::StringParameter geometry; -+extern rfb::StringParameter embedParent; - - extern char aboutText[]; - extern char* programName; ---- vnc-4_1_1-unixsrc/unix/vncviewer/CConn.cxx.viewer-reparent 2005-03-11 15:08:41.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/vncviewer/CConn.cxx 2005-12-01 17:55:38.000000000 +0000 -@@ -586,10 +586,18 @@ - - void CConn::reconfigureViewport() - { -+ const char * par = embedParent.getValueStr(); - viewport->setMaxSize(cp.width, cp.height); - if (fullScreen) { - viewport->resize(DisplayWidth(dpy,DefaultScreen(dpy)), - DisplayHeight(dpy,DefaultScreen(dpy))); -+ } else if (strlen(par) != 0) { -+ XWindowAttributes win_attr; -+ Window w = strtol(par, (char **)NULL, 0); -+ -+ XGetWindowAttributes(dpy, w, &win_attr); -+ viewport->reparent(w); -+ viewport->resize(win_attr.width, win_attr.height); - } else { - int w = cp.width; - int h = cp.height; ---- vnc-4_1_1-unixsrc/unix/vncviewer/vncviewer.cxx.viewer-reparent 2005-12-01 17:54:46.000000000 +0000 -+++ vnc-4_1_1-unixsrc/unix/vncviewer/vncviewer.cxx 2005-12-01 17:55:38.000000000 +0000 -@@ -99,6 +99,9 @@ - /* Support for tunnelling */ - StringParameter via("via", "Gateway to tunnel via", ""); - -+/* Support for reparenting */ -+StringParameter embedParent("Parent", "X Window to use as a parent", ""); -+ - char aboutText[256]; - char* programName; - extern char buildtime[]; diff --git a/vnc-viewerIPv6.patch b/vnc-viewerIPv6.patch deleted file mode 100644 index 82e4fa0..0000000 --- a/vnc-viewerIPv6.patch +++ /dev/null @@ -1,192 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 vnc-4_1_2-unixsrc/common/network/Makefile.am ---- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 2008-06-02 10:22:17.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2008-06-02 10:52:56.000000000 +0200 -@@ -1,5 +1,7 @@ - noinst_LTLIBRARIES = libnetwork.la - -+libnetwork_la_CPPFLAGS = -DHAVE_GETADDRINFO -+ - libnetwork_la_SOURCES = \ - Socket.h \ - TcpSocket.cxx \ -diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx ---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2008-06-02 10:22:17.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-06-02 10:49:04.000000000 +0200 -@@ -109,50 +109,99 @@ TcpSocket::TcpSocket(int sock, bool clos - TcpSocket::TcpSocket(const char *host, int port) - : closeFd(true) - { -- int sock; -+#define CAST_ADDR(x) (*((struct x *)&addr)) -+ int sock, err, family, result = -1; -+ size_t addrlen; -+ struct sockaddr_storage addr; -+#ifdef HAVE_GETADDRINFO -+ struct addrinfo *ai, *current, hints; -+#endif - - // - Create a socket - initSockets(); -- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) -- throw SocketException("unable to create socket", errorNumber); - --#ifndef WIN32 -- // - By default, close the socket on exec() -- fcntl(sock, F_SETFD, FD_CLOEXEC); --#endif -+#ifdef HAVE_GETADDRINFO -+ memset(&hints, 0, sizeof(struct addrinfo)); -+ hints.ai_family = AF_UNSPEC; -+ hints.ai_socktype = SOCK_STREAM; -+ hints.ai_canonname = NULL; -+ hints.ai_addr = NULL; -+ hints.ai_next = NULL; -+ -+ if ((result = getaddrinfo(host, NULL, &hints, &ai)) != 0) { -+ throw Exception("unable to resolve host by name: %s", -+ gai_strerror(result)); -+ } -+ -+ for (current = ai; current != NULL; current = current->ai_next) { -+ family = current->ai_family; -+ if (family != AF_INET && family != AF_INET6) -+ continue; -+ -+ addrlen = current->ai_addrlen; -+ memcpy(&addr, current->ai_addr, addrlen); -+ -+ if (family == AF_INET) -+ CAST_ADDR(sockaddr_in).sin_port = htons(port); -+ else -+ CAST_ADDR(sockaddr_in6).sin6_port = htons(port); - -- // - Connect it to something -+#else -+ family = AF_INET; -+ addrlen = sizeof(struct sockaddr_in); - -- // Try processing the host as an IP address -- struct sockaddr_in addr; -- memset(&addr, 0, sizeof(addr)); -- addr.sin_family = AF_INET; -- addr.sin_addr.s_addr = inet_addr(host); -- addr.sin_port = htons(port); -- if ((int)addr.sin_addr.s_addr == -1) { -- // Host was not an IP address - try resolving as DNS name -- struct hostent *hostinfo; -- hostinfo = gethostbyname(host); -- if (hostinfo && hostinfo->h_addr) { -- addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr; -- } else { -- int e = errorNumber; -- closesocket(sock); -- throw SocketException("unable to resolve host by name", e); -+ // Try processing the host as an IP address -+ memset(&addr, 0, addrlen); -+ CAST_ADDR(sockaddr_in).sin_family = AF_INET; -+ CAST_ADDR(sockaddr_in).sin_addr.s_addr = inet_addr(host); -+ CAST_ADDR(sockaddr_in).sin_port = htons(port); -+ if ((int)CAST_ADDR(sockaddr_in).sin_addr.s_addr == -1) { -+ // Host was not an IP address - try resolving as DNS name -+ struct hostent *hostinfo; -+ hostinfo = gethostbyname(host); -+ if (hostinfo && hostinfo->h_addr) { -+ CAST_ADDR(sockaddr_in).sin_addr.s_addr = -+ ((struct in_addr *)hostinfo->h_addr)->s_addr; -+ } else { -+ err = errorNumber; -+ throw SocketException("unable to resolve host by name", err); -+ } -+ } -+#endif -+ sock = socket (family, SOCK_STREAM, 0); -+ if (sock == -1) { -+ err = errorNumber; -+#ifdef HAVE_GETADDRINFO -+ freeaddrinfo(ai); -+#endif -+ throw SocketException("unable to create socket", err); - } -- } - -- // Attempt to connect to the remote host -- for (;;) { -- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { -- int e = errorNumber; -- if (e == EINTR) -- continue; -+ // Attempt to connect to the remote host -+ while ((result = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) { -+ err = errorNumber; -+ if (err == EINTR) -+ continue; - closesocket(sock); -- throw SocketException("unable to connect to host", e); -- } else break; -+ break; -+ } -+#ifdef HAVE_GETADDRINFO -+ if (result == 0) -+ break; -+ else -+ continue; - } - -+ freeaddrinfo(ai); -+#endif -+ if (result == -1) -+ throw SocketException("unable connect to socket", err); -+ -+#ifndef WIN32 -+ // - By default, close the socket on exec() -+ fcntl(sock, F_SETFD, FD_CLOEXEC); -+#endif -+ - // Disable Nagle's algorithm, to reduce latency - enableNagles(sock, false); - -diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.cxx ---- vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 2008-06-02 10:23:35.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/rdr/Exception.cxx 2008-06-02 10:28:51.000000000 +0200 -@@ -22,8 +22,23 @@ - #include - #endif - -+#include -+ - using namespace rdr; - -+Exception::Exception(const char *format, ...) { -+ va_list ap; -+ int result; -+ -+ va_start(ap, format); -+ result = vsnprintf(str_, len, format, ap); -+ va_end(ap); -+ -+ /* XXX - ensure that string ends correctly */ -+ if (result > len) -+ str_[len - 1] = '\0'; -+} -+ - SystemException::SystemException(const char* s, int err_) - : Exception(s), err(err_) - { -diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.h ---- vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 2008-06-02 10:23:05.000000000 +0200 -+++ vnc-4_1_2-unixsrc/common/rdr/Exception.h 2008-06-02 10:28:41.000000000 +0200 -@@ -27,13 +27,7 @@ namespace rdr { - struct Exception { - enum { len = 256 }; - char str_[len]; -- Exception(const char* s=0) { -- str_[0] = 0; -- if (s) -- strncat(str_, s, len-1); -- else -- strcat(str_, "Exception"); -- } -+ Exception(const char *format, ...); - virtual const char* str() const { return str_; } - }; - diff --git a/vnc-vncpasswd.patch b/vnc-vncpasswd.patch deleted file mode 100644 index ca94d59..0000000 --- a/vnc-vncpasswd.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- vnc-4_1_1-unixsrc/common/rfb/Password.cxx.vncpasswd 2005-06-27 15:08:30.000000000 +0100 -+++ vnc-4_1_1-unixsrc/common/rfb/Password.cxx 2005-06-27 15:18:28.000000000 +0100 -@@ -38,6 +38,9 @@ - PlainPasswd::PlainPasswd(char* pwd) : CharArray(pwd) { - } - -+PlainPasswd::PlainPasswd(int len) : CharArray(len) { -+} -+ - PlainPasswd::PlainPasswd(const ObfuscatedPasswd& obfPwd) : CharArray(9) { - if (obfPwd.length < 8) - throw rdr::Exception("bad obfuscated password length"); ---- vnc-4_1_1-unixsrc/common/rfb/Password.h.vncpasswd 2005-06-27 15:18:46.000000000 +0100 -+++ vnc-4_1_1-unixsrc/common/rfb/Password.h 2005-06-27 15:18:56.000000000 +0100 -@@ -28,6 +28,7 @@ - public: - PlainPasswd(); - PlainPasswd(char* pwd); -+ PlainPasswd(int l); - PlainPasswd(const ObfuscatedPasswd& obfPwd); - ~PlainPasswd(); - void replaceBuf(char* b); diff --git a/vnc-vsnprintf.patch b/vnc-vsnprintf.patch deleted file mode 100644 index 8abe7d0..0000000 --- a/vnc-vsnprintf.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- vnc-4_1_2-unixsrc/common/rfb/Logger.cxx.vsnprintf 2007-02-26 12:29:25.000000000 +0100 -+++ vnc-4_1_2-unixsrc/common/rfb/Logger.cxx 2007-02-26 12:30:03.000000000 +0100 -@@ -34,7 +34,7 @@ - - using namespace rfb; - --#ifndef HAVE_VSNPRINTF -+/*#ifndef HAVE_VSNPRINTF - #ifdef __RFB_THREADING_IMPL - static Mutex fpLock; - #endif -@@ -63,7 +63,7 @@ - return len; - } - #endif -- -+*/ - - Logger* Logger::loggers = 0; - diff --git a/vnc-xclients.patch b/vnc-xclients.patch deleted file mode 100644 index eff6ca3..0000000 --- a/vnc-xclients.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- vnc-4_1-unixsrc/unix/vncserver.xclients 2005-03-03 23:01:16.000000000 +0000 -+++ vnc-4_1-unixsrc/unix/vncserver 2005-03-03 23:02:26.000000000 +0000 -@@ -42,6 +42,10 @@ - - $defaultXStartup - = ("#!/bin/sh\n\n". -+ "# Uncomment the following two lines for normal desktop:\n". -+ "# unset SESSION_MANAGER\n". -+ "# exec /etc/X11/xinit/xinitrc\n\n". -+ "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n". - "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". - "xsetroot -solid grey\n". - "vncconfig -iconic &\n". diff --git a/vnc-xorg.patch b/vnc-xorg.patch deleted file mode 100644 index ead9870..0000000 --- a/vnc-xorg.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc 2008-10-03 14:27:43.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2008-10-03 14:29:10.000000000 +0200 -@@ -30,7 +30,6 @@ AC_INIT([xorg-server], 1.5.1, [https://b - RELEASE_DATE="23 September 2008" - AC_CONFIG_SRCDIR([Makefile.am]) - AM_INIT_AUTOMAKE([dist-bzip2 foreign]) --AM_MAINTAINER_MODE - - dnl this gets generated by autoheader, and thus contains all the defines. we - dnl don't ever actually use it, internally. -@@ -1214,6 +1213,13 @@ if test "x$XVFB" = xyes; then - AC_SUBST([XVFB_SYS_LIBS]) - fi - -+dnl Xvnc DDX -+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) -+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) -+ -+dnl Xvnc DDX -+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"]) -+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) - - dnl Xnest DDX - -@@ -2178,6 +2184,7 @@ hw/dmx/input/Makefile - hw/dmx/glxProxy/Makefile - hw/dmx/Makefile - hw/vfb/Makefile -+hw/vnc/Makefile - hw/xgl/Makefile - hw/xgl/egl/Makefile - hw/xgl/egl/module/Makefile -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc 2008-10-03 14:27:44.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2008-10-03 14:27:47.000000000 +0200 -@@ -43,7 +43,8 @@ SUBDIRS = \ - $(DMX_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) \ -- $(XPRINT_SUBDIRS) -+ $(XPRINT_SUBDIRS) \ -+ vnc - - DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint - -diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c ---- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc 2008-10-03 14:27:44.000000000 +0200 -+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2008-10-03 14:27:47.000000000 +0200 -@@ -292,6 +292,7 @@ extern void BigReqExtensionInit(INITARGS - #ifdef MITMISC - extern void MITMiscExtensionInit(INITARGS); - #endif -+extern void vncExtensionInit(INITARGS); - #ifdef XIDLE - extern void XIdleExtensionInit(INITARGS); - #endif -@@ -566,6 +567,7 @@ InitExtensions(argc, argv) - #ifdef MITMISC - if (!noMITMiscExtension) MITMiscExtensionInit(); - #endif -+ vncExtensionInit(); - #ifdef XIDLE - if (!noXIdleExtension) XIdleExtensionInit(); - #endif diff --git a/vnc.spec b/vnc.spec deleted file mode 100644 index 2f7b8c5..0000000 --- a/vnc.spec +++ /dev/null @@ -1,872 +0,0 @@ -%define vnc_version 4_1_2 - -Summary: A remote display system -Name: vnc -Version: 4.1.2 -Release: 36%{?dist} -URL: http://www.realvnc.com -Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz -Source1: Makefile.am -Source2: vncserver.init -Source3: vnc-16x16.png -Source4: vnc-24x24.png -Source5: vnc-48x48.png -Patch0: vnc-cookie.patch -Patch1: vnc-gcc4.patch -Patch2: vnc-use-fb.patch -Patch3: vnc-xclients.patch -Patch4: vnc-idle.patch -Patch5: vnc-via.patch -Patch8: vnc-restart.patch -Patch9: vnc-vncpasswd.patch -Patch11: vnc-modular-xorg.patch -Patch12: vnc-nohttpd.patch -Patch15: vnc-viewer-reparent.patch -Patch16: vnc-64bit.patch -Patch17: vnc-select.patch -Patch21: vnc-newfbsize.patch -Patch24: vnc-102434.patch -Patch25: vnc-config.patch -Patch28: vnc-render.patch -Patch31: vnc-autotools.patch -Patch32: vnc-autotools-compile.patch -Patch33: vnc-always_use_fb.patch -Patch34: vnc-vsnprintf.patch -Patch36: vnc-24bit.patch -Patch38: vnc-gcc43.patch -Patch40: vnc-xorg.patch -Patch41: vnc-privates.patch -Patch42: vnc-mieq.patch -Patch43: vnc-allocate.patch -Patch45: vnc-paint.patch -Patch46: vnc-selections.patch -Patch48: vnc-manminor.patch -Patch49: vnc-clipboard.patch -Patch50: vnc-scrollbars.patch -Patch51: vnc-bounds.patch -Patch52: vnc-includes.patch -Patch53: vnc-viewerIPv6.patch -Patch54: vnc-rh212985.patch - -License: GPLv2 -Group: User Interface/Desktops -BuildRequires: perl, openssl-devel, libpciaccess-devel -BuildRequires: zlib-devel libjpeg-devel -BuildRequires: desktop-file-utils >= 0.2.92 -BuildRequires: autoconf, automake, libtool, flex, pkgconfig, patchutils -BuildRequires: expat-devel, freetype-devel -BuildRequires: libX11-devel, xorg-x11-xtrans-devel -BuildRequires: libxkbfile-devel, libXfont-devel -BuildRequires: tcp_wrappers-devel -BuildRequires: libXtst-devel, xorg-x11-util-macros -BuildRequires: libXt-devel, libXv-devel, pixman-devel -BuildRequires: libselinux-devel -BuildRequires: xorg-x11-server-source -BuildRequires: mesa-libGL-devel >= 7.1-0.36, libdrm-devel >= 2.4.0 - -Requires: gtk2 >= 2.6 -Requires: coreutils - -%description -Virtual Network Computing (VNC) is a remote display system which -allows you to view a computing 'desktop' environment not only on the -machine where it is running, but from anywhere on the Internet and -from a wide variety of machine architectures. This package contains a -client which will allow you to connect to other desktops running a VNC -server. - -%package server -Summary: A VNC server -Requires: bash >= 2.0, util-linux, xorg-x11-xauth, chkconfig -Group: User Interface/X - -%description server -The VNC system allows you to access the same desktop from a wide -variety of platforms. This package is a VNC server, allowing others -to access the desktop on your machine. - -%package libs -Summary: VNC Remote framebuffer libraries -Group: User Interface/X - -%description libs -Remote framebuffer library which is used by vncviewer and vncserver - -%prep -%setup -q -n vnc-%{vnc_version}-unixsrc -cp -r %{_datadir}/xorg-x11-server-source unix -mkdir -p unix/xorg-x11-server-source/hw/vnc -cp %{SOURCE1} unix/xorg-x11-server-source/hw/vnc/ - -%patch0 -p1 -b .cookie -%patch1 -p1 -b .gcc4 -%patch2 -p1 -b .use-fb -%patch3 -p1 -b .xclients -%patch4 -p1 -b .idle -%patch5 -p1 -b .via -%patch8 -p1 -b .restart -%patch9 -p1 -b .vncpasswd -%patch11 -p1 -b .modular-xorg -%patch40 -p1 -b .vnc -%patch12 -p1 -b .nohttpd -%patch15 -p1 -b .viewer-reparent -%patch16 -p1 -b .64bit -%patch17 -p1 -b .select -%patch21 -p1 -b .newfbsize -%patch24 -p1 -b .102434 -%patch25 -p1 -b .config -%patch28 -p1 -b .render -%patch31 -p1 -b .autotools -%patch32 -p1 -b .autotools-compile -%patch33 -p1 -b .always_use_fb -%patch34 -p1 -b .vsnprintf -%patch36 -p1 -b .24bit -%patch38 -p1 -b .gcc43 - -cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ - unix/xc/programs/Xserver/Xvnc.man \ - unix/xc/programs/Xserver/vnc/*.{h,cc} \ - unix/xorg-x11-server-source/hw/vnc/ - -pushd unix/xorg-x11-server-source/hw/vnc -%patch41 -p5 -b .privates -popd -%patch42 -p1 -b .mieq -%patch43 -p1 -b .alloc -%patch45 -p1 -b .paint -%patch46 -p1 -b .selections -%patch48 -p1 -b .minor -%patch49 -p1 -b .clipboard -%patch50 -p1 -b .scrollbars -%patch51 -p1 -b .bounds -%patch52 -p1 -b .includes -%patch53 -p1 -b .ipv6 -%patch54 -p1 -b .rh212985 - -%build -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" -export CXXFLAGS="$CFLAGS" - -pushd common -autoreconf -fiv -%configure -make %{?_smp_mflags} -popd - -pushd unix -autoreconf -fiv -%configure -make %{?_smp_mflags} -popd - -pushd unix/xorg-x11-server-source -autoreconf -fiv -%configure --disable-xorg \ - --disable-xnest --disable-xvfb \ - --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ - --with-pic \ - --disable-xorgcfg \ - --disable-xprint \ - --disable-static \ - --disable-composite \ - --disable-xtrap \ - --enable-xcsecurity \ - --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ - --with-fontdir=%{_datadir}/X11/fonts \ - --with-os-name="Fedora 10" \ - --with-os-vendor="Red Hat, Inc." \ - --with-xkb-output=%{_localstatedir}/lib/xkb \ - --with-rgb-path=%{_datadir}/X11/rgb \ - --enable-install-libxf86config \ - --disable-xevie \ - --disable-dri2 \ - --enable-glx \ - --disable-config-dbus \ - --disable-config-hal \ - --with-dri-driver-path=%{_libdir}/dri - -make %{?_smp_mflags} -popd - -%install -rm -rf $RPM_BUILD_ROOT - -cd common; -make install DESTDIR=$RPM_BUILD_ROOT - -cd ../unix - -mandst=$RPM_BUILD_ROOT%{_mandir}/man1 -mkdir -p $mandst -for f in xorg-x11-server-source/hw/vnc/Xvnc vncviewer/vncviewer vncpasswd/vncpasswd \ - vncconfig/vncconfig vncserver x0vncserver/x0vncserver; do - - cp -pf $f.man $mandst/`basename $f.1` - chmod 0444 $mandst/`basename $f.1` -done -make install DESTDIR=$RPM_BUILD_ROOT -cp vncserver $RPM_BUILD_ROOT/usr/bin - -cd xorg-x11-server-source/hw/vnc -make install DESTDIR=$RPM_BUILD_ROOT -cd ../../../ - -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d -install -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vncserver - -mkdir -p $RPM_BUILD_ROOT/etc/sysconfig -cat > $RPM_BUILD_ROOT/etc/sysconfig/vncservers << "EOF" -# The VNCSERVERS variable is a list of display:user pairs. -# -# Uncomment the lines below to start a VNC server on display :2 -# as my 'myusername' (adjust this to your own). You will also -# need to set a VNC password; run 'man vncpasswd' to see how -# to do that. -# -# DO NOT RUN THIS SERVICE if your local area network is -# untrusted! For a secure way of using VNC, see -# . - -# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP. - -# Use "-nohttpd" to prevent web-based VNC clients connecting. - -# Use "-localhost" to prevent remote VNC clients connecting except when -# doing so through a secure tunnel. See the "-via" option in the -# `man vncviewer' manual page. - -# VNCSERVERS="2:myusername" -# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost" -EOF -chmod 644 $RPM_BUILD_ROOT/etc/sysconfig/vncservers - -mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps -install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/vnc.png -install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/vnc.png -install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/vnc.png -mkdir -p $RPM_BUILD_ROOT/etc/X11/applnk/Applications -cat > vncviewer.desktop << EOF -[Desktop Entry] -Encoding=UTF-8 -Name=VNC Viewer -Comment=Connect to VNC server and display remote desktop -Exec=/usr/bin/vncviewer -Icon=vnc.png -Terminal=false -Type=Application -StartupWMClass=VNC Viewer: Connection Details -EOF -# Desktop file installation. -mkdir $RPM_BUILD_ROOT%{_datadir}/applications -desktop-file-install --vendor vnc --delete-original \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - --add-category X-Red-Hat-Extra \ - --add-category Network \ - --add-category Application \ - vncviewer.desktop - -# remove unwanted files -rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.a -rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.la -rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.so -rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libvnc.la - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -touch --no-create %{_datadir}/icons/hicolor -if [ -x /usr/bin/gtk-update-icon-cache ] && [ -f %{_datadir}/icons/hicolor/index.theme ]; then - gtk-update-icon-cache -q %{_datadir}/icons/hicolor -fi - -%postun -touch --no-create %{_datadir}/icons/hicolor -if [ -x /usr/bin/gtk-update-icon-cache ] && [ -f %{_datadir}/icons/hicolor/index.theme ]; then - gtk-update-icon-cache -q %{_datadir}/icons/hicolor -fi - -%post server -if [ "$1" = 1 ]; then - /sbin/chkconfig --add vncserver -fi - -%preun server -if [ "$1" = 0 ]; then - /sbin/service vncserver stop >/dev/null 2>&1 - /sbin/chkconfig --del vncserver -fi - -%post libs -/sbin/ldconfig - -%postun libs -/sbin/ldconfig - -%files -%defattr(-,root,root) -%doc LICENCE.txt README -%{_bindir}/vncviewer -%{_datadir}/applications/* -%{_mandir}/man1/vncviewer.1* -%{_datadir}/icons/hicolor/*/*/* - -%files server -%defattr(-,root,root) -%attr(0755,root,root) /etc/rc.d/init.d/vncserver -%config(noreplace) /etc/sysconfig/vncservers -%{_bindir}/Xvnc -%{_bindir}/vncpasswd -%{_bindir}/vncconfig -%{_bindir}/vncserver -%{_bindir}/x0vncserver -%{_mandir}/man1/Xvnc.1* -%{_mandir}/man1/vncpasswd.1* -%{_mandir}/man1/vncconfig.1* -%{_mandir}/man1/vncserver.1* -%{_mandir}/man1/x0vncserver.1* -%{_libdir}/xorg/modules/extensions/libvnc.so - -%files libs -%defattr(-,root,root) -%{_libdir}/librfb.so.* - -%changelog -* Sun Jan 18 2009 Tomas Mraz 4.1.2-36 -- rebuild with new openssl - -* Fri Oct 03 2008 Adam Tkac 4.1.2-35 -- updated patches due rpm 4.6 (#465099) -- build with -O2 - -* Mon Jul 28 2008 Adam Tkac 4.1.2-34.2 -- removed initscript %%config attribute - -* Fri Jul 18 2008 Adam Tkac 4.1.2-34.1 -- removed buildroot - -* Thu Jul 17 2008 Adam Tkac 4.1.2-34 -- vncserver script returns error when Xvnc fails to start - -* Wed Jul 16 2008 Adam Tkac 4.1.2-33.1 -- update patches due rpm 4.6 - -* Thu Jul 03 2008 Adam Tkac 4.1.2-33 -- build with -rdynamic to make swrast_dri driver happy - -* Tue Jul 01 2008 Adam Tkac 4.1.2-32 -- enabled XKEYBOARD extension (#450033) -- icons have correct permissions (#453495) - -* Mon Jun 02 2008 Adam Tkac 4.1.2-31.1 -- minor cleanup in IPv6 patch - -* Wed May 29 2008 Adam Tkac 4.1.2-31 -- substituted vnc-210617.patch with improved version - vnc-viewerIPv6.patch - (#438422) - -* Fri Apr 25 2008 Adam Tkac 4.1.2-30 -- rebuild against new mesa to fix GLX under anaconda (#443635) - -* Wed Apr 09 2008 Adam Tkac 4.1.2-29 -- rebuild with -O2 - -* Wed Mar 19 2008 Adam Tkac 4.1.2-28 -- validate framebuffer bounds before GetImage call (#430468, improved fix) - -* Fri Mar 14 2008 Adam Tkac 4.1.2-27.1 -- fixed assertion failed when only one scrollbar should be used (#428117) - -* Thu Mar 13 2008 Adam Tkac 4.1.2-27 -- removed obsolete vnc-ppc64.patch -- minor vncviewer manpage fixes (#427672, #427701) -- fixed overflow on heap (#430468) -- start vncconfig earlier in vncserver (#430965) -- next BuildRequires cleanup - -* Tue Mar 11 2008 Adam Tkac 4.1.2-26 -- BuildRequires and Requires cleanup -- don't build java viewer (problems due new gcj) -- use xorg codebase from xorg-x11-server-source package again - - vnc-selection.patch - new xserver selection API/ABI - - vnc-xkb.patch - disable XKEYBOARD extension - - vnc-paint.patch - PaintWindow{Background,Border} hooks have been removed - - vnc-privates.patch - update devPrivates handling - - vnc-mieq.patch - use event queue to handle input events - -* Mon Feb 18 2008 Fedora Release Engineering - 4.1.2-25 -- Autorebuild for GCC 4.3 - -* Wed Jan 09 2008 Adam Tkac 4.1.2-24 -- start use F8 xserver codebase -- compat patches and gcc 4.3 patches -- use catalogue:/etc/X11/fontpath.d,built-ins as default fontpath - (#390971) - -* Tue Oct 23 2007 Adam Tkac 4.1.2-23 -- disabled Composite extension (#242280, #339811) - -* Mon Sep 24 2007 Adam Tkac 4.1.2-22 -- obsoleted vnc-s390.patch -- build with --disable-xorg - -* Wed Aug 22 2007 Adam Tkac 4.1.2-21 -- rebuild (BuildID feature) -- GPLv2 license - -* Mon Aug 06 2007 Adam Tkac 4.1.2-20.2 -- updated vnc-s390 patch to latest xorg - -* Wed Aug 01 2007 Adam Tkac 4.1.2-20.1 -- rebuild - -* Tue Jul 31 2007 Adam Tkac 4.1.2-20 -- vnc service is now disabled in all runlevels by default (#250157) - -* Tue Jul 17 2007 Adam Tkac 4.1.2-19 -- initscript is ready for parallel booting (#247092) - -* Thu Jun 08 2007 Adam Tkac 4.1.2-18 -- added 24bit support to Xvnc -- handle RENDER extension better - (+ moved module_crash patch into render patch) - -* Mon Apr 23 2007 Adam Tkac 4.1.2-17 -- removed patch to #188169 because patching this bug could do - more things bad than good -- removed int10 module from vnc (with-int10 option) - -* Tue Mar 27 2007 Adam Tkac 4.1.2-16.fc7 -- fixed vnc module crashing (#234124) -- vncviewer has been moved from Utility group to Network group (#231765) - -* Mon Mar 05 2007 Adam Tkac 4.1.2-15.fc7 -- improved vnc-always_use_fb patch (some screen defects on 64bits) -- removed xserver tarball from source list - -* Fri Mar 02 2007 Adam Tkac 4.1.2-14.fc7 -- enabled RENDER, Composite and GLX extensions by default on all architectures -- new relation between Xvnc and xorg's source. Xvnc now uses latest xorg's sources - from xorg-x11-server-source package -- fired away obsolete patches - - vnc-mesa-6.5.2.patch - - vnc-mesa.patch - - vnc-selinux.patch - - vnc-render-sigfault.patch - - vnc-fontpath.patch - - vnc-null-interface.patch - -* Mon Feb 26 2007 Adam Tkac 4.1.2-13.fc7 -- remove wild implementation of vsnprintf (this caused sigfaults on 64bits) (#229702) -- added post & postun sections to vnc-libs -- menu tooltip is HIG compliant (#229941) -- specfile has been standardized (checked by rpmlint) - -* Fri Feb 23 2007 Adam Tkac 4.1.2-12.fc7 -- new colormap policy in Xvnc -- Xvnc now always use framebuffer (like Xvfb) -- obsolete patches have been removed - -* Wed Feb 16 2007 Adam Tkac 4.1.2-11.fc7 -- major build-process changes in vnc - - vnc is now completely built by autotools -- new package (vnc-libs) contains remote framebuffer library - and vncviewer and server is linked against this -- specfile cleanup - -* Mon Jan 15 2007 Adam Tkac 4.1.2-10.fc7 -- fixed render crashing when run in 8bpp - -* Mon Jan 08 2007 Adam Tkac 4.1.2-9.fc7 -- enable render extensions by default on s390 & s390x - -* Wed Dec 13 2006 Adam Tkac 4.1.2-8.1.fc7 -- changed __ppc64__ to __ppc__ in vnc-render.patch - all powerpc has render enabled by default, other archs no - -* Mon Dec 11 2006 Adam Tkac 4.1.2-8.fc7 -- fixed building against mesa-6.5.2 - -* Tue Dec 05 2006 Adam Tkac 4.1.2-7.2.fc7 -- fixed vnc-102434.patch - potential buffer overflow error -- only ppc64 architecture has enabled render extensions - default (conflict between glx&render) - -* Mon Dec 4 2006 Thomas Woerner 4.1.2-7.1.fc7 -- tcp_wrappers has a new devel and libs sub package, therefore changing build - requirement for tcp_wrappers to tcp_wrappers-devel - -* Thu Nov 23 2006 Adam Tkac 4.1.2-7.fc7 -- Xvnc now starts with render extensions. We need test it. Disable with -render option -- vncserver requires xorg-x11-xauth - -* Tue Nov 14 2006 Adam Tkac 4.1.2-6.fc7 -- update to xorg-x11-server to version 1.1.1 -- fixed OpenGL extensions (#213215) -- fixed vnc-188169.patch (#213609) -- fixed RENDER problems (#162304) -- build requires libstdc++-devel and gcc-c++, autoconf213 and libselinux-devel - -* Wed Oct 25 2006 Adam Tkac 4.1.2-5 -- added xorg-x11-fonts-base dependency -- fixed vncconfig crash on x64 (#179635) - -* Tue Oct 17 2006 Adam Tkac 4.1.2-4 -- IPv6 support to vncviewer has been added (#210617) -- fixed conflict between "locate pointer" option in control-center - and vncviewer (#188169) -- fixed software group of vnc (#209229) -- added support to get password from stdin (#102434) - -* Mon Jul 18 2006 Jitka Kudrnacova 4.1.2-3 -- vncviewer now supports NewFBSize pseudoencoding (#180939) -- do not BuildRequire libdrm-devel on s390, s390x, ppc64 it is not available there - -* Tue Jun 13 2006 Jeremy Katz 4.1.2-2 -- update xorg-x11-server to 1.1.0 to fix crashes in anaconda - -* Fri May 26 2006 Jitka Kudrnacova 4.1.2-1 -- enable OpenGL support - -* Thu May 25 2006 Jitka Kudrnacova 4.1.2-0.1 -- fixed building on ppc64 - -* Thu May 18 2006 Jitka Kudrnacova 4.1.2-0 -- update to version 4.1.2 - -* Wed May 10 2006 Jitka Kudrnacova 4.1.1-38 -- fixed crash of Xnvc caused by a NULL pointer in interfaces (bug #187607) -- This also fixes crash of Xvnc when vpnc is running (bug #187069) -- don't build on ppc64 due to intermittent build problems - -* Fri Apr 21 2006 Jitka Kudrnacova 4.1.1-37 -- removed liblbxutil-devel from BuildRequires - -* Tue Feb 28 2006 Jitka Kudrnacova 4.1.1-36 -- with default cofiguration, /etc/init.d/vncserver start will say - "no displays configured" (bug #182161) - -* Fri Feb 10 2006 Jesse Keating - 4.1.1-35.1 -- bump again for double-long bug on ppc(64) - -* Wed Feb 08 2006 Jitka Kudrnacova 4.1.1-35 -- Add a test for existence of index.theme before calling - gtk-update-icon-cache in post-(un)installation script, - bug #179704 - -* Tue Feb 07 2006 Jesse Keating - 4.1.1-34.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Tue Jan 31 2006 Tim Waugh 4.1.1-34 -- Updated xorg-x11-server to 1.0.1-1. - -* Tue Jan 3 2006 Tim Waugh 4.1.1-33 -- Use VNC-provided Xregion (bug #176435). -- Prevent restorecon error message when not present (bug #176654). - -* Fri Dec 23 2005 Tim Waugh 4.1.1-32 -- Use system libtool to fix libvnc.so build (bug #176435). - -* Wed Dec 21 2005 Tim Waugh 4.1.1-31 -- Rebase on xorg-x11-server-1.0.0-2. - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Thu Dec 8 2005 Tim Waugh 4.1.1-30 -- Enable Xdmcp (bug #175298). - -* Thu Dec 8 2005 Tim Waugh 4.1.1-29 -- Fix x0vncserver (bug #172410). - -* Tue Dec 6 2005 Tim Waugh 4.1.1-28 -- Enable all the extensions, which were accidentally disabled. - -* Tue Dec 6 2005 Tim Waugh 4.1.1-27 -- Fix 64-bit server (bug #174702). -- Build requires freetype-devel. -- Build requires libXext-devel, libXtst-devel, automake, libtool, pkgconfig, - libfontenc-devel, xorg-x11-util-macros. - -* Thu Dec 1 2005 Tim Waugh 4.1.1-26 -- Apply patch to allow vncviewer window reparenting (bug #174640). -- Build again on s390/s390x (bug #174569). - -* Thu Dec 1 2005 Tim Waugh 4.1.1-25 -- Actually initialise the vnc extension in Xvnc. -- Disable lbx. - -* Thu Dec 1 2005 Tim Waugh 4.1.1-24 -- Build X extension module again. -- Install X extension module into modules/ directory. -- Remove xscreensaver patch, since it causes badness. - -* Fri Nov 25 2005 Tim Waugh 4.1.1-23 -- ExcludeArch s390 s390x (see bug #174569). -- Re-base on modular xorg-x11 (bug #173323). -- Build requires modular X things. - -* Fri Nov 18 2005 Tim Waugh 4.1.1-22 -- Extension module is not available on all architectures. - -* Fri Nov 18 2005 Tim Waugh 4.1.1-21 -- Install extension module into the correct directory. - -* Fri Nov 18 2005 Tim Waugh 4.1.1-20 -- Fix font path correctly (bug #173160). - -* Wed Nov 16 2005 Tim Waugh 4.1.1-19 -- Remove xorg-x11-devel build requirement to see what breaks. -- Hack font paths (bug #173160). - -* Tue Nov 15 2005 Tim Waugh 4.1.1-18 -- Build requires xorg-x11-devel not XFree86-devel. - -* Tue Sep 6 2005 Tim Waugh 4.1.1-17 -- Make vncviewer prevent xscreensaver from blanking screen (bug #106552). - -* Thu Aug 11 2005 Tim Waugh 4.1.1-16 -- Added -nohttpd option to vncserver, based on patch from bug #161288. -- Included -nohttpd, -nolisten tcp, and -localhost options in example - sysconfig file (bug #165334). - -* Mon Aug 8 2005 Tim Waugh 4.1.1-15 -- Fixed xorg-x11 build (__SSP__ gets set by -fstack-protector). -- Fixed desktop file again (bug #63689). - -* Wed Jul 14 2005 Tim Waugh 4.1.1-14 -- Pulled RENDER support altogether. It can cause Xvnc to get into a busy - loop somehow. - -* Wed Jul 13 2005 Tim Waugh 4.1.1-13 -- RENDER clipping fix from Mark McLoughlin. - -* Mon Jun 27 2005 Tim Waugh 4.1.1-12 -- Fixed vncpasswd crash (bug #160471). - -* Wed Jun 22 2005 Tim Waugh -- Updated URL in vncservers file (bug #161334). - -* Tue Jun 21 2005 Tim Waugh 4.1.1-11 -- Don't ship vncconfig.py any more. -- Enable render by default for further testing. - -* Mon Jun 20 2005 Tim Waugh -- Build requires expat-devel (bug #160982). - -* Wed Apr 27 2005 Jeremy Katz - 4.1.1-10 -- silence %%post - -* Fri Apr 15 2005 Tim Waugh 4.1.1-9 -- Disable render by default. There are still screen artifacts from it. - -* Fri Apr 1 2005 Tim Waugh 4.1.1-8 -- Further render patch fix for Peter Åstrand. - -* Thu Mar 31 2005 Tim Waugh 4.1.1-7 -- Render patch fix from Peter Åstrand. Enabled render by default again. - -* Mon Mar 28 2005 Christopher Aillon 4.1.1-6 -- rebuilt - -* Fri Mar 25 2005 Christopher Aillon 4.1.1-5 -- Update the GTK+ theme icon cache on (un)install - -* Thu Mar 24 2005 Tim Waugh 4.1.1-4 -- Upgraded base package to xorg-x11-6.8.2-13. - -* Thu Mar 17 2005 Tim Waugh 4.1.1-3 -- Disable render by default (+render turns it back on). - -* Fri Mar 11 2005 Tim Waugh 4.1.1-2 -- 4.1.1 (with 4.1 Java viewer). -- No longer need module patch. - -* Thu Mar 10 2005 Tim Waugh 4.1-0.2 -- Improved render patch from Peter Åstrand. - -* Thu Mar 3 2005 Tim Waugh 4.1-0.1 -- 4.1 (but still 4.0 Java viewer for the moment). -- Removed sparc patch. -- Fixed VNC module link line (from upstream). - -* Wed Mar 2 2005 Tim Waugh 4.0-15 -- Upgraded base package to xorg-x11-6.8.2-6. -- Rebuild for new GCC. - -* Wed Feb 23 2005 Tim Waugh 4.0-14 -- Render support from Peter Åstrand. - -* Thu Feb 3 2005 Tim Waugh -- Don't restart the vncserver service on upgrade. - -* Tue Feb 1 2005 Tim Waugh 4.0-13 -- Upgraded base package to xorg-x11-6.8.1.903-2. - -* Fri Jan 7 2005 Tim Waugh -- Build requires patchutils (bug #144450). - -* Wed Jan 5 2005 Tim Waugh 4.0-12 -- Don't use initlog in the initscript. - -* Fri Dec 31 2004 Tim Waugh -- Cookie generation improvement from Jon Peatfield. - -* Mon Dec 13 2004 Tim Waugh 4.0-11 -- Create /tmp/.X11-unix if it doesn't already exist. - -* Wed Nov 24 2004 Tim Waugh 4.0-10 -- Use fastjar, not jar, so that the package rebuilds (bug #140671). - -* Wed Nov 17 2004 Tim Waugh 4.0-9 -- Don't build hw/xfree86/etc. -- Prevent xorg-x11 build failure in rman. -- Build requires autoconf, flex, bison. -- Use correct PATH setting when started from initscript (bug #84167). - -* Wed Oct 6 2004 Tim Waugh 4.0-8 -- Use runuser not su in initscript (bug #134594). - -* Wed Sep 29 2004 Tim Waugh 4.0-7 -- Upgraded base package to xorg-x11-6.8.1-4. - -* Tue Aug 31 2004 Tim Waugh 4.0-6 -- Upgraded base package to xorg-x11-6.7.99.903-1. - -* Fri Aug 27 2004 Tim Waugh 4.0-5 -- Built for Fedora Core 2. - -* Wed Aug 25 2004 Tim Waugh 4.0-4 -- Apply and enable Kristian Høgsberg's --use-fb patch. - -* Mon Aug 2 2004 Tim Waugh -- Fixed vnc-via patch (bug #128940). - -* Thu Jun 24 2004 Tim Waugh 4.0-3 -- 4.0. -- No longer need hotspot patch. -- Add sparc patch from bug #126382. - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Tue Jun 1 2004 Tim Waugh 4.0-1.beta5.6 -- Turn ppc64 builds on again. - -* Tue Jun 1 2004 Tim Waugh 4.0-1.beta5.5 -- Exclude ppc64 until the build machine is fixed. -- Undo last vnc.def change to get vnc.so back. - -* Fri May 28 2004 Tim Waugh 4.0-1.beta5.4 -- Further vnc.def fix. -- Fix cursor handling for hotspots outside the bounding rectangle. - -* Thu May 27 2004 Tim Waugh 4.0-1.beta5.3 -- Fix ppc64 build. -- Fix debuginfo package. -- Another fix for REGION_INIT usage. - -* Wed May 26 2004 Tim Waugh 4.0-1.beta5.2 -- Switch to xorg-x11 (bug #119530). - -* Thu May 20 2004 Tim Waugh 4.0-1.beta5.1 -- 4.0beta5. -- Removed compat, f8 and crash patches. -- Fixed via patch now that NULL is not a valid parameter default. -- Updated gcc34 patch. - -* Wed Apr 14 2004 Tim Waugh 4.0-1.beta4.11 -- Allow parameters to be specified in the init script (bug #60176). - -* Wed Mar 31 2004 Tim Waugh 4.0-1.beta4.10 -- Back down to XFree86 again, since the Xvnc binary in 4.0-1.beta4.9 doesn't - work at all. - -* Tue Mar 23 2004 Tim Waugh 4.0-1.beta4.9 -- Build against xorg-x11. - -* Tue Mar 02 2004 Elliot Lee -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Sun Feb 1 2004 Tim Waugh -- Build fixes for GCC 3.4. - -* Fri Jan 23 2004 Tim Waugh 4.0-0.beta4.8 -- Fix last fix (bug #114063). - -* Thu Jan 22 2004 Tim Waugh 4.0-0.beta4.7 -- Restart connect() if a signal interrupts it (bug #114063). - -* Thu Nov 27 2003 Tim Waugh -- Fixed -via parsing bug in vncviewer (bug #110919). - -* Fri Nov 14 2003 Tim Waugh 4.0-0.beta4.6 -- F8 fix (bug #109377). - -* Mon Nov 10 2003 Tim Waugh 4.0-0.beta4.5 -- Better fix for bug #107455. - -* Sat Nov 8 2003 Tim Waugh 4.0-0.beta4.4 -- Fixed zero-sized cursor problem (bug #107455). - -* Thu Oct 2 2003 Tim Waugh -- Added icons (bug #105820). - -* Fri Sep 19 2003 Tim Waugh 4.0-0.beta4.3 -- Avoid a potential Xvnc crash (bug #104702). - -* Fri Sep 5 2003 Tim Waugh 4.0-0.beta4.2 -- 4.0beta4. -- No longer need compile, dotvnc, norender patches. -- Don't be so picky about which architectures to build on any more. -- Build requires XFree86-devel. - -* Thu Aug 28 2003 Tim Waugh 4.0-0.beta3.10 -- Fixed SSH tunnelling support (bug #102213). - -* Fri Aug 22 2003 Tim Waugh 4.0-0.beta3.9 -- Add SSH tunnelling support (bug #102213). - -* Wed Aug 20 2003 Tim Waugh 4.0-0.beta3.8 -- Disable IdleTimeout by default. - -* Mon Aug 18 2003 Tim Waugh 4.0-0.beta3.7 -- Ship vncconfig(1) front-end. -- In default xstartup, exec /etc/vnc/xstartup if it exists. -- Track XFree86 package. -- Fix compilation (bug #102547). -- Fix vncpasswd (bug #102435). - -* Tue Aug 12 2003 Tim Waugh 4.0-0.beta3.6 -- Use patched tarball from XFree86 package. -- Build Java VNC viewer. - -* Wed Aug 6 2003 Tim Waugh 4.0-0.beta3.5.1 -- Rebuilt. - -* Wed Aug 6 2003 Tim Waugh 4.0-0.beta3.5 -- Make default xclients file include instructions for 'normal' desktop. -- Server subpackage doesn't require XFree86. -- desktop file: add StartupWMClass tag -- init script: set USER (bug #101674). -- init script: pause when restarting to give the server a chance to stop - (bug #84817). -- vncpasswd: create ~/.vnc if it doesn't already exist. - -* Tue Aug 5 2003 Tim Waugh 4.0-0.beta3.4 -- Allow old -dontdisconnect option, and behave a bit more like Xvnc used to - if it is given (default to no password, use RFB3.3 protocol). -- Fixed DisconnectClients bug. - -* Mon Aug 4 2003 Tim Waugh 4.0-0.beta3.3 -- Disable RENDER altogether for Xvnc. - -* Mon Aug 4 2003 Tim Waugh 4.0-0.beta3.2 -- Reinstated init script. -- Add work-around for Xcursor bug. - -* Thu Jul 31 2003 Tim Waugh 4.0-0.beta3.1 -- Initial package. diff --git a/vncserver.init b/vncserver.init deleted file mode 100755 index 3a5bf57..0000000 --- a/vncserver.init +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# -# chkconfig: - 91 35 -# description: Starts and stops vncserver. \ -# used to provide remote X administration services. - -### BEGIN INIT INFO -# Provides: vncserver -# Required-Start: $network $named -# Required-Stop: $network $named -# Default-Start: -# Default-Stop: 0 1 2 3 4 5 6 -# Short-Description: start|stop|restart|try-restart|status|force-reload vncserver -# Description: control vncserver which exports your desktop -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -[ -r /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers - -prog=$"VNC server" - -RETVAL=0 - -start() { - # Source networking configuration. - . /etc/sysconfig/network - - # Check that networking is up. - [ ${NETWORKING} = "no" ] && exit 1 - - [ -x /usr/bin/vncserver ] || exit 5 - [ -x /usr/bin/Xvnc ] || exit 5 - - echo -n $"Starting $prog: " - RETVAL=0 - if [ ! -d /tmp/.X11-unix ] - then - mkdir -m 1777 /tmp/.X11-unix || : - restorecon /tmp/.X11-unix 2>/dev/null || : - fi - - for display in ${VNCSERVERS} - do - SERVS=1 - echo -n "${display} " - DISP="${display%%:*}" - USER="${display##*:}" - VNCUSERARGS="${VNCSERVERARGS[${DISP}]}" - runuser -l ${USER} -c "cd ~${USER} && [ -r .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}" - RETVAL=$? - [ "$RETVAL" -eq 0 ] || break - done - if [ -z "$SERVS" ]; then - echo -n "no displays configured " - failure - RETVAL=6 - else - if [ "$RETVAL" -eq 0 ]; then - success $"vncserver startup" - touch /var/lock/subsys/vncserver - else - failure $"vncserver start" - fi - fi - echo - return "$RETVAL" -} - -stop() { - echo -n $"Shutting down $prog: " - for display in ${VNCSERVERS} - do - echo -n "${display} " - export USER="${display##*:}" - runuser ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1 - done - RETVAL=$? - [ "$RETVAL" -eq 0 ] && success $"vncserver shutdown" || \ - failure $"vncserver shutdown" - echo - [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver - return "$RETVAL" -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|force-reload) - stop - sleep 3 - start - ;; - condrestart) - echo "condrestart is obsolete, use try-restart instead" - if [ -e /var/lock/subsys/vncserver ]; then - stop - sleep 3 - start - fi - ;; - try-restart) - if [ -e /var/lock/subsys/vncserver ]; then - stop - sleep 3 - start - fi - ;; - status) - status Xvnc - RETVAL=$? - ;; - *) - echo $"Usage: $0 {start|stop|restart|try-restart|status|force-reload}" - exit 3 -esac - -exit "$RETVAL" - From 4eb77e46adfe7deb2b8104bb34fcad699611f1bf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 18:06:27 +0000 Subject: [PATCH 38/38] dist-git conversion --- .cvsignore => .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .cvsignore => .gitignore (100%) diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore