Dear List,
I would like to ask you what is the procedure I should follow to prepare a patch suitable to be added to the fedora build process.
What are the options I should give to diff command, exactly?
I've tried to do two copies of the kernel tree (kernel.orig and kernel.new), change the new one and then generate a patch using
diff -uNrp
The procedure I've used is essentially what is described here http://fedoraproject.org/wiki/Docs/CustomKernel
But, when the build process reaches my patch it stops and asks me "File to patch:"
Can anyone gimme a pointer where I can find the complete info on this procedure, or help me figure out where I went sideways on this..?
Thanks in advance for your kind help
Best, Oliveiros
On Mon, 21 Apr 2008 23:30:07 +0100, "Oliveiros Cristina" oliveiros.cristina@gmail.com wrote:
diff -uNrp
What were the other arguments?
The procedure I've used is essentially what is described here http://fedoraproject.org/wiki/Docs/CustomKernel
But, when the build process reaches my patch it stops and asks me "File to patch:"
Looks like you need to make sure patch -p1 can apply it. Look at the pathnames inside the resultng patch and make sure the number of slashes is the same as in other patches.
-- Pete
Hello, Pete. Thank you for your prompt reply.
I guess I understand your explanation. For ex, the first line of the patch is as follows : diff -uNrp kernel-2.6.24.orig/linux-2.6.24.i686/include/linux/tipc_config.h k ernel-2.6.24.new/linux-2.6.24.i686/include/linux/tipc_config.h
and, yes, there are an extra slash here. p2 would be needed
The full diff command I've used was
diff -uNrp kernel-2.6.x.orig kernel-2.6.x.new > ../SOURCES/linux-2.6-my-new-patch.patch
But I guess I should have rather used
diff -uNrp kernel-2.6.x.orig/linux-2.6.24.i686 kernel-2.6.x.new/linux-2.6.24-i686 > ../SOURCES/linux-2.6-my-new-patch.patch
Do you agree with me?
I will try this to see what happens.
Thanks a million for your tip, Pete
Best, Oliveiros
2008/4/22, Pete Zaitcev zaitcev@redhat.com:
On Mon, 21 Apr 2008 23:30:07 +0100, "Oliveiros Cristina" < oliveiros.cristina@gmail.com> wrote:
diff -uNrp
What were the other arguments?
The procedure I've used is essentially what is described here http://fedoraproject.org/wiki/Docs/CustomKernel
But, when the build process reaches my patch it stops and asks me "File
to
patch:"
Looks like you need to make sure patch -p1 can apply it. Look at the pathnames inside the resultng patch and make sure the number of slashes is the same as in other patches.
-- Pete
On Tue, 22 Apr 2008 00:49:04 +0100, "Oliveiros Cristina" oliveiros.cristina@gmail.com wrote:
diff -uNrp kernel-2.6.24.orig/linux-2.6.24.i686/include/linux/tipc_config.h kernel-2.6.24.new/linux-2.6.24.i686/include/linux/tipc_config.h
Exactly, this causes the error you reported.
But I guess I should have rather used
diff -uNrp kernel-2.6.x.orig/linux-2.6.24.i686 kernel-2.6.x.new/linux-2.6.24-i686 > ../SOURCES/linux-2.6-my-new-patch.patch
No, it has to be: diff -uNrp linux-2.6.24.i686.orig linux-2.6.24-i686.new
When you run rpmbuild -bp it creates an extra level, but that's done because this is how RPMs are done. But patches we apply are compatible with upstream format, that's why there's a mismatch.
-- Pete
The best plan is to use whatever directory organization floats your boat, and then massage the patches. Start with 'yum install patchutils'.
Then usually you want something like
diff -rpuNB --exclude={'*~','*.orig'} kernel-2.5.24{.orig,} | filterdiff --remove-timestamps --strip=2 --addprefix=linux-2.6/ > foo
Enjoy, Roland
kernel@lists.fedoraproject.org