linux/debian
Maximilian Attems bd26c9179c Really fix missing kernel-img.conf makes a debian kernel not installable
There is no /etc/kernel-img.con on a fresh debootstrap sid. Installing a
kernel leads to:

|mikejones:/var/lib# dpkg --configure -a
|Setting up linux-image-2.6.31-1-amd64 (2.6.31-1) ...
|Running depmod.
|Running update-initramfs.
|update-initramfs: Generating /boot/initrd.img-2.6.31-1-amd64
|Error retreiving answer for linux-image-2.6.31-1-amd64/postinst/create-kimage-link-2.6.31-1-amd64:
| linux-image-2.6.31-1-amd64/postinst/create-kimage-link-2.6.31-1-amd64 doesn't exist at
| /var/lib/dpkg/info/linux-image-2.6.31-1-amd64.postinst line 522, <STDIN> line 3.
|dpkg: error processing linux-image-2.6.31-1-amd64 (--configure):
| subprocess installed post-installation script returned error exit status 9

As far as I understand debconf, there must be a template and input() for
${package_name}/postinst/create-kimage-link-$version in order to get a
value saved. Since I did not find it I guess that this can't work.

If the bootloader is palo than the answer is ignored anyway so the
question is not required there.

kernel-img.conf(5) says that do_symlinks defaults to yes.

This could also fix piuparts [0].

[0] http://piuparts.debian.org/sid/fail/linux-image-2.6.31-1-amd64_2.6.31-1.log

[ nuked that template in question and this is indeed the right fix
  instead of reprompting user for useless questions.
  Add a comment and keep current ordering. -maks ]

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

Really fix making a debian kernel installable without kernel-img.conf.

boah the code below this with reverse links must die pretty soon.

thanks for good analysis and bug report.

svn path=/dists/trunk/linux-2.6/; revision=14589
2009-11-08 20:39:41 +00:00
..
bin Move all description related config options into its own section. 2009-10-27 16:35:16 +00:00
config [armel/orion5x, armel/kirkwood] Enable ISDN (requested by Markus 2009-11-06 21:07:45 +00:00
lib/python/debian_linux Move all description related config options into its own section. 2009-10-27 16:35:16 +00:00
modules debian/modules/rules.include: 2007-10-10 14:13:14 +00:00
patches Update to 2.6.32-rc6 2009-11-04 02:02:19 +00:00
templates Really fix missing kernel-img.conf makes a debian kernel not installable 2009-11-08 20:39:41 +00:00
README * Set compiler build dependencies from config informations. 2006-01-06 22:32:16 +00:00
README.Debian README.Debian: Add brief information about building specific binary packages (Closes: #546182) 2009-10-26 01:09:57 +00:00
README.build small Readme.build addition 2008-05-25 08:55:32 +00:00
changelog [armel/orion5x, armel/kirkwood] Enable ISDN (requested by Markus 2009-11-06 21:07:45 +00:00
compat * debian/changelog: Update. 2009-03-17 18:51:02 +00:00
copyright Fix Linus' name in copyright file (Closes: #530620) 2009-07-17 21:10:00 +00:00
rules debian/rules: Disallow all rules to run parallel. 2009-08-28 21:01:54 +00:00
rules.defs * Use generated rules, effectively remove second flavour resolver. 2005-08-14 19:59:43 +00:00
rules.real * [ia64] Fix call to elilo in postinst 2009-10-08 01:03:21 +00:00

README

Migrating to the common kernel-image package
-------------------------------------------- 
Files for architecture <arch> should be placed into arch/<arch>. This
directory normally contains a common config file for this architecture
('config'), flavour-specific config files, Makefile.inc file,
controlling the build for this arch, and the defines file, containing
the machine descriptions for various flavours.  For arches with
subarches the subdirectory arch/<arch>/<subarch> with the same file
structure must be created for each subarch.

Kernel config files
-------------------
Configuration files are constructed dynamically by concatenating a number
of config files as described below. 

For architecture without subarches:

  arch/config
  arch/<arch>/config 
  arch/<arch>/config.<flavour>
  
For architecture with subarches:

  arch/config
  arch/<arch>/config
  arch/<arch>/<subarch>/config
  arch/<arch>/<subarch>/config.<flavour>

Control file
------------
The master control file debian/control must be generated before
the package is uploaded. debian/rules contains the debian/control 
target, which generates the control file by invoking the 
debian/bin/gencontrol.py script, which combines the templates from
the templates directory and arch/subarch specific defines file to
produce the debian/control file. Note that this target is intentionally
made to fail with a non-zero exit code to make sure that it is never
run during an automatic build. The following variables are substituted
into the templates:

@version@      Upstream kernel version, for example 2.6.11.
@major@        The major version, for example 2.6
@arch@         The Debian arch name, such as powerpc or i386.
@subarch@      The subarch - only used by powerpc right now.
@flavour@      The build flavour, such as 686 or k7-smp.
@class@        The CPU/architecture class; displayed in synopsis.  It should
               be fairly short, as the synopsis is supposed to be <80 chars.
               It should be in the form "foo class", and will show up in the
	       description as "foo class machines".
@longclass@    The CPU/architecture class; displayed in the extended
               description.  The same rules apply as in @class@.  If
	       this is unset, it will default to @class@.
@desc@         (Potentially) multi-line verbiage that's appended to
               -image descriptions.
@abiname@      Current abiname, a single digit.

Normally, the arch-specific contents should be controlled by
adjusting the corresponding defines file.

Makefile.inc
------------
Each architecture subdirectory in arch may contain a Makefile.inc
file, which is included by debian/rules after definining all the
variables. It may be used to override the standard variables on
per-architecture basis and other evil things. So far the valid uses of
this file include the setting of the following variables:

image_postproc

  A command to be run after the kernel image is built. As far as I know,
  it only required on sparc for stripping of the kernel which is too big
  to be booted otherwise. Typical use is too ugly to be presented here.