git: build - Rewire secure, remove conflicts from libmd, libcrypt

Constantine A. Murenin mureninc at gmail.com
Mon Feb 19 19:17:15 PST 2018


I think 0fe46dc6 may have broken `make nativekernel`.


For the archives, I've tried doing nativekernel on the 5.0.2 live
image (DragonFly 5.0-RELEASE x86_64):

«
In file included from /usr/src/sys/bus/cam/cam_xpt.c:40:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/kern/md5c.c:44:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/netinet/tcp_subr.c:139:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/netinet/tcp_syncache.c:84:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/netinet6/in6_ifattach.c:40:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/opencrypto/xform.h:29:0,
                 from /usr/src/sys/opencrypto/crypto.c:76:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/opencrypto/xform.h:29:0,
                 from /usr/src/sys/opencrypto/cryptodev.c:58:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/opencrypto/cryptosoft.c:46:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/opencrypto/xform.c:63:0:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
In file included from /usr/src/sys/opencrypto/xform.h:29:0,
                 from /usr/src/sys/dev/crypto/padlock/padlock_hash.c:45:
/usr/src/sys/sys/md5.h:45:25: fatal error: openssl/md5.h: No such file
or directory
compilation terminated.
mkdep: compile failed
»


Did `cp -rp /usr/local/include/openssl /usr/include/`, got:

«
In file included from /usr/include/openssl/md5.h:59:0,
                 from /usr/src/sys/sys/md5.h:45,
                 from /usr/src/sys/bus/cam/cam_xpt.c:40:
/usr/include/stddef.h:67:0: error: "offsetof" redefined [-Werror]
 #define offsetof(type, member) __offsetof(type, member)
 ^
In file included from /usr/src/sys/sys/param.h:171:0,
                 from /usr/src/sys/bus/cam/cam_xpt.c:31:
/usr/src/sys/sys/types.h:175:0: note: this is the location of the
previous definition
 #define offsetof(type, field) __offsetof(type, field)
 ^
cc1: all warnings being treated as errors
*** Error code 1
»


Applied http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d9ccbcc96227edaf46bd27707f01d9d8b4ad5a72
to /usr/include/openssl/md5.h (it's just `#ifndef _KERNEL` for
`#include <stddef.h>` as per
http://bxr.su/d/crypto/libressl/include/openssl/md5.h#59), and the
`nativekernel` build succeeded without issues.


Cheers,
Constantine.SU.

On 27 October 2016 at 17:19, Matthew Dillon
<dillon at crater.dragonflybsd.org> wrote:
>
> commit 0fe46dc6296951eb138485d8c6b580bac0488fd8
> Author: Matthew Dillon <dillon at apollo.backplane.com>
> Date:   Thu Oct 27 16:11:22 2016 -0700
>
>     build - Rewire secure, remove conflicts from libmd, libcrypt
>
>     * Remove /usr/src/secure, folding all of its subsystems into
>       /usr/src.  There's no point having a /usr/src/secure any more,
>       the system won't run without the secure stuff, the idea that some foreign
>       actor could segregate it in order to legally download code without crypto
>       is absurd on the modern internet, and the U.S. government stopped caring
>       decades ago.
>
>     * Remove conflicts from libmd and libcrypt.  Essentially this removes
>       the SHA*_*() and MD5_*() APIs from libmd because these APIs already
>       exist in lib[re]ssl.
>
>       The older SHA*() and MD5*() APIs are partially retained for legacy base
>       code, but will be removed in a later stage (moved to direct-linking the
>       needed support source).
>
>       Conflicting routines in libcrypt have been renamed and internalized to
>       be libcrypt-only.
>
>     * Major rewiring of the Makefile's to support the changes.
>
> Summary of changes:
>  Makefile.inc1                                      |  12 +-
>  Makefile.ssh.common                                |  27 ++
>  bin/csh/Makefile                                   |   8 +-
>  etc/Makefile                                       |   6 +-
>  include/Makefile                                   |   5 +
>  lib/Makefile                                       |  17 +-
>  lib/libarchive/Makefile                            |   5 +-
>  {secure/lib => lib}/libcipher/Makefile             |   0
[…]
>  sys/sys/md5.h                                      |  95 ++--
[…]
>
> http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0fe46dc6296951eb138485d8c6b580bac0488fd8
>
>
> --
> DragonFly BSD source repository


More information about the Commits mailing list