Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp650845rwl; Fri, 7 Apr 2023 03:18:20 -0700 (PDT) X-Google-Smtp-Source: AKy350bv8nympZ1nO2qTWvhgB3UHJjijnO9cW1CmiB5jgdWidXXshErGqT2l1aAso1Rp9InAQZ53 X-Received: by 2002:a17:906:5fc4:b0:923:c199:dab1 with SMTP id k4-20020a1709065fc400b00923c199dab1mr1878670ejv.55.1680862700401; Fri, 07 Apr 2023 03:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680862700; cv=none; d=google.com; s=arc-20160816; b=0eWbGANjXx/j/rXoC99MiBl67EUaQSAAY87ip5i1bXWzHdipA/xxmxr6Lz0IiV+VMU 9GVHG8eiTCzQgq9KR2WLzm7NhxqoPhYYDDaIq7WRhRu/NNN+moVYXC8HPrynHUmMo1DJ e9mG+do/JXbxI/fAvagNAnRjalmPm8tGg3HKWk609CDzhrwH1KwVtIAGixrMncaE3fD7 dhEunFfMvN6na/r1UXmKeM7u+HynO28LJYAMI4boO+0FyR7mI6DAUoqg25/3IZjBhNfb N70KZVPmei3DQIuWikWpeheMDIGt+k+cxPgMBnAmGAa1zv28pZxjWEXklaAi884OB5bM +ZWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H55vEgirTrCuFGi3LnUmvy3ogrmez8paGG1LvpcKY4o=; b=GHlUxpN8OyrgZoOWalFS4dT1Y3jSa+0gvQCt+NIgdc3ammVHWDh/UHJoxIvUB5E5qj EPJQ0pZjlS6UAhcrUJ0NOAXxKso7FYlyO6jH888+mB8Y1L97OMcYy6QpEtdhvgV81Y5Y eIaDQQncOC9GzWdKj7Mu88M/gZ3N84k/hXQ+/LzrB/Kzelm/bnzk9wUeaQpUWMnX4GE0 +/iTFVTl/Ch5D6hRlAsjqhhc83cWz8m42kXERLbfUYXJTw6espyHD8Vj5bAwvq2Bfoey hMf3mBHXHfW97eqPNyy6yzUVdue8a4Gz9KFoIUlbaC3fpf2uFPHAVub/FeSAcGTLiDIL fbTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lRrp1yO2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020aa7d14d000000b004acc81d5053si3239000edo.616.2023.04.07.03.17.55; Fri, 07 Apr 2023 03:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lRrp1yO2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240428AbjDGKQu (ORCPT + 99 others); Fri, 7 Apr 2023 06:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjDGKQm (ORCPT ); Fri, 7 Apr 2023 06:16:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C565493EA; Fri, 7 Apr 2023 03:16:41 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 5AC5864F13; Fri, 7 Apr 2023 10:16:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1803FC4339E; Fri, 7 Apr 2023 10:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680862600; bh=CKzFfekVaBNvU9m5gXHN+n1Z/uYMoDtKwhblrUGGlII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lRrp1yO24AlnRDuPIVq6WBifDugBAX4NldgVCmGVHQ0GVCrgYk2spE6wlSIBFVTE7 YEwgtU/VYoKcYI5wFQWHpq19+QqG7GsJ2yBV5ZyuNW1oZT5cJTyW0ab4Gz63kegS0W UQVm/2xbDcyno0ABSqUh87ju+087QkMj2IY5zbZN2pKf1EmqC4F5FGEf5T7wiNR/mr kEw3W4LlAv1hJ38+yTnuyzHI01w0mYMwd5HrarCL3fSujux+LC0M3SZPt70atR+u0H uFVXWUktlIKhzxb04dARYtFrwIN7vEUQ7wGmsME1D72RHtNwIkcVO0Ad5xZ40o3E6N euy3A8P6Blraw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nick Terrell , Nicolas Schier Subject: [PATCH 3/3] kbuild: do not create intermediate *.tar for tar packages Date: Fri, 7 Apr 2023 19:16:29 +0900 Message-Id: <20230407101629.1298051-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230407101629.1298051-1-masahiroy@kernel.org> References: <20230407101629.1298051-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 05e96e96a315 ("kbuild: use git-archive for source package creation") split the compression as a separate step to factor out the common build rules. With the previous commit, we got back to the situation where compressed source tarballs are created by a single rule. There is no reason to keep the separate compression rules. Generate the comressed tar packages directly. Signed-off-by: Masahiro Yamada --- scripts/Makefile.package | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 7707975f729b..e0e18d7dfbd5 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -2,7 +2,6 @@ # Makefile for the different targets used to generate full packages of a kernel include $(srctree)/scripts/Kbuild.include -include $(srctree)/scripts/Makefile.lib KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) KBUILD_PKG_ROOTCMD ?="fakeroot -u" @@ -27,21 +26,6 @@ fi ; \ tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \ --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3) -# tarball compression -# --------------------------------------------------------------------------- - -%.tar.gz: %.tar - $(call cmd,gzip) - -%.tar.bz2: %.tar - $(call cmd,bzip2) - -%.tar.xz: %.tar - $(call cmd,xzmisc) - -%.tar.zst: %.tar - $(call cmd,zstd) - # Git # --------------------------------------------------------------------------- @@ -153,10 +137,17 @@ tar-install: FORCE $(Q)$(MAKE) -f $(srctree)/Makefile +$(Q)$(srctree)/scripts/package/buildtar $@ +compress-tar.gz = -I "$(KGZIP)" +compress-tar.bz2 = -I "$(KBZIP2)" +compress-tar.xz = -I "$(XZ)" +compress-tar.zst = -I "$(ZSTD)" + quiet_cmd_tar = TAR $@ - cmd_tar = cd $<; tar cf ../$@ --owner=root --group=root --sort=name * + cmd_tar = cd $<; tar cf ../$@ $(compress-tar$(suffix $@)) --owner=root --group=root --sort=name * + +dir-tarballs := $(addprefix linux-$(KERNELRELEASE)-$(ARCH), .tar .tar.gz .tar.bz2 .tar.xz .tar.zst) -linux-$(KERNELRELEASE)-$(ARCH).tar: tar-install +$(dir-tarballs): tar-install $(call cmd,tar) PHONY += dir-pkg -- 2.37.2