mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
kbuild: remove the last use of old cmd_src_tar rule in packaging
The rpm-pkg and deb-pkg targets have transitioned to using 'git archive' for tarball creation. Although the old cmd_src_tar is still used by snap-pkg, there is no need to pack and unpack a tarball solely for passing the source to snapcraft. Instead, you can use 'source-type: local' to tell the source location to snapcraft. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
@@ -4,27 +4,6 @@
|
||||
include $(srctree)/scripts/Kbuild.include
|
||||
include $(srctree)/scripts/Makefile.lib
|
||||
|
||||
KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
|
||||
# Include only those top-level files that are needed by make, plus the GPL copy
|
||||
TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
|
||||
include init io_uring ipc kernel lib mm net rust \
|
||||
samples scripts security sound tools usr virt \
|
||||
.config Makefile \
|
||||
Kbuild Kconfig COPYING $(wildcard localversion*)
|
||||
|
||||
quiet_cmd_src_tar = TAR $(2).tar.gz
|
||||
cmd_src_tar = \
|
||||
if test "$(objtree)" != "$(srctree)"; then \
|
||||
echo >&2; \
|
||||
echo >&2 " ERROR:"; \
|
||||
echo >&2 " Building source tarball is not possible outside the"; \
|
||||
echo >&2 " kernel source tree. Don't set KBUILD_OUTPUT"; \
|
||||
echo >&2; \
|
||||
false; \
|
||||
fi ; \
|
||||
tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
|
||||
--transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3)
|
||||
|
||||
# Git
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -157,9 +136,8 @@ snap-pkg:
|
||||
rm -rf $(objtree)/snap
|
||||
mkdir $(objtree)/snap
|
||||
$(MAKE) clean
|
||||
$(call cmd,src_tar,$(KERNELPATH))
|
||||
sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \
|
||||
s@SRCTREE@$(shell realpath $(KERNELPATH).tar.gz)@" \
|
||||
s@SRCTREE@$(abs_srctree)@" \
|
||||
$(srctree)/scripts/package/snapcraft.template > \
|
||||
$(objtree)/snap/snapcraft.yaml
|
||||
cd $(objtree)/snap && \
|
||||
|
||||
Reference in New Issue
Block a user