Everything you would like to know about LINUX and *nix enviroments can be found here.
HomeCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in
To all Members old and new...... After 5 years of being at a stand still, I am happy to announce that this forum will be back up and running at full force with in the next month. I have to get a hold of Triad, but once I do, we should be going as normal again. Bare with us on this transition, there is a lot of information that we will need to change/update as to the change in the systems since we last did this site. You will notice a LOT of changes on this site in the near future, stay tuned for all the exciting changes that will be done!! {Saturn}


 Applying a patch

Go down 

Male Number of posts : 56
Age : 48
Location : USA-Indiana
Job/hobbies : Audio/Video Tech -and- Computer Tech
Registration date : 2008-11-17

Applying a patch Empty
PostSubject: Applying a patch   Applying a patch Icon_minitimeTue Nov 18, 2008 1:09 am

HOWTO Apply a Patch
The first step is to run man patch, to see a little bit about the patch command itself. There's also a fine (quick) summary of using patch to update kernel source in the Kernel-HOWTO

Here's an even quicker, more general summary.

Most patches apply changes to a directory tree; for kernel patches, they're applied to ./linux which assumes this directory is in /usr/src. You'll need to change the current directory to the correct spot (for the kernel, for instance, /usr/src).

If your patch is compressed (indicated by a .gz extension), you want to feed the patch program the uncompressed form. You can do this via a pipe:

I prefer to always use the -s flag. It suppresses the normal output of patch and only displays anything if there is an error or problem with the patch. It is a lot easier to identify a problem if the amount of irrelevant noise is reduced.

zcat patchfile.gz | patch -sp0
If your patch is not compressed, you can use input/output redirection to accomplish the patch:

patch -sp0 < patchfile
If the whitespaces in the patch you have got reinterpreted or modified in anyway, patch will complain. Using the -l option gives patch more freedom in how it matches up whitespace in a line.

Sometimes, the patch may have been created with different top level directories. Alan Cox's ``ac'' kernel patches are often in this category. One solution to using these patches is to rename your directories to suit, but the better solution is to descend one directory (ie, cd /usr/src/linux and change the -p0 option to -p1.

Please note that this is a very short summary. See the man page for patch if anything looks strange.
Back to top Go down
View user profile
Applying a patch
Back to top 
Page 1 of 1
 Similar topics
» Video Tutorial - Applying Moss
» 1-2 second buzz when applying power to cold st-70

Permissions in this forum:You cannot reply to topics in this forum
LinuxLiNuXLINUX :: Howto's and Info-
Jump to: