[arch-commits] Commit in luasec/repos/community-x86_64 (3 files)

Daurnimator daurnimator at archlinux.org
Sun Jul 5 13:17:46 UTC 2020


    Date: Sunday, July 5, 2020 @ 13:17:45
  Author: daurnimator
Revision: 657822

archrelease: copy trunk to community-x86_64

Added:
  luasec/repos/community-x86_64/PKGBUILD
    (from rev 657821, luasec/trunk/PKGBUILD)
Deleted:
  luasec/repos/community-x86_64/PKGBUILD
  luasec/repos/community-x86_64/luasec-openssl-1.1.patch

--------------------------+
 PKGBUILD                 |  154 +++++++++++++++++++--------------------------
 luasec-openssl-1.1.patch |  129 -------------------------------------
 2 files changed, 68 insertions(+), 215 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-05 13:17:17 UTC (rev 657821)
+++ PKGBUILD	2020-07-05 13:17:45 UTC (rev 657822)
@@ -1,86 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Dwayne Bent <dbb.1 at liqd.org>
-# Contributor: Paul-Sebastian Manole <brokenthorn at gmail.com>
-
-pkgbase=luasec
-pkgname=(lua-sec lua51-sec lua52-sec)
-epoch=2
-pkgver=0.8.1
-pkgrel=1
-pkgdesc='Lua bindings for OpenSSL library to provide TLS/SSL communication.'
-arch=('x86_64')
-url='https://github.com/brunoos/luasec/wiki'
-license=('MIT')
-makedepends=('openssl' 'lua' 'lua-socket' 'lua51' 'lua51-socket' 'lua52' 'lua52-socket')
-options=('!buildflags')
-source=("https://github.com/brunoos/luasec/archive/luasec-$pkgver.tar.gz"
-        luasec-openssl-1.1.patch)
-sha256sums=('cc9fc92df3be56add5c9687319951f457c31f5d12ac19cfc09d53056dc24f04e'
-            '4db47716608a0424bce296678bd967a19d2dd5893df23d8e0e0e1fb0d5281c80')
-
-prepare() {
-  # openssl 1.1 compatibility
-#  cd luasec-luasec-$pkgver
-#  patch -p1 -i ../luasec-openssl-1.1.patch
-#  cd ..
-
-  cp -a luasec-luasec-$pkgver luasec-luasec-$pkgver-51
-  cp -a luasec-luasec-$pkgver luasec-luasec-$pkgver-52
-}
-
-build() {
-  msg2 'Building with lua 5.3'
-  cd "$srcdir"/luasec-luasec-$pkgver
-  make linux DEFS="-DWITH_LUASOCKET -DOPENSSL_NO_SSL3"
-
-  msg2 'Building with lua 5.1'
-  cd "$srcdir"/luasec-luasec-$pkgver-51
-  find . -type f -name \*.[ch] -exec sed -i \
-    -e 's|include .lua.h.|include "lua5.1/lua.h"|g' \
-    -e 's|include .lualib.h.|include "lua5.1/lualib.h"|g' \
-    -e 's|include .luaconf.h.|include "lua5.1/luaconf.h"|g' \
-    -e 's|include .lauxlib.h.|include "lua5.1/lauxlib.h"|g' \
-    {} \;
-  make linux DEFS="-DWITH_LUASOCKET -DOPENSSL_NO_SSL3"
-
-  msg2 'Building with lua 5.2'
-  cd "$srcdir"/luasec-luasec-$pkgver-52
-  find . -type f -name \*.[ch] -exec sed -i \
-    -e 's|include .lua.h.|include "lua5.2/lua.h"|g' \
-    -e 's|include .lualib.h.|include "lua5.2/lualib.h"|g' \
-    -e 's|include .luaconf.h.|include "lua5.2/luaconf.h"|g' \
-    -e 's|include .lauxlib.h.|include "lua5.2/lauxlib.h"|g' \
-    {} \;
-  make linux DEFS="-DWITH_LUASOCKET -DOPENSSL_NO_SSL3"
-}
-
-package_lua-sec() {
-  depends=('openssl' 'lua' 'lua-socket')
-
-  install -dm755 "$pkgdir/usr/lib/lua/5.3"
-  cd luasec-luasec-$pkgver
-  make LUACPATH="$pkgdir/usr/lib/lua/5.3" LUAPATH="$pkgdir/usr/share/lua/5.3" install
-  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_lua51-sec() {
-  depends=('openssl' 'lua51' 'lua51-socket')
-  conflicts=('luasec')
-  replaces=('luasec')
-
-  install -dm755 "$pkgdir/usr/lib/lua/5.1"
-  cd luasec-luasec-$pkgver-51
-  make LUACPATH="$pkgdir/usr/lib/lua/5.1" LUAPATH="$pkgdir/usr/share/lua/5.1" install
-  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_lua52-sec() {
-  depends=('openssl' 'lua52' 'lua52-socket')
-
-  install -dm755 "$pkgdir/usr/lib/lua/5.2"
-  cd luasec-luasec-$pkgver-52
-  make LUACPATH="$pkgdir/usr/lib/lua/5.2" LUAPATH="$pkgdir/usr/share/lua/5.2" install
-  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: luasec/repos/community-x86_64/PKGBUILD (from rev 657821, luasec/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-07-05 13:17:45 UTC (rev 657822)
@@ -0,0 +1,68 @@
+# Maintainer: Daurnimator <daurnimator at archlinux.org>
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Dwayne Bent <dbb.1 at liqd.org>
+# Contributor: Paul-Sebastian Manole <brokenthorn at gmail.com>
+
+pkgbase=luasec
+pkgname=(lua-sec lua51-sec lua52-sec)
+epoch=2
+pkgver=0.9
+pkgrel=1
+pkgdesc='Lua bindings for OpenSSL library to provide TLS/SSL communication.'
+arch=('x86_64')
+url='https://github.com/brunoos/luasec/wiki'
+license=('MIT')
+makedepends=('openssl'
+             'lua'
+             'lua-socket'
+             'lua51'
+             'lua51-socket'
+             'lua52'
+             'lua52-socket')
+depends=('openssl')
+source=("$pkgbase-v$pkgver.tar.gz"::"https://github.com/brunoos/luasec/archive/v$pkgver.tar.gz")
+sha512sums=('ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933')
+
+prepare() {
+  cp -a luasec-$pkgver luasec-$pkgver-51
+  cp -a luasec-$pkgver luasec-$pkgver-52
+}
+
+build() {
+  cd "$srcdir"/luasec-$pkgver-51
+  make linux
+
+  cd "$srcdir"/luasec-$pkgver-52
+  make linux
+
+  cd "$srcdir"/luasec-$pkgver
+  make linux
+}
+
+package_lua51-sec() {
+  depends+=('lua51-socket')
+  conflicts=('luasec')
+  replaces=('luasec')
+
+  cd "luasec-$pkgver-51"
+  make LUACPATH="$pkgdir/usr/lib/lua/5.1" LUAPATH="$pkgdir/usr/share/lua/5.1" install
+  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lua52-sec() {
+  depends+=('lua52-socket')
+
+  cd "luasec-$pkgver-52"
+  make LUACPATH="$pkgdir/usr/lib/lua/5.2" LUAPATH="$pkgdir/usr/share/lua/5.2" install
+  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lua-sec() {
+  depends+=('lua-socket')
+
+  cd "luasec-$pkgver"
+  make LUACPATH="$pkgdir/usr/lib/lua/5.3" LUAPATH="$pkgdir/usr/share/lua/5.3" install
+  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: luasec-openssl-1.1.patch
===================================================================
--- luasec-openssl-1.1.patch	2020-07-05 13:17:17 UTC (rev 657821)
+++ luasec-openssl-1.1.patch	2020-07-05 13:17:45 UTC (rev 657822)
@@ -1,129 +0,0 @@
-From: Bruno Silvestre <brunoos at inf.ufg.br>
-Date: Wed, 14 Sep 2016 17:47:09 -0300
-Subject: Compatibility with OpenSSL 1.1.0
-
-Defining macros X509_up_ref() and SSL_is_server to use the same
-API of OpenSSL 1.1.0.
----
- src/context.c |  4 ----
- src/ssl.c     | 15 +++++++++++----
- 2 files changed, 11 insertions(+), 8 deletions(-)
-
-diff --git a/src/context.c b/src/context.c
-index 22f43b7..4187314 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -35,10 +35,6 @@ typedef const SSL_METHOD LSEC_SSL_METHOD;
- typedef       SSL_METHOD LSEC_SSL_METHOD;
- #endif
- 
--#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
--#define SSLv23_method() TLS_method()
--#endif
--
- /*-- Compat - Lua 5.1 --------------------------------------------------------*/
- 
- #if (LUA_VERSION_NUM == 501)
-diff --git a/src/ssl.c b/src/ssl.c
-index 84c609d..d7b7243 100644
---- a/src/ssl.c
-+++ b/src/ssl.c
-@@ -31,6 +31,13 @@
- #include "context.h"
- #include "ssl.h"
- 
-+
-+#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER<0x10100000L
-+#define SSL_is_server(s) (s->server)
-+#define X509_up_ref(c)   CRYPTO_add(&c->references, 1, CRYPTO_LOCK_X509)
-+#endif
-+
-+
- /**
-  * Underline socket error.
-  */
-@@ -460,7 +467,7 @@ static int meth_getpeercertificate(lua_State *L)
-   /* In a server-context, the stack doesn't contain the peer cert,
-    * so adjust accordingly.
-    */
--  if (ssl->ssl->server)
-+  if (SSL_is_server(ssl->ssl))
-     --n;
-   certs = SSL_get_peer_cert_chain(ssl->ssl);
-   if (n >= sk_X509_num(certs)) {
-@@ -470,7 +477,7 @@ static int meth_getpeercertificate(lua_State *L)
-   cert = sk_X509_value(certs, n);
-   /* Increment the reference counting of the object. */
-   /* See SSL_get_peer_certificate() source code.     */
--  CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
-+  X509_up_ref(cert);
-   lsec_pushx509(L, cert);
-   return 1;
- }
-@@ -492,7 +499,7 @@ static int meth_getpeerchain(lua_State *L)
-     return 2;
-   }
-   lua_newtable(L);
--  if (ssl->ssl->server) {
-+  if (SSL_is_server(ssl->ssl)) {
-     lsec_pushx509(L, SSL_get_peer_certificate(ssl->ssl));
-     lua_rawseti(L, -2, idx++);
-   }
-@@ -502,7 +509,7 @@ static int meth_getpeerchain(lua_State *L)
-     cert = sk_X509_value(certs, i);
-     /* Increment the reference counting of the object. */
-     /* See SSL_get_peer_certificate() source code.     */
--    CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
-+    X509_up_ref(cert);
-     lsec_pushx509(L, cert);
-     lua_rawseti(L, -2, idx++);
-   }
-From: Bruno Silvestre <brunoos at inf.ufg.br>
-Date: Tue, 13 Sep 2016 13:30:44 -0300
-Subject: Use EVP_PKEY_base_id() to recover the key's type
-
----
- src/x509.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/x509.c b/src/x509.c
-index 207d682..0042fc4 100644
---- a/src/x509.c
-+++ b/src/x509.c
-@@ -415,7 +415,7 @@ static int meth_pubkey(lua_State* L)
-     bytes = BIO_get_mem_data(bio, &data);
-     if (bytes > 0) {
-       lua_pushlstring(L, data, bytes);
--      switch(EVP_PKEY_type(pkey->type)) {
-+      switch(EVP_PKEY_base_id(pkey)) {
-         case EVP_PKEY_RSA:
-           lua_pushstring(L, "RSA");
-           break;
-From: Bruno Silvestre <brunoos at inf.ufg.br>
-Date: Tue, 13 Sep 2016 13:22:25 -0300
-Subject: Use X509_EXTENSION_get_object() to get the 'object' field from
- extension
-
----
- src/x509.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/x509.c b/src/x509.c
-index a8cb9fd..207d682 100644
---- a/src/x509.c
-+++ b/src/x509.c
-@@ -304,11 +304,11 @@ int meth_extensions(lua_State* L)
-       break;
- 
-     /* Push ret[oid] */
--    push_asn1_objname(L, extension->object, 1);
-+    push_asn1_objname(L, X509_EXTENSION_get_object(extension), 1);
-     push_subtable(L, -2);
- 
-     /* Set ret[oid].name = name */
--    push_asn1_objname(L, extension->object, 0);
-+    push_asn1_objname(L, X509_EXTENSION_get_object(extension), 0);
-     lua_setfield(L, -2, "name");
- 
-     n_general_names = sk_GENERAL_NAME_num(values);
-



More information about the arch-commits mailing list