Estimated build time: 1 minute Estimated required disk space: 2 MB
Install Patch by running the following commands:
./configure --prefix=$LFS/usr && make LDFLAGS=-static && make install
The Patch package contains the patch program.
The patch program modifies a file according to a patch file. A patch file usually is a list created by the diff program that contains instructions on how an original file needs to be modified. Patch is used a lot for source code patches since it saves time and space. Imagine a package that is 1MB in size. The next version of that package only has changes in two files of the first version. It can be shipped as an entirely new package of 1MB or just as a patch file of 1KB which will update the first version to make it identical to the second version. So if the first version was downloaded already, a patch file avoids a second large download.
Patch-2.5.4 needs the following to be installed:
sh from the bash package
as from the binutils package
ld from the binutils package
cmp from the diffutils package
chmod from the fileutils package
cp from the fileutils package
mv from the fileutils package
rm from the fileutils package
cc from the gcc package
egrep from the grep package
grep from the grep package
make from the make package
sed from the sed package
basename from the sh-utils package
expr from the sh-utils package
uname from the sh-utils package
cat from the textutils package
tr from the textutils package