summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-11-15 21:06:42 +0000
committerMike Frysinger <vapier@gentoo.org>2012-11-15 21:06:42 +0000
commit11e7d73d4292b2a5830bea072b1fbcb48f0c32a7 (patch)
treeaa288ac49ec587d7452aad4222f4836d1d3ece89 /x11-misc
parentPull in the services as without them almost nothing in osc works. (diff)
downloadgentoo-2-11e7d73d4292b2a5830bea072b1fbcb48f0c32a7.tar.gz
gentoo-2-11e7d73d4292b2a5830bea072b1fbcb48f0c32a7.tar.bz2
gentoo-2-11e7d73d4292b2a5830bea072b1fbcb48f0c32a7.zip
Fix from upstream/ChromiumOS for cleaning up shared memory.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/x11vnc/ChangeLog8
-rw-r--r--x11-misc/x11vnc/files/x11vnc-0.9.13-shm-cleanup.patch35
-rw-r--r--x11-misc/x11vnc/x11vnc-0.9.13-r1.ebuild75
3 files changed, 117 insertions, 1 deletions
diff --git a/x11-misc/x11vnc/ChangeLog b/x11-misc/x11vnc/ChangeLog
index c93384ec3cd5..e32aed267662 100644
--- a/x11-misc/x11vnc/ChangeLog
+++ b/x11-misc/x11vnc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-misc/x11vnc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/x11vnc/ChangeLog,v 1.101 2012/07/10 19:11:14 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/x11vnc/ChangeLog,v 1.102 2012/11/15 21:06:42 vapier Exp $
+
+*x11vnc-0.9.13-r1 (15 Nov 2012)
+
+ 15 Nov 2012; Mike Frysinger <vapier@gentoo.org>
+ +files/x11vnc-0.9.13-shm-cleanup.patch, +x11vnc-0.9.13-r1.ebuild:
+ Fix from upstream/ChromiumOS for cleaning up shared memory.
10 Jul 2012; Brent Baude <ranger@gentoo.org> x11vnc-0.9.13.ebuild:
Marking x11vnc-0.9.13 ppc64 for bug 381699
diff --git a/x11-misc/x11vnc/files/x11vnc-0.9.13-shm-cleanup.patch b/x11-misc/x11vnc/files/x11vnc-0.9.13-shm-cleanup.patch
new file mode 100644
index 000000000000..876ed9eb6de0
--- /dev/null
+++ b/x11-misc/x11vnc/files/x11vnc-0.9.13-shm-cleanup.patch
@@ -0,0 +1,35 @@
+fix that is already in upstream x11vnc-0.9.14 dev
+
+from ChromiumOS:
+
+x11vnc: Fix shm close on early shutdown.
+
+Global structures {scanline,fullscreen,scanrect}_shm are initialized to
+zero, including the .shmid field. This creates problems when shutdown /
+clean_shm is called before these structures are properly initialized in
+initialize_polling_images. shm_delete will be called on the structure,
+and since the shmid isn't -1, shmctl(id, IPC_RMID...) will be called for
+id=0. id=0 is in fact a valid shmid, and it might belong to some other
+shared memory for some other processes, creating many potential problems.
+
+Fix is to initialize shmid to -1 to indicate that it is in fact
+uninitialized.
+
+https://gerrit.chromium.org/gerrit/37971
+
+--- a/x11vnc/x11vnc_defs.c
++++ b/x11vnc/x11vnc_defs.c
+@@ -82,10 +82,10 @@
+ XImage *raw_fb_image = NULL; /* the raw fb */
+
+ /* corresponding shm structures */
+-XShmSegmentInfo scanline_shm;
+-XShmSegmentInfo fullscreen_shm;
++XShmSegmentInfo scanline_shm = {.shmid = -1};
++XShmSegmentInfo fullscreen_shm = {.shmid = -1};
+ XShmSegmentInfo *tile_row_shm; /* for all possible row runs */
+-XShmSegmentInfo snaprect_shm;
++XShmSegmentInfo snaprect_shm = {.shmid = -1};
+
+ /* rfb screen info */
+ rfbScreenInfoPtr screen = NULL;
diff --git a/x11-misc/x11vnc/x11vnc-0.9.13-r1.ebuild b/x11-misc/x11vnc/x11vnc-0.9.13-r1.ebuild
new file mode 100644
index 000000000000..0aee5827110d
--- /dev/null
+++ b/x11-misc/x11vnc/x11vnc-0.9.13-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/x11vnc/x11vnc-0.9.13-r1.ebuild,v 1.1 2012/11/15 21:06:42 vapier Exp $
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="A VNC server for real X displays"
+HOMEPAGE="http://www.karlrunge.com/x11vnc/"
+SRC_URI="mirror://sourceforge/libvncserver/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="avahi crypt fbcon +jpeg ssl system-libvncserver threads tk xinerama +zlib"
+
+RDEPEND="system-libvncserver? ( >=net-libs/libvncserver-0.9.7[threads=,jpeg=,zlib=] )
+ !system-libvncserver? (
+ zlib? ( sys-libs/zlib )
+ jpeg? ( virtual/jpeg:0 )
+ )
+ ssl? ( dev-libs/openssl )
+ tk? ( dev-lang/tk )
+ avahi? ( >=net-dns/avahi-0.6.4 )
+ xinerama? ( x11-libs/libXinerama )
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libX11
+ >=x11-libs/libXtst-1.1.0
+ x11-libs/libXdamage
+ x11-libs/libXext"
+DEPEND="${RDEPEND}
+ x11-libs/libXt
+ xinerama? ( x11-proto/xineramaproto )
+ x11-proto/inputproto
+ x11-proto/trapproto
+ x11-proto/recordproto
+ x11-proto/xproto
+ x11-proto/xextproto"
+
+pkg_setup() {
+ if use avahi && ! use threads ; then
+ ewarn "Non-native avahi support has been enabled."
+ ewarn "Native avahi support can be enabled by also enabling the threads USE flag."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-warnings.patch
+ epatch "${FILESDIR}"/${P}-shm-cleanup.patch
+}
+
+src_configure() {
+ # --without-v4l because of missing video4linux 2.x support wrt #389079
+ econf \
+ $(use_with system-libvncserver) \
+ $(use_with avahi) \
+ $(use_with xinerama) \
+ $(use_with ssl) \
+ $(use_with ssl crypto) \
+ $(use_with crypt) \
+ --without-v4l \
+ $(use_with jpeg) \
+ $(use_with zlib) \
+ $(use_with threads pthread) \
+ $(use_with fbcon fbdev)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc x11vnc/{ChangeLog,README}
+ # Remove include files, which conflict with net-libs/libvncserver
+ rm -rf "${D}"/usr/include
+}