Changeset efcb393 for chapter05/createfiles.xml
- Timestamp:
- 05/03/2020 09:02:51 PM (4 years ago)
- 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
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
chapter05/createfiles.xml
r9d719e2 refcb393 6 6 ]> 7 7 8 <sect1 id="ch- system-createfiles">8 <sect1 id="ch-tools-createfiles"> 9 9 <?dbhtml filename="createfiles.html"?> 10 10 11 11 <title>Creating Essential Files and Symlinks</title> 12 12 13 <indexterm zone="ch- system-createfiles">13 <indexterm zone="ch-tools-createfiles"> 14 14 <primary sortas="e-/etc/passwd">/etc/passwd</primary> 15 15 </indexterm> 16 16 17 <indexterm zone="ch- system-createfiles">17 <indexterm zone="ch-tools-createfiles"> 18 18 <primary sortas="e-/etc/group">/etc/group</primary> 19 19 </indexterm> 20 20 21 <indexterm zone="ch- system-createfiles">21 <indexterm zone="ch-tools-createfiles"> 22 22 <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> 23 23 </indexterm> 24 24 25 <indexterm zone="ch- system-createfiles">25 <indexterm zone="ch-tools-createfiles"> 26 26 <primary sortas="e-/var/log/btmp">/var/log/btmp</primary> 27 27 </indexterm> 28 28 29 <indexterm zone="ch- system-createfiles">29 <indexterm zone="ch-tools-createfiles"> 30 30 <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary> 31 31 </indexterm> 32 32 33 <indexterm zone="ch- system-createfiles">33 <indexterm zone="ch-tools-createfiles"> 34 34 <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary> 35 35 </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 which39 will be replaced by real files throughout the course of this chapter after the40 software has been installed:</para>41 42 <screen><userinput>ln -sv /tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin43 ln -sv /tools/bin/{env,install,perl,printf} /usr/bin44 ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib45 ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib46 ln -sv /tools/lib/libfl.so* /usr/lib47 48 ln -sv bash /bin/sh49 50 for lib in blkid mount uuid fdisk51 do52 ln -sv /tools/lib/lib$lib.so* /usr/lib53 sed 's|/tools|/usr|' /tools/lib/pkgconfig/${lib}.pc \54 > /usr/lib/pkgconfig/${lib}.pc55 done56 for incdir in blkid libmount uuid libfdisk57 do58 ln -svf /tools/include/$incdir /usr/include59 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 specify68 <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 the83 <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, which91 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 into107 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 the115 <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/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 the132 <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/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 needed141 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 the149 <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 as164 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 to181 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 allow195 <phrase revision="sysv">eudev</phrase>196 <phrase revision="systemd">systemd</phrase> to find the197 util-linux libraries installed in chapter 5, without creating198 wrong references to /tools. The uuid library is also needed for199 building a python module.</para>200 </listitem>201 </varlistentry>202 203 </variablelist>204 36 205 37 <para>Historically, Linux maintains a list of the mounted file systems in the … … 314 146 315 147 <para>The created groups are not part of any standard—they are groups 316 decided on in part by the requirements of the Udev configuration in th is148 decided on in part by the requirements of the Udev configuration in the next 317 149 chapter, and in part by common convention employed by a number of existing 318 150 Linux distributions. In addition, some test suites rely on specific users … … 326 158 327 159 <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 330 161 <filename>/etc/passwd</filename> and <filename>/etc/group</filename> 331 162 files have been created, user name and group name resolution will now 332 163 work:</para> 333 164 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> 335 166 336 167 <para>Note the use of the <parameter>+h</parameter> directive. This tells
Note:
See TracChangeset
for help on using the changeset viewer.