[gentoo-commits] repo/gentoo:master commit in: dev-lua/luasec/, dev-lua/luasec/files/
commit: 065feb97ff517d88e40262bd32a848cb711c8e7c Author: Conrad Kostecki gentoo org> AuthorDate: Sat Aug 14 21:16:18 2021 + Commit: Conrad Kostecki gentoo org> CommitDate: Sat Aug 14 21:16:18 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=065feb97 dev-lua/luasec: drop old version Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Conrad Kostecki gentoo.org> dev-lua/luasec/files/luasec-1.0.1_openssl3.patch | 96 dev-lua/luasec/luasec-1.0.1-r1.ebuild| 90 -- 2 files changed, 186 deletions(-) diff --git a/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch b/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch deleted file mode 100644 index 6fc161bfbe3..000 --- a/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 79bbc0bc3ed50303d0887f44137a1104ede3ea8f Mon Sep 17 00:00:00 2001 -From: Bruno Silvestre -Date: Mon, 2 Aug 2021 17:02:44 -0300 -Subject: [PATCH] Ignore SSL_OP_BIT(n) macro and update option.c #178 - - src/options.c | 20 +++- - src/options.lua | 9 ++--- - 2 files changed, 25 insertions(+), 4 deletions(-) - -diff --git a/src/options.c b/src/options.c -index 24fd2c9..7c6f21e 100644 a/src/options.c -+++ b/src/options.c -@@ -13,13 +13,16 @@ - - - /* -- OpenSSL version: OpenSSL 1.1.1 -+ OpenSSL version: OpenSSL 3.0.0-beta2 - */ - - static lsec_ssl_option_t ssl_options[] = { - #if defined(SSL_OP_ALL) - {"all", SSL_OP_ALL}, - #endif -+#if defined(SSL_OP_ALLOW_CLIENT_RENEGOTIATION) -+ {"allow_client_renegotiation", SSL_OP_ALLOW_CLIENT_RENEGOTIATION}, -+#endif - #if defined(SSL_OP_ALLOW_NO_DHE_KEX) - {"allow_no_dhe_kex", SSL_OP_ALLOW_NO_DHE_KEX}, - #endif -@@ -32,21 +35,33 @@ static lsec_ssl_option_t ssl_options[] = { - #if defined(SSL_OP_CISCO_ANYCONNECT) - {"cisco_anyconnect", SSL_OP_CISCO_ANYCONNECT}, - #endif -+#if defined(SSL_OP_CLEANSE_PLAINTEXT) -+ {"cleanse_plaintext", SSL_OP_CLEANSE_PLAINTEXT}, -+#endif - #if defined(SSL_OP_COOKIE_EXCHANGE) - {"cookie_exchange", SSL_OP_COOKIE_EXCHANGE}, - #endif - #if defined(SSL_OP_CRYPTOPRO_TLSEXT_BUG) - {"cryptopro_tlsext_bug", SSL_OP_CRYPTOPRO_TLSEXT_BUG}, - #endif -+#if defined(SSL_OP_DISABLE_TLSEXT_CA_NAMES) -+ {"disable_tlsext_ca_names", SSL_OP_DISABLE_TLSEXT_CA_NAMES}, -+#endif - #if defined(SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) - {"dont_insert_empty_fragments", SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS}, - #endif -+#if defined(SSL_OP_ENABLE_KTLS) -+ {"enable_ktls", SSL_OP_ENABLE_KTLS}, -+#endif - #if defined(SSL_OP_ENABLE_MIDDLEBOX_COMPAT) - {"enable_middlebox_compat", SSL_OP_ENABLE_MIDDLEBOX_COMPAT}, - #endif - #if defined(SSL_OP_EPHEMERAL_RSA) - {"ephemeral_rsa", SSL_OP_EPHEMERAL_RSA}, - #endif -+#if defined(SSL_OP_IGNORE_UNEXPECTED_EOF) -+ {"ignore_unexpected_eof", SSL_OP_IGNORE_UNEXPECTED_EOF}, -+#endif - #if defined(SSL_OP_LEGACY_SERVER_CONNECT) - {"legacy_server_connect", SSL_OP_LEGACY_SERVER_CONNECT}, - #endif -@@ -89,6 +104,9 @@ static lsec_ssl_option_t ssl_options[] = { - #if defined(SSL_OP_NO_ENCRYPT_THEN_MAC) - {"no_encrypt_then_mac", SSL_OP_NO_ENCRYPT_THEN_MAC}, - #endif -+#if defined(SSL_OP_NO_EXTENDED_MASTER_SECRET) -+ {"no_extended_master_secret", SSL_OP_NO_EXTENDED_MASTER_SECRET}, -+#endif - #if defined(SSL_OP_NO_QUERY_MTU) - {"no_query_mtu", SSL_OP_NO_QUERY_MTU}, - #endif -diff --git a/src/options.lua b/src/options.lua -index a757c8b..678e8d5 100644 a/src/options.lua -+++ b/src/options.lua -@@ -60,9 +60,12 @@ local function loadoptions(file) - local options = {} - local f = assert(io.open(file, "r")) - for line in f:lines() do --local op = string.match(line, "define%s+(SSL_OP_%S+)") --if op then -- table.insert(options, op) -+local op = string.match(line, "define%s+(SSL_OP_BIT%()") -+if not op then -+ op = string.match(line, "define%s+(SSL_OP_%S+)") -+ if op then -+table.insert(options, op) -+ end - end - end - table.sort(options, function(a,b) return ahttps://github.com/brunoos/luasec; -SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" -REQUIRED_USE="${LUA_REQUIRED_USE}" - -RDEPEND=" - dev-lua/luasocket[${LUA_USEDEP}] - dev-libs/openssl:0= - ${LUA_DEPS} -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}/${P}_openssl3.patch" -) - -lua_src_prepare() { - pushd "${BUILD_DIR}" || die - - ${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c || die - - popd -} - -src_prepare() { - default - - # Respect users CFLAGS - sed -e 's/-O2//g' -i src/Makefile || die - - lua_copy_sources - - lua_foreach_impl lua_src_prepare -} - -lua_src_compile() { - pushd "${BUILD_DIR}" || die - - local myemakeargs=( -
[gentoo-commits] repo/gentoo:master commit in: dev-lua/luasec/, dev-lua/luasec/files/
commit: d50a695cc830b1f859873887f6e6b584e62b30a1 Author: Azamat H. Hackimov gmail com> AuthorDate: Sat Aug 7 18:38:11 2021 + Commit: Conrad Kostecki gentoo org> CommitDate: Sat Aug 7 22:17:03 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50a695c dev-lua/luasec: fix compilation with openssl-3.0 Applied upstream patch 79bbc0. Closes: https://github.com/gentoo/gentoo/pull/21909 Closes: https://bugs.gentoo.org/805524 Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Azamat H. Hackimov gmail.com> Signed-off-by: Conrad Kostecki gentoo.org> dev-lua/luasec/files/luasec-1.0.1_openssl3.patch | 96 dev-lua/luasec/luasec-1.0.1-r1.ebuild| 90 ++ 2 files changed, 186 insertions(+) diff --git a/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch b/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch new file mode 100644 index 000..6fc161bfbe3 --- /dev/null +++ b/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch @@ -0,0 +1,96 @@ +From 79bbc0bc3ed50303d0887f44137a1104ede3ea8f Mon Sep 17 00:00:00 2001 +From: Bruno Silvestre +Date: Mon, 2 Aug 2021 17:02:44 -0300 +Subject: [PATCH] Ignore SSL_OP_BIT(n) macro and update option.c #178 + +--- + src/options.c | 20 +++- + src/options.lua | 9 ++--- + 2 files changed, 25 insertions(+), 4 deletions(-) + +diff --git a/src/options.c b/src/options.c +index 24fd2c9..7c6f21e 100644 +--- a/src/options.c b/src/options.c +@@ -13,13 +13,16 @@ + + + /* +- OpenSSL version: OpenSSL 1.1.1 ++ OpenSSL version: OpenSSL 3.0.0-beta2 + */ + + static lsec_ssl_option_t ssl_options[] = { + #if defined(SSL_OP_ALL) + {"all", SSL_OP_ALL}, + #endif ++#if defined(SSL_OP_ALLOW_CLIENT_RENEGOTIATION) ++ {"allow_client_renegotiation", SSL_OP_ALLOW_CLIENT_RENEGOTIATION}, ++#endif + #if defined(SSL_OP_ALLOW_NO_DHE_KEX) + {"allow_no_dhe_kex", SSL_OP_ALLOW_NO_DHE_KEX}, + #endif +@@ -32,21 +35,33 @@ static lsec_ssl_option_t ssl_options[] = { + #if defined(SSL_OP_CISCO_ANYCONNECT) + {"cisco_anyconnect", SSL_OP_CISCO_ANYCONNECT}, + #endif ++#if defined(SSL_OP_CLEANSE_PLAINTEXT) ++ {"cleanse_plaintext", SSL_OP_CLEANSE_PLAINTEXT}, ++#endif + #if defined(SSL_OP_COOKIE_EXCHANGE) + {"cookie_exchange", SSL_OP_COOKIE_EXCHANGE}, + #endif + #if defined(SSL_OP_CRYPTOPRO_TLSEXT_BUG) + {"cryptopro_tlsext_bug", SSL_OP_CRYPTOPRO_TLSEXT_BUG}, + #endif ++#if defined(SSL_OP_DISABLE_TLSEXT_CA_NAMES) ++ {"disable_tlsext_ca_names", SSL_OP_DISABLE_TLSEXT_CA_NAMES}, ++#endif + #if defined(SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) + {"dont_insert_empty_fragments", SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS}, + #endif ++#if defined(SSL_OP_ENABLE_KTLS) ++ {"enable_ktls", SSL_OP_ENABLE_KTLS}, ++#endif + #if defined(SSL_OP_ENABLE_MIDDLEBOX_COMPAT) + {"enable_middlebox_compat", SSL_OP_ENABLE_MIDDLEBOX_COMPAT}, + #endif + #if defined(SSL_OP_EPHEMERAL_RSA) + {"ephemeral_rsa", SSL_OP_EPHEMERAL_RSA}, + #endif ++#if defined(SSL_OP_IGNORE_UNEXPECTED_EOF) ++ {"ignore_unexpected_eof", SSL_OP_IGNORE_UNEXPECTED_EOF}, ++#endif + #if defined(SSL_OP_LEGACY_SERVER_CONNECT) + {"legacy_server_connect", SSL_OP_LEGACY_SERVER_CONNECT}, + #endif +@@ -89,6 +104,9 @@ static lsec_ssl_option_t ssl_options[] = { + #if defined(SSL_OP_NO_ENCRYPT_THEN_MAC) + {"no_encrypt_then_mac", SSL_OP_NO_ENCRYPT_THEN_MAC}, + #endif ++#if defined(SSL_OP_NO_EXTENDED_MASTER_SECRET) ++ {"no_extended_master_secret", SSL_OP_NO_EXTENDED_MASTER_SECRET}, ++#endif + #if defined(SSL_OP_NO_QUERY_MTU) + {"no_query_mtu", SSL_OP_NO_QUERY_MTU}, + #endif +diff --git a/src/options.lua b/src/options.lua +index a757c8b..678e8d5 100644 +--- a/src/options.lua b/src/options.lua +@@ -60,9 +60,12 @@ local function loadoptions(file) + local options = {} + local f = assert(io.open(file, "r")) + for line in f:lines() do +-local op = string.match(line, "define%s+(SSL_OP_%S+)") +-if op then +- table.insert(options, op) ++local op = string.match(line, "define%s+(SSL_OP_BIT%()") ++if not op then ++ op = string.match(line, "define%s+(SSL_OP_%S+)") ++ if op then ++table.insert(options, op) ++ end + end + end + table.sort(options, function(a,b) return ahttps://github.com/brunoos/luasec; +SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + dev-lua/luasocket[${LUA_USEDEP}] + dev-libs/openssl:0= + ${LUA_DEPS} +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}_openssl3.patch" +) + +lua_src_prepare() { + pushd "${BUILD_DIR}" || die + + ${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c || die + + popd +} + +src_prepare() { + default + + # Respect users CFLAGS + sed -e 's/-O2//g' -i src/Makefile || die + +
[gentoo-commits] repo/gentoo:master commit in: dev-lua/luasec/, dev-lua/luasec/files/
commit: 7291ad522ab29193a30a2ec1e92cbc0349a8c792 Author: Jason A. Donenfeld gentoo org> AuthorDate: Wed Mar 2 14:49:25 2016 + Commit: Jason Donenfeld gentoo org> CommitDate: Wed Mar 2 14:49:25 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7291ad52 dev-lua/luasec: add patch for compression dev-lua/luasec/files/luasec-0.5.1-compdefine.patch | 36 ++ dev-lua/luasec/luasec-0.5.1.ebuild | 3 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/dev-lua/luasec/files/luasec-0.5.1-compdefine.patch b/dev-lua/luasec/files/luasec-0.5.1-compdefine.patch new file mode 100644 index 000..951b6fb --- /dev/null +++ b/dev-lua/luasec/files/luasec-0.5.1-compdefine.patch @@ -0,0 +1,36 @@ +diff -ru luasec-0.5.1/src/ssl.c luasec-0.5.1-fixed/src/ssl.c +--- luasec-0.5.1/src/ssl.c 2015-11-20 22:39:32.0 +0100 luasec-0.5.1-fixed/src/ssl.c 2016-03-02 15:48:09.439005988 +0100 +@@ -395,24 +395,30 @@ + } + return 1; + } +- ++ + /** + * Return the compression method used. + */ + static int meth_compression(lua_State *L) + { ++#if !defined(OPENSSL_NO_COMP) + const COMP_METHOD *comp; ++#endif + p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection"); + if (ssl->state != LSEC_STATE_CONNECTED) { + lua_pushnil(L); + lua_pushstring(L, "closed"); + return 2; + } ++#if !defined(OPENSSL_NO_COMP) + comp = SSL_get_current_compression(ssl->ssl); + if (comp) + lua_pushstring(L, SSL_COMP_get_name(comp)); + else + lua_pushnil(L); ++#else ++ lua_pushnil(L); ++#endif + return 1; + } + +Only in luasec-0.5.1-fixed/src: ssl.c.orig diff --git a/dev-lua/luasec/luasec-0.5.1.ebuild b/dev-lua/luasec/luasec-0.5.1.ebuild index d456bb5..29e04a7 100644 --- a/dev-lua/luasec/luasec-0.5.1.ebuild +++ b/dev-lua/luasec/luasec-0.5.1.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit multilib toolchain-funcs +inherit multilib toolchain-funcs eutils DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication" HOMEPAGE="https://github.com/brunoos/luasec http://www.inf.puc-rio.br/~brunoos/luasec/; @@ -29,6 +29,7 @@ src_prepare() { -e "s#^LUACPATH.*#LUACPATH=$(pkg-config --variable INSTALL_CMOD lua)#" Makefile || die sed -i -e "s/-O2//" src/Makefile || die lua src/options.lua -g /usr/include/openssl/ssl.h > src/options.h || die + epatch "${FILESDIR}/${PN}-0.5.1-compdefine.patch" } src_compile() {