Installing Coreutils-&coreutils-version; The Coreutils package contains utilities for showing and setting the basic system characteristics. Estimated build time: &coreutils-time; Estimated required disk space: &coreutils-compsize; &aa-coreutils-down; &aa-coreutils-dep;    Installation of Coreutils Normally the functionality of uname is somewhat broken, in that the -p switch always returns "unknown". The following patch fixes this behaviour for Intel architectures: patch -Np1 -i ../&coreutils-uname-patch; We do not want Coreutils to install its version of the hostname program, because it is inferior to the version provided by Net-tools. Prevent its installation by applying a patch: patch -Np1 -i ../&coreutils-hostname-patch; Now prepare Coreutils for compilation: ./configure --prefix=/usr Compile the package: make The su program from Coreutils wasn't installed in Chapter 5 because it needed root privilege to do so. We're going to need it in a few moments for the test suite. Therefore we work around the problem by installing it now: make install-root This package has a test suite available which can perform a number of checks to ensure it built correctly. However, this particular test suite makes some assumptions with regards to the presence of non-root users and groups that don't apply this early into the LFS build. We therefore create a dummy system user and two dummy groups to allow the tests to run properly. Should you choose not to run the test suite, skip down to "Install the package". The following commands will prepare us for the test suite. Create two dummy groups and a dummy user name: echo "dummy1:x:1000" >> /etc/group echo "dummy2:x:1001:dummy" >> /etc/group echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd Some tests are meant to run as root: make check-root The remainder of the tests are run as the dummy user: su dummy -c "make RUN_EXPENSIVE_TESTS=yes check" Remove the dummy groups and user name: sed -i.bak '/dummy/d' /etc/passwd /etc/group Install the package: make install And move some programs to their proper locations: mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin mv /usr/bin/{date,echo,false,head,install,ln,ls} /bin mv /usr/bin/{mkdir,mknod,mv,pwd,rm,rmdir,sync} /bin mv /usr/bin/{sleep,stty,su,test,touch,true,uname} /bin mv /usr/bin/chroot /usr/sbin We'll be using the kill program from the Procps package (installed as /bin/kill later in the chapter). Remove the one installed by Coreutils: rm /usr/bin/kill Finally, create a few necessary symlinks: ln -s test /bin/[ ln -s ../../bin/install /usr/bin &aa-coreutils-shortdesc; &aa-coreutils-desc;