• Masahiro Yamada's avatar
    kbuild: do not create intermediate *.tar for source tarballs · f8d94c4e
    Masahiro Yamada authored
    Since commit 05e96e96 ("kbuild: use git-archive for source package
    creation"), a source tarball is 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 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:
    
      $ git -c tar.tar.xz.command=xz archive -o linux.tar.xz HEAD
    
    This commit uses 'tar.tar.*.command' configuration to specify the
    compression backend so we can compress a source tarball on-the-fly.
    
    GIT commit 767cf4579f0e ("archive: implement configurable tar filters")
    is more than a decade old, so it should be available on almost all build
    environments.
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
    f8d94c4e
Makefile.package 8.55 KB