[elbe-devel] [PATCH] docs: document srcdeb-pkg as debianize alternative

Tobias Deiminger tobias.deiminger at linutronix.de
Fri Jan 17 09:32:21 CET 2025


With newer kernels and new dpkg-buildpackage, the explanation from
ede385faf67d ("docs: elbe-debianize: Explain alternatives") gives an
error on 'make deb-pkg': "cannot combine --build=source,binary and -S".

Since Linux 6.4 there's a better alternative. Linux commit
31f735c65d4f ("kbuild: add srcdeb-pkg target")
provides a 'srcdeb-pkg' make target to build only the Debian source
package without building the binary package.

Signed-off-by: Tobias Deiminger <tdmg at linutronix.de>
---
 docs/elbe-debianize.rst | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/docs/elbe-debianize.rst b/docs/elbe-debianize.rst
index 0239e546..f6732481 100644
--- a/docs/elbe-debianize.rst
+++ b/docs/elbe-debianize.rst
@@ -24,15 +24,14 @@ For Barebox, there is no alternative currently. However, Debian bug
 #900958 asks for a barebox package. When that is resolved, please refer
 to that package.
 
-Linux has a built-in deb-pkg make target for a long time. The problem
-with using it as *elbe debianize* alternative is that it builds the
-source and binary packages directly after inserting the debian directory
-into the source. To build only the source package, one must set the make
-variable DPKG_FLAGS=-S on the deb-pkg call. Just be sure to configure
-the kernel so that a .config file is available, and to set the variables
-that are evaluated by the script. See this man page’s EXAMPLES section.
-After the source package is built, there is one generated file that does
-not belong to an unbuilt debian directory: debian/files.
+Linux >= 6.4 provides a built-in make target 'srcdeb-pkg' to debianize the
+kernel. Just be sure to configure the kernel so that a .config file is
+available, and to set the variables that are evaluated by the script. See this
+man page’s EXAMPLES section. After the source package is built, there is one
+generated file that does not belong to an unbuilt debian directory:
+debian/files. For older Linux versions without 'srcdeb-pkg' one can instead use
+the long existing 'deb-pkg' target, but must set the make variable
+DPKG_FLAGS=-S to skip the binary package build.
 
 Instead of specifying a specific defconfig the .config will end up being
 used. There is no compiler prefix embedded in debian/rules for cross
@@ -66,8 +65,8 @@ fields.
    $ export DEBEMAIL="`git config user.name` <`git config user.email`>"
    $ export KDEB_CHANGELOG_DIST=unstable
    $ make ARCH=arm64 defconfig
-   $ make ARCH=arm64 DPKG_FLAGS=-S KERNELRELEASE=6.2-elbe deb-pkg
+   $ make ARCH=arm64 KERNELRELEASE=6.12-elbe srcdeb-pkg
    $ rm debian/files
    $ git add -f debian
-   $ git commit -sm 'add the deb-pkg generated debianization'
+   $ git commit -sm 'add the srcdeb-pkg generated debianization'
    $ CC=aarch64-linux-gnu-gcc dpkg-buildpackage -b -aarm64
-- 
2.39.2



More information about the elbe-devel mailing list