Skip to contentSkip to conversation

perl-net-ssh2 fixes

PATCH New Thomas De Schampheleire 2 participants 5 messages Jul 23, 2018 – Jul 25, 2018

lore
Share & tools
lore
#0 lore raw

cover perl-net-ssh2 fixes

These are three related fixes to perl-net-ssh2 detected in order to fix autobuild issue
http://autobuild.buildroot.net/results/6ee18e7dd17f168c52f79e49cb5e94cf3aa3df1a/

Best regards,
Thomas

Thomas De Schampheleire (3):
perl-net-ssh2: add missing dependency on zlib
perl-net-ssh2: avoid build system inspecting host paths
perl-net-ssh2: add support for libgcrypt crypto backend

 package/perl-net-ssh2/Config.in        |  9 ++++++++-
 package/perl-net-ssh2/perl-net-ssh2.mk | 10 +++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)
Signature · 1 line
2.16.4
#1 lore raw

PATCH 1/3 perl-net-ssh2: add missing dependency on zlib

perl-net-ssh2 requires zlib. When using the openssl backend to libssh2, this dependency is implicit via openssl, but when using the libgcrypt backend the dependency is missing.

---
 package/perl-net-ssh2/Config.in        | 1 +
 package/perl-net-ssh2/perl-net-ssh2.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/perl-net-ssh2/Config.in +1 -0
index 07c42ee5b1..8f359b7015 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PERL_NET_SSH2
 	bool "perl-net-ssh2"
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LIBSSH2
+	select BR2_PACKAGE_ZLIB
 	help
 	  Support for the SSH 2 protocol via libssh2.
 
package/perl-net-ssh2/perl-net-ssh2.mk +1 -1
index 6d84deb284..b174fa6210 100644
@@ -9,6 +9,6 @@ PERL_NET_SSH2_SOURCE = Net-SSH2-$(PERL_NET_SSH2_VERSION).tar.gz
 PERL_NET_SSH2_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SA/SALVA
 PERL_NET_SSH2_LICENSE = Artistic or GPL-1.0+
 PERL_NET_SSH2_LICENSE_FILES = README
-PERL_NET_SSH2_DEPENDENCIES = libssh2
+PERL_NET_SSH2_DEPENDENCIES = libssh2 zlib
 
 $(eval $(perl-package))
Signature · 1 line
2.16.4
#2 lore raw

PATCH 2/3 perl-net-ssh2: avoid build system inspecting host paths

In reply to Thomas De Schampheleire

During investigation of adding gcrypt support in perl-net-ssh2, it became clear that its build system is trying to find libraries via host search paths, i.e. /usr/lib64/ etc.

This can be avoided by explicitly passing a 'lib' and 'inc' path.

---
 package/perl-net-ssh2/perl-net-ssh2.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/perl-net-ssh2/perl-net-ssh2.mk +4 -0
index b174fa6210..77d39edef5 100644
@@ -10,5 +10,9 @@ PERL_NET_SSH2_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SA/SALVA
 PERL_NET_SSH2_LICENSE = Artistic or GPL-1.0+
 PERL_NET_SSH2_LICENSE_FILES = README
 PERL_NET_SSH2_DEPENDENCIES = libssh2 zlib
+# build system will use host search paths by default
+PERL_NET_SSH2_CONF_OPTS += \
+	lib="$(STAGING_DIR)/usr/lib" \
+	inc="$(STAGING_DIR)/usr/include"
 
 $(eval $(perl-package))
Signature · 1 line
2.16.4
#3 lore raw

PATCH 3/3 perl-net-ssh2: add support for libgcrypt crypto backend

In reply to Thomas De Schampheleire

Fix usage of libgcrypt as crypto backend to libssh2, when building perl-net-ssh2. In order to achieve that, we need to use 'depends on' the libssh2 backends, which means the user will first need to enable libssh2 and one of the supported backends, before being able to enable perl-net-ssh2.

Fixes
http://autobuild.buildroot.net/results/6ee18e7dd17f168c52f79e49cb5e94cf3aa3df1a/

---
 package/perl-net-ssh2/Config.in        | 8 +++++++-
 package/perl-net-ssh2/perl-net-ssh2.mk | 4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)
package/perl-net-ssh2/Config.in +7 -1
index 8f359b7015..4dfd6e1dd3 100644
@@ -1,12 +1,18 @@
 config BR2_PACKAGE_PERL_NET_SSH2
 	bool "perl-net-ssh2"
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_LIBSSH2
+	depends on BR2_PACKAGE_LIBSSH2_OPENSSL || BR2_PACKAGE_LIBSSH2_LIBGCRYPT
 	select BR2_PACKAGE_ZLIB
 	help
 	  Support for the SSH 2 protocol via libssh2.
 
+	  Note: only the OpenSSL and Libgcrypt backends of libssh2 are
+	  supported.
+
 	  https://metacpan.org/release/Net-SSH2
 
 comment "perl-net-ssh2 needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
+
+comment "perl-net-ssh2 needs libssh2 with OpenSSL or Libgcrypt backend"
+	depends on !(BR2_PACKAGE_LIBSSH2_OPENSSL || BR2_PACKAGE_LIBSSH2_LIBGCRYPT)
package/perl-net-ssh2/perl-net-ssh2.mk +4 -0
index 77d39edef5..ebd5803826 100644
@@ -15,4 +15,8 @@ PERL_NET_SSH2_CONF_OPTS += \
 	lib="$(STAGING_DIR)/usr/lib" \
 	inc="$(STAGING_DIR)/usr/include"
 
+ifeq ($(BR2_PACKAGE_LIBSSH2_LIBGCRYPT),y)
+PERL_NET_SSH2_CONF_OPTS += gcrypt
+endif
+
 $(eval $(perl-package))
Signature · 1 line
2.16.4
#4 lore raw

cover perl-net-ssh2 fixes

In reply to Thomas De Schampheleire

Hello,

Quoted 4 lines · Thomas De Schampheleire

Thomas De Schampheleire (3):
perl-net-ssh2: add missing dependency on zlib
perl-net-ssh2: avoid build system inspecting host paths
perl-net-ssh2: add support for libgcrypt crypto backend

All three patches applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com