From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B04AF158083 for ; Fri, 6 Sep 2024 14:39:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E98512BC019; Fri, 6 Sep 2024 14:39:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D47162BC019 for ; Fri, 6 Sep 2024 14:39:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2876C340BE2 for ; Fri, 6 Sep 2024 14:39:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B6981728 for ; Fri, 6 Sep 2024 14:39:39 +0000 (UTC) From: "Eli Schwartz" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Eli Schwartz" Message-ID: <1725633349.c7a9e46534418e86907fc9db4c80a32c54593b15.eschwartz@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh2/, net-libs/libssh2/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/libssh2/files/0001-cmake-always-run-the-tests-even-when-static-libs-are.patch net-libs/libssh2/libssh2-1.11.0-r3.ebuild net-libs/libssh2/libssh2-9999.ebuild X-VCS-Directories: net-libs/libssh2/files/ net-libs/libssh2/ X-VCS-Committer: eschwartz X-VCS-Committer-Name: Eli Schwartz X-VCS-Revision: c7a9e46534418e86907fc9db4c80a32c54593b15 X-VCS-Branch: master Date: Fri, 6 Sep 2024 14:39:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d85c0f3f-6490-483a-b85d-cebef6d7cada X-Archives-Hash: 8a3d866afbc6f82c9dbf8e28b26374d8 commit: c7a9e46534418e86907fc9db4c80a32c54593b15 Author: Eli Schwartz gentoo org> AuthorDate: Fri Sep 6 14:26:20 2024 +0000 Commit: Eli Schwartz gentoo org> CommitDate: Fri Sep 6 14:35:49 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7a9e465 net-libs/libssh2: pass build option to disable static-libs And apply patch to make the (anemic) testsuite run under this scenario. Previously, we dropped USE=static-libs when switching to build with cmake, then upstream brought support for that back and defaulted it to on -- but we built it and deleted the raw file instead, which broke cmake-config since that does runtime file checks to verify whether all originally installed files that you aren't using, exist. Since we tell the build system not to build+install static libraries at all, the resulting cmake configs won't check for them! Bug: https://bugs.gentoo.org/911386 Closes: https://bugs.gentoo.org/911548 Signed-off-by: Eli Schwartz gentoo.org> ...s-run-the-tests-even-when-static-libs-are.patch | 66 ++++++++++++++++++++++ ...ibssh2-9999.ebuild => libssh2-1.11.0-r3.ebuild} | 18 +++--- net-libs/libssh2/libssh2-9999.ebuild | 9 +-- 3 files changed, 82 insertions(+), 11 deletions(-) diff --git a/net-libs/libssh2/files/0001-cmake-always-run-the-tests-even-when-static-libs-are.patch b/net-libs/libssh2/files/0001-cmake-always-run-the-tests-even-when-static-libs-are.patch new file mode 100644 index 000000000000..a809420ca803 --- /dev/null +++ b/net-libs/libssh2/files/0001-cmake-always-run-the-tests-even-when-static-libs-are.patch @@ -0,0 +1,66 @@ +From 9a769054fc03f02db75355f0850360a26fae7324 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Thu, 5 Sep 2024 23:18:47 -0400 +Subject: [PATCH] cmake: always run the tests even when static libs are + disabled + +The BUILD_STATIC_LIBS option is intended for the use case where users do +not wish to build and install a static lib because it is not one of the +artifacts they are interested in. The option should not be used to +disable running the testsuite. + +Instead, when tests are enabled, define the target. Just don't export or +install it. Build systems build lots of things that aren't deliverable +artifacts, and this becomes just one more of them. + +(cherry-picked from PR https://github.com/libssh2/libssh2/pull/1450) + +Signed-off-by: Eli Schwartz +--- + src/CMakeLists.txt | 6 ++++-- + tests/CMakeLists.txt | 8 ++------ + 2 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5bbed5e5..eb2fb7c2 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -97,8 +97,10 @@ if(WIN32 AND BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS AND + endif() + + # we want it to be called libssh2 on all platforms +-if(BUILD_STATIC_LIBS) +- list(APPEND libssh2_export ${LIB_STATIC}) ++if(BUILD_STATIC_LIBS OR BUILD_TESTING) ++ if(BUILD_STATIC_LIBS) ++ list(APPEND libssh2_export ${LIB_STATIC}) ++ endif() + add_library(${LIB_STATIC} STATIC ${SOURCES}) + target_compile_definitions(${LIB_STATIC} PRIVATE ${PRIVATE_COMPILE_DEFINITIONS} ${libssh2_DEFINITIONS}) + target_link_libraries(${LIB_STATIC} PRIVATE ${LIBRARIES}) +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 76eb78ef..a61ea5a3 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -73,16 +73,12 @@ target_include_directories(runner PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../src" . + foreach(test ${DOCKER_TESTS} ${STANDALONE_TESTS} ${SSHD_TESTS}) + if(NOT ";${TESTS_WITH_LIB_STATIC};" MATCHES ";${test};") + set(LIB_FOR_TESTS ${LIB_SELECTED}) +- elseif(TARGET ${LIB_STATIC}) +- set(LIB_FOR_TESTS ${LIB_STATIC}) + else() +- unset(LIB_FOR_TESTS) +- message(STATUS "Skip test requiring static libssh2 lib: ${test}") ++ set(LIB_FOR_TESTS ${LIB_STATIC}) + endif() + + # We support the same target as both Docker and SSHD test. Build those just once. +- # Skip building tests that require the static lib when the static lib is disabled. +- if(NOT TARGET ${test} AND LIB_FOR_TESTS) ++ if(NOT TARGET ${test}) + add_executable(${test} ${test}.c) + target_compile_definitions(${test} PRIVATE "${CRYPTO_BACKEND_DEFINE}") + target_include_directories(${test} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../src" ../src ../include "${CRYPTO_BACKEND_INCLUDE_DIR}") +-- +2.44.2 + diff --git a/net-libs/libssh2/libssh2-9999.ebuild b/net-libs/libssh2/libssh2-1.11.0-r3.ebuild similarity index 70% copy from net-libs/libssh2/libssh2-9999.ebuild copy to net-libs/libssh2/libssh2-1.11.0-r3.ebuild index 70a9e03a7d0b..2f46aa7022ab 100644 --- a/net-libs/libssh2/libssh2-9999.ebuild +++ b/net-libs/libssh2/libssh2-1.11.0-r3.ebuild @@ -1,17 +1,17 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cmake-multilib git-r3 +inherit cmake-multilib DESCRIPTION="Library implementing the SSH2 protocol" HOMEPAGE="https://www.libssh2.org" -EGIT_REPO_URI="https://github.com/libssh2/libssh2" +SRC_URI="https://www.libssh2.org/download/${P}.tar.xz" LICENSE="BSD" SLOT="0" -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" IUSE="gcrypt mbedtls test zlib" REQUIRED_USE="?? ( gcrypt mbedtls )" RESTRICT="!test? ( test )" @@ -26,10 +26,15 @@ RDEPEND=" ) zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} +" PATCHES=( "${FILESDIR}"/${PN}-1.11.0-mansyntax_sh.patch + "${FILESDIR}"/${PN}-1.11.0-size_t.patch + # https://github.com/libssh2/libssh2/pull/1450 + "${FILESDIR}"/0001-cmake-always-run-the-tests-even-when-static-libs-are.patch ) multilib_src_configure() { @@ -42,11 +47,10 @@ multilib_src_configure() { local mycmakeargs=( -DBUILD_SHARED_LIBS=ON + -DBUILD_STATIC_LIBS=OFF -DBUILD_TESTING=$(usex test) -DCRYPTO_BACKEND=${crypto_backend} -DENABLE_ZLIB_COMPRESSION=$(usex zlib) - -DRUN_SSHD_TESTS=OFF - -DRUN_DOCKER_TESTS=OFF ) if use test ; then diff --git a/net-libs/libssh2/libssh2-9999.ebuild b/net-libs/libssh2/libssh2-9999.ebuild index 70a9e03a7d0b..b5d76374dcb0 100644 --- a/net-libs/libssh2/libssh2-9999.ebuild +++ b/net-libs/libssh2/libssh2-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -26,7 +26,9 @@ RDEPEND=" ) zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} +" PATCHES=( "${FILESDIR}"/${PN}-1.11.0-mansyntax_sh.patch @@ -42,11 +44,10 @@ multilib_src_configure() { local mycmakeargs=( -DBUILD_SHARED_LIBS=ON + -DBUILD_STATIC_LIBS=OFF -DBUILD_TESTING=$(usex test) -DCRYPTO_BACKEND=${crypto_backend} -DENABLE_ZLIB_COMPRESSION=$(usex zlib) - -DRUN_SSHD_TESTS=OFF - -DRUN_DOCKER_TESTS=OFF ) if use test ; then