building your own "official" kernel source packages =================================================== make-kpkg behaves slightly different when used with the kernel sources that come with the kernel-source-* packages provided by Debian. This is controlled by the existence of the debian/official file in the kernel source tree. Normally, when you build a kernel with make-kpkg in a pristine kernel source tree (ie as provided by kernel.org), it lacks the debian/ directory, which holds the control files for the debian package build process. make-kpkg creates this directory and it's contents for you. For kernel source packages specificially crafted for use with make-kpkg this behaviour would be destructive, since they already come with a debian/ directotory. make-kpkg can recognize such kernel source packages, they contain a debian/official file. When make-kpkg finds such a file in a kernel source tree it acts upon, it will preserve the debian/ directory and it's contents. This functionality can, regardless of it's name, be used by anybody who wants to have more influence on the building and contents of kernel packages. If you just want to include some additional documentation with your kernel binary packages, look for the "extra_docs" variable in kernel-pkg.conf(5). How to build your own "official" kernel sources: 1) unpack your kernel, patch as you want 2) configure the kernel 3) make-kpkg debian (edit /etc/kernel-pkg.conf or ~/.kernel-pkg.conf before if you haven't done so already). 4) echo > debian/official 5) customize debian/* (files of particular interest: control, changelog) Now you are ready to build packages. ATTENTION: debian/official has to have a size != 0 bytes, thus you can't use touch or the "> debian/official" shell idiom to creat it. This is due to the kernel Makefiles clean target being really thorough. Differences in behaviour of make-kpkg(8.022) in detail when debian/official exists: - make-kpkg --initrd doesn't warn about cramfs patch - version from changelog takes is forced over command line - delete_build_link (see kernel-pkg.conf(5)) forced to YES - debian target: - debian/ will never be removed - no =bla substitutions in debian/{control,changelog} - debian/rules will not be overwritten - clean target: - debian/ won't be rm -rf ed (Uhm, something removes it anyway) - kernel-source, kernel-headers, kernel-doc, kernel-image targets: - installs debian/README.Debian instead of README.* from /usr/share/kernel-package -- Arthur Korn , Tue, 01 Apr 2003 14:42:11 +0200