![]() |
|
|
|||
|
Applying .diff patches to package sources
I am trying to apply a set of patches to the available package sources,
to give me the latest package source code. I have a set of source files as follows: netkit-telnet-0.17.tar.gz netkit-telnet_0.17-28.diff.gz netkit-telnet_0.17-32.diff.gz netkit-telnet_0.17-35.diff.gz I first gunzip the files: gunzip *.gz This gives me: netkit-telnet-0.17.tar netkit-telnet_0.17-28.diff netkit-telnet_0.17-32.diff netkit-telnet_0.17-35.diff I now extract the source tarball: tar xf netkit-telnet-0.17.tar This creates a subdirectory netkit-telnet-0.17 containing the source code for the original package. I now want to apply the .diff files: patch netkit-telnet_0.17-28.diff netkit-telnet-0.17 patch: **** read error : Is a directory I obviously typed the parameters here. What file should I be patching against? I tried patching the tar file and the raw .gz file, but both give me errors: patch netkit-telnet-0.17.tar.gz netkit-telnet_0.17-28.diff patching file netkit-telnet-0.17.tar.gz Hunk #1 FAILED at 7. 1 out of 1 hunk FAILED -- saving rejects to file netkit-telnet-0.17.tar.gz.rej can't find file to patch at input line 14 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |--- netkit-telnet-0.17.orig/telnet/defines.h |+++ netkit-telnet-0.17/telnet/defines.h -------------------------- File to patch: ^Z patch netkit-telnet-0.17.tar netkit-telnet_0.17-28.diff patching file netkit-telnet-0.17.tar Hunk #1 succeeded at 1065 (offset 1058 lines). can't find file to patch at input line 14 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |--- netkit-telnet-0.17.orig/telnet/defines.h |+++ netkit-telnet-0.17/telnet/defines.h -------------------------- File to patch: ^Z What should I be doing to patch the source code? Thanks in advance to anyone who can help. Mark. -- Mark Hobley, 393 Quinton Road West, Quinton, BIRMINGHAM. B32 1QE. |
|
|||
|
Re: Applying .diff patches to package sources
On Feb 18, 10:08 am, markhob...@hotpop.donottypethisbit.com (Mark
Hobley) wrote: > I am trying to apply a set of patches to the available package sources, > to give me the latest package source code. > > I have a set of source files as follows: > > netkit-telnet-0.17.tar.gz > netkit-telnet_0.17-28.diff.gz > netkit-telnet_0.17-32.diff.gz > netkit-telnet_0.17-35.diff.gz > > I first gunzip the files: > > gunzip *.gz > > This gives me: > > netkit-telnet-0.17.tar > netkit-telnet_0.17-28.diff > netkit-telnet_0.17-32.diff > netkit-telnet_0.17-35.diff > > I now extract the source tarball: > > tar xf netkit-telnet-0.17.tar > > This creates a subdirectory netkit-telnet-0.17 containing the source > code for the original package. > > I now want to apply the .diff files: > > patch netkit-telnet_0.17-28.diff netkit-telnet-0.17 > patch: **** read error : Is a directory > > I obviously typed the parameters here. What file should I be patching > against? > > I tried patching the tar file and the raw .gz file, but both give me > errors: > > patch netkit-telnet-0.17.tar.gz netkit-telnet_0.17-28.diff > patching file netkit-telnet-0.17.tar.gz > Hunk #1 FAILED at 7. > 1 out of 1 hunk FAILED -- saving rejects to file > netkit-telnet-0.17.tar.gz.rej > can't find file to patch at input line 14 > Perhaps you should have used the -p or --strip option? > The text leading up to this was: > -------------------------- > |--- netkit-telnet-0.17.orig/telnet/defines.h > |+++ netkit-telnet-0.17/telnet/defines.h > -------------------------- > File to patch: ^Z > > patch netkit-telnet-0.17.tar netkit-telnet_0.17-28.diff > patching file netkit-telnet-0.17.tar > Hunk #1 succeeded at 1065 (offset 1058 lines). > can't find file to patch at input line 14 > Perhaps you should have used the -p or --strip option? > The text leading up to this was: > -------------------------- > |--- netkit-telnet-0.17.orig/telnet/defines.h > |+++ netkit-telnet-0.17/telnet/defines.h > -------------------------- > File to patch: ^Z > > What should I be doing to patch the source code? > > Thanks in advance to anyone who can help. > > Mark. > > -- > Mark Hobley, > 393 Quinton Road West, > Quinton, BIRMINGHAM. > B32 1QE. I'm not sure what you are trying to do hence give some general pointers. To patch something in a directory X with a patch file in /Y.patch I will normally do: 1. Change dir to the directory X (eg: cd .../X) 2. Patch using the file eg: patch -p1 < /Y.patch |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|