|Summary:||sysutils/radmind: Fix Openssl build|
|Product:||Ports & Packages||Reporter:||Nathan <ndowens04>|
|Component:||Individual Port(s)||Assignee:||freebsd-ports-bugs mailing list <ports-bugs>|
|Severity:||Affects Only Me||CC:||arved, mikeg|
|Bug Depends on:|
Description Nathan 2018-10-13 05:29:06 UTC
Created attachment 198092 [details] Fix OpenSSL 1.1.x build sysutils/radmind: Fix OpenSSL build PR: 231931 Submitted by: Nathan <email@example.com>
Comment 1 Tobias Kortkamp 2018-10-13 06:47:49 UTC
+ extern EVP_MD *md; +- EVP_MD_CTX mdctx; ++ EVP_MD_CTX *mdctx; + unsigned char md_value[ EVP_MAX_MD_SIZE ]; + +- EVP_DigestInit( &mdctx, md ); ++ EVP_DigestInit( mdctx, md ); + No. EVP_DigestInit does not allocate any memory and mdctx points to wherever, so this is broken. Was this run tested at all? Or was this just build tested?
Comment 2 mikeg 2018-10-15 19:44:40 UTC
As noted by Tobias this fixes the build but will blow up when run (using an uninitialized pointer). It needs EVP_MD_CTX_new() & _free() calls to allocate & free the structure. There are also a few other files where the EVP_MD_CTX structure is referenced that aren't fixed in the attached patch. That fix will break OpenSSL < 1.1.0 (FreeBSD 11.x) - needs compatibility shims for the _new() and _free() calls (https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes). I'm going to bang out something more complete and version-sensitive tonight. Because of the scope I'll see if I can get it merged upstream. Failing that I'll either fork the project or do a patch to the port, whichever hurts my head less.
Comment 3 mikeg 2018-10-19 18:30:55 UTC
Created attachment 198378 [details] Move to radmind 1.15.1 which fixes the OpenSSL 1.1 build The main radmind project SF & GH repos seem to be defunct, so I've moved this to my fork and started a 1.15 branch that includes fixes for building on OpenSSL 1.1 The attached patch moves the port to that repository & release. Note that 1.15.x incorporates changes equivalent to the patch-* files previously used in the port so these have been removed. Patched port builds & run checks OK on FreeBSD 11.2, 12.0-ALPHA9, should be OK to merge unless committers see an issue.
Comment 4 commit-hook 2018-11-10 21:28:33 UTC
A commit references this bug: Author: arved Date: Sat Nov 10 21:28:06 UTC 2018 New revision: 484645 URL: https://svnweb.freebsd.org/changeset/ports/484645 Log: Update to 1.15.1 As Upstream seems unresponsive, maintainer created a fork. This fixes build with OpenSSL 1.1 All patches from the port have been incorporated PR: 232219 Submitted by: maintainer Changes: head/sysutils/radmind/Makefile head/sysutils/radmind/distinfo head/sysutils/radmind/files/patch-.gitignore head/sysutils/radmind/files/patch-.gitmodules head/sysutils/radmind/files/patch-Makefile.in head/sysutils/radmind/files/patch-README head/sysutils/radmind/files/patch-aclocal.m4 head/sysutils/radmind/files/patch-argcargv.c head/sysutils/radmind/files/patch-command.c head/sysutils/radmind/files/patch-command.h head/sysutils/radmind/files/patch-configure.ac head/sysutils/radmind/files/patch-contrib__specialist head/sysutils/radmind/files/patch-fsdiff.c head/sysutils/radmind/files/patch-ktcheck.c head/sysutils/radmind/files/patch-lapply.c head/sysutils/radmind/files/patch-largefile.h head/sysutils/radmind/files/patch-lcksum.c head/sysutils/radmind/files/patch-man__lcreate.1 head/sysutils/radmind/files/patch-man__rash.1 head/sysutils/radmind/files/patch-mkdirs.c head/sysutils/radmind/files/patch-ra.sh head/sysutils/radmind/files/patch-t2pkg.c head/sysutils/radmind/files/patch-transcript.c head/sysutils/radmind/files/patch-transcript.h head/sysutils/radmind/files/patch-update.c head/sysutils/radmind/pkg-plist
Comment 5 Tilman Keskinoz 2018-11-10 21:29:30 UTC
Update committed. Thanks