Changeset dd08c1b


Ignore:
Timestamp:
Mar 2, 2014, 11:00:33 AM (10 years ago)
Author:
William Harrington <kb0iic@…>
Branches:
clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
f29235b
Parents:
3d99dc7
Message:

Fix test suite commands for proper utilization of the nobody user and use the dummy group only for coreutils.

Location:
BOOK/final-system
Files:
2 edited

Legend:

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

    r3d99dc7 rdd08c1b  
    5656<screen os="f"><userinput>make</userinput></screen>
    5757
    58     <para os="g">The test suite of Coreutils makes several assumptions about the
    59     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
     58   <para os="g">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=nobody check-root</userinput></screen>
    70 
    71     <para os="j">The testsuite will now be run as the
    72     <systemitem class="username">nobody</systemitem> user. Fix the permissions
    73     for a few files to allow this:</para>
    74 
    75 <screen os="k"><userinput remap="test">chown -Rv nobody .</userinput></screen>
    76 
    77     <para os="l">Then run the remainder of the tests as the
     62<screen os="h"><userinput remap="test">make NON_ROOT_USERNAME=nobody check-root</userinput></screen>
     63
     64    <para os="i">The testsuite will now be run as the
     65    <systemitem class="username">nobody</systemitem> user. Some tests require
     66    that the user be a member of more than one group. Add a temporary group
     67    and make the user <systemitem class="username">nobody</systemitem> a part
     68    of it so that the tests are not skipped:</para>
     69
     70<screen os="j"><userinput remap="test">echo "dummy:x:1000:nobody" >> /etc/group</userinput></screen>
     71
     72    <para os="k">Fix permissions of some files so the non-root user can compile
     73    and run the tests:</para>
     74
     75<screen os="l"><userinput remap="test">chown -Rv nobody .</userinput></screen>
     76
     77    <para os="m">Then run the remainder of the tests as the
    7878    <systemitem class="username">nobody</systemitem> user:</para>
    7979
    80 <screen os="m"><userinput remap="test">su nobody -s /bin/bash \
     80<screen os="n"><userinput remap="test">su nobody -s /bin/bash \
    8181    -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes -k check || true"</userinput></screen>
    8282
    83     <para os="p">Install the package:</para>
    84 
    85 <screen os="q"><userinput>make install</userinput></screen>
    86 
    87     <para os="r">Move programs to the locations specified by the FHS:</para>
    88 
    89 <screen os="s"><userinput>mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date} /bin
     83    <para os="o">Remove the temporary group:</para>
     84
     85<screen os="p"><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
     86
     87    <para os="q">Install the package:</para>
     88
     89<screen os="r"><userinput>make install</userinput></screen>
     90
     91    <para os="s">Move programs to the locations specified by the FHS:</para>
     92
     93<screen os="t"><userinput>mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date} /bin
    9094mv -v /usr/bin/{dd,df,echo,false,hostname,ln,ls,mkdir,mknod} /bin
    9195mv -v /usr/bin/{mv,pwd,rm,rmdir,stty,true,uname} /bin
  • BOOK/final-system/multilib/coreutils.xml

    r3d99dc7 rdd08c1b  
    103103    xpointer="xpointer(//*[@os='s'])"/>
    104104
     105    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     106    href="../common/coreutils.xml"
     107    xpointer="xpointer(//*[@os='t'])"/>
     108
    105109  </sect2>
    106110
Note: See TracChangeset for help on using the changeset viewer.