3

I have unpacked the source code of efivar-0.23.tar.gz and trying to apply the following patch: http://patchwork.openembedded.org/patch/117073/ to be able to compile it.

I have entered the unpacked directory, and issued the following command: patch -Np1 ../efivar.patch, but nothing is happening. It just waits (like it is doing something, but nothing is happening).

How is it possible to apply this patch? I was looking through different articles on the net, but the result seems to be the same..

2 Answers 2

6

The patch command expects the Patch at stdin. So either pipe the patch into the command:

patch -Np1 < ../efivar.patch

or specify the input file with the -i argument.

patch -Np1 -i ../efivar.patch

As you can see, the first diff is from file a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch. Let's assume the actual relativ-file path is efivar/0001-efivar-fix-for-cross-compile.patch from your current working directory. Then you have to tell patch to ignore the first 4 directory levels, so it can find the files to patch. You do this by saying p4 instead of p1.

0
0

Alternatively, since the patch in question was created with Git, you could use Git to apply it:

curl patchwork.openembedded.org/patch/117073/mbox/ | git am

Or:

curl patchwork.openembedded.org/patch/117073/raw/ | git apply

How do patches work in Git?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .