From patchwork Mon Dec 4 02:05:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1871341 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=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (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 4Sk6Th3wxsz23mf for ; Mon, 4 Dec 2023 13:06:15 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r9yLV-0006Hk-7b; Mon, 04 Dec 2023 02:06:05 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r9yLN-0006H5-Re for kernel-team@lists.ubuntu.com; Mon, 04 Dec 2023 02:05:57 +0000 Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.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 B0E893F18D for ; Mon, 4 Dec 2023 02:05:57 +0000 (UTC) Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-1fae1c8d282so4975719fac.2 for ; Sun, 03 Dec 2023 18:05:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701655551; x=1702260351; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ExrmXMIw1ARtJHMcMoJLv2hEU0MnhYLWkkJgPkJHZFA=; b=H2VgfA2D8wX/sGnWeXLthUZtWzRUMpp1IecArQykhyJlrA4rAUv7POd2jaQlhaTrD6 N2thc1g1kdIMTIbwFBLA6CHPVir+LVC2i/xB9tfeSeSwZwRzSg3xid9iaP36XTJyoqW6 acjrl2uwP7/liWXW2NpDmkDb3oDo1CphQ8J+oHyqFqxzDQ9B2Ttu6PynGuElzd3bJFyG 73jBC/Py8IG5B9JTHy/DUJMLCNJgCKinAIWTMpUncXmT4b5I2hnSyCmUe+EvUSIo/yRB Tq0j6CMnxHhjdc2HXzKHg9KP/glKuwyQviIKKVDmo/cyrAzIqpW3UzM0LKSogQw89UHk Fvwg== X-Gm-Message-State: AOJu0YyPDRdeEZ2tAfALUPdf0N+wok046+QhPjV2yW9Va5Z2xlKPRqcd TjRpFfQ97MfVlmaTsy94ZE7+Hpti8poVzxuQjN9wsbYK7w2uYgoWr7/CE7eGHvz7cwgQ9AyXVkb vAVGYUS39we8jGqfu9JgsmYT8UYRrFuyI1A2xFmY8LJLcryl/+A== X-Received: by 2002:a05:6870:4711:b0:1f9:602e:7b0b with SMTP id b17-20020a056870471100b001f9602e7b0bmr3680037oaq.2.1701655551233; Sun, 03 Dec 2023 18:05:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWlnzPxpZMV587Q35mpZ6d091enCHFJqs3uRA5CYFecu6jspjUE3z3O8Am7Bz/fCkV7nDfKA== X-Received: by 2002:a05:6870:4711:b0:1f9:602e:7b0b with SMTP id b17-20020a056870471100b001f9602e7b0bmr3680029oaq.2.1701655550826; Sun, 03 Dec 2023 18:05:50 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id m26-20020a638c1a000000b005c67bb1585csm1608031pgd.68.2023.12.03.18.05.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 18:05:50 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: override KERNELRELEASE instead of KERNELVERSION Date: Mon, 4 Dec 2023 11:05:45 +0900 Message-Id: <20231204020545.2036116-1-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 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" It is wrong to override KERNELVERSION, as doing so does not ensure the expected KERNELRELEASE. KERNELRELEASE is the essential part and must agree with debian/control because it results in the 'uname -r' in the compiled kernel. scripts/setlocalversion may append additional strings depending on CONFIG options and localversion* files. For example, if there exists 'localversion' file in the top directory, scripts/setlocalversion will append a string written in it. This must not happen. Debian kernel [1] and the upstream kernel [2] correctly override KERNELRELEASE. Let's fix Ubuntu kernel now. [1]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.5.10-1/debian/rules.real#L141 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/package/debian/rules?id=v6.7-rc3#n18 Signed-off-by: Masahiro Yamada Acked-by: Agathe Porte Acked-by: Emil Renner Berthing --- debian/rules.d/0-common-vars.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index d62a9b063241..2ac46b6433c5 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -238,10 +238,9 @@ kmake = make ARCH=$(build_arch) \ CROSS_COMPILE=$(CROSS_COMPILE) \ HOSTCC=$(HOSTCC) \ CC=$(CROSS_COMPILE)$(gcc) \ - KERNELVERSION=$(abi_release)-$(target_flavour) \ + KERNELRELEASE=$(abi_release)-$(target_flavour) \ CONFIG_DEBUG_SECTION_MISMATCH=y \ KBUILD_BUILD_VERSION="$(uploadnum)" \ - LOCALVERSION= localver-extra= \ CFLAGS_MODULE="-DPKG_ABI=$(abinum)" \ PYTHON=$(PYTHON) ifneq ($(LOCAL_ENV_CC),)