summaryrefslogtreecommitdiff
path: root/scripts/package
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-02-15 10:20:24 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-02-26 15:18:07 +0900
commit7bf4582d7aad870ecb4f760743307ecba7a960f4 (patch)
tree4b84048857a0ab7ea01807f6d566e73a0888ccaa /scripts/package
parent5c3d1d0abb12a6915d0f43233837053945621a89 (diff)
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-xscripts/package/mkdebian24
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)"