* Patch generation
@ 2000-11-09 22:46 Ivan Passos
2000-11-09 22:56 ` Chmouel Boudjnah
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ivan Passos @ 2000-11-09 22:46 UTC (permalink / raw)
To: Linux Kernel List
Hello,
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??
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.).
Thanks in advance for your help.
Later,
Ivan
-
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/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Patch generation 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 2 siblings, 0 replies; 10+ messages in thread From: Chmouel Boudjnah @ 2000-11-09 22:56 UTC (permalink / raw) To: Ivan Passos; +Cc: Linux Kernel List Ivan Passos <lists@cyclades.com> writes: > 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?? > 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.). use the dontdiff file from tigran with -X option of diff at : http://www.moses.uklinux.net/patches/dontdiff -- MandrakeSoft Inc http://www.chmouel.org --Chmouel - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 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 2 siblings, 0 replies; 10+ messages in thread From: Infamous Woodchuck @ 2000-11-09 22:57 UTC (permalink / raw) To: Ivan Passos; +Cc: Linux Kernel List 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?? > > 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 are running the correct command for diff, you are just not running 'make mrproper' to clean your source tree before diffing. :) Jeff - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 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 2 siblings, 1 reply; 10+ messages in thread From: Dan Aloni @ 2000-11-09 23:08 UTC (permalink / raw) To: Ivan Passos; +Cc: Linux Kernel List 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. -- Dan Aloni dax@karrde.org - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 2000-11-09 23:08 ` Dan Aloni @ 2000-11-10 16:53 ` George Anzinger 2000-11-10 19:46 ` Dan Aloni 2000-11-11 3:56 ` Peter Samuelson 0 siblings, 2 replies; 10+ messages in thread From: George Anzinger @ 2000-11-10 16:53 UTC (permalink / raw) To: Dan Aloni; +Cc: Ivan Passos, Linux Kernel List 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 2000-11-10 16:53 ` George Anzinger @ 2000-11-10 19:46 ` Dan Aloni 2000-11-10 20:13 ` George Anzinger 2000-11-11 3:56 ` Peter Samuelson 1 sibling, 1 reply; 10+ messages in thread From: Dan Aloni @ 2000-11-10 19:46 UTC (permalink / raw) To: George Anzinger; +Cc: Ivan Passos, Linux Kernel List On Fri, 10 Nov 2000, George Anzinger wrote: > > 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.) I know mcedit doesn't unlink (but mcedit kinda sucks), I think nedit doesn't unlink too. I prefer an editor that unlinks, since in most cases I don't want to modify the source trees that I'm not working on, so diff can do what it's supposed to do later. -- Dan Aloni dax@karrde.org - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 2000-11-10 19:46 ` Dan Aloni @ 2000-11-10 20:13 ` George Anzinger 0 siblings, 0 replies; 10+ messages in thread From: George Anzinger @ 2000-11-10 20:13 UTC (permalink / raw) To: Dan Aloni; +Cc: Ivan Passos, Linux Kernel List Dan Aloni wrote: > > On Fri, 10 Nov 2000, George Anzinger wrote: > > > > 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.) > > I know mcedit doesn't unlink (but mcedit kinda sucks), I think nedit > doesn't unlink too. > > I prefer an editor that unlinks, since in most cases I don't want to > modify the source trees that I'm not working on, so diff can do what it's > supposed to do later. Oh, I agree, but I am working on several things at once so my development trees are cascaded, usually with a kgdb patch in all of them. If I make a change to kgdb, for example, it would be nice to only have to change it once, so occasionally, I want to do it differently. 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 2000-11-10 16:53 ` George Anzinger 2000-11-10 19:46 ` Dan Aloni @ 2000-11-11 3:56 ` Peter Samuelson 2000-11-11 5:31 ` Chmouel Boudjnah 1 sibling, 1 reply; 10+ messages in thread From: Peter Samuelson @ 2000-11-11 3:56 UTC (permalink / raw) To: George Anzinger; +Cc: Dan Aloni, Ivan Passos, Linux Kernel List [Dan Aloni] > > 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 That works, but see http://bugs.debian.org/64958 for my variant: a fairly trivial diff diff that adds a flag '-k' which lets you specify your backup suffix, then it just takes one file|dir instead of two. diff -urN -Xdontdiff -k.orig {source-tree} It's been sent to Paul Eggert (of diffutils); no word so far. [George Anzinger] > (I prefer EMACS, which likes to unlink.) No it doesn't, not always. Your choice: (setq make-backup-files nil) (setq backup-by-copying t) Peter - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 2000-11-11 3:56 ` Peter Samuelson @ 2000-11-11 5:31 ` Chmouel Boudjnah 2000-11-11 7:30 ` Peter Samuelson 0 siblings, 1 reply; 10+ messages in thread From: Chmouel Boudjnah @ 2000-11-11 5:31 UTC (permalink / raw) To: Peter Samuelson Cc: George Anzinger, Dan Aloni, Ivan Passos, Linux Kernel List Peter Samuelson <peter@cadcamlab.org> writes: > > (I prefer EMACS, which likes to unlink.) > No it doesn't, not always. Your choice: > (setq make-backup-files nil) > (setq backup-by-copying t) i would recommend to use the orig.el[1] from frederic.lepied with Emacs, it save any files before editing with a particuliar prefix and you can generate the patch with the gendiff script (included with rpm). Footnotes: [1] ftp://ftp.chmouel.org/pub/people/chmou/orig.el -- MandrakeSoft Inc http://www.chmouel.org --Chmouel - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Patch generation 2000-11-11 5:31 ` Chmouel Boudjnah @ 2000-11-11 7:30 ` Peter Samuelson 0 siblings, 0 replies; 10+ messages in thread From: Peter Samuelson @ 2000-11-11 7:30 UTC (permalink / raw) To: Chmouel Boudjnah Cc: George Anzinger, Dan Aloni, Ivan Passos, Linux Kernel List [Chmouel Boudjnah <chmouel@mandrakesoft.com>] > i would recommend to use the orig.el[1] from frederic.lepied with > Emacs, it save any files before editing with a particuliar prefix I'll take a look, thanks. > and you can generate the patch with the gendiff script (included with > rpm). I did not know about gendiff (as a Debian user I rarely use RPM). Anyway I prefer my patch[2] as it's more flexible. gendiff doesn't let you pass in other diff options (true, many are not useful in this context but think about -d, -p, -b and -U). Peter [2] again, http://bugs.debian.org/64958 - 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/ ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2000-11-11 7:31 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox