Skip to content

Commit e785399

Browse files
committed
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: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
1 parent b44aa8c commit e785399

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

scripts/Makefile.package

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ debian-orig: linux.tar.gz debian
105105
PHONY += deb-pkg
106106
deb-pkg: debian-orig
107107
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
108-
--build=source,binary --source-option=-sP -nc -us -uc
108+
--build=source,binary -nc -us -uc
109109

110110
PHONY += bindeb-pkg
111111
bindeb-pkg: debian

scripts/package/mkdebian

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -135,29 +135,24 @@ else
135135
fi
136136

137137
mkdir -p debian/source/
138-
echo "1.0" > debian/source/format
139-
140-
# Ugly: ignore anything except .config or debian/
141-
cat<<'EOF' > debian/source/local-options
142-
diff-ignore
143-
144-
extend-diff-ignore = ^[^.d]
145-
146-
extend-diff-ignore = ^\.[^c]
147-
extend-diff-ignore = ^\.c($|[^o])
148-
extend-diff-ignore = ^\.co($|[^n])
149-
extend-diff-ignore = ^\.con($|[^f])
150-
extend-diff-ignore = ^\.conf($|[^i])
151-
extend-diff-ignore = ^\.confi($|[^g])
152-
extend-diff-ignore = ^\.config.
153-
154-
extend-diff-ignore = ^d($|[^e])
155-
extend-diff-ignore = ^de($|[^b])
156-
extend-diff-ignore = ^deb($|[^i])
157-
extend-diff-ignore = ^debi($|[^a])
158-
extend-diff-ignore = ^debia($|[^n])
159-
extend-diff-ignore = ^debian[^/]
160-
EOF
138+
echo "3.0 (quilt)" > debian/source/format
139+
140+
{
141+
echo "diff-ignore"
142+
echo "extend-diff-ignore = .*"
143+
} > debian/source/local-options
144+
145+
# Add .config as a patch
146+
mkdir -p debian/patches
147+
{
148+
echo "Subject: Add .config"
149+
echo "Author: ${maintainer}"
150+
echo
151+
echo "--- /dev/null"
152+
echo "+++ linux/.config"
153+
diff -u /dev/null "${KCONFIG_CONFIG}" | tail -n +3
154+
} > debian/patches/config
155+
echo config > debian/patches/series
161156

162157
echo $debarch > debian/arch
163158
extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)"

0 commit comments

Comments
 (0)