8.14. LibreSSL 4.2.1
Build and install LibreSSL in the final target environment to provide TLS and OpenSSL-compatible cryptography libraries.
Input assumption: libressl-4.2.1.tar.gz is already present in /sources from the chapter 4 source staging step.
Source URL: https://cloudflare.cdn.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.2.1.tar.gz
Upstream build note: the official release tarball includes a generated configure script. Upstream documents the configure flow as ./configure, make check, and make install; this section uses lbi_configure and skips the test subtree for the final target build.
Install note: LibreSSL installs cert.pem, openssl.cnf, and x509v3.cnf under the configured OpenSSL directory if those files do not already exist.
Licenses:
- ISC
- OpenSSL License
- Original SSLeay License
- Public domain
Dependencies:
- musl (libc)
- make
LibreSSL is a TLS and cryptography library suite derived from OpenSSL. we need it to provide libcrypto, libssl, libtls, and the openssl tool for packages that require TLS or OpenSSL-compatible cryptography.
Extract and Enter the Source Tree
cd /sources
tar -xf libressl-4.2.1.tar.gz
cd libressl-4.2.1
Configure LibreSSL
lbi_configure \
--with-openssldir=/system/configuration/ssl \
--disable-static \
--enable-shared \
--disable-tests
Build LibreSSL
make $LWI_MAKE_FLAGS
Install LibreSSL
make install
/sources if you do not plan to rebuild LibreSSL again.
Command Explanations
cd /sources,tar -xf, andcd libressl-...: Enter the staged LibreSSL source tree.lbi_configure: Applies the book's/systeminstall layout.--with-openssldir=/system/configuration/ssl: Stores TLS configuration and certificates under the book's configuration tree.--disable-staticand--enable-shared: Install shared libraries without static archives.--disable-tests: Skips the test suite for the target build.make $LWI_MAKE_FLAGSandmake install: Build and install LibreSSL.