Skip to contentSkip to conversation

libssh/ssh2: fix dependencies due to libgcrypt (branch yem/libgcrypt-fixes)

PATCH Superseded Yann E. MORIN 3 participants 9 messages Sep 8, 2016 – Sep 11, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover libssh/ssh2: fix dependencies due to libgcrypt (branch yem/libgcrypt-fixes)

Hello All!

Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh and libssh2 have inherited the dependency from libgcrypt (propagated from libgpg-error).

However, since they can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available.

But the test is broken and inverted: it will make them unavailable as soon as openssl is enabled.

This causes further issues for libssh, as it can be selected when openssl is enabled (see first patch).

This series fixes this dependency.

Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

Regards,
Yann E. MORIN.

The following changes since commit d8983d0c7604681577c7641c1fb198a7095ef037

cifs-utils: bump to version 6.6 (2016-09-08 08:49:36 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to d43755749a1facb634718891552836557cb9d480

package/libssh2: fix dependency on libgcrypt (2016-09-08 23:08:51 +0200)

----------------------------------------------------------------
Yann E. MORIN (2):
package/libssh: fix dependency on libgcrypt package/libssh2: fix dependency on libgcrypt

 package/libssh/Config.in   | 3 +--
 package/libssh/libssh.mk   | 4 ++--
 package/libssh2/Config.in  | 3 +--
 package/libssh2/libssh2.mk | 4 ++--
 4 files changed, 6 insertions(+), 8 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/2 package/libssh: fix dependency on libgcrypt

Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh has inherited the dependency from libgcrypt (propagated from libgpg-error).

However, since libssh can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available.

But the test is broken and inverted: it will make libssh unavailable as soon as openssl is enabled.

This in itself is already incorrect, but that can cause further issues, as some packages (e.g. Kodi) will select (indirectly) openssl, and has an option to select libssh; enabling that option causes unmet direct dependencies of libssh:

    warning: (BR2_PACKAGE_KODI_LIBSSH) selects BR2_PACKAGE_LIBSSH which
    has unmet direct dependencies (BR2_USE_MMU && !BR2_STATIC_LIBS &&
    BR2_TOOLCHAIN_HAS_THREADS && BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS
    && !BR2_PACKAGE_OPENSSL)

Fix this dependency byt doing what other similar packages do: select openssl if the other crypto backend (here libgcrypt) is not enabled. This also allows us to drop the propagated dependency on the arch condition.

Cc Arnout Vandecappelle <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Cc J?rg Krause <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

---
 package/libssh/Config.in | 3 +--
 package/libssh/libssh.mk | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
package/libssh/Config.in +1 -2
index 6029f45..3dbfa7d 100644
@@ -4,8 +4,7 @@ config BR2_PACKAGE_LIBSSH
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	# Either OpenSSL or libgcrypt are mandatory
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS && !BR2_PACKAGE_OPENSSL # libgcrypt
-	select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
 	help
 	  libssh is a multiplatform C library implementing the SSHv2
 	  and SSHv1 protocol on client and server side. With libssh,
package/libssh/libssh.mk +2 -2
index 29bbf4e..429e3c1 100644
@@ -23,14 +23,14 @@ else
 LIBSSH_CONF_OPTS += -DWITH_ZLIB=OFF
 endif
 
+# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
+# Favour libgcrypt.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=ON
 LIBSSH_DEPENDENCIES += libgcrypt
 else
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=OFF
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBSSH_DEPENDENCIES += openssl
 endif
-endif
 
 $(eval $(cmake-package))
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 1/2 package/libssh: fix dependency on libgcrypt

Quoted 14 lines · Yann E. MORIN

Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh has inherited the dependency from libgcrypt (propagated from libgpg-error).

However, since libssh can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available.

But the test is broken and inverted: it will make libssh unavailable as soon as openssl is enabled.

This in itself is already incorrect, but that can cause further issues, as some packages (e.g. Kodi) will select (indirectly) openssl, and has an option to select libssh; enabling that option causes unmet direct dependencies of libssh:

Quoted 6 lines
    warning: (BR2_PACKAGE_KODI_LIBSSH) selects BR2_PACKAGE_LIBSSH which
    has unmet direct dependencies (BR2_USE_MMU && !BR2_STATIC_LIBS &&
    BR2_TOOLCHAIN_HAS_THREADS && BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS
    && !BR2_PACKAGE_OPENSSL)

Fix this dependency byt doing what other similar packages do: select

                        ^
Quoted 1 line

openssl if the other crypto backend (here libgcrypt) is not enabled.

Well, there are still some that prefer a different crypto backend: mosh prefers
nettle over openssl, shairport-sync prefers polarssl. But those packages don't depend on anything so no problem.

Regards,
Arnout

Quoted 56 lines

This also allows us to drop the propagated dependency on the arch condition.

Cc Arnout Vandecappelle <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Cc J?rg Krause <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

---
 package/libssh/Config.in | 3 +--
 package/libssh/libssh.mk | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
package/libssh/Config.in +1 -2
index 6029f45..3dbfa7d 100644
@@ -4,8 +4,7 @@ config BR2_PACKAGE_LIBSSH
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	# Either OpenSSL or libgcrypt are mandatory
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS && !BR2_PACKAGE_OPENSSL # libgcrypt
-	select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
 	help
 	  libssh is a multiplatform C library implementing the SSHv2
 	  and SSHv1 protocol on client and server side. With libssh,
package/libssh/libssh.mk +2 -2
index 29bbf4e..429e3c1 100644
@@ -23,14 +23,14 @@ else
 LIBSSH_CONF_OPTS += -DWITH_ZLIB=OFF
 endif
 
+# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
+# Favour libgcrypt.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=ON
 LIBSSH_DEPENDENCIES += libgcrypt
 else
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=OFF
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBSSH_DEPENDENCIES += openssl
 endif
-endif
 
 $(eval $(cmake-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH v2 1/2 package/libssh: fix dependency on libgcrypt

Arnout, All,

On 2016-09-09 22:58 +0200, Arnout Vandecappelle spake thusly:

Quoted 20 lines · Yann E. MORIN
Quoted 19 lines

Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh has inherited the dependency from libgcrypt (propagated from libgpg-error).

However, since libssh can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available.

But the test is broken and inverted: it will make libssh unavailable as soon as openssl is enabled.

This in itself is already incorrect, but that can cause further issues, as some packages (e.g. Kodi) will select (indirectly) openssl, and has an option to select libssh; enabling that option causes unmet direct dependencies of libssh:

    warning: (BR2_PACKAGE_KODI_LIBSSH) selects BR2_PACKAGE_LIBSSH which
    has unmet direct dependencies (BR2_USE_MMU && !BR2_STATIC_LIBS &&
    BR2_TOOLCHAIN_HAS_THREADS && BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS
    && !BR2_PACKAGE_OPENSSL)
Quoted 8 lines
Quoted 1 line

Fix this dependency byt doing what other similar packages do: select

                        ^
Quoted 1 line

openssl if the other crypto backend (here libgcrypt) is not enabled.

Well, there are still some that prefer a different crypto backend: mosh prefers
nettle over openssl, shairport-sync prefers polarssl. But those packages don't depend on anything so no problem.

Depending is not a problem; it's the select that is a problem.

What we must be very careful is to always do the select-if in the same order for all packages.

For example, the following is wrong:

config BR2_PKG_FOO
select BR2_PKG_OPENSSL if !BR2_PKG_NETTLE

config BR2_PKG_BAR
select BR2_PKG_NETTLE if !BR2_PKG_OPENSSL

This would cause quite some issue for Kconfig...

And I don't know how I did my previous check, but we have quite a few different ordering:

    $ git grep -E 'select (.*BR2_PACKAGE_(OPENSSL|NETTLE|GNUTLS|LIBGCRYPT|LIBNSS)){2,}'
    package/flickcurl/Config.in:select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_GNUTLS || BR2_PACKAGE_LIBNSS)
    package/gstreamer1/gst1-plugins-bad/Config.in:select BR2_PACKAGE_NETTLE if !(BR2_PACKAGE_LIBGCRYPT || BR2_PACKAGE_OPENSSL)
    package/lftp/Config.in:select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS
    package/libssh/Config.in:select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
    package/libssh2/Config.in:select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
    package/mosh/Config.in:select BR2_PACKAGE_NETTLE if !BR2_PACKAGE_OPENSSL
    package/x11r7/xserver_xorg-server/Config.in:select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT)

We should fix that, I think...

My proposal is that, unless a "better" backend is selected, we always fallback to openssl, in Kconfig at least.

Then in the .mk, we can order the if-blocks to start with the prefered backend, in case more than one are enabled.

Regards,
Yann E. MORIN.

Quoted 69 lines

Regards,
Arnout

Quoted 56 lines

This also allows us to drop the propagated dependency on the arch condition.

Cc Arnout Vandecappelle <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Cc J?rg Krause <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

---
 package/libssh/Config.in | 3 +--
 package/libssh/libssh.mk | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
package/libssh/Config.in +1 -2
index 6029f45..3dbfa7d 100644
@@ -4,8 +4,7 @@ config BR2_PACKAGE_LIBSSH
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	# Either OpenSSL or libgcrypt are mandatory
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS && !BR2_PACKAGE_OPENSSL # libgcrypt
-	select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
 	help
 	  libssh is a multiplatform C library implementing the SSHv2
 	  and SSHv1 protocol on client and server side. With libssh,
package/libssh/libssh.mk +2 -2
index 29bbf4e..429e3c1 100644
@@ -23,14 +23,14 @@ else
 LIBSSH_CONF_OPTS += -DWITH_ZLIB=OFF
 endif
 
+# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
+# Favour libgcrypt.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=ON
 LIBSSH_DEPENDENCIES += libgcrypt
 else
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=OFF
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBSSH_DEPENDENCIES += openssl
 endif
-endif
 
 $(eval $(cmake-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH v2 1/2 package/libssh: fix dependency on libgcrypt

Quoted 3 lines · Yann E. MORIN

Arnout, All,

On 2016-09-09 22:58 +0200, Arnout Vandecappelle spake thusly:

[snip]

Quoted 11 lines
Quoted 3 lines

Well, there are still some that prefer a different crypto backend: mosh prefers
nettle over openssl, shairport-sync prefers polarssl. But those packages don't depend on anything so no problem.

Depending is not a problem; it's the select that is a problem.

What we must be very careful is to always do the select-if in the same order for all packages.

For example, the following is wrong:

Quoted 7 lines

config BR2_PKG_FOO
select BR2_PKG_OPENSSL if !BR2_PKG_NETTLE

config BR2_PKG_BAR
select BR2_PKG_NETTLE if !BR2_PKG_OPENSSL

This would cause quite some issue for Kconfig...

Yes, that kind of situation should be avoided.

Quoted 6 lines

And I don't know how I did my previous check, but we have quite a few different ordering:

    $ git grep -E 'select
(.*BR2_PACKAGE_(OPENSSL|NETTLE|GNUTLS|LIBGCRYPT|LIBNSS)){2,}'

Great regexp! But you missed polarssl. And libtomcrypt but nobody uses that.
And beecrypt but only rpm uses it.

Quoted 8 lines

package/flickcurl/Config.in:select BR2_PACKAGE_OPENSSL if
!(BR2_PACKAGE_GNUTLS || BR2_PACKAGE_LIBNSS)
package/gstreamer1/gst1-plugins-bad/Config.in:select BR2_PACKAGE_NETTLE if
!(BR2_PACKAGE_LIBGCRYPT || BR2_PACKAGE_OPENSSL)
package/lftp/Config.in:select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS package/libssh/Config.in:select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL package/libssh2/Config.in:select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL package/mosh/Config.in:select BR2_PACKAGE_NETTLE if !BR2_PACKAGE_OPENSSL

package/shairport-sync/Config.in:select BR2_PACKAGE_POLARSSL if !BR2_PACKAGE_OPENSSL

Quoted 7 lines

package/x11r7/xserver_xorg-server/Config.in:select BR2_PACKAGE_LIBSHA1 if
(!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT)

We should fix that, I think...

My proposal is that, unless a "better" backend is selected, we always fallback to openssl, in Kconfig at least.

I disagree. openssl is big. So something like this, rather:

nettle < polarssl < openssl < gnutls < libgcrypt < libnss

(nettle has an LGPLv3 option, polarssl is only GPLv2, gnutls needs wchar, libnss a lot more).

Oh, and libsha1 is a special case of course.

So actually, the current situation is OK except for libssh{,2}.

Regards,
Arnout

Quoted 78 lines

Then in the .mk, we can order the if-blocks to start with the prefered backend, in case more than one are enabled.

Regards,
Yann E. MORIN.

Quoted 25 lines

Regards,
Arnout

Quoted 20 lines

This also allows us to drop the propagated dependency on the arch condition.

Cc Arnout Vandecappelle <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Cc J?rg Krause <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

---
 package/libssh/Config.in | 3 +--
 package/libssh/libssh.mk | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
Quoted 9 lines

package/libssh/Config.in config BR2_PACKAGE_LIBSSH · line 7

Quoted 9 lines
package/libssh/Config.in +0 -1
index 6029f45..3dbfa7d 100644
@@ -4,8 +4,7 @@ config BR2_PACKAGE_LIBSSH
     depends on !BR2_STATIC_LIBS
     depends on BR2_TOOLCHAIN_HAS_THREADS
     # Either OpenSSL or libgcrypt are mandatory
-    depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS &&

!BR2_PACKAGE_OPENSSL # libgcrypt

Quoted 35 lines
Quoted 17 lines
package/libssh/Config.in +1 -1
-    select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
+    select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
     help
       libssh is a multiplatform C library implementing the SSHv2
       and SSHv1 protocol on client and server side. With libssh,
package/libssh/libssh.mk +2 -0
index 29bbf4e..429e3c1 100644
@@ -23,14 +23,14 @@ else
 LIBSSH_CONF_OPTS += -DWITH_ZLIB=OFF
 endif
 
+# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
+# Favour libgcrypt.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)

package/libssh/libssh.mk else · line 36

Quoted 10 lines
package/libssh/libssh.mk +0 -2
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=ON
 LIBSSH_DEPENDENCIES += libgcrypt
 else
 LIBSSH_CONF_OPTS += -DWITH_GCRYPT=OFF
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBSSH_DEPENDENCIES += openssl
 endif
-endif
 
 $(eval $(cmake-package))

--

Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH v2 2/2 package/libssh2: fix dependency on libgcrypt

In reply to Yann E. MORIN

Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh2 has inherited the dependency from libgcrypt (propagated from libgpg-error).

However, since libssh2 can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available.

But the test is broken and inverted: it will make libssh unavailable as soon as openssl is enabled.

Fix this dependency byt doing what other similar packages do: select openssl if the other crypto backend (here libgcrypt) is not enabled. This also allows us to drop the propagated dependency on the arch condition.

Cc Arnout Vandecappelle <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Cc J?rg Krause <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

---
 package/libssh2/Config.in  | 3 +--
 package/libssh2/libssh2.mk | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
package/libssh2/Config.in +1 -2
index 0deb3bb..2944624 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_LIBSSH2
 	bool "libssh2"
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS && !BR2_PACKAGE_OPENSSL # libgcrypt
-	select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
 	help
 	  libssh2 is a client-side C library implementing the SSH2
 	  protocol as defined by Internet Drafts: SECSH-TRANS(22),
package/libssh2/libssh2.mk +2 -2
index 221fac4..847c2f1 100644
@@ -11,8 +11,8 @@ LIBSSH2_LICENSE_FILES = COPYING
 LIBSSH2_INSTALL_STAGING = YES
 LIBSSH2_CONF_OPTS = --disable-examples-build
 
-# libssh2 must use either libgcrypt or OpenSSL
-# Only select openssl if libgcrypt is not selected
+# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
+# Favour libgcrypt.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBSSH2_DEPENDENCIES += libgcrypt
 LIBSSH2_CONF_OPTS += --with-libgcrypt \
Signature · 1 line
2.7.4
#6 lore raw

PATCH v2 2/2 package/libssh2: fix dependency on libgcrypt

Quoted 14 lines · Yann E. MORIN

Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh2 has inherited the dependency from libgcrypt (propagated from libgpg-error).

However, since libssh2 can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available.

But the test is broken and inverted: it will make libssh unavailable as soon as openssl is enabled.

Fix this dependency byt doing what other similar packages do: select openssl if the other crypto backend (here libgcrypt) is not enabled. This also allows us to drop the propagated dependency on the arch condition.

Quoted 7 lines
Cc Arnout Vandecappelle <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Cc J?rg Krause <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Romain Naour <[email protected]>

Regards,
Arnout

Quoted 39 lines

---
Changes v1 -> v2:
- invert the selection to use openssl as a fallback (Thomas)
- drop the arch dependency (Thomas)

---
 package/libssh2/Config.in  | 3 +--
 package/libssh2/libssh2.mk | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
package/libssh2/Config.in +1 -2
index 0deb3bb..2944624 100644
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_LIBSSH2
 	bool "libssh2"
-	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS && !BR2_PACKAGE_OPENSSL # libgcrypt
-	select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
 	help
 	  libssh2 is a client-side C library implementing the SSH2
 	  protocol as defined by Internet Drafts: SECSH-TRANS(22),
package/libssh2/libssh2.mk +2 -2
index 221fac4..847c2f1 100644
@@ -11,8 +11,8 @@ LIBSSH2_LICENSE_FILES = COPYING
 LIBSSH2_INSTALL_STAGING = YES
 LIBSSH2_CONF_OPTS = --disable-examples-build
 
-# libssh2 must use either libgcrypt or OpenSSL
-# Only select openssl if libgcrypt is not selected
+# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
+# Favour libgcrypt.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBSSH2_DEPENDENCIES += libgcrypt
 LIBSSH2_CONF_OPTS += --with-libgcrypt \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#7 lore raw

v2 cover libssh/ssh2: fix dependencies due to libgcrypt (branch yem/libgcrypt-fixes)

In reply to Yann E. MORIN

Hello,

Quoted 3 lines · Yann E. MORIN

Yann E. MORIN (2):
package/libssh: fix dependency on libgcrypt package/libssh2: fix dependency on libgcrypt

Both applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#8 lore raw

v2 cover libssh/ssh2: fix dependencies due to libgcrypt (branch yem/libgcrypt-fixes)

Thomas, All,

On 2016-09-11 22:50 +0200, Thomas Petazzoni spake thusly:

Quoted 5 lines · Yann E. MORIN
Quoted 3 lines

Yann E. MORIN (2):
package/libssh: fix dependency on libgcrypt package/libssh2: fix dependency on libgcrypt

Both applied, thanks!

And as discussed on IRC, both to be reverted...

Sorry... :-/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'