]> git.itanic.dy.fi Git - linux-stable/commitdiff
kbuild: remove the last use of old cmd_src_tar rule in packaging
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 23 Nov 2023 07:18:24 +0000 (16:18 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 28 Nov 2023 02:38:32 +0000 (11:38 +0900)
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>
Makefile
scripts/Makefile.package
scripts/package/snapcraft.template

index 99db546fbb4520f8718c5a9cd7b71da5b7d16c94..0df737217529444dec35c8ad22594488dd6c2be1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -609,8 +609,6 @@ export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL KBUILD_RUSTFLAGS_KERNEL
 export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o    \
                          -name CVS -o -name .pc -o -name .hg -o -name .git \) \
                          -prune -o
-export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
-                        --exclude CVS --exclude .pc --exclude .hg --exclude .git
 
 # ===========================================================================
 # Rules shared between *config targets and build targets
index f30349f46a9753bf70d03bfe2073943bad360fd3..0c3adc48dfe8973c8550cdadadb1df94fbad6c2f 100644 (file)
@@ -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 && \
index 626d278e4a5a7a9a90286444956b933e997895f7..85d5e07d1b40b2087ea49477fe90e96b924a122a 100644 (file)
@@ -10,5 +10,5 @@ parts:
   kernel:
     plugin: kernel
     source: SRCTREE
-    source-type: tar
+    source-type: local
     kernel-with-firmware: false