pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security New package for signify, from pkgsrc-wip



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cc182f255bbb
branches:  trunk
changeset: 386417:cc182f255bbb
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Sat Oct 08 11:30:26 2022 +0000

description:
New package for signify, from pkgsrc-wip

The signify utility creates and verifies cryptographic signatures.
A signature verifies the integrity of a message

This version of signify is part of outils, a portable collection of
non-standard OpenBSD tools.

diffstat:

 security/Makefile                                   |   3 +-
 security/signify/DESCR                              |   5 +
 security/signify/Makefile                           |  61 +++++++++++++++++++++
 security/signify/PLIST                              |   3 +
 security/signify/distinfo                           |   7 ++
 security/signify/files/minmax.h                     |  10 +++
 security/signify/patches/patch-Makefile             |  36 ++++++++++++
 security/signify/patches/patch-src_liboutils_sha2.c |  34 +++++++++++
 8 files changed, 158 insertions(+), 1 deletions(-)

diffs (201 lines):

diff -r 8cfdbf33b3e9 -r cc182f255bbb security/Makefile
--- a/security/Makefile Sat Oct 08 11:20:07 2022 +0000
+++ b/security/Makefile Sat Oct 08 11:30:26 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.873 2022/09/11 05:42:23 taca Exp $
+# $NetBSD: Makefile,v 1.874 2022/10/08 11:30:26 bsiegert Exp $
 #
 
 COMMENT=       Security and cryptography tools and libraries
@@ -592,6 +592,7 @@
 SUBDIR+=       seahorse
 SUBDIR+=       seccure
 SUBDIR+=       secpanel
+SUBDIR+=       signify
 SUBDIR+=       skey
 SUBDIR+=       sleuthkit
 SUBDIR+=       smaSHeM
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/DESCR    Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,5 @@
+The signify utility creates and verifies cryptographic signatures.
+A signature verifies the integrity of a message
+
+This version of signify is part of outils, a portable collection of
+non-standard OpenBSD tools.
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/Makefile Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,61 @@
+# $NetBSD: Makefile,v 1.1 2022/10/08 11:30:27 bsiegert Exp $
+
+DISTNAME=      outils-0.10
+PKGNAME=       ${DISTNAME:S,outils,signify,}
+CATEGORIES=    security
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=leahneukirchen/}
+GITHUB_PROJECT=        outils
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    vms%retrobsd.ddns.net@localhost
+HOMEPAGE=      https://flak.tedunangst.com/post/signify
+COMMENT=       Cryptographically sign and verify files, from OpenBSD
+LICENSE=       original-bsd AND modified-bsd AND isc AND public-domain
+
+USE_TOOLS+=    gmake
+MAKE_FLAGS+=   ALL=src/usr.bin/signify/signify
+MAKE_FLAGS+=   LIBS=${LIBS:Q}
+LIBS+=         -lm
+
+INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
+MAKE_DIRS+=            ${PKG_SYSCONFDIR}/signify
+
+OUTDIR:=       ${WRKSRC}/src/usr.bin/signify
+LIBSRCDIR:=    ${WRKSRC}/src/liboutils
+
+.include "../../mk/bsd.prefs.mk"
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_MESSAGE.paths=   Do not hardcode configuration directory
+SUBST_FILES.paths+=    ${OUTDIR}/signify.c
+SUBST_FILES.paths+=    ${OUTDIR}/signify.1
+SUBST_SED.paths=       -e 's|/etc/signify|${PKG_SYSCONFDIR}/signify|g'
+
+.if ${OPSYS} == "SunOS"
+SUBST_CLASSES+=                ints
+SUBST_MESSAGE.ints=    SunOS stdint(3) doesn't provide `u_int*' typedefs
+SUBST_STAGE.ints=      pre-configure
+SUBST_FILES.ints+=     ${LIBSRCDIR}/*.c
+SUBST_FILES.ints+=     ${LIBSRCDIR}/include/*.h
+SUBST_SED.ints=                -e 's|u_int|uint|g'
+.endif
+
+LIBS.SunOS+=   -lresolv -lrt
+
+post-patch:
+.if ${OPSYS} == "NetBSD"
+# The sys/* overrides are not needed on NetSD
+       ${RM} ${WRKSRC}/src/liboutils/include/sys/*
+
+.elif ${OPSYS} == "SunOS"
+# Solaris lacks MIN/MAX macros in sys/param.h
+       cd ${LIBSRCDIR} && ${CP} ${FILESDIR}/minmax.h .                                         \
+       && ${CAT} outils.h >> minmax.h && ${MV} minmax.h outils.h
+.endif
+
+do-install:
+       ${INSTALL_PROGRAM} ${OUTDIR}/signify ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_MAN} ${OUTDIR}/signify.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../mk/bsd.pkg.mk"
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/PLIST    Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2022/10/08 11:30:27 bsiegert Exp $
+bin/signify
+man/man1/signify.1
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/distinfo Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/10/08 11:30:27 bsiegert Exp $
+
+BLAKE2s (outils-0.10.tar.gz) = dd72f25dae8d5f6a742371ffcc7c8275f690a0e25eff5f85010067797823ecc8
+SHA512 (outils-0.10.tar.gz) = 58ba7854e7c96ba73ba984d6a33c1972640f6657d1fc138bc78a7eb29e5d7e7321386837183455631dbddda87ae2f40438e6891a5560685faf7530bed1e73031
+Size (outils-0.10.tar.gz) = 280502 bytes
+SHA1 (patch-Makefile) = dfbfc5b6c46ec36d280363c578f3709772f4aed9
+SHA1 (patch-src_liboutils_sha2.c) = 03182d6019efd9d60ff05eee9cef8de53632caa8
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/files/minmax.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/files/minmax.h   Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,10 @@
+/* MAX(a,b) returns the maximum of A and B.  */
+#ifndef MAX
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+/* MIN(a,b) returns the minimum of A and B.  */
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/patches/patch-Makefile   Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-Makefile,v 1.1 2022/10/08 11:30:27 bsiegert Exp $
+
+Do not build compatibility for functions
+already supported on target platforms.
+
+--- Makefile.orig      2021-10-14 15:34:52.000000000 +0000
++++ Makefile
+@@ -2,6 +2,7 @@ CFLAGS?=-Wall -O2
+ CPPFLAGS=-include src/liboutils/outils.h -isystem src/liboutils/include -Isrc/bin/md5 -D_GNU_SOURCE -D_DEFAULT_SOURCE -DNO_UTIL -D_PATH_INCLUDE="\"-I$(PREFIX)/share/calendar\""
+ LDFLAGS=-Wl,--as-needed
+ LIBS=-lm
++UNAME_S := $(shell uname -s)
+ 
+ ALL=src/usr.bin/apply/apply src/usr.bin/jot/jot src/usr.bin/lam/lam src/usr.bin/lndir/lndir src/bin/md5/md5 src/usr.bin/rs/rs src/usr.bin/signify/signify src/usr.bin/calendar/calendar 
src/usr.bin/vis/vis src/usr.bin/unvis/unvis src/usr.bin/what/what src/usr.sbin/rdate/rdate 
+ all: $(ALL)
+@@ -21,8 +22,20 @@ src/bin/md5/md5: src/bin/md5/md5.o src/b
+ 
+ src/usr.bin/rs/rs: src/usr.bin/rs/rs.o src/usr.bin/rs/utf8.o src/liboutils/pledge.o src/liboutils/strtonum.o src/liboutils/reallocarray.o
+ 
++ifeq ($(UNAME_S),NetBSD)
++
++src/usr.bin/signify/signify: src/usr.bin/signify/signify.o src/usr.bin/signify/crypto_api.o src/usr.bin/signify/fe25519.o src/usr.bin/signify/mod_ed25519.o src/usr.bin/signify/mod_ge25519.o 
src/usr.bin/signify/sc25519.o src/usr.bin/signify/zsig.o src/liboutils/pledge.o src/liboutils/explicit_bzero.o src/liboutils/ohash.o src/liboutils/readpassphrase.o src/liboutils/sha2.o 
src/liboutils/sha256hl.o src/liboutils/sha512_256hl.o src/liboutils/sha512hl.o src/liboutils/timingsafe_bcmp.o src/liboutils/bcrypt_pbkdf.o src/liboutils/blowfish.o src/liboutils/freezero.o
++
++else ifeq ($(UNAME_S),SunOS)
++
++src/usr.bin/signify/signify: src/usr.bin/signify/signify.o src/usr.bin/signify/crypto_api.o src/usr.bin/signify/fe25519.o src/usr.bin/signify/mod_ed25519.o src/usr.bin/signify/mod_ge25519.o 
src/usr.bin/signify/sc25519.o src/usr.bin/signify/zsig.o src/liboutils/pledge.o src/liboutils/ohash.o src/liboutils/readpassphrase.o src/liboutils/sha2.o src/liboutils/sha256hl.o 
src/liboutils/sha512_256hl.o src/liboutils/sha512hl.o src/liboutils/timingsafe_bcmp.o src/liboutils/bcrypt_pbkdf.o src/liboutils/blowfish.o
++
++else
++
+ src/usr.bin/signify/signify: src/usr.bin/signify/signify.o src/usr.bin/signify/crypto_api.o src/usr.bin/signify/fe25519.o src/usr.bin/signify/mod_ed25519.o src/usr.bin/signify/mod_ge25519.o 
src/usr.bin/signify/sc25519.o src/usr.bin/signify/zsig.o src/liboutils/pledge.o src/liboutils/strlcpy.o src/liboutils/base64.o src/liboutils/explicit_bzero.o src/liboutils/ohash.o 
src/liboutils/arc4random.o src/liboutils/getentropy_linux.o src/liboutils/readpassphrase.o src/liboutils/sha2.o src/liboutils/sha256hl.o src/liboutils/sha512_256hl.o src/liboutils/sha512hl.o 
src/liboutils/timingsafe_bcmp.o src/liboutils/bcrypt_pbkdf.o src/liboutils/blowfish.o src/liboutils/freezero.o
+ 
++endif
++
+ src/usr.bin/calendar/calendar: src/usr.bin/calendar/calendar.o src/usr.bin/calendar/day.o src/usr.bin/calendar/io.o src/usr.bin/calendar/ostern.o src/usr.bin/calendar/paskha.o 
src/usr.bin/calendar/pesach.o src/liboutils/arc4random_uniform.o src/liboutils/arc4random.o src/liboutils/getentropy_linux.o src/liboutils/explicit_bzero.o src/liboutils/pledge.o src/liboutils/sha2.o 
src/liboutils/strtonum.o
+ 
+ src/usr.bin/vis/vis: src/usr.bin/vis/vis.o src/usr.bin/vis/foldit.o src/liboutils/pledge.o src/liboutils/strtonum.o src/liboutils/vis.o
diff -r 8cfdbf33b3e9 -r cc182f255bbb security/signify/patches/patch-src_liboutils_sha2.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/signify/patches/patch-src_liboutils_sha2.c       Sat Oct 08 11:30:26 2022 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_liboutils_sha2.c,v 1.1 2022/10/08 11:30:27 bsiegert Exp $
+
+Portability fix for SunOS.
+
+--- src/liboutils/sha2.c.orig  2021-10-14 15:34:52.000000000 +0000
++++ src/liboutils/sha2.c
+@@ -58,6 +58,27 @@
+ #endif
+ #endif
+ 
++/*
++ * Must define BYTE_ORDER on SunOS
++ * since it lacks endian.h
++ *
++ */
++ 
++#if defined(__sun)
++#include <sys/byteorder.h>
++#define bswap_16(x) BSWAP_16(x)
++#define bswap_32(x) BSWAP_32(x)
++#define bswap_64(x) BSWAP_64(x)
++#define LITTLE_ENDIAN 1234
++#define BIG_ENDIAN 4321
++#ifdef LITTLE_ENDIAN
++#define BYTE_ORDER LITTLE_ENDIAN
++#else
++#define BYTE_ORDER BIG_ENDIAN
++#endif
++#endif
++
++
+ /*** SHA-224/256/384/512 Machine Architecture Definitions *****************/
+ /*
+  * BYTE_ORDER NOTE:



Home | Main Index | Thread Index | Old Index