Changeset 3f3931b0
- Timestamp:
- 02/07/2006 07:39:29 PM (18 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, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, 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:
- ddd5542
- Parents:
- 1ca11cd
- Location:
- chapter06
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/perl.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-perl" role="wrap"> 7 <title>Perl-&perl-version;</title> 8 <?dbhtml filename="perl.html"?> 9 10 <indexterm zone="ch-system-perl"><primary sortas="a-Perl">Perl</primary></indexterm> 11 12 <sect2 role="package"><title/> 13 <para>The Perl package contains the Practical Extraction and Report Language.</para> 14 15 <segmentedlist> 16 <segtitle>&buildtime;</segtitle> 17 <segtitle>&diskspace;</segtitle> 18 <seglistitem><seg>2.9 SBU</seg><seg>137 MB</seg></seglistitem> 19 </segmentedlist> 20 21 <segmentedlist> 22 <segtitle>&dependencies;</segtitle> 23 <seglistitem><seg>Bash, Berkeley DB, Binutils, Coreutils, Diffutils, 24 Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem> 25 </segmentedlist> 26 </sect2> 27 28 <sect2 role="installation"> 29 <title>Installation of Perl</title> 30 31 <para>A security vulnerability exists in Perl's sprintf function. Apply the 32 following patch to fix it.</para> 9 <?dbhtml filename="perl.html"?> 10 11 <title>Perl-&perl-version;</title> 12 13 <indexterm zone="ch-system-perl"> 14 <primary sortas="a-Perl">Perl</primary> 15 </indexterm> 16 17 <sect2 role="package"> 18 <title/> 19 20 <para>The Perl package contains the Practical Extraction and Report 21 Language.</para> 22 23 <segmentedlist> 24 <segtitle>&buildtime;</segtitle> 25 <segtitle>&diskspace;</segtitle> 26 27 <seglistitem> 28 <seg>2.9 SBU</seg> 29 <seg>137 MB</seg> 30 </seglistitem> 31 </segmentedlist> 32 33 <segmentedlist> 34 <segtitle>&dependencies;</segtitle> 35 36 <seglistitem> 37 <seg>Bash, Berkeley DB, Binutils, Coreutils, Diffutils, Gawk, GCC, 38 Glibc, Grep, Make, and Sed</seg> 39 </seglistitem> 40 </segmentedlist> 41 42 </sect2> 43 44 <sect2 role="installation"> 45 <title>Installation of Perl</title> 46 47 <para>A security vulnerability exists in Perl's sprintf function. Apply the 48 following patch to fix it.</para> 33 49 34 50 <screen><userinput>patch -Np1 -i ../&perl-sprintf-patch;</userinput></screen> 35 51 36 <para>The DB_File module that comes with Perl-&perl-version; is incompatible37 with Berkeley DB-&db-version; (the testsuite fails if this module gets built).38 Apply the following patch in order to update the DB_File module:</para>52 <para>The DB_File module that comes with Perl-&perl-version; is incompatible 53 with Berkeley DB-&db-version; (the testsuite fails if this module gets built). 54 Apply the following patch in order to update the DB_File module:</para> 39 55 40 56 <screen><userinput>patch -Np1 -i ../&perl-db_file-patch;</userinput></screen> 41 57 42 <para>First create a basic <filename>/etc/hosts</filename> file which will be43 referenced in one of Perl's configuration files as well as being used used by44 the testsuite if you run that.</para>58 <para>First create a basic <filename>/etc/hosts</filename> file which will be 59 referenced in one of Perl's configuration files as well as being used used by 60 the testsuite if you run that.</para> 45 61 46 62 <screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> 47 63 48 <para>To have full control over the way Perl is set up, run the49 interactive <command>Configure</command> script and hand-pick the way50 this package is built. If the defaults it auto-detects are suitable,51 prepare Perl for compilation with:</para>64 <para>To have full control over the way Perl is set up, run the 65 interactive <command>Configure</command> script and hand-pick the way 66 this package is built. If the defaults it auto-detects are suitable, 67 prepare Perl for compilation with:</para> 52 68 53 69 <screen><userinput>./configure.gnu --prefix=/usr -Dpager="/usr/bin/less -isR"</userinput></screen> 54 70 55 <para>The meaning of the configure options:</para> 56 57 <variablelist> 58 <varlistentry> 59 <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term> 60 <listitem><para>This corrects an error in the way that 61 <command>perldoc</command> invokes the <command>less</command> program.</para> 62 </listitem> 63 </varlistentry> 64 </variablelist> 65 66 <para>Compile the package:</para> 71 <variablelist> 72 <title>The meaning of the configure options:</title> 73 74 <varlistentry> 75 <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term> 76 <listitem> 77 <para>This corrects an error in the way that <command>perldoc</command> 78 invokes the <command>less</command> program.</para> 79 </listitem> 80 </varlistentry> 81 82 </variablelist> 83 84 <para>Compile the package:</para> 67 85 68 86 <screen><userinput>make</userinput></screen> 69 87 70 <para>Now run the tests, if desired:</para>88 <para>Now run the tests, if desired:</para> 71 89 72 90 <screen><userinput>make test</userinput></screen> 73 91 74 <para>Install the package:</para>92 <para>Install the package:</para> 75 93 76 94 <screen><userinput>make install</userinput></screen> 77 95 78 </sect2> 79 80 81 <sect2 id="contents-perl" role="content"><title>Contents of Perl</title> 82 83 <segmentedlist> 84 <segtitle>Installed programs</segtitle> 85 <segtitle>Installed libraries</segtitle> 86 <seglistitem><seg>a2p, c2ph, dprofpp, enc2xs, 87 find2perl, h2ph, h2xs, libnetcfg, perl, perl&perl-version; (link to perl), 88 perlbug, perlcc, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, 89 pod2text, pod2usage, podchecker, podselect, psed (link to s2p), pstruct (link 90 to c2ph), s2p, splain, and xsubpp</seg> 91 <seg>Several hundred which cannot all be listed here</seg></seglistitem> 92 </segmentedlist> 93 94 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 95 <?dbfo list-presentation="list"?> 96 <?dbhtml list-presentation="table"?> 97 98 <varlistentry id="a2p"> 99 <term><command>a2p</command></term> 100 <listitem> 101 <para>Translates awk to Perl</para> 102 <indexterm zone="ch-system-perl a2p"><primary sortas="b-a2p">a2p</primary></indexterm> 103 </listitem> 104 </varlistentry> 105 106 <varlistentry id="c2ph"> 107 <term><command>c2ph</command></term> 108 <listitem> 109 <para>Dumps C structures as generated from <command>cc -g -S</command></para> 110 <indexterm zone="ch-system-perl c2ph"><primary sortas="b-c2ph">c2ph</primary></indexterm> 111 </listitem> 112 </varlistentry> 113 114 <varlistentry id="dprofpp"> 115 <term><command>dprofpp</command></term> 116 <listitem> 117 <para>Displays Perl profile data</para> 118 <indexterm zone="ch-system-perl dprofpp"><primary sortas="b-dprofpp">dprofpp</primary></indexterm> 119 </listitem> 120 </varlistentry> 121 122 <varlistentry id="en2cxs"> 123 <term><command>en2cxs</command></term> 124 <listitem> 125 <para>Builds a Perl extension for the Encode module from either 126 Unicode Character Mappings or Tcl Encoding Files</para> 127 <indexterm zone="ch-system-perl en2cxs"><primary sortas="b-en2cxs">en2cxs</primary></indexterm> 128 </listitem> 129 </varlistentry> 130 131 <varlistentry id="find2perl"> 132 <term><command>find2perl</command></term> 133 <listitem> 134 <para>Translates <command>find</command> commands to Perl</para> 135 <indexterm zone="ch-system-perl find2perl"><primary sortas="b-find2perl">find2perl</primary></indexterm> 136 </listitem> 137 </varlistentry> 138 139 <varlistentry id="h2ph"> 140 <term><command>h2ph</command></term> 141 <listitem> 142 <para>Converts <filename class="extension">.h</filename> C header files to 143 <filename class="extension">.ph</filename> Perl header files</para> 144 <indexterm zone="ch-system-perl h2ph"><primary sortas="b-h2ph">h2ph</primary></indexterm> 145 </listitem> 146 </varlistentry> 147 148 <varlistentry id="h2xs"> 149 <term><command>h2xs</command></term> 150 <listitem> 151 <para>Converts <filename class="extension">.h</filename> C header files to Perl extensions</para> 152 <indexterm zone="ch-system-perl h2xs"><primary sortas="b-h2xs">h2xs</primary></indexterm> 153 </listitem> 154 </varlistentry> 155 156 <varlistentry id="libnetcfg"> 157 <term><command>libnetcfg</command></term> 158 <listitem> 159 <para>Can be used to configure the <filename class="libraryfile">libnet</filename></para> 160 <indexterm zone="ch-system-perl libnetcfg"><primary sortas="b-libnetcfg">libnetcfg</primary></indexterm> 161 </listitem> 162 </varlistentry> 163 164 <varlistentry id="perl"> 165 <term><command>perl</command></term> 166 <listitem> 167 <para>Combines some of the best features of C, <command>sed</command>, 168 <command>awk</command> and <command>sh</command> into a single swiss-army 169 language</para> 170 <indexterm zone="ch-system-perl perl"><primary sortas="b-perl">perl</primary></indexterm> 171 </listitem> 172 </varlistentry> 173 174 <varlistentry id="perl-version"> 175 <term><command>perl&perl-version;</command></term> 176 <listitem> 177 <para>A hard link to <command>perl</command></para> 178 <indexterm zone="ch-system-perl perl-version"><primary 179 sortas="b-perl&perl-version;">perl&perl-version;</primary></indexterm> 180 </listitem> 181 </varlistentry> 182 183 184 <varlistentry id="perlbug"> 185 <term><command>perlbug</command></term> 186 <listitem> 187 <para>Used to generate bug reports about Perl, or the modules that come 188 with it, and mail them</para> 189 <indexterm zone="ch-system-perl perlbug"><primary sortas="b-perlbug">perlbug</primary></indexterm> 190 </listitem> 191 </varlistentry> 192 193 <varlistentry id="perlcc"> 194 <term><command>perlcc</command></term> 195 <listitem> 196 <para>Generates executables from Perl programs</para> 197 <indexterm zone="ch-system-perl perlcc"><primary sortas="b-perlcc">perlcc</primary></indexterm> 198 </listitem> 199 </varlistentry> 200 201 <varlistentry id="perldoc"> 202 <term><command>perldoc</command></term> 203 <listitem> 204 <para>Displays a piece of documentation in pod format that is embedded 205 in the Perl installation tree or in a Perl script</para> 206 <indexterm zone="ch-system-perl perldoc"><primary sortas="b-perldoc">perldoc</primary></indexterm> 207 </listitem> 208 </varlistentry> 209 210 <varlistentry id="perlivp"> 211 <term><command>perlivp</command></term> 212 <listitem> 213 <para>The Perl Installation Verification Procedure; it can be used to 214 verify that Perl and its libraries have been installed 215 correctly</para> 216 <indexterm zone="ch-system-perl perlivp"><primary sortas="b-perlivp">perlivp</primary></indexterm> 217 </listitem> 218 </varlistentry> 219 220 <varlistentry id="piconv"> 221 <term><command>piconv</command></term> 222 <listitem> 223 <para>A Perl version of the character encoding converter 224 <command>iconv</command></para> 225 <indexterm zone="ch-system-perl piconv"><primary sortas="b-piconv">piconv</primary></indexterm> 226 </listitem> 227 </varlistentry> 228 229 <varlistentry id="pl2pm"> 230 <term><command>pl2pm</command></term> 231 <listitem> 232 <para>A rough tool for converting Perl4 <filename class="extension">.pl</filename> 233 files to Perl5 <filename class="extension">.pm</filename> modules</para> 234 <indexterm zone="ch-system-perl pl2pm"><primary sortas="b-pl2pm">pl2pm</primary></indexterm> 235 </listitem> 236 </varlistentry> 237 238 <varlistentry id="pod2html"> 239 <term><command>pod2html</command></term> 240 <listitem> 241 <para>Converts files from pod format to HTML format</para> 242 <indexterm zone="ch-system-perl pod2html"><primary sortas="b-pod2html">pod2html</primary></indexterm> 243 </listitem> 244 </varlistentry> 245 246 <varlistentry id="pod2latex"> 247 <term><command>pod2latex</command></term> 248 <listitem> 249 <para>Converts files from pod format to LaTeX format</para> 250 <indexterm zone="ch-system-perl pod2latex"><primary sortas="b-pod2latex">pod2latex</primary></indexterm> 251 </listitem> 252 </varlistentry> 253 254 <varlistentry id="pod2man"> 255 <term><command>pod2man</command></term> 256 <listitem> 257 <para>Converts pod data to formatted *roff input</para> 258 <indexterm zone="ch-system-perl pod2man"><primary sortas="b-pod2man">pod2man</primary></indexterm> 259 </listitem> 260 </varlistentry> 261 262 <varlistentry id="pod2text"> 263 <term><command>pod2text</command></term> 264 <listitem> 265 <para>Converts pod data to formatted ASCII text</para> 266 <indexterm zone="ch-system-perl pod2text"><primary sortas="b-pod2text">pod2text</primary></indexterm> 267 </listitem> 268 </varlistentry> 269 270 <varlistentry id="pod2usage"> 271 <term><command>pod2usage</command></term> 272 <listitem> 273 <para>Prints usage messages from embedded pod docs in files</para> 274 <indexterm zone="ch-system-perl pod2usage"><primary sortas="b-pod2usage">pod2usage</primary></indexterm> 275 </listitem> 276 </varlistentry> 277 278 <varlistentry id="podchecker"> 279 <term><command>podchecker</command></term> 280 <listitem> 281 <para>Checks the syntax of pod format documentation files</para> 282 <indexterm zone="ch-system-perl podchecker"><primary sortas="b-podchecker">podchecker</primary></indexterm> 283 </listitem> 284 </varlistentry> 285 286 <varlistentry id="podselect"> 287 <term><command>podselect</command></term> 288 <listitem> 289 <para>Displays selected sections of pod documentation</para> 290 <indexterm zone="ch-system-perl podselect"><primary sortas="b-podselect">podselect</primary></indexterm> 291 </listitem> 292 </varlistentry> 293 294 <varlistentry id="psed"> 295 <term><command>psed</command></term> 296 <listitem> 297 <para>A Perl version of the stream editor <command>sed</command></para> 298 <indexterm zone="ch-system-perl psed"><primary sortas="b-psed">psed</primary></indexterm> 299 </listitem> 300 </varlistentry> 301 302 <varlistentry id="pstruct"> 303 <term><command>pstruct</command></term> 304 <listitem> 305 <para>Dumps C structures as generated from <command>cc -g -S</command> stabs</para> 306 <indexterm zone="ch-system-perl pstruct"><primary sortas="b-pstruct">pstruct</primary></indexterm> 307 </listitem> 308 </varlistentry> 309 310 <varlistentry id="s2p"> 311 <term><command>s2p</command></term> 312 <listitem> 313 <para>Translates <command>sed</command> scripts to Perl</para> 314 <indexterm zone="ch-system-perl s2p"><primary sortas="b-s2p">s2p</primary></indexterm> 315 </listitem> 316 </varlistentry> 317 318 <varlistentry id="splain"> 319 <term><command>splain</command></term> 320 <listitem> 321 <para>Is used to force verbose warning diagnostics in Perl</para> 322 <indexterm zone="ch-system-perl splain"><primary sortas="b-splain">splain</primary></indexterm> 323 </listitem> 324 </varlistentry> 325 326 <varlistentry id="xsubpp"> 327 <term><command>xsubpp</command></term> 328 <listitem> 329 <para>Converts Perl XS code into C code</para> 330 <indexterm zone="ch-system-perl xsubpp"><primary sortas="b-xsubpp">xsubpp</primary></indexterm> 331 </listitem> 332 </varlistentry> 333 </variablelist> 334 335 </sect2> 96 </sect2> 97 98 <sect2 id="contents-perl" role="content"> 99 <title>Contents of Perl</title> 100 101 <segmentedlist> 102 <segtitle>Installed programs</segtitle> 103 <segtitle>Installed libraries</segtitle> 104 105 <seglistitem> 106 <seg>a2p, c2ph, dprofpp, enc2xs, find2perl, h2ph, h2xs, libnetcfg, perl, 107 perl&perl-version; (link to perl), perlbug, perlcc, perldoc, perlivp, 108 piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text, pod2usage, 109 podchecker, podselect, psed (link to s2p), pstruct (link to c2ph), s2p, 110 splain, and xsubpp</seg> 111 <seg>Several hundred which cannot all be listed here</seg> 112 </seglistitem> 113 </segmentedlist> 114 115 <variablelist> 116 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 117 <?dbfo list-presentation="list"?> 118 <?dbhtml list-presentation="table"?> 119 120 <varlistentry id="a2p"> 121 <term><command>a2p</command></term> 122 <listitem> 123 <para>Translates awk to Perl</para> 124 <indexterm zone="ch-system-perl a2p"> 125 <primary sortas="b-a2p">a2p</primary> 126 </indexterm> 127 </listitem> 128 </varlistentry> 129 130 <varlistentry id="c2ph"> 131 <term><command>c2ph</command></term> 132 <listitem> 133 <para>Dumps C structures as generated from 134 <command>cc -g -S</command></para> 135 <indexterm zone="ch-system-perl c2ph"> 136 <primary sortas="b-c2ph">c2ph</primary> 137 </indexterm> 138 </listitem> 139 </varlistentry> 140 141 <varlistentry id="dprofpp"> 142 <term><command>dprofpp</command></term> 143 <listitem> 144 <para>Displays Perl profile data</para> 145 <indexterm zone="ch-system-perl dprofpp"> 146 <primary sortas="b-dprofpp">dprofpp</primary> 147 </indexterm> 148 </listitem> 149 </varlistentry> 150 151 <varlistentry id="en2cxs"> 152 <term><command>en2cxs</command></term> 153 <listitem> 154 <para>Builds a Perl extension for the Encode module from either 155 Unicode Character Mappings or Tcl Encoding Files</para> 156 <indexterm zone="ch-system-perl en2cxs"> 157 <primary sortas="b-en2cxs">en2cxs</primary> 158 </indexterm> 159 </listitem> 160 </varlistentry> 161 162 <varlistentry id="find2perl"> 163 <term><command>find2perl</command></term> 164 <listitem> 165 <para>Translates <command>find</command> commands to Perl</para> 166 <indexterm zone="ch-system-perl find2perl"> 167 <primary sortas="b-find2perl">find2perl</primary> 168 </indexterm> 169 </listitem> 170 </varlistentry> 171 172 <varlistentry id="h2ph"> 173 <term><command>h2ph</command></term> 174 <listitem> 175 <para>Converts <filename class="extension">.h</filename> C header 176 files to <filename class="extension">.ph</filename> Perl header 177 files</para> 178 <indexterm zone="ch-system-perl h2ph"> 179 <primary sortas="b-h2ph">h2ph</primary> 180 </indexterm> 181 </listitem> 182 </varlistentry> 183 184 <varlistentry id="h2xs"> 185 <term><command>h2xs</command></term> 186 <listitem> 187 <para>Converts <filename class="extension">.h</filename> C header 188 files to Perl extensions</para> 189 <indexterm zone="ch-system-perl h2xs"> 190 <primary sortas="b-h2xs">h2xs</primary> 191 </indexterm> 192 </listitem> 193 </varlistentry> 194 195 <varlistentry id="libnetcfg"> 196 <term><command>libnetcfg</command></term> 197 <listitem> 198 <para>Can be used to configure the 199 <filename class="libraryfile">libnet</filename></para> 200 <indexterm zone="ch-system-perl libnetcfg"> 201 <primary sortas="b-libnetcfg">libnetcfg</primary> 202 </indexterm> 203 </listitem> 204 </varlistentry> 205 206 <varlistentry id="perl"> 207 <term><command>perl</command></term> 208 <listitem> 209 <para>Combines some of the best features of C, <command>sed</command>, 210 <command>awk</command> and <command>sh</command> into a single 211 swiss-army language</para> 212 <indexterm zone="ch-system-perl perl"> 213 <primary sortas="b-perl">perl</primary> 214 </indexterm> 215 </listitem> 216 </varlistentry> 217 218 <varlistentry id="perl-version"> 219 <term><command>perl&perl-version;</command></term> 220 <listitem> 221 <para>A hard link to <command>perl</command></para> 222 <indexterm zone="ch-system-perl perl-version"> 223 <primary sortas="b-perl&perl-version;">perl&perl-version;</primary> 224 </indexterm> 225 </listitem> 226 </varlistentry> 227 228 <varlistentry id="perlbug"> 229 <term><command>perlbug</command></term> 230 <listitem> 231 <para>Used to generate bug reports about Perl, or the modules that come 232 with it, and mail them</para> 233 <indexterm zone="ch-system-perl perlbug"> 234 <primary sortas="b-perlbug">perlbug</primary> 235 </indexterm> 236 </listitem> 237 </varlistentry> 238 239 <varlistentry id="perlcc"> 240 <term><command>perlcc</command></term> 241 <listitem> 242 <para>Generates executables from Perl programs</para> 243 <indexterm zone="ch-system-perl perlcc"> 244 <primary sortas="b-perlcc">perlcc</primary> 245 </indexterm> 246 </listitem> 247 </varlistentry> 248 249 <varlistentry id="perldoc"> 250 <term><command>perldoc</command></term> 251 <listitem> 252 <para>Displays a piece of documentation in pod format that is embedded 253 in the Perl installation tree or in a Perl script</para> 254 <indexterm zone="ch-system-perl perldoc"> 255 <primary sortas="b-perldoc">perldoc</primary> 256 </indexterm> 257 </listitem> 258 </varlistentry> 259 260 <varlistentry id="perlivp"> 261 <term><command>perlivp</command></term> 262 <listitem> 263 <para>The Perl Installation Verification Procedure; it can be used to 264 verify that Perl and its libraries have been installed 265 correctly</para> 266 <indexterm zone="ch-system-perl perlivp"> 267 <primary sortas="b-perlivp">perlivp</primary> 268 </indexterm> 269 </listitem> 270 </varlistentry> 271 272 <varlistentry id="piconv"> 273 <term><command>piconv</command></term> 274 <listitem> 275 <para>A Perl version of the character encoding converter 276 <command>iconv</command></para> 277 <indexterm zone="ch-system-perl piconv"> 278 <primary sortas="b-piconv">piconv</primary> 279 </indexterm> 280 </listitem> 281 </varlistentry> 282 283 <varlistentry id="pl2pm"> 284 <term><command>pl2pm</command></term> 285 <listitem> 286 <para>A rough tool for converting Perl4 287 <filename class="extension">.pl</filename> files to Perl5 288 <filename class="extension">.pm</filename> modules</para> 289 <indexterm zone="ch-system-perl pl2pm"> 290 <primary sortas="b-pl2pm">pl2pm</primary> 291 </indexterm> 292 </listitem> 293 </varlistentry> 294 295 <varlistentry id="pod2html"> 296 <term><command>pod2html</command></term> 297 <listitem> 298 <para>Converts files from pod format to HTML format</para> 299 <indexterm zone="ch-system-perl pod2html"> 300 <primary sortas="b-pod2html">pod2html</primary> 301 </indexterm> 302 </listitem> 303 </varlistentry> 304 305 <varlistentry id="pod2latex"> 306 <term><command>pod2latex</command></term> 307 <listitem> 308 <para>Converts files from pod format to LaTeX format</para> 309 <indexterm zone="ch-system-perl pod2latex"> 310 <primary sortas="b-pod2latex">pod2latex</primary> 311 </indexterm> 312 </listitem> 313 </varlistentry> 314 315 <varlistentry id="pod2man"> 316 <term><command>pod2man</command></term> 317 <listitem> 318 <para>Converts pod data to formatted *roff input</para> 319 <indexterm zone="ch-system-perl pod2man"> 320 <primary sortas="b-pod2man">pod2man</primary> 321 </indexterm> 322 </listitem> 323 </varlistentry> 324 325 <varlistentry id="pod2text"> 326 <term><command>pod2text</command></term> 327 <listitem> 328 <para>Converts pod data to formatted ASCII text</para> 329 <indexterm zone="ch-system-perl pod2text"> 330 <primary sortas="b-pod2text">pod2text</primary> 331 </indexterm> 332 </listitem> 333 </varlistentry> 334 335 <varlistentry id="pod2usage"> 336 <term><command>pod2usage</command></term> 337 <listitem> 338 <para>Prints usage messages from embedded pod docs in files</para> 339 <indexterm zone="ch-system-perl pod2usage"> 340 <primary sortas="b-pod2usage">pod2usage</primary> 341 </indexterm> 342 </listitem> 343 </varlistentry> 344 345 <varlistentry id="podchecker"> 346 <term><command>podchecker</command></term> 347 <listitem> 348 <para>Checks the syntax of pod format documentation files</para> 349 <indexterm zone="ch-system-perl podchecker"> 350 <primary sortas="b-podchecker">podchecker</primary> 351 </indexterm> 352 </listitem> 353 </varlistentry> 354 355 <varlistentry id="podselect"> 356 <term><command>podselect</command></term> 357 <listitem> 358 <para>Displays selected sections of pod documentation</para> 359 <indexterm zone="ch-system-perl podselect"> 360 <primary sortas="b-podselect">podselect</primary> 361 </indexterm> 362 </listitem> 363 </varlistentry> 364 365 <varlistentry id="psed"> 366 <term><command>psed</command></term> 367 <listitem> 368 <para>A Perl version of the stream editor <command>sed</command></para> 369 <indexterm zone="ch-system-perl psed"> 370 <primary sortas="b-psed">psed</primary> 371 </indexterm> 372 </listitem> 373 </varlistentry> 374 375 <varlistentry id="pstruct"> 376 <term><command>pstruct</command></term> 377 <listitem> 378 <para>Dumps C structures as generated from <command>cc -g -S</command> 379 stabs</para> 380 <indexterm zone="ch-system-perl pstruct"> 381 <primary sortas="b-pstruct">pstruct</primary> 382 </indexterm> 383 </listitem> 384 </varlistentry> 385 386 <varlistentry id="s2p"> 387 <term><command>s2p</command></term> 388 <listitem> 389 <para>Translates <command>sed</command> scripts to Perl</para> 390 <indexterm zone="ch-system-perl s2p"> 391 <primary sortas="b-s2p">s2p</primary> 392 </indexterm> 393 </listitem> 394 </varlistentry> 395 396 <varlistentry id="splain"> 397 <term><command>splain</command></term> 398 <listitem> 399 <para>Is used to force verbose warning diagnostics in Perl</para> 400 <indexterm zone="ch-system-perl splain"> 401 <primary sortas="b-splain">splain</primary> 402 </indexterm> 403 </listitem> 404 </varlistentry> 405 406 <varlistentry id="xsubpp"> 407 <term><command>xsubpp</command></term> 408 <listitem> 409 <para>Converts Perl XS code into C code</para> 410 <indexterm zone="ch-system-perl xsubpp"> 411 <primary sortas="b-xsubpp">xsubpp</primary> 412 </indexterm> 413 </listitem> 414 </varlistentry> 415 416 </variablelist> 417 418 </sect2> 336 419 337 420 </sect1> 338 -
chapter06/pkgmgt.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 4 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 5 5 %general-entities; … … 7 7 8 8 <sect1 id="ch-system-pkgmgt"> 9 <?dbhtml filename="pkgmgt.html"?> 10 9 11 <title>Package Management</title> 10 <?dbhtml filename="pkgmgt.html"?>11 12 12 13 <para>Package Management is an often requested addition to the LFS Book. A … … 19 20 issues that may arise when upgrading packages.</para> 20 21 21 <para>Some reasons why no package manager is mentioned in LFS or BLFS include: </para> 22 <para>Some reasons why no package manager is mentioned in LFS or BLFS 23 include:</para> 22 24 23 25 <itemizedlist> … … 38 40 fits your need.</para> 39 41 40 <note><para>As no particular package management technique is mentioned in LFS, 41 the commands in the remainder of this book must be performed while logged in 42 as user <emphasis>root</emphasis> and no longer as user 43 <emphasis>lfs</emphasis>. Also, double check that <envar>$LFS</envar> is set. 44 </para></note> 42 <note> 43 <para>As no particular package management technique is mentioned in LFS, 44 the commands in the remainder of this book must be performed while logged in 45 as user <systemitem class="username">root</systemitem> and no longer as user 46 <systemitem class="username">lfs</systemitem>. Also, double check that 47 <envar>$LFS</envar> is set.</para> 48 </note> 45 49 46 50 <sect2> … … 54 58 <itemizedlist> 55 59 <listitem> 56 <para>If one of the toolchain packages 57 (<application>Glibc</application>, <application>GCC</application> or 58 <application>Binutils</application>) needs to be upgraded to a newer 59 minor version, it is safer to rebuild LFS. Though you 60 <emphasis>may</emphasis> be able to get by rebuilding all the packages 61 in their dependency order, we do not recommend it. For example, if 62 glibc-2.2.x needs to be updated to glibc-2.3.x, it is safer to rebuild. 63 For micro version updates, a simple reinstallation usually works, but 64 is not guaranteed. For example, upgrading from glibc-2.3.4 to 65 glibc-2.3.5 will not usually cause any problems.</para> 60 <para>If one of the toolchain packages (Glibc, GCC or Binutils) needs 61 to be upgraded to a newer minor version, it is safer to rebuild LFS. 62 Though you <emphasis>may</emphasis> be able to get by rebuilding all 63 the packages in their dependency order, we do not recommend it. For 64 example, if glibc-2.2.x needs to be updated to glibc-2.3.x, it is safer 65 to rebuild. For micro version updates, a simple reinstallation usually 66 works, but is not guaranteed. For example, upgrading from glibc-2.3.4 67 to glibc-2.3.5 will not usually cause any problems.</para> 66 68 </listitem> 67 69 … … 110 112 need any package management because they plan on rebuilding the entire 111 113 system when a package is changed.</para> 114 112 115 </sect3> 113 116 … … 130 133 include <filename>/usr/pkg/foo</filename>. For more than a few packages, 131 134 this scheme becomes unmanageable.</para> 135 132 136 </sect3> 133 137 … … 169 173 make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> 170 174 171 <para>Most packages support this approach, but there are some which do 172 not. For the non-compliant packages, you may either need to manually173 install the package, or you may find that it is easier to install some174 p roblematic packages into <filename class='directory'>/opt</filename>.175 </para> 175 <para>Most packages support this approach, but there are some which do not. 176 For the non-compliant packages, you may either need to manually install the 177 package, or you may find that it is easier to install some problematic 178 packages into <filename class='directory'>/opt</filename>.</para> 179 176 180 </sect3> 177 181 … … 191 195 is installed at a time. The logs are not reliable if two packages are 192 196 being installed on two different consoles.</para> 197 193 198 </sect3> 194 199 … … 206 211 ensure that the package manager does not break anything and logs all the 207 212 appropriate files.</para> 213 208 214 </sect3> 209 215 … … 215 221 installation, a package archive is created using the installed files. 216 222 This archive is then used to install the package either on the local 217 machine or can even be used to install the package on other machines. 218 </para> 223 machine or can even be used to install the package on other machines.</para> 219 224 220 225 <para>This approach is used by most of the package managers found in the … … 226 231 package management for LFS systems is located at <ulink 227 232 url="&hints-root;/fakeroot.txt"/>.</para> 233 228 234 </sect3> 229 235 … … 237 243 checking the user ID. The features and shortcomings of this approach are 238 244 too complex to describe in this section. For the details please see the 239 hint at <ulink 240 url="&hints-root;/more_control_and_pkg_man.txt"/>.</para> 245 hint at <ulink url="&hints-root;/more_control_and_pkg_man.txt"/>.</para> 246 241 247 </sect3> 242 248 -
chapter06/procps.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-procps" role="wrap"> 7 <title>Procps-&procps-version;</title> 8 <?dbhtml filename="procps.html"?> 9 10 <indexterm zone="ch-system-procps"><primary sortas="a-Procps">Procps</primary></indexterm> 11 12 <sect2 role="package"><title/> 13 <para>The Procps package contains programs for monitoring processes.</para> 14 15 <segmentedlist> 16 <segtitle>&buildtime;</segtitle> 17 <segtitle>&diskspace;</segtitle> 18 <seglistitem><seg>0.1 SBU</seg><seg>2.3 MB</seg></seglistitem> 19 </segmentedlist> 20 21 <segmentedlist> 22 <segtitle>&dependencies;</segtitle> 23 <seglistitem><seg>Bash, Binutils, Coreutils, GCC, Glibc, 24 Make, and Ncurses</seg></seglistitem> 25 </segmentedlist> 26 </sect2> 27 28 <sect2 role="installation"> 29 <title>Installation of Procps</title> 30 31 <para>Compile the package:</para> 9 <?dbhtml filename="procps.html"?> 10 11 <title>Procps-&procps-version;</title> 12 13 <indexterm zone="ch-system-procps"> 14 <primary sortas="a-Procps">Procps</primary> 15 </indexterm> 16 17 <sect2 role="package"> 18 <title/> 19 20 <para>The Procps package contains programs for monitoring processes.</para> 21 22 <segmentedlist> 23 <segtitle>&buildtime;</segtitle> 24 <segtitle>&diskspace;</segtitle> 25 26 <seglistitem> 27 <seg>0.1 SBU</seg> 28 <seg>2.3 MB</seg> 29 </seglistitem> 30 </segmentedlist> 31 32 <segmentedlist> 33 <segtitle>&dependencies;</segtitle> 34 35 <seglistitem> 36 <seg>Bash, Binutils, Coreutils, GCC, Glibc, Make, and Ncurses</seg> 37 </seglistitem> 38 </segmentedlist> 39 40 </sect2> 41 42 <sect2 role="installation"> 43 <title>Installation of Procps</title> 44 45 <para>Compile the package:</para> 32 46 33 47 <screen><userinput>make</userinput></screen> 34 48 35 <para>This package does not come with a test suite.</para>36 37 <para>Install the package:</para>49 <para>This package does not come with a test suite.</para> 50 51 <para>Install the package:</para> 38 52 39 53 <screen><userinput>make install</userinput></screen> 40 54 41 </sect2> 42 43 44 <sect2 id="contents-procps" role="content"><title>Contents of Procps</title> 45 46 <segmentedlist> 47 <segtitle>Installed programs</segtitle> 48 <segtitle>Installed library</segtitle> 49 <seglistitem><seg>free, kill, pgrep, pkill, 50 pmap, ps, skill, snice, sysctl, tload, top, uptime, vmstat, w, and watch</seg> 51 <seg>libproc.so</seg></seglistitem> 52 </segmentedlist> 53 54 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 55 <?dbfo list-presentation="list"?> 56 <?dbhtml list-presentation="table"?> 57 58 <varlistentry id="free"> 59 <term><command>free</command></term> 60 <listitem> 61 <para>Reports the amount of free and used memory (both physical and 62 swap memory) in the system</para> 63 <indexterm zone="ch-system-procps free"><primary sortas="b-free">free</primary></indexterm> 64 </listitem> 65 </varlistentry> 66 67 <varlistentry id="kill"> 68 <term><command>kill</command></term> 69 <listitem> 70 <para>Sends signals to processes</para> 71 <indexterm zone="ch-system-procps kill"><primary sortas="b-kill">kill</primary></indexterm> 72 </listitem> 73 </varlistentry> 74 75 <varlistentry id="pgrep"> 76 <term><command>pgrep</command></term> 77 <listitem> 78 <para>Looks up processes based on their name and other attributes</para> 79 <indexterm zone="ch-system-procps pgrep"><primary sortas="b-pgrep">pgrep</primary></indexterm> 80 </listitem> 81 </varlistentry> 82 83 <varlistentry id="pkill"> 84 <term><command>pkill</command></term> 85 <listitem> 86 <para>Signals processes based on their name and other attributes</para> 87 <indexterm zone="ch-system-procps pkill"><primary sortas="b-pkill">pkill</primary></indexterm> 88 </listitem> 89 </varlistentry> 90 91 <varlistentry id="pmap"> 92 <term><command>pmap</command></term> 93 <listitem> 94 <para>Reports the memory map of the given process</para> 95 <indexterm zone="ch-system-procps pmap"><primary sortas="b-pmap">pmap</primary></indexterm> 96 </listitem> 97 </varlistentry> 98 99 <varlistentry id="ps"> 100 <term><command>ps</command></term> 101 <listitem> 102 <para>Lists the current running processes</para> 103 <indexterm zone="ch-system-procps ps"><primary sortas="b-ps">ps</primary></indexterm> 104 </listitem> 105 </varlistentry> 106 107 <varlistentry id="skill"> 108 <term><command>skill</command></term> 109 <listitem> 110 <para>Sends signals to processes matching the given criteria</para> 111 <indexterm zone="ch-system-procps skill"><primary sortas="b-skill">skill</primary></indexterm> 112 </listitem> 113 </varlistentry> 114 115 <varlistentry id="snice"> 116 <term><command>snice</command></term> 117 <listitem> 118 <para>Changes the scheduling priority of processes matching the given criteria</para> 119 <indexterm zone="ch-system-procps snice"><primary sortas="b-snice">snice</primary></indexterm> 120 </listitem> 121 </varlistentry> 122 123 <varlistentry id="sysctl"> 124 <term><command>sysctl</command></term> 125 <listitem> 126 <para>Modifies kernel parameters at run time</para> 127 <indexterm zone="ch-system-procps sysctl"><primary sortas="b-sysctl">sysctl</primary></indexterm> 128 </listitem> 129 </varlistentry> 130 131 <varlistentry id="tload"> 132 <term><command>tload</command></term> 133 <listitem> 134 <para>Prints a graph of the current system load average</para> 135 <indexterm zone="ch-system-procps tload"><primary sortas="b-tload">tload</primary></indexterm> 136 </listitem> 137 </varlistentry> 138 139 <varlistentry id="top"> 140 <term><command>top</command></term> 141 <listitem> 142 <para>Displays a list of the most CPU intensive processes; it provides an 143 ongoing look at processor activity in real time</para> 144 <indexterm zone="ch-system-procps top"><primary sortas="b-top">top</primary></indexterm> 145 </listitem> 146 </varlistentry> 147 148 <varlistentry id="uptime"> 149 <term><command>uptime</command></term> 150 <listitem> 151 <para>Reports how long the system has been running, how many users are 152 logged on, and the system load averages</para> 153 <indexterm zone="ch-system-procps uptime"><primary sortas="b-uptime">uptime</primary></indexterm> 154 </listitem> 155 </varlistentry> 156 157 <varlistentry id="vmstat"> 158 <term><command>vmstat</command></term> 159 <listitem> 160 <para>Reports virtual memory statistics, giving information about 161 processes, memory, paging, block Input/Output (IO), traps, and CPU activity</para> 162 <indexterm zone="ch-system-procps vmstat"><primary sortas="b-vmstat">vmstat</primary></indexterm> 163 </listitem> 164 </varlistentry> 165 166 <varlistentry id="w"> 167 <term><command>w</command></term> 168 <listitem> 169 <para>Shows which users are currently logged on, where, and since when</para> 170 <indexterm zone="ch-system-procps w"><primary sortas="b-w">w</primary></indexterm> 171 </listitem> 172 </varlistentry> 173 174 <varlistentry id="watch"> 175 <term><command>watch</command></term> 176 <listitem> 177 <para>Runs a given command repeatedly, displaying the first screen-full of its 178 output; this allows a user to watch the output change over time</para> 179 <indexterm zone="ch-system-procps watch"><primary sortas="b-watch">watch</primary></indexterm> 180 </listitem> 181 </varlistentry> 182 183 <varlistentry id="libproc"> 184 <term><filename class="libraryfile">libproc</filename></term> 185 <listitem> 186 <para>Contains the functions used by most programs in this package</para> 187 <indexterm zone="ch-system-procps libproc"><primary sortas="c-libproc">libproc</primary></indexterm> 188 </listitem> 189 </varlistentry> 190 </variablelist> 191 192 </sect2> 55 </sect2> 56 57 <sect2 id="contents-procps" role="content"> 58 <title>Contents of Procps</title> 59 60 <segmentedlist> 61 <segtitle>Installed programs</segtitle> 62 <segtitle>Installed library</segtitle> 63 64 <seglistitem> 65 <seg>free, kill, pgrep, pkill, pmap, ps, skill, snice, sysctl, tload, 66 top, uptime, vmstat, w, and watch</seg> 67 <seg>libproc.so</seg> 68 </seglistitem> 69 </segmentedlist> 70 71 <variablelist> 72 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 73 <?dbfo list-presentation="list"?> 74 <?dbhtml list-presentation="table"?> 75 76 <varlistentry id="free"> 77 <term><command>free</command></term> 78 <listitem> 79 <para>Reports the amount of free and used memory (both physical and 80 swap memory) in the system</para> 81 <indexterm zone="ch-system-procps free"> 82 <primary sortas="b-free">free</primary> 83 </indexterm> 84 </listitem> 85 </varlistentry> 86 87 <varlistentry id="kill"> 88 <term><command>kill</command></term> 89 <listitem> 90 <para>Sends signals to processes</para> 91 <indexterm zone="ch-system-procps kill"> 92 <primary sortas="b-kill">kill</primary> 93 </indexterm> 94 </listitem> 95 </varlistentry> 96 97 <varlistentry id="pgrep"> 98 <term><command>pgrep</command></term> 99 <listitem> 100 <para>Looks up processes based on their name and other attributes</para> 101 <indexterm zone="ch-system-procps pgrep"> 102 <primary sortas="b-pgrep">pgrep</primary> 103 </indexterm> 104 </listitem> 105 </varlistentry> 106 107 <varlistentry id="pkill"> 108 <term><command>pkill</command></term> 109 <listitem> 110 <para>Signals processes based on their name and other attributes</para> 111 <indexterm zone="ch-system-procps pkill"> 112 <primary sortas="b-pkill">pkill</primary> 113 </indexterm> 114 </listitem> 115 </varlistentry> 116 117 <varlistentry id="pmap"> 118 <term><command>pmap</command></term> 119 <listitem> 120 <para>Reports the memory map of the given process</para> 121 <indexterm zone="ch-system-procps pmap"> 122 <primary sortas="b-pmap">pmap</primary> 123 </indexterm> 124 </listitem> 125 </varlistentry> 126 127 <varlistentry id="ps"> 128 <term><command>ps</command></term> 129 <listitem> 130 <para>Lists the current running processes</para> 131 <indexterm zone="ch-system-procps ps"> 132 <primary sortas="b-ps">ps</primary> 133 </indexterm> 134 </listitem> 135 </varlistentry> 136 137 <varlistentry id="skill"> 138 <term><command>skill</command></term> 139 <listitem> 140 <para>Sends signals to processes matching the given criteria</para> 141 <indexterm zone="ch-system-procps skill"> 142 <primary sortas="b-skill">skill</primary> 143 </indexterm> 144 </listitem> 145 </varlistentry> 146 147 <varlistentry id="snice"> 148 <term><command>snice</command></term> 149 <listitem> 150 <para>Changes the scheduling priority of processes matching the given 151 criteria</para> 152 <indexterm zone="ch-system-procps snice"> 153 <primary sortas="b-snice">snice</primary> 154 </indexterm> 155 </listitem> 156 </varlistentry> 157 158 <varlistentry id="sysctl"> 159 <term><command>sysctl</command></term> 160 <listitem> 161 <para>Modifies kernel parameters at run time</para> 162 <indexterm zone="ch-system-procps sysctl"> 163 <primary sortas="b-sysctl">sysctl</primary> 164 </indexterm> 165 </listitem> 166 </varlistentry> 167 168 <varlistentry id="tload"> 169 <term><command>tload</command></term> 170 <listitem> 171 <para>Prints a graph of the current system load average</para> 172 <indexterm zone="ch-system-procps tload"> 173 <primary sortas="b-tload">tload</primary> 174 </indexterm> 175 </listitem> 176 </varlistentry> 177 178 <varlistentry id="top"> 179 <term><command>top</command></term> 180 <listitem> 181 <para>Displays a list of the most CPU intensive processes; it 182 provides an ongoing look at processor activity in real time</para> 183 <indexterm zone="ch-system-procps top"> 184 <primary sortas="b-top">top</primary> 185 </indexterm> 186 </listitem> 187 </varlistentry> 188 189 <varlistentry id="uptime"> 190 <term><command>uptime</command></term> 191 <listitem> 192 <para>Reports how long the system has been running, how many users are 193 logged on, and the system load averages</para> 194 <indexterm zone="ch-system-procps uptime"> 195 <primary sortas="b-uptime">uptime</primary> 196 </indexterm> 197 </listitem> 198 </varlistentry> 199 200 <varlistentry id="vmstat"> 201 <term><command>vmstat</command></term> 202 <listitem> 203 <para>Reports virtual memory statistics, giving information about 204 processes, memory, paging, block Input/Output (IO), traps, and CPU 205 activity</para> 206 <indexterm zone="ch-system-procps vmstat"> 207 <primary sortas="b-vmstat">vmstat</primary> 208 </indexterm> 209 </listitem> 210 </varlistentry> 211 212 <varlistentry id="w"> 213 <term><command>w</command></term> 214 <listitem> 215 <para>Shows which users are currently logged on, where, and since 216 when</para> 217 <indexterm zone="ch-system-procps w"> 218 <primary sortas="b-w">w</primary> 219 </indexterm> 220 </listitem> 221 </varlistentry> 222 223 <varlistentry id="watch"> 224 <term><command>watch</command></term> 225 <listitem> 226 <para>Runs a given command repeatedly, displaying the first 227 screen-full of its output; this allows a user to watch the output 228 change over time</para> 229 <indexterm zone="ch-system-procps watch"> 230 <primary sortas="b-watch">watch</primary> 231 </indexterm> 232 </listitem> 233 </varlistentry> 234 235 <varlistentry id="libproc"> 236 <term><filename class="libraryfile">libproc</filename></term> 237 <listitem> 238 <para>Contains the functions used by most programs in this 239 package</para> 240 <indexterm zone="ch-system-procps libproc"> 241 <primary sortas="c-libproc">libproc</primary> 242 </indexterm> 243 </listitem> 244 </varlistentry> 245 246 </variablelist> 247 248 </sect2> 193 249 194 250 </sect1> 195 -
chapter06/psmisc.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-psmisc" role="wrap"> 7 <title>Psmisc-&psmisc-version;</title> 8 <?dbhtml filename="psmisc.html"?> 9 <?dbhtml filename="psmisc.html"?> 9 10 10 <indexterm zone="ch-system-psmisc"><primary sortas="a-Psmisc">Psmisc</primary></indexterm>11 <title>Psmisc-&psmisc-version;</title> 11 12 12 <sect2 role="package"><title/>13 <para>The Psmisc package contains programs for displaying information about 14 running processes.</para>13 <indexterm zone="ch-system-psmisc"> 14 <primary sortas="a-Psmisc">Psmisc</primary> 15 </indexterm> 15 16 16 <segmentedlist> 17 <segtitle>&buildtime;</segtitle> 18 <segtitle>&diskspace;</segtitle> 19 <seglistitem><seg>0.1 SBU</seg><seg>1.7 MB</seg></seglistitem> 20 </segmentedlist> 17 <sect2 role="package"> 18 <title/> 21 19 22 <segmentedlist> 23 <segtitle>&dependencies;</segtitle> 24 <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, 25 GCC, Gettext, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem> 26 </segmentedlist> 27 </sect2> 20 <para>The Psmisc package contains programs for displaying information about 21 running processes.</para> 28 22 29 <sect2 role="installation"> 30 <title>Installation of Psmisc</title> 23 <segmentedlist> 24 <segtitle>&buildtime;</segtitle> 25 <segtitle>&diskspace;</segtitle> 31 26 32 <para>Prepare Psmisc for compilation:</para> 27 <seglistitem> 28 <seg>0.1 SBU</seg> 29 <seg>1.7 MB</seg> 30 </seglistitem> 31 </segmentedlist> 32 33 <segmentedlist> 34 <segtitle>&dependencies;</segtitle> 35 36 <seglistitem> 37 <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, 38 Make, Ncurses, and Sed</seg> 39 </seglistitem> 40 </segmentedlist> 41 42 </sect2> 43 44 <sect2 role="installation"> 45 <title>Installation of Psmisc</title> 46 47 <para>Prepare Psmisc for compilation:</para> 33 48 34 49 <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen> 35 50 36 <para>The meaning of the configure options:</para> 51 <variablelist> 52 <title>The meaning of the configure options:</title> 37 53 38 <variablelist>39 <varlistentry>40 <term><parameter>--exec-prefix=""</parameter></term>41 <listitem><para>This ensures that the Psmisc binaries will install into42 <filename class="directory">/bin</filename> instead of <filename43 class="directory">/usr/bin</filename>. This is the correct location according to 44 the FHS, because some of the Psmisc binaries are used by the LFS-Bootscripts 45 package.</para></listitem>46 </varlistentry>47 </variablelist>54 <varlistentry> 55 <term><parameter>--exec-prefix=""</parameter></term> 56 <listitem> 57 <para>This ensures that the Psmisc binaries will install into 58 <filename class="directory">/bin</filename> instead of <filename 59 class="directory">/usr/bin</filename>. This is the correct location 60 according to the FHS, because some of the Psmisc binaries are used 61 by the LFS-Bootscripts package.</para> 62 </listitem> 63 </varlistentry> 48 64 49 <para>Compile the package:</para> 65 </variablelist> 66 67 <para>Compile the package:</para> 50 68 51 69 <screen><userinput>make</userinput></screen> 52 70 53 <para>This package does not come with a test suite.</para>71 <para>This package does not come with a test suite.</para> 54 72 55 <para>Install the package:</para>73 <para>Install the package:</para> 56 74 57 75 <screen><userinput>make install</userinput></screen> 58 76 59 <para>There is no reason for the <command>pstree</command> and60 <command>pstree.x11</command> programs to reside in <filename61 class="directory">/bin</filename>. Therefore, move them to <filename62 class="directory">/usr/bin</filename>:</para>77 <para>There is no reason for the <command>pstree</command> and 78 <command>pstree.x11</command> programs to reside in <filename 79 class="directory">/bin</filename>. Therefore, move them to <filename 80 class="directory">/usr/bin</filename>:</para> 63 81 64 82 <screen><userinput>mv -v /bin/pstree* /usr/bin</userinput></screen> 65 83 66 <para>By default, Psmisc's <command>pidof</command> program is not67 installed. This usually is not a problem because it is installed later68 in the Sysvinit package, which provides a better69 <command>pidof</command> program. If Sysvinit will not be used for a70 particular system, complete the installation of Psmisc by creating the71 following symlink:</para>84 <para>By default, Psmisc's <command>pidof</command> program is not 85 installed. This usually is not a problem because it is installed later 86 in the Sysvinit package, which provides a better 87 <command>pidof</command> program. If Sysvinit will not be used for a 88 particular system, complete the installation of Psmisc by creating the 89 following symlink:</para> 72 90 73 91 <screen><userinput>ln -sv killall /bin/pidof</userinput></screen> 74 92 75 </sect2>93 </sect2> 76 94 95 <sect2 id="contents-psmisc" role="content"> 96 <title>Contents of Psmisc</title> 77 97 78 <sect2 id="contents-psmisc" role="content"><title>Contents of Psmisc</title> 98 <segmentedlist> 99 <segtitle>Installed programs</segtitle> 79 100 80 <segmentedlist>81 <segtitle>Installed programs</segtitle>82 <seglistitem><seg>fuser, killall, pstree, and pstree.x11 (link to pstree)</seg></seglistitem>83 </segmentedlist>101 <seglistitem> 102 <seg>fuser, killall, pstree, and pstree.x11 (link to pstree)</seg> 103 </seglistitem> 104 </segmentedlist> 84 105 85 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 86 <?dbfo list-presentation="list"?> 87 <?dbhtml list-presentation="table"?> 106 <variablelist> 107 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 108 <?dbfo list-presentation="list"?> 109 <?dbhtml list-presentation="table"?> 88 110 89 <varlistentry id="fuser"> 90 <term><command>fuser</command></term> 91 <listitem> 92 <para>Reports the Process IDs (PIDs) of processes that use the given files or file systems</para> 93 <indexterm zone="ch-system-psmisc fuser"><primary sortas="b-fuser">fuser</primary></indexterm> 94 </listitem> 95 </varlistentry> 111 <varlistentry id="fuser"> 112 <term><command>fuser</command></term> 113 <listitem> 114 <para>Reports the Process IDs (PIDs) of processes that use the given 115 files or file systems</para> 116 <indexterm zone="ch-system-psmisc fuser"> 117 <primary sortas="b-fuser">fuser</primary> 118 </indexterm> 119 </listitem> 120 </varlistentry> 96 121 97 <varlistentry id="killall"> 98 <term><command>killall</command></term> 99 <listitem> 100 <para>Kills processes by name; it sends a signal to all processes 101 running any of the given commands</para> 102 <indexterm zone="ch-system-psmisc killall"><primary sortas="b-killall">killall</primary></indexterm> 103 </listitem> 104 </varlistentry> 122 <varlistentry id="killall"> 123 <term><command>killall</command></term> 124 <listitem> 125 <para>Kills processes by name; it sends a signal to all processes 126 running any of the given commands</para> 127 <indexterm zone="ch-system-psmisc killall"> 128 <primary sortas="b-killall">killall</primary> 129 </indexterm> 130 </listitem> 131 </varlistentry> 105 132 106 <varlistentry id="oldfuser"> 107 <term><command>oldfuser</command></term> 108 <listitem> 109 <para>Reports the Process IDs (PIDs) of processes that use the given files or file systems</para> 110 <indexterm zone="ch-system-psmisc oldfuser"><primary sortas="b-oldfuser">oldfuser</primary></indexterm> 111 </listitem> 112 </varlistentry> 133 <varlistentry id="oldfuser"> 134 <term><command>oldfuser</command></term> 135 <listitem> 136 <para>Reports the Process IDs (PIDs) of processes that use the given 137 files or file systems</para> 138 <indexterm zone="ch-system-psmisc oldfuser"> 139 <primary sortas="b-oldfuser">oldfuser</primary> 140 </indexterm> 141 </listitem> 142 </varlistentry> 113 143 114 <varlistentry id="pstree"> 115 <term><command>pstree</command></term> 116 <listitem> 117 <para>Displays running processes as a tree</para> 118 <indexterm zone="ch-system-psmisc pstree"><primary sortas="b-pstree">pstree</primary></indexterm> 119 </listitem> 120 </varlistentry> 144 <varlistentry id="pstree"> 145 <term><command>pstree</command></term> 146 <listitem> 147 <para>Displays running processes as a tree</para> 148 <indexterm zone="ch-system-psmisc pstree"> 149 <primary sortas="b-pstree">pstree</primary> 150 </indexterm> 151 </listitem> 152 </varlistentry> 121 153 122 <varlistentry id="pstree.x11"> 123 <term><command>pstree.x11</command></term> 124 <listitem> 125 <para>Same as <command>pstree</command>, except that it waits for confirmation before exiting</para> 126 <indexterm zone="ch-system-psmisc pstree.x11"><primary sortas="b-pstree.x11">pstree.x11</primary></indexterm> 127 </listitem> 128 </varlistentry> 129 </variablelist> 154 <varlistentry id="pstree.x11"> 155 <term><command>pstree.x11</command></term> 156 <listitem> 157 <para>Same as <command>pstree</command>, except that it waits for 158 confirmation before exiting</para> 159 <indexterm zone="ch-system-psmisc pstree.x11"> 160 <primary sortas="b-pstree.x11">pstree.x11</primary> 161 </indexterm> 162 </listitem> 163 </varlistentry> 130 164 131 </sect2> 165 </variablelist> 166 167 </sect2> 132 168 133 169 </sect1> 134 -
chapter06/pwdgroup.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-pwdgroup"> 7 <title>Creating the passwd, group, and log Files</title> 8 <?dbhtml filename="pwdgroup.html"?> 9 <?dbhtml filename="pwdgroup.html"?> 9 10 10 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/passwd">/etc/passwd</primary></indexterm> 11 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/group">/etc/group</primary></indexterm> 12 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/run/utmp">/var/run/utmp</primary></indexterm> 13 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/btmp">/var/log/btmp</primary></indexterm> 14 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary></indexterm> 15 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary></indexterm> 11 <title>Creating the passwd, group, and log Files</title> 16 12 17 <para>In order for user <emphasis>root</emphasis> to be able to login 18 and for the name <quote>root</quote> to be recognized, there must be relevant 19 entries in the <filename>/etc/passwd</filename> and 20 <filename>/etc/group</filename> files.</para> 13 <indexterm zone="ch-system-pwdgroup"> 14 <primary sortas="e-/etc/passwd">/etc/passwd</primary> 15 </indexterm> 21 16 22 <para>Create the <filename>/etc/passwd</filename> file by running the following 23 command:</para> 17 <indexterm zone="ch-system-pwdgroup"> 18 <primary sortas="e-/etc/group">/etc/group</primary> 19 </indexterm> 20 21 <indexterm zone="ch-system-pwdgroup"> 22 <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> 23 </indexterm> 24 25 <indexterm zone="ch-system-pwdgroup"> 26 <primary sortas="e-/var/log/btmp">/var/log/btmp</primary> 27 </indexterm> 28 29 <indexterm zone="ch-system-pwdgroup"> 30 <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary> 31 </indexterm> 32 33 <indexterm zone="ch-system-pwdgroup"> 34 <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary> 35 </indexterm> 36 37 <para>In order for user <systemitem class="username">root</systemitem> to be 38 able to login and for the name <quote>root</quote> to be recognized, there 39 must be relevant entries in the <filename>/etc/passwd</filename> and 40 <filename>/etc/group</filename> files.</para> 41 42 <para>Create the <filename>/etc/passwd</filename> file by running the following 43 command:</para> 24 44 25 45 <screen><userinput>cat > /etc/passwd << "EOF" … … 27 47 EOF</userinput></screen> 28 48 29 <para>The actual password for <emphasis>root</emphasis> (the <quote>x</quote>30 used here is just a placeholder) will be set later.</para>49 <para>The actual password for <systemitem class="username">root</systemitem> 50 (the <quote>x</quote> used here is just a placeholder) will be set later.</para> 31 51 32 <para>Create the <filename>/etc/group</filename> file by running the following33 command:</para>52 <para>Create the <filename>/etc/group</filename> file by running the following 53 command:</para> 34 54 35 55 <screen><userinput>cat > /etc/group << "EOF" … … 52 72 EOF</userinput></screen> 53 73 54 <para>The created groups are not part of any standard—they are groups 55 decided on in part by the requirements of the Udev configuration in this 56 chapter, and in part by common convention employed by a number of existing Linux 57 distributions. The Linux Standard Base (LSB, available at <ulink 58 url="http://www.linuxbase.org"/>) recommends only that, besides the group 59 <quote>root</quote> with a Group ID (GID) of 0, a group <quote>bin</quote> with 60 a GID of 1 be present. All other group names and GIDs can be chosen freely by 61 the system administrator since well-written programs do not depend on GID 62 numbers, but rather use the group's name.</para> 74 <para>The created groups are not part of any standard—they are groups 75 decided on in part by the requirements of the Udev configuration in this 76 chapter, and in part by common convention employed by a number of existing 77 Linux distributions. The Linux Standard Base (LSB, available at <ulink 78 url="http://www.linuxbase.org"/>) recommends only that, besides the group 79 <systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0, 80 a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be 81 present. All other group names and GIDs can be chosen freely by the system 82 administrator since well-written programs do not depend on GID numbers, but 83 rather use the group's name.</para> 63 84 64 <para>To remove the <quote>I have no name!</quote> prompt, start a new65 shell. Since a full Glibc was installed in <xref66 linkend="chapter-temporary-tools"/> and the67 <filename>/etc/passwd</filename> and <filename>/etc/group</filename>68 files have been created, user name and group name resolution will now69 work.</para>85 <para>To remove the <quote>I have no name!</quote> prompt, start a new 86 shell. Since a full Glibc was installed in <xref 87 linkend="chapter-temporary-tools"/> and the 88 <filename>/etc/passwd</filename> and <filename>/etc/group</filename> 89 files have been created, user name and group name resolution will now 90 work.</para> 70 91 71 92 <screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen> 72 93 73 <para>Note the use of the <parameter>+h</parameter> directive. This tells74 <command>bash</command> not to use its internal path hashing. Without this75 directive, <command>bash</command> would remember the paths to binaries it has76 executed. To ensure the use of the newly compiled binaries as soon as they are77 installed, the <parameter>+h</parameter> directive will be used for the duration78 of this chapter.</para>94 <para>Note the use of the <parameter>+h</parameter> directive. This tells 95 <command>bash</command> not to use its internal path hashing. Without this 96 directive, <command>bash</command> would remember the paths to binaries it has 97 executed. To ensure the use of the newly compiled binaries as soon as they are 98 installed, the <parameter>+h</parameter> directive will be used for the duration 99 of this chapter.</para> 79 100 80 <para>The <command>login</command>, <command>agetty</command>, and81 <command>init</command> programs (and others) use a number of log82 files to record information such as who was logged into the system and83 when. However, these programs will not write to the log files if they84 do not already exist. Initialize the log files and give them85 proper permissions:</para>101 <para>The <command>login</command>, <command>agetty</command>, and 102 <command>init</command> programs (and others) use a number of log 103 files to record information such as who was logged into the system and 104 when. However, these programs will not write to the log files if they 105 do not already exist. Initialize the log files and give them 106 proper permissions:</para> 86 107 87 108 <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} … … 89 110 chmod -v 664 /var/run/utmp /var/log/lastlog</userinput></screen> 90 111 91 <para>The <filename>/var/run/utmp</filename> file records the users92 that are currently logged in. The <filename>/var/log/wtmp</filename>93 file records all logins and logouts. The94 <filename>/var/log/lastlog</filename> file records when95 each user last logged in. The <filename>/var/log/btmp</filename> file96 records the bad login attempts.</para>112 <para>The <filename>/var/run/utmp</filename> file records the users 113 that are currently logged in. The <filename>/var/log/wtmp</filename> 114 file records all logins and logouts. The 115 <filename>/var/log/lastlog</filename> file records when 116 each user last logged in. The <filename>/var/log/btmp</filename> file 117 records the bad login attempts.</para> 97 118 98 119 </sect1> 99 -
chapter06/readjusting.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-readjusting"> 7 <title>Re-adjusting the Toolchain</title> 8 <?dbhtml filename="readjusting.html"?> 9 <?dbhtml filename="readjusting.html"?> 9 10 10 <para>Now that the final C libraries have been installed, it is time to adjust 11 the toolchain again. The toolchain will be adjusted so that it will link any 12 newly compiled program against these new libraries. This is a similar process 13 used in the <quote>Adjusting</quote> phase in the beginning of <xref 14 linkend="chapter-temporary-tools"/>, but with the adjustments reversed. In <xref 15 linkend="chapter-temporary-tools"/>, the chain was guided from the host's 16 <filename class="directory">/{,usr/}lib</filename> directories to the new 17 <filename class="directory">/tools/lib</filename> directory. Now, the chain will 18 be guided from that same <filename class="directory">/tools/lib</filename> 19 directory to the LFS <filename class="directory">/{,usr/}lib</filename> 20 directories.</para> 11 <title>Re-adjusting the Toolchain</title> 21 12 22 <para>First, backup the <filename class="directory">/tools</filename> linker, and 23 replace it with the adjusted linker we made in chapter 5. We'll also create a 24 link to its counterpart in <filename class="directory">/tools/$(gcc -dumpmachine)/bin</filename>.</para> 13 <para>Now that the final C libraries have been installed, it is time to adjust 14 the toolchain again. The toolchain will be adjusted so that it will link any 15 newly compiled program against these new libraries. This is a similar process 16 used in the <quote>Adjusting</quote> phase in the beginning of <xref 17 linkend="chapter-temporary-tools"/>, but with the adjustments reversed. In <xref 18 linkend="chapter-temporary-tools"/>, the chain was guided from the host's 19 <filename class="directory">/{,usr/}lib</filename> directories to the new 20 <filename class="directory">/tools/lib</filename> directory. Now, the chain will 21 be guided from that same <filename class="directory">/tools/lib</filename> 22 directory to the LFS <filename class="directory">/{,usr/}lib</filename> 23 directories.</para> 24 25 <para>First, backup the <filename class="directory">/tools</filename> linker, 26 and replace it with the adjusted linker we made in chapter 5. We'll also create 27 a link to its counterpart in <filename class="directory">/tools/$(gcc 28 -dumpmachine)/bin</filename>.</para> 25 29 26 30 <screen><userinput>mv -v /tools/bin/{ld,ld-old} … … 29 33 ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen> 30 34 31 <para>Next, amend the GCC specs file so that it points to the new32 dynamic linker, and so that GCC knows where to find its start files.33 A <command>perl</command> command accomplishes this:</para>35 <para>Next, amend the GCC specs file so that it points to the new 36 dynamic linker, and so that GCC knows where to find its start files. 37 A <command>perl</command> command accomplishes this:</para> 34 38 35 39 <screen><userinput>gcc -dumpspecs | \ 36 40 perl -p -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;' \ 37 -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \ 38 `dirname $(gcc --print-libgcc-file-name)`/specs 39 </userinput></screen> 41 -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \ 42 `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen> 40 43 41 <para>It is a good idea to visually inspect the specs file to verify the intended 42 change was actually made.</para>44 <para>It is a good idea to visually inspect the specs file to verify the 45 intended change was actually made.</para> 43 46 44 <important><para>If working on a platform where the name of the 45 dynamic linker is something other than 46 <filename class="libraryfile">ld-linux.so.2</filename>, substitute 47 <quote>ld-linux.so.2</quote> with the name of the platform's48 dynamic linker in the above commands. Refer back to <xref49 linkend="ch-tools-toolchaintechnotes" role=","/> if 50 necessary.</para></important>47 <important> 48 <para>If working on a platform where the name of the dynamic linker is 49 something other than <filename class="libraryfile">ld-linux.so.2</filename>, 50 substitute <quote>ld-linux.so.2</quote> with the name of the platform's 51 dynamic linker in the above commands. Refer back to <xref 52 linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para> 53 </important> 51 54 52 <caution><para>It is imperative at this point to stop and ensure that 53 the basic functions (compiling and linking) of the adjusted toolchain 54 are working as expected. To do this, perform a sanity 55 check:</para>55 <caution> 56 <para>It is imperative at this point to stop and ensure that the basic 57 functions (compiling and linking) of the adjusted toolchain are working 58 as expected. To do this, perform a sanity check:</para> 56 59 57 60 <screen><userinput>echo 'main(){}' > dummy.c … … 59 62 readelf -l a.out | grep ': /lib'</userinput></screen> 60 63 61 <para>If everything is working correctly, there should be no errors,62 and the output of the last command will be (allowing for63 platform-specific differences in dynamic linker name):</para>64 <para>If everything is working correctly, there should be no errors, 65 and the output of the last command will be (allowing for 66 platform-specific differences in dynamic linker name):</para> 64 67 65 68 <screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen> 66 69 67 <para>Note that <filename class="directory">/lib</filename> is now68 the prefix of our dynamic linker.</para>70 <para>Note that <filename class="directory">/lib</filename> is now 71 the prefix of our dynamic linker.</para> 69 72 70 <para>Now make sure that we're setup to use the correct start files:</para>73 <para>Now make sure that we're setup to use the correct start files:</para> 71 74 72 75 <screen><userinput>grep "/usr/lib/crt.* " dummy.log</userinput></screen> 73 76 74 <para>If everything is working correctly, there should be no errors,75 and the output of the last command will be:</para>77 <para>If everything is working correctly, there should be no errors, 78 and the output of the last command will be:</para> 76 79 77 80 <screen><computeroutput>attempt to open /usr/lib/crt1.o succeeded … … 79 82 attempt to open /usr/lib/crtn.o succeeded</computeroutput></screen> 80 83 81 <para>Next make sure that we're using the correct libc:</para>84 <para>Next make sure that we're using the correct libc:</para> 82 85 83 86 <screen><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen> 84 87 85 <para>If everything is working correctly, there should be no errors,86 and the output of the last command will be:</para>88 <para>If everything is working correctly, there should be no errors, 89 and the output of the last command will be:</para> 87 90 88 91 <screen><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen> 89 92 90 <para>Lastly, make sure GCC is using the correct dynamic linker:</para>93 <para>Lastly, make sure GCC is using the correct dynamic linker:</para> 91 94 92 95 <screen><userinput>grep found dummy.log</userinput></screen> 93 96 94 <para>If everything is working correctly, there should be no errors,95 and the output of the last command will be (allowing for96 platform-specific differences in dynamic linker name):</para>97 <para>If everything is working correctly, there should be no errors, 98 and the output of the last command will be (allowing for 99 platform-specific differences in dynamic linker name):</para> 97 100 98 101 <screen><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen> 99 102 100 <para>If the output does not appear as shown above or is not received101 at all, then something is seriously wrong. Investigate and retrace the102 steps to find out where the problem is and correct it. The most likely103 reason is that something went wrong with the specs file amendment104 above. Any issues will need to be resolved before continuing on with105 the process.</para>103 <para>If the output does not appear as shown above or is not received 104 at all, then something is seriously wrong. Investigate and retrace the 105 steps to find out where the problem is and correct it. The most likely 106 reason is that something went wrong with the specs file amendment 107 above. Any issues will need to be resolved before continuing on with 108 the process.</para> 106 109 107 <para>Once everything is working correctly, clean up the test108 files:</para>110 <para>Once everything is working correctly, clean up the test 111 files:</para> 109 112 110 <screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen></caution> 113 <screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen> 114 </caution> 111 115 112 116 </sect1> 113 -
chapter06/readline.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-readline" role="wrap"> 7 <title>Readline-&readline-version;</title> 8 <?dbhtml filename="readline.html"?> 9 <?dbhtml filename="readline.html"?> 9 10 10 <indexterm zone="ch-system-readline"><primary sortas="a-Readline">Readline</primary></indexterm>11 <title>Readline-&readline-version;</title> 11 12 12 <sect2 role="package"><title/>13 <para>The Readline package is a set of libraries that offers command-line 14 editing and history capabilities.</para>13 <indexterm zone="ch-system-readline"> 14 <primary sortas="a-Readline">Readline</primary> 15 </indexterm> 15 16 16 <segmentedlist> 17 <segtitle>&buildtime;</segtitle> 18 <segtitle>&diskspace;</segtitle> 19 <seglistitem><seg>0.11 SBU</seg><seg>9.1 MB</seg></seglistitem> 20 </segmentedlist> 17 <sect2 role="package"> 18 <title/> 21 19 22 <segmentedlist> 23 <segtitle>&dependencies;</segtitle> 24 <seglistitem><seg>Binutils, Coreutils, Diffutils, Gawk, 25 GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem> 26 </segmentedlist> 27 </sect2> 20 <para>The Readline package is a set of libraries that offers command-line 21 editing and history capabilities.</para> 28 22 29 <sect2 role="installation"> 30 <title>Installation of Readline</title> 23 <segmentedlist> 24 <segtitle>&buildtime;</segtitle> 25 <segtitle>&diskspace;</segtitle> 31 26 32 <para>Prepare Readline for compilation:</para> 27 <seglistitem> 28 <seg>0.11 SBU</seg> 29 <seg>9.1 MB</seg> 30 </seglistitem> 31 </segmentedlist> 32 33 <segmentedlist> 34 <segtitle>&dependencies;</segtitle> 35 36 <seglistitem> 37 <seg>Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, 38 Ncurses, and Sed</seg> 39 </seglistitem> 40 </segmentedlist> 41 42 </sect2> 43 44 <sect2 role="installation"> 45 <title>Installation of Readline</title> 46 47 <para>Prepare Readline for compilation:</para> 33 48 34 49 <screen><userinput>./configure --prefix=/usr --libdir=/lib</userinput></screen> 35 50 36 <para>Compile the package:</para>51 <para>Compile the package:</para> 37 52 38 53 <screen><userinput>make SHLIB_LIBS=-lncurses</userinput></screen> 39 54 40 <para>The meaning of the make option:</para> 55 <variablelist> 56 <title>The meaning of the make option:</title> 41 57 42 <variablelist> 43 <varlistentry> 44 <term><parameter>SHLIB_LIBS=-lncurses</parameter></term> 45 <listitem><para>This option forces Readline to link against the 46 <filename class="libraryfile">libncurses</filename> 47 (really, <filename class="libraryfile">libncursesw</filename>) 48 library.</para></listitem> 49 </varlistentry> 50 </variablelist> 58 <varlistentry> 59 <term><parameter>SHLIB_LIBS=-lncurses</parameter></term> 60 <listitem> 61 <para>This option forces Readline to link against the 62 <filename class="libraryfile">libncurses</filename> (really, 63 <filename class="libraryfile">libncursesw</filename>) library.</para> 64 </listitem> 65 </varlistentry> 51 66 52 <para>This package does not come with a test suite.</para>67 </variablelist> 53 68 54 <para>Install the package:</para> 69 <para>This package does not come with a test suite.</para> 70 71 <para>Install the package:</para> 55 72 56 73 <screen><userinput>make install</userinput></screen> 57 74 58 <para>Give Readline's dynamic libraries more appropriate permissions:</para>75 <para>Give Readline's dynamic libraries more appropriate permissions:</para> 59 76 60 77 <screen><userinput>chmod -v 755 /lib/lib{readline,history}.so*</userinput></screen> 61 78 62 <para>Now move the static libraries to a more appropriate location:</para>79 <para>Now move the static libraries to a more appropriate location:</para> 63 80 64 81 <screen><userinput>mv -v /lib/lib{readline,history}.a /usr/lib</userinput></screen> 65 82 66 <para>Next, remove the <filename class="extension">.so</filename> files in67 <filename class="directory">/lib</filename> and relink them into <filename68 class="directory">/usr/lib</filename>.</para>83 <para>Next, remove the <filename class="extension">.so</filename> files in 84 <filename class="directory">/lib</filename> and relink them into <filename 85 class="directory">/usr/lib</filename>.</para> 69 86 70 87 <screen><userinput>rm -v /lib/lib{readline,history}.so … … 72 89 ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen> 73 90 74 </sect2>91 </sect2> 75 92 93 <sect2 id="contents-readline" role="content"> 94 <title>Contents of Readline</title> 76 95 77 <sect2 id="contents-readline" role="content"><title>Contents of Readline</title> 78 <segmentedlist> 79 <segtitle>Installed libraries</segtitle> 80 <seglistitem><seg>libhistory.[a,so], and libreadline.[a,so]</seg></seglistitem> 81 </segmentedlist> 96 <segmentedlist> 97 <segtitle>Installed libraries</segtitle> 82 98 83 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 84 <?dbfo list-presentation="list"?> 85 <?dbhtml list-presentation="table"?> 99 <seglistitem> 100 <seg>libhistory.[a,so], and libreadline.[a,so]</seg> 101 </seglistitem> 102 </segmentedlist> 86 103 87 <varlistentry id="libhistory"> 88 <term><filename class="libraryfile">libhistory</filename></term> 89 <listitem> 90 <para>Provides a consistent user interface 91 for recalling lines of history</para> 92 <indexterm zone="ch-system-readline libhistory"><primary sortas="c-libhistory">libhistory</primary></indexterm> 93 </listitem> 94 </varlistentry> 104 <variablelist> 105 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 106 <?dbfo list-presentation="list"?> 107 <?dbhtml list-presentation="table"?> 95 108 96 <varlistentry id="libreadline"> 97 <term><filename class="libraryfile">libreadline</filename></term> 98 <listitem> 99 <para>Aids in the consistency of user interface 100 across discrete programs that need to provide a command line 101 interface</para> 102 <indexterm zone="ch-system-readline libreadline"><primary sortas="c-libreadline">libreadline</primary></indexterm> 103 </listitem> 104 </varlistentry> 109 <varlistentry id="libhistory"> 110 <term><filename class="libraryfile">libhistory</filename></term> 111 <listitem> 112 <para>Provides a consistent user interface for recalling lines 113 of history</para> 114 <indexterm zone="ch-system-readline libhistory"> 115 <primary sortas="c-libhistory">libhistory</primary> 116 </indexterm> 117 </listitem> 118 </varlistentry> 105 119 106 </variablelist> 120 <varlistentry id="libreadline"> 121 <term><filename class="libraryfile">libreadline</filename></term> 122 <listitem> 123 <para>Aids in the consistency of user interface across discrete 124 programs that need to provide a command line interface</para> 125 <indexterm zone="ch-system-readline libreadline"> 126 <primary sortas="c-libreadline">libreadline</primary> 127 </indexterm> 128 </listitem> 129 </varlistentry> 107 130 108 </sect2> 131 </variablelist> 132 133 </sect2> 109 134 110 135 </sect1> 111 -
chapter06/revisedchroot.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-revisedchroot"> 7 <title>Cleaning Up</title> 8 <?dbhtml filename="revisedchroot.html"?> 9 <?dbhtml filename="revisedchroot.html"?> 9 10 10 <para>From now on, when reentering the chroot environment after 11 exiting, use the following modified chroot command:</para> 11 <title>Cleaning Up</title> 12 13 <para>From now on, when reentering the chroot environment after 14 exiting, use the following modified chroot command:</para> 12 15 13 16 <screen><userinput>chroot "$LFS" /usr/bin/env -i \ … … 16 19 /bin/bash --login</userinput></screen> 17 20 18 <para>The reason for this is that the programs in <filename19 class="directory">/tools</filename> are no longer needed. Since they are no20 longer needed you can delete the <filename class="directory">/tools</filename>21 directory if so desired.</para>21 <para>The reason for this is that the programs in <filename 22 class="directory">/tools</filename> are no longer needed. Since they are no 23 longer needed you can delete the <filename class="directory">/tools</filename> 24 directory if so desired.</para> 22 25 23 <note><para>Removing <filename class="directory">/tools</filename> will also 24 remove the temporary copies of Tcl, Expect, and DejaGNU which were used for 25 running the toolchain tests. If you need these programs later on, they will need 26 to be recompiled and re-installed. The BLFS book has instructions for this (see 27 <ulink url="&blfs-root;"/>).</para></note> 26 <note> 27 <para>Removing <filename class="directory">/tools</filename> will also 28 remove the temporary copies of Tcl, Expect, and DejaGNU which were used 29 for running the toolchain tests. If you need these programs later on, 30 they will need to be recompiled and re-installed. The BLFS book has 31 instructions for this (see <ulink url="&blfs-root;"/>).</para> 32 </note> 28 33 29 34 </sect1> 30 -
chapter06/sed.xml
r1ca11cd r3f3931b0 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-sed" role="wrap"> 7 <title>Sed-&sed-version;</title> 8 <?dbhtml filename="sed.html"?> 9 <?dbhtml filename="sed.html"?> 9 10 10 <indexterm zone="ch-system-sed"><primary sortas="a-Sed">Sed</primary></indexterm>11 <title>Sed-&sed-version;</title> 11 12 12 <sect2 role="package"><title/> 13 <para>The Sed package contains a stream editor.</para> 13 <indexterm zone="ch-system-sed"> 14 <primary sortas="a-Sed">Sed</primary> 15 </indexterm> 14 16 15 <segmentedlist> 16 <segtitle>&buildtime;</segtitle> 17 <segtitle>&diskspace;</segtitle> 18 <seglistitem><seg>0.2 SBU</seg><seg>8.4 MB</seg></seglistitem> 19 </segmentedlist> 17 <sect2 role="package"> 18 <title/> 20 19 21 <segmentedlist> 22 <segtitle>&dependencies;</segtitle> 23 <seglistitem><seg>Bash, Binutils, Coreutils, 24 Diffutils, GCC, Gettext, Glibc, Grep, Make, and Texinfo</seg></seglistitem> 25 </segmentedlist> 26 </sect2> 20 <para>The Sed package contains a stream editor.</para> 27 21 28 <sect2 role="installation"> 29 <title>Installation of Sed</title> 22 <segmentedlist> 23 <segtitle>&buildtime;</segtitle> 24 <segtitle>&diskspace;</segtitle> 30 25 31 <para>By default, Sed installs its HTML documentation in 32 <filename class="directory">/usr/share/doc</filename>. Alter this to 33 <filename class="directory">/usr/share/doc/sed-&sed-version;</filename> by 34 applying the following <command>sed</command>:</para> 26 <seglistitem> 27 <seg>0.2 SBU</seg> 28 <seg>8.4 MB</seg> 29 </seglistitem> 30 </segmentedlist> 31 32 <segmentedlist> 33 <segtitle>&dependencies;</segtitle> 34 35 <seglistitem> 36 <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, 37 Grep, Make, and Texinfo</seg> 38 </seglistitem> 39 </segmentedlist> 40 41 </sect2> 42 43 <sect2 role="installation"> 44 <title>Installation of Sed</title> 45 46 <para>By default, Sed installs its HTML documentation in 47 <filename class="directory">/usr/share/doc</filename>. Alter this to 48 <filename class="directory">/usr/share/doc/sed-&sed-version;</filename> by 49 applying the following <command>sed</command>:</para> 35 50 36 51 <screen><userinput>sed -i 's@/doc@&/sed-&sed-version;@' doc/Makefile.in</userinput></screen> 37 52 38 <para>Prepare Sed for compilation:</para>53 <para>Prepare Sed for compilation:</para> 39 54 40 55 <screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> 41 56 42 <para>Compile the package:</para>57 <para>Compile the package:</para> 43 58 44 59 <screen><userinput>make</userinput></screen> 45 60 46 <para>To test the results, issue:47 <userinput>make check</userinput>.</para>61 <para>To test the results, issue: 62 <userinput>make check</userinput>.</para> 48 63 49 <para>Install the package:</para>64 <para>Install the package:</para> 50 65 51 66 <screen><userinput>make install</userinput></screen> 52 67 53 </sect2>68 </sect2> 54 69 70 <sect2 id="contents-sed" role="content"> 71 <title>Contents of Sed</title> 55 72 56 <sect2 id="contents-sed" role="content"><title>Contents of Sed</title> 73 <segmentedlist> 74 <segtitle>Installed program</segtitle> 57 75 58 <segmentedlist>59 <segtitle>Installed program</segtitle>60 <seglistitem><seg>sed</seg></seglistitem>61 </segmentedlist>76 <seglistitem> 77 <seg>sed</seg> 78 </seglistitem> 79 </segmentedlist> 62 80 63 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 64 <?dbfo list-presentation="list"?> 65 <?dbhtml list-presentation="table"?> 81 <variablelist> 82 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 83 <?dbfo list-presentation="list"?> 84 <?dbhtml list-presentation="table"?> 66 85 67 <varlistentry id="sed"> 68 <term><command>sed</command></term> 69 <listitem> 70 <para>Filters and transforms text files in a single pass</para> 71 <indexterm zone="ch-system-sed sed"><primary sortas="b-sed">sed</primary></indexterm> 72 </listitem> 73 </varlistentry> 74 </variablelist> 86 <varlistentry id="sed"> 87 <term><command>sed</command></term> 88 <listitem> 89 <para>Filters and transforms text files in a single pass</para> 90 <indexterm zone="ch-system-sed sed"> 91 <primary sortas="b-sed">sed</primary> 92 </indexterm> 93 </listitem> 94 </varlistentry> 75 95 76 </sect2> 96 </variablelist> 97 98 </sect2> 77 99 78 100 </sect1> 79
Note:
See TracChangeset
for help on using the changeset viewer.