[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kernel upgrade options



on 05 Nov 99, Matthew Gregan wrote...

>
>On Thu, Nov 04, 1999 at 06:07:31PM +0000, John wrote:
>
>> I've obtained patches 2 to 5 but now have a problem in applying them.
>> My /usr/src had only 'kernel-sources-2.2.1' (and the .tar.gz source which
>> I'm leaving there for the time being) until I moved 'patch-2.2.xx' from the
>> download site.
>> When I do 'zcat patch2.gz | patch -p0' I get:-
>
>Cd into your kernel source dir, and use '-p1' instead.
>
I couldn't get this to work. My patches were in /usr/src and I got 'no such
file or directory', so I moved them into the kernel source dir. and did -p0
thinking that should be right. No luck, so I did -p1 - there was action, but
only 33 times 'Hunk xx failed at xxxx'  and quite a few 'succeeded' at
xxxx with fuzz 1 or 2 and a final line 'patch: **** malformed patch at line
2121: s'.

After looking at the .rej's, which were enlightening but not helpful with 
the problem, and not finding anything else to guide me, I tried to apply 
patch 3 expecting some message indicating it was out of order. It, in
fact, worked partially and said '2 out of 11 hunks failed'. Emboldened,
I did patch 4 ( '1 out of 2 failed') and then 5 which seemed OK except
for a final 'malformed patch at line 146'.

There was no real result from the exercise other than a lot of new
knowledge. My 2.2.1 came from a Debian Official CD and the patches
from ftp.kernel.org (no apparent problem with the download), so I
presume my difficulty lies elsewhere.

>> I discover the quoted lines are the first three text lines of the patch,
>> and the fourth is I presume machine instructions viz,
>>       @@-1403,6 +1403,13@@
>
>These numbers are actually line numbers - it's telling patch the general
>location of where to look in the file. I think the format is like this:
>
>- look at line 1403
>- 6 lines are to be removed
>- look at the new line 1403
>- 13 lines are to be added
>
>Someone please correct me if I messed that up. :-)
>
Thank you - I've had a look, and think I can see what is being done.
I don't understand the technicalities but can what is being changed.

>> Can anyone help - I feel I understand what is required generally,=20
>> but not specifically. Is it that I don't have a directory called
>> Linux in /usr/src? (everything I read seems to assume I have)
>> I don't mind messing-up things and having to reinstall, but it
>> wouldn't help I'd still not be able to apply patches.=20
>
>You could rename your kernel-source-2.2.1 to whatever the patch is
>expecting and run patch again with the arguments you used, but you are
>better off to cd into the the dir and use '-p1', since everybody seems
>to have different names for their top level directory. :-)
>
My problem here is that I do not know what the patch is expecting. If
I renamed to 'Linux-2.2.1' would it affect other things, maybe creating
more difficulties? 

Another mystery to me arises from the fact that the command lines
suggested in all the literature I've seem do not appear to say what
is to be patched. Yet, according to O'Reilly's Linux in a Nutshell it's
based on 'patch [options] [original [patchfile]].

Any suggestions where I should stumble next? Will the patches still be
OK after what I've tried so far. My installation is appears undamaged 
 - seems indestructible.

Grateful for any help. I could, despite the online time involved, 
download 2.2.13 but would learn nothing further here and would
have to face the problem later 2.4 if I want to keep up to date.

Regards.


Reply to: