Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/final-system/common/coreutils.xml

    r686839b r7f3c3e8  
    3535    <para os="c">Now prepare Coreutils for compilation:</para>
    3636
    37 <screen os="d"><userinput>FORCE_UNSAFE_CONFIGURE=1 \
    38   ./configure --prefix=/usr \
     37<screen os="d"><userinput>./configure --prefix=/usr \
    3938    --enable-no-install-program=kill,uptime \
    4039    --enable-install-program=hostname</userinput></screen>
    41    
    42     <variablelist os="d1">
    43       <title>The meaning of the configure options:</title>
    44      
    45         <varlistentry os="d2">
    46           <term><parameter>FORCE_UNSAFE_CONFIGURE=1</parameter></term>
    47           <listitem>
    48             <para>Forces Coreutils to compile when using the root user.</para>
    49           </listitem>
    50         </varlistentry>
    51 
    52       </variablelist>
    5340
    5441    <para os="e">Compile the package:</para>
     
    5845    <para os="g">The test suite of Coreutils makes several assumptions about the
    5946    presence of system users and groups that are not valid within the minimal
    60     environment that exists at the moment. Therefore, we will reuse the dummy
    61     groups and user created during Util-linux. Skip down to <quote>Install the
    62     package</quote> if not running the test suite and you did not create the
    63     dummy groups and users during Util-linux.</para>
    64 
    65    <para os="h">Now the test suite is ready to be run. First, run
     47    environment that exists at the moment. Therefore, additional items need
     48    to be set up before running the tests. Skip down to <quote>Install the
     49    package</quote> if not running the test suite.</para>
     50
     51    <para os="h">Create two <systemitem class="groupname">dummy</systemitem> groups
     52    and a <systemitem class="username">dummy</systemitem> user:</para>
     53
     54<screen os="i"><userinput>echo "dummy1:x:1000:" &gt;&gt; /etc/group
     55echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group
     56echo "dummy:x:1000:1000::/root:/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
     57
     58    <para os="j">Now the test suite is ready to be run. First, run
    6659    the tests that are meant to be run as user
    6760    <systemitem class="username">root</systemitem>:</para>
    6861
    69 <screen os="i"><userinput remap="test">make NON_ROOT_USERNAME=dummy</userinput></screen>
    70 
    71     <para os="j">The testsuite will now be run as the
     62<screen os="k"><userinput>make NON_ROOT_USERNAME=dummy check-root</userinput></screen>
     63
     64    <para os="l">The testsuite will now be run as the
    7265    <systemitem class="username">dummy</systemitem> user. Fix the permissions
    7366    for a few files to allow this:</para>
    7467
    75 <screen os="k"><userinput remap="test">chown -Rv dummy .</userinput></screen>
    76 
    77     <para os="l">Then run the remainder of the tests as the
     68<screen os="m"><userinput>chown -Rv dummy config.log {gnulib-tests,lib,src}/.deps</userinput></screen>
     69
     70    <para os="n">Then run the remainder of the tests as the
    7871    <systemitem class="username">dummy</systemitem> user:</para>
    7972
    80 <screen os="m"><userinput remap="test">su dummy -s /bin/bash \
    81     -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes -k check || true"</userinput></screen>
    82 
    83     <para os="n">When testing is complete, remove the
     73<screen os="o"><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
     74
     75    <para os="p">When testing is complete, remove the
    8476    <systemitem class="username">dummy</systemitem> user and groups:</para>
    8577
    86 <screen os="o"><userinput remap="test">sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
    87 
    88     <para os="p">Install the package:</para>
    89 
    90 <screen os="q"><userinput>make install</userinput></screen>
    91 
    92     <para os="r">Move programs to the locations specified by the FHS:</para>
    93 
    94 <screen os="s"><userinput>mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date} /bin
     78<screen os="q"><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
     79
     80    <para os="r">Install the package:</para>
     81
     82<screen os="s"><userinput>make install</userinput></screen>
     83
     84    <para os="t">Move programs to the locations specified by the FHS:</para>
     85
     86<screen os="u"><userinput>mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date} /bin
    9587mv -v /usr/bin/{dd,df,echo,false,hostname,ln,ls,mkdir,mknod} /bin
    9688mv -v /usr/bin/{mv,pwd,rm,rmdir,stty,true,uname} /bin
    9789mv -v /usr/bin/chroot /usr/sbin</userinput></screen>
    98 
    99     <para os="t">Other Coreutils programs are used by some of the scripts
    100     in the CLFS-Bootscripts package. As <filename
    101     class="directory">/usr</filename> may not be available during the early
    102     stages of booting, those binaries need to be on the root partition:</para>
    103 
    104 <screen os="u"><userinput>mv -v /usr/bin/{[,basename,head,install,nice} /bin
    105 mv -v /usr/bin/{readlink,sleep,sync,test,touch} /bin
    106 ln -svf ../../bin/install /usr/bin</userinput></screen>
    10790
    10891  </sect2>
     
    121104        echo, env, expand, expr, factor, false, fmt, fold, groups, head,
    122105        hostid, hostname, id, install, join, link, ln, logname, ls, md5sum,
    123         mkdir, mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste,
    124         pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm,
    125         rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum,
    126         sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum,
    127         sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort,
    128         tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and yes</seg>
     106        mkdir, mkfifo, mknod, mktemp, mv, nice, nl, nohup, od, paste, pathchk,
     107        pinky, pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, runcon, seq,
     108        sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf,
     109        sleep, sort, split, stat, stdbuf, stty, sum, sync, tac, tail, tee, test,
     110        timeout, touch, tr, true, truncate, tsort, tty, uname, unexpand, uniq,
     111        unlink, users, vdir, wc, who, whoami, and yes</seg>
    129112        <seg>libstdbuf.so</seg>
    130113        <seg>/usr/lib/coreutils</seg>
     
    644627      </varlistentry>
    645628
    646       <varlistentry id="nproc">
    647         <term><command>nproc</command></term>
    648         <listitem>
    649           <para>Prints the number of processing units available to the current
    650           process</para>
    651           <indexterm zone="ch-system-coreutils nproc">
    652             <primary sortas="b-nproc">nproc</primary>
    653           </indexterm>
    654         </listitem>
    655       </varlistentry>
    656 
    657       <varlistentry id="numfmt">
    658         <term><command>numfmt</command></term>
    659         <listitem>
    660           <para>Converts numbers to or from human-readable strings</para>
    661           <indexterm zone="ch-system-coreutils numfmt">
    662             <primary sortas="b-numfmt">numfmt</primary>
    663           </indexterm>
    664         </listitem>
    665       </varlistentry>
    666 
    667629      <varlistentry id="od">
    668630        <term><command>od</command></term>
     
    765727          <indexterm zone="ch-system-coreutils readlink">
    766728            <primary sortas="b-readlink">readlink</primary>
    767           </indexterm>
    768         </listitem>
    769       </varlistentry>
    770 
    771       <varlistentry id="realpath">
    772         <term><command>realpath</command></term>
    773         <listitem>
    774           <para>Prints the resolved path</para>
    775           <indexterm zone="ch-system-coreutils realpath">
    776             <primary sortas="b-realpath">realpath</primary>
    777729          </indexterm>
    778730        </listitem>
Note: See TracChangeset for help on using the changeset viewer.