| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 | <sect2><title> </title><para> </para></sect2><sect2><title>Installation of Coreutils</title><para>Normally the functionality of <userinput>uname</userinput> is somewhatbroken, in that the <userinput>-p</userinput> switch always returns "unknown".The following patch fixes this behaviour for Intel architectures:</para><para><screen><userinput>patch -Np1 -i ../coreutils-&coreutils-uname-patch-version;.patch</userinput></screen></para><para>We do not want Coreutils to install its version of the<userinput>hostname</userinput> program, because it is inferior to the versionprovided by Net-tools. Prevent its installation by applying a patch:</para><para><screen><userinput>patch -Np1 -i ../coreutils-&coreutils-hostname-patch-version;.patch</userinput></screen></para><para>Now prepare Coreutils for compilation:</para><para><screen><userinput>./configure --prefix=/usr</userinput></screen></para><para>Compile the package:</para><para><screen><userinput>make</userinput></screen></para><para>This package has a test suite available which can perform a number ofchecks to ensure it built correctly. However, this particular test suite makessome assumptions that aren't quite vaild at this early stage of Chapter 6. Wetherefore make a few adjustments to allow the tests to run properly. Should youchoose not to run the test suite, skip down to "Install the package". Thefollowing commands will prepare us for the test suite. Create two dummy groupsand a dummy user name:</para><para><screen><userinput>echo "dummy1:x:1000" >> /etc/groupecho "dummy2:x:1001:dummy" >> /etc/groupecho "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd</userinput></screen></para><para>The <userinput>su</userinput> program from Coreutils wasn't installed inChapter 5 because it needed <emphasis>root</emphasis> privilege to install. Wework around this problem by installing it now:</para><para><screen><userinput>make install-root</userinput></screen></para><para>Some tests are meant to run as <emphasis>root</emphasis>:</para><para><screen><userinput>make check-root</userinput></screen></para><para>The remainder of the tests are run as the <emphasis>dummy</emphasis>user:</para><para><screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen></para><para>Remove the dummy groups and user name:</para><para><screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen></para><para>Install the package:</para><para><screen><userinput>make install</userinput></screen></para><para>And move some programs to their proper locations:</para><para><screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /binmv /usr/bin/{dir,dircolors,du,date,echo,false,head} /binmv /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /binmv /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /binmv /usr/bin/{touch,true,uname,vdir} /binmv /usr/bin/chroot /usr/sbin</userinput></screen></para><para>Finally, create a few necessary symlinks:</para><para><screen><userinput>ln -s test /bin/[ln -s ../../bin/install /usr/bin</userinput></screen></para></sect2>
 |