Skip to contentSkip to conversation

libressl: new package

PATCH New Adam Duskett 1 participant 5 messages Jun 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libressl: new package

Libressl is a fork of openssl from OpenSSL in 2014. It's goal is to modernize the OpenSSL codebase, improve security, and apply best practice development processes.

Right now, libressl is API compatible with OpenSSL 1.0.1, but does not yet include all new APIs from OpenSSL 1.0.2 and later.

The main source is libressl-portable, which "Includes the build scaffold and compatibility layer that builds portable LibreSSL from the OpenBSD source code."

Before the build process can begin, autogen.sh must be ran manually, as it pulls from the upstream OpenBSD source which adds several directories to the source, along with several other steps necessary before building can begin. Setting LIBRESSL_AUTORECONF = YES fails with several "No such file or directory" errors as well.

This package has been tested with the following architectures and c libraries:
- armv4
- aarch64
- ppc
- ppc64
- ppc64le
- x86_64
- uClibc-ng
- glibc 2.24
- musl

---
 package/Config.in              |  1 +
 package/libressl/Config.in     | 20 ++++++++++++++++++++
 package/libressl/libressl.hash |  2 ++
 package/libressl/libressl.mk   | 31 +++++++++++++++++++++++++++++++
 4 files changed, 54 insertions(+)
 create mode 100644 package/libressl/Config.in
 create mode 100644 package/libressl/libressl.hash
 create mode 100644 package/libressl/libressl.mk
package/Config.in +1 -0
index 529bd96..1674444 100644
@@ -963,6 +963,7 @@ menu "Crypto"
 	source "package/libmcrypt/Config.in"
 	source "package/libmhash/Config.in"
 	source "package/libnss/Config.in"
+	source "package/libressl/Config.in"
 	source "package/libscrypt/Config.in"
 	source "package/libsecret/Config.in"
 	source "package/libsha1/Config.in"
package/libressl/Config.in new file +20 -0
new file mode 100644
index 0000000..035176a
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_LIBRESSL
+	bool "libressl"
+	help
+	  LibreSSL is a version of the TLS/crypto stack forked from
+	  OpenSSL in 2014, with goals of modernizing the codebase,
+	  improving security, and applying best practice development
+	  processes.
+
+	  http://www.libressl.org/
+
+if BR2_PACKAGE_LIBRESSL
+
+config BR2_PACKAGE_LIBRESSL_BIN
+	bool "openssl binary"
+	help
+	  Install the openssl binary and the associated helper scripts
+	  to the target file system. This is a command line tool for
+	  doing various cryptographic stuff.
+
+endif
package/libressl/libressl.hash new file +2 -0
new file mode 100644
index 0000000..9c478de
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c	libressl-v2.5.4.tar.gz
package/libressl/libressl.mk new file +31 -0
new file mode 100644
index 0000000..940ca22
@@ -0,0 +1,31 @@
+################################################################################
+#
+# libressl
+#
+################################################################################
+
+LIBRESSL_VERSION = v2.5.4
+LIBRESSL_SITE = https://github.com/libressl-portable/portable.git
+LIBRESSL_SITE_METHOD = git
+LIBRESSL_LICENSE = ISC, BSD-3-Clause, OpenSSL or SSLeay
+LIBRESSL_LICENSE_FILES = COPYING
+LIBRESSL_INSTALL_STAGING = YES
+
+# autogen.sh needs to be ran manually as it pulls from the upstream
+# OpenBSD source which adds several directories to the source.
+# Setting LIBRESSL_AUTORECONF = YES fails with several
+# "No such file or directory" errors.
+define LIBRESSL_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+LIBRESSL_POST_PATCH_HOOKS += LIBRESSL_RUN_AUTOGEN
+
+ifeq ($(BR2_PACKAGE_LIBRESSL_BIN),)
+define LIBRESSL_REMOVE_BIN
+	$(RM) -f $(TARGET_DIR)/usr/bin/openssl
+endef
+LIBRESSL_POST_INSTALL_TARGET_HOOKS += LIBRESSL_REMOVE_BIN
+endif
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.9.4
#1 lore raw

PATCH 1/1 libssl: new virtual package.

libressl is API compatible with OpenSSL 1.0.1 and is almost API compatible with OpenSSL 1.0.2. As such, a new virtual package is needed to handle having both libressl and openssl.

---
 package/Config.in        | 1 +
 package/libssl/Config.in | 6 ++++++
 package/libssl/libssl.mk | 7 +++++++
 3 files changed, 14 insertions(+)
 create mode 100644 package/libssl/Config.in
 create mode 100644 package/libssl/libssl.mk
package/Config.in +1 -0
index 1674444..a7af71e 100644
@@ -967,6 +967,7 @@ menu "Crypto"
 	source "package/libscrypt/Config.in"
 	source "package/libsecret/Config.in"
 	source "package/libsha1/Config.in"
+	source "package/libssl/Config.in"
 	source "package/libsodium/Config.in"
 	source "package/libssh/Config.in"
 	source "package/libssh2/Config.in"
package/libssl/Config.in new file +6 -0
new file mode 100644
index 0000000..71347de
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HAS_LIBSSL
+	bool
+
+config BR2_PACKAGE_PROVIDES_LIBSSL
+	string
+	depends on BR2_PACKAGE_HAS_LIBSSL
package/libssl/libssl.mk new file +7 -0
new file mode 100644
index 0000000..6e89bcc
@@ -0,0 +1,7 @@
+################################################################################
+#
+# libssl
+#
+################################################################################
+
+$(eval $(virtual-package))
Signature · 1 line
2.9.4
#2 lore raw

PATCH 1/1 libressl: add libssl virtual package support.

In reply to Adam Duskett

libressl can provide libssl.

---
 package/libressl/Config.in   | 4 ++++
 package/libressl/libressl.mk | 1 +
 2 files changed, 5 insertions(+)
package/libressl/Config.in +4 -0
index 035176a..2cc87d0 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBRESSL
 	bool "libressl"
+	select BR2_PACKAGE_HAS_LIBSSL
 	help
 	  LibreSSL is a version of the TLS/crypto stack forked from
 	  OpenSSL in 2014, with goals of modernizing the codebase,
@@ -10,6 +11,9 @@ config BR2_PACKAGE_LIBRESSL
 
 if BR2_PACKAGE_LIBRESSL
 
+config BR2_PACKAGE_PROVIDES_LIBSSL
+	default "libressl"
+
 config BR2_PACKAGE_LIBRESSL_BIN
 	bool "openssl binary"
 	help
package/libressl/libressl.mk +1 -0
index 940ca22..e057662 100644
@@ -10,6 +10,7 @@ LIBRESSL_SITE_METHOD = git
 LIBRESSL_LICENSE = ISC, BSD-3-Clause, OpenSSL or SSLeay
 LIBRESSL_LICENSE_FILES = COPYING
 LIBRESSL_INSTALL_STAGING = YES
+LIBRESSL_PROVIDES = libssl
 
 # autogen.sh needs to be ran manually as it pulls from the upstream
 # OpenBSD source which adds several directories to the source.
Signature · 1 line
2.9.4
#3 lore raw

PATCH 1/1 openssl: add libssl virtual package support.

In reply to Adam Duskett

openssl can provide libssl.

---
 package/openssl/Config.in  | 3 +++
 package/openssl/openssl.mk | 1 +
 2 files changed, 4 insertions(+)
package/openssl/Config.in +4 -0
index e08b648..4871f43 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_OPENSSL
 	bool "openssl"
 	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_HAS_LIBSSL
 	help
 	  A collaborative effort to develop a robust, commercial-grade, fully
 	  featured, and Open Source toolkit implementing the Secure Sockets
@@ -13,6 +14,9 @@ config BR2_PACKAGE_OPENSSL
 
 if BR2_PACKAGE_OPENSSL
 
+config BR2_PACKAGE_PROVIDES_LIBSSL
+	default "openssl"
+
 config BR2_PACKAGE_OPENSSL_BIN
 	bool "openssl binary"
 	help
package/openssl/openssl.mk +1 -0
index 5f56b44..c028290 100644
@@ -10,6 +10,7 @@ OPENSSL_LICENSE = OpenSSL or SSLeay
 OPENSSL_LICENSE_FILES = LICENSE
 OPENSSL_INSTALL_STAGING = YES
 OPENSSL_DEPENDENCIES = zlib
+OPENSSL_PROVIDES = libssl
 HOST_OPENSSL_DEPENDENCIES = host-zlib
 OPENSSL_TARGET_ARCH = generic32
 OPENSSL_CFLAGS = $(TARGET_CFLAGS)
Signature · 1 line
2.9.4
#4 lore raw

PATCH 1/1 DEVELOPERS: Add Adam Duskett for libressl

In reply to Adam Duskett
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index 9a11f8b..6fc5079 100644
@@ -33,6 +33,7 @@ N:	Adam Duskett <[email protected]>
 F:	package/audit/
 F:	package/checkpolicy/
 F:	package/gstreamer1/gst1-vaapi/
+F:	package/libressl/
 F:	package/libselinux/
 F:	package/libsemanage/
 F:	package/libsepol/
Signature · 1 line
2.9.4