Skip to content

Commit fa91965

Browse files
committed
add webos-gnutls: gnutls 3.3.30 for target only
Should be compatible back to webOS 3.0. LG is unwilling to use later versions of gnutls because some parts were relicensed under the GPLv3. (However, only the tools and OpenSSL compatibility layer are GPLv3, and LG does not ship those. The issue may be dependencies such as nettle and gmp.) gnutls 2.x (libgnutls.so.26): - webOS 1, 2: 2.12.23 gnutls 3.x (libgnutls.so.28): - webOS 3.x: 3.3.5 - webOS 4.x: 3.3.27 - webOS 5-8: 3.3.30
1 parent badeabc commit fa91965

File tree

6 files changed

+100
-1
lines changed

6 files changed

+100
-1
lines changed

package/Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2951,6 +2951,7 @@ menu "WebOS"
29512951
source "package/umediaserver/Config.in"
29522952
source "package/webos/Config.in"
29532953
source "package/webos-gmp/Config.in"
2954+
source "package/webos-gnutls/Config.in"
29542955
source "package/webos-userland/Config.in"
29552956
source "package/webos-wayland-extensions/Config.in"
29562957
endmenu

package/glib-networking/glib-networking.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GLIB_NETWORKING_LICENSE_FILES = COPYING
2323
GLIB_NETWORKING_CPE_ID_VENDOR = gnome
2424

2525
ifeq ($(BR2_PACKAGE_GNUTLS),y)
26-
GLIB_NETWORKING_DEPENDENCIES += gnutls
26+
GLIB_NETWORKING_DEPENDENCIES += $(if $(BR2_PACKAGE_WEBOS_GNUTLS),webos-gnutls,gnutls)
2727
GLIB_NETWORKING_CONF_OPTS += -Dgnutls=enabled
2828
else
2929
GLIB_NETWORKING_CONF_OPTS += -Dgnutls=disabled

package/gnutls/gnutls.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,8 @@ endif
129129

130130
GNUTLS_CONF_ENV += LIBS="$(GNUTLS_LIBS)"
131131

132+
# Don't build for target if using webOS package instead
133+
ifneq ($(BR2_PACKAGE_WEBOS_GNUTLS),y)
132134
$(eval $(autotools-package))
135+
endif
133136
$(eval $(host-autotools-package))

package/webos-gnutls/Config.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
config BR2_PACKAGE_WEBOS_GNUTLS
2+
bool "gnutls 3.3.30"
3+
depends on BR2_WEBOS_COMPAT
4+
depends on BR2_PACKAGE_GNUTLS
5+
help
6+
The version of gnutls used on webOS 5-8. It should be compatible
7+
back to webOS 3.x in theory.
8+
9+
webOS 1, 2: 2.12.23 (libgnutls.so.26)
10+
webOS 3.x: 3.3.5 (libgnutls.so.28)
11+
webOS 4.x: 3.3.27 (libgnutls.so.28)
12+
webOS 5-8: 3.3.30 (libgnutls.so.28)
13+
14+
This replaces the normal buildroot gnutls on the target (but
15+
not host).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Locally calculated after checking pgp signature
2+
sha256 41d70107ead3de2f12390909a05eefc9a88def6cd1f0d90ea82a7dac8b8effee gnutls-3.3.30.tar.xz
3+
# Locally calculated
4+
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
5+
sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING.LESSER
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
################################################################################
2+
#
3+
# webos-gnutls
4+
#
5+
################################################################################
6+
7+
WEBOS_GNUTLS_VERSION_MAJOR = 3.3
8+
WEBOS_GNUTLS_VERSION = $(WEBOS_GNUTLS_VERSION_MAJOR).30
9+
WEBOS_GNUTLS_SOURCE = gnutls-$(WEBOS_GNUTLS_VERSION).tar.xz
10+
WEBOS_GNUTLS_SITE = https://www.gnupg.org/ftp/gcrypt/gnutls/v$(WEBOS_GNUTLS_VERSION_MAJOR)
11+
WEBOS_GNUTLS_LICENSE = LGPL-2.1+ (core library)
12+
WEBOS_GNUTLS_LICENSE_FILES = COPYING.LESSER
13+
WEBOS_GNUTLS_DEPENDENCIES = host-pkgconf nettle
14+
WEBOS_GNUTLS_CPE_ID_VENDOR = gnu
15+
# Yocto meta-gplv2 sets --disable-crywrap.
16+
# libgnutls-openssl is not present on webOS (also GPLv3).
17+
# libtasn1 is statically linked on at least webOS 4.0+ but not on webOS 1.
18+
# libp11-kit is not present on webOS.
19+
# There does not seem to be a default trust store.
20+
WEBOS_GNUTLS_CONF_OPTS = \
21+
--disable-crywrap \
22+
--disable-openssl-compatibility \
23+
--with-included-libtasn1 \
24+
--without-p11-kit \
25+
--with-default-trust-store-file=no \
26+
--disable-doc \
27+
--disable-libdane \
28+
--disable-rpath \
29+
--disable-tests \
30+
--disable-guile \
31+
--with-libnettle-prefix=$(STAGING_DIR)/usr \
32+
--without-libdl-prefix \
33+
--without-libiconv-prefix \
34+
--without-libintl-prefix \
35+
--without-libnsl-prefix \
36+
--without-libpthread-prefix \
37+
--without-librt-prefix \
38+
--without-libz-prefix \
39+
--without-tpm
40+
WEBOS_GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
41+
ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
42+
gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
43+
gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \
44+
gl_cv_func_gettimeofday_clobber=no
45+
WEBOS_GNUTLS_INSTALL_STAGING = YES
46+
47+
# libidn support for nommu must exclude the crywrap wrapper (uses fork)
48+
WEBOS_GNUTLS_CONF_OPTS += $(if $(BR2_USE_MMU),,--disable-crywrap)
49+
50+
ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
51+
WEBOS_GNUTLS_CONF_OPTS += --enable-cryptodev
52+
WEBOS_GNUTLS_DEPENDENCIES += cryptodev-linux
53+
endif
54+
55+
ifeq ($(BR2_PACKAGE_ZLIB),y)
56+
WEBOS_GNUTLS_CONF_OPTS += --with-zlib
57+
WEBOS_GNUTLS_DEPENDENCIES += zlib
58+
else
59+
WEBOS_GNUTLS_CONF_OPTS += --without-zlib
60+
endif
61+
62+
# Some examples in doc/examples use wchar
63+
define WEBOS_GNUTLS_DISABLE_DOCS
64+
$(SED) 's/ doc / /' $(@D)/Makefile.in
65+
endef
66+
67+
define WEBOS_GNUTLS_DISABLE_TOOLS
68+
$(SED) 's/\$$(PROGRAMS)//' $(@D)/src/Makefile.in
69+
$(SED) 's/) install-exec-am/)/' $(@D)/src/Makefile.in
70+
endef
71+
72+
WEBOS_GNUTLS_POST_PATCH_HOOKS += WEBOS_GNUTLS_DISABLE_DOCS
73+
WEBOS_GNUTLS_POST_PATCH_HOOKS += WEBOS_GNUTLS_DISABLE_TOOLS
74+
75+
$(eval $(autotools-package))

0 commit comments

Comments
 (0)