svn commit: r517553 - in head/security: razorback-api razorback-api/files razorback-dispatcher

John Baldwin jhb at FreeBSD.org
Thu Nov 14 01:04:04 UTC 2019


Author: jhb (src,doc committer)
Date: Thu Nov 14 01:04:01 2019
New Revision: 517553
URL: https://svnweb.freebsd.org/changeset/ports/517553

Log:
  Update security/razorback-api to compile with OpenSSL 1.1.x.
  
  This is only compile tested, not run-tested as I don't use this
  software.  Rather than patching the nested libssh, it switches
  to using libssh from security/libssh.  There is then an additional
  patch to support OpenSSL 1.1.
  
  PR:		228938
  Approved by:	lwhsu
  Differential Revision:	https://reviews.freebsd.org/D20844

Added:
  head/security/razorback-api/files/patch-Makefile.in   (contents, props changed)
  head/security/razorback-api/files/patch-configure   (contents, props changed)
  head/security/razorback-api/files/patch-etc-Makefile.in   (contents, props changed)
  head/security/razorback-api/files/patch-include-Makefile.in   (contents, props changed)
  head/security/razorback-api/files/patch-include-razorback-types.h   (contents, props changed)
  head/security/razorback-api/files/patch-m4-Makefile.in   (contents, props changed)
  head/security/razorback-api/files/patch-src-Makefile.in   (contents, props changed)
  head/security/razorback-api/files/patch-src-hash.c   (contents, props changed)
Modified:
  head/security/razorback-api/Makefile
  head/security/razorback-api/pkg-plist
  head/security/razorback-dispatcher/Makefile

Modified: head/security/razorback-api/Makefile
==============================================================================
--- head/security/razorback-api/Makefile	Thu Nov 14 00:56:58 2019	(r517552)
+++ head/security/razorback-api/Makefile	Thu Nov 14 01:04:01 2019	(r517553)
@@ -15,6 +15,7 @@ LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libconfig.so:devel/libconfig \
+		libssh.so:security/libssh \
 		libuuid.so:misc/e2fsprogs-libuuid \
 		libcurl.so:ftp/curl \
 		libjson-c.so:devel/json-c
@@ -35,14 +36,7 @@ ASSERT_CONFIGURE_ENABLE=	assert
 CNC_DEBUG_CONFIGURE_ENABLE=	cnc-debug
 STOMP_DEBUG_CONFIGURE_ENABLE=	stomp-debug
 
-.include <bsd.port.pre.mk>
-
-.if ${SSL_DEFAULT} == base || ${SSL_DEFAULT} == openssl111
-BROKEN_FreeBSD_12=	incomplete definition of type 'struct rsa_st'
-BROKEN_FreeBSD_13=	incomplete definition of type 'struct rsa_st'
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e s/json/json-c/ -e s/-Werror// ${WRKSRC}/configure
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Added: head/security/razorback-api/files/patch-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-Makefile.in	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,19 @@
+--- Makefile.in.orig	2019-07-03 10:16:17.248064000 -0700
++++ Makefile.in	2019-07-03 10:16:37.888155000 -0700
+@@ -52,7 +52,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ 	$(top_srcdir)/common_m4/set_dirs.m4 \
+ 	$(top_srcdir)/common_m4/standard_headers_functions.m4 \
+ 	$(top_srcdir)/common_m4/standard_options.m4 \
+-	$(top_srcdir)/libssh/configure.m4 \
+ 	$(top_srcdir)/common_m4/compiler_options.m4 \
+ 	$(top_srcdir)/common_m4/cflags.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+@@ -262,7 +261,7 @@ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-SUBDIRS = m4 etc include libssh src tests
++SUBDIRS = m4 etc include src tests
+ EXTRA_DIST = BUGS COPYING INSTALL LICENSE README TODO
+ pkgconfigdir = $(prefix)/libdata/pkgconfig
+ pkgconfig_DATA = razorback.pc

Added: head/security/razorback-api/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-configure	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,22 @@
+--- configure.orig	2019-07-03 10:16:22.080221000 -0700
++++ configure	2019-07-03 10:17:08.000445000 -0700
+@@ -13050,7 +13050,7 @@ echo "CFLAGS set to $CFLAGS"
+ 
+ 
+ 
+-ac_config_files="$ac_config_files razorback.pc Makefile m4/Makefile etc/Makefile include/Makefile src/Makefile libssh/Makefile libssh/src/Makefile libssh/src/threads/Makefile libssh/include/Makefile tests/Makefile"
++ac_config_files="$ac_config_files razorback.pc Makefile m4/Makefile etc/Makefile include/Makefile src/Makefile tests/Makefile"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -14041,10 +14041,6 @@ do
+     "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
+     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+-    "libssh/Makefile") CONFIG_FILES="$CONFIG_FILES libssh/Makefile" ;;
+-    "libssh/src/Makefile") CONFIG_FILES="$CONFIG_FILES libssh/src/Makefile" ;;
+-    "libssh/src/threads/Makefile") CONFIG_FILES="$CONFIG_FILES libssh/src/threads/Makefile" ;;
+-    "libssh/include/Makefile") CONFIG_FILES="$CONFIG_FILES libssh/include/Makefile" ;;
+     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ 
+   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;

Added: head/security/razorback-api/files/patch-etc-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-etc-Makefile.in	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,10 @@
+--- etc/Makefile.in.orig	2019-07-03 11:14:48.837057000 -0700
++++ etc/Makefile.in	2019-07-03 11:14:57.333020000 -0700
+@@ -48,7 +48,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ 	$(top_srcdir)/common_m4/set_dirs.m4 \
+ 	$(top_srcdir)/common_m4/standard_headers_functions.m4 \
+ 	$(top_srcdir)/common_m4/standard_options.m4 \
+-	$(top_srcdir)/libssh/configure.m4 \
+ 	$(top_srcdir)/common_m4/compiler_options.m4 \
+ 	$(top_srcdir)/common_m4/cflags.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \

Added: head/security/razorback-api/files/patch-include-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-include-Makefile.in	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,10 @@
+--- include/Makefile.in.orig	2019-07-03 11:15:28.918674000 -0700
++++ include/Makefile.in	2019-07-03 11:15:34.477248000 -0700
+@@ -49,7 +49,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ 	$(top_srcdir)/common_m4/set_dirs.m4 \
+ 	$(top_srcdir)/common_m4/standard_headers_functions.m4 \
+ 	$(top_srcdir)/common_m4/standard_options.m4 \
+-	$(top_srcdir)/libssh/configure.m4 \
+ 	$(top_srcdir)/common_m4/compiler_options.m4 \
+ 	$(top_srcdir)/common_m4/cflags.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \

Added: head/security/razorback-api/files/patch-include-razorback-types.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-include-razorback-types.h	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,11 @@
+--- include/razorback/types.h.orig	2019-07-03 11:01:48.211000000 -0700
++++ include/razorback/types.h	2019-07-03 11:01:57.144863000 -0700
+@@ -56,7 +56,7 @@ struct Hash
+     uint32_t iType;             ///< The hash Type.
+     uint32_t iSize;             ///< size of the data stored, must be the same for all hashes in system
+     uint8_t *pData;             ///< actual data of the hash
+-    EVP_MD_CTX CTX;         ///< Private hash data.
++    EVP_MD_CTX *CTX;         ///< Private hash data.
+     uint32_t iFlags;            ///< Hash Flags.
+ };
+ 

Added: head/security/razorback-api/files/patch-m4-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-m4-Makefile.in	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,10 @@
+--- m4/Makefile.in.orig	2019-07-03 11:16:02.965284000 -0700
++++ m4/Makefile.in	2019-07-03 11:16:07.044879000 -0700
+@@ -47,7 +47,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ 	$(top_srcdir)/common_m4/set_dirs.m4 \
+ 	$(top_srcdir)/common_m4/standard_headers_functions.m4 \
+ 	$(top_srcdir)/common_m4/standard_options.m4 \
+-	$(top_srcdir)/libssh/configure.m4 \
+ 	$(top_srcdir)/common_m4/compiler_options.m4 \
+ 	$(top_srcdir)/common_m4/cflags.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \

Added: head/security/razorback-api/files/patch-src-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-src-Makefile.in	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,23 @@
+--- src/Makefile.in.orig	2019-07-03 11:16:51.512300000 -0700
++++ src/Makefile.in	2019-07-03 11:17:24.953401000 -0700
+@@ -50,7 +50,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ 	$(top_srcdir)/common_m4/set_dirs.m4 \
+ 	$(top_srcdir)/common_m4/standard_headers_functions.m4 \
+ 	$(top_srcdir)/common_m4/standard_options.m4 \
+-	$(top_srcdir)/libssh/configure.m4 \
+ 	$(top_srcdir)/common_m4/compiler_options.m4 \
+ 	$(top_srcdir)/common_m4/cflags.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+@@ -375,9 +374,9 @@ transfer/http.c \
+ transfer/ssh.c \
+ uuids.c
+ 
+-librazorback_api_la_CFLAGS = -DBUILDING_SO -I$(top_srcdir)/libssh/include -I$(top_srcdir)/include
+-librazorback_api_la_LDFLAGS = -version-info @APIVERSION@ @XCCFLAGS@ ../libssh/src/libssh.la
+-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/libssh/include -I$(top_srcdir)/include @extra_incl@
++librazorback_api_la_CFLAGS = -DBUILDING_SO -I$(top_srcdir)/include
++librazorback_api_la_LDFLAGS = -version-info @APIVERSION@ @XCCFLAGS@ -lssh
++AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/include @extra_incl@
+ all: all-am
+ 
+ .SUFFIXES:

Added: head/security/razorback-api/files/patch-src-hash.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/razorback-api/files/patch-src-hash.c	Thu Nov 14 01:04:01 2019	(r517553)
@@ -0,0 +1,68 @@
+--- src/hash.c.orig	2012-01-16 14:17:19.000000000 -0800
++++ src/hash.c	2019-07-03 11:42:06.923894000 -0700
+@@ -9,6 +9,19 @@
+ 
+ #include "runtime_config.h"
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++EVP_MD_CTX *EVP_MD_CTX_new(void)
++{
++    return calloc(1, sizeof(EVP_MD_CTX));
++}
++
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
++{
++    EVP_MD_CTX_cleanup(ctx);
++    free(ctx);
++}
++#endif
++
+ SO_PUBLIC bool
+ Hash_IsEqual (const struct Hash *p_pHashA, const struct Hash *p_pHashB)
+ {
+@@ -96,7 +109,8 @@ Hash_Init_OpenSSL(struct Hash *hash)
+         return false;
+     }
+ 
+-    EVP_DigestInit(&hash->CTX, m);
++    hash->CTX = EVP_MD_CTX_new();
++    EVP_DigestInit(hash->CTX, m);
+ 	return true;
+ }
+ 
+@@ -129,7 +143,7 @@ Hash_Update (struct Hash * p_pHash, uint8_t * p_pData,
+     ASSERT (p_pHash->pData != NULL);
+     ASSERT (p_pHash->iType > 0);
+     ASSERT (!(p_pHash->iFlags & HASH_FLAG_FINAL));
+-    EVP_DigestUpdate(&p_pHash->CTX, p_pData, p_iLength);
++    EVP_DigestUpdate(p_pHash->CTX, p_pData, p_iLength);
+     return true;
+ }
+ SO_PUBLIC bool
+@@ -143,7 +157,7 @@ Hash_Update_File (struct Hash * p_pHash, FILE *file)
+     ASSERT (!(p_pHash->iFlags & HASH_FLAG_FINAL));
+     while((len = fread(data,1,4096, file)) > 0)
+     {
+-        EVP_DigestUpdate(&p_pHash->CTX, data, len);
++        EVP_DigestUpdate(p_pHash->CTX, data, len);
+     }
+     rewind(file);
+     return true;
+@@ -156,7 +170,7 @@ Hash_Finalize (struct Hash * p_pHash)
+     ASSERT (p_pHash->pData != NULL);
+     ASSERT (p_pHash->iType > 0);
+     ASSERT (!(p_pHash->iFlags & HASH_FLAG_FINAL));
+-    EVP_DigestFinal(&p_pHash->CTX, p_pHash->pData, &p_pHash->iSize);
++    EVP_DigestFinal(p_pHash->CTX, p_pHash->pData, &p_pHash->iSize);
+     p_pHash->iFlags = p_pHash->iFlags | HASH_FLAG_FINAL;
+     return true;
+ }
+@@ -186,7 +200,7 @@ Hash_Destroy (struct Hash *p_pHash)
+     if (p_pHash->pData != NULL)
+         free (p_pHash->pData);
+ 
+-    EVP_MD_CTX_cleanup(&p_pHash->CTX);
++    EVP_MD_CTX_free(p_pHash->CTX);
+     free(p_pHash);
+ }
+ 

Modified: head/security/razorback-api/pkg-plist
==============================================================================
--- head/security/razorback-api/pkg-plist	Thu Nov 14 00:56:58 2019	(r517552)
+++ head/security/razorback-api/pkg-plist	Thu Nov 14 01:04:01 2019	(r517553)
@@ -35,42 +35,6 @@ include/razorback/timer.h
 include/razorback/types.h
 include/razorback/uuids.h
 include/razorback/visibility.h
-include/razorback/libssh/agent.h
-include/razorback/libssh/auth.h
-include/razorback/libssh/bind.h
-include/razorback/libssh/buffer.h
-include/razorback/libssh/callbacks.h
-include/razorback/libssh/channels.h
-include/razorback/libssh/crc32.h
-include/razorback/libssh/crypto.h
-include/razorback/libssh/dh.h
-include/razorback/libssh/kex.h
-include/razorback/libssh/keys.h
-include/razorback/libssh/legacy.h
-include/razorback/libssh/libcrypto.h
-include/razorback/libssh/libgcrypt.h
-include/razorback/libssh/libssh.h
-include/razorback/libssh/libsshpp.hpp
-include/razorback/libssh/messages.h
-include/razorback/libssh/misc.h
-include/razorback/libssh/options.h
-include/razorback/libssh/packet.h
-include/razorback/libssh/pcap.h
-include/razorback/libssh/pki.h
-include/razorback/libssh/poll.h
-include/razorback/libssh/priv.h
-include/razorback/libssh/scp.h
-include/razorback/libssh/server.h
-include/razorback/libssh/sftp.h
-include/razorback/libssh/session.h
-include/razorback/libssh/socket.h
-include/razorback/libssh/ssh1.h
-include/razorback/libssh/ssh2.h
-include/razorback/libssh/string.h
-include/razorback/libssh/threads.h
-include/razorback/libssh/wrapper.h
-include/razorback/libssh/pki_priv.h
-include/razorback/libssh/ecdh.h
 lib/librazorback_api.a
 lib/librazorback_api.so
 lib/librazorback_api.so.2

Modified: head/security/razorback-dispatcher/Makefile
==============================================================================
--- head/security/razorback-dispatcher/Makefile	Thu Nov 14 00:56:58 2019	(r517552)
+++ head/security/razorback-dispatcher/Makefile	Thu Nov 14 01:04:01 2019	(r517553)
@@ -12,6 +12,8 @@ DIST_SUBDIR=	razorback
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Framework for an intelligence driven security - Dispatcher
 
+BROKEN=		uses deprecated libssh API
+
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 


More information about the svn-ports-all mailing list