diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2024-09-15 20:51:51 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-09-15 07:46:44 -0700 |
commit | ef896bcd6c7e7f0ffb09502d3c63fc4df63fcf2b (patch) | |
tree | 2f76ea7e16a525aacffcf402c79b9e42cc8d3ab3 | |
parent | 0a28a9ef22cbb9d532be97340d5668e8687cca87 (diff) | |
download | meta-openembedded-ef896bcd6c7e7f0ffb09502d3c63fc4df63fcf2b.tar.gz |
libssh: upgrade 0.10.6 -> 0.11.1
* Drop 0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch
as the issue has been fixed upstream.
* Add a patch to fix build with clang.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch | 37 | ||||
-rw-r--r-- | meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch | 44 | ||||
-rw-r--r-- | meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch | 16 | ||||
-rw-r--r-- | meta-oe/recipes-support/libssh/libssh_0.11.1.bb (renamed from meta-oe/recipes-support/libssh/libssh_0.10.6.bb) | 8 |
4 files changed, 51 insertions, 54 deletions
diff --git a/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch b/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch new file mode 100644 index 0000000000..21af9a5a19 --- /dev/null +++ b/meta-oe/recipes-support/libssh/libssh/0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 98a330971f4344619b698d4603a45bd31d6935d9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Sun, 15 Sep 2024 20:31:55 +0800 | ||
4 | Subject: [PATCH] CompilerChecks.cmake: drop -Wunused-variable flag | ||
5 | |||
6 | Drop -Wunused-variable flag to fix build with clang: | ||
7 | |||
8 | libssh/0.11.1/git/src/threads/libgcrypt.c:29:1: error: unused variable 'gcry_threads_pthread' [-Werror,-Wunused-variable] | ||
9 | 29 | GCRY_THREAD_OPTION_PTHREAD_IMPL; | ||
10 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
11 | libssh/0.11.1/recipe-sysroot/usr/include/gcrypt.h:217:33: note: expanded from macro 'GCRY_THREAD_OPTION_PTHREAD_IMPL' | ||
12 | 217 | static struct gcry_thread_cbs gcry_threads_pthread = { \ | ||
13 | | ^~~~~~~~~~~~~~~~~~~~ | ||
14 | |||
15 | Upstream-Status: Inappropriate [embedded specific] | ||
16 | |||
17 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
18 | --- | ||
19 | CompilerChecks.cmake | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake | ||
23 | index 9719e699..ec15fa2a 100644 | ||
24 | --- a/CompilerChecks.cmake | ||
25 | +++ b/CompilerChecks.cmake | ||
26 | @@ -48,7 +48,7 @@ if (UNIX) | ||
27 | add_c_compiler_flag("-Werror=implicit-int" SUPPORTED_COMPILER_FLAGS) | ||
28 | add_c_compiler_flag("-Wint-conversion" SUPPORTED_COMPILER_FLAGS) | ||
29 | add_c_compiler_flag("-Werror=int-conversion" SUPPORTED_COMPILER_FLAGS) | ||
30 | - add_c_compiler_flag("-Werror=unused-variable" SUPPORTED_COMPILER_FLAGS) | ||
31 | + #add_c_compiler_flag("-Werror=unused-variable" SUPPORTED_COMPILER_FLAGS) | ||
32 | |||
33 | check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT) | ||
34 | if (REQUIRED_FLAGS_WFORMAT) | ||
35 | -- | ||
36 | 2.25.1 | ||
37 | |||
diff --git a/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch b/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch deleted file mode 100644 index d2d1fb5955..0000000000 --- a/meta-oe/recipes-support/libssh/libssh/0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 49a8ae4d6f77434ed9f7a601b9df488b921e4a22 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 20 Mar 2023 21:59:19 -0700 | ||
4 | Subject: [PATCH] libgcrypt.c: Fix prototype of des3_encrypt/des3_decrypt | ||
5 | |||
6 | This is to match the prototype for callback functions which are now emitted as | ||
7 | errors by clang16 | ||
8 | |||
9 | Fixes | ||
10 | |||
11 | TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:903:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types] | ||
12 | .encrypt = des3_encrypt, | ||
13 | ^~~~~~~~~~~~ | ||
14 | TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:904:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types] | ||
15 | .decrypt = des3_decrypt | ||
16 | ^~~~~~~~~~~~ | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | |||
22 | --- | ||
23 | src/libgcrypt.c | 4 ++-- | ||
24 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/src/libgcrypt.c b/src/libgcrypt.c | ||
27 | index f410d997..e3f66781 100644 | ||
28 | --- a/src/libgcrypt.c | ||
29 | +++ b/src/libgcrypt.c | ||
30 | @@ -416,12 +416,12 @@ static int des3_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV) { | ||
31 | } | ||
32 | |||
33 | static void des3_encrypt(struct ssh_cipher_struct *cipher, void *in, | ||
34 | - void *out, unsigned long len) { | ||
35 | + void *out, size_t len) { | ||
36 | gcry_cipher_encrypt(cipher->key[0], out, len, in, len); | ||
37 | } | ||
38 | |||
39 | static void des3_decrypt(struct ssh_cipher_struct *cipher, void *in, | ||
40 | - void *out, unsigned long len) { | ||
41 | + void *out, size_t len) { | ||
42 | gcry_cipher_decrypt(cipher->key[0], out, len, in, len); | ||
43 | } | ||
44 | |||
diff --git a/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch b/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch index d6bc75c3a6..4803ff81d8 100644 --- a/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch +++ b/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 69a89e8f015802f61637fed0d3791d20a594f298 Mon Sep 17 00:00:00 2001 | 1 | From 99fcb71903cca8458bcd6c0d5b676619a9710dab Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Wed, 15 Mar 2023 16:51:58 +0800 | 3 | Date: Wed, 15 Mar 2023 16:51:58 +0800 |
4 | Subject: [PATCH] tests/CMakeLists.txt: do not search ssh/sshd commands on host | 4 | Subject: [PATCH] tests/CMakeLists.txt: do not search ssh/sshd commands on host |
@@ -9,16 +9,15 @@ not required by unittests, we can skip the search. | |||
9 | Upstream-Status: Inappropriate [embedded specific] | 9 | Upstream-Status: Inappropriate [embedded specific] |
10 | 10 | ||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
12 | |||
13 | --- | 12 | --- |
14 | tests/CMakeLists.txt | 2 ++ | 13 | tests/CMakeLists.txt | 2 ++ |
15 | 1 file changed, 2 insertions(+) | 14 | 1 file changed, 2 insertions(+) |
16 | 15 | ||
17 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt | 16 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt |
18 | index f5c30061..885c926a 100644 | 17 | index 89b95d08..e481534c 100644 |
19 | --- a/tests/CMakeLists.txt | 18 | --- a/tests/CMakeLists.txt |
20 | +++ b/tests/CMakeLists.txt | 19 | +++ b/tests/CMakeLists.txt |
21 | @@ -86,6 +86,7 @@ set(TEST_TARGET_LIBRARIES | 20 | @@ -96,6 +96,7 @@ set(TEST_TARGET_LIBRARIES |
22 | 21 | ||
23 | add_subdirectory(unittests) | 22 | add_subdirectory(unittests) |
24 | 23 | ||
@@ -26,11 +25,14 @@ index f5c30061..885c926a 100644 | |||
26 | # OpenSSH Capabilities are required for all unit tests | 25 | # OpenSSH Capabilities are required for all unit tests |
27 | find_program(SSH_EXECUTABLE NAMES ssh) | 26 | find_program(SSH_EXECUTABLE NAMES ssh) |
28 | if (SSH_EXECUTABLE) | 27 | if (SSH_EXECUTABLE) |
29 | @@ -302,6 +303,7 @@ if (CLIENT_TESTING OR SERVER_TESTING) | 28 | @@ -345,6 +346,7 @@ endif (WITH_PKCS11_URI) |
29 | file(COPY gss/kdcsetup.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gss FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) | ||
30 | 30 | ||
31 | message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}") | 31 | message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}") |
32 | endif () | ||
33 | +endif () | 32 | +endif () |
34 | 33 | ||
35 | configure_file(tests_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/tests_config.h) | 34 | configure_file(tests_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/tests_config.h) |
36 | 35 | ||
36 | -- | ||
37 | 2.25.1 | ||
38 | |||
diff --git a/meta-oe/recipes-support/libssh/libssh_0.10.6.bb b/meta-oe/recipes-support/libssh/libssh_0.11.1.bb index 31f29c1b7d..5f39c2d79c 100644 --- a/meta-oe/recipes-support/libssh/libssh_0.10.6.bb +++ b/meta-oe/recipes-support/libssh/libssh_0.11.1.bb | |||
@@ -6,12 +6,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0" | |||
6 | 6 | ||
7 | DEPENDS = "zlib openssl" | 7 | DEPENDS = "zlib openssl" |
8 | 8 | ||
9 | SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \ | 9 | SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.11 \ |
10 | file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ | 10 | file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ |
11 | file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \ | ||
12 | file://run-ptest \ | 11 | file://run-ptest \ |
13 | " | 12 | " |
14 | SRCREV = "10e09e273f69e149389b3e0e5d44b8c221c2e7f6" | 13 | |
14 | SRC_URI:append:toolchain-clang = " file://0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch" | ||
15 | |||
16 | SRCREV = "854795c654eda518ed6de6c1ebb4e2107fcb2e73" | ||
15 | 17 | ||
16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
17 | 19 | ||