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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5635115838C for ; Tue, 30 Jan 2024 11:07:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40E262BC028; Tue, 30 Jan 2024 11:07:49 +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 pigeon.gentoo.org (Postfix) with ESMTPS id BAB9B2BC022 for ; Tue, 30 Jan 2024 11:07:48 +0000 (UTC) Message-ID: <7acfff74-c267-4215-9913-55dd0aab0b20@gentoo.org> Date: Tue, 30 Jan 2024 12:07:44 +0100 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 Content-Language: en-US, nl-NL To: gentoo-dev@lists.gentoo.org From: Andrew Ammerlaan Subject: [gentoo-dev] [PATCH] linux-mod-r1.eclass: warn if KV does not match virtual/dist-kernel Autocrypt: addr=andrewammerlaan@gentoo.org; keydata= xsBNBF3n3cUBCAC6uoDZ0XzaO29l8AzUblXQ5rxZI7nbGEnfFqjEQCK3oEXxsDa9Ez1myx3M ir53Vyx64Iz1Bq/TOS/PttgguPpiLggCpTTD2vavp5SwFmg272+P8bUJVJF2mMRm0OR/YPiA B5dNfcoLqKIj+ZMOtrZ72B7agkUn+iDt8lB2f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1cAEQEAAcLAfAQYAQgAJgIbDBYhBAb/U0G9gF2wvH0HpqGfY2zU7bzR BQJlNiHABQkJL3d7AAoJEKGfY2zU7bzRjDwH/1fp/87km2YYVgrfP1aWLjAA/TwcEVycRJQQ S9Q6xuzgD5AYhjzBSONoN46cwf+gla6xndY0lCawsZN7whtJ/DhqSZEfL0HgHkJ6T8FCXexf n1s6XmIAxqIrMmfsuOkAPLJIHzAAGzQX8DXcRSj1cIDUpa1Uy7ncVvI4EzJBRtJVJXIbl+53 NGauXU8ZuprPYkMSPuW3eHATFc0F5DhmlFUXh+HYYK+2QTO73TENMhngkrYcw63je5bRp/+f 72XFKlf1gXHK1ivg8nYueyUfrxZTBGKagusOiQeOao2I1uYcHoFhPYJrQWePMyZiYyB6PR0K DR4B/Ulo3v0eBXaaYzo= Organization: Gentoo Linux Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 58232214-683b-4c65-89c8-4e1732adb348 X-Archives-Hash: 763dc2f5bd4afefca7742961700f7157 From 3a3a69379650af341fa318d8f2d1533885b52d0e Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Mon, 29 Jan 2024 10:58:11 +0100 Subject: [PATCH] linux-mod-r1.eclass: warn if KV does not match virtual/dist-kernel We have no mechanism to ensure that we build the kernel modules for the same kernel version as the version we will record in the virtual/dist-kernel subslot dependency. This does not fix this problem, but it does add a warning to ensure users are aware that, for example, built binpkgs are going to have wrong dependency metadata. Bug: https://bugs.gentoo.org/923025 Signed-off-by: Andrew Ammerlaan --- eclass/linux-mod-r1.eclass | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass index 67a4b64eb4815..8d384c2b30c88 100644 --- a/eclass/linux-mod-r1.eclass +++ b/eclass/linux-mod-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 2023 Gentoo Authors +# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: linux-mod-r1.eclass @@ -650,6 +650,24 @@ _modules_prepare_kernel() { fi linux-info_pkg_setup + + if use dist-kernel && + ! has_version "~virtual/dist-kernel-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + then + ewarn + ewarn "The kernel modules in ${CATEGORY}/${PN} are being built for" + ewarn "kernel version ${KV_FULL}. But this does not match the" + ewarn "installed version of virtual/dist-kernel." + ewarn + ewarn "If this is not intentional, the problem may be corrected by" + ewarn "using \"eselect kernel\" to set the default kernel version to" + ewarn "the same version as the installed version of virtual/dist-kernel." + ewarn + ewarn "If the distribution kernel is being downgraded, ensure that" + ewarn "virtual/dist-kernel is also downgraded to the same version" + ewarn "before rebuilding external kernel modules." + ewarn + fi } # @FUNCTION: _modules_prepare_sign