Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This was 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.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
  1. Correct, there does appear to be an extra space character in web100/ web100 that should not be there and will break the command.
  2. I agree, there appears to be no obvious reason for using bzip2 in the example. Normally one would just do patch -p1 < ../my.patch.

Have you considered getting in contact with the authors of that webpage and letting them know that they can simplify the instructions?

share|improve this answer
    
I've seen quite a few tutorials that do this. For example: (ck.wikia.com/wiki/WalkThrough), (howtoforge.com/kernel_compilation_ubuntu) and (howtoforge.com/…) Is there a particular reason why? –  user12657 Mar 19 '11 at 13:19
add comment

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.