Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1528632rwl; Fri, 7 Apr 2023 18:43:58 -0700 (PDT) X-Google-Smtp-Source: AKy350bDMsp5MTIPtYAUH4bLoPzbA93SjlKlbgBwKlSQLPs2DXzpgtGhMMLObxchnRCocavLz1ml X-Received: by 2002:a50:ef0a:0:b0:504:84cb:831f with SMTP id m10-20020a50ef0a000000b0050484cb831fmr1224882eds.36.1680918238075; Fri, 07 Apr 2023 18:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680918238; cv=none; d=google.com; s=arc-20160816; b=EdzYdaXISGcFmYf1tEH7e9chJX1cGue/fIZL3WwNaTM9nC5v3rLQ6w/YzEwtOsq5ft o/45+98PJ5gu+IiSQz8eVHr14rp0px/qFAAXAHMWnfJHIp+ohNkCy5GqTEX5V/5PE5zT XpG9f8WPrsE6/0AOK1uG9L/fpB91tjWBS7d0AJbi8ZBkIwVInd9nPJ0T/v975lJ/Dnnm jenNVcw+BP0AjctM+V/cAssqAhKYxvpgfOSC+ZzIVRylbcy9mTvsQN0COEzQqY+fF1w2 x31BoFALRkBDqsBTZkwRCygvQ7PHvjlCKCPaD3e2bddHRUd3H99vUVI3QbgNlV7GCf1S Io6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PD6L3Qfph82jHQP4tKF5vGTFH1Qy6tNZXJLs3LgKKBo=; b=up0XlgXozk5v4UyWG4zsbedlaJGhyGdg2Idh7wjpfb14NnJKpakJ57SNpo9PQ5T449 vHAyig32up2BJzkU2JWHi6FywkT3kNXHpSmCBzfW7lQ9GKHJbaYBZIyNmBMg/Zc7mMgI NjdBh0L0sgY8Xlz5VbtsfmROUM4zM/ajxrkSiOksAIpklBE1M9gIoebNTrSaGq1DjV/j YI8TOXqLBJvDCRnQciyHfBPdRStz2A3jtfXAC9u86VT127xMhIwK75NuQt6CMH+QC1ia 7OftzKDq7RGQYiZtOx6hi1JYJKld3XN57O67rcgd0jaDaYbX50OmkesMRVwG4t0KwOk+ zZyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SjN4FEhn; 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 u12-20020a05640207cc00b004af5fff1c7asi4324207edy.214.2023.04.07.18.43.33; Fri, 07 Apr 2023 18:43:58 -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=SjN4FEhn; 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 S229606AbjDHBdF (ORCPT + 99 others); Fri, 7 Apr 2023 21:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjDHBdD (ORCPT ); Fri, 7 Apr 2023 21:33:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1755E04C; Fri, 7 Apr 2023 18:33:02 -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 3CEEF60F28; Sat, 8 Apr 2023 01:33:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95F4FC4339B; Sat, 8 Apr 2023 01:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680917581; bh=YM2f5mwIM0TVWbMMhe1fI12BEdYU6sF2tm35U8Rz+hk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SjN4FEhnqQ2mKeqE1exy7ultHT5VB9Yuz78hegJEWyrqyJBooEQd5hctSzF3XES7W xKtbAwc/yynKrfShJe0unKCHaN0R1d+QhxiMaQX+aCIKlG3k3Ezz/ngp9nJeaZAoqG gpCEblkv49ZBmNMdujBqObqCCSkjXwH5qVpsaM7IHbbRNeKXjK5jr1puMskknP+dS7 Wz8wmVEbD6fnI99jCMwfZZw68VRbbRW5nngmQl82dHiHlvILsd5X58CAzDtnvFoGO9 BKZfAfAGqLij1zsMwR5+PdLVEcQLfgpkalobaPfmFCdCk9auYD2YWQSvmEH2yfpSl1 OBD3BqTqWLCgA== Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-1842df7cb53so206712fac.10; Fri, 07 Apr 2023 18:33:01 -0700 (PDT) X-Gm-Message-State: AAQBX9cXln+q5xRCfjmh5e0591M+NaCADRh2YsI9eIxnGLyTUgHlBqbF 1OcSn/d83Ryg6050ru6LxNE/ZN2shEgntX+VM2I= X-Received: by 2002:a05:6870:1258:b0:17f:84f8:1f44 with SMTP id 24-20020a056870125800b0017f84f81f44mr1875481oao.11.1680917580858; Fri, 07 Apr 2023 18:33:00 -0700 (PDT) MIME-Version: 1.0 References: <20230407101629.1298051-1-masahiroy@kernel.org> <20230407101629.1298051-2-masahiroy@kernel.org> <20230407181105.GC1018455@dev-arch.thelio-3990X> In-Reply-To: <20230407181105.GC1018455@dev-arch.thelio-3990X> From: Masahiro Yamada Date: Sat, 8 Apr 2023 10:32:23 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] kbuild: do not create intermediate *.tar for source tarballs To: Nathan Chancellor Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nicolas Schier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 On Sat, Apr 8, 2023 at 3:11=E2=80=AFAM Nathan Chancellor wrote: > > On Fri, Apr 07, 2023 at 07:16:28PM +0900, Masahiro Yamada wrote: > > Since commit 05e96e96a315 ("kbuild: use git-archive for source package > > creation"), source tarballs are created in two steps; create *.tar file > > then compress it. I split the compression as a separate rule because I > > just thought 'git archive' supported only gzip for compression. I admit > > the unneeded *.tar file is annoying. > > > > For other compression algorithms, I could pipe the two commands: > > > > $ git archive HEAD | xz > linux.tar.xz > > > > I read git-archive(1) carefully, and I realized GIT had provided a > > more elegant way: > > Hooray for documentation :) > > > $ git -c tar.tar.xz.command=3Dxz archive -o linux.tar.xz HEAD > > > > This commit uses 'tar.tar.*.command' configuration to specify the > > compression backend so we can create a compressed tarball directly. > > > > GIT commit 767cf4579f0e ("archive: implement configurable tar filters") > > is more than a decade old, so it should be available on almost all buil= d > > environments. > > git 1.7.7 it seems, certainly ancientware in my opinion. If people have > issues with this, they can just upgrade git; even RHEL7 has git 1.8.x. > > > Signed-off-by: Masahiro Yamada > > Reviewed-by: Nathan Chancellor > > > --- > > > > scripts/Makefile.package | 24 +++++++++++++++++------- > > 1 file changed, 17 insertions(+), 7 deletions(-) > > > > diff --git a/scripts/Makefile.package b/scripts/Makefile.package > > index a205617730c6..7707975f729b 100644 > > --- a/scripts/Makefile.package > > +++ b/scripts/Makefile.package > > @@ -57,16 +57,23 @@ check-git: > > false; \ > > fi > > > > +archive-config-tar.gz =3D -c tar.tar.gz.command=3D"$(KGZIP)" > > +archive-config-tar.bz2 =3D -c tar.tar.bz2.command=3D"$(KBZIP2)" > > +archive-config-tar.xz =3D -c tar.tar.xz.command=3D"$(XZ)" > > +archive-config-tar.zst =3D -c tar.tar.zst.command=3D"$(ZSTD)" > > + > > quiet_cmd_archive =3D ARCHIVE $@ > > - cmd_archive =3D git -C $(srctree) archive \ > > + cmd_archive =3D git -C $(srctree) $(archive-config-tar$(suffix $= @)) archive \ > > --output=3D$$(realpath $@) --prefix=3D$(basename $= @)/ $(archive-args) > > > > # Linux source tarball > > # --------------------------------------------------------------------= ------- > > > > -targets +=3D linux.tar > > -linux.tar: archive-args =3D $$(cat $<) > > -linux.tar: .tmp_HEAD FORCE > > +linux-tarballs :=3D $(addprefix linux, .tar.gz) > > Is there any reason not to allow other compression formats for linux > like you do for perf? Currently, gzip is only allowed because there is no way to specify the compression algorithm. I already have a patch locally, but not submitted yet. I prioritize groundwork, then add new features later. --=20 Best Regards Masahiro Yamada