Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is from here.

Extract the patch

tar -xvzf /usr/src/web100-2.5.22-200810130047.tar.gz

bzip2 web100/ web100-2.6.27-2.5.22-200810130047.patch

Test the patch

bzip2 -dc /usr/src/linux/web100/ web100-2.6.27-2.5.22-200810130047.patch.bz2 | patch -p1 --dry-run

I looked at the .patch, the diff output of many files and the file .patch.bz2 after the bzip2 command which is too also the diff output of many files, they seem to be the same. My question is why is bzip2 even needed to turn the .patch into a .patch.bz2? Is it for the redirection to std output from the -dc option for the patch command? Even if it is, why not just not just use the patch command in the form something like this:patch -p1 < patchfile? I don't see why the bzip2 is done here. Thanks!

Also, I think the bzip2 might have an extra space in the command after web100/, right?

share|improve this question
    
Yeah, those instructions seem pretty messed up. It could definitely use some loving. –  Shawn J. Goff Mar 19 '11 at 13:11

1 Answer 1

up vote 2 down vote accepted

It's unneeded. Those instructions could be abbreviated to:

tar -xvzf /usr/src/web100-2.5.22-200810130047.tar.gz
patch -p1 --dry-run < web100/ web100-2.6.27-2.5.22-200810130047.patch
share|improve this answer
    
hmm, ok. i was stumped for a while. A few different sites actually all had this version. Thanks for the abbreviated version! –  user5887 Mar 19 '11 at 13:55
    
Note that you'll need to remove '--dry-run' to actually apply the patch –  Frederik Deweerdt Mar 19 '11 at 18:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.