You apply patches from the top-level directory of the source code.
In other words, when you un-tarred the source code (for instance bash-2.05a), the book assumes you immediately "cd" into the directory tar created for you. Then you patch the source code from there. A sequence similar to:
cd /mnt/lfs/static/src
tar xvjf /mnt/lfs/packages/bash-2.05a.tar.bz2
cd bash-2.05a
patch -Np1 -i ../bash-2.05a.patch
Of course, your path will be different, and bash is used only as an example (I don't think it has any patches). When patch runs, it will ask you for the path if it cannot find the file it's supposed to fix, or if the contents of the file do not match what it expects. It usually means you're in the wrong directory, or you don't have the version of the source the patch is meant for.
|