From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 finch.gentoo.org (Postfix) with ESMTPS id F1C39158287 for ; Sun, 18 May 2025 02:43:36 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id DC772343367 for ; Sun, 18 May 2025 02:43:36 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 5344D1104A8; Sun, 18 May 2025 02:42:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id AA1C11103DD for ; Sun, 18 May 2025 02:42:49 +0000 (UTC) Received: from [IPV6:2603:6011:3f0:6f00::12ac] (unknown [IPv6:2603:6011:3f0:6f00::12ac]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: eschwartz) by smtp.gentoo.org (Postfix) with ESMTPSA id 5FA9F3431AF for ; Sun, 18 May 2025 02:42:49 +0000 (UTC) Message-ID: Date: Sat, 17 May 2025 22:42:45 -0400 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [gentoo-dev] [PATCH] cmake.eclass: Add recursive CMakeLists.txt unsupported version detection To: gentoo-dev@lists.gentoo.org References: <12677532.O9o76ZdvQC@tuxbrain.fritz.box> Content-Language: en-US From: Eli Schwartz Autocrypt: addr=eschwartz@gentoo.org; keydata= xjMEZmeRNBYJKwYBBAHaRw8BAQdAYNZ7pUDWhx1i2f3p6L2ZLu4FcY18UoeGC04Gq/khqwfN I0VsaSBTY2h3YXJ0eiA8ZXNjaHdhcnR6QGdlbnRvby5vcmc+wpYEExYKAD4WIQTvUdMIsc4j CIi+DYTqQj6ToWND8QUCZoRL+gIbAwUJBKKGAAULCQgHAwUVCgkICwUWAgMBAAIeBQIXgAAK CRDqQj6ToWND8aB5AP9r4kB691nNtNwKkdRiOdl7/k6WYzokvHvDamXxRJ0I+gEAjZqR5V8y mfR3fy2Z+r2Joeqdt3CIv5IwPs64spBvigLOOARmZ5E0EgorBgEEAZdVAQUBAQdATT46Z06b 1X9xjXFCYFxmq/Tj3tSEKZInDWTpoHQp4l8DAQgHwn4EGBYKACYWIQTvUdMIsc4jCIi+DYTq Qj6ToWND8QUCZmeRNAIbDAUJBKKGAAAKCRDqQj6ToWND8a2RAP40KPfbfoiZAJW5boFmFJ3G TUBDJRh9CWHyaPqq2PN+0wD/R07oLzfnJUN209mzi9TuTuHjeZybysyqXSw4MAxkMAY= In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------WF3A0XRrfcrBVNzck56QfRtl" X-Archives-Salt: 63f69a08-2ee1-4aff-aff2-90c3c9da0b5f X-Archives-Hash: aa1a150575fee4317a6c21e49c423759 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------WF3A0XRrfcrBVNzck56QfRtl Content-Type: multipart/mixed; boundary="------------j0HDOuZBCM4IzTcsg1qiI5gT"; protected-headers="v1" From: Eli Schwartz To: gentoo-dev@lists.gentoo.org Message-ID: Subject: Re: [gentoo-dev] [PATCH] cmake.eclass: Add recursive CMakeLists.txt unsupported version detection References: <12677532.O9o76ZdvQC@tuxbrain.fritz.box> In-Reply-To: --------------j0HDOuZBCM4IzTcsg1qiI5gT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 5/17/25 4:42 PM, Ionen Wolkens wrote: > On Sat, May 17, 2025 at 10:04:16PM +0200, Andreas Sturmlechner wrote: >> We need to ramp up detection of unsupported CMake build systems with >> CMake 4. This will detect CMakeLists.txt files setting insufficient >> cmake_minimum_required VERSION level even in project subdirectories, >> putting out appropriate eqawarn message about the need to fix ${PN}. >> >> That makes us not rely on tinderbox runs w/ unmasked cmake-4 slowly >> being able to build everything up to leaf packages, and also helps >> detect insufficient subproject minimums that could otherwise be masked= >> by USE flag choice. >> >> Bug: https://bugs.gentoo.org/951350 >> Signed-off-by: Andreas Sturmlechner >> --- >> eclass/cmake.eclass | 20 +++++++++++++++++++- >> 1 file changed, 19 insertions(+), 1 deletion(-) >> >> diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass >> index 083b566d26..8a3f2db7c4 100644 >> --- a/eclass/cmake.eclass >> +++ b/eclass/cmake.eclass >> @@ -243,6 +243,25 @@ _cmake_modify-cmakelists() { >> # Only edit the files once >> grep -qs "<<< Gentoo configuration >>>" "${CMAKE_USE_DIR}"/CMakeList= s.txt && return 0 >> =20 >> + local x re=3D"VERSION( .*\.\.\.| )(([[:digit:]]+)\.([[:digit:]]+))" >> + local ver isold >> + for x in $(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -= exec \ >=20 > Just to note, may be rare so guess not a big deal but, while crawling > all sub-directories, it could pickup some extra CMakeLists.txt that are= > entirely unused (by us) and don't need attention downstream. Some > packages keep a lot of weird unused stuff, or bits that we disable or > unbundle, e.g. qtwebengine adds BUILD.gn files for 3rdparty stuff but > the (unused) upstream CMakeLists.txt are often left there and I wouldn'= t > want a QA bug filed over that if any were bad. >=20 > May be hard to get the real picture without just testing with cmake-4. It has come up in other contexts as well, that eqawarns should probably (and unfortunately all too often do not) come with a variable that ebuilds can set to disable false positives, e.g. QA_CONFIG_IMPL_DECL_SKIP= So let us say QA_CMAKE_COMPAT_SKIP=3D( 'path/to/unused subdir/' ) --=20 Eli Schwartz --------------j0HDOuZBCM4IzTcsg1qiI5gT-- --------------WF3A0XRrfcrBVNzck56QfRtl Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCaClJJQUDAAAAAAAKCRCEp9ErcA0vV7Fx AQDCuQfOErkr+4CpQedhglDVrrMaoEY1BgUh22ItGI3gUgD/fzHQ5i3KzZmTR+xBxaJbXJHqSv5Q bj4siENIq565mg4= =+w3/ -----END PGP SIGNATURE----- --------------WF3A0XRrfcrBVNzck56QfRtl--