* [PATCH] kbuild: remove RCS_TAR_IGNORE
@ 2022-07-16 8:05 Masahiro Yamada
2022-07-25 16:46 ` Nick Desaulniers
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2022-07-16 8:05 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Michal Marek, Nick Desaulniers, linux-kernel
This reverts the 20-year-old commit [1], hard-coding '--exclude .git'
instead of '--exclude CVS'.
RCS_TAR_IGNORE is used for packaging the mainline kernel, so I cannot
imagine other version control systems would be used.
I keep RCS_FIND_IGNORE because it is used for external modules, e.g.
'make clean M=...', where git may not be used.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=c2dd03a9e2d8bf508f6b3d9ee327c37a928b3351
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 5 +----
scripts/Makefile.package | 2 +-
scripts/package/mkspec | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 80b19675ae91..8b166766b4ef 100644
--- a/Makefile
+++ b/Makefile
@@ -552,13 +552,10 @@ export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
export PAHOLE_FLAGS
# Files to ignore in find ... statements
-
+# (Take care of various version control systems for external modules?)
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
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 5017f6b2da80..d9c91ebcf2bf 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -45,7 +45,7 @@ if test "$(objtree)" != "$(srctree)"; then \
false; \
fi ; \
$(srctree)/scripts/setlocalversion --save-scmversion; \
-tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
+tar -I $(KGZIP) -c --exclude=.git -f $(2).tar.gz \
--transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \
rm -f $(objtree)/.scmversion
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 54906174bda2..97efc85b845c 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -29,7 +29,7 @@ fi
PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
-EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
+EXCLUDES="--exclude=.git --exclude=*vmlinux* --exclude=*.mod \
--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild: remove RCS_TAR_IGNORE
2022-07-16 8:05 [PATCH] kbuild: remove RCS_TAR_IGNORE Masahiro Yamada
@ 2022-07-25 16:46 ` Nick Desaulniers
0 siblings, 0 replies; 2+ messages in thread
From: Nick Desaulniers @ 2022-07-25 16:46 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild, Michal Marek, linux-kernel
On Sat, Jul 16, 2022 at 1:06 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This reverts the 20-year-old commit [1], hard-coding '--exclude .git'
> instead of '--exclude CVS'.
>
> RCS_TAR_IGNORE is used for packaging the mainline kernel, so I cannot
> imagine other version control systems would be used.
>
> I keep RCS_FIND_IGNORE because it is used for external modules, e.g.
> 'make clean M=...', where git may not be used.
>
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=c2dd03a9e2d8bf508f6b3d9ee327c37a928b3351
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
>
> Makefile | 5 +----
> scripts/Makefile.package | 2 +-
> scripts/package/mkspec | 2 +-
> 3 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 80b19675ae91..8b166766b4ef 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -552,13 +552,10 @@ export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
> export PAHOLE_FLAGS
>
> # Files to ignore in find ... statements
> -
> +# (Take care of various version control systems for external modules?)
> 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
>
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index 5017f6b2da80..d9c91ebcf2bf 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -45,7 +45,7 @@ if test "$(objtree)" != "$(srctree)"; then \
> false; \
> fi ; \
> $(srctree)/scripts/setlocalversion --save-scmversion; \
> -tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
> +tar -I $(KGZIP) -c --exclude=.git -f $(2).tar.gz \
> --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \
> rm -f $(objtree)/.scmversion
>
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index 54906174bda2..97efc85b845c 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -29,7 +29,7 @@ fi
>
> PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
> __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
> -EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
> +EXCLUDES="--exclude=.git --exclude=*vmlinux* --exclude=*.mod \
> --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
> --exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
>
> --
> 2.34.1
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-25 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16 8:05 [PATCH] kbuild: remove RCS_TAR_IGNORE Masahiro Yamada
2022-07-25 16:46 ` Nick Desaulniers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®