aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/coreutils-inst.xml
blob: b9e287d0fbd86543f2bbfd6e1ab8fb850a681374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>

<sect2>
<title>Installation of Coreutils</title>

<para>Normally the functionality of <userinput>uname</userinput> is somewhat
broken, 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 version
provided 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 testsuite available which can perform a number of 
checks to ensure it built correctly.  Should you choose to run it, the 
following commands will do so:</para>

<para><screen><userinput>make check-root
make RUN_EXPENSIVE_TESTS=yes check</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} /bin
mv /usr/bin/{dir,dircolors,du,date,echo,false,head} /bin
mv /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /bin
mv /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /bin
mv /usr/bin/{touch,true,uname,vdir} /bin
mv /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>