From 644edb8b6a8786f84e50cd7cf955731ec4609c65 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Wed, 1 Nov 2023 17:27:04 +0000 Subject: libssh: upgrade 0.10.4 -> 0.10.5 Changelog: https://git.libssh.org/projects/libssh.git/tag/?h=libssh-0.10.5 * Generate cases list dynamically in run-ptest. * Install missing file to fix ptest failure. Signed-off-by: Yi Zhao Signed-off-by: Khem Raj (cherry picked from commit b0833f1f3ec78f16a79d9ff66cdd19da93496018) Signed-off-by: Yogita Urade Signed-off-by: Armin Kuster --- meta-oe/recipes-support/libssh/libssh/run-ptest | 42 ++-------------------- meta-oe/recipes-support/libssh/libssh_0.10.4.bb | 45 ----------------------- meta-oe/recipes-support/libssh/libssh_0.10.5.bb | 48 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 84 deletions(-) delete mode 100644 meta-oe/recipes-support/libssh/libssh_0.10.4.bb create mode 100644 meta-oe/recipes-support/libssh/libssh_0.10.5.bb diff --git a/meta-oe/recipes-support/libssh/libssh/run-ptest b/meta-oe/recipes-support/libssh/libssh/run-ptest index 159994e9b..6346b72d5 100644 --- a/meta-oe/recipes-support/libssh/libssh/run-ptest +++ b/meta-oe/recipes-support/libssh/libssh/run-ptest @@ -1,53 +1,17 @@ #!/bin/sh -# Valid tests to run -tests="torture_bind_config \ - torture_buffer \ - torture_bytearray \ - torture_callbacks \ - torture_channel \ - torture_config \ - torture_crypto \ - torture_hashes \ - torture_init \ - torture_isipaddr \ - torture_keyfiles \ - torture_knownhosts_parsing \ - torture_list \ - torture_misc \ - torture_moduli \ - torture_options \ - torture_packet \ - torture_packet_filter \ - torture_pki \ - torture_pki_ecdsa \ - torture_pki_ed25519 \ - torture_pki_rsa \ - torture_push_pop_dir \ - torture_rand \ - torture_session_keys \ - torture_temp_dir \ - torture_temp_file \ - torture_threads_buffer \ - torture_threads_crypto \ - torture_threads_init \ - torture_threads_pki_rsa \ - torture_tokens \ - " - ptestdir=$(dirname "$(readlink -f "$0")") cd "$ptestdir"/tests || exit -# Run specified tests +tests=$(find * -type f -name 'torture_*') + for f in $tests do - if test -e ./"$f"; then + if test -x ./"$f"; then if ./"$f" > ./"$f".out 2> ./"$f".err; then echo "PASS: $f" else echo "FAIL: $f" fi - else - echo "SKIP: $f" fi done diff --git a/meta-oe/recipes-support/libssh/libssh_0.10.4.bb b/meta-oe/recipes-support/libssh/libssh_0.10.4.bb deleted file mode 100644 index 4b2ced5e5..000000000 --- a/meta-oe/recipes-support/libssh/libssh_0.10.4.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "Multiplatform C library implementing the SSHv2 and SSHv1 protocol" -HOMEPAGE = "http://www.libssh.org" -SECTION = "libs" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0" - -DEPENDS = "zlib openssl" - -SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \ - file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ - file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \ - file://run-ptest \ - " -SRCREV = "e8322817a9e5aaef0698d779ddd467a209a85d85" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -PACKAGECONFIG ??= "gcrypt ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" -PACKAGECONFIG[gssapi] = "-DWITH_GSSAPI=1, -DWITH_GSSAPI=0, krb5, " -PACKAGECONFIG[gcrypt] = "-DWITH_GCRYPT=1, -DWITH_GCRYPT=0, libgcrypt, " -PACKAGECONFIG[tests] = "-DUNIT_TESTING=1, -DUNIT_TESTING=0, cmocka" - -ARM_INSTRUCTION_SET:armv5 = "arm" - -EXTRA_OECMAKE = " \ - -DWITH_PCAP=1 \ - -DWITH_SFTP=1 \ - -DWITH_ZLIB=1 \ - -DWITH_EXAMPLES=0 \ - " - -do_compile:prepend () { - if [ ${PTEST_ENABLED} = "1" ]; then - sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/config.h - fi -} - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - cp -f ${B}/tests/unittests/torture_* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-support/libssh/libssh_0.10.5.bb b/meta-oe/recipes-support/libssh/libssh_0.10.5.bb new file mode 100644 index 000000000..f33987acf --- /dev/null +++ b/meta-oe/recipes-support/libssh/libssh_0.10.5.bb @@ -0,0 +1,48 @@ +SUMMARY = "Multiplatform C library implementing the SSHv2 and SSHv1 protocol" +HOMEPAGE = "http://www.libssh.org" +SECTION = "libs" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0" + +DEPENDS = "zlib openssl" + +SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \ + file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \ + file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \ + file://run-ptest \ + " +SRCREV = "479eca13aaaa46b43e68c52186e3783f06ae6f34" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +PACKAGECONFIG ??= "gcrypt ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[gssapi] = "-DWITH_GSSAPI=1, -DWITH_GSSAPI=0, krb5, " +PACKAGECONFIG[gcrypt] = "-DWITH_GCRYPT=1, -DWITH_GCRYPT=0, libgcrypt, " +PACKAGECONFIG[tests] = "-DUNIT_TESTING=1, -DUNIT_TESTING=0, cmocka" + +ARM_INSTRUCTION_SET:armv5 = "arm" + +EXTRA_OECMAKE = " \ + -DWITH_PCAP=1 \ + -DWITH_SFTP=1 \ + -DWITH_ZLIB=1 \ + -DWITH_EXAMPLES=0 \ + " + +do_compile:prepend () { + if [ ${PTEST_ENABLED} = "1" ]; then + sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/config.h + sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/config.h + fi +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -f ${B}/tests/unittests/torture_* ${D}${PTEST_PATH}/tests/ + install -d ${D}${PTEST_PATH}/tests/unittests + cp -f ${S}/tests/unittests/hello*.sh ${D}${PTEST_PATH}/tests/unittests/ +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf