All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gnutls: make the OpenSSL compatibility library optional
@ 2019-08-15 22:19 unixmania at gmail.com
  2019-08-17 13:40 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: unixmania at gmail.com @ 2019-08-15 22:19 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <unixmania@gmail.com>

Add a BR2_PACKAGE_GNUTLS_OPENSSL option, disabled by default since it is
not used by any package that depends on gnutls.

The library is licensed under GPLv3, which can be a problem for embedded
systems due to the so-called anti-tivoization clause.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
Tested building all packages that depend on gnutls.
---
 package/gnutls/Config.in | 5 +++++
 package/gnutls/gnutls.mk | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/package/gnutls/Config.in b/package/gnutls/Config.in
index 7e8dcc1e4f..15b930b6bd 100644
--- a/package/gnutls/Config.in
+++ b/package/gnutls/Config.in
@@ -16,6 +16,11 @@ config BR2_PACKAGE_GNUTLS
 
 if BR2_PACKAGE_GNUTLS
 
+config BR2_PACKAGE_GNUTLS_OPENSSL
+	bool "OpenSSL compatibility library"
+	help
+	  Install OpenSSL compatibility library.
+
 config BR2_PACKAGE_GNUTLS_TOOLS
 	bool "install tools"
 	select BR2_PACKAGE_ARGP_STANDALONE \
diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 4f40b896ff..f3f430ead0 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -8,8 +8,13 @@ GNUTLS_VERSION_MAJOR = 3.6
 GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).8
 GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz
 GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR)
+ifeq ($(BR2_PACKAGE_GNUTLS_OPENSSL),y)
 GNUTLS_LICENSE = LGPL-2.1+ (core library), GPL-3.0+ (gnutls-openssl library)
-GNUTLS_LICENSE_FILES = doc/COPYING doc/COPYING.LESSER
+GNUTLS_LICENSE_FILES = doc/COPYING.LESSER doc/COPYING
+else
+GNUTLS_LICENSE = LGPL-2.1+ (core library)
+GNUTLS_LICENSE_FILES = doc/COPYING.LESSER
+endif
 GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre
 GNUTLS_CONF_OPTS = \
 	--disable-doc \
@@ -20,6 +25,7 @@ GNUTLS_CONF_OPTS = \
 	--enable-openssl-compatibility \
 	--with-librt-prefix=$(STAGING_DIR) \
 	--without-tpm \
+	$(if $(BR2_PACKAGE_GNUTLS_OPENSSL),--enable,--disable)-openssl-compatibility \
 	$(if $(BR2_PACKAGE_GNUTLS_TOOLS),--enable-tools,--disable-tools)
 GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
 	ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
-- 
2.18.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] package/gnutls: make the OpenSSL compatibility library optional
  2019-08-15 22:19 [Buildroot] [PATCH] package/gnutls: make the OpenSSL compatibility library optional unixmania at gmail.com
@ 2019-08-17 13:40 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-08-17 13:40 UTC (permalink / raw)
  To: buildroot

On Thu, 15 Aug 2019 19:19:33 -0300
unixmania at gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
> 
> Add a BR2_PACKAGE_GNUTLS_OPENSSL option, disabled by default since it is
> not used by any package that depends on gnutls.
> 
> The library is licensed under GPLv3, which can be a problem for embedded
> systems due to the so-called anti-tivoization clause.
> 
> Signed-off-by: Carlos Santos <unixmania@gmail.com>

We normally don't apply such changes in master after -rc1, but
considering the fact that it allows to disable a GPLv3 part of the
library, I found it important enough to have in master.

> +ifeq ($(BR2_PACKAGE_GNUTLS_OPENSSL),y)
>  GNUTLS_LICENSE = LGPL-2.1+ (core library), GPL-3.0+ (gnutls-openssl library)
> -GNUTLS_LICENSE_FILES = doc/COPYING doc/COPYING.LESSER
> +GNUTLS_LICENSE_FILES = doc/COPYING.LESSER doc/COPYING
> +else
> +GNUTLS_LICENSE = LGPL-2.1+ (core library)
> +GNUTLS_LICENSE_FILES = doc/COPYING.LESSER
> +endif

You don't need to repeat the license details for both cases, you can
simply append to them when the gnutls-openssl library is enabled. For
the _LICENSE variable, this requires a trick:

FOO_LICENSE := $(FOO_LICENSE), GPL-3.0+ (gnutls-openssl library)

Applied to master with this changed. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-17 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 22:19 [Buildroot] [PATCH] package/gnutls: make the OpenSSL compatibility library optional unixmania at gmail.com
2019-08-17 13:40 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.