pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/radmind Add openssl 1.1 support, while mainta...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d0790754074d
branches: trunk
changeset: 323073:d0790754074d
user: hauke <hauke%pkgsrc.org@localhost>
date: Fri May 03 11:04:34 2019 +0000
description:
Add openssl 1.1 support, while maintaining compatibility to 1.0, from
upstream <https://github.com/Radmind/radmind/pull/320> with minor
changes.
diffstat:
sysutils/radmind/Makefile | 16 +-
sysutils/radmind/distinfo | 11 +-
sysutils/radmind/patches/patch-Makefile.in | 82 ++++++++++++-
sysutils/radmind/patches/patch-cksum.c | 102 +++++++++++++++++
sysutils/radmind/patches/patch-openssl__compat.c | 38 ++++++
sysutils/radmind/patches/patch-openssl__compat.h | 25 ++++
sysutils/radmind/patches/patch-retr.c | 132 +++++++++++++++++++++-
sysutils/radmind/patches/patch-stor.c | 126 +++++++++++++++++++++
sysutils/radmind/patches/patch-t2pkg.c | 124 +++++++++++++++++++++
9 files changed, 628 insertions(+), 28 deletions(-)
diffs (truncated from 732 to 300 lines):
diff -r b82b3c3a7ef2 -r d0790754074d sysutils/radmind/Makefile
--- a/sysutils/radmind/Makefile Fri May 03 10:54:38 2019 +0000
+++ b/sysutils/radmind/Makefile Fri May 03 11:04:34 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.38 2018/12/18 14:16:17 hauke Exp $
+# $NetBSD: Makefile,v 1.39 2019/05/03 11:04:34 hauke Exp $
#
DISTNAME= radmind-1.14.1
-PKGREVISION= 7
+PKGREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=radmind/}
@@ -25,12 +25,16 @@
RADMINDDIR= ${VARBASE}/radmind
BUILD_DEFS+= VARBASE
+RCD_SCRIPTS= radmind
+
OWN_DIRS_PERMS+= ${RADMINDDIR} ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0750
-OWN_DIRS_PERMS+= ${RADMINDDIR}/client ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0750
-OWN_DIRS_PERMS+= ${RADMINDDIR}/preapply ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0750
-OWN_DIRS_PERMS+= ${RADMINDDIR}/postapply ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0750
OWN_DIRS_PERMS+= ${RADMINDDIR}/cert ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
-RCD_SCRIPTS= radmind
+OWN_DIRS_PERMS+= ${RADMINDDIR}/client ${REAL_ROOT_USER} \
+ ${REAL_ROOT_GROUP} 0750
+OWN_DIRS_PERMS+= ${RADMINDDIR}/preapply ${REAL_ROOT_USER} \
+ ${REAL_ROOT_GROUP} 0750
+OWN_DIRS_PERMS+= ${RADMINDDIR}/postapply ${REAL_ROOT_USER} \
+ ${REAL_ROOT_GROUP} 0750
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
diff -r b82b3c3a7ef2 -r d0790754074d sysutils/radmind/distinfo
--- a/sysutils/radmind/distinfo Fri May 03 10:54:38 2019 +0000
+++ b/sysutils/radmind/distinfo Fri May 03 11:04:34 2019 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.22 2018/12/18 14:16:17 hauke Exp $
+$NetBSD: distinfo,v 1.23 2019/05/03 11:04:34 hauke Exp $
SHA1 (radmind-1.14.1.tar.gz) = 26f37f1c002384a9c609e688d6cee2fa15b6d0d2
RMD160 (radmind-1.14.1.tar.gz) = 6b925083ef9dce2de21ebb0ffef287b1ffe9173d
SHA512 (radmind-1.14.1.tar.gz) = bccf9681a6899be3b500065237dd1e04cd83ffb6f9be0e355412e7b0c556325f7d13435cec65a8a5e156e4411da915744f01a615472f6361d52c4d54d8be20eb
Size (radmind-1.14.1.tar.gz) = 403553 bytes
-SHA1 (patch-Makefile.in) = 7667b83fe2984eaa2487c75a3f82eede0cda06e2
+SHA1 (patch-Makefile.in) = b7222e8854172104545f3bfd10b843cc3df85ce8
+SHA1 (patch-cksum.c) = ff9218d189c348e4da5a7bebb5a74473ec79e9ce
SHA1 (patch-command.c) = 26e93be15a5a1113b8f75eb6eaf1d77892947bc7
SHA1 (patch-command.h) = 03daa77363c681ef625cf429071f02245689e1e9
SHA1 (patch-config.h.in) = 89bce7b9d256e81ebb6ce1319183cb346260bcde
@@ -14,7 +15,11 @@
SHA1 (patch-largefile.h) = 806f12878aa628f30355b82ac23a5c92740f42a1
SHA1 (patch-lcksum.c) = 7b7b4da338bb13f2508c5b22307263eaedb32347
SHA1 (patch-libsnet_snet.c) = 29484ae6775a1fe9d02980a84503762b55a093e9
+SHA1 (patch-openssl__compat.c) = 0076abec076f29764d86ec1fc3b0bf7092c7dd18
+SHA1 (patch-openssl__compat.h) = d73ce65dde6e48e378feded637b7b6a4d8e36047
SHA1 (patch-ra.sh) = 05ba697814bf4833a9c38f881e43639067afba29
-SHA1 (patch-retr.c) = 8798a4467fad905aac5061ff1c9759c29f9b7f74
+SHA1 (patch-retr.c) = 7c76538c3159fa0e10e5a44c358f3091ad16d594
+SHA1 (patch-stor.c) = f0a5a94222513a02d6cae3f2141e592866765fcb
+SHA1 (patch-t2pkg.c) = 8c8379ad8e33fc07c83d04c944fb1e425775739c
SHA1 (patch-transcript.c) = 2fab20d210317b0e0ba52102359588670ba5f941
SHA1 (patch-update.c) = 2b951451fc1b91492eb0efe16d28e21c5e8d0470
diff -r b82b3c3a7ef2 -r d0790754074d sysutils/radmind/patches/patch-Makefile.in
--- a/sysutils/radmind/patches/patch-Makefile.in Fri May 03 10:54:38 2019 +0000
+++ b/sysutils/radmind/patches/patch-Makefile.in Fri May 03 11:04:34 2019 +0000
@@ -1,15 +1,77 @@
-$NetBSD: patch-Makefile.in,v 1.2 2018/12/18 14:16:18 hauke Exp $
+$NetBSD: patch-Makefile.in,v 1.3 2019/05/03 11:04:34 hauke Exp $
Patch pkgsrc variables
---- Makefile.in.orig 2010-12-13 03:43:49.000000000 +0000
+Add openssl 1.0.x compatibility shims
+
+--- Makefile.in.orig 2019-05-02 14:26:24.379182232 +0000
+++ Makefile.in
-@@ -269,6 +269,8 @@ rash : FRC
- -e 's@_RADMIND_MAIL_DOMAIN@${RADMIND_MAIL_DOMAIN}@g' \
- -e 's@_RADMIND_COMMANDFILE@${COMMANDFILE}@g' \
- -e 's@_RADMIND_VERSION@$(shell cat VERSION)@g' \
-+ -e 's@_PKG_SYSCONFDIR@${PKG_SYSCONFDIR}@g' \
-+ -e 's@_LOCALBASE@${LOCALBASE}@g' \
- -e 's@_RADMIND_ECHO_PATH@${ECHO}@g' \
- ${srcdir}/ra.sh > tmp/ra.sh;
+@@ -56,42 +56,48 @@ TARGETS= radmind ${BINTARGETS}
+
+ RADMIND_OBJ= version.o daemon.o command.o argcargv.o code.o \
+ cksum.o base64.o mkdirs.o applefile.o connect.o \
+- list.o wildcard.o logname.o pathcmp.o tls.o
++ list.o wildcard.o logname.o pathcmp.o tls.o \
++ openssl_compat.o
+
+ FSDIFF_OBJ= version.o fsdiff.o argcargv.o transcript.o llist.o code.o \
+ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \
+- list.o wildcard.o
++ list.o wildcard.o openssl_compat.o
+
+ KTCHECK_OBJ= version.o ktcheck.o argcargv.o retr.o base64.o code.o \
+ cksum.o list.o llist.o connect.o applefile.o tls.o pathcmp.o \
+- progress.o mkdirs.o report.o rmdirs.o mkprefix.o
++ progress.o mkdirs.o report.o rmdirs.o mkprefix.o \
++ openssl_compat.o
+
+ LAPPLY_OBJ= version.o lapply.o argcargv.o code.o base64.o retr.o \
+ radstat.o update.o cksum.o connect.o pathcmp.o progress.o \
+- applefile.o report.o tls.o mkprefix.o
++ applefile.o report.o tls.o mkprefix.o openssl_compat.o
+
+ LCREATE_OBJ= version.o lcreate.o argcargv.o code.o connect.o progress.o \
+- stor.o applefile.o base64.o cksum.o radstat.o tls.o
++ stor.o applefile.o base64.o cksum.o radstat.o tls.o \
++ openssl_compat.o
+
+ LCKSUM_OBJ= version.o lcksum.o argcargv.o cksum.o base64.o code.o \
+- progress.o pathcmp.o applefile.o connect.o root.o
++ progress.o pathcmp.o applefile.o connect.o root.o \
++ openssl_compat.o
+ LMERGE_OBJ= version.o lmerge.o argcargv.o code.o pathcmp.o mkdirs.o \
+ root.o
+
+ LFDIFF_OBJ= version.o lfdiff.o argcargv.o connect.o retr.o cksum.o \
+ progress.o base64.o applefile.o code.o tls.o pathcmp.o \
+- transcript.o list.o radstat.o hardlink.o mkprefix.o wildcard.o
++ transcript.o list.o radstat.o hardlink.o mkprefix.o \
++ wildcard.o openssl_compat.o
+
+ REPO_OBJ= version.o repo.o report.o argcargv.o connect.o code.o tls.o
+
+ T2PKG_OBJ= version.o t2pkg.o argcargv.o transcript.o connect.o code.o \
+ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \
+- list.o rmdirs.o mkdirs.o wildcard.o progress.o
++ list.o rmdirs.o mkdirs.o wildcard.o progress.o \
++ openssl_compat.o
+
+ TWHICH_OBJ= version.o twhich.o argcargv.o transcript.o llist.o code.o \
+ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \
+- list.o wildcard.o
++ list.o wildcard.o openssl_compat.o
+
+ LSORT_OBJ= version.o lsort.o pathcmp.o code.o argcargv.o
+
+@@ -102,6 +108,10 @@ version.o : version.c
+ -DVERSION=\"`cat ${srcdir}/VERSION`\" \
+ -c ${srcdir}/version.c
+
++openssl_compat.o : openssl_compat.c
++ ${CC} ${CFLAGS} \
++ -c ${srcdir}/openssl_compat.c
++
+ transcript.o : transcript.c
+ ${CC} ${CFLAGS} \
+ -D_RADMIND_PATH=\"${RADMINDDIR}\" \
diff -r b82b3c3a7ef2 -r d0790754074d sysutils/radmind/patches/patch-cksum.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/radmind/patches/patch-cksum.c Fri May 03 11:04:34 2019 +0000
@@ -0,0 +1,102 @@
+$NetBSD: patch-cksum.c,v 1.1 2019/05/03 11:04:34 hauke Exp $
+
+Move to openssl 1.1 api
+
+--- cksum.c.orig 2010-12-13 03:42:49.000000000 +0000
++++ cksum.c
+@@ -20,6 +20,7 @@
+
+ #include <openssl/evp.h>
+
++#include "openssl_compat.h"
+ #include "applefile.h"
+ #include "cksum.h"
+ #include "base64.h"
+@@ -41,21 +42,22 @@ do_fcksum( int fd, char *cksum_b64 )
+ off_t size = 0;
+ unsigned char buf[ 8192 ];
+ extern EVP_MD *md;
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
+ unsigned char md_value[ EVP_MAX_MD_SIZE ];
+
+- EVP_DigestInit( &mdctx, md );
++ EVP_DigestInit( mdctx, md );
+
+ while (( rr = read( fd, buf, sizeof( buf ))) > 0 ) {
+ size += rr;
+- EVP_DigestUpdate( &mdctx, buf, (unsigned int)rr );
++ EVP_DigestUpdate( mdctx, buf, (unsigned int)rr );
+ }
+ if ( rr < 0 ) {
+ return( -1 );
+ }
+
+- EVP_DigestFinal( &mdctx, md_value, &md_len );
++ EVP_DigestFinal( mdctx, md_value, &md_len );
+ base64_e( md_value, md_len, cksum_b64 );
++ EVP_MD_CTX_free(mdctx);
+
+ return( size );
+ }
+@@ -103,13 +105,13 @@ do_acksum( char *path, char *cksum_b64,
+ struct as_entry as_entries_endian[ 3 ];
+ unsigned int md_len;
+ extern EVP_MD *md;
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
+ unsigned char md_value[ EVP_MAX_MD_SIZE ];
+
+- EVP_DigestInit( &mdctx, md );
++ EVP_DigestInit( mdctx, md );
+
+ /* checksum applesingle header */
+- EVP_DigestUpdate( &mdctx, (char *)&as_header, AS_HEADERLEN );
++ EVP_DigestUpdate( mdctx, (char *)&as_header, AS_HEADERLEN );
+ size += (size_t)AS_HEADERLEN;
+
+ /* endian handling, sum big-endian header entries */
+@@ -120,12 +122,12 @@ do_acksum( char *path, char *cksum_b64,
+ as_entry_netswap( &as_entries_endian[ AS_DFE ] );
+
+ /* checksum header entries */
+- EVP_DigestUpdate( &mdctx, (char *)&as_entries_endian,
++ EVP_DigestUpdate( mdctx, (char *)&as_entries_endian,
+ (unsigned int)( 3 * sizeof( struct as_entry )));
+ size += sizeof( 3 * sizeof( struct as_entry ));
+
+ /* checksum finder info data */
+- EVP_DigestUpdate( &mdctx, afinfo->ai.ai_data, FINFOLEN );
++ EVP_DigestUpdate( mdctx, afinfo->ai.ai_data, FINFOLEN );
+ size += FINFOLEN;
+
+ /* checksum rsrc fork data */
+@@ -140,7 +142,7 @@ do_acksum( char *path, char *cksum_b64,
+ return( -1 );
+ }
+ while (( rc = read( rfd, buf, sizeof( buf ))) > 0 ) {
+- EVP_DigestUpdate( &mdctx, buf, (unsigned int)rc );
++ EVP_DigestUpdate( mdctx, buf, (unsigned int)rc );
+ size += (size_t)rc;
+ }
+ if ( close( rfd ) < 0 ) {
+@@ -156,7 +158,7 @@ do_acksum( char *path, char *cksum_b64,
+ }
+ /* checksum data fork */
+ while (( rc = read( dfd, buf, sizeof( buf ))) > 0 ) {
+- EVP_DigestUpdate( &mdctx, buf, (unsigned int)rc );
++ EVP_DigestUpdate( mdctx, buf, (unsigned int)rc );
+ size += (size_t)rc;
+ }
+ if ( rc < 0 ) {
+@@ -166,8 +168,9 @@ do_acksum( char *path, char *cksum_b64,
+ return( -1 );
+ }
+
+- EVP_DigestFinal( &mdctx, md_value, &md_len );
++ EVP_DigestFinal( mdctx, md_value, &md_len );
+ base64_e( ( char*)&md_value, md_len, cksum_b64 );
++ EVP_MD_CTX_free();
+
+ return( size );
+ }
diff -r b82b3c3a7ef2 -r d0790754074d sysutils/radmind/patches/patch-openssl__compat.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/radmind/patches/patch-openssl__compat.c Fri May 03 11:04:34 2019 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-openssl__compat.c,v 1.1 2019/05/03 11:04:34 hauke Exp $
+
+Provide compatibility shims for building with openssl 1.0
+
+--- openssl_compat.c.orig 2019-05-03 10:46:27.805935157 +0000
++++ openssl_compat.c
+@@ -0,0 +1,31 @@
++/*
++ * OpenSSL Compatibility Shims for pre-1.1.0
++ *
++*/
++#include <string.h>
++#include <openssl/engine.h>
++#include "openssl_compat.h"
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++static void *OPENSSL_zalloc(size_t num)
++{
++ void *ret = OPENSSL_malloc(num);
++
++ if (ret != NULL)
++ memset(ret, 0, num);
++ return ret;
++}
++
++EVP_MD_CTX *EVP_MD_CTX_new(void)
++{
++ return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
++}
++
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
++{
++ EVP_MD_CTX_cleanup(ctx);
Home |
Main Index |
Thread Index |
Old Index