On 10/26/2010 09:44 PM, Bruce Dubbs wrote:
> Drew Ames wrote:
> 
>> Now I have another question. How do I make the patch in the link above
>> into a .patch file that I can apply?
>>
>> Do I fill out the Submitted By, Date, Initial Package Version,
>> Upstream Status, Origin, and Description, at the top, paste in the
>> information from the link starting at the line with the diff command,
>> and then give it all a .patch extension?
> 
> You need an original and a modified version:
> 
> diff -u modified orig > name.patch
> 
> Then edit the patch to add the other info at the top.  The 'orig' and 
> 'modified' are generally the package top level directory as in:
> 
> orig:
>    file.c
> 
> modified:
>    file.c
> 
>    -- Bruce

Generaly the process is as follows:

{{{
tar -xf package-1.2.3.tar.gz
cp -R package-1.2.3/ package-1.2.3-orig
cd package-1.2.3
patch -Np1 -i patchfile
# from affected directory (typical for svn or git diffs as usually
# p1 is a/ and b/)
cd ..
diff -Naurp package-1.2.3-orig/ package-1.2.3/ > \
    package-1.2.3-fixes_something_bad-1.patch
vi package-1.2.3-fixes_something_bad-1.patch
}}}

Then just add needed header information (copy from an existing patch and
modify as needed). The p flag in the diff command is not required, and
not mentioned in the editors guide (at least last time I checked
probably about 5 years ago), but is a nice to have addition if you later
have to manually apply against a different version.

-- DJ Lucas

-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to