From 31ceadbd479ef83029bfa47e3315dd713bb584fe Mon Sep 17 00:00:00 2001 From: Jaco Kroon Date: Thu, 7 Nov 2019 12:46:17 +0200 Subject: net-libs/libwebsockets: version bump to 3.2.0 Closes: https://bugs.gentoo.org/696554 Closes: https://bugs.gentoo.org/615532 Closes: https://bugs.gentoo.org/618428 Closes: https://bugs.gentoo.org/672194 Closes: https://bugs.gentoo.org/669152 Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Jaco Kroon Closes: https://github.com/gentoo/gentoo/pull/13579 Signed-off-by: Joonas Niilola --- net-libs/libwebsockets/Manifest | 1 + .../libwebsockets-3.2.0-check_chown_result.patch | 22 ++++++ .../libwebsockets-3.2.0-string_assignment.patch | 11 +++ net-libs/libwebsockets/libwebsockets-3.2.0.ebuild | 80 ++++++++++++++++++++++ 4 files changed, 114 insertions(+) create mode 100644 net-libs/libwebsockets/files/libwebsockets-3.2.0-check_chown_result.patch create mode 100644 net-libs/libwebsockets/files/libwebsockets-3.2.0-string_assignment.patch create mode 100644 net-libs/libwebsockets/libwebsockets-3.2.0.ebuild (limited to 'net-libs/libwebsockets') diff --git a/net-libs/libwebsockets/Manifest b/net-libs/libwebsockets/Manifest index c9cf9410247d..8719a402e599 100644 --- a/net-libs/libwebsockets/Manifest +++ b/net-libs/libwebsockets/Manifest @@ -2,3 +2,4 @@ DIST libwebsockets-1.7.9.tar.gz 2915358 BLAKE2B 07aad4ab716212924177aa76233d743d DIST libwebsockets-2.0.2.tar.gz 2998585 BLAKE2B 0eaf2301abf9a0e47bd865b6e653f3ea23f3b00d4c6da785a8bd871f3ca729dc43152cad10aeaa9a3cd360aeecd0be87e434102e91e0eeaa6b1865031310a362 SHA512 6cd0cfe14ab9aa2ce26624d41290ed3bd0ae4167e93d5db738883dbbe2db851bd75037929a417922c2ef78eae3ff00583134d42da575d961c777e4a1ad0fef4a DIST libwebsockets-2.1.1.tar.gz 3769593 BLAKE2B 8d3aaa0a844925fb927fffaf0d11ba1bdbd013db8a680ce4b85cd5d951219598288fa0f2b97ec22bc00ef879586cb5c2c076b774f3411cb6d8ca553e66fb90e2 SHA512 429bca62feb75136d8aff1783a6024468033536356fb3501e4dcf0819d9e9a4457f2a94248fdafe6fdceb7e0ded146ff6c4c04040e069f34a9b27a4e090d2683 DIST libwebsockets-2.4.2.tar.gz 3777160 BLAKE2B 6aedc0d340e9e03745309cd1a9674b6c7e84ebdbd5232a265c7a4e0deb612665982353c3ba973b58a835b1747448d415a3625ed044973212b5a897b221d73106 SHA512 7bee49f6763ff3ab7861fcda25af8d80f6757c56e197ea42be53e0b2480969eee73de3aee5198f5ff06fd1cb8ab2be4c6495243e83cd0acc235b0da83b2353d1 +DIST libwebsockets-3.2.0.tar.gz 9848976 BLAKE2B 3ad82281c854ad6ca4183f104a0d0eaa6f6e6e6084e3a98b29d8425d335f02a2d3e4f7e7a1b350e87d4ff975c44a5ed6635e3166219d9294bbf5a56ed1357e75 SHA512 afc1c9e259d6d48000b09da111af4129680d50474cdfedbad197ee22260d57a837b67cc6a3f8e6b1aa7ce7dc5d3fd900569783631540501709868125c6d1e4da diff --git a/net-libs/libwebsockets/files/libwebsockets-3.2.0-check_chown_result.patch b/net-libs/libwebsockets/files/libwebsockets-3.2.0-check_chown_result.patch new file mode 100644 index 000000000000..3dafd60e7315 --- /dev/null +++ b/net-libs/libwebsockets/files/libwebsockets-3.2.0-check_chown_result.patch @@ -0,0 +1,22 @@ +--- libwebsockets-3.2.0.o/lib/misc/lws-struct-sqlite.c 2019-08-14 10:22:50.000000000 +0200 ++++ libwebsockets-3.2.0/lib/misc/lws-struct-sqlite.c 2019-11-07 20:03:43.939423877 +0200 +@@ -23,6 +23,7 @@ + #include + + #include ++#include + + /* + * we get one of these per matching result from the query +@@ -253,8 +254,9 @@ + } + + lws_get_effective_uid_gid(context, &uid, &gid); +- if (uid) +- chown(sqlite3_path, uid, gid); ++ if (uid && chown(sqlite3_path, uid, gid) < 0) ++ lwsl_err("%s: Error setting ownership of %s: %s\n", ++ __func__, sqlite3_path, strerror(errno)); + chmod(sqlite3_path, 0600); + + lwsl_notice("%s: created %s owned by %u:%u mode 0600\n", __func__, diff --git a/net-libs/libwebsockets/files/libwebsockets-3.2.0-string_assignment.patch b/net-libs/libwebsockets/files/libwebsockets-3.2.0-string_assignment.patch new file mode 100644 index 000000000000..86010aafd619 --- /dev/null +++ b/net-libs/libwebsockets/files/libwebsockets-3.2.0-string_assignment.patch @@ -0,0 +1,11 @@ +--- libwebsockets-3.2.0.o/lib/roles/http/client/client.c 2019-08-14 10:22:50.000000000 +0200 ++++ libwebsockets-3.2.0/lib/roles/http/client/client.c 2019-11-07 19:59:52.959534874 +0200 +@@ -214,7 +214,7 @@ + lwsl_client("SOCKS password OK, sending connect\n"); + if (socks_generate_msg(wsi, SOCKS_MSG_CONNECT, &len)) { + socks_send_msg_fail: +- *cce = "socks gen msg fail"; ++ cce = "socks gen msg fail"; + goto bail3; + } + conn_mode = LRS_WAITING_SOCKS_CONNECT_REPLY; diff --git a/net-libs/libwebsockets/libwebsockets-3.2.0.ebuild b/net-libs/libwebsockets/libwebsockets-3.2.0.ebuild new file mode 100644 index 000000000000..8ee9273a1887 --- /dev/null +++ b/net-libs/libwebsockets/libwebsockets-3.2.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +DESCRIPTION="A flexible pure-C library for implementing network protocols" +HOMEPAGE="https://libwebsockets.org/" +SRC_URI="https://github.com/warmcat/libwebsockets/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="access-log caps cgi client dbus generic-sessions http-proxy http2 ipv6 + lejp libev libevent libressl libuv peer-limits server-status smtp socks5 + sqlite3 ssl static-libs threads zip" + +REQUIRED_USE=" + generic-sessions? ( sqlite3 ) + generic-sessions? ( smtp ) + http-proxy? ( client ) + smtp? ( libuv ) + ?? ( libev libevent ) +" + +RDEPEND=" + sys-libs/zlib + + caps? ( sys-libs/libcap ) + http-proxy? ( net-libs/libhubbub ) + libev? ( dev-libs/libev ) + libevent? ( dev-libs/libevent:= ) + libuv? ( dev-libs/libuv:= ) + sqlite3? ( dev-db/sqlite:= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +DEPEND="${RDEPEND}" +BDEPEND="dev-lang/perl" + +PATCHES=( + "${FILESDIR}/libwebsockets-3.2.0-check_chown_result.patch" + "${FILESDIR}/libwebsockets-3.2.0-string_assignment.patch" +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DLWS_HAVE_LIBCAP=$(usex caps) + -DLWS_IPV6=$(usex ipv6) + -DLWS_ROLE_DBUS=$(usex dbus) + -DLWS_WITHOUT_CLIENT=$(usex !client) + -DLWS_WITHOUT_TEST_CLIENT=$(usex !client) + -DLWS_WITH_ACCESS_LOG=$(usex access-log) + -DLWS_WITH_CGI=$(usex cgi) + -DLWS_WITH_GENERIC_SESSIONS=$(usex generic-sessions) + -DLWS_WITH_HTTP2=$(usex http2) + -DLWS_WITH_HTTP_PROXY=$(usex http-proxy) + -DLWS_WITH_HUBBUB=$(usex http-proxy) + -DLWS_WITH_LEJP=$(usex lejp) + -DLWS_WITH_LIBEV=$(usex libev) + -DLWS_WITH_LIBEVENT=$(usex libevent) + -DLWS_WITH_LIBUV=$(usex libuv) + -DLWS_WITH_PEER_LIMITS=$(usex peer-limits) + -DLWS_WITH_SERVER_STATUS=$(usex server-status) + -DLWS_WITH_SMTP=$(usex smtp) + -DLWS_WITH_SOCKS5=$(usex socks5) + -DLWS_WITH_SQLITE3=$(usex sqlite3) + -DLWS_WITH_SSL=$(usex ssl) + -DLWS_WITH_STATIC=$(usex static-libs) + -DLWS_WITH_THREADPOOL=$(usex threads) + -DLWS_WITH_ZIP_FOPS=$(usex zip) + -DLWS_WITHOUT_TESTAPPS=ON + ) + + cmake-utils_src_configure +} -- cgit v1.2.3-65-gdbad