Page 1 of 1

Patch not working with Linux 3.14.30

PostPosted: Thu Jan 29, 2015 11:17 pm
by colin012
Ok, so here are the exct steps I took in order I took them:

Code: Select all
mkdir /usr/src/linux
cd /usr/src/linux
wget https://grsecurity.net/stable/grsecurity-3.0-3.14.30-201501272307.patch
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.30.tar.xz
mkdir ./linux-3.14.30
tar xf linux-3.14.30.tar.xz -C /usr/src/linux/linux-3.14.30
cd ./linux-3.14.30
patch -p1 < /usr/src/linux/grsecurity-3.0-3.14.30-201501272307.patch


Which seems to be perfect to me; I have the matching linux kernal extracted to a seperate folder with the matching patch. Still, I get a bajillion and a half errors/user prompts like this one:

Code: Select all
2 out of 2 hunks ignored
can't find file to patch at input line 12239
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/um/Makefile b/arch/um/Makefile
|index 36e658a..71a5c5a 100644
|--- a/arch/um/Makefile
|+++ b/arch/um/Makefile
--------------------------
File to patch:
Skip this patch? [y]


The fact is that I get so many of these that I have to hold down the enter key for about 5 minutes just to get through all of them so I can use my terminal again. I tried this with dry runs of different p values too (making sure to rm -r the directory, remake it, and re-extract the kernel to it again) and I keep getting the dame bajillion and a half errors. Anyone know what is causing this or what I did wrong?

Re: Patch not working with Linux 3.14.30

PostPosted: Thu Jan 29, 2015 11:25 pm
by spender
When you extracted the kernel tarball, I believe it was actually being extracted to /usr/src/linux/linux-3.14.30/linux-3.14.30. As the tarball will itself create the linux-3.14.30 directory, there's no need for you to create it yourself. A simple 'ls' in /usr/src/linux/linux-3.14.30 would have confirmed this.

-Brad

Re: Patch not working with Linux 3.14.30

PostPosted: Thu Jan 29, 2015 11:37 pm
by colin012
Doh! That fixed it. :oops: