From 0704956f7256f1f618cc5e03af2c1dbd0e83dbc5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 16 Jan 2020 16:18:18 +0000 Subject: gentoo resync : 16.01.2020 --- net-libs/libvncserver/Manifest | 2 + .../libvncserver-0.9.12-fix-shutdown-crash.patch | 63 ++++++++++++++++++ .../libvncserver/libvncserver-0.9.12-r4.ebuild | 74 ++++++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 net-libs/libvncserver/files/libvncserver-0.9.12-fix-shutdown-crash.patch create mode 100644 net-libs/libvncserver/libvncserver-0.9.12-r4.ebuild (limited to 'net-libs/libvncserver') diff --git a/net-libs/libvncserver/Manifest b/net-libs/libvncserver/Manifest index 2d9d872efcf2..e610dae2388b 100644 --- a/net-libs/libvncserver/Manifest +++ b/net-libs/libvncserver/Manifest @@ -1,6 +1,7 @@ AUX libvncserver-0.9.12-CVE-2018-20750.patch 1865 BLAKE2B 351e515b4b2ccb22c8b6620763df04f57e5f32a98031e941aef4beff26f5fafb846bdf224d3b9cde49fd7a098ff5b7bf3040aaca3013e09aa19c2897d7bd9847 SHA512 439e309cc2d16a1aa5d37349e2af52c2637f68fce699882192dacf4e256a98351f7c95f7217bf6f6a54feb3a6b8e381ed7889218d86a00df45cd9dd4941bbb7f AUX libvncserver-0.9.12-CVE-2019-15681.patch 881 BLAKE2B 27422045c50ae2c51a49f0b6616b5dd4e4cc33538ef86945e4ed8c4ca13893fffe0e36ac977efb20166c281bda3609ff9e9e4040bf45880b38343c88b00b475a SHA512 1043f40f7d7d4747df4d93ffbfdd102b447eb974e2d023fae64e833beb2e8e5370fc4243728db6403b5cf6c7bd65b2585b0ac8cfafabe24b2a9a4a498d9c2a46 AUX libvncserver-0.9.12-cmake-libdir.patch 1272 BLAKE2B ee987d2cf311000de0e8d8ee3449b1f2705a3ec328eecd1b848ebe3fdc5f01e97b074acdab921a5f8e0608494efc0e96d3cfe574f3c5cce01d71f46c5f44fe4b SHA512 1867199b89fd7b1a9308fa10c3bf96ea088371833e34f339a115b23160dcfb668a026c7d4aa87f493288ad9e9e215642a04f902b7afb4225216e336f7d9816f3 +AUX libvncserver-0.9.12-fix-shutdown-crash.patch 2225 BLAKE2B 3531d96806e9e26fbdfdb69b2d98d30cf91d4b1c44748e590ad4d887f2751c48b13a2a9903945ab350e9668bc7d83453fd56c6fa8a7deaefda53fcda8073e2a8 SHA512 201c2a6eb031d9ad45b4d1a20bfa157b6acf1b70a5f0bfeb11178022fbb9a7dc4bf147b0e115a5e57dbfec4e0f2e8e4d62677024303e32f3dbab435806bc574c AUX libvncserver-0.9.12-fix-tight-raw-decoding.patch 1486 BLAKE2B 6baf50393a728e0af7dbdc2442c881992a22d2b206ba4381f52ac7607c1a92c3c15084fad81a3bcaa68d1c989306bdce0e64808adbf392c4b102531d9f1bbfc9 SHA512 258ffd60e33fcf8b60fe1d6843f14a0421fc4c309b2bec65bdb2c381718c92d850da9ebc8feae23aef610b72ac2c52afe9fe8048c6ecae6a4340e6a947e1ea5a AUX libvncserver-0.9.12-libgcrypt.patch 1526 BLAKE2B 83e042ff875844cced2cb1416477c9fa255f84e6cc40b9d1d5e7dfa3e2467effb3481155b5eeeb29835cf29c0a6aa0ed381862fc184e4070b149b3a1bfc84c9e SHA512 2b2aba010104b2206eab7bec1bc6a258edb28d43da2a376d03e063d9d5e7236d690388da8ccd501b22d3181b966d2b6ee1e6752153c1ff78ab498a59355fb385 AUX libvncserver-0.9.12-pkgconfig-libdir.patch 1241 BLAKE2B 7ac16afc86204a320253c4b0b819e4c66c44c6112ac5a9bfbae13bd567391f137d1c4f786f43e5023663fcccb7d45aed628459301dd0859361a7b01f41a98d29 SHA512 37d15eb01f6c89d012c47fff885c2405ead2b7e18798b3fa68fb72bffff9caf084652e1d29fbb11263800c69e875d9442fdef660ea69b146361690820035f056 @@ -8,4 +9,5 @@ AUX libvncserver-0.9.12-sparc-unaligned.patch 1463 BLAKE2B 66ab54a68026de0c9ce5e DIST LibVNCServer-0.9.12.tar.gz 2237447 BLAKE2B 583500c0bcfb6e9e3a02a33fb2701113b164851f0906fcc4845de7c7d82d4f7f65f5edd6c9a672348ee1deeefc65c1b0a257da024254598ba86d121d424f027e SHA512 60ff1cc93a937d6f8f97449bc58b763095846207112f7b1b3c43eb2d74448b595d6da949903a764bd484ee54e38ff6277e882adbe965dd6d26ba15ef6ff6fcb8 EBUILD libvncserver-0.9.12-r2.ebuild 2085 BLAKE2B b17dc70efebe80fcb8ede7cd5c949f741e79c90919af9063dacdb905f40d173e18c0bd7fc366781141f52a98eb09bf1fe3412842916e4a9c77828abb103e2ff5 SHA512 a82db697f80034c94e828e334f838f0bbc3a0e43b4edd68752cf72fe71f1cecf4b7bcd4ab4d27d81d7b11c48e69dda3a55c778f393e6abafd4296f4bbb523065 EBUILD libvncserver-0.9.12-r3.ebuild 2260 BLAKE2B 5c844605a3f214e9c258f1097fcc6e17f936ff416ae08d7fba5141ef10c6ad5e968d58357bf19e37080da048719362d097c6970adac4750cd40c6b492bb039d4 SHA512 a301902c50f834a8a5a594ac109d87cf978d386d170292b44c986d43a2c6ec8c4dfec43e67950aa393d6f2dbf7692d8d006a0ccb54df782d5b89a531c100179a +EBUILD libvncserver-0.9.12-r4.ebuild 2305 BLAKE2B 3aff4c3e96ab7ce35c113f1834a1dbef5f73e8d480b966c9b9c2408f8e81730d1fe004d29e87677d0aedb078ca89fb8fc585e4bfe9b4d04fc4953e138d183bc9 SHA512 9a7f6e4b88238005ad92c6d9c2b368360cd9c4588609dc742dd8d6f4276ca02af103c7d86ff48cd2ed0a56936990c1610c949350d35e4b5b77b65133171231a1 MISC metadata.xml 994 BLAKE2B 3c12097d08f89fadac86ad92efccccbb533c1ac018cf426aae4a45bbea33ae227dfaec320a7710eabff7da96d22229997dee72b2c84b1aedc575e21e0a5decff SHA512 0ca13849ab948490b862838bf3c2b87cb97ce1739369d23426e518197a786cf24fc79967c01072b710d37c298c792c45e61a55e558d692087800e834f93003e2 diff --git a/net-libs/libvncserver/files/libvncserver-0.9.12-fix-shutdown-crash.patch b/net-libs/libvncserver/files/libvncserver-0.9.12-fix-shutdown-crash.patch new file mode 100644 index 000000000000..0ae8d38c6f89 --- /dev/null +++ b/net-libs/libvncserver/files/libvncserver-0.9.12-fix-shutdown-crash.patch @@ -0,0 +1,63 @@ +From d0a76539835d11c0f4723499f8be4bc9c7724eb9 Mon Sep 17 00:00:00 2001 +From: Rajesh Sahoo +Date: Tue, 11 Jun 2019 15:13:04 +0530 +Subject: [PATCH] avoid pthread_join if backgroundLoop is FALSE + +client_thread is created depending upon backgroundLoop, but joining +without checking for same condition. so we are trying to join a garbage +thread_id. +--- + libvncserver/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libvncserver/main.c b/libvncserver/main.c +index d3cd9b1..772fb18 100644 +--- a/libvncserver/main.c ++++ b/libvncserver/main.c +@@ -1112,6 +1112,7 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { + } + + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD ++ if(currentCl->screen->backgroundLoop) { + /* + Notify the thread. This simply writes a NULL byte to the notify pipe in order to get past the select() + in clientInput(), the loop in there will then break because the rfbCloseClient() above has set +@@ -1120,6 +1121,7 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { + write(currentCl->pipe_notify_client_thread[1], "\x00", 1); + /* And wait for it to finish. */ + pthread_join(currentCl->client_thread, NULL); ++ } + #else + rfbClientConnectionGone(currentCl); + #endif +-- +2.24.1 + +From 15c4f144a3783d9f1f2c976acf9f4d85988fd466 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sun, 5 Jan 2020 19:56:57 +0100 +Subject: [PATCH] rfbShutdownServer: Call rfbClientConnectionGone if no + backgroundLoop + +Otherwise the servers that don't use rfbRunEventLoop don't get +notified of client disconnections +--- + libvncserver/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libvncserver/main.c b/libvncserver/main.c +index b51f0ab..738a501 100644 +--- a/libvncserver/main.c ++++ b/libvncserver/main.c +@@ -1152,6 +1152,8 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { + write(currentCl->pipe_notify_client_thread[1], "\x00", 1); + /* And wait for it to finish. */ + pthread_join(currentCl->client_thread, NULL); ++ } else { ++ rfbClientConnectionGone(currentCl); + } + #else + rfbClientConnectionGone(currentCl); +-- +2.24.1 + diff --git a/net-libs/libvncserver/libvncserver-0.9.12-r4.ebuild b/net-libs/libvncserver/libvncserver-0.9.12-r4.ebuild new file mode 100644 index 000000000000..44fc2c99053f --- /dev/null +++ b/net-libs/libvncserver/libvncserver-0.9.12-r4.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +MY_P="LibVNCServer-${PV}" + +DESCRIPTION="library for creating vnc servers" +HOMEPAGE="https://libvnc.github.io/" +SRC_URI="https://github.com/LibVNC/${PN}/archive/${MY_P}.tar.gz" +S="${WORKDIR}/${PN}-${MY_P}" + +# libvncserver/tightvnc-filetransfer/*: GPL-2, but we don't build it +# common/d3des.*: https://github.com/LibVNC/libvncserver/issues/88 +LICENSE="GPL-2+ LGPL-2.1+ BSD MIT" +# no sub slot wanted (yet), see #578958 +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux" +IUSE="+24bpp gcrypt gnutls ipv6 +jpeg libressl lzo +png sasl ssl systemd +threads +zlib" +# https://bugs.gentoo.org/690202 +# https://bugs.gentoo.org/435326 +# https://bugs.gentoo.org/550916 +REQUIRED_USE="jpeg? ( zlib ) png? ( zlib ) ssl? ( !gnutls? ( threads ) )" + +DEPEND=" + gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0= ) + ssl? ( + !gnutls? ( + !libressl? ( >=dev-libs/openssl-1.0.2:0= ) + libressl? ( >=dev-libs/libressl-2.7.0:0= ) + ) + gnutls? ( >=net-libs/gnutls-2.12.23-r6:0= ) + ) + jpeg? ( >=virtual/jpeg-0-r2:0 ) + lzo? ( dev-libs/lzo ) + png? ( >=media-libs/libpng-1.6.10:0= ) + sasl? ( dev-libs/cyrus-sasl ) + systemd? ( sys-apps/systemd:= ) + zlib? ( >=sys-libs/zlib-1.2.8-r1:0= )" +RDEPEND="${DEPEND}" + +DOCS=( AUTHORS ChangeLog NEWS README.md TODO ) + +PATCHES=( + "${FILESDIR}"/${P}-cmake-libdir.patch + "${FILESDIR}"/${P}-pkgconfig-libdir.patch + "${FILESDIR}"/${P}-libgcrypt.patch + "${FILESDIR}"/${P}-sparc-unaligned.patch + "${FILESDIR}"/${P}-CVE-2018-20750.patch + "${FILESDIR}"/${P}-CVE-2019-15681.patch + "${FILESDIR}"/${P}-fix-tight-raw-decoding.patch + "${FILESDIR}"/${P}-fix-shutdown-crash.patch +) + +src_configure() { + local mycmakeargs=( + -DWITH_ZLIB=$(usex zlib ON OFF) + -DWITH_LZO=$(usex lzo ON OFF) + -DWITH_JPEG=$(usex jpeg ON OFF) + -DWITH_PNG=$(usex png ON OFF) + -DWITH_THREADS=$(usex threads ON OFF) + -DWITH_GNUTLS=$(usex gnutls $(usex ssl ON OFF) OFF) + -DWITH_OPENSSL=$(usex gnutls OFF $(usex ssl ON OFF)) + -DWITH_GCRYPT=$(usex gcrypt ON OFF) + -DWITH_SYSTEMD=$(usex systemd ON OFF) + -DWITH_FFMPEG=OFF + -DWITH_24BPP=$(usex 24bpp ON OFF) + -DWITH_IPv6=$(usex ipv6 ON OFF) + -DWITH_SASL=$(usex sasl ON OFF) + ) + cmake_src_configure +} -- cgit v1.2.3