Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp62491lqq; Wed, 12 Jun 2024 17:01:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIGt++kY7XevlS1a2tQRZhfojOXfa4MHQzLjv/mOD+5iR/CJCy/narkZgp+hUW/TDyaqe6qWpj/qKL8Ks+gSEildkChBoEj9Rg4v6jYQ== X-Google-Smtp-Source: AGHT+IGpwBMDaFvlmMieKWrM+LkvoTsXC5LcfeQU381EKZHKfR+0w7vr7CPndJywo5CKJIZ01lL3 X-Received: by 2002:a17:906:71d7:b0:a6f:1590:ab06 with SMTP id a640c23a62f3a-a6f47cbf0ffmr210955966b.31.1718236866710; Wed, 12 Jun 2024 17:01:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718236866; cv=pass; d=google.com; s=arc-20160816; b=yjEqL8qp1+NkdsuzQ9/Tj0R/CYQeDmo5fTUrlMoIy5VdrK4j8f/WGR6A4/CMq0qrdy e8M9G+gSlTOkuPy1OIG/erNZ+29Yo3LvxqaD0zz+5wCrU6CAeAbqw09R8HtJjZEg2T2W wH05D19kx5On72/FU7Ti33n05igHDv021m8uKOpP7lzxhTfWXIvX/VY0OIwmrz4ueJzv W5GgOpbdRCwyceWBAePrx8r2PxSQZ6SHJv8al8nTPkC5aYopB5MtvEadiztKZ9+NKw6g X+AnyS3q0A9vmfk0iz4BX0/849wApI1QD2HgxiqscfXs6rx4hH2CzrQa0It1Z5uyB1ON U79w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SzmgmUVmWitKIZp1RSJ2Zms+IkHoWh2Mfx16GmVdW9E=; fh=kzQbY2VWCNYHOBrv8n3HKFBQNH7Ctw9D+bVaT5LgeBo=; b=BFnX+q0kp5IY8UAKVBMRBiw1MBbYnqeRziluuO/UctsKClE1yUkzjv1kv8Xj9wjeNU apxK/W0YPwf1TkHt6NYsJcE4WNxddCpI+iOVrkOHblgsKJ1j4UuLX5dIJ6LmJqFZ8nn5 Zdq0p9SysYrIaOLL5z5zI6slejmE9rA9WtDZZipbJKDcg1aZLi/hs+85xIxB4CD+jBw/ zWJ8ixchH6+T0C3i/BPkHZjQUiAGEHkZRCj5Rx1zCvaZ46rt0Ggb+4oWZ1uz8HJ/gJOQ 4xShT5DaFPXUn9i8uQzyOxmg+tshemhSB6w/E/uuzZ6CSfCY0vOJ+eLJVXssCbUuQCyS LqGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BNW8Efq4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56dd6ebdsi7659866b.302.2024.06.12.17.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 17:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BNW8Efq4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 532AB1F224B8 for ; Thu, 13 Jun 2024 00:01:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DE9C8F5D; Thu, 13 Jun 2024 00:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BNW8Efq4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EFC5ECC; Thu, 13 Jun 2024 00:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718236859; cv=none; b=fL7UfNoUq2yqScvIARluB0ovMSE04JeMhr7Nn8/gvb9F2oL+U0rudiTGaaisai7FikoVvNkQo9x6T4yaKRDC22i9Jl1b7ZhXZN/NrXV8OuHhj4eaFKR8zgUW/0ZWkV1nVeZaeL/Wt5Vqzk5+35Ia1Q7zUMentMOrPYM/18ZuAeQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718236859; c=relaxed/simple; bh=THiXsAgeS1weLL4STfIx2Vj7agXhVKgVFw1koBWnVjk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J9klczN8RvNNM0xZ4dWylCY1EE3Rij7o2bnJpMjitngUw6v9lyQbqK1hHgKLQ+4SyxPjNCHE2lGM7SJFbLQXTMfdYinv0SM+8571Zz/Xp0mAUnJn6lx28ir5wHLzXWeKvTfunVD7Z47M/vbeV+Y0SVS/hLQMhMTg5+wer4mDwVw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BNW8Efq4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FA79C116B1; Thu, 13 Jun 2024 00:00:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718236858; bh=THiXsAgeS1weLL4STfIx2Vj7agXhVKgVFw1koBWnVjk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BNW8Efq4nsxJaxjYDV3HvRYCgJwocXmGNo2sreM/SkqXdyy9i1jDvt3QGHlTn20qn XrlCEPr910wfp1VzlcIRY7sdQfjQWqR1c+wluIOJcBoneac1Xo+2+UWjtWesYM+Hh5 DduFz+Ey0owbGwevyqv+w7AzjXTrIGWZDKZNx7YuYLh5qAvN7y5PZZ2oTlRneQg5k7 wsBpxDkLROBih7fTxTnhJzKYwf2Y+n73w3vpdHf5kTRjwF+RXK+mSjTz/rNj2IfimM gwjxcnGBxX9nzOOlqjnASLtzdwotHURDnat2sYnrewiK+0XKb8ZCj7bJnlqB2lc/Ym 4O9Y/u1kzygBg== Date: Wed, 12 Jun 2024 17:00:56 -0700 From: Nathan Chancellor To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Schier Subject: Re: [PATCH] kbuild: move init/build-version to scripts/ Message-ID: <20240613000056.GA1596562@thelio-3990X> References: <20240611182502.3600062-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240611182502.3600062-1-masahiroy@kernel.org> On Wed, Jun 12, 2024 at 03:24:47AM +0900, Masahiro Yamada wrote: > At first, I thought this script would be used only in init/Makefile. > > However, commit 5db8face97f8 ("kbuild: Restore .version auto-increment > behaviour for Debian packages") and commit 1789fc912541 ("kbuild: > rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg") > revealed that it was actually needed for scripts/package/mk* as well. > > After all, scripts/ is a better place for it. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor > --- > > init/Makefile | 2 +- > {init => scripts}/build-version | 0 > scripts/package/mkdebian | 2 +- > scripts/package/mkspec | 2 +- > 4 files changed, 3 insertions(+), 3 deletions(-) > rename {init => scripts}/build-version (100%) > > diff --git a/init/Makefile b/init/Makefile > index ab71cedc5fd6..10b652d33e87 100644 > --- a/init/Makefile > +++ b/init/Makefile > @@ -52,7 +52,7 @@ CFLAGS_version.o := -include $(obj)/utsversion-tmp.h > # Build version-timestamp.c with final UTS_VERSION > # > > -include/generated/utsversion.h: build-version-auto = $(shell $(src)/build-version) > +include/generated/utsversion.h: build-version-auto = $(shell $(srctree)/scripts/build-version) > include/generated/utsversion.h: build-timestamp-auto = $(shell LC_ALL=C date) > include/generated/utsversion.h: FORCE > $(call filechk,uts_version) > diff --git a/init/build-version b/scripts/build-version > similarity index 100% > rename from init/build-version > rename to scripts/build-version > diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian > index 070149c985fe..b9a5b789c655 100755 > --- a/scripts/package/mkdebian > +++ b/scripts/package/mkdebian > @@ -150,7 +150,7 @@ version=$KERNELRELEASE > if [ -n "$KDEB_PKGVERSION" ]; then > packageversion=$KDEB_PKGVERSION > else > - packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/init/build-version) > + packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/scripts/build-version) > fi > sourcename=${KDEB_SOURCENAME:-linux-upstream} > > diff --git a/scripts/package/mkspec b/scripts/package/mkspec > index ce201bfa8377..cffc2567bef2 100755 > --- a/scripts/package/mkspec > +++ b/scripts/package/mkspec > @@ -24,7 +24,7 @@ fi > cat< %define ARCH ${ARCH} > %define KERNELRELEASE ${KERNELRELEASE} > -%define pkg_release $("${srctree}/init/build-version") > +%define pkg_release $("${srctree}/scripts/build-version") > EOF > > cat "${srctree}/scripts/package/kernel.spec" > -- > 2.43.0 >