- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/final-system/common/coreutils.xml
r2e85573 r24b004c 38 38 ./configure --prefix=/usr \ 39 39 --enable-no-install-program=kill,uptime \ 40 --enable-install-program=hostname </userinput></screen>41 40 --enable-install-program=hostname --libexecdir=/usr/lib</userinput></screen> 41 42 42 <variablelist os="d1"> 43 43 <title>The meaning of the configure options:</title> 44 44 45 45 <varlistentry os="d2"> 46 46 <term><parameter>FORCE_UNSAFE_CONFIGURE=1</parameter></term> … … 56 56 <screen os="f"><userinput>make</userinput></screen> 57 57 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 66 59 the tests that are meant to be run as user 67 60 <systemitem class="username">root</systemitem>:</para> 68 61 69 <screen os="i"><userinput remap="test">make NON_ROOT_USERNAME=dummy check-root</userinput></screen> 70 71 <para os="j">The testsuite will now be run as the 72 <systemitem class="username">dummy</systemitem> user. Fix the permissions 73 for a few files to allow this:</para> 74 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 78 <systemitem class="username">dummy</systemitem> user:</para> 79 80 <screen os="m"><userinput remap="test">su dummy -s /bin/bash \ 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 78 <systemitem class="username">nobody</systemitem> user:</para> 79 80 <screen os="n"><userinput remap="test">su nobody -s /bin/bash \ 81 81 -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes -k check || true"</userinput></screen> 82 82 83 <para os="n">When testing is complete, remove the 84 <systemitem class="username">dummy</systemitem> user and groups:</para> 85 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 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 95 94 mv -v /usr/bin/{dd,df,echo,false,hostname,ln,ls,mkdir,mknod} /bin 96 95 mv -v /usr/bin/{mv,pwd,rm,rmdir,stty,true,uname} /bin 97 96 mv -v /usr/bin/chroot /usr/sbin</userinput></screen> 98 99 <para os="t">Other Coreutils programs are used by some of the scripts100 in the CLFS-Bootscripts package. As <filename101 class="directory">/usr</filename> may not be available during the early102 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} /bin105 mv -v /usr/bin/{readlink,sleep,sync,test,touch} /bin106 ln -svf ../../bin/install /usr/bin</userinput></screen>107 97 108 98 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.