Commit e7853995 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: deb-pkg: switch over to source format 3.0 (quilt)

Change the source format from "1.0" to "3.0 (quilt)" because it works
more cleanly.

All files except .config and debian/ go into the orig tarball.
Add a single patch, debian/patches/config, and delete the ugly
extend-diff-ignore patterns.

The debian tarball will be compressed into *.debian.tar.xz by default.
If you like to use a different compression mode, you can pass the
command line option, DPKG_FLAGS=-Zgzip, for example.

The orig tarball only supports gzip for now. The combination of
gzip and xz is somewhat clumsy, but it is not a practical problem.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
parent b44aa8c9
...@@ -105,7 +105,7 @@ debian-orig: linux.tar.gz debian ...@@ -105,7 +105,7 @@ debian-orig: linux.tar.gz debian
PHONY += deb-pkg PHONY += deb-pkg
deb-pkg: debian-orig deb-pkg: debian-orig
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \ +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
--build=source,binary --source-option=-sP -nc -us -uc --build=source,binary -nc -us -uc
PHONY += bindeb-pkg PHONY += bindeb-pkg
bindeb-pkg: debian bindeb-pkg: debian
......
...@@ -135,29 +135,24 @@ else ...@@ -135,29 +135,24 @@ else
fi fi
mkdir -p debian/source/ mkdir -p debian/source/
echo "1.0" > debian/source/format echo "3.0 (quilt)" > debian/source/format
# Ugly: ignore anything except .config or debian/ {
cat<<'EOF' > debian/source/local-options echo "diff-ignore"
diff-ignore echo "extend-diff-ignore = .*"
} > debian/source/local-options
extend-diff-ignore = ^[^.d]
# Add .config as a patch
extend-diff-ignore = ^\.[^c] mkdir -p debian/patches
extend-diff-ignore = ^\.c($|[^o]) {
extend-diff-ignore = ^\.co($|[^n]) echo "Subject: Add .config"
extend-diff-ignore = ^\.con($|[^f]) echo "Author: ${maintainer}"
extend-diff-ignore = ^\.conf($|[^i]) echo
extend-diff-ignore = ^\.confi($|[^g]) echo "--- /dev/null"
extend-diff-ignore = ^\.config. echo "+++ linux/.config"
diff -u /dev/null "${KCONFIG_CONFIG}" | tail -n +3
extend-diff-ignore = ^d($|[^e]) } > debian/patches/config
extend-diff-ignore = ^de($|[^b]) echo config > debian/patches/series
extend-diff-ignore = ^deb($|[^i])
extend-diff-ignore = ^debi($|[^a])
extend-diff-ignore = ^debia($|[^n])
extend-diff-ignore = ^debian[^/]
EOF
echo $debarch > debian/arch echo $debarch > debian/arch
extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)" extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment