From: Bastian Germann <bage@xxxxxxxxxxxxx> scripts/Makefile.package's TAR_CONTENT lists the files to include in orig tarballs while the deb-pkg make target only ignores .git. This results in the other top-level files ending up in the .diff.gz. Extend the TAR_CONTENT with the git-controlled top-level files. Let dpkg-source ignore .git with the default diff-ignore and list dynamically generated files that are not cleaned in extend-diff-ignore. Use the debian/source/options in order to have those always available on building the package. Signed-off-by: Bastian Germann <bage@xxxxxxxxxxxxx> --- scripts/Makefile.package | 5 +++-- scripts/package/mkdebian | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index b74c65284fb2..360ce0ae2fa1 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -28,8 +28,9 @@ KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) KDEB_SOURCENAME ?= linux-upstream KBUILD_PKG_ROOTCMD ?="fakeroot -u" export KDEB_SOURCENAME -# Include only those top-level files that are needed by make, plus the GPL copy TAR_CONTENT := $(KBUILD_ALLDIRS) .config .scmversion Makefile \ + .clang-format .cocciconfig .get_maintainer.ignore \ + .gitignore .mailmap CREDITS MAINTAINERS README \ Kbuild Kconfig COPYING $(wildcard localversion*) MKSPEC := $(srctree)/scripts/package/mkspec @@ -75,7 +76,7 @@ deb-pkg: $(call cmd,src_tar,$(KDEB_SOURCENAME)) origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\ mv $(KDEB_SOURCENAME).tar.gz ../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz - +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -i.git -us -uc + +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -us -uc PHONY += bindeb-pkg bindeb-pkg: diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 60a2a63a5e90..b317d26e2bbf 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -134,6 +134,8 @@ fi mkdir -p debian/source/ echo "1.0" > debian/source/format +echo diff-ignore > debian/source/options +echo 'extend-diff-ignore = ".config.old|.version|.*include/generated.*|scripts/mod/.*"' >> debian/source/options echo $debarch > debian/arch extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)" -- 2.30.2