linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Weinehall <tao@acc.umu.se>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>
Cc: davidge@jazzfree.com, linux-kernel@vger.kernel.org,
	torvalds@transmeta.com, alan@redhat.com
Subject: Re: simple question about patches
Date: Sat, 3 Mar 2001 21:20:42 +0100	[thread overview]
Message-ID: <20010303212042.A28012@khan.acc.umu.se> (raw)
In-Reply-To: <Pine.LNX.4.21.0103031812550.1447-100000@roku.redroom.com> <200103031914.f23JEIa85558@saturn.cs.uml.edu>
In-Reply-To: <200103031914.f23JEIa85558@saturn.cs.uml.edu>; from acahalan@cs.uml.edu on Sat, Mar 03, 2001 at 02:14:18PM -0500

On Sat, Mar 03, 2001 at 02:14:18PM -0500, Albert D. Cahalan wrote:
> David G\363mez writes:
> 
> > Hi, i've got a newbie question about patches:
> > Are the pre* patches ( and i guess also the ac* ones) applied against the
> > last release of the kernel or against the previous patch? I mean, when
> > 2.4.3pre2 will come out, i need to get also the pre1 patch?
> 
> Really, I wouldn't bother anymore. 
> 
> [stuff for patch creators below -- please read]
> 
> Long ago, pre* and ac* patches were rare. Patches went from one
> kernel version to the next. You could hope to read a whole patch
> line-by-line before the next one came out. Patches always applied
> easily with the (pre-POSIX?) patch command. Version numbers made
> perfect sense, starting with the 1.0 release. Modems were 14.4 kB/s.

[long rant about patch snipped]

Get a clue, Albert.

I've followed the kernel-tree since v2.0.30 or so (no, I'm not
one of those that began hacking with the 0.01-kernels), and almost
every pre-patch, test-patch and ac-patch ever released. I've even
followed some of the other private trees, such as the aa-patches,
Solar Designer's ow-patches and a few others. I've so far experienced
NO problems whatsoever.

Due to the fact that I tend to do quite some bug-testing inside my
tree, I start afresh from a tarball every 10 to 20 major releases
(sometimes more often), which could be regarded as cheating, of course.

But just to give you a helping hand, here's a small primer.

Applying a patch:

cd linux 		# name of kernel-tree

# If you have an unzipped patch
cat ../patches/patch-name | patch -p1 --dry-run

# If everything goes fine
cat ../patches/patch-name | patch -p1


# If you have a gzipped patch
zcat ../patches/patch-name.gz | patch -p1 --dry-run

# If everything goes fine
zcat ../patches/patch-name.gz | patch -p1


# If you have a bz2zipped patch
bzcat ../patches/patch-name.bz2 | patch -p1 --dry-run

# If everything goes fine
bzcat ../patches/patch-name.bz2 | patch -p1


This goes both for applying pre-patches, ac-patches and normal,
version-to-version patches.

Before applying a patch, make sure that you've unapplied
all pre-patches, ac-patches etc.

This is done using the same syntax, but with a -R tacked onto it.


When creating a patch from two kernel-trees, use

diff -u --recursive --new-file linux-old linux-new > [name-of-patch]

or, for single files simply

diff -u old-file [new-file with full path] > [name-of-patch]


Some of this might not be fully correct, but most of it should be.


/David Weinehall
  _                                                                 _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander      \\
//  Project MCA Linux hacker        //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </

      parent reply	other threads:[~2001-03-03 20:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-03 17:18 simple question about patches davidge
2001-03-03 17:41 ` Rich Baum
2001-03-03 19:14 ` Albert D. Cahalan
2001-03-03 19:24   ` Alan Cox
2001-03-03 19:34     ` Alexander Viro
2001-03-03 20:20   ` David Weinehall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010303212042.A28012@khan.acc.umu.se \
    --to=tao@acc.umu.se \
    --cc=acahalan@cs.uml.edu \
    --cc=alan@redhat.com \
    --cc=davidge@jazzfree.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).