Ignore:
Timestamp:
05/03/2020 09:02:51 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
a715dec
Parents:
9d719e2
Message:

Make the new book

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 moved

Legend:

Unmodified
Added
Removed
  • chapter05/createfiles.xml

    r9d719e2 refcb393  
    66]>
    77
    8 <sect1 id="ch-system-createfiles">
     8<sect1 id="ch-tools-createfiles">
    99  <?dbhtml filename="createfiles.html"?>
    1010
    1111  <title>Creating Essential Files and Symlinks</title>
    1212
    13   <indexterm zone="ch-system-createfiles">
     13  <indexterm zone="ch-tools-createfiles">
    1414    <primary sortas="e-/etc/passwd">/etc/passwd</primary>
    1515  </indexterm>
    1616
    17   <indexterm zone="ch-system-createfiles">
     17  <indexterm zone="ch-tools-createfiles">
    1818    <primary sortas="e-/etc/group">/etc/group</primary>
    1919  </indexterm>
    2020
    21   <indexterm zone="ch-system-createfiles">
     21  <indexterm zone="ch-tools-createfiles">
    2222    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
    2323  </indexterm>
    2424
    25   <indexterm zone="ch-system-createfiles">
     25  <indexterm zone="ch-tools-createfiles">
    2626    <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
    2727  </indexterm>
    2828
    29   <indexterm zone="ch-system-createfiles">
     29  <indexterm zone="ch-tools-createfiles">
    3030    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
    3131  </indexterm>
    3232
    33   <indexterm zone="ch-system-createfiles">
     33  <indexterm zone="ch-tools-createfiles">
    3434    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
    3535  </indexterm>
    36 
    37   <para>Some programs use hard-wired paths to programs which do not exist yet.
    38   In order to satisfy these programs, create a number of symbolic links which
    39   will be replaced by real files throughout the course of this chapter after the
    40   software has been installed:</para>
    41 
    42 <screen><userinput>ln -sv /tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin
    43 ln -sv /tools/bin/{env,install,perl,printf}         /usr/bin
    44 ln -sv /tools/lib/libgcc_s.so{,.1}                  /usr/lib
    45 ln -sv /tools/lib/libstdc++.{a,so{,.6}}             /usr/lib
    46 ln -sv /tools/lib/libfl.so*                         /usr/lib
    47 
    48 ln -sv bash /bin/sh
    49 
    50 for lib in blkid mount uuid fdisk
    51 do
    52     ln -sv /tools/lib/lib$lib.so* /usr/lib
    53     sed 's|/tools|/usr|' /tools/lib/pkgconfig/${lib}.pc \
    54         &gt; /usr/lib/pkgconfig/${lib}.pc
    55 done
    56 for incdir in blkid libmount uuid libfdisk
    57 do
    58     ln -svf /tools/include/$incdir    /usr/include
    59 done</userinput></screen>
    60 
    61   <variablelist>
    62     <title>The purpose of each link:</title>
    63 
    64     <varlistentry>
    65       <term><parameter><filename>/bin/bash</filename></parameter></term>
    66       <listitem>
    67         <para>Many <command>bash</command> scripts specify
    68         <filename>/bin/bash</filename>.</para>
    69       </listitem>
    70     </varlistentry>
    71 
    72     <varlistentry>
    73       <term><parameter><filename>/bin/cat</filename></parameter></term>
    74       <listitem>
    75         <para>This pathname is hard-coded into Glibc's configure script.</para>
    76       </listitem>
    77     </varlistentry>
    78 
    79     <varlistentry>
    80       <term><parameter><filename>/bin/dd</filename></parameter></term>
    81       <listitem>
    82         <para>The path to <filename>dd</filename> will be hard-coded into the
    83         <filename>/usr/bin/libtool</filename> utility.</para>
    84       </listitem>
    85     </varlistentry>
    86 
    87     <varlistentry>
    88       <term><parameter><filename>/bin/echo</filename></parameter></term>
    89       <listitem>
    90         <para>This is to satisfy one of the tests in Glibc's test suite, which
    91         expects <filename>/bin/echo</filename>.</para>
    92       </listitem>
    93     </varlistentry>
    94 
    95     <varlistentry>
    96       <term><parameter><filename>/usr/bin/env</filename></parameter></term>
    97       <listitem>
    98         <para>This pathname is hard-coded into some packages build procedures.
    99         <!-- systemd  This may not be needed if we move sysd to the end--></para>
    100       </listitem>
    101     </varlistentry>
    102 
    103     <varlistentry>
    104       <term><parameter><filename>/usr/bin/install</filename></parameter></term>
    105       <listitem>
    106         <para>The path to <filename>install</filename> will be hard-coded into
    107         the <filename>/usr/lib/bash/Makefile.inc</filename> file.</para>
    108       </listitem>
    109     </varlistentry>
    110 
    111     <varlistentry>
    112       <term><parameter><filename>/bin/ln</filename></parameter></term>
    113       <listitem>
    114         <para>The path to <filename>ln</filename> will be hard-coded into the
    115         <filename>/usr/lib/perl5/&perl-version;/&lt;target-triplet&gt;/Config_heavy.pl</filename>
    116          file.</para>
    117       </listitem>
    118     </varlistentry>
    119 
    120     <varlistentry>
    121       <term><parameter><filename>/bin/pwd</filename></parameter></term>
    122       <listitem>
    123         <para>Some <command>configure</command> scripts, particularly Glibc's,
    124         have this pathname hard-coded.</para>
    125       </listitem>
    126     </varlistentry>
    127 
    128     <varlistentry>
    129       <term><parameter><filename>/bin/rm</filename></parameter></term>
    130       <listitem>
    131         <para>The path to <filename>rm</filename> will be hard-coded into the
    132         <filename>/usr/lib/perl5/&perl-version;/&lt;target-triplet&gt;/Config_heavy.pl</filename>
    133          file.</para>
    134       </listitem>
    135     </varlistentry>
    136 
    137     <varlistentry>
    138       <term><parameter><filename>/bin/stty</filename></parameter></term>
    139       <listitem>
    140         <para>This pathname is hard-coded into Expect, therefore it is needed
    141         for Binutils and GCC test suites to pass.</para>
    142       </listitem>
    143     </varlistentry>
    144 
    145     <varlistentry>
    146       <term><parameter><filename>/usr/bin/perl</filename></parameter></term>
    147       <listitem>
    148         <para>Many Perl scripts hard-code this path to the
    149         <command>perl</command> program.</para>
    150       </listitem>
    151     </varlistentry>
    152 
    153     <varlistentry>
    154       <term><parameter><filename>/usr/lib/libgcc_s.so{,.1}</filename></parameter></term>
    155       <listitem>
    156         <para>Glibc needs this for the pthreads library to work.</para>
    157       </listitem>
    158     </varlistentry>
    159 
    160     <varlistentry>
    161       <term><parameter><filename>/usr/lib/libstdc++{,.6}</filename></parameter></term>
    162       <listitem>
    163         <para>This is needed by several tests in Glibc's test suite, as well as
    164         for C++ support in GMP.</para>
    165       </listitem>
    166     </varlistentry>
    167 
    168     <varlistentry>
    169       <term><parameter><filename>/bin/sh</filename></parameter></term>
    170       <listitem>
    171         <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
    172       </listitem>
    173     </varlistentry>
    174 
    175     <varlistentry>
    176       <term>
    177         <parameter><filename>/usr/lib/libfl.so*</filename></parameter>
    178       </term>
    179       <listitem>
    180         <para>This link allows binutils to find the flex library, and to
    181         build enhanced versions of ar and ranlib.</para>
    182       </listitem>
    183     </varlistentry>
    184 
    185     <varlistentry>
    186       <term>
    187         <parameter>
    188           <filename>/usr/lib/lib{blkid,fdisk,mount,uuid}.so*</filename>,
    189           <filename>/usr/include/{blkid,libfdisk,libmount,uuid}</filename>,
    190           <filename>/usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</filename>
    191         </parameter>
    192       </term>
    193       <listitem>
    194         <para>These links and files allow
    195         <phrase revision="sysv">eudev</phrase>
    196         <phrase revision="systemd">systemd</phrase> to find the
    197         util-linux libraries installed in chapter 5, without creating
    198         wrong references to /tools. The uuid library is also needed for
    199         building a python module.</para>
    200       </listitem>
    201     </varlistentry>
    202 
    203   </variablelist>
    20436
    20537  <para>Historically, Linux maintains a list of the mounted file systems in the
     
    314146
    315147  <para>The created groups are not part of any standard&mdash;they are groups
    316   decided on in part by the requirements of the Udev configuration in this
     148  decided on in part by the requirements of the Udev configuration in the next
    317149  chapter, and in part by common convention employed by a number of existing
    318150  Linux distributions. In addition, some test suites rely on specific users
     
    326158
    327159  <para>To remove the <quote>I have no name!</quote> prompt, start a new
    328   shell. Since a full Glibc was installed in <xref
    329   linkend="chapter-temporary-tools"/> and the
     160  shell. Since the
    330161  <filename>/etc/passwd</filename> and <filename>/etc/group</filename>
    331162  files have been created, user name and group name resolution will now
    332163  work:</para>
    333164
    334 <screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen>
     165<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen>
    335166
    336167  <para>Note the use of the <parameter>+h</parameter> directive. This tells
Note: See TracChangeset for help on using the changeset viewer.