GCC, Linux Kernel, and PALO are already unpacked.
The only two required packages we need to worry about are binutils and glibc (which turns out to be rather complicated).
Already in the src directory, we can do:
tar zxvf $ST/orig/binutils_2.13.90.0.4.orig.tar.gz
tar zxvf $ST/orig/glibc_2.2.5.orig.tar.gz
cd binutils-2.13.90.0.4/
bzip2 -d binutils-2.13.90.0.4.tar.bz2
tar xvf binutils-2.13.90.0.4.tar
Now unpack the updates
gzip -d $ST/orig/binutils_2.13.90.0.4-1.diff.gz
cd binutils-2.13.90.0.4
patch -p1 < $ST/orig/binutils_2.13.90.0.4-1.diff
Run through all the patches by hand, since they have XXX numbers on the font, they will order properly with *
for i in ./debian/patches/*; do patch -p1 < $i; done;
Set aside the binutils directory and erase the rest.
cd ..
mv binutils-2.13.90.0.4 ../binutils
cd ..
(Should be in $ST/src now)
rm -rf binutils-2.13.90.0.4/
Now onto glibc:
cd glibc-2.2.5.orig
bzip2 -d *.bz2
tar xvf glibc-2.2.5.tar
cd glibc-2.2.5
tar xvf ../glibc-linuxthreads-2.2.5.tar
tar xvf ../db1-addon-2.1.3.tar
gzip -d $ST/orig/glibc_2.2.5-15.diff.gz
patch -p1 < $ST/orig/glibc_2.2.5-15.diff
Time to run the glibc patches through.
Make sure that the file ./debian/patches/0list does not have a "#" in front of the "glibc-hppa" line if it does then remove the hash.
Another little frob before we run all the patches
chmod u+x ./debian/patches/*.dpatch
Making sure you are in the main glibc directory ($ST/src/glibc-2.2.5.orig/glibc-2.2.5) and the ./debian/patches directory is under you, issue the following to apply the patches:
for i in `cat ./debian/patches/0list`;\
do ./debian/patches/$i.dpatch -patch .; done;
Now we are done patching glibc.
Finishing it all off we move glibc-2.2.5 into glibc for easier naming convention.
cd ..
mv glibc-2.2.5 ../glibc
cd ..
rm -rf glibc-2.2.5.orig