public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Dan Aloni <karrde@callisto.yi.org>
Cc: Ivan Passos <lists@cyclades.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: Patch generation
Date: Fri, 10 Nov 2000 08:53:39 -0800	[thread overview]
Message-ID: <3A0C2813.E7CB42D2@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0011100051190.31850-100000@callisto.yi.org>

Dan Aloni wrote:
> 
> On Thu, 9 Nov 2000, Ivan Passos wrote:
> 
> > Where in the src tree can I find (or what is) the command to generate a
> > patch file from two Linux kernel src trees, one being the original and the
> > other being the newly changed one??
> 
> The syntex looks like this one:
> 
> diff -urN old_tree new_tree > your_patch_file
> 
> > I've tried 'diff -ruN', but that does diff's on several files that could
> > stay out of the comparison (such as the files in include/config, .files,
> > etc.).
> 
> You can use the --exclude switch of diff, or make mrproper before you
> diff, or you can cp -al a clean source tree before you build the kernel
> on top of it.
> 
> Another way, is to use *one* source tree, copying the files you change -
> adding them the '.orig' extention to their name.
> 
> Then you run this script (I got it when Riel pasted it on IRC)
> 
> for i in `find ./ -name \*.orig` ; do diff -u $i `dirname $i`/`basename $i
> .orig` ; done
> 
> About the other method: cp -al is fast, creating a copy of tree without
> taking much diskspace, it copies the tree by hard linking the files.
> 
> BTW, 'patch' unlinks files before modifing so you can have lots of kernel
> trees from different releases with little diskspace waste:
> 
> [karrde@callisto ~/usr/src/kernel/work]$ ls -1
> linux-2.4.0-test10
> linux-2.4.0-test10.build
> linux-2.4.0-test11-pre1
> linux-2.4.0-test6
> 
> I did 'cp -al linux-2.4.0-test10 linux-2.4.0-test10.build', and on
> linux-2.4.0-test10.build I did 'make bzImage' and all the rest.
> 
> When Linus releasd test11-pre1 I did 'cp -al' from test10 to test11-pre1
> and patched the test11-pre1 dir with the patch Linus released. the test10
> dir remained intact.
> 
> [karrde@callisto ~/usr/src/kernel/work]$ du . -s
> 193004  .
> 
> 4 kernel trees, one after make dep ; make bzImage, and all taking together
> just 193MB, instead of about 400MB... hard links, gotta love'em.

Ok, this is cool, but suppose I have the same file linked to all these
and want to change it in all the trees, i.e. still have one file.  Is
there an editor that doesn't unlink.  Or maybe cp of the edited file?? 
How would you do this?  (I prefer EMACS, which likes to unlink.)

George
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-10 16:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-09 22:46 Patch generation Ivan Passos
2000-11-09 22:56 ` Chmouel Boudjnah
2000-11-09 22:57 ` Infamous Woodchuck
2000-11-09 23:08 ` Dan Aloni
2000-11-10 16:53   ` George Anzinger [this message]
2000-11-10 19:46     ` Dan Aloni
2000-11-10 20:13       ` George Anzinger
2000-11-11  3:56     ` Peter Samuelson
2000-11-11  5:31       ` Chmouel Boudjnah
2000-11-11  7:30         ` Peter Samuelson

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=3A0C2813.E7CB42D2@mvista.com \
    --to=george@mvista.com \
    --cc=karrde@callisto.yi.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@cyclades.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