From patchwork Tue Jun 6 07:43:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roxana Nicolescu X-Patchwork-Id: 1790896 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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=OoRJFyEK; dkim-atps=neutral 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 4Qb2Xm4Rjcz20QH for ; Tue, 6 Jun 2023 17:43:51 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1q6RLz-0003KW-Ho; Tue, 06 Jun 2023 07:43:43 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1q6RLx-0003KD-Ah for kernel-team@lists.ubuntu.com; Tue, 06 Jun 2023 07:43:41 +0000 Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 44E2B3F0EF for ; Tue, 6 Jun 2023 07:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686037420; bh=tuzGsul6MD7yY2Pc4Tfy9gXCkbSmDkVoHYbMznh4Z8g=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OoRJFyEKE+Z5p3F3c2wje+htjg5cVnQ3rG4EN8clwRkBUo15TwpBnXrD/nhAnvlUZ P/XsxBNh/nH3FzYNA+3siYl0d8hIohwKlU72bXD+3gYD9fcS48RYJ7pyUSGM+q8W8k Pb8S2cMzfmi4ByIsLywKKZyt8Ax3WN55nc61oTMxRXRO/66ps4scQCHNPg0gRiQr7t JbB9ts1O1/VQcElX8OXv9EeCU9KPHASIcOxZx+Y8BQ/P8MiqGmbwyyR6E0SkQRUmG2 WOdosa7ZBeWCxuVz1kF5F2LELJz72qXAzshv9oFVzdyNnc4cNA5cTwd2xx5Ddzb3o9 m+6TL7nXKevdg== Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-977cb78acfcso192047366b.3 for ; Tue, 06 Jun 2023 00:43:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686037420; x=1688629420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tuzGsul6MD7yY2Pc4Tfy9gXCkbSmDkVoHYbMznh4Z8g=; b=Mh6tqKJEAOQytTvAth3HvqMow6iLiLBKMEGLXKmUK3LO1HB5Vh0932g7S8S0cI96Se O1xHWoeC+A8vwxw6FOihadWKug/jyHUINNZjrV/VzjCCZt8fa3vdSIqBl8O1GG8Db8vs gv8KUryXtlscDrvGZapVp6EUb32o0ZGvzfOzXnYydaNLXtZhy4WoNRAPm1fXDlncp3Ws fZHMBKQcOCJezVG8WsJe++w5R6Gq5Fp5B9pkKPG9PjmLTkY4D3y5b+3PxlOocSoFlELj jbnFKGWjnFiA8J+26pgW7b2Pg+O2atHlp3n572KwHxqKvvknFcG9Tn9GeG+qgArTCK4x DDNg== X-Gm-Message-State: AC+VfDzkfkP75gS6EaEmp1vStX29Zu4iTMMHkeaPJm0TLrvb7RK1hmE0 0nrsBQqLhnpv+Jf0kkZFosL91vNqO09LyvTasTEtpfwB+4JL7fmx8QahcAfqflTRKbEeth60W7z FiLmrcgk6Yay5g5bHRgwCIPUpMFBin8Jfc/Ble7pxN9K+YdNBSdHyBpA= X-Received: by 2002:a17:906:d54f:b0:96a:1c2a:5a38 with SMTP id cr15-20020a170906d54f00b0096a1c2a5a38mr1684132ejc.11.1686037419986; Tue, 06 Jun 2023 00:43:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50EtrnZyM3SJGSGHqu2EXQa6qp4eDUz7LT96bmpYt3JZWiVPy4OWeZEh13PXaOmseEwTt2hw== X-Received: by 2002:a17:906:d54f:b0:96a:1c2a:5a38 with SMTP id cr15-20020a170906d54f00b0096a1c2a5a38mr1684121ejc.11.1686037419830; Tue, 06 Jun 2023 00:43:39 -0700 (PDT) Received: from work.lan (77-169-125-32.fixed.kpn.net. [77.169.125.32]) by smtp.gmail.com with ESMTPSA id f3-20020a056402150300b00514b99afa57sm4864801edw.44.2023.06.06.00.43.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 00:43:39 -0700 (PDT) From: Roxana Nicolescu To: kernel-team@lists.ubuntu.com Subject: [SRU][L, K, J, F][M, U][PATCH 1/1] UBUNTU: [Packaging] Expose base (parent) abi for derivatives Date: Tue, 6 Jun 2023 09:43:37 +0200 Message-Id: <20230606074337.17033-2-roxana.nicolescu@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230606074337.17033-1-roxana.nicolescu@canonical.com> References: <20230606074337.17033-1-roxana.nicolescu@canonical.com> MIME-Version: 1.0 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" BugLink: https://bugs.launchpad.net/bugs/2017006 This will introduce a new variable UTS_UBUNTU_BASE_RELEASE_ABI equal with the parent abi. For backports with multiple inheritance (like jammy:linux-aws-5.19) the version from debian.master (kinetic:linux) wil be used. In case there is no inheritance, the actual kernel abi will be used. This will be exposed in so that (dkms) modules can use this variable for versioning. This is particularly needed in 5.19 kernels, but in anticipation of similar usecases, it is best to introduce this in all releases. The dkms fix that needs this variable is caused by a commit that broke the interface between the kernel and the lttng-module dkms. For other releases, the kernel upstream version was used, but this version has stayed the same because 5.19 version is not maintained anymore upstream and the commit that broke the interface was fetched from the 5.15 stable release. We do expose the abi version of the kernel, but it alone will not solve this issue because we deliver many derivatives, each with their own version. Hence a base main abi version needs to exposed in the headers. Signed-off-by: Roxana Nicolescu --- debian/rules.d/0-common-vars.mk | 9 +++++++++ debian/rules.d/2-binary-arch.mk | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 1d8f8b85772f..11e202598ee7 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -88,6 +88,15 @@ ifneq ($(full_build),false) uploadnum := $(uploadnum)-Ubuntu endif +# This exposes the base (parent) abi number +# For main kernels, this version matches their abi version +# Because we may deal with multiple inheritance (jammy:linux-aws-5.19) +# we always extract the abi version from debian.master/changelog +DEBIAN_BASE_MASTER=debian.master +src_base_pkg_name=linux +base_revision := $(shell sed -n '1s/^$(src_base_pkg_name)\ .*($(release)-\(.*\)).*$$/\1/p' $(DEBIAN_BASE_MASTER)/changelog) +base_abinum := $(shell echo $(base_revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix) + # XXX: linux-libc-dev got bumped to -803.N inadvertantly by a ti-omap4 upload # shift our version higher for this package only. Ensure this only # occurs for the v2.6.35 kernel so that we do not propogate this into diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 6eef2039ec7a..100f3d8e9f7e 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -335,6 +335,10 @@ endif "$(hdrdir)/include/generated/compile.h" # Add UTS_UBUNTU_RELEASE_ABI since UTS_RELEASE is difficult to parse. echo "#define UTS_UBUNTU_RELEASE_ABI $(abinum)" >> $(hdrdir)/include/generated/utsrelease.h + + # Add UTS_UBUNTU_BASE_RELEASE_ABI, needed for dkms modules where we cannot use the upstream version + echo "#define UTS_UBUNTU_BASE_RELEASE_ABI $(base_abinum)" >> $(hdrdir)/include/generated/utsrelease.h + # powerpc kernel arch seems to need some .o files for external module linking. Add them in. ifeq ($(build_arch),powerpc) mkdir -p $(hdrdir)/arch/powerpc/lib