All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nick Terrell <terrelln@fb.com>,
	Nicolas Schier <nicolas@fjasle.eu>
Subject: Re: [PATCH 3/3] kbuild: do not create intermediate *.tar for tar packages
Date: Fri, 7 Apr 2023 11:12:23 -0700	[thread overview]
Message-ID: <20230407181223.GD1018455@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230407101629.1298051-3-masahiroy@kernel.org>

On Fri, Apr 07, 2023 at 07:16:29PM +0900, Masahiro Yamada wrote:
> 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 <masahiroy@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  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
> 

  reply	other threads:[~2023-04-07 18:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07 10:16 [PATCH 1/3] kbuild: merge cmd_archive_linux and cmd_archive_perf Masahiro Yamada
2023-04-07 10:16 ` [PATCH 2/3] kbuild: do not create intermediate *.tar for source tarballs Masahiro Yamada
2023-04-07 18:11   ` Nathan Chancellor
2023-04-08  1:32     ` Masahiro Yamada
2023-04-07 10:16 ` [PATCH 3/3] kbuild: do not create intermediate *.tar for tar packages Masahiro Yamada
2023-04-07 18:12   ` Nathan Chancellor [this message]
2023-04-20  8:54     ` Tariq Toukan
2023-04-20  9:06       ` Nicolas Schier
2023-04-20  9:19         ` Leon Romanovsky
2023-04-20 12:31           ` Masahiro Yamada
2023-04-11  0:33   ` Masahiro Yamada
2023-04-07 18:00 ` [PATCH 1/3] kbuild: merge cmd_archive_linux and cmd_archive_perf Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230407181223.GD1018455@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=terrelln@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.