Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp535015lqp; Tue, 11 Jun 2024 11:27:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWugRjcUpS1sFs9i4oBy8etl1HyZHsB881lBLS7gTd/FY/kbFYfVUQBE9ZnixoG0Nf63EzVvrDgpkq5DMEYh26tJxYgbUJ+yyojrxt7jg== X-Google-Smtp-Source: AGHT+IGUJDRznp8Y8L2QlASS+m0IMWgZaEl2VYCzxTS+mtJ+8FkZB1RJ7VoNESvDEdo/2Mh4lydO X-Received: by 2002:a05:6a00:848:b0:705:9b48:e9a2 with SMTP id d2e1a72fcca58-7059b48ee25mr6670200b3a.8.1718130430332; Tue, 11 Jun 2024 11:27:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718130430; cv=pass; d=google.com; s=arc-20160816; b=VFCQqzdhNK4H1RJJscoTbWIMvCNpVN13KQTCHxL0AO1nS7R8lUx6CIlECuCV7aPLiF S5coEJnZZFFEMrQyscW++RSg+grqSzyBbypi3MjUK66NFI0f3X7gxQLe7uETFc+thb57 IomA1cdkS4hqxsaEjlvhK41oCHlipE+x9DvquiFOqPyTk1KX6zdLjkqoLTcPpbRk0x8l WGLKmbMBGlv0ugxeo0GpbnQTd7uziU9RU2dW81lLrSMgb9jsKBz3Gv/8iu6vuoHf0B4v oNnZ6Cdigkgb33DY7Va34BYpgzrVy3cjPxetiity6XQtp3rIW/W984EJ2lco1YdAaLyN KmSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=WGDdECRePH+hZo4RGtjE8qli40Rq7Z46T+pE251bEAo=; fh=Holx/gsvO+HQsywX+F3JNZNWvkftjXvD+Yg8VWBHNAk=; b=AvqLT5nl6aqJkB4/5nan9bPwx0ImvkltTiFVtVF9j/OBYxumH96hPb9o+3JS+bymnr nK42ddprOVeAuQnxZKXomp5+SgvqTZvhSD/6Y7a8p6nwWkhBQtMA/4nzE/puYo7o3ihV Hz83WFNy6U5iVwj6lGIwqR4aTLhi+6BOV5FrjwEYLDVlv4gTPtU1xNIosgcG04VokpbH fp4cW35dTJKbqtJm3S2IV0hGAiYbf2unrAoszqW1WWE29Nef6yWOIo2V6jmFrFhC8PHH DOEJFqEd6ugQjAbBUblpx+VBj9V7b0dlMEvrUgQFtqB0p77LNjl3n1Hg4XJBJwfa5S56 RPoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g4UMuK0h; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210419-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210419-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-7042df08824si5449532b3a.7.2024.06.11.11.27.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 11:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210419-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g4UMuK0h; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210419-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210419-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 09B482811DE for ; Tue, 11 Jun 2024 18:26:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CBAF74267; Tue, 11 Jun 2024 18:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g4UMuK0h" 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 A1E25249E5; Tue, 11 Jun 2024 18:25:23 +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=1718130323; cv=none; b=fN+W8ROkfNSOVR+9mcONSfE8NrLi2kztVxet3qrMwEL+0sVnVaD1NLWStH756/KVd+bj3kGxVcEWXL8LLA+r3YC2kQVtoHAE6iI6KdXcY62FcgiqxEQbZEaBbcsxXvdGwu/arCSWEBOoHpcJ5/7lz3pzredRKolHPo8fdvgfu44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718130323; c=relaxed/simple; bh=c9F2EtIWNuw1rAMYXXpe2/dzukpWKAKKc6UMnlXo1yA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OlZxeh92o8KIC90bbztK5uG+jvuyti+fKI/5wOOt6Fffxd0FXhER344TgY6DJ4g9EnKAzU8eE6XVCL54iK02ZLdnsc4mreYLM5UP7j3cU24u2/w6p6bjcnELFh0PKj5US7ZlLabSdmBQ/OF13PJKRR/BMxU3YCto6Y2VLZoKHoM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g4UMuK0h; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6217C2BD10; Tue, 11 Jun 2024 18:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718130323; bh=c9F2EtIWNuw1rAMYXXpe2/dzukpWKAKKc6UMnlXo1yA=; h=From:To:Cc:Subject:Date:From; b=g4UMuK0hjsun2CL+QsWHtAlbLYn68pS9p5E298UbQ0hxwRMwltMpULyidlPm7S67v bgmZ6Di90NiV/dX+GwWULk2+jMhU63czbp/xP+j8r4LwnHxsFXdZS+gtIn2rpELpS4 koGdJXidu7G9MyFYO7uemzwX2L7UKLBBs5tnskM39C0QpxjLnnvlsEAqLx7NLqxzjy y4e7iGFjNSFgSufJk0SPatp6EjGeRr7zh9VBKA1BQLBK5WKWXo1fcCGuVR620nXMmq E2WlbUEMuwdlv3RIpziVa5PR1GVIOnorNTO1IWcyZFZiNgPUrudPNrnDIbqzpT8Wqu KWxIXqDn4KPkg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nicolas Schier Subject: [PATCH] kbuild: move init/build-version to scripts/ Date: Wed, 12 Jun 2024 03:24:47 +0900 Message-ID: <20240611182502.3600062-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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<