From patchwork Mon Mar 27 07:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Aaltonen X-Patchwork-Id: 1761379 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PlPC4248Pz1yXq for ; Mon, 27 Mar 2023 18:12:14 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pgh1L-0006I0-NF; Mon, 27 Mar 2023 07:11:59 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pgh1K-0006HM-4g for kernel-team@lists.ubuntu.com; Mon, 27 Mar 2023 07:11:58 +0000 Received: from [10.172.193.56] (1.general.tjaalton.uk.vpn [10.172.193.56]) (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 smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 92B0D3F177; Mon, 27 Mar 2023 07:11:57 +0000 (UTC) Message-ID: Date: Mon, 27 Mar 2023 10:11:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: ACK/Cmnt Re: [SRU][f:linux-restricted-modules-hwe-5.15][PATCH 0/1] Add lrm autogenerated transitional independent of variants Content-Language: en-US To: Kleber Sacilotto de Souza , kernel-team@lists.ubuntu.com References: <20220929163328.229460-1-kleber.souza@canonical.com> From: Timo Aaltonen In-Reply-To: <20220929163328.229460-1-kleber.souza@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Kleber Sacilotto de Souza kirjoitti 29.9.2022 klo 19.33: > BugLink: https://bugs.launchpad.net/bugs/1991130 > > Note: this patch is supposed to be applied to all lrm packages (or at > least to hwe and generic) but I'm proposing for f:lrm-hwe-5.15 only for > now to fix the transition from f:oem-5.14. If this works well I will > send it again to be applied to other lrm packages. > > [Impact] > > The kernel lrm packages have a mechanism to auto-generate transitional packages > by adding a line to 'debian/package.config' in the following format > > transitional > > Example: > > transitional 450-oem-20.04 450-generic amd64 > > When being processed by 'debian/scripts/gen-rules.lrm' the autogenerated > contents are added to 'debian/control.d/transitionals-local'. However, this file > is not included in the final 'debian/control' for packages which does not > contain the default variant '--' (see debian/rules.in). This is intentional to > prevent unwanted transitionals. > > However, there are some cases where we want to transition packages to kernels > which are not the default variant in a series (e.g. hwe kernels). > > [Fix] > > The proposed fix is to add a new command "migrate", which does exactly what > "transitional" does but adding the content to 'debian/control.d/migrate-local' > which would get added to the final 'debian/control' independently of the > source's variants. > > [Test Case] > > Add "migrate" entries to 'debian/package.config' and check whether they get > added to 'debian/control' even for non default variant packages. > > [Where problems could occur] > > If not used correctly, unwanted transitionals could be generated causing issues > to the archive. However, this is a new command and should not impact any of the > previously set transitionals and it needs to be explicitly used. > > Kleber Sacilotto de Souza (1): > UBUNTU: [Packaging] add a new migrate autogenerate option > > debian/scripts/gen-rules.lrm | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > Hi, So we're finally at the point where the migration from oem-5.14 to hwe-5.15 can happen. There's one change needed though, and that is to add a Provides to the transitionals. This was tested for the migration: with this added, the patch is Acked-by: Timo Aaltonen diff --git a/debian/scripts/gen-rules.lrm b/debian/scripts/gen-rules.lrm index ebd17f1..805941d 100755 --- a/debian/scripts/gen-rules.lrm +++ b/debian/scripts/gen-rules.lrm @@ -230,7 +230,7 @@ done <"debian/package.config" while read command from to archs do case "$command" in - migrate) ;; + migrate) from_minus=$(echo "$from" | sed -e 's/-.*//');; *) continue ;; esac @@ -241,6 +241,7 @@ do Package: linux-modules-nvidia-${from} Architecture: ${archs} Section: oldlibs +Provides: \${dkms:nvidia-${from_minus}-modules}, nvidia-prebuilt-kernel Depends: linux-modules-nvidia-${to} Description: Extra drivers for nvidia-${from} (dummy transitional package) Transitional package for upgrades of ${from} to ${to}.