[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems applying patches
From: |
Dan |
Subject: |
Problems applying patches |
Date: |
Tue, 18 Nov 2008 19:09:19 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071031) |
Apologies if this is all "basic" or "dumb" and I hope this is the
correct mailing list.
Also, I tried posting this before but it doesn't appear to have worked,
so I'm trying again. Apologies for any duplication.
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.
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).
Thanks in advance for any help.
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.
2) The build error I get is below (after running "make -k"):
make
***********************************************************
* *
* GNU bash, version 3.2.39(2)-release (i686-pc-linux-gnu)
* *
***********************************************************
rm -f y.tab.o
gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i686"'
-DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"i686-pc-linux-gnu"'
-DCONF_VENDOR='"pc"' -DLOCALEDIR='"/usr/local/share/locale"'
-DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include
-I./lib -g -O2 -c y.tab.c
/Users/chet/src/bash/src/parse.y: In function ‘decode_prompt_string’:
/Users/chet/src/bash/src/parse.y:4333: error: too few arguments to
function ‘expand_prompt_string’
make: *** [y.tab.o] Error 1
So the question is has my patch "procedure" broken the source code?
My "mini-guide" to applying Bash patches:
========================================================================
These instructions allow all the patches to be applied with no errors or
warnings.
0) Create a working directory to unpack the files into.
1) Download the Bash source code tar.gz from your favourite FTP site and
unpack into your working directory. A new "bash-3.2" directory will be
created by the tar utility.
2) Download the bash patches, and unpack them in a directory called
"bash-patches"
3) Create the following symbolic links in your working directory
ln -s bash-3.2 bash-3.2.16
ln -s bash-3.2 bash-20070510
ln -s bash-3.2 bash-3.2.25
ln -s bash-3.2 bash-20080214
ln -s bash-3.2 bash-3.2-patched
ln -s bash-3.2 bash-3.2.9
ln -s bash-3.2 bash-3.2.11
The reason for creating these symbolic links is as follows: it looks
like the patch developers used different destination directory names
when they created their patch files. This means that the patch program
may not be able to find the files to which it wants to apply a given
patch file. Creating these symbolic links is one way to ensure the patch
program can find the files it is trying to patch.
This list of symbolic links is exhaustive for patch files bash32-001 to
bash32-039 inclusive.
4) cd to bash-patches and run the folllowing command
for i in `ls bash32-*`; do echo -----------------------------------;
echo Applying patch file $i; patch -p0 < $i; sleep 5; echo; done;
If you wish, you can remove the sleep command - I only added it so I
could check that there were no errors or warnings from patch. The
patches should be applied with no errors or warnings.
=======================================================================
- Problems applying patches,
Dan <=