bug-bash
[Top][All Lists]
Advanced

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

Re: Problems applying patches


From: Chet Ramey
Subject: Re: Problems applying patches
Date: Wed, 19 Nov 2008 09:13:30 -0500
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Dan wrote:

> I'm a bit of newbie when it comes to patching Linux software, and I have
> been having trouble applying the patches for Bash for ages.
> 
> I noticed a long time ago that the destination directory names in the
> patch files vary between the patches, so having read the help for the
> patch program, my initial thought was to use -p2 with it. However,
> recently, I found a posting by Chet mentioning that they had to be
> applied using the -p0 option to the patch program.

The target directory name prefix is always the same -- null, or the
current directory.  That's why the patches have to be applied in the
source directory.  The `original' source directory prefix changes
occasionally, though it is usually `../bash-3.2-patched', but patch
doesn't care about that.

> 
> Finally, yesterday, I managed to get something working, which I've
> presented below, at the bottom of this posting.
> 
> However, the patched code fails to compile (details below - see my
> question 2).

I'm not sure why `make' didn't rebuild y.tab.c, since one of the patches
updated parse.y.

> Questions:
> 1) Does my guide (see below) for applying the patches make sense? I
> couldn't see any other way to make this work without creating the
> symbolic links and using the -p0 option as recommended by Chet. The
> steps in the guide work on both Fedora 9 and Asus Eee PC Xandros, i.e.
> patch does not give any errors or warnings on either.

In general, I don't use those systems, but I ran something similar to

for f in $(seq -w 01 33); do patch -p0 < /path/to/patches/bash32-0$f; done

on RHE3 without errors, compiled that version, ran

for f in $(seq -w 34 39); do patch -p0 < /path/to/patches/bash32-0$f; done

and ran `make' again.  The first thing it did was rebuild y.tab.c and went
on from there.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]