pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/lua-bcrypt
Module Name: pkgsrc
Committed By: nia
Date: Sun Jan 16 13:41:14 UTC 2022
Modified Files:
pkgsrc/security/lua-bcrypt: Makefile distinfo
Added Files:
pkgsrc/security/lua-bcrypt/files: Makefile
pkgsrc/security/lua-bcrypt/patches: patch-src_ggentropy.c
Log Message:
lua-bcrypt: update to 2.2.1
Contains various cleanups.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/security/lua-bcrypt/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/security/lua-bcrypt/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/security/lua-bcrypt/files/Makefile
cvs rdiff -u -r0 -r1.1 \
pkgsrc/security/lua-bcrypt/patches/patch-src_ggentropy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/lua-bcrypt/Makefile
diff -u pkgsrc/security/lua-bcrypt/Makefile:1.3 pkgsrc/security/lua-bcrypt/Makefile:1.4
--- pkgsrc/security/lua-bcrypt/Makefile:1.3 Tue Jul 14 11:45:23 2020
+++ pkgsrc/security/lua-bcrypt/Makefile Sun Jan 16 13:41:13 2022
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.3 2020/07/14 11:45:23 nia Exp $
+# $NetBSD: Makefile,v 1.4 2022/01/16 13:41:13 nia Exp $
-DISTNAME= lua-bcrypt-2.1.6
-PKGNAME= ${DISTNAME:S/lua-/${LUA_PKGPREFIX}-/1}
+DISTNAME= lua-bcrypt-2.2-1
+PKGNAME= ${DISTNAME:S/lua-/${LUA_PKGPREFIX}-/1:S/-1/.1/g}
CATEGORIES= security lua
MASTER_SITES= ${MASTER_SITE_GITHUB:=mikejsavage/}
GITHUB_PROJECT= lua-bcrypt
-GITHUB_TAG= v2.1-6
+GITHUB_TAG= v2.2-1
MAINTAINER= nia%NetBSD.org@localhost
HOMEPAGE= https://github.com/mikejsavage/lua-bcrypt
@@ -14,14 +14,19 @@ LICENSE= isc
USE_TOOLS+= gmake
-CFLAGS.SunOS+= -Du_int8_t=uint8_t
-CFLAGS.SunOS+= -Du_int16_t=uint16_t
-CFLAGS.SunOS+= -Du_int32_t=uint32_t
+BUILD_DIRS+= src
INSTALLATION_DIRS+= ${LUA_CDIR}
+pre-build:
+ ${CP} -f ${FILESDIR}/Makefile ${WRKSRC}/src/Makefile
+
do-install:
- ${INSTALL_LIB} ${WRKSRC}/bcrypt.so ${DESTDIR}${PREFIX}/${LUA_CDIR}
+ ${INSTALL_LIB} ${WRKSRC}/src/bcrypt.so ${DESTDIR}${PREFIX}/${LUA_CDIR}
+
+do-test:
+ cd ${WRKSRC}/src && \
+ ${LUA_INTERPRETER} ${WRKSRC}/test-digest.lua
.include "../../lang/lua/module.mk"
.include "../../mk/bsd.prefs.mk"
Index: pkgsrc/security/lua-bcrypt/distinfo
diff -u pkgsrc/security/lua-bcrypt/distinfo:1.5 pkgsrc/security/lua-bcrypt/distinfo:1.6
--- pkgsrc/security/lua-bcrypt/distinfo:1.5 Tue Oct 26 11:17:18 2021
+++ pkgsrc/security/lua-bcrypt/distinfo Sun Jan 16 13:41:13 2022
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 11:17:18 nia Exp $
+$NetBSD: distinfo,v 1.6 2022/01/16 13:41:13 nia Exp $
-BLAKE2s (lua-bcrypt-2.1.6.tar.gz) = ae26f73b1681ec469ef3b0e9c95a3359dd5aab31427ebbc1819871854e334d44
-SHA512 (lua-bcrypt-2.1.6.tar.gz) = d2b4077e5c0e9fbdbd2c7d9f1bed6c99537198ead52079b56c1e4f1d9af151551458f0515e51729d187ff9de9190ff75aaac8fce08a67558215be6fb0c3619fc
-Size (lua-bcrypt-2.1.6.tar.gz) = 35882 bytes
+BLAKE2s (lua-bcrypt-2.2-1.tar.gz) = a69df3c11f0fcc3ae098664b2ea0d3509b5edbd84e670af3d33340a18ab8af93
+SHA512 (lua-bcrypt-2.2-1.tar.gz) = 58e8c9624770b0b4f6a7a3dc872920c0fb04ecc4e3eca5ca9062266b2908b6d85d40498f5026c2624ad106c19ecbf51c7313d81d47fd2b08803503e98f6ce598
+Size (lua-bcrypt-2.2-1.tar.gz) = 17265 bytes
+SHA1 (patch-src_ggentropy.c) = e79117f2e9644b1136f70e3c545b1e41f6cbcca2
Added files:
Index: pkgsrc/security/lua-bcrypt/files/Makefile
diff -u /dev/null pkgsrc/security/lua-bcrypt/files/Makefile:1.1
--- /dev/null Sun Jan 16 13:41:14 2022
+++ pkgsrc/security/lua-bcrypt/files/Makefile Sun Jan 16 13:41:13 2022
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1 2022/01/16 13:41:13 nia Exp $
+
+OBJS+= main.o
+OBJS+= bcrypt.o
+OBJS+= blowfish.o
+OBJS+= ggentropy.o
+OBJS+= safebfuns.o
+
+all: bcrypt.so
+
+.c.o:
+ $(CC) $(CFLAGS) -fPIC -c $<
+
+bcrypt.so: $(OBJS)
+ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
Index: pkgsrc/security/lua-bcrypt/patches/patch-src_ggentropy.c
diff -u /dev/null pkgsrc/security/lua-bcrypt/patches/patch-src_ggentropy.c:1.1
--- /dev/null Sun Jan 16 13:41:14 2022
+++ pkgsrc/security/lua-bcrypt/patches/patch-src_ggentropy.c Sun Jan 16 13:41:13 2022
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_ggentropy.c,v 1.1 2022/01/16 13:41:13 nia Exp $
+
+Add portable path for SunOS.
+https://github.com/mikejsavage/lua-bcrypt/pull/18
+
+--- src/ggentropy.c.orig 2021-12-22 18:57:54.000000000 +0000
++++ src/ggentropy.c
+@@ -27,9 +27,6 @@
+
+ #elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ )
+ # define PLATFORM_HAS_ARC4RANDOM 1
+-
+-#else
+-# error new platform
+ #endif
+
+ #include <stdbool.h>
+@@ -71,5 +68,18 @@ bool ggentropy( void * buf, size_t n ) {
+ }
+
+ #else
+-#error new platform
++
++#include <fcntl.h>
++#include <unistd.h>
++
++bool ggentropy( void * buf, size_t n ) {
++ int fd = open("/dev/urandom", O_RDONLY);
++
++ if (fd != -1) {
++ int ret = read(fd, buf, n);
++ close(fd);
++ return ret == n;
++ }
++ return false;
++}
+ #endif
Home |
Main Index |
Thread Index |
Old Index