Skip to contentSkip to conversation

wget: use GnuTLS instead of OpenSSL

PATCH In review Ross Burton 5 participants 14 messages Jun 16, 2014 – Jul 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wget: use GnuTLS instead of OpenSSL

OpenSSL has license complications and GnuTLS is preferred, so although the license complications don't impact wget use GnuTLS for consistency.

Also add a recommendation on ca-certificates so that https: URLs work.

---
 meta/recipes-extended/wget/wget.inc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/wget/wget.inc +4 -3
index a778bca..642d502 100644
@@ -3,15 +3,16 @@ HOMEPAGE = "https://www.gnu.org/software/wget/"
 SECTION = "console/network"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "openssl zlib libpcre"
+DEPENDS = "gnutls zlib libpcre"
 
 INC_PR = "r16"
 
 inherit autotools gettext texinfo update-alternatives
 
-EXTRA_OECONF = "--enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} \
-                --with-ssl=openssl --disable-rpath --disable-iri \
+EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
                 ac_cv_header_uuid_uuid_h=no"
 
 ALTERNATIVE_${PN} = "wget"
 ALTERNATIVE_PRIORITY = "100"
+
+RRECOMMENDS_${PN} += "ca-certificates"
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 25 lines · Ross Burton

OpenSSL has license complications and GnuTLS is preferred, so although the license complications don't impact wget use GnuTLS for consistency.

Also add a recommendation on ca-certificates so that https: URLs work.

---
 meta/recipes-extended/wget/wget.inc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/wget/wget.inc +1 -1
index a778bca..642d502 100644
@@ -3,15 +3,16 @@ HOMEPAGE = "https://www.gnu.org/software/wget/"
 SECTION = "console/network"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "openssl zlib libpcre"
+DEPENDS = "gnutls zlib libpcre"
 
 INC_PR = "r16"
 
 inherit autotools gettext texinfo update-alternatives

meta/recipes-extended/wget/wget.inc HOMEPAGE = "https://www.gnu.org/software/wget/" · line 18

Quoted 10 lines
meta/recipes-extended/wget/wget.inc +3 -2
 
-EXTRA_OECONF = "--enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} \
-                --with-ssl=openssl --disable-rpath --disable-iri \
+EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
                 ac_cv_header_uuid_uuid_h=no"
 
 ALTERNATIVE_${PN} = "wget"
 ALTERNATIVE_PRIORITY = "100"
+
+RRECOMMENDS_${PN} += "ca-certificates"

Ross,

I've just pulled this in today after being on holiday for a while and it causes a breakage on my system.

| checking for libgnutls... no
| configure: error: --with-ssl=gnutls was given, but GNUTLS is not available.
| Configure failed. The contents of all config.log files follows to aid debugging

log: http://ix.io/dfO

I would have expected gnutls to have been pulled in through the depends but it obviously hasn't, or the system hasn't managed to find it...

Any ideas?

Cheers,

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 
#2 lore raw

So this error is still blocking my master build, any ideas?

Quoted 58 lines · Jack Mitchell

Ross,

I've just pulled this in today after being on holiday for a while and it causes a breakage on my system.

| checking for libgnutls... no
| configure: error: --with-ssl=gnutls was given, but GNUTLS is not available.
| Configure failed. The contents of all config.log files follows to aid debugging

log: http://ix.io/dfO

I would have expected gnutls to have been pulled in through the depends but it obviously hasn't, or the system hasn't managed to find it...

Any ideas?

Cheers,

Quoted 35 lines · Ross Burton

OpenSSL has license complications and GnuTLS is preferred, so although the license complications don't impact wget use GnuTLS for consistency.

Also add a recommendation on ca-certificates so that https: URLs work.

---
 meta/recipes-extended/wget/wget.inc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/wget/wget.inc +4 -3
index a778bca..642d502 100644
@@ -3,15 +3,16 @@ HOMEPAGE = "https://www.gnu.org/software/wget/"
 SECTION = "console/network"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "openssl zlib libpcre"
+DEPENDS = "gnutls zlib libpcre"
 
 INC_PR = "r16"
 
 inherit autotools gettext texinfo update-alternatives
 
-EXTRA_OECONF = "--enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} \
-                --with-ssl=openssl --disable-rpath --disable-iri \
+EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
                 ac_cv_header_uuid_uuid_h=no"
 
 ALTERNATIVE_${PN} = "wget"
 ALTERNATIVE_PRIORITY = "100"
+
+RRECOMMENDS_${PN} += "ca-certificates"
Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 
#3 lore raw
Quoted 1 line · Jack Mitchell

So this error is still blocking my master build, any ideas?

Share the config.log so we can see how the configure test is failing? Is gnutls actually built and in the sysroot or not?

Cheers,

Richard

#4 lore raw

config.log: http://ix.io/dr3

and yes, gnutls is being built, or at least it's in the work dir.

[jack@jackArch gnutls]$ pwd /home/jack/Work/oe-core.git/test-build/tmp-eglibc/work/core2-32-oe-linux/gnutls [jack@jackArch gnutls]$ ls
2.12.23-r8.4 3.2.13-r0 3.2.15-r0 3.3.5-r0
[jack@jackArch gnutls]$

Quoted 9 lines · Richard Purdie
Quoted 1 line · Jack Mitchell

So this error is still blocking my master build, any ideas?

Share the config.log so we can see how the configure test is failing? Is gnutls actually built and in the sysroot or not?

Cheers,

Richard

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 
#5 lore raw

Wait, that config.log is bad. It's from my build with the patch reverted. Hold up I'll get the proper one out.

Quoted 22 lines · Jack Mitchell

config.log: http://ix.io/dr3

and yes, gnutls is being built, or at least it's in the work dir.

[jack@jackArch gnutls]$ pwd /home/jack/Work/oe-core.git/test-build/tmp-eglibc/work/core2-32-oe-linux/gnutls [jack@jackArch gnutls]$ ls
2.12.23-r8.4 3.2.13-r0 3.2.15-r0 3.3.5-r0
[jack@jackArch gnutls]$

Quoted 9 lines · Richard Purdie
Quoted 1 line · Jack Mitchell

So this error is still blocking my master build, any ideas?

Share the config.log so we can see how the configure test is failing? Is gnutls actually built and in the sysroot or not?

Cheers,

Richard

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 
#6 lore raw
In reply to Jack Mitchell

Failed with gnutls config.log: http://ix.io/dr4

Quoted 22 lines · Jack Mitchell

config.log: http://ix.io/dr3

and yes, gnutls is being built, or at least it's in the work dir.

[jack@jackArch gnutls]$ pwd /home/jack/Work/oe-core.git/test-build/tmp-eglibc/work/core2-32-oe-linux/gnutls [jack@jackArch gnutls]$ ls
2.12.23-r8.4 3.2.13-r0 3.2.15-r0 3.3.5-r0
[jack@jackArch gnutls]$

Quoted 9 lines · Richard Purdie
Quoted 1 line · Jack Mitchell

So this error is still blocking my master build, any ideas?

Share the config.log so we can see how the configure test is failing? Is gnutls actually built and in the sysroot or not?

Cheers,

Richard

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambridgeshire, UK
  http://www.embed.me.uk
-- 
#7 lore raw
Quoted 1 line · Jack Mitchell

Failed with gnutls config.log: http://ix.io/dr4

That is helpful:

configure:35748: checking for libgnutls
configure:35772: i586-oe-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/jack/Work/oe-core.git/test-build/tmp-eglibc/sysroots/cbnlcomexpress -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c /usr/lib/libgnutls.so -lz >&5 /usr/lib/libgnutls.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
configure:35772: $? = 1

So why on earth is it looking at /usr/lib/libgnutls.so?

Cheers,

Richard

#8 lore raw
Quoted 5 lines · Richard Purdie
Quoted 1 line · Jack Mitchell

Failed with gnutls config.log: http://ix.io/dr4

That is helpful:

Quoted 7 lines

configure:35748: checking for libgnutls
configure:35772: i586-oe-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/jack/Work/oe-core.git/test-build/tmp-eglibc/sysroots/cbnlcomexpress -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c /usr/lib/libgnutls.so -lz >&5 /usr/lib/libgnutls.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
configure:35772: $? = 1

So why on earth is it looking at /usr/lib/libgnutls.so?

Total guess by try adding EXTRA_OECONF += "--without-libgnutls-prefix"

Cheers,

Richard

#9 lore raw
Quoted 3 lines · Richard Purdie
Quoted 1 line

So why on earth is it looking at /usr/lib/libgnutls.so?

Total guess by try adding EXTRA_OECONF += "--without-libgnutls-prefix"

The problem is due to use of

AC_LIB_HAVE_LINKFLAGS([gnutls] since we use DESTDIR while cross compiling, so above option should have worked I dont know why it did not but you could try

--with-libgnutls-prefix="<target-sysroot>"

if that doesnt work either then may be replace use of AC_LIB_HAVE_LINKFLAGS with AC_CHECK_LIB

#10 lore raw
Quoted 8 lines · Khem Raj
Quoted 3 lines · Richard Purdie
Quoted 1 line

So why on earth is it looking at /usr/lib/libgnutls.so?

Total guess by try adding EXTRA_OECONF += "--without-libgnutls-prefix"

The problem is due to use of

Quoted 8 lines

AC_LIB_HAVE_LINKFLAGS([gnutls] since we use DESTDIR while cross compiling, so above option should have worked I dont know why it did not but you could try

--with-libgnutls-prefix="<target-sysroot>"

if that doesnt work either then may be replace use of AC_LIB_HAVE_LINKFLAGS with AC_CHECK_LIB

I looked at the generated files and the --without option just stops it looking in the wrong places. It seems counter-intuitive compared to how these options usually work but does seem to fix the problem...

Cheers,

Richard

#11 lore raw
In reply to Jack Mitchell

Op 4 jul. 2014, om 11:08 heeft Jack Mitchell <[email protected]> het volgende geschreven:

Quoted 48 lines · Ross Burton
Quoted 33 lines

OpenSSL has license complications and GnuTLS is preferred, so although the license complications don't impact wget use GnuTLS for consistency.

Also add a recommendation on ca-certificates so that https: URLs work.

---
meta/recipes-extended/wget/wget.inc | 7 ++++---

1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/wget/wget.inc +0 -0
index a778bca..642d502 100644
@@ -3,15 +3,16 @@ HOMEPAGE = "https://www.gnu.org/software/wget/"

SECTION = "console/network"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

meta/recipes-extended/wget/wget.inc +1 -1
-DEPENDS = "openssl zlib libpcre"
+DEPENDS = "gnutls zlib libpcre"

INC_PR = "r16"

inherit autotools gettext texinfo update-alternatives

meta/recipes-extended/wget/wget.inc +1 -2
-EXTRA_OECONF = "--enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} \
-                --with-ssl=openssl --disable-rpath --disable-iri \
+EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
                ac_cv_header_uuid_uuid_h=no"

ALTERNATIVE_${PN} = "wget"
ALTERNATIVE_PRIORITY = "100"

meta/recipes-extended/wget/wget.inc HOMEPAGE = "https://www.gnu.org/software/wget/" · line 18

Quoted 2 lines
meta/recipes-extended/wget/wget.inc +2 -0
+
+RRECOMMENDS_${PN} += "ca-certificates"

Ross,

I've just pulled this in today after being on holiday for a while and it causes a breakage on my system.

| checking for libgnutls... no
| configure: error: --with-ssl=gnutls was given, but GNUTLS is not available.
| Configure failed. The contents of all config.log files follows to aid debugging

Quoted 4 lines

log: http://ix.io/dfO

I would have expected gnutls to have been pulled in through the depends but it obviously hasn't, or the system hasn't managed to find it...

FWIW, I'm seeing the same problem.

#12 lore raw
In reply to Ross Burton
Quoted 15 lines · Ross Burton

OpenSSL has license complications and GnuTLS is preferred, so although the license complications don't impact wget use GnuTLS for consistency.

Also add a recommendation on ca-certificates so that https: URLs work.

---
 meta/recipes-extended/wget/wget.inc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/wget/wget.inc +0 -0
index a778bca..642d502 100644

meta/recipes-extended/wget/wget.inc HOMEPAGE = "https://www.gnu.org/software/wget/" · line 6

Quoted 5 lines
meta/recipes-extended/wget/wget.inc +1 -1
@@ -3,15 +3,16 @@ HOMEPAGE = "https://www.gnu.org/software/wget/"
 SECTION = "console/network"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "openssl zlib libpcre"
+DEPENDS = "gnutls zlib libpcre"

it would be nice if this was either virtual/ssh or some sort of PACKAGECONFIG so folks who
have ssl on the system dont need to pull gnutls as well.

Quoted 22 lines
meta/recipes-extended/wget/wget.inc +3 -3
 INC_PR = "r16"
 
 inherit autotools gettext texinfo update-alternatives
 
-EXTRA_OECONF = "--enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} \
-                --with-ssl=openssl --disable-rpath --disable-iri \
+EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
                 ac_cv_header_uuid_uuid_h=no"
 
 ALTERNATIVE_${PN} = "wget"
 ALTERNATIVE_PRIORITY = "100"
+
+RRECOMMENDS_${PN} += "ca-certificates"
--

1.7.10.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#13 lore raw
Quoted 3 lines · Khem Raj

it would be nice if this was either virtual/ssh or some sort of PACKAGECONFIG so folks who
have ssl on the system dont need to pull gnutls as well.

There's API differences so it would have to be a PACKAGECONFIG but agreed. For what it's worth I'm planning on doing a PACKAGECONFIG for xserver as it supports three crypto libraries for SHA and pulling in gnutls just for that is madness.

Ross