From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77657C4332F for ; Wed, 16 Nov 2022 12:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238742AbiKPM3n (ORCPT ); Wed, 16 Nov 2022 07:29:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238592AbiKPM30 (ORCPT ); Wed, 16 Nov 2022 07:29:26 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B510B2726; Wed, 16 Nov 2022 04:28:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 48E43B81D15; Wed, 16 Nov 2022 12:28:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2DC7C433C1; Wed, 16 Nov 2022 12:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668601687; bh=fCADGpCnNSduAjZpwwhnl/VWGoiGxCTIfyNUkjbyXYA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vBmmcyXH8Xef3CyE6rurA4/xuYUqHdzVPKFwLBgIlbH2Hrh2WEyBI1CZtUR6DJ57S RiTY3qv6iehQxa4Bg6zejv52Bm0U4g+/9EQh2JMqpOI/eXE4Y2hUZ/tyBlL7Nv8hr8 Is5usA/z/WUIqw3VJNRNczcglLu5n5JcfOEXizmWuoEj5P9EA4vbkqv+yH+QizWChr cFOF1LjCmhxwUQTxIVKhlXx4Q5qhmJUGZvk2xPlmkXOEZRgzsOv9426lxuKDm9HHoI Vk4fEGT9N9TjL+Z6jq0wUeIaI4JjQO1RJ0JlVNPTR5qg7dlOK8OX4xXYb1KpGV+HSe Zj1k1CTUVJ5qQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ovHWO-006S50-NO; Wed, 16 Nov 2022 12:28:04 +0000 Date: Wed, 16 Nov 2022 12:28:04 +0000 Message-ID: <867czvozhn.wl-maz@kernel.org> From: Marc Zyngier To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Marek , Nick Desaulniers Subject: Re: [PATCH] kbuild: Restore .version auto-increment behaviour for Debian packages In-Reply-To: References: <20221115220453.3463096-1-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: masahiroy@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, michal.lkml@markovi.net, ndesaulniers@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Nov 2022 06:09:31 +0000, Masahiro Yamada wrote: > > On Wed, Nov 16, 2022 at 7:05 AM Marc Zyngier wrote: > > > > Since 2df8220cc511 ("kbuild: build init/built-in.a just once"), > > generating Debian packages using 'make bindeb-pkg' results in > > packages that are stuck to the same .version, leading to unexpected > > behaviours (multiple packages with the same version). > > > > That's because the mkdebian script samples the build version > > before building the kernel, and forces the use of that version > > number for the actual build. > > > > Restore the previous behaviour by calling init/build-version > > instead of reading the .version file. This is likely to result > > in too many .version bumps, but this is what was happening before > > (although the bump was affecting builds made after the current one). > > > What do you mean by "too many .version bumps"? > > Every "make bindeb-pkg" increments the version by one. And isn't that a problem? We increase the build number pointlessly, even if there is *nothing* to change. > > Is there any case where it increases more? No, but that's bad enough IMHO. > > Eventually, this script should be turned into something that > > is a bit less counter-intuitive (building the kernel first > > and only then generating the packaging artefacts). > > > How to achieve this? By building the kernel *before* sampling the version number, just like RPM does. > > The version is recorded in debian/chanegelog. > Without it, dpkg-buildpackage fails. And again, nothing forces us to do it in that order. > In my understanding, the version must be fixed before building the kernel. Can't immediately see what mandates it, but I'm sure you know better. Anyway, the current situation needs fixing. If you're unhappy with the patch, feel free to replace it with something that you consider more appropriate. M. -- Without deviation from the norm, progress is not possible.