LinuxLiNuXLINUX

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}

Share | 
 

 Applying a patch

View previous topic View next topic Go down 
AuthorMessage
{Saturn}
Admin
avatar

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

PostSubject: Applying a patch   Tue 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 http://linuxlinuxlinux.boardsmessage.com
 
Applying a patch
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» 1/4 Panel Lower Fiberglass/Steel Patch Panels
» Starcraft 2 patch 1.5 Impressions
» my game is not update after 2day patch? s4
» Glorified Nine Patch?
» Large white patch on l144

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