linux/debian
Maximilian Attems f0adb0fee5 revert abi breaking patch for now
we can add it later when we have real reason to bump ABI,
patch seems useful for virtual boxes.

svn path=/dists/sid/linux-2.6/; revision=15464
2010-03-31 06:22:55 +00:00
..
abi/2.6.32-4 add abi 2.6.32-4 files 2010-03-21 04:40:22 +00:00
bin debian/bin/buildcheck.py: Fix config mergeing. 2010-03-21 17:42:55 +00:00
config ignore any openvz related abi change 2010-03-21 22:23:26 +00:00
lib/python/debian_linux debian/lib/python/debian_linux/gencontrol.py: 2010-01-21 16:29:34 +00:00
modules Fix regexp for binNMU versions in modules/rules.include (Closes: #524632) 2010-02-28 17:02:14 +00:00
patches revert abi breaking patch for now 2010-03-31 06:22:55 +00:00
po Add debconf templates.pot 2010-03-29 13:17:54 +00:00
source Set source format to 1.0 2010-02-21 22:15:41 +00:00
templates Prepare debconf templates for translation 2010-03-29 13:17:06 +00:00
NEWS Extend the libata transition to all architectures (except s390) again 2010-03-20 05:50:25 +00:00
README.Debian Remove outdated list of non-free removals. 2009-12-11 14:13:42 +00:00
README.source amend documentation 2010-03-03 21:55:31 +00:00
changelog revert abi breaking patch for now 2010-03-31 06:22:55 +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
linux-base.postinst linux-base: Fix the condition for reconfiguration 2010-03-31 00:48:58 +00:00
linux-base.templates Prepare debconf templates for translation 2010-03-29 13:17:06 +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 linux-headers-*: Support postinst hooks in /etc/kernel/header_postinst.d 2010-03-26 05:11:27 +00:00

README.source

Updating the upstream source
============================

1) You can use either:
   a) a git repository of the kernel source
   b) a kernel tarball from kernel.org (e.g. linux-2.6.25.tar.bz2)
      and, optionally, a patch (e.g. patch-2.6.26-rc3.bz2).

2) Run ./debian/bin/genorig.py <repository>
   or  ./debian/bin/genorig.py <tarball> [patch]
   This will produce ../orig/linux-2.6_<version>.orig.tar.gz
   (e.g. linux-2.6_2.6.26~rc3.orig.tar.gz).

   (genorig.py requires the python and unifdef packages to be
    installed)

3) Unpack linux-2.6-<version>.orig.tar.gz, cd into the new directory,
   and do a 'svn export' to get the debian/ subdirectory.
   Alternatively unpack using "make -f debian/rules orig".

   (the orig target of the Makefiles requires rsync)

Applying patches to the Debian kernel tree
==========================================

The Debian kernel packaging uses a custom patching system:

Patches are stored below debian/patches, loosely sorted in bugfix/,
features/ and debian/. Patches are in the standard kernel patch
format.

The order and the selection of patches which are applied during build
time are specified in the series/ subdirectory. For each revision
there may be up to one file named REVISION specifying the patches
applied for the standard revision and one file named REVISION-extra
for addon flavours. If, e.g. the patches are specified for 2.6.26-12, 
the patch order file is called debian/patches/series/12 for the
standard kernel images and debian/patches/series/12-extra for the
addon flavours.

Let's look at the actual series file for 2.6.26-12:

+ bugfix/all/net-unix-gc-fix-soft-lockups-oom-issues.patch
+ bugfix/all/inotify-watch-removal-umount-races.patch
+ bugfix/all/atm-duplicate-listen-on-socket-corrupts-the-vcc-table.patch
+ bugfix/all/ata-pata_marvell-vs-ahci.patch
+ features/sparc/video-sunxvr500-intergraph.patch

The patches to be applied are specified relative to debian/patches.
"+" indicates that the patch should be added, "-" can be used to
drop a patch in later patch series (e.g. if the patch turned out to
be faulty). The series files may be arbitrarily documented with 
comments starting with "#".

Let's now have a look at the series file for the addon kernel flavours
of 2.6.26-12:

+ features/all/xen/dom0-fix-processor-throttling-when-pr-id-is-minus-1.patch featureset=xen

The same syntax applies for specifing the patches, but an additional
argument is needed which specifies the featureset the patch applies to.


If you want to generate a source tree with all patches applied, run
make -f debian/rules source-all

The resulting source can be found below debian/build.

Kernel config files
===================
Configuration files are constructed dynamically from a number of config
files, as listed in debian/config/<arch>/defines.

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 architecture-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.
@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.

TODO:
- Patches applied to the upstream source
- How to define a flavour
- More detail on generation of debian/control and configs