Commit graph

26 commits

Author SHA1 Message Date
Giulio Benetti 4a7da55eb3 libssh2: fix build failure due to pointer dereferencing ambiguity
When dereferencing from *aes_ctr_cipher, being a pointer itself,
ambiguity can occur with compiler and build can fail reporting:
openssl.c:574:20: error: ‘*aes_ctr_cipher’ is a pointer; did you mean to use ‘->’?
     *aes_ctr_cipher->nid = type;

Add a patch to sorround every *aes_ctr_cipher-> occurence with
paranthesis like this (*aes_ctr_cipher)->

Fixes:
http://autobuild.buildroot.net/results/97c/97c43dd2122f55f3166683aa1b29ce1ca54bcb9c/
http://autobuild.buildroot.net/results/4b7/4b728d275f1399e3cb72d40482076ee54b35852a/

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-16 16:11:21 +02:00
Bernd Kuhls 9c31063b0f package/libssh2: bump version
Added license hash.

This bump includes "ECDSA key types are now explicit"
62b825c8af

which is needed by vlc since
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=afee1e72a8e08866bbe35d1a57e859cac81052b4

Fixes
http://autobuild.buildroot.net/results/579/579e2418e59680ad4bf3dc85f2918457b6221bfa/
http://autobuild.buildroot.net/results/c73/c7348c442d3f585ace0bc62860f802dc08150776/
http://autobuild.buildroot.net/results/731/73187b883d7fe14b08a4903b326706c9d1f8b519/
http://autobuild.buildroot.net/results/f6d/f6d4fca6063c81a8e240fed4db89269e455f057e/
http://autobuild.buildroot.net/results/371/371f4f017f4a5af0ac6d6a8b1b8276858ad47f75/
http://autobuild.buildroot.net/results/d6a/d6a3b43211eb740bdebbb339668b854d26e878b7/
http://autobuild.buildroot.net/results/a05/a0576aeeb57a49958e5229d9ec08f2bd792d48b6/
http://autobuild.buildroot.net/results/57a/57a9ae2f157183a86fbf1b2cc5cbb38e948690ce/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-12 10:30:18 +02:00
Baruch Siach ebbf874624 libssh2: fix pkg-config info for mbedtls backend
The libssh2.pc file did not contain the needed info for static link with
libssh2. Add a patch fixing that.

Fixes (qemu):
http://autobuild.buildroot.net/results/634/6346b25be2844f9ef722e52040ac1b43d9c38899/

Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-24 21:39:49 +01:00
Eric Le Bihan 93a911fd5b libssh2: add host variant
Allow build of host variant of libssh2, which depends on host-openssl.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-02-05 14:57:47 +01:00
Peter Korsgaard d9a521f008 libssh2: revert to previous crypto defaults
The recent crypto handling change (commit 04a1031d3: package/libssh2: Add
selectable crypto libraries) had the unfortunate side effect that it no
longer automatically selects the most suitable crypto backend (E.G.  one
where the dependency is already enabled), so all users not wanting to use
the mbedtls backend need to explicitly configure this.

Fix this by inverting the logic so the crypto backend sub options use
'depends on' their dependencies instead of 'select', so only the available
backends are displayed.

Like before, default to openssl if no crypto backend dependencies are
currently enabled.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-11-06 18:43:54 +01:00
Sam Voss 04a1031d34 package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
    https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.

As such, allow a user to select the backend most appropriate to their
use-case.

Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.

Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-04 22:50:12 +01:00
Sam Voss a660d1fc74 package/libssh2: update to newest version
Update libssh2 to use the newest version from git. This caused a
transition from released version number to hash as it has not been
version rev'd in over a year (see issue
https://github.com/libssh2/libssh2/issues/220 for bump request).

This brings in changes to the autoconf to correctly pick the crypto
library.

Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-11-01 10:56:14 +01:00
Baruch Siach 908960d98f libssh2: fix build with libgcrypt and mbedtls enabled
The --without-libgcrypt configure parameter is not enough to disable the
libgcrypt back-end. This breaks the build when mbedtls (default backend) is
enabled, and libgcrypt builds before libssh2. Seed ac_cv_libgcrypt to really
disable libgcrypt when it is not the selected crypto back-end.

Fixes:
http://autobuild.buildroot.net/results/b4e/b4e39890e003e9e590a5bf17c9300c653020d88c/
http://autobuild.buildroot.net/results/45a/45a9b3559ceea4e1399794f9612f717f7c57a4a3/
http://autobuild.buildroot.net/results/ae4/ae4afec62ca297df1cd02350601f1d62fc3cd1b7/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-29 15:52:19 +02:00
Baruch Siach 714df4cfed libssh2: add mbedtls backend
libssh2 support mbedtls as crypto back-end library since version 1.8.0.

Default to mbedtls since it's smaller than either libgcrypt or openssl.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-07-11 21:34:56 +02:00
Baruch Siach 816ba1cee5 libssh2: fix link with libgcrypt
libssh2 uses the implicit 'yes' argument of the --with-libgcrypt parameter as
a library path prefix, which breaks the build. Pass the library path as
--with-libgcrypt argument to fix that. Drop the unneeded
--with-libgcrypt-prefix.

Fixes:
http://autobuild.buildroot.net/results/ac3/ac3a3f5871a6c20f5407a468809682ce491b9cb3/
http://autobuild.buildroot.net/results/ba3/ba31fa11b2ce2875649414dd9093e039dfc129e8/
http://autobuild.buildroot.net/results/b07/b07bbbf7fe164ba6dc435de6d8b41fadff7a3b08/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-07-09 23:10:22 +02:00
Baruch Siach 0dcf75eb7d libssh2: bump to version 1.8.0
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-07-09 11:12:22 +02:00
Yann E. MORIN d8a2955a2b package/libssh2: fix dependency on libgcrypt
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 dependenc 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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-11 22:49:04 +02:00
Jörg Krause 2f89476ad9 package/libgpg-error: bump to version 1.23
This patch is based on a patch sent by Vicente Olivert Riera and commented by
Arnout Vandecappelle [1].

- Bump version to 1.23
- Add a hook to fix cross-compilation
- Fix license and license files
- Remove patch applied upstream
- Add a BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS variable
- Propagate the dependencies using that variable:
    * package/cppcms
    * package/crda
    * package/gnupg2
        - package/gcr
            - package/midori
    * package/kodi
    * package/libaacs
    * package/libassuan
    * package/libgcrypt
    * package/libgpgme
    * package/libksba
    * package/libmicrohttpd
        - package/janus-gateway
        - package/kodi
        - package/ola
        - package/systemd
    * package/libssh
    * package/libssh2
        - package/php-ssh2
    * package/netatalk
    * package/network-manager
    * package/ntfs-3g
    * package/opkg
    * package/php-gnupg
    * package/rng-tools
    * package/strongswan
    * package/vpnc

[1] http://patchwork.ozlabs.org/patch/416427/

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
[Thomas:
 - rebase on master
 - changing systemd no longer needed, as it no longer selects
   libgcrypt.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Maxime:
 - rebase on master
 - bump to new version
 - propagate dependencies to missing packages]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
[Thomas:
 - fix hash file.
 - change the way to handle the various arch so that it works properly
   for uClibc.
 - add nios2 arch support.
 - Maxime Hadjinlian learned some basic Emacs-fu to do the final fixups
   of this commit.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-04 22:22:27 +02:00
Romain Naour f844ac4e67 package: remove _gp issue workaround for Codesourcery nios2 toolchain
The _gp link issue has been fixed in CS nios2 2015.11.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-05 19:11:29 +01:00
Gustavo Zacarias 229ea8a18c libssh2: security bump to version 1.7.0
Fixes:
CVE-2016-0787 - diffie_hellman_sha256: convert bytes to bits.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-02-24 17:36:35 +01:00
Gustavo Zacarias 18df1fd088 libssh2: bump to version 1.6.0
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-01-08 18:46:24 +01:00
Romain Naour c785b1b2c4 toolchain-external: CodeSourcery NIOSII: support only one version
See the conclusion about external toolchains during the Buildroot
meeting [1]:
"In the future, we stick to a single external toolchain version. The
Kconfig symbol should not encode the version (avoid legacy handling)"

[1] http://elinux.org/index.php?title=Buildroot:DeveloperDaysELCE2015#Report

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-18 22:57:16 +01:00
Thomas Petazzoni cdf55a1265 libssh2: disable on broken nios2 toolchains
Fixes:

  http://autobuild.buildroot.org/results/bcf/bcfd8287a8d3dec2d66aa8191910f4dab0d7be36/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-11 15:35:29 +01:00
Arnout Vandecappelle 7d69a79624 packages: use backtick instead of $(shell ...) make function
It is often difficult to know exactly when make will expand the
variable, and usually it can only be expanded after the dependencies
have been built (e.g. pkg-config or the .pc file). Using a backtick
instead makes it very clear that it will be expanded only while
executing the command.

This change is useful for two cases:

1. The per-package staging (and host) directory will be created as part
   of the configure step, so any $(shell ...) variable that is used in
   the configure step will fail because the directory doesn't exist
   yet.

2. 'make printvars' evaluates the variables it prints. It will therefore
   trigger a lot of errors from missing .pc files and others. The
   backticks, on the other hand, are not expanded, so with this change
   the output of 'make printvars' becomes clean again.

This commit contains only the easy changes: replace $(shell ...) with
`...`, and also replace ' with " where needed. Follow-up commits will
tackle the more complicated cases that need additional explanation.

After this change, the following instances of $(shell ...) will remain:

- All assignments that use :=
- All variables that are used in make conditionals (which don't expand
  the backticks).
- All variables that only refer to system executables and make
  variables that don't change.
- The calls to check-host-* in dependencies.mk, because it is eval'ed.

[Original patch by Fabio Porcedda, but extended quite a bit by Arnout.]

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-15 00:42:01 +02:00
Gustavo Zacarias 0df6ad5ddb libssh2: security bump to version 1.5.0
Fixes CVE-2015-1782 - kex: bail out on rubbish in the incoming packet.

Also add hash file.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-03-11 17:09:59 +01:00
Romain Naour 3f335ed550 package/libssh2: fix zlib library search path issues
Like for lingcrypt and openssl, help the configure script to find
zlib installed in STAGING_DIR.

Otherwise, It might find the one installed on the host:
checking how to link with libz... /usr/lib/libz.so -Wl,-rpath -Wl,/usr/lib

Fixes:
http://autobuild.buildroot.net/results/93b/93b43e114f21a22f0f8b7d7dd6774c089c426cd1

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-14 22:01:49 +01:00
Peter Korsgaard 3b45139297 libssh2: fix static linking issue with libgcrypt
Fixes:
http://autobuild.buildroot.net/results/07e/07e50ba575b305b37e7a94a773c2b2e255393e9f/
http://autobuild.buildroot.net/results/072/07249f0a001a34ae608a8f8646b26a1152219252/
http://autobuild.buildroot.net/results/1c0/1c0447431e4c025732ea2eb8e9788e303f24fd04/
http://autobuild.buildroot.net/results/5e1/5e1f58c086e437b85b0d31310a93a3b2d0d70836/

And many more.

libgcrypt depends on libgpg-error and the configure script forgets to link
against it breaking static linking.  Fix it by using libgcrypt-config
--libs.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-18 15:31:33 +01:00
Thomas De Schampheleire aaffd209fa packages: rename FOO_CONF_OPT into FOO_CONF_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_CONF_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:54:16 +02:00
Jerzy Grzegorek c7f4b96471 package: remove the trailing slash sign from <PKG>_SITE variable
Since the trailing slash is stripped from $($(PKG)_SITE) by pkg-generic.mk:

$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE))

so it is redundant.
This patch removes it from $(PKG)_SITE variable for BR consistency.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-31 23:17:46 +02:00
Ryan Barnett 4716290630 libssh2: fix library search path issues
Fix issues with some toolchains not finding libssl or libgcrypt.

Fixes http://autobuild.buildroot.net/results/eeaaf41c0c5f88357af8445750dce776774c2b5d
Fixes http://autobuild.buildroot.net/results/7a2590a7c3a1f52590f3e886b7cf9d04ad966a10

[Peter: indentation fixup]
Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-26 16:54:52 +02:00
Ryan Barnett 2ee180e3e2 libssh2: add package
[Peter: minor white space tweaks]
Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-08 21:52:52 +02:00