diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-15 02:20:24 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-26 07:18:07 +0100 |
commit | 7bf4582d7aad870ecb4f760743307ecba7a960f4 (patch) | |
tree | 4b84048857a0ab7ea01807f6d566e73a0888ccaa /scripts/package | |
parent | kbuild: add a tool to list files ignored by git (diff) | |
download | linux-7bf4582d7aad870ecb4f760743307ecba7a960f4.tar.xz linux-7bf4582d7aad870ecb4f760743307ecba7a960f4.zip |
kbuild: deb-pkg: create source package without cleaning
If you run 'make deb-pkg', all objects are lost due to 'make clean',
which makes the incremental builds impossible.
Instead of cleaning, pass the exclude list to tar's --exclude-from
option.
Previously, *.diff.gz contained some check-in files such as
.clang-format, .cocciconfig.
With this commit, *.diff.gz will only contain the .config and debian/.
The other source files will go into the .orig tarball.
linux.tar.gz is rebuilt only when the source files that would go into
the tarball are changed.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/package')
-rwxr-xr-x | scripts/package/mkdebian | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index c3bbef7a6754..68b13ef590ba 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -84,6 +84,8 @@ set_debarch() { fi } +rm -rf debian + # Some variables and settings used throughout the script version=$KERNELRELEASE if [ -n "$KDEB_PKGVERSION" ]; then @@ -135,6 +137,28 @@ fi mkdir -p debian/source/ echo "1.0" > debian/source/format +# Ugly: ignore anything except .config or debian/ +cat<<'EOF' > debian/source/local-options +diff-ignore + +extend-diff-ignore = ^[^.d] + +extend-diff-ignore = ^\.[^c] +extend-diff-ignore = ^\.c($|[^o]) +extend-diff-ignore = ^\.co($|[^n]) +extend-diff-ignore = ^\.con($|[^f]) +extend-diff-ignore = ^\.conf($|[^i]) +extend-diff-ignore = ^\.confi($|[^g]) +extend-diff-ignore = ^\.config. + +extend-diff-ignore = ^d($|[^e]) +extend-diff-ignore = ^de($|[^b]) +extend-diff-ignore = ^deb($|[^i]) +extend-diff-ignore = ^debi($|[^a]) +extend-diff-ignore = ^debia($|[^n]) +extend-diff-ignore = ^debian[^/] +EOF + echo $debarch > debian/arch extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)" extra_build_depends="$extra_build_depends, $(if_enabled_echo CONFIG_SYSTEM_TRUSTED_KEYRING libssl-dev:native)" |