diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 3e94b2b..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile for source rpm: vnc -# $Id$ -NAME := vnc -SPECFILE = $(firstword $(wildcard *.spec)) - -include ../common/Makefile.common 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; 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-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 1003cac..0000000 --- a/vnc-s390.patch +++ /dev/null @@ -1,82 +0,0 @@ ---- 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 @@ - 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-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 @@ - : "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-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 @@ - 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 @@ - - /* 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-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__) && \ - !defined(__mc68000__) && \ - !defined(__sparc__) && \ -- !defined(__mips__) -+ !defined(__mips__) && \ -+ !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__) && \ - !defined(__powerpc__) && \ - !defined(__mips__) && \ -- !defined(__ia64__) -+ !defined(__ia64__) && \ -+ !defined(__s390__) && \ -+ !defined(__s390x__) - outb(0x80, 0x00); - #endif - } diff --git a/vnc.spec b/vnc.spec index 2920a9b..3f4e40f 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: 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 @@ -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,9 @@ Patch32: vnc-autotools-compile.patch Patch33: vnc-always_use_fb.patch Patch34: vnc-vsnprintf.patch Patch35: vnc-module_crash.patch +Patch36: vnc-24bit.patch +Patch37: vnc-noxorg.patch +Patch38: vnc-bounds.patch License: GPL Group: User Interface/Desktops BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -98,9 +100,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 +114,8 @@ popd %patch33 -p1 -b .always_use_fb %patch34 -p1 -b .vsnprintf %patch35 -p1 -b .module_crash +%patch36 -p1 -b .24bit +%patch37 -p1 -b .noxorg cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ unix/xc/programs/Xserver/Xvnc.man \ @@ -126,6 +127,8 @@ 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 +%patch38 -p1 -b .bounds + %build cd common autoreconf --install --force @@ -142,13 +145,13 @@ make %{?_smp_mflags} cd xorg-x11-server-source aclocal; automake -a; autoconf -%configure --enable-xorg --disable-xnest --disable-xvfb \ +%configure --disable-xorg --disable-xnest --enable-xvfb \ --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ --with-pic \ --disable-xorgcfg \ --disable-xprint \ --disable-static \ - --enable-composite \ + --disable-composite \ --enable-xtrap \ --enable-xcsecurity \ --with-default-font-path="unix/:7100,built-ins" \ @@ -313,6 +316,19 @@ fi %{_libdir}/librfb.so.* %changelog +* Wed Mar 19 2008 Adam Tkac 4.1.2-20 +- validate framebuffer bounds before GetImage call (#430468) + +* Tue Oct 23 2007 Adam Tkac 4.1.2-19 +- disabled Composite extension (#242280, #339811) + +* Mon Sep 24 2007 Adam Tkac 4.1.2-18.1 +- build with --disable-xorg (#271141) + +* Mon Jun 11 2007 Adam Tkac 4.1.2-18.fc7 +- Xvnc now has 24bit support (#242277) and correct RENDER initialization +- updated s390 patch to latest Xorg + * 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