Re: Documentation - how to apply patches for various trees

From: Rolf Eike Beer
Date: Wed Aug 03 2005 - 01:36:00 EST


Jesper Juhl wrote:

>+Where can I download the patches?

Maybe it would be useful to once again mention that local mirrors should be
used at least for stable releases and */testing/*.

>+The 2.6.x kernels
[...]
>+# moving from 2.6.11 to 2.6.12
>+$ cd ~/linux-2.6.11 # change to kernel source dir
>+$ patch -p1 < ../patch-2.6.12 # apply the 2.6.12 patch

patch also nows "-i": patch -p1 -i ../patch-2.6.12

More likely the user will get the patch compressed either with bzip2 or gzip,
so I think it would be useful to tell once more how to apply such a patch:

bzcat ../patch-2.6.12.bz2 | patch -p1

>+The 2.6.x.y kernels

>+$ cd ~/linux-2.6.12.2 # change into the kernel source dir
>+$ patch -p1 -R < ../patch-2.6.12.2 # revert the 2.6.12.2 patch
>+$ patch -p1 < ../patch-2.6.12.3 # apply the new 2.6.12.3 patch
>+$ cd ..
>+$ mv linux-2.6.12.2 linux-2.6.12.3 # rename the kernel source dir

The better way would probably be to use interdiff. Another goodie is that
interdiff knows about -z:

cd ~/linux-2.6.12.2
interdiff -z ../patch-2.6.12.2.bz2 ../patch-2.6.12.3.gz | patch -p1

This should only be shown as "another way" to do so. Sometimes interdiff get's
confused and breaks things, although this is very unlikely for the stable
diffs.

>+The -mm kernels

>+ These kernels in
>+ addition to all the other experimental patches they contain usually also
>+ contain any changes in the mainline -git kernels available at the time of
>+ release.

These two "contain"'s that close to each user are likely to confuse. In a
German text I would but a comma before "in addition" and behind the first
"contain", don't know what the rules for this are in English.

Eike

Attachment: pgp00000.pgp
Description: PGP signature