public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:master commit in: net-libs/libvncserver/, net-libs/libvncserver/files/
@ 2022-07-05 21:19 Quentin Retornaz
  0 siblings, 0 replies; 2+ messages in thread
From: Quentin Retornaz @ 2022-07-05 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     44f736a28ec3082a25596bcc439b83f8766b396b
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Jul  5 16:03:44 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Jul  5 21:18:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=44f736a2

net-libs/libvncserver: Add package

Upstream-Commit: 97fbbd678b2012e64acddd523677bc55a177bc58
Upstream-PR: https://github.com/LibVNC/libvncserver/pull/522
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 net-libs/libvncserver/Manifest                     |  1 +
 .../files/libvncserver-0.9.13-libressl.patch       | 66 +++++++++++++++++++
 .../libvncserver-0.9.13-test-fix-includetest.patch | 54 +++++++++++++++
 .../libvncserver-0.9.13-test-fix-tjunittest.patch  | 29 +++++++++
 net-libs/libvncserver/libvncserver-0.9.13.ebuild   | 76 ++++++++++++++++++++++
 net-libs/libvncserver/metadata.xml                 | 26 ++++++++
 6 files changed, 252 insertions(+)

diff --git a/net-libs/libvncserver/Manifest b/net-libs/libvncserver/Manifest
new file mode 100644
index 0000000..c7569e5
--- /dev/null
+++ b/net-libs/libvncserver/Manifest
@@ -0,0 +1 @@
+DIST LibVNCServer-0.9.13.tar.gz 567491 BLAKE2B 138c7ca63f8cd30a21dc1b58aafa744e12a1a9eca503ffec18a63d18791d7a5df4eef176d7e4e797a2aadda1dd04d1b051abfd76bf5c6806d558c09ffee78cce SHA512 18b0a1698d32bbdbfe6f65f76130b2a95860e3cc76e8adb904269663698c7c0ae982f451fda1f25e5461f096045d40a89d9014258f439366d5b4feaa4999d643

diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-libressl.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-libressl.patch
new file mode 100644
index 0000000..952ef53
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-libressl.patch
@@ -0,0 +1,66 @@
+From: https://github.com/LibVNC/libvncserver/commit/97fbbd678b2012e64acddd523677bc55a177bc58
+
+From 97fbbd678b2012e64acddd523677bc55a177bc58 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 12 May 2022 20:41:50 +0200
+Subject: [PATCH] common/crypto_openssl.c: fix build with libressl >= 3.5.0
+ (#522)
+
+Fix the following build failure with libressl >= 3.5.0:
+
+/nvmedata/autobuild/instance-26/output-1/build/libvncserver-0.9.13/common/crypto_openssl.c: In function 'dh_generate_keypair':
+/nvmedata/autobuild/instance-26/output-1/build/libvncserver-0.9.13/common/crypto_openssl.c:149:7: error: dereferencing pointer to incomplete type 'DH' {aka 'struct dh_st'}
+  149 |     dh->p = BN_bin2bn(prime, keylen, NULL);
+      |       ^~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/49b3940b9d0432cb5fb0c5d22dfa017b18c6e233
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ common/crypto_openssl.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/common/crypto_openssl.c b/common/crypto_openssl.c
+index 60d4bd4df..51d7ec2d9 100644
+--- a/common/crypto_openssl.c
++++ b/common/crypto_openssl.c
+@@ -138,14 +138,16 @@ int dh_generate_keypair(uint8_t *priv_out, uint8_t *pub_out, const uint8_t *gen,
+ {
+     int result = 0;
+     DH *dh;
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L || \
++	(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000)
+     const BIGNUM *pub_key = NULL;
+     const BIGNUM *priv_key = NULL;
+ #endif
+ 
+     if(!(dh = DH_new()))
+ 	goto out;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++	(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000)
+     dh->p = BN_bin2bn(prime, keylen, NULL);
+     dh->g = BN_bin2bn(gen, gen_len, NULL);
+ #else
+@@ -154,7 +156,8 @@ int dh_generate_keypair(uint8_t *priv_out, uint8_t *pub_out, const uint8_t *gen,
+ #endif
+     if(!DH_generate_key(dh))
+ 	goto out;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++	(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000)
+     if(BN_bn2bin(dh->priv_key, priv_out) == 0)
+ 	goto out;
+     if(BN_bn2bin(dh->pub_key, pub_out) == 0)
+@@ -181,7 +184,8 @@ int dh_compute_shared_key(uint8_t *shared_out, const uint8_t *priv, const uint8_
+ 
+     if(!(dh = DH_new()))
+ 	goto out;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++	(defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER < 0x30500000)
+     dh->p = BN_bin2bn(prime, keylen, NULL);
+     dh->priv_key = BN_bin2bn(priv, keylen, NULL);
+ #else

diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch
new file mode 100644
index 0000000..7677082
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch
@@ -0,0 +1,54 @@
+From 39cff3dd6b5d9ebcf86f01e2c7e0bef62abd9d6f Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Thu, 25 Jun 2020 11:35:04 +0300
+Subject: [PATCH 1/2] test: fix includetest to use CMAKE_MAKE_PROGRAM (#431)
+
+includetest currently fais if, for example, ninja is used as a CMake
+generator. Fix it by using CMAKE_MAKE_PROGRAM in the test.
+---
+ CMakeLists.txt      | 2 +-
+ test/includetest.sh | 7 ++++---
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b6228a2..290deb38 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -680,7 +680,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS)
+ 
+ add_test(NAME cargs COMMAND test_cargstest)
+ if(UNIX)
+-  add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
++  add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM})
+ endif(UNIX)
+ if(FOUND_LIBJPEG_TURBO)
+     add_test(NAME turbojpeg COMMAND test_tjunittest)
+diff --git a/test/includetest.sh b/test/includetest.sh
+index 23d602e6..6b064208 100755
+--- a/test/includetest.sh
++++ b/test/includetest.sh
+@@ -5,10 +5,11 @@
+ 
+ # expects install prefix like /usr as an argument
+ PREFIX=$1
++CMAKE_MAKE_PROGRAM=$2
+ 
+ TMPDIR=$(mktemp -d)
+ 
+-make install DESTDIR=$TMPDIR
++DESTDIR="$TMPDIR" $CMAKE_MAKE_PROGRAM install
+ 
+ echo \
+ "
+@@ -19,6 +20,6 @@ int main()
+ {
+     return 0;
+ }
+-" > $TMPDIR/includetest.c
++" > "$TMPDIR"/includetest.c
+ 
+-cc -I $TMPDIR/$PREFIX $TMPDIR/includetest.c
++cc -I "$TMPDIR/$PREFIX" "$TMPDIR"/includetest.c
+-- 
+2.26.2
+

diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch
new file mode 100644
index 0000000..98e3a65
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch
@@ -0,0 +1,29 @@
+From 8244fab5421fd14d4c75ce488ad18d38b7a6edb4 Mon Sep 17 00:00:00 2001
+From: Christian Beier <info@christianbeier.net>
+Date: Thu, 25 Jun 2020 12:21:50 +0200
+Subject: [PATCH 2/2] CMake: only add turbojpeg test if configured WITH_JPEG
+
+Closes #430
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 290deb38..fdca4d81 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -682,9 +682,9 @@ add_test(NAME cargs COMMAND test_cargstest)
+ if(UNIX)
+   add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM})
+ endif(UNIX)
+-if(FOUND_LIBJPEG_TURBO)
++if(WITH_JPEG AND FOUND_LIBJPEG_TURBO)
+     add_test(NAME turbojpeg COMMAND test_tjunittest)
+-endif(FOUND_LIBJPEG_TURBO)
++endif(WITH_JPEG AND FOUND_LIBJPEG_TURBO)
+ if(LIBVNCSERVER_WITH_WEBSOCKETS)
+     add_test(NAME wstest COMMAND test_wstest)
+ endif(LIBVNCSERVER_WITH_WEBSOCKETS)
+-- 
+2.26.2
+

diff --git a/net-libs/libvncserver/libvncserver-0.9.13.ebuild b/net-libs/libvncserver/libvncserver-0.9.13.ebuild
new file mode 100644
index 0000000..7fbb4db
--- /dev/null
+++ b/net-libs/libvncserver/libvncserver-0.9.13.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 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}"
+
+# common/d3des.*: https://github.com/LibVNC/libvncserver/issues/88
+LICENSE="GPL-2 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 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="+24bpp +filetransfer gcrypt gnutls ipv6 +jpeg lzo +png sasl ssl systemd +threads +zlib"
+# https://bugs.gentoo.org/690202
+# https://bugs.gentoo.org/435326
+# https://bugs.gentoo.org/550916
+REQUIRED_USE="
+	filetransfer? ( threads )
+	jpeg? ( zlib )
+	png? ( zlib )
+	ssl? ( !gnutls? ( threads ) )
+"
+
+DEPEND="
+	gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0= )
+	ssl? (
+		!gnutls? (
+			>=dev-libs/openssl-1.0.2: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.md README.md TODO.md )
+
+PATCHES=(
+	"${FILESDIR}"/${P}-test-fix-includetest.patch
+	"${FILESDIR}"/${P}-test-fix-tjunittest.patch
+	"${FILESDIR}"/${P}-libressl.patch
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DWITH_FFMPEG=OFF
+		-DWITH_GTK=OFF
+		-DWITH_SDL=OFF
+		-DWITH_24BPP=$(usex 24bpp ON OFF)
+		-DWITH_TIGHTVNC_FILETRANSFER=$(usex filetransfer ON OFF)
+		-DWITH_GCRYPT=$(usex gcrypt ON OFF)
+		-DWITH_GNUTLS=$(usex gnutls $(usex ssl ON OFF) OFF)
+		-DWITH_IPv6=$(usex ipv6 ON OFF)
+		-DWITH_JPEG=$(usex jpeg ON OFF)
+		-DWITH_LZO=$(usex lzo ON OFF)
+		-DWITH_OPENSSL=$(usex gnutls OFF $(usex ssl ON OFF))
+		-DWITH_PNG=$(usex png ON OFF)
+		-DWITH_SASL=$(usex sasl ON OFF)
+		-DWITH_SYSTEMD=$(usex systemd ON OFF)
+		-DWITH_THREADS=$(usex threads ON OFF)
+		-DWITH_ZLIB=$(usex zlib ON OFF)
+	)
+	cmake_src_configure
+}

diff --git a/net-libs/libvncserver/metadata.xml b/net-libs/libvncserver/metadata.xml
new file mode 100644
index 0000000..09a7b34
--- /dev/null
+++ b/net-libs/libvncserver/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person" proxied="yes">
+		<email>alexander@tsoy.me</email>
+		<name>Alexander Tsoy</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<longdescription>
+		LibVNCServer/LibVNCClient are cross-platform C libraries that allow you
+		to easily implement VNC server or client functionality in your program.
+	</longdescription>
+	<use>
+		<flag name="24bpp">Enable 24bpp support</flag>
+		<flag name="filetransfer">Enable support for TightVNC's file transfer protocol</flag>
+		<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> as crypto backend</flag>
+		<flag name="lzo">Enable LZO support via <pkg>dev-libs/lzo</pkg> instead of using internal miniLZO implementation</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">LibVNC/libvncserver</remote-id>
+		<remote-id type="sourceforge">libvncserver</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: net-libs/libvncserver/, net-libs/libvncserver/files/
@ 2022-10-07 21:11 Quentin Retornaz
  0 siblings, 0 replies; 2+ messages in thread
From: Quentin Retornaz @ 2022-10-07 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a5bc185da4d9674b76402066960137ad108601e2
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Oct  7 18:16:01 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Fri Oct  7 21:11:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a5bc185d

net-libs/libvncserver: Add 0.9.13-r1

Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 .../files/libvncserver-0.9.13-CVE-2020-29260.patch | 27 ++++++++++++++++++++++
 ...0.9.13.ebuild => libvncserver-0.9.13-r1.ebuild} |  7 +++---
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-CVE-2020-29260.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-CVE-2020-29260.patch
new file mode 100644
index 0000000..23ffed8
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-CVE-2020-29260.patch
@@ -0,0 +1,27 @@
+From bef41f6ec4097a8ee094f90a1b34a708fbd757ec Mon Sep 17 00:00:00 2001
+From: Christian Beier <info@christianbeier.net>
+Date: Sat, 21 Nov 2020 12:52:31 +0100
+Subject: [PATCH] libvncclient: free vncRec memory in rfbClientCleanup()
+
+Otherwise we leak memory. Spotted by Ramin Farajpour Cami
+<ramin.blackhat@gmail.com>, thanks!
+---
+ libvncclient/vncviewer.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
+index d6b91f02..0a1bdcf6 100644
+--- a/libvncclient/vncviewer.c
++++ b/libvncclient/vncviewer.c
+@@ -534,6 +534,8 @@ void rfbClientCleanup(rfbClient* client) {
+     client->clientData = next;
+   }
+ 
++  free(client->vncRec);
++
+   if (client->sock != RFB_INVALID_SOCKET)
+     rfbCloseSocket(client->sock);
+   if (client->listenSock != RFB_INVALID_SOCKET)
+-- 
+2.35.1
+

diff --git a/net-libs/libvncserver/libvncserver-0.9.13.ebuild b/net-libs/libvncserver/libvncserver-0.9.13-r1.ebuild
similarity index 94%
rename from net-libs/libvncserver/libvncserver-0.9.13.ebuild
rename to net-libs/libvncserver/libvncserver-0.9.13-r1.ebuild
index 7fbb4db..99acceb 100644
--- a/net-libs/libvncserver/libvncserver-0.9.13.ebuild
+++ b/net-libs/libvncserver/libvncserver-0.9.13-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit cmake
 
@@ -36,7 +36,7 @@ DEPEND="
 		)
 		gnutls? ( >=net-libs/gnutls-2.12.23-r6:0= )
 	)
-	jpeg? ( >=virtual/jpeg-0-r2:0 )
+	jpeg? ( media-libs/libjpeg-turbo:= )
 	lzo? ( dev-libs/lzo )
 	png? ( >=media-libs/libpng-1.6.10:0= )
 	sasl? ( dev-libs/cyrus-sasl )
@@ -50,6 +50,7 @@ DOCS=( AUTHORS ChangeLog NEWS.md README.md TODO.md )
 PATCHES=(
 	"${FILESDIR}"/${P}-test-fix-includetest.patch
 	"${FILESDIR}"/${P}-test-fix-tjunittest.patch
+	"${FILESDIR}"/${P}-CVE-2020-29260.patch
 	"${FILESDIR}"/${P}-libressl.patch
 )
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-07 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-07 21:11 [gentoo-commits] repo/proj/libressl:master commit in: net-libs/libvncserver/, net-libs/libvncserver/files/ Quentin Retornaz
  -- strict thread matches above, loose matches on Subject: below --
2022-07-05 21:19 Quentin Retornaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox