diff options
author | Thomas Trepl <thomas@linuxfromscratch.org> | 2020-06-29 07:55:01 +0000 |
---|---|---|
committer | Thomas Trepl <thomas@linuxfromscratch.org> | 2020-06-29 07:55:01 +0000 |
commit | 37e35d2ada5397a52c643a1c9b99ca966687081f (patch) | |
tree | d5f622631e4d1892b822d7ccf14ae00d1793dee4 | |
parent | d4fdde6efecd6173690ac9909e0b129890534f88 (diff) |
Update to new lfs structure
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11986 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | appendices/dependencies.xml | 18 | ||||
-rw-r--r-- | chapter01/askforhelp.xml | 9 | ||||
-rw-r--r-- | chapter01/changelog.xml | 115 | ||||
-rw-r--r-- | chapter01/how.xml | 48 | ||||
-rw-r--r-- | chapter01/livecd.xml | 106 | ||||
-rw-r--r-- | chapter01/whatsnew.xml | 11 | ||||
-rw-r--r-- | chapter02/creatingfilesystem.xml | 35 | ||||
-rw-r--r-- | chapter02/creatingpartition.xml | 45 | ||||
-rw-r--r-- | chapter02/hostreqs.xml | 3 | ||||
-rw-r--r-- | chapter02/stages.xml | 34 | ||||
-rw-r--r-- | chapter03/introduction.xml | 30 | ||||
-rw-r--r-- | chapter03/packages.xml | 35 | ||||
-rw-r--r-- | chapter03/patches.xml | 60 | ||||
-rw-r--r-- | chapter04/aboutlfs.xml | 39 | ||||
-rw-r--r-- | chapter04/aboutsbus.xml | 12 | ||||
-rw-r--r-- | chapter04/abouttestsuites.xml | 21 | ||||
-rw-r--r-- | chapter04/addinguser.xml | 18 | ||||
-rw-r--r-- | chapter04/chapter04.xml | 2 | ||||
-rw-r--r-- | chapter04/creatingminlayout.xml | 46 | ||||
-rw-r--r-- | chapter04/creatingtoolsdir.xml | 48 | ||||
-rw-r--r-- | chapter04/introduction.xml | 2 | ||||
-rw-r--r-- | chapter04/settingenviron.xml | 74 | ||||
-rw-r--r-- | chapter05/bash.xml | 101 | ||||
-rw-r--r-- | chapter05/binutils-pass1.xml | 77 | ||||
-rw-r--r-- | chapter05/binutils-pass2.xml | 208 | ||||
-rw-r--r-- | chapter05/bzip2.xml | 91 | ||||
-rw-r--r-- | chapter05/changingowner.xml | 53 | ||||
-rw-r--r-- | chapter05/chapter05.xml | 35 | ||||
-rw-r--r-- | chapter05/coreutils.xml | 99 | ||||
-rw-r--r-- | chapter05/diffutils.xml | 74 | ||||
-rw-r--r-- | chapter05/file.xml | 74 | ||||
-rw-r--r-- | chapter05/findutils.xml | 80 | ||||
-rw-r--r-- | chapter05/flex.xml | 72 | ||||
-rw-r--r-- | chapter05/gawk.xml | 74 | ||||
-rw-r--r-- | chapter05/gcc-pass1.xml | 234 | ||||
-rw-r--r-- | chapter05/gcc-pass2.xml | 267 | ||||
-rw-r--r-- | chapter05/glibc.xml | 426 | ||||
-rw-r--r-- | chapter05/grep.xml | 74 | ||||
-rw-r--r-- | chapter05/gzip.xml | 74 | ||||
-rw-r--r-- | chapter05/introduction.xml | 20 | ||||
-rw-r--r-- | chapter05/libstdc++.xml | 51 | ||||
-rw-r--r-- | chapter05/linux-headers.xml | 152 | ||||
-rw-r--r-- | chapter05/m4.xml | 79 | ||||
-rw-r--r-- | chapter05/ncurses.xml | 177 | ||||
-rw-r--r-- | chapter05/patch.xml | 74 | ||||
-rw-r--r-- | chapter05/sed.xml | 74 | ||||
-rw-r--r-- | chapter05/stripping.xml | 57 | ||||
-rw-r--r-- | chapter05/tar.xml | 74 | ||||
-rw-r--r-- | chapter05/toolchaintechnotes.xml | 166 | ||||
-rw-r--r-- | chapter05/util-linux.xml | 180 | ||||
-rw-r--r-- | chapter05/xz.xml | 120 | ||||
-rw-r--r-- | chapter05/zlib.xml | 101 | ||||
-rw-r--r-- | chapter06/bash.xml | 137 | ||||
-rw-r--r-- | chapter06/binutils-pass2.xml | 118 | ||||
-rw-r--r-- | chapter06/chapter06.xml | 101 | ||||
-rw-r--r-- | chapter06/coreutils.xml | 1265 | ||||
-rw-r--r-- | chapter06/createfiles.xml | 401 | ||||
-rw-r--r-- | chapter06/diffutils.xml | 85 | ||||
-rw-r--r-- | chapter06/file.xml | 128 | ||||
-rw-r--r-- | chapter06/findutils.xml | 124 | ||||
-rw-r--r-- | chapter06/gawk.xml | 86 | ||||
-rw-r--r-- | chapter06/gcc-pass2.xml | 188 | ||||
-rw-r--r-- | chapter06/glibc-32.xml | 184 | ||||
-rw-r--r-- | chapter06/grep.xml | 73 | ||||
-rw-r--r-- | chapter06/grub.xml | 374 | ||||
-rw-r--r-- | chapter06/gzip.xml | 196 | ||||
-rw-r--r-- | chapter06/introduction.xml | 87 | ||||
-rw-r--r-- | chapter06/isl.xml | 113 | ||||
-rw-r--r-- | chapter06/linux-firmware.xml | 64 | ||||
-rw-r--r-- | chapter06/linux-headers.xml | 209 | ||||
-rw-r--r-- | chapter06/m4.xml | 64 | ||||
-rw-r--r-- | chapter06/make.xml | 76 | ||||
-rw-r--r-- | chapter06/ncurses.xml | 493 | ||||
-rw-r--r-- | chapter06/patch.xml | 58 | ||||
-rw-r--r-- | chapter06/sed.xml | 71 | ||||
-rw-r--r-- | chapter06/tar.xml | 76 | ||||
-rw-r--r-- | chapter06/xz.xml | 390 | ||||
-rw-r--r-- | chapter07/bison.xml (renamed from chapter05/bison.xml) | 26 | ||||
-rw-r--r-- | chapter07/changingowner.xml | 46 | ||||
-rw-r--r-- | chapter07/chapter07.xml | 51 | ||||
-rw-r--r-- | chapter07/chroot.xml (renamed from chapter06/chroot.xml) | 31 | ||||
-rw-r--r-- | chapter07/createfiles.xml | 210 | ||||
-rw-r--r-- | chapter07/creatingdirs.xml (renamed from chapter06/creatingdirs.xml) | 27 | ||||
-rw-r--r-- | chapter07/gettext.xml (renamed from chapter05/gettext.xml) | 28 | ||||
-rw-r--r-- | chapter07/introduction.xml | 232 | ||||
-rw-r--r-- | chapter07/kernfs.xml (renamed from chapter06/kernfs.xml) | 19 | ||||
-rw-r--r-- | chapter07/libstdc++-pass2.xml | 136 | ||||
-rw-r--r-- | chapter07/perl.xml (renamed from chapter05/perl.xml) | 41 | ||||
-rw-r--r-- | chapter07/python.xml (renamed from chapter05/python.xml) | 26 | ||||
-rw-r--r-- | chapter07/stripping.xml | 191 | ||||
-rw-r--r-- | chapter07/texinfo.xml (renamed from chapter05/texinfo.xml) | 19 | ||||
-rw-r--r-- | chapter07/util-linux.xml | 192 | ||||
-rw-r--r-- | chapter08/aboutdebug.xml (renamed from chapter06/aboutdebug.xml) | 4 | ||||
-rw-r--r-- | chapter08/acl.xml (renamed from chapter06/acl.xml) | 48 | ||||
-rw-r--r-- | chapter08/adjusting.xml (renamed from chapter06/adjusting.xml) | 8 | ||||
-rw-r--r-- | chapter08/attr.xml (renamed from chapter06/attr.xml) | 36 | ||||
-rw-r--r-- | chapter08/autoconf.xml (renamed from chapter06/autoconf.xml) | 8 | ||||
-rw-r--r-- | chapter08/automake.xml (renamed from chapter06/automake.xml) | 20 | ||||
-rw-r--r-- | chapter08/bash.xml | 166 | ||||
-rw-r--r-- | chapter08/bc.xml (renamed from chapter06/bc.xml) | 64 | ||||
-rw-r--r-- | chapter08/binutils.xml (renamed from chapter06/binutils.xml) | 23 | ||||
-rw-r--r-- | chapter08/bison.xml (renamed from chapter06/bison.xml) | 29 | ||||
-rw-r--r-- | chapter08/bzip2.xml (renamed from chapter06/bzip2.xml) | 46 | ||||
-rw-r--r-- | chapter08/chapter08.xml | 98 | ||||
-rw-r--r-- | chapter08/check.xml (renamed from chapter06/check.xml) | 10 | ||||
-rw-r--r-- | chapter08/coreutils.xml | 1292 | ||||
-rw-r--r-- | chapter08/dbus.xml (renamed from chapter06/dbus.xml) | 14 | ||||
-rw-r--r-- | chapter08/dejagnu.xml (renamed from chapter05/dejagnu.xml) | 12 | ||||
-rw-r--r-- | chapter08/diffutils.xml | 125 | ||||
-rw-r--r-- | chapter08/e2fsprogs.xml (renamed from chapter06/e2fsprogs.xml) | 48 | ||||
-rw-r--r-- | chapter08/eudev.xml (renamed from chapter06/eudev.xml) | 54 | ||||
-rw-r--r-- | chapter08/expat.xml (renamed from chapter06/expat.xml) | 37 | ||||
-rw-r--r-- | chapter08/expect.xml (renamed from chapter05/expect.xml) | 61 | ||||
-rw-r--r-- | chapter08/file.xml | 167 | ||||
-rw-r--r-- | chapter08/findutils.xml | 161 | ||||
-rw-r--r-- | chapter08/flex.xml (renamed from chapter06/flex.xml) | 4 | ||||
-rw-r--r-- | chapter08/gawk.xml | 128 | ||||
-rw-r--r-- | chapter08/gcc.xml (renamed from chapter06/gcc.xml) | 99 | ||||
-rw-r--r-- | chapter08/gdbm.xml (renamed from chapter06/gdbm.xml) | 10 | ||||
-rw-r--r-- | chapter08/gettext.xml (renamed from chapter06/gettext.xml) | 36 | ||||
-rw-r--r-- | chapter08/glibc.xml (renamed from chapter06/glibc.xml) | 263 | ||||
-rw-r--r-- | chapter08/gmp.xml (renamed from chapter06/gmp.xml) | 76 | ||||
-rw-r--r-- | chapter08/gperf.xml (renamed from chapter06/gperf.xml) | 4 | ||||
-rw-r--r-- | chapter08/grep.xml | 111 | ||||
-rw-r--r-- | chapter08/groff.xml (renamed from chapter06/groff.xml) | 4 | ||||
-rw-r--r-- | chapter08/grub.xml | 543 | ||||
-rw-r--r-- | chapter08/gzip.xml | 233 | ||||
-rw-r--r-- | chapter08/iana-etc.xml (renamed from chapter06/iana-etc.xml) | 4 | ||||
-rw-r--r-- | chapter08/inetutils.xml (renamed from chapter06/inetutils.xml) | 4 | ||||
-rw-r--r-- | chapter08/intltool.xml (renamed from chapter06/intltool.xml) | 8 | ||||
-rw-r--r-- | chapter08/introduction.xml | 67 | ||||
-rw-r--r-- | chapter08/iproute2.xml (renamed from chapter06/iproute2.xml) | 8 | ||||
-rw-r--r-- | chapter08/kbd.xml (renamed from chapter06/kbd.xml) | 39 | ||||
-rw-r--r-- | chapter08/kmod.xml (renamed from chapter06/kmod.xml) | 65 | ||||
-rw-r--r-- | chapter08/less.xml (renamed from chapter06/less.xml) | 4 | ||||
-rw-r--r-- | chapter08/libcap.xml (renamed from chapter06/libcap.xml) | 32 | ||||
-rw-r--r-- | chapter08/libelf.xml (renamed from chapter06/libelf.xml) | 42 | ||||
-rw-r--r-- | chapter08/libffi.xml (renamed from chapter06/libffi.xml) | 59 | ||||
-rw-r--r-- | chapter08/libpipeline.xml (renamed from chapter06/libpipeline.xml) | 20 | ||||
-rw-r--r-- | chapter08/libtool.xml (renamed from chapter06/libtool.xml) | 35 | ||||
-rw-r--r-- | chapter08/m4.xml | 104 | ||||
-rw-r--r-- | chapter08/make.xml (renamed from chapter05/make.xml) | 68 | ||||
-rw-r--r-- | chapter08/man-db.xml (renamed from chapter06/man-db.xml) | 15 | ||||
-rw-r--r-- | chapter08/man-pages.xml (renamed from chapter06/man-pages.xml) | 4 | ||||
-rw-r--r-- | chapter08/meson.xml (renamed from chapter06/meson.xml) | 24 | ||||
-rw-r--r-- | chapter08/mpc.xml (renamed from chapter06/mpc.xml) | 4 | ||||
-rw-r--r-- | chapter08/mpfr.xml (renamed from chapter06/mpfr.xml) | 4 | ||||
-rw-r--r-- | chapter08/ncurses.xml | 470 | ||||
-rw-r--r-- | chapter08/ninja.xml (renamed from chapter06/ninja.xml) | 13 | ||||
-rw-r--r-- | chapter08/openssl.xml (renamed from chapter06/openssl.xml) | 53 | ||||
-rw-r--r-- | chapter08/patch.xml | 96 | ||||
-rw-r--r-- | chapter08/perl.xml (renamed from chapter06/perl.xml) | 10 | ||||
-rw-r--r-- | chapter08/pkgconfig.xml (renamed from chapter06/pkgconfig.xml) | 10 | ||||
-rw-r--r-- | chapter08/pkgmgt.xml (renamed from chapter06/pkgmgt.xml) | 37 | ||||
-rw-r--r-- | chapter08/procps.xml (renamed from chapter06/procps.xml) | 6 | ||||
-rw-r--r-- | chapter08/psmisc.xml (renamed from chapter06/psmisc.xml) | 4 | ||||
-rw-r--r-- | chapter08/python.xml (renamed from chapter06/python.xml) | 29 | ||||
-rw-r--r-- | chapter08/readline.xml (renamed from chapter06/readline.xml) | 44 | ||||
-rw-r--r-- | chapter08/revisedchroot.xml (renamed from chapter06/revisedchroot.xml) | 41 | ||||
-rw-r--r-- | chapter08/sed.xml | 97 | ||||
-rw-r--r-- | chapter08/shadow.xml (renamed from chapter06/shadow.xml) | 14 | ||||
-rw-r--r-- | chapter08/strippingagain.xml (renamed from chapter06/strippingagain.xml) | 113 | ||||
-rw-r--r-- | chapter08/sysklogd.xml (renamed from chapter06/sysklogd.xml) | 6 | ||||
-rw-r--r-- | chapter08/systemd.xml (renamed from chapter06/systemd.xml) | 235 | ||||
-rw-r--r-- | chapter08/sysvinit.xml (renamed from chapter06/sysvinit.xml) | 4 | ||||
-rw-r--r-- | chapter08/tar.xml | 119 | ||||
-rw-r--r-- | chapter08/tcl.xml (renamed from chapter05/tcl.xml) | 99 | ||||
-rw-r--r-- | chapter08/texinfo.xml (renamed from chapter06/texinfo.xml) | 14 | ||||
-rw-r--r-- | chapter08/util-linux.xml (renamed from chapter06/util-linux.xml) | 36 | ||||
-rw-r--r-- | chapter08/vim.xml (renamed from chapter06/vim.xml) | 38 | ||||
-rw-r--r-- | chapter08/xml-parser.xml (renamed from chapter06/xml-parser.xml) | 4 | ||||
-rw-r--r-- | chapter08/xz.xml | 426 | ||||
-rw-r--r-- | chapter08/zlib.xml (renamed from chapter06/zlib.xml) | 35 | ||||
-rw-r--r-- | chapter08/zstd.xml (renamed from chapter06/zstd.xml) | 50 | ||||
-rw-r--r-- | chapter09/bootscripts.xml (renamed from chapter07/bootscripts.xml) | 4 | ||||
-rw-r--r-- | chapter09/chapter09.xml | 36 | ||||
-rw-r--r-- | chapter09/clock.xml (renamed from chapter07/clock.xml) | 6 | ||||
-rw-r--r-- | chapter09/consoled.xml (renamed from chapter07/consoled.xml) | 14 | ||||
-rw-r--r-- | chapter09/etcshells.xml (renamed from chapter07/etcshells.xml) | 10 | ||||
-rw-r--r-- | chapter09/inputrc.xml (renamed from chapter07/inputrc.xml) | 6 | ||||
-rw-r--r-- | chapter09/introduction.xml | 91 | ||||
-rw-r--r-- | chapter09/introductiond.xml (renamed from chapter07/introductiond.xml) | 7 | ||||
-rw-r--r-- | chapter09/locale.xml (renamed from chapter07/locale.xml) | 26 | ||||
-rw-r--r-- | chapter09/network.xml (renamed from chapter07/network.xml) | 18 | ||||
-rw-r--r-- | chapter09/networkd.xml (renamed from chapter07/networkd.xml) | 59 | ||||
-rw-r--r-- | chapter09/profile.xml (renamed from chapter07/profile.xml) | 10 | ||||
-rw-r--r-- | chapter09/symlinks.xml (renamed from chapter07/symlinks.xml) | 46 | ||||
-rw-r--r-- | chapter09/systemd-custom.xml (renamed from chapter07/systemd-custom.xml) | 33 | ||||
-rw-r--r-- | chapter09/udev.xml (renamed from chapter07/udev.xml) | 34 | ||||
-rw-r--r-- | chapter09/usage.xml (renamed from chapter07/usage.xml) | 70 | ||||
-rw-r--r-- | chapter10/chapter10.xml | 19 | ||||
-rw-r--r-- | chapter10/fstab.xml (renamed from chapter08/fstab.xml) | 0 | ||||
-rw-r--r-- | chapter10/grub.xml | 190 | ||||
-rw-r--r-- | chapter10/introduction.xml | 18 | ||||
-rw-r--r-- | chapter10/kernel.xml (renamed from chapter08/kernel.xml) | 22 | ||||
-rw-r--r-- | chapter11/chapter11.xml | 19 | ||||
-rw-r--r-- | chapter11/getcounted.xml (renamed from chapter09/getcounted.xml) | 0 | ||||
-rw-r--r-- | chapter11/reboot.xml (renamed from chapter09/reboot.xml) | 8 | ||||
-rw-r--r-- | chapter11/theend.xml (renamed from chapter09/theend.xml) | 2 | ||||
-rw-r--r-- | chapter11/whatnow.xml (renamed from chapter09/whatnow.xml) | 4 | ||||
-rw-r--r-- | general.ent | 14 | ||||
-rw-r--r-- | index.xml | 16 | ||||
-rw-r--r-- | packages.ent | 539 | ||||
-rw-r--r-- | part3intro/generalinstructions.xml (renamed from chapter05/generalinstructions.xml) | 14 | ||||
-rw-r--r-- | part3intro/introduction.xml | 34 | ||||
-rw-r--r-- | part3intro/part3intro.xml | 18 | ||||
-rw-r--r-- | part3intro/toolchaintechnotes.xml | 340 | ||||
-rw-r--r-- | patches.ent | 8 | ||||
-rw-r--r-- | prologue/architecture.xml | 2 | ||||
-rw-r--r-- | prologue/organization.xml | 21 | ||||
-rw-r--r-- | prologue/typography.xml | 4 | ||||
-rw-r--r-- | prologue/why.xml | 25 | ||||
-rw-r--r-- | stylesheets/lfs-xsl/lfs.css | 35 |
214 files changed, 9179 insertions, 10092 deletions
@@ -26,7 +26,7 @@ ifeq ($(REV), sysv) BASEDIR ?= ~/lfs-book PDF_OUTPUT ?= LFS-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-BOOK.html - DUMPDIR ?= ~/lfs-commands + DUMPDIR ?= ~/cross-lfs-commands else BASEDIR ?= ~/lfs-systemd PDF_OUTPUT ?= LFS-SYSD-BOOK.pdf @@ -59,9 +59,6 @@ book: validate profile-html @echo "Copying CSS code and images..." $(Q)mkdir -p $(BASEDIR)/stylesheets $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets - $(Q)pushd $(BASEDIR)/ > /dev/null; \ -# sed -i -e "s@../stylesheets@stylesheets@g" *.html; \ - popd > /dev/null $(Q)mkdir -p $(BASEDIR)/images $(Q)cp images/*.png $(BASEDIR)/images @@ -175,7 +172,6 @@ $(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \ # $(Q)xsltproc --nonet --xinclude \ # --stringparam profile.revision $(REV) \ -# --stringparam profile.arch $(ARCH) \ # --output $(RENDERTMP)/sysd-wget.xml \ # stylesheets/lfs-xsl/profile.xsl \ # chapter03/chapter03.xml @@ -193,7 +189,7 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ $(Q)xsltproc --nonet --xinclude \ --stringparam profile.revision $(REV) \ - --stringparam profile.arch $(ARCH) \ + --stringparam profile.arch $(ARCH) \ --output $(RENDERTMP)/sysv-md5sum.xml \ stylesheets/lfs-xsl/profile.xsl \ chapter03/chapter03.xml @@ -211,7 +207,6 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ # $(Q)xsltproc --nonet \ # --output $(RENDERTMP)/lfs-html.xml \ # --stringparam profile.revision $(REV) \ -# --stringparam profile.arch $(ARCH) \ # stylesheets/lfs-xsl/profile.xsl \ # $(RENDERTMP)/lfs-full.xml diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index ddda9377c..d93438fce 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -828,8 +828,8 @@ </seglistitem> </segmentedlist> -<!-- Begin Gcc dependency info --> - <bridgehead renderas="sect2" id="gcc-dep">Gcc</bridgehead> +<!-- Begin GCC dependency info --> + <bridgehead renderas="sect2" id="gcc-dep">GCC</bridgehead> <segmentedlist> <segtitle>&dependencies;</segtitle> @@ -1303,8 +1303,8 @@ <segtitle>&dependencies;</segtitle> <seglistitem> - <seg>Bash, Bison, Coreutils, Flex, GCC, Glibc, Make, - and Linux API Headers</seg> + <seg>Bash, Bison, Coreutils, Flex, GCC, Glibc, Make, Libcap, + Libelf, and Linux API Headers</seg> </seglistitem> </segmentedlist> @@ -1328,7 +1328,7 @@ <segtitle>&external;</segtitle> <seglistitem> - <seg>None</seg> + <seg>Berkeley DB and Iptables</seg> </seglistitem> </segmentedlist> @@ -1464,7 +1464,7 @@ <segtitle>&before;</segtitle> <seglistitem> - <seg>Shadow</seg> + <seg>IProute2 and Shadow</seg> </seglistitem> </segmentedlist> @@ -1499,7 +1499,7 @@ <segtitle>&before;</segtitle> <seglistitem> - <seg>Linux Kernel</seg> + <seg>IProute2 and Linux Kernel</seg> </seglistitem> </segmentedlist> @@ -1948,7 +1948,7 @@ <segtitle>&dependencies;</segtitle> <seglistitem> - <seg>Binutils, Coreutils, Gcc, and Python</seg> + <seg>Binutils, Coreutils, GCC, and Python</seg> </seglistitem> </segmentedlist> @@ -1983,7 +1983,7 @@ <segtitle>&dependencies;</segtitle> <seglistitem> - <seg>Binutils, Coreutils, Gcc, Make, and Perl</seg> + <seg>Binutils, Coreutils, GCC, Make, and Perl</seg> </seglistitem> </segmentedlist> diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml index 79df30db5..8a8ba39a4 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -38,12 +38,13 @@ <itemizedlist> <listitem> - <para>The version of the book being used (in this case + <para> + The version of the book being used (in this case <phrase arch="default" revision="sysv">&version;</phrase> <phrase arch="ml_32,ml_x32,ml_all" revision="sysv">&version;-multilib</phrase> <phrase arch="default" revision="systemd">&versiond;</phrase> - <phrase arch="ml_32,ml_x32,ml_all" revision="systemd">&versiond;-multilib</phrase>)</para> - + <phrase arch="ml_32,ml_x32,ml_all" revision="systemd">&versiond;-multilib</phrase>) + </para> </listitem> <listitem> <para>The host distribution and version being used to create LFS</para> @@ -58,7 +59,7 @@ <para>The exact error message or symptom being received</para> </listitem> <listitem> - <para>Note whether you have deviated from the book at all </para> + <para>Note whether you have deviated from the book at all</para> </listitem> </itemizedlist> diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 850a36f29..c40502c15 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -11,10 +11,10 @@ <title>Changelog</title> <para>This is version - <phrase arch="default" revision="sysv">&version;</phrase> - <phrase arch="ml_32,ml_x32,ml_all" revision="sysv">&version;-multilib</phrase> - <phrase arch="default" revision="systemd">&versiond;</phrase> - <phrase arch="ml_32,ml_x32,ml_all" revision="systemd">&versiond;-multilib</phrase> + <phrase arch="default" revision="sysv">&version;</phrase> + <phrase arch="ml_32,ml_x32,ml_all" revision="sysv">&version;-multilib</phrase> + <phrase arch="default" revision="systemd">&versiond;</phrase> + <phrase arch="ml_32,ml_x32,ml_all" revision="systemd">&versiond;-multilib</phrase> of the Linux From Scratch book, dated &releasedate;. If this book is more than six months old, a newer and better version is probably already available. To find out, please check one of the @@ -44,6 +44,92 @@ <listitem revision="sysv"> or <listitem revision="systemd"> as appropriate for the entry or if needed the entire day's listitem. --> + <listitem revision="systemd"> + <itemizedlist> + <para>2020-06-22</para> + <listitem> + <para>[renodr] - Fix a segfault in systemd-udevd.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> + <itemizedlist> + <para>2020-06-17</para> + <listitem> + <para>[bdubbs] - Update to meson-0.54.3. Fixes + <ulink url="&lfs-ticket-root;4673">#4673</ulink>.</para> + </listitem> + <listitem> + <para>[bdubbs] - Update to man-pages-5.07. Fixes + <ulink url="&lfs-ticket-root;4669">#4669</ulink>.</para> + </listitem> + <listitem> + <para>[bdubbs] - Update to linux-5.7.2. Fixes + <ulink url="&lfs-ticket-root;4662">#4662</ulink>.</para> + </listitem> + <listitem> + <para>[bdubbs] - Update to iproute2-5.7.0. Fixes + <ulink url="&lfs-ticket-root;4668">#4668</ulink>.</para> + </listitem> + <listitem> + <para>[bdubbs] - Update to file-5.39. Fixes + <ulink url="&lfs-ticket-root;4671">#4671</ulink>.</para> + </listitem> + <listitem> + <para>[bdubbs] - Update to elfutils-0.180. Fixes + <ulink url="&lfs-ticket-root;4670">#4670</ulink>.</para> + </listitem> + <listitem> + <para>[bdubbs] - Update to bison-3.6.4. Fixes + <ulink url="&lfs-ticket-root;4672">#4672</ulink>.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> + <para>2020-06-16</para> + <itemizedlist> + <listitem> + <para>[bdubbs] - Split Chapter 5 into three separate chapters. + Implement a new method of cross-building the LFS tool chain + and other tools to simplify the method of isolating the + new system from the original host. This will be the start of + LFS-10.0.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> + <para>2020-06-03</para> + <itemizedlist> + <listitem revision="systemd"> + <para>[renodr] - Fix systemd's build with GCC-10 with a patch instead + of CFLAGS.</para> + </listitem> + <listitem> + <para>[renodr] - Update to perl-5.30.3 (security update). Fixes + <ulink url="&lfs-ticket-root;4664">#4664</ulink>.</para> + </listitem> + <listitem revision="systemd"> + <para>[renodr] - Update to dbus-1.12.18 (security update). Fixes + <ulink url="&lfs-ticket-root;4665">#4665</ulink>.</para> + </listitem> + <listitem> + <para>[renodr] - Update to man-db-2.9.2. Fixes + <ulink url="&lfs-ticket-root;4663">#4663</ulink>.</para> + </listitem> + <listitem> + <para>[renodr] - Update to libcap-2.36. Fixes + <ulink url="&lfs-ticket-root;4666">#4666</ulink>.</para> + </listitem> + <listitem> + <para>[renodr] - Update to bison-3.6.3. Fixes + <ulink url="&lfs-ticket-root;4667">#4667</ulink>.</para> + </listitem> + </itemizedlist> + </listitem> + <listitem> <para>2020-05-31</para> <itemizedlist> @@ -60,6 +146,17 @@ <para>2020-05-29</para> <itemizedlist> <listitem> + <para>[xry111] - Move flex earlier in chapter 6, so that binutils + can use it.</para> + </listitem> + <listitem> + <para>[xry111] - Remove bzip2 and flex from chapter 5.</para> + </listitem> + <listitem> + <para>[xry111] - Move zstd earlier in chapter 6, so that file and + GCC can use it.</para> + </listitem> + <listitem> <para>[bdubbs] - Run sed and findutils tests as an unprivileged user. Fixes <ulink url="&lfs-ticket-root;4661">#4661</ulink>.</para> @@ -177,6 +274,16 @@ </listitem> <listitem> + <para>2020-05-09</para> + <itemizedlist> + <listitem> + <para>[pierre] - Patch GCC pass 2 to allow cross-compile + (specific to new cross method).</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> <para>2020-05-08</para> <itemizedlist> <listitem> diff --git a/chapter01/how.xml b/chapter01/how.xml index 3a8942dba..a690fb595 100644 --- a/chapter01/how.xml +++ b/chapter01/how.xml @@ -44,42 +44,28 @@ discusses the setup of an appropriate working environment. Please read <xref linkend="chapter-final-preps"/> carefully as it explains several important issues you need be aware of before beginning to - work your way through <xref linkend="chapter-temporary-tools"/> and beyond.</para> + work your way through <xref linkend="chapter-cross-tools"/> and beyond.</para> - <para><xref linkend="chapter-temporary-tools"/> explains the - installation of a number of packages that will form the basic - development suite (or toolchain) which is used to build the actual - system in <xref linkend="chapter-building-system"/>. Some of these - packages are needed to resolve circular dependencies—for example, - to compile a compiler, you need a compiler.</para> + <para><xref linkend="chapter-cross-tools"/>, explains the installation of + the initial tool chain, (binutils, gcc, and glibc) using cross compilation + techniques to isolate the new tools from the host system.</para> - <para><xref linkend="chapter-temporary-tools"/> also shows you how to - build a first pass of the toolchain, including Binutils and GCC (first pass - basically means these two core packages will be reinstalled). - The next step is to build Glibc, the C library. Glibc will be compiled by - the toolchain programs built in the first pass. Then, a second pass of the - toolchain will be built. This time, the toolchain will be dynamically linked - against the newly built Glibc. The remaining <xref - linkend="chapter-temporary-tools"/> packages are built using this second - pass toolchain. When this is done, the LFS installation process will no - longer depend on the host distribution, with the exception of the running - kernel. </para> + <para><xref linkend="chapter-temporary-tools"/> shows you how to + cross-compile basic utilities using the just built cross-toolchain.</para> + + <para><xref linkend="chapter-chroot-temporary-tools"/> then enters a + "chroot" environment and uses the previously built tools to build + the additional tools needed to build and test the final system.</para> <para>This effort to isolate the new system from the host distribution may - seem excessive. A full technical explanation as to why this is done is provided in - <xref linkend="ch-tools-toolchaintechnotes"/>.</para> + seem excessive. A full technical explanation as to why this is done is + provided in <xref linkend="ch-tools-toolchaintechnotes"/>.</para> - <para>In <xref linkend="chapter-building-system"/>, the full LFS system is - built. The <command>chroot</command> (change root) program is used to enter - a virtual environment and start a new shell whose root directory will be - set to the LFS partition. This is very similar to rebooting and instructing - the kernel to mount the LFS partition as the root partition. The system - does not actually reboot, but instead uses <command>chroot</command> because - creating a bootable system requires additional work which is not necessary - just yet. The major advantage is that <quote>chrooting</quote> allows you - to continue using the host system while LFS is being built. While waiting - for package compilations to complete, you can continue using your computer as - normal.</para> + <para>In <xref linkend="chapter-building-system"/>, The + full LFS system is built. Another advantage provided by the chroot + environment is that it allows you to continue using the host system + while LFS is being built. While waiting for package compilations to + complete, you can continue using your computer as normal.</para> <para>To finish the installation, the basic system configuration is set up in <xref linkend="chapter-config"/>, and the kernel and boot loader are set diff --git a/chapter01/livecd.xml b/chapter01/livecd.xml deleted file mode 100644 index e4886581c..000000000 --- a/chapter01/livecd.xml +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-intro-livecd"> - <?dbhtml filename="livecd.html"?> - - <title>About the Included CD</title> - - <para>For your convenience, we have included a CD with this book that - contains the source packages needed for creating a Linux From Scratch - system. The CD is bootable and provides a stable working environment - for building LFS. This book refers to this system as the - <quote>host system.</quote> The CD images are actively maintained and - updated versions can be found at - <ulink url="ftp://ftp.lfs-matrix.net/pub/lfs-livecd/"/></para> - - <para>In addition to the tools required to build LFS, the host system - on the CD has a number of other helpful tools installed:</para> - - <itemizedlist> - - <listitem> - <para>An HTML version of this book</para> - </listitem> - - <listitem> - <para>The X Window System Environment</para> - </listitem> - - <listitem> - <para>Web Tools</para> - <itemizedlist> - <listitem> - <para>Wget (command line file retriever)</para> - </listitem> - <listitem> - <para>Lynx (text web browser)</para> - </listitem> - <listitem> - <para>Irssi (console IRC client)</para> - </listitem> - <listitem> - <para>Firefox (graphical web browser)</para> - </listitem> - <listitem> - <para>Xchat (X-based IRC client)</para> - </listitem> - </itemizedlist> - </listitem> - - <listitem> - <para>Text Editors</para> - <itemizedlist> - <listitem> - <para>Vim</para> - </listitem> - <listitem> - <para>Nano</para> - </listitem> - </itemizedlist> - </listitem> - - <listitem> - <para>Network Tools</para> - <itemizedlist> - <listitem> - <para>SSH Server and Client</para> - </listitem> - <listitem> - <para>NFS Server and Client</para> - </listitem> - <listitem> - <para>Smbmount (mount.cifs) for Windows shares</para> - </listitem> - <listitem> - <para>Subversion</para> - </listitem> - <listitem> - <para>Dhcpcd (DHCP client)</para> - </listitem> - </itemizedlist> - </listitem> - - <listitem> - <para>Filesystem Programs</para> - <itemizedlist> - <listitem> - <para>Reiserfsprogs</para> - </listitem> - <listitem> - <para>Xfsprogs</para> - </listitem> - </itemizedlist> - </listitem> - - <listitem> - <para>nALFS - A tool for automating LFS builds</para> - </listitem> - - </itemizedlist> - -</sect1> diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 14ea32943..70fb7f29b 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -11,6 +11,10 @@ <title>What's new since the last release</title> + <para>In this version of LFS, there has been a major reorganization + of the book using techniques that avoid changing the host system + and provides a more straight forward build process.</para> + <para>Below is a list of package updates made since the previous release of the book.</para> @@ -80,9 +84,9 @@ <!-- <listitem> <para>Expect-&expect-version;</para> </listitem>--> - <!--<listitem> + <listitem> <para>File-&file-version;</para> - </listitem>--> + </listitem> <!--<listitem> <para>Findutils-&findutils-version;</para> </listitem>--> @@ -164,9 +168,6 @@ <listitem> <para>Linux-&linux-version;</para> </listitem> - <listitem> - <para>Linux-Firmware-&linux-firmware-version;</para> - </listitem> <!--<listitem> <para>M4-&m4-version;</para> </listitem>--> diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml index 4a722efe0..f01b745e9 100644 --- a/chapter02/creatingfilesystem.xml +++ b/chapter02/creatingfilesystem.xml @@ -52,42 +52,9 @@ <screen role="nodump"><userinput>mkfs -v -t ext4 /dev/<replaceable><xxx></replaceable></userinput></screen> -<!-- <para>Replace <replaceable><xxx></replaceable> with the name of the LFS - partition (<filename class="devicefile">sda5</filename> in our previous - example).</para> + partition.</para> - <note> - <para>Some host distributions use custom features in their filesystem - creation tools (E2fsprogs). This can cause problems when booting into your new - LFS in Chapter 9, as those features will not be supported by the LFS-installed - E2fsprogs; you will get an error similar to <quote>unsupported filesystem - features, upgrade your e2fsprogs</quote>. To check if your host system - uses custom enhancements, run the following command:</para> - -<screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable><xxx></replaceable></userinput></screen> - - <para>If the output contains features other than - <option>has_journal</option>, <option>ext_attr</option>, - <option>resize_inode</option>, <option>dir_index</option>, - <option>filetype</option>, <option>sparse_super</option>, - <option>large_file</option> or <option>needs_recovery</option>, then your - host system may have custom enhancements. In that case, to avoid later - problems, you should compile the stock E2fsprogs package and use the - resulting binaries to re-create the filesystem on your LFS partition:</para> - -<screen role="nodump"><userinput>cd /tmp -tar -xzvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.gz -cd e2fsprogs-&e2fsprogs-version; -mkdir -v build -cd build -../configure -make #note that we intentionally don't 'make install' here! -./misc/mke2fs -jv /dev/<replaceable><xxx></replaceable> -cd /tmp -rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen> - </note> ---> <para>If you are using an existing <systemitem class="filesystem">swap </systemitem> partition, there is no need to format it. If a new <systemitem class="filesystem"> swap</systemitem> partition was created, diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml index 02d6528b1..672c2efb5 100644 --- a/chapter02/creatingpartition.xml +++ b/chapter02/creatingpartition.xml @@ -15,21 +15,6 @@ is to use an available empty partition or, if you have enough unpartitioned space, to create one.</para> -<!-- - - <para>It is possible to install an LFS system (in fact even multiple LFS - systems) on a partition already occupied by another - operating system and the different systems will co-exist peacefully. The - document <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/> - contains notes on how to implement this. This document was last updated - in 2004. It has not been updated since and it has not been tested with - recent versions of this LFS book. The document is more than likely not - usable as-is and you will need to account for changes made to the LFS - procedures since it was written. This is only recommended for expert LFS - users.</para> - ---> - <para>A minimal system requires a partition of around 10 gigabytes (GB). This is enough to store all the source tarballs and compile the packages. However, if the LFS system is intended to be the primary Linux system, @@ -77,7 +62,7 @@ <title>Other Partition Issues</title> <para>Requests for advice on system partitioning are often posted on the LFS mailing - lists. This is a highly subjective topic. The default for most distributions + lists. This is a highly subjective topic. The default for most distributions is to use the entire drive with the exception of one small swap partition. This is not optimal for LFS for several reasons. It reduces flexibility, makes sharing of data across multiple distributions or LFS builds more difficult, makes @@ -89,7 +74,7 @@ <para>A root LFS partition (not to be confused with the <filename class="directory">/root</filename> directory) of - ten gigabytes is a good compromise for most systems. It provides enough + twenty gigabytes is a good compromise for most systems. It provides enough space to build LFS and most of BLFS, but is small enough so that multiple partitions can be easily created for experimentation.</para> </sect3> @@ -102,13 +87,21 @@ hold the swap partition to two gigabytes and monitor the amount of disk swapping.</para> - <para>Swapping is never good. Generally you can tell if a system is - swapping by just listening to disk activity and observing how the system - reacts to commands. The first reaction to swapping should be to check for - an unreasonable command such as trying to edit a five gigabyte file. If - swapping becomes a normal occurrence, the best solution is to purchase more - RAM for your system.</para> - </sect3> + <para>If you want to use the hibernation feature (suspend-to-disk) of Linux, + it writes out the contents of RAM to the swap partition before turning off + the machine. In this case the size of the swap partition should be at + least as large as the system's installed RAM.</para> + + <para>Swapping is never good. For mechanical hard drives you can generally + tell if a system is swapping by just listening to disk activity and + observing how the system reacts to commands. For an SSD drive you will not + be able to hear swapping but you can tell how much swap space is being used + by the <command>top</command> or <command>free</command> programs. Use of + an SSD drive for a swap partition should be avoided if possible. The first + reaction to swapping should be to check for an unreasonable command such as + trying to edit a five gigabyte file. If swapping becomes a normal + occurrence, the best solution is to purchase more RAM for your + system.</para> </sect3> <sect3> <title>The Grub Bios Partition</title> @@ -140,7 +133,7 @@ <listitem><para>/boot – Highly recommended. Use this partition to store kernels and other booting information. To minimize potential boot problems with larger disks, make this the first physical partition on - your first disk drive. A partition size of 100 megabytes is quite + your first disk drive. A partition size of 200 megabytes is quite adequate.</para></listitem> <listitem><para>/home – Highly recommended. Share your home @@ -150,7 +143,7 @@ <listitem><para>/usr – A separate /usr partition is generally used if providing a server for a thin client or diskless workstation. It is - normally not needed for LFS. A size of five gigabytes will handle most + normally not needed for LFS. A size of ten gigabytes will handle most installations.</para></listitem> <listitem><para>/opt – This directory is most useful for diff --git a/chapter02/hostreqs.xml b/chapter02/hostreqs.xml index 1989bdec6..f5b0eabde 100644 --- a/chapter02/hostreqs.xml +++ b/chapter02/hostreqs.xml @@ -244,6 +244,7 @@ or all absent, but not only one or two present.</para> <M> IA32 a.out support [*] x32 ABI for 64-bit mode </screen> + <para arch="ml_32,ml_x32,ml_all">The option 'IA32 a.out support' is optional. In case your kernel does not have 'x32 ABI for 64-bit mode' enabled but only 'IA32 Emulation', you can continue to build your @@ -251,7 +252,7 @@ or all absent, but not only one or two present.</para> for building x32 objects. If neither 'IA32 Emulation' nor 'x32 ABI for 64-bit mode' is enabled, you will run in errors latest when building <application>glibc</application> in Chapter 6, - so an upgrade of your host system is required. + so an upgrade of your host system kernel is required. </para> </sect1> diff --git a/chapter02/stages.xml b/chapter02/stages.xml index 30e820213..23348a885 100644 --- a/chapter02/stages.xml +++ b/chapter02/stages.xml @@ -25,40 +25,40 @@ <itemizedlist> <listitem> - <para>Procedures done as the root user after Section 2.4 need to - have the LFS environment variable set <emphasis>FOR THE ROOT - USER</emphasis>.</para> + <para>Procedures done as the root user after Section 2.4 need to + have the LFS environment variable set <emphasis>FOR THE ROOT + USER</emphasis>.</para> </listitem> </itemizedlist> </sect2> <sect2> - <title>Chapter 5</title> + <title>Chapter 5–6</title> <itemizedlist> <listitem> - <para>The /mnt/lfs partition must be mounted.</para> + <para>The /mnt/lfs partition must be mounted.</para> </listitem> <listitem> - <para><emphasis>ALL</emphasis> instructions in Chapter 5 - must be done by user <emphasis>lfs</emphasis>. - A <command>su - lfs</command> needs to be done before any - task in Chapter 5.</para> + <para>Threse two chapters must be done as user <emphasis>lfs</emphasis>. + A <command>su - lfs</command> needs to be done before any task in these + chapters. Failing to do that, you are at risk of installing packages to the + host, and potentially rendering it unusable.</para> </listitem> <listitem> <para>The procedures in <xref linkend='ch-tools-generalinstructions'/> are critical. If there is any doubt about installing a package, ensure any previously expanded - tarballs are removed, re-extract the package files, and complete all + tarballs are removed, then re-extract the package files, and complete all instructions in that section.</para> </listitem> </itemizedlist> </sect2> <sect2> - <title>Chapters 6–8</title> + <title>Chapter 7–10</title> <itemizedlist> <listitem> @@ -66,16 +66,22 @@ </listitem> <listitem> + <para>A few operations, from <quote>Changing Ownership</quote> to + <quote>Entering the Chroot Environment</quote> must be done as the + root user, with the LFS envirnment variable set for the root user.</para> + </listitem> + + <listitem> <para> When entering chroot, the LFS environment variable must be set - for root. The LFS variable is not used otherwise.</para> + for root. The LFS variable is not used afterwards.</para> </listitem> <listitem> <para> The virtual file systems must be mounted. This can be done before or after entering chroot by changing to a host virtual terminal and, as root, running the commands in - <xref linkend='ch-system-bindmount'/> and - <xref linkend='ch-system-kernfsmount'/>.</para> + <xref linkend='ch-tools-bindmount'/> and + <xref linkend='ch-tools-kernfsmount'/>.</para> </listitem> </itemizedlist> </sect2> diff --git a/chapter03/introduction.xml b/chapter03/introduction.xml index e67e62497..7a7626d92 100644 --- a/chapter03/introduction.xml +++ b/chapter03/introduction.xml @@ -49,9 +49,28 @@ <screen role="nodump"><userinput>chmod -v a+wt $LFS/sources</userinput></screen> - <para>An easy way to download all of the packages and patches is by using - <ulink url="../wget-list">wget-list</ulink> as an input to - <command>wget</command>. For example:</para> + <para>There are several ways to optain all the necessary packages and patches + to build LFS:</para> + + <itemizedlist> + <listitem> + <para>The files can be downloaded individually as described in the + next two sections.</para> + </listitem> + <listitem> + <para>For stable versions of the book, a tarball of all the needed files + can be downloaded from one of the LFS files mirrors listed at + <ulink url="http://www.linuxfromscratch.org/mirrors.html#files"/>.</para> + </listitem> + <listitem> + <para>The files can be downloaded using <command>wget</command> and + a wget-list as described below.</para> + </listitem> + </itemizedlist> + + <para>To download all of the packages and patches by using + <ulink url="../wget-list">wget-list</ulink> as an input to the + <command>wget</command> command, use:</para> <screen role="nodump"><userinput>wget --input-file=wget-list --continue --directory-prefix=$LFS/sources</userinput></screen> @@ -61,7 +80,10 @@ <filename class="directory">$LFS/sources</filename> and run:</para> <screen role="nodump"><userinput>pushd $LFS/sources -md5sum -c md5sums + md5sum -c md5sums popd</userinput></screen> + <para>This check can be used after retrieving the needed files with any of the + methods listed above.</para> + </sect1> diff --git a/chapter03/packages.xml b/chapter03/packages.xml index a3846adbe..48b338451 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -355,7 +355,7 @@ </listitem> </varlistentry> - <varlistentry> + <varlistentry arch="ml_32,ml_x32,ml_all"> <term>ISL (&isl-version;) - <token>&isl-size;</token>:</term> <listitem> <para>Home page: <ulink url="&isl-home;"/></para> @@ -460,15 +460,6 @@ </varlistentry> <varlistentry> - <term>Linux Firmware (&linux-firmware-version;) - <token>&linux-firmware-size;</token>:</term> - <listitem> - <para>Home page: <ulink url="&linux-firmware-home;"/></para> - <para>Download: <ulink url="&linux-firmware-url;"/></para> - <para>MD5 sum: <literal>&linux-firmware-md5;</literal></para> - </listitem> - </varlistentry> - - <varlistentry> <term>M4 (&m4-version;) - <token>&m4-size;</token>:</term> <listitem> <para>Home page: <ulink url="&m4-home;"/></para> @@ -532,20 +523,20 @@ </varlistentry> <varlistentry> - <term>Ninja (&ninja-version;) - <token>&ninja-size;</token>:</term> + <term>Ncurses (&ncurses-version;) - <token>&ncurses-size;</token>:</term> <listitem> - <para>Home page: <ulink url="&ninja-home;"/></para> - <para>Download: <ulink url="&ninja-url;"/></para> - <para>MD5 sum: <literal>&ninja-md5;</literal></para> + <para>Home page: <ulink url="&ncurses-home;"/></para> + <para>Download: <ulink url="&ncurses-url;"/></para> + <para>MD5 sum: <literal>&ncurses-md5;</literal></para> </listitem> </varlistentry> <varlistentry> - <term>Ncurses (&ncurses-version;) - <token>&ncurses-size;</token>:</term> + <term>Ninja (&ninja-version;) - <token>&ninja-size;</token>:</term> <listitem> - <para>Home page: <ulink url="&ncurses-home;"/></para> - <para>Download: <ulink url="&ncurses-url;"/></para> - <para>MD5 sum: <literal>&ncurses-md5;</literal></para> + <para>Home page: <ulink url="&ninja-home;"/></para> + <para>Download: <ulink url="&ninja-url;"/></para> + <para>MD5 sum: <literal>&ninja-md5;</literal></para> </listitem> </varlistentry> @@ -712,6 +703,14 @@ </varlistentry> <varlistentry> + <term>Tcl Documentation (&tcl-version;) - <token>&tcl-docs-size;</token>:</term> + <listitem> + <para>Download: <ulink url="&tcl-docs-url;"/></para> + <para>MD5 sum: <literal>&tcl-docs-md5;</literal></para> + </listitem> + </varlistentry> + + <varlistentry> <term>Texinfo (&texinfo-version;) - <token>&texinfo-size;</token>:</term> <listitem> <para>Home page: <ulink url="&texinfo-home;"/></para> diff --git a/chapter03/patches.xml b/chapter03/patches.xml index c088f8e4b..c3dda33cf 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -50,24 +50,7 @@ <para>MD5 sum: <literal>&coreutils-i18n-patch-md5;</literal></para> </listitem> </varlistentry> -<!-- - <varlistentry> - <term>Flex Fixes Patch - <token>&flex-fixes-patch-size;</token>:</term> - <listitem> - <para>Download: <ulink url="&patches-root;&flex-fixes-patch;"/></para> - <para>MD5 sum: <literal>&flex-fixes-patch-md5;</literal></para> - </listitem> - </varlistentry> ---> -<!-- - <varlistentry> - <term>Gccc ASAN Patch - <token>&gcc-asan-patch-size;</token>:</term> - <listitem> - <para>Download: <ulink url="&patches-root;&gcc-asan-patch;"/></para> - <para>MD5 sum: <literal>&gcc-asan-patch-md5;</literal></para> - </listitem> - </varlistentry> ---> + <varlistentry> <term>Glibc FHS Patch - <token>&glibc-fhs-patch-size;</token>:</term> <listitem> @@ -75,15 +58,15 @@ <para>MD5 sum: <literal>&glibc-fhs-patch-md5;</literal></para> </listitem> </varlistentry> -<!-- + <varlistentry> - <term>Glibc Glob Security Patch - <token>&glibc-glob-patch-size;</token>:</term> + <term>GCC Cross Build Fix Patch - <token>&gcc-cross-patch-size;</token>:</term> <listitem> - <para>Download: <ulink url="&patches-root;&glibc-glob-patch;"/></para> - <para>MD5 sum: <literal>&glibc-glob-patch-md5;</literal></para> + <para>Download: <ulink url="&patches-root;&gcc-cross-patch;"/></para> + <para>MD5 sum: <literal>&gcc-cross-patch-md5;</literal></para> </listitem> </varlistentry> ---> + <varlistentry> <term>Kbd Backspace/Delete Fix Patch - <token>&kbd-backspace-patch-size;</token>:</term> <listitem> @@ -91,24 +74,7 @@ <para>MD5 sum: <literal>&kbd-backspace-patch-md5;</literal></para> </listitem> </varlistentry> -<!-- - <varlistentry> - <term>Ninja Limit Jobs Patch - <token>&ninja-limit-jobs-patch-size;</token>:</term> - <listitem> - <para>Download: <ulink url="&patches-root;&ninja-limit-jobs-patch;"/></para> - <para>MD5 sum: <literal>&ninja-limit-jobs-patch-md5;</literal></para> - </listitem> - </varlistentry> ---> -<!-- - <varlistentry> - <term>Readline Upstream Fixes Patch - <token>&readline-fixes-patch-size;</token>:</term> - <listitem> - <para>Download: <ulink url="&patches-root;&readline-fixes-patch;"/></para> - <para>MD5 sum: <literal>&readline-fixes-patch-md5;</literal></para> - </listitem> - </varlistentry> ---> + <varlistentry revision="sysv"> <term>Sysvinit Consolidated Patch - <token>&sysvinit-consolidated-patch-size;</token>:</term> <listitem> @@ -116,15 +82,15 @@ <para>MD5 sum: <literal>&sysvinit-consolidated-patch-md5;</literal></para> </listitem> </varlistentry> -<!-- + <varlistentry revision="systemd"> - <term>Systemd Consolidated Patch - <token>&systemd-consolidated-patch-size;</token>:</term> - <listitem> - <para>Download: <ulink url="&patches-root;&systemd-consolidated-patch;"/></para> - <para>MD5 sum: <literal>&systemd-consolidated-patch-md5;</literal></para> + <term>Systemd GCC-10 Patch - <token>&systemd-gcc10-patch-size;</token>:</term> + <listitem> + <para>Download: <ulink url="&patches-root;&systemd-gcc10-patch;"/></para> + <para>MD5 sum: <literal>&systemd-gcc10-patch-md5;</literal></para> </listitem> </varlistentry> ---> + </variablelist> <para>Total size of these patches: about <returnvalue/></para> diff --git a/chapter04/aboutlfs.xml b/chapter04/aboutlfs.xml deleted file mode 100644 index 4c828e6ab..000000000 --- a/chapter04/aboutlfs.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-preps-aboutlfs"> - <?dbhtml filename="aboutlfs.html"?> - - <title>About $LFS</title> - - <para>Throughout this book, the environment variable <envar>LFS</envar> will - be used. It is paramount that this variable is always defined. - It should be set to the mount point chosen for the LFS partition. - Check that the <envar>LFS</envar> variable is set up properly with:</para> - -<screen role="nodump"><userinput>echo $LFS</userinput></screen> - - <para>Make sure the output shows the path to the LFS partition's mount - point, which is <filename class="directory">/mnt/lfs</filename> if the - provided example was followed. If the output is incorrect, the - variable can be set with:</para> - -<screen role="nodump"><userinput>export LFS=/mnt/lfs</userinput></screen> - - <para>Having this variable set is beneficial in that commands such as - <command>mkdir $LFS/tools</command> can be typed literally. The shell - will automatically replace <quote>$LFS</quote> with - <quote>/mnt/lfs</quote> (or whatever the variable was set to) when it - processes the command line.</para> - - <para>Do not forget to check that <envar>$LFS</envar> is set whenever - you leave and reenter the current working environment (as when doing a - <command>su</command> to <systemitem class="username">root</systemitem> - or another user).</para> - -</sect1> - diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index 68e25cce2..1928423ea 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -20,16 +20,16 @@ used instead.</para> <para>The SBU measure works as follows. The first package to be compiled - from this book is Binutils in <xref linkend="chapter-temporary-tools"/>. The + from this book is binutils in <xref linkend="chapter-cross-tools"/>. The time it takes to compile this package is what will be referred to as the Standard Build Unit or SBU. All other compile times will be expressed relative to this time.</para> <para>For example, consider a package whose compilation time is 4.5 SBUs. This means that if a system took 10 minutes to compile and - install the first pass of Binutils, it will take + install the first pass of binutils, it will take <emphasis>approximately</emphasis> 45 minutes to build this example package. - Fortunately, most build times are shorter than the one for Binutils.</para> + Fortunately, most build times are shorter than the one for binutils.</para> <para>In general, SBUs are not entirely accurate because they depend on many factors, including the host system's version of GCC. They are provided here @@ -41,13 +41,13 @@ compilation time for a package can be reduced by performing a "parallel make" by either setting an environment variable or telling the <command>make</command> program how many processors are available. For - instance, a Core2Duo can support two simultaneous processes with:</para> + instance, an Intel i5-6500 CPU can support four simultaneous processes with:</para> - <screen role="nodump"><userinput>export MAKEFLAGS='-j 2'</userinput></screen> + <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen> <para>or just building with:</para> - <screen role="nodump"><userinput>make -j2</userinput></screen> + <screen role="nodump"><userinput>make -j4</userinput></screen> <para>When multiple processors are used in this way, the SBU units in the book will vary even more than they normally would. In some cases, the make diff --git a/chapter04/abouttestsuites.xml b/chapter04/abouttestsuites.xml index 1b2e0d68f..9206f33be 100644 --- a/chapter04/abouttestsuites.xml +++ b/chapter04/abouttestsuites.xml @@ -18,25 +18,20 @@ that the package is totally bug free.</para> <para>Some test suites are more important than others. For example, - the test suites for the core toolchain packages—GCC, Binutils, and - Glibc—are of the utmost importance due to their central role in a - properly functioning system. The test suites for GCC and Glibc can + the test suites for the core toolchain packages—GCC, binutils, and + glibc—are of the utmost importance due to their central role in a + properly functioning system. The test suites for GCC and glibc can take a very long time to complete, especially on slower hardware, but are strongly recommended.</para> <note> - <para>Experience has shown that there is little to be gained from running - the test suites in <xref linkend="chapter-temporary-tools"/>. There can be - no escaping the fact that the host system always exerts some influence on - the tests in that chapter, often causing inexplicable failures. Because - the tools built in <xref linkend="chapter-temporary-tools"/> are temporary - and eventually discarded, we do not recommend running the test suites in - <xref linkend="chapter-temporary-tools"/> for the average reader. The - instructions for running those test suites are provided for the benefit of - testers and developers, but they are strictly optional.</para> + <para>Running the test suites in <xref linkend="chapter-cross-tools"/> + and <xref linkend="chapter-temporary-tools"/> + is impossible, since the programs are compiled with a cross-compiler, + so are not supposed to be able to run on the build host.</para> </note> - <para>A common issue with running the test suites for Binutils and GCC + <para>A common issue with running the test suites for binutils and GCC is running out of pseudo terminals (PTYs). This can result in a high number of failing tests. This may happen for several reasons, but the most likely cause is that the host system does not have the diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index a26aa55a2..32272447a 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -11,8 +11,8 @@ <title>Adding the LFS User</title> <para>When logged in as user <systemitem class="username">root</systemitem>, - making a single mistake can damage or destroy a system. Therefore, we - recommend building the packages in the next chapter as an unprivileged user. + making a single mistake can damage or destroy a system. Therefore, + the packages in the next two chapters are built as an unprivileged user. You could use your own user name, but to make it easier to set up a clean working environment, create a new user called <systemitem class="username">lfs</systemitem> as a member of a new group (also named @@ -62,7 +62,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen> <varlistentry> <term><parameter>lfs</parameter></term> <listitem> - <para>This is the actual name for the created group and user.</para> + <para>This is the actual name for the created user.</para> </listitem> </varlistentry> @@ -77,10 +77,16 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen> <screen role="nodump"><userinput>passwd lfs</userinput></screen> <para>Grant <systemitem class="username">lfs</systemitem> full access to - <filename class="directory">$LFS/tools</filename> by making + all directories under <filename class="directory">$LFS</filename> by making <systemitem class="username">lfs</systemitem> the directory owner:</para> -<screen><userinput>chown -v lfs $LFS/tools</userinput></screen> +<screen><userinput>chown -v lfs $LFS/{usr,lib,var,etc,bin,sbin,tools} +case $(uname -m) in + x86_64) chown -v lfs $LFS/lib64 ;; +esac</userinput></screen> +<screen arch="ml_32" ><userinput>chown -v lfs $LFS&lib-m32;</userinput></screen> +<screen arch="ml_x32" ><userinput>chown -v lfs $LFS&lib-mx32;</userinput></screen> +<screen arch="ml_all" ><userinput>chown -v lfs $LFS/{lib32,libx32}</userinput></screen> <para>If a separate working directory was created as suggested, give user <systemitem class="username">lfs</systemitem> ownership of this @@ -95,7 +101,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen> <para>Next, login as user <systemitem class="username">lfs</systemitem>. This can be done via a virtual console, through a display manager, or with - the following substitute user command:</para> + the following substitute/switch user command:</para> <screen role="nodump"><userinput>su - lfs</userinput></screen> diff --git a/chapter04/chapter04.xml b/chapter04/chapter04.xml index 3e44ce94f..5ad2d22db 100644 --- a/chapter04/chapter04.xml +++ b/chapter04/chapter04.xml @@ -13,7 +13,7 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutlfs.xml"/>--> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingtoolsdir.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingminlayout.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="addinguser.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="settingenviron.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutsbus.xml"/> diff --git a/chapter04/creatingminlayout.xml b/chapter04/creatingminlayout.xml new file mode 100644 index 000000000..ddedff391 --- /dev/null +++ b/chapter04/creatingminlayout.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-creatingminlayout"> + <?dbhtml filename="creatingminlayout.html"?> + + <title>Creating the Minimal directory layout in LFS filesystem</title> + + <para>The first task performed in the LFS partition is to create a minimal + directory hierarchy so that programs compiled in <xref + linkend="chapter-temporary-tools"/> may be installed in their final + location. This is needed so that those temporary programs be overwritten + when rebuilding them in <xref linkend="chapter-building-system"/>.</para> + + <para>Create the required directory layout by running the following as + <systemitem class="username">root</systemitem>:</para> + +<screen><userinput>mkdir -pv $LFS/{usr,lib,var,etc,bin,sbin} +case $(uname -m) in + x86_64) mkdir -pv $LFS/lib64 ;; +esac</userinput></screen> +<screen arch="ml_32" ><userinput>mkdir -pv $LFS&lib-m32;</userinput></screen> +<screen arch="ml_x32" ><userinput>mkdir -pv $LFS&lib-mx32;</userinput></screen> +<screen arch="ml_all" ><userinput>mkdir -pv $LFS/lib{,x}32</userinput></screen> +<!-- +<screen arch="ml_32" ><userinput>mkdir -pv $LFS/{usr/,}lib32</userinput></screen> +<screen arch="ml_x32" ><userinput>mkdir -pv $LFS/{usr/,}libx32</userinput></screen> +<screen arch="ml_all" ><userinput>mkdir -pv $LFS/{usr/,}{lib32,libx32}</userinput></screen> +<screen arch="ml_32" ><userinput>mkdir -pv $LFS&usr-inc-m32;</userinput></screen> +<screen arch="ml_x32" ><userinput>mkdir -pv $LFS&usr-inc-mx32;</userinput></screen> +<screen arch="ml_all" ><userinput>mkdir -pv $LFS&usr-inc-m32; +mkdir -pv $LFS&usr-inc-mx32;</userinput></screen> +--> + <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled + with a cross-compiler (more details in section <xref + linkend="ch-tools-toolchaintechnotes"/>). In order to separate this + cross-compiler from the other programs, it will be installed in a special + directory. Create this directory with:</para> + +<screen><userinput>mkdir -pv $LFS/tools</userinput></screen> + +</sect1> diff --git a/chapter04/creatingtoolsdir.xml b/chapter04/creatingtoolsdir.xml deleted file mode 100644 index 0a42daa70..000000000 --- a/chapter04/creatingtoolsdir.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-preps-creatingtoolsdir"> - <?dbhtml filename="creatingtoolsdir.html"?> - - <title>Creating the $LFS/tools Directory</title> - - <para>All programs compiled in <xref linkend="chapter-temporary-tools"/> - will be installed under <filename class="directory">$LFS/tools</filename> - to keep them separate from the programs compiled in <xref - linkend="chapter-building-system"/>. The programs compiled here are - temporary tools and will not be a part of the final LFS system. By keeping - these programs in a separate directory, they can easily be discarded later - after their use. This also prevents these programs from ending up in the - host production directories (easy to do by accident in <xref - linkend="chapter-temporary-tools"/>).</para> - - <para>Create the required directory by running the following as - <systemitem class="username">root</systemitem>:</para> - -<screen><userinput>mkdir -v $LFS/tools</userinput></screen> - - <para>The next step is to create a <filename class="symlink">/tools</filename> - symlink on the host system. This will point to the newly-created directory on - the LFS partition. Run this command as <systemitem - class="username">root</systemitem> as well:</para> - -<screen><userinput>ln -sv $LFS/tools /</userinput></screen> - - <note> - <para>The above command is correct. The <command>ln</command> command - has a few syntactic variations, so be sure to check - <command>info coreutils ln</command> and <filename>ln(1)</filename> - before reporting what you may think is an error.</para> - </note> - - <para>The created symlink enables the toolchain to be compiled so that it - always refers to <filename class="directory">/tools</filename>, meaning - that the compiler, assembler, and linker will work both in Chapter 5 - (when we are still using some tools from the host) and in the next (when - we are <quote>chrooted</quote> to the LFS partition).</para> - -</sect1> diff --git a/chapter04/introduction.xml b/chapter04/introduction.xml index f1ac91989..c54c67f8c 100644 --- a/chapter04/introduction.xml +++ b/chapter04/introduction.xml @@ -11,7 +11,7 @@ <title>Introduction</title> <para>In this chapter, we will perform a few additional tasks to prepare - for building the temporary system. We will create a directory in + for building the temporary system. We will create a set of directories in <filename class="directory">$LFS</filename> for the installation of the temporary tools, add an unprivileged user to reduce risk, and create an appropriate build environment for that user. We will also diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml index 3b3c10718..dfaa2dc9b 100644 --- a/chapter04/settingenviron.xml +++ b/chapter04/settingenviron.xml @@ -43,7 +43,9 @@ umask 022 LFS=/mnt/lfs LC_ALL=POSIX LFS_TGT=$(uname -m)-lfs-linux-gnu -PATH=/tools/bin:/bin:/usr/bin +PATH=/usr/bin +if [ ! -L /bin ]; then PATH=/bin:$PATH; fi +PATH=$LFS/tools/bin:$PATH export LFS LC_ALL LFS_TGT PATH</literal> EOF</userinput></screen> <screen arch="ml_32,ml_x32,ml_all"><userinput>cat > ~/.bashrc << "EOF" @@ -54,12 +56,14 @@ LC_ALL=POSIX LFS_TGT=x86_64-lfs-linux-gnu LFS_TGT32=i686-lfs-linux-gnu LFS_TGTX32=x86_64-lfs-linux-gnux32 -PATH=/tools/bin:/bin:/usr/bin +PATH=/usr/bin +if [ ! -L /bin ]; then PATH=/bin:$PATH; fi +PATH=$LFS/tools/bin:$PATH export LFS LC_ALL LFS_TGT LFS_TGT32 LFS_TGTX32 PATH</literal> EOF</userinput></screen> <variablelist> - <title>The meaning of the command line options in <filename>.bashrc</filename></title> + <title>The meaning of the settings in <filename>.bashrc</filename></title> <varlistentry> <term><parameter>set +h</parameter></term> @@ -119,14 +123,36 @@ EOF</userinput></screen> </varlistentry> <varlistentry> - <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term> + <term><parameter>PATH=/usr/bin</parameter></term> <listitem> - <para>By putting <filename class="directory">/tools/bin</filename> ahead of the - standard <envar>PATH</envar>, all the programs installed in <xref - linkend="chapter-temporary-tools"/> are picked up by the shell immediately after - their installation. This, combined with turning off hashing, limits the risk - that old programs are used from the host when the same programs are available in - the Chapter 5 environment.</para> + <para>Many modern linux distributions have merged <filename + class="directory">/bin</filename> and <filename + class="directory">/usr/bin</filename>. When this is the case, the standard + <envar>PATH</envar> variable needs just to be set to <filename + class="directory">/usr/bin/</filename> for the <xref + linkend="chapter-temporary-tools"/> environment. When this is not the + case, the following line adds <filename class="directory">/bin</filename> + to the path.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>if [ ! -L /bin ]; then PATH=/bin:$PATH; fi</parameter></term> + <listitem> + <para>If <filename class="directory">/bin</filename> is not a symbolic + link, then it has to be added to the <envar>PATH</envar> variable.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>PATH=$LFS/tools/bin:$PATH</parameter></term> + <listitem> + <para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the + standard <envar>PATH</envar>, the cross-compiler installed at the beginning + of <xref linkend="chapter-cross-tools"/> is picked up by the shell + immediately after its installation. This, combined with turning off hashing, + limits the risk that the compiler from the host be used instead of the + cross-compiler.</para> </listitem> </varlistentry> @@ -134,12 +160,38 @@ EOF</userinput></screen> <term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term> <listitem> <para>While the above commands have set some variables, in order - to make them visible within any sub-shells, we export them</para> + to make them visible within any sub-shells, we export them.</para> </listitem> </varlistentry> </variablelist> + <important> + + <para>Several commercial distributions add a non-documented instantiation + of <filename>/etc/bash.bashrc</filename> to the initialization of + <command>bash</command>. This file has the potential to modify the + <systemitem class="username">lfs</systemitem> + user's environment in ways that can affect the building of critical LFS + packages. To make sure the <systemitem class="username">lfs</systemitem> + user's envronment is clean, check for the + presence of <filename>/etc/bash.bashrc</filename> and, if present, move it + out of the way. As the <systemitem class="username">root</systemitem> + user, run:</para> + + <screen role="nodump"><userinput>[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE</userinput></screen> + + <para>After use of the <systemitem class="username">lfs</systemitem> + user is finished at the beginning of <xref + linkend="chapter-chroot-temporary-tools"/>, you can restore + <filename>/etc/bash.bashrc</filename> (if desired).</para> + + <para>Note that the LFS Bash package we will build in + <xref linkend="ch-system-bash"/> is not configured to load or execute + <filename>/etc/bash.bashrc</filename>, so this file is useless on a + completed LFS system.</para> + </important> + <para>Finally, to have the environment fully prepared for building the temporary tools, source the just-created user profile:</para> diff --git a/chapter05/bash.xml b/chapter05/bash.xml deleted file mode 100644 index 21df197e7..000000000 --- a/chapter05/bash.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-bash" role="wrap"> - <?dbhtml filename="bash.html"?> - - <sect1info condition="script"> - <productname>bash</productname> - <productnumber>&bash-version;</productnumber> - <address>&bash-url;</address> - </sect1info> - - <title>Bash-&bash-version;</title> - - <indexterm zone="ch-tools-bash"> - <primary sortas="a-Bash">Bash</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/bash.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&bash-ch5-sbu;</seg> - <seg>&bash-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Bash</title> -<!-- - <para>First, apply the following patch to fix various bugs that have been - addressed upstream:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen> ---> - <para>Prepare Bash for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools --without-bash-malloc</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--without-bash-malloc</parameter></term> - <listitem> - <para>This option turns off the use of Bash's memory allocation - (<function>malloc</function>) function which is known to cause - segmentation faults. By turning this option off, Bash will use - the <function>malloc</function> functions from Glibc which are - more stable.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Bash test suite anyway, issue the following command:</para> - - -<screen><userinput remap="test">make tests</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Make a link for the programs that use <command>sh</command> for - a shell:</para> - -<screen><userinput remap="install">ln -sv bash /tools/bin/sh</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-bash" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index a07ce920d..f2f54c120 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -25,7 +25,7 @@ <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/binutils.xml" + href="../chapter08/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&binutils-ch5p1-sbu;</seg> - <seg>&binutils-ch5p1-du;</seg> + <seg>&binutils-tmpp1-sbu;</seg> + <seg>&binutils-tmpp1-du;</seg> </seglistitem> </segmentedlist> @@ -43,8 +43,9 @@ <sect2 role="installation"> <title>Installation of Cross Binutils</title> - <note><para>Go back and re-read the notes in the previous section. - Understanding the notes labeled important will save you a lot + <note><para>Go back and re-read the notes in the section titled <xref + linkend="ch-tools-generalinstructions"/>. + Understanding the notes labeled important can save you a lot of problems later.</para></note> <para>It is important that Binutils be the first package compiled @@ -63,43 +64,33 @@ cd build</userinput></screen> to be of any use, measure the time it takes to build this package from the configuration, up to and including the first install. To achieve this easily, wrap the commands in a <command>time</command> - command like this: <userinput>time { ./configure ... && ... + command like this: <userinput>time { ./configure ... && make && make install; }</userinput>.</para> </note> - <note><para>The approximate build SBU values and required disk space - in Chapter 5 does not include test suite data.</para></note> - <para>Now prepare Binutils for compilation:</para> -<screen arch="default"><userinput remap="configure">../configure --prefix=/tools \ +<screen arch="default"><userinput remap="configure">../configure --prefix=$LFS/tools \ --with-sysroot=$LFS \ - --with-lib-path=/tools/lib \ --target=$LFS_TGT \ --disable-nls \ --disable-werror</userinput></screen> - - <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">lpath=/tools/lib</userinput> -<userinput remap="configure" arch="ml_32,ml_all">lpath="$lpath:/tools/lib32"</userinput> -<userinput remap="configure" arch="ml_x32,ml_all">lpath="$lpath:/tools/libx32"</userinput> -<userinput remap="configure">../configure --prefix=/tools \ - --with-sysroot=$LFS \ - --with-lib-path=$lpath \ - --target=$LFS_TGT \ - --disable-nls \ - --disable-werror \ - --enable-64-bit-bfd \ +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure --prefix=$LFS/tools \ + --with-sysroot=$LFS \ + --target=$LFS_TGT \ + --disable-nls \ + --disable-werror \ --enable-multilib</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>--prefix=/tools</parameter></term> + <term><parameter>--prefix=$LFS/tools</parameter></term> <listitem> <para>This tells the configure script to prepare to install the - Binutils programs in the <filename class="directory">/tools</filename> - directory.</para> + binutils programs in the <filename + class="directory">$LFS/tools</filename> directory.</para> </listitem> </varlistentry> @@ -112,20 +103,12 @@ cd build</userinput></screen> </varlistentry> <varlistentry> - <term><parameter>--with-lib-path=/tools/lib</parameter></term> - <listitem> - <para>This specifies which library path the linker should be - configured to use.</para> - </listitem> - </varlistentry> - - <varlistentry> <term><envar>--target=$LFS_TGT</envar></term> <listitem> <para>Because the machine description in the <envar>LFS_TGT</envar> variable is slightly different than the value returned by the <command>config.guess</command> script, this switch will tell the - <command>configure</command> script to adjust Binutil's build system + <command>configure</command> script to adjust binutil's build system for building a cross linker. </para> </listitem> </varlistentry> @@ -146,31 +129,19 @@ cd build</userinput></screen> </listitem> </varlistentry> + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--enable-multilib</parameter></term> + <listitem> + <para>Enables multilib support.</para> + </listitem> + </varlistentry> + </variablelist> <para>Continue with compiling the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. Ordinarily we would now run the - test suite, but at this early stage the test suite framework (Tcl, - Expect, and DejaGNU) is not yet in place. The benefits of running the - tests at this point are minimal since the programs from this - first pass will soon be replaced by those from the second.</para> - - <para arch="default">If building on x86_64, create a symlink to ensure the - sanity of the toolchain:</para> - - <para arch="ml_32,ml_x32,ml_all">Create a symlink to ensure the sanity of - the toolchain:</para> - -<screen arch="default"><userinput remap="install">case $(uname -m) in - x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;; -esac</userinput></screen> - -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="install">mkdir -v /tools/lib && -ln -sv lib /tools/lib64</userinput></screen> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml deleted file mode 100644 index 86204df45..000000000 --- a/chapter05/binutils-pass2.xml +++ /dev/null @@ -1,208 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-binutils-pass2" role="wrap"> - <?dbhtml filename="binutils-pass2.html"?> - - <sect1info condition="script"> - <productname>binutils-pass2</productname> - <productnumber>&binutils-version;</productnumber> - <address>&binutils-url;</address> - </sect1info> - - <title>Binutils-&binutils-version; - Pass 2</title> - - <indexterm zone="ch-tools-binutils-pass2"> - <primary sortas="a-Binutils">Binutils</primary> - <secondary>tools, pass 2</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/binutils.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&binutils-ch5p2-sbu;</seg> - <seg>&binutils-ch5p2-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Binutils</title> - - <para>Create a separate build directory again:</para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Prepare Binutils for compilation:</para> - -<screen arch="default"><userinput remap="configure">CC=$LFS_TGT-gcc \ -AR=$LFS_TGT-ar \ -RANLIB=$LFS_TGT-ranlib \ -../configure \ - --prefix=/tools \ - --disable-nls \ - --disable-werror \ - --with-lib-path=/tools/lib \ - --with-sysroot</userinput></screen> - -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">lpath=/tools/lib</userinput> -<userinput remap="configure" arch="ml_32,ml_all">lpath="$lpath:/tools/lib32"</userinput> -<userinput remap="configure" arch="ml_x32,ml_all">lpath="$lpath:/tools/libx32"</userinput> -<userinput remap="configure">CC=$LFS_TGT-gcc \ -AR=$LFS_TGT-ar \ -RANLIB=$LFS_TGT-ranlib \ -../configure \ - --prefix=/tools \ - --disable-nls \ - --disable-werror \ - --with-lib-path=$lpath \ - --with-sysroot \ - --enable-64-bit-bfd \ - --enable-multilib</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</parameter></term> - <listitem> - <para>Because this is really a native build of Binutils, setting these - variables ensures that the build system uses the cross-compiler and - associated tools instead of the ones on the host system.</para> - </listitem> - </varlistentry> - - <varlistentry arch="default"> - <term><parameter>--with-lib-path=/tools/lib</parameter></term> - <listitem> - <para>This tells the configure script to specify the library - search path during the compilation of Binutils, resulting in - <filename class="directory">/tools/lib</filename> being passed - to the linker. This prevents the linker from searching through - library directories on the host.</para> - </listitem> - </varlistentry> - - <varlistentry arch="ml_32,ml_x32,ml_all"> - <term><parameter>--with-lib-path=/tools/lib:...</parameter></term> - <listitem> - <para>This tells the configure script to specify the library - search path during the compilation of Binutils, resulting in - <filename class="directory">/tools/lib</filename>, - <filename class="directory">/tools/lib32</filename> and - <filename class="directory">/tools/libx32</filename> being passed - to the linker. This prevents the linker from searching through - library directories on the host.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--with-sysroot</parameter></term> - <listitem> - <para>This defines a default (non-existent) sysroot directory - <filename class="directory">/tools/$LFS_TGT/sys-root</filename>. - It is useful when looking for shared objects which are required by - other shared objects explicitly included on the linker's command - line. Those objects are searched into the directories listed in - <filename><sysroot>/etc/ld.so.conf</filename>, and failing - that, into the linker search path, which is right. If this switch - is not given, <filename>/etc/ld.so.conf</filename> on the host - is used, that is, programs may be linked to libraries on - the host, which we want to avoid.</para> - </listitem> - </varlistentry> - - <varlistentry arch="ml_32,ml_x32,ml_all"> - <term><parameter>--enable-64-bit-bfd</parameter></term> - <listitem> - <para>TODO</para> - </listitem> - </varlistentry> - - <varlistentry arch="ml_32,ml_x32,ml_all"> - <term><parameter>--enable-multilib</parameter></term> - <listitem> - <para>TODO</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in - the next chapter:</para> - -<screen arch="default"><userinput remap="adjust">make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib -cp -v ld/ld-new /tools/bin</userinput></screen> - -<screen arch="ml_all"><userinput remap="adjust">make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32:/lib32:/usr/libx32:/libx32 -cp -v ld/ld-new /tools/bin</userinput></screen> -<screen arch="ml_32"><userinput remap="adjust">make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32:/lib32 -cp -v ld/ld-new /tools/bin</userinput></screen> -<screen arch="ml_x32"><userinput remap="adjust">make -C ld clean -make -C ld LIB_PATH=/usr/lib:/lib:/usr/libx32:/libx32 -cp -v ld/ld-new /tools/bin</userinput></screen> - - <variablelist> - <title>The meaning of the make parameters:</title> - - <varlistentry> - <term><parameter>-C ld clean</parameter></term> - <listitem> - <para>This tells the make program to remove all compiled - files in the <filename class="directory">ld</filename> - subdirectory.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-C ld LIB_PATH=/usr/lib:/lib</parameter></term> - <listitem> - <para>This option rebuilds everything in the <filename - class="directory">ld</filename> subdirectory. Specifying the - <envar>LIB_PATH</envar> Makefile variable on the command line - allows us to override the default value of the temporary tools - and point it to the proper final path. The value of this variable - specifies the linker's default library search path. This - preparation is used in the next chapter.</para> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-binutils" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/bzip2.xml b/chapter05/bzip2.xml deleted file mode 100644 index 4f1e3aab9..000000000 --- a/chapter05/bzip2.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-bzip2" role="wrap"> - <?dbhtml filename="bzip2.html"?> - - <sect1info condition="script"> - <productname>bzip2</productname> - <productnumber>&bzip2-version;</productnumber> - <address>&bzip2-url;</address> - </sect1info> - - <title>Bzip2-&bzip2-version;</title> - - <indexterm zone="ch-tools-bzip2"> - <primary sortas="a-Bzip2">Bzip2</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/bzip2.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&bzip2-ch5-sbu;</seg> - <seg>&bzip2-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Bzip2</title> - - <para>The Bzip2 package does not contain a <command>configure</command> - script. There are two <filename>Makefile</filename>, one for the shared - library, and the other for the static library. Since we need both, We - do the compilation in two stages. First the shared library:</para> - -<screen><userinput remap="make">make -f Makefile-libbz2_so -make clean</userinput></screen> - - <variablelist> - <title>The meaning of the make parameter:</title> - - <varlistentry> - <term><parameter>-f Makefile-libbz2_so</parameter></term> - <listitem> - <para>This will cause Bzip2 to be built using a different - <filename>Makefile</filename> file, in this case the - <filename>Makefile-libbz2_so</filename> file, which creates a dynamic - <filename class="libraryfile">libbz2.so</filename> library and links - the Bzip2 utilities against it.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile and test the package with:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make PREFIX=/tools install -cp -v bzip2-shared /tools/bin/bzip2 -cp -av libbz2.so* /tools/lib -ln -sv libbz2.so.1.0 /tools/lib/libbz2.so</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-bzip2" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/changingowner.xml b/chapter05/changingowner.xml deleted file mode 100644 index 96a15b027..000000000 --- a/chapter05/changingowner.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-changingowner"> - <?dbhtml filename="changingowner.html"?> - - <title>Changing Ownership</title> - - <note> - <para>The commands in the remainder of this book must be performed while - logged in as user <systemitem class="username">root</systemitem> and no - longer as user <systemitem class="username">lfs</systemitem>. Also, double - check that <envar>$LFS</envar> is set in <systemitem - class="username">root</systemitem>'s environment.</para> - </note> - - <para>Currently, the <filename class="directory">$LFS/tools</filename> directory - is owned by the user <systemitem class="username">lfs</systemitem>, a user - that exists only on the host system. If the <filename - class="directory">$LFS/tools</filename> directory is kept as is, the files are - owned by a user ID without a corresponding account. This is dangerous because - a user account created later could get this same user ID and would own the - <filename class="directory">$LFS/tools</filename> directory and all the files - therein, thus exposing these files to possible malicious manipulation.</para> - - <para>To avoid this issue, you could add the <systemitem - class="username">lfs</systemitem> user to the new LFS system later when - creating the <filename>/etc/passwd</filename> file, taking care to assign it - the same user and group IDs as on the host system. Better yet, change the - ownership of the <filename class="directory">$LFS/tools</filename> directory to - user <systemitem class="username">root</systemitem> by running the following - command:</para> - -<screen><userinput>chown -R root:root $LFS/tools</userinput></screen> - - <para>Although the <filename class="directory">$LFS/tools</filename> directory - can be deleted once the LFS system has been finished, it can be retained to build - additional LFS systems <emphasis>of the same book version</emphasis>. How best - to backup <filename class="directory">$LFS/tools</filename> is a matter of - personal preference.</para> - - <caution> - <para>If you intend to keep the temporary tools for use in building future LFS - systems, <emphasis>now</emphasis> is the time to back them up. Subsequent - commands in chapter 6 will alter the tools currently in place, rendering them - useless for future builds.</para> - </caution> - -</sect1> diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 105ce05a8..467a02a36 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -5,48 +5,17 @@ %general-entities; ]> -<chapter id="chapter-temporary-tools" xreflabel="Chapter 5"> +<chapter id="chapter-cross-tools" xreflabel="Chapter 5"> <?dbhtml dir="chapter05"?> <?dbhtml filename="chapter05.html"?> - <title>Constructing a Temporary System</title> + <title>Compiling a Cross-Toolchain</title> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="toolchaintechnotes.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="generalinstructions.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass1.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass1.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/> </chapter> diff --git a/chapter05/coreutils.xml b/chapter05/coreutils.xml deleted file mode 100644 index 6f56a4108..000000000 --- a/chapter05/coreutils.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-coreutils" role="wrap"> - <?dbhtml filename="coreutils.html"?> - - <sect1info condition="script"> - <productname>coreutils</productname> - <productnumber>&coreutils-version;</productnumber> - <address>&coreutils-url;</address> - </sect1info> - - <title>Coreutils-&coreutils-version;</title> - - <indexterm zone="ch-tools-coreutils"> - <primary sortas="a-Coreutils">Coreutils</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/coreutils.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&coreutils-ch5-sbu;</seg> - <seg>&coreutils-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Coreutils</title> - - <para>Prepare Coreutils for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools --enable-install-program=hostname</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><envar>--enable-install-program=hostname</envar></term> - <listitem> - <para>This enables the <command>hostname</command> binary to be built - and installed – it is disabled by default but is required by the - Perl test suite.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Coreutils test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make RUN_EXPENSIVE_TESTS=yes check</userinput></screen> - - <para>The <parameter>RUN_EXPENSIVE_TESTS=yes</parameter> parameter tells the - test suite to run several additional tests that are considered - relatively expensive (in terms of CPU power and memory usage) on some - platforms, but generally are not a problem on Linux.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> -<!-- - <para>The above command refuses to install <filename>su</filename> - because the program cannot be installed setuid root as a non-privileged - user. By manually installing it, we can use it for running tests in the - final system as a non-privileged user. Install it with:</para> - -<screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen> ---> - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-coreutils" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/diffutils.xml b/chapter05/diffutils.xml deleted file mode 100644 index 62ba35874..000000000 --- a/chapter05/diffutils.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-diffutils" role="wrap"> - <?dbhtml filename="diffutils.html"?> - - <sect1info condition="script"> - <productname>diffutils</productname> - <productnumber>&diffutils-version;</productnumber> - <address>&diffutils-url;</address> - </sect1info> - - <title>Diffutils-&diffutils-version;</title> - - <indexterm zone="ch-tools-diffutils"> - <primary sortas="a-Diffutils">Diffutils</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/diffutils.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&diffutils-ch5-sbu;</seg> - <seg>&diffutils-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Diffutils</title> - - <para>Prepare Diffutils for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Diffutils test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-diffutils" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/file.xml b/chapter05/file.xml deleted file mode 100644 index 9fcfd1e6f..000000000 --- a/chapter05/file.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-file" role="wrap"> - <?dbhtml filename="file.html"?> - - <sect1info condition="script"> - <productname>file</productname> - <productnumber>&file-version;</productnumber> - <address>&file-url;</address> - </sect1info> - - <title>File-&file-version;</title> - - <indexterm zone="ch-tools-file"> - <primary sortas="a-File">File</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/file.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&file-ch5-sbu;</seg> - <seg>&file-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of File</title> - - <para>Prepare File for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the File test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-file" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/findutils.xml b/chapter05/findutils.xml deleted file mode 100644 index 064a9e848..000000000 --- a/chapter05/findutils.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-findutils" role="wrap"> - <?dbhtml filename="findutils.html"?> - - <sect1info condition="script"> - <productname>findutils</productname> - <productnumber>&findutils-version;</productnumber> - <address>&findutils-url;</address> - </sect1info> - - <title>Findutils-&findutils-version;</title> - - <indexterm zone="ch-tools-findutils"> - <primary sortas="a-Findutils">Findutils</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/findutils.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&findutils-ch5-sbu;</seg> - <seg>&findutils-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Findutils</title> -<!-- - <para>First, make some fixes required by glibc-2.28:</para> - -<screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c -sed -i '/unistd/a #include <sys/sysmacros.h>' gl/lib/mountlist.c -echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h</userinput></screen> ---> - <para>Prepare Findutils for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Findutils test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-findutils" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/flex.xml b/chapter05/flex.xml deleted file mode 100644 index 5e1afa194..000000000 --- a/chapter05/flex.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-flex" role="wrap"> - <?dbhtml filename="flex.html"?> - - <sect1info condition="script"> - <productname>flex</productname> - <productnumber>&flex-version;</productnumber> - <address>&flex-url;</address> - </sect1info> - - <title>Flex-&flex-version;</title> - - <indexterm zone="ch-tools-flex"> - <primary sortas="a-Flex">Flex</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/flex.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&flex-ch5-sbu;</seg> - <seg>&flex-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Flex</title> - - <para>Prepare Flex for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-flex" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/gawk.xml b/chapter05/gawk.xml deleted file mode 100644 index adcd2ea15..000000000 --- a/chapter05/gawk.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-gawk" role="wrap"> - <?dbhtml filename="gawk.html"?> - - <sect1info condition="script"> - <productname>gawk</productname> - <productnumber>&gawk-version;</productnumber> - <address>&gawk-url;</address> - </sect1info> - - <title>Gawk-&gawk-version;</title> - - <indexterm zone="ch-tools-gawk"> - <primary sortas="a-Gawk">Gawk</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/gawk.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gawk-ch5-sbu;</seg> - <seg>&gawk-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Gawk</title> - - <para>Prepare Gawk for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Gawk test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-gawk" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 0534ee057..ad2ac0d35 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -25,7 +25,7 @@ <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/gcc.xml" + href="../chapter08/gcc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gcc-ch5p1-sbu;</seg> - <seg>&gcc-ch5p1-du;</seg> + <seg>&gcc-tmpp1-sbu;</seg> + <seg>&gcc-tmpp1-du;</seg> </seglistitem> </segmentedlist> @@ -43,17 +43,11 @@ <sect2 role="installation"> <title>Installation of Cross GCC</title> - <para arch="default">GCC now requires the GMP, MPFR, and MPC packages. As - these packages may not be included in your host distribution, they will be - built with GCC. Unpack each package into the GCC source directory and - rename the resulting directories so the GCC build procedures will - automatically use them:</para> - - <para arch="ml_32,ml_x32,ml_all">GCC now requires the GMP, ISL, MPFR, and MPC packages. - As these packages may not be included in your host distribution, they will - be built with GCC. Unpack each package into the GCC source directory and - rename the resulting directories so the GCC build procedures will - automatically use them:</para> + <para>GCC requires the GMP, MPFR and MPC packages. As these packages may + not be included in your host distribution, they will be built with + GCC. Unpack each package into the GCC source directory and rename the + resulting directories so the GCC build procedures will automatically + use them:</para> <note><para>There are frequent misunderstandings about this chapter. The procedures are the same as every other chapter as explained earlier (<xref @@ -61,56 +55,17 @@ directory and then change to the directory created. Only then should you proceed with the instructions below.</para></note> -<screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz +<screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz mv -v mpfr-&mpfr-version; mpfr tar -xf ../gmp-&gmp-version;.tar.xz mv -v gmp-&gmp-version; gmp tar -xf ../mpc-&mpc-version;.tar.gz -mv -v mpc-&mpc-version; mpc</userinput></screen> -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz -mv -v mpfr-&mpfr-version; mpfr -tar -xf ../gmp-&gmp-version;.tar.xz -mv -v gmp-&gmp-version; gmp -tar -xf ../mpc-&mpc-version;.tar.gz -mv -v mpc-&mpc-version; mpc -tar -xf ../isl-&isl-version;.tar.xz +mv -v mpc-&mpc-version; mpc</userinput> +<userinput remap="pre" arch="ml_32,ml_x32,ml_all">tar -xf ../isl-&isl-version;.tar.xz mv -v isl-&isl-version; isl</userinput></screen> - <para>The following command will change the location of GCC's default - dynamic linker to use the one installed in <filename - class="directory">/tools</filename>. It also removes <filename - class="directory">/usr/include</filename> from GCC's include search path. - Issue:</para> - -<screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h -do - cp -uv $file{,.orig} - sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&@g' \ - -e 's@/usr@/tools@g' $file.orig > $file - touch $file.orig -done -sed -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_1/ s;\".*\";\"/tools/lib/\";" \ - -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_2/ s;\".*\";\"\";" \ - -i gcc/gcc.c</userinput></screen> - - <para>In case the above seems hard to follow, let's break it down a bit. - First we copy the files <filename>gcc/config/linux.h</filename>, - <filename>gcc/config/i386/linux.h</filename>, and - <filename>gcc/config/i386/linux64.h</filename> to a file of - the same name but with an added suffix of <quote>.orig</quote>. Then the - first sed expression prepends <quote>/tools</quote> to every instance of - <quote>/lib/ld</quote>, <quote>/lib64/ld</quote> or - <quote>/lib32/ld</quote>, while the second one replaces hard-coded - instances of <quote>/usr</quote>. Next, we add our define statements which - alter the default startfile prefix to the end of the file. Note that the - trailing <quote>/</quote> in <quote>/tools/lib/</quote> is required. - Finally, we use <command>touch</command> to update the timestamp on the - copied files. When used in conjunction with <command>cp -u</command>, this - prevents unexpected changes to the original files in case the commands are - inadvertently run twice.</para> - - <para arch="default">Finally, on x86_64 hosts, set the default directory - name for 64-bit libraries to <quote>lib</quote>:</para> + <para arch="default">On x86_64 hosts, set the default directory name for + 64-bit libraries to <quote>lib</quote>:</para> <screen arch="default"><userinput remap="pre">case $(uname -m) in x86_64) @@ -119,33 +74,13 @@ sed -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_1/ s;\".*\";\"/tools/lib/ ;; esac</userinput></screen> -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ - -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \ - -i.orig gcc/config/i386/t-linux64</userinput></screen> - -<!-- - <para>GCC doesn't detect stack protection correctly, which causes problems - for the build of Glibc-&glibc-version;, so fix that by issuing the following - command:</para> - -<screen><userinput remap="pre">sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure</userinput></screen> ---> + <para arch="ml_32,ml_x32,ml_all">Change the default directory name for + libraries:</para> -<!-- - <para>Also fix a problem identified upstream:</para> - -<screen><userinput remap="pre">sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> ---> - - <!-- Following patch might be obsolete with gcc >= 8.2.1 --> - <!-- see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 --> - <!-- Fix applied in ch5-gcc-pass{1,2}, ch6-gcc --> -<!-- - <para arch="ml_32,ml_x32,ml_all">Fix an issue with isl-&isl-version;:</para> - -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ - -i gcc/graphite.h</userinput></screen> ---> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ + -e '/m32=/s/m32=.*/m32=..\&lib-m32;$(call if_multiarch,:i386-linux-gnu)/' \ + -i.orig gcc/config/i386/t-linux64 +</userinput></screen> <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> @@ -155,21 +90,41 @@ cd build</userinput></screen> <para>Prepare GCC for compilation:</para> -<screen><userinput arch="default" remap="configure">mloptions="--disable-multilib"</userinput> -<userinput arch="ml_32,ml_x32,ml_all" remap="configure">mloptions="--enable-multilib --with-multilib-list=m64"</userinput> -<userinput arch="ml_32,ml_all" remap="configure">mloptions="$mloptions,m32"</userinput> -<userinput arch="ml_x32,ml_all" remap="configure">mloptions="$mloptions,mx32"</userinput> +<screen arch="default"><userinput remap="configure">../configure \ + --target=$LFS_TGT \ + --prefix=$LFS/tools \ + --with-glibc-version=2.11 \ + --with-sysroot=$LFS \ + --with-newlib \ + --without-headers \ + --enable-initfini-array \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + --disable-decimal-float \ + --disable-threads \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libstdcxx \ + --enable-languages=c,c++</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure" + arch="ml_32">mlist=m64,m32</userinput><userinput remap="configure" + arch="ml_x32">mlist=m64,mx32</userinput><userinput remap="configure" + arch="ml_all">mlist=m64,m32,mx32</userinput> <userinput remap="configure">../configure \ --target=$LFS_TGT \ - --prefix=/tools \ + --prefix=$LFS/tools \ --with-glibc-version=2.11 \ --with-sysroot=$LFS \ --with-newlib \ --without-headers \ - --with-local-prefix=/tools \ - --with-native-system-header-dir=/tools/include \ + --enable-initfini-array \ --disable-nls \ --disable-shared \ + --enable-multilib --with-multilib-list=$mlist \ --disable-decimal-float \ --disable-threads \ --disable-libatomic \ @@ -178,8 +133,7 @@ cd build</userinput></screen> --disable-libssp \ --disable-libvtv \ --disable-libstdcxx \ - --enable-languages=c,c++ \ - $mloptions</userinput></screen> + --enable-languages=c,c++</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> @@ -213,69 +167,52 @@ cd build</userinput></screen> </varlistentry> <varlistentry> - <term><parameter>--with-local-prefix=/tools</parameter></term> + <term><parameter>--enable-initfini-array</parameter></term> <listitem> - <para>The local prefix is the location in the system that GCC will search - for locally installed include files. The default is <filename>/usr/local</filename>. - Setting this to <filename>/tools</filename> helps keep the host location of - <filename>/usr/local</filename> out of this GCC's search path.</para> + <para>This switch forces the use of some internal data structures + that are needed but cannot be detected when building a cross + compiler.</para> </listitem> </varlistentry> <varlistentry> - <term><parameter>--with-native-system-header-dir=/tools/include</parameter></term> + <term><parameter>--disable-shared</parameter></term> <listitem> - <para>By default, GCC searches <filename>/usr/include</filename> for - system headers. In conjunction with the sysroot switch, this would - normally translate to <filename>$LFS/usr/include</filename>. However - the headers that will be installed in the next two sections will go - to <filename>$LFS/tools/include</filename>. This switch ensures that - gcc will find them correctly. In the second pass of GCC, this same - switch will ensure that no headers from the host system are - found.</para> + <para>This switch forces GCC to link its internal libraries + statically. We need this because the shared libraries require glibc, + which is not yet installed on the target system.</para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>--disable-shared</parameter></term> + <varlistentry arch="default"> + <term><parameter>--disable-multilib</parameter></term> <listitem> - <para>This switch forces GCC to link its internal libraries - statically. We do this to avoid possible issues with the host - system.</para> + <para>On x86_64, LFS does not support a multilib configuration. + This switch is harmless for x86.</para> + </listitem> + </varlistentry> + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--enable-multilib --with-multilib-list=...</parameter></term> + <listitem> + <para>LFS canbe used to support multilib. Which they are is + specified in the multilib list.</para> </listitem> </varlistentry> <varlistentry> <term><parameter>--disable-decimal-float, --disable-threads, - --disable-libatomic, --disable-libgomp, <!--- -disable-libmpx,--> + --disable-libatomic, --disable-libgomp, --disable-libquadmath, --disable-libssp, --disable-libvtv, --disable-libstdcxx</parameter></term> <listitem> <para>These switches disable support for the decimal floating point - extension, threading, libatomic, libgomp, <!--libmpx, --> libquadmath, libssp, + extension, threading, libatomic, libgomp, libquadmath, libssp, libvtv, and the C++ standard library respectively. These features will fail to compile when building a cross-compiler and are not necessary for the task of cross-compiling the temporary libc.</para> </listitem> </varlistentry> - <varlistentry arch="default"> - <term><parameter>--disable-multilib</parameter></term> - <listitem> - <para>On x86_64, LFS does not yet support a multilib configuration. - This switch is harmless for x86.</para> - </listitem> - </varlistentry> - - <varlistentry arch="ml_32,ml_x32,ml_all"> - <term><parameter>--enable-multilib, - --with-multilib-list=m32,m64,mx32</parameter></term> - <listitem> - <para>LFS now supports a multilib configuration. Enable it for the - 32bit, the 64-bit, and the mixed mode.</para> - </listitem> - </varlistentry> - <varlistentry> <term><parameter>--enable-languages=c,c++</parameter></term> <listitem> @@ -290,26 +227,25 @@ cd build</userinput></screen> <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. At this point, the test suite would - normally be run, but, as mentioned before, the test suite framework is - not in place yet. The benefits of running the tests at this point - are minimal since the programs from this first pass will soon be - replaced.</para> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> -<!-- - <para>Using <parameter>- -disable-shared</parameter> means that the - <filename>libgcc_eh.a</filename> file isn't created and installed. The - Glibc package depends on this library as it uses - <parameter>-lgcc_eh</parameter> within its build system. This dependency - can be satisfied by creating a symlink to <filename>libgcc.a</filename>, - since that file will end up containing the objects normally contained in - <filename>libgcc_eh.a</filename>:</para> - -<screen><userinput remap="install">ln -sv libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`</userinput></screen> ---> + <screen><userinput remap="install">make install</userinput></screen> + + <para>This build of GCC has installed a couple of internal system + headers. Normally one of them, <filename>limits.h</filename>, would in turn + include the corresponding system <filename>limits.h</filename> header, in + this case, <filename>$LFS/usr/include/limits.h</filename>. However, at the + time of this build of GCC <filename>$LFS/usr/include/limits.h</filename> + does not exist, so the internal header that has just been installed is a + partial, self-contained file and does not include the extended features of + the system header. This is adequate for building glibc, but the full + internal header will be needed later. Create a full version of the internal + header using a command that is identical to what the GCC build system does + in normal circumstances:</para> + +<screen><userinput remap="install">cd .. +cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ + `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h</userinput></screen> </sect2> <sect2 role="content"> diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml deleted file mode 100644 index 8f3c7c879..000000000 --- a/chapter05/gcc-pass2.xml +++ /dev/null @@ -1,267 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-gcc-pass2" role="wrap"> - <?dbhtml filename="gcc-pass2.html"?> - - <sect1info condition="script"> - <productname>gcc-pass2</productname> - <productnumber>&gcc-version;</productnumber> - <address>&gcc-url;</address> - </sect1info> - - <title>GCC-&gcc-version; - Pass 2</title> - - <indexterm zone="ch-tools-gcc-pass2"> - <primary sortas="a-GCC">GCC</primary> - <secondary>tools, pass 2</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/gcc.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gcc-ch5p2-sbu;</seg> - <seg>&gcc-ch5p2-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of GCC</title> - - <para arch="default">As in the first build of GCC, the GMP, MPFR, and MPC packages are - required. Unpack the tarballs and move them into the required directory - names:</para> - <para arch="ml_32,ml_x32,ml_all">As in the first build of GCC, the GMP, MPFR, MPC and ISL packages are - required. Unpack the tarballs and move them into the required directory - names:</para> - -<screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz -mv -v mpfr-&mpfr-version; mpfr -tar -xf ../gmp-&gmp-version;.tar.xz -mv -v gmp-&gmp-version; gmp -tar -xf ../mpc-&mpc-version;.tar.gz -mv -v mpc-&mpc-version; mpc</userinput></screen> -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz -mv -v mpfr-&mpfr-version; mpfr -tar -xf ../gmp-&gmp-version;.tar.xz -mv -v gmp-&gmp-version; gmp -tar -xf ../mpc-&mpc-version;.tar.gz -mv -v mpc-&mpc-version; mpc -tar -xf ../isl-&isl-version;.tar.xz -mv -v isl-&isl-version; isl</userinput></screen> - - <para>Once again, change the location of GCC's default dynamic linker to - use the one installed in <filename - class="directory">/tools</filename>.</para> - -<screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h -do - cp -uv $file{,.orig} - sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&@g' \ - -e 's@/usr@/tools@g' $file.orig > $file - touch $file.orig -done -sed -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_1/ s;\".*\";\"/tools/lib/\";" \ - -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_2/ s;\".*\";\"\";" \ - -i gcc/gcc.c</userinput></screen> - - <para arch="default">If building on x86_64, change the default directory - name for 64-bit libraries to <quote>lib</quote>:</para> - -<screen arch="default"><userinput remap="pre">case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac</userinput></screen> -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ - -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \ - -i.orig gcc/config/i386/t-linux64</userinput></screen> - - <para>Our first build of GCC has installed a couple of internal system - headers. Normally one of them, <filename>limits.h</filename>, will in turn - include the corresponding system <filename>limits.h</filename> header, in - this case, <filename>/tools/include/limits.h</filename>. However, at the - time of the first build of gcc <filename>/tools/include/limits.h</filename> - did not exist, so the internal header that GCC installed is a partial, - self-contained file and does not include the extended features of the - system header. This was adequate for building the temporary libc, but this - build of GCC now requires the full internal header. Create a full version - of the internal header using a command that is identical to what the GCC - build system does in normal circumstances:</para> - -<screen><userinput remap="pre">cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ - `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h</userinput></screen> -<!-- - <para>For x86 machines, the limited number of registers is a bottleneck - for the system. Free one up by not using a frame pointer that is not - needed:</para> - -<screen><userinput remap="pre">case `uname -m` in - i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; -esac</userinput></screen> ---> - <para>Create a separate build directory again:</para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Before starting to build GCC, remember to unset any environment - variables that override the default optimization flags.</para> - - <para>Now prepare GCC for compilation:</para> - -<screen><userinput arch="default" remap="configure">mloptions="--disable-multilib"</userinput> -<userinput arch="ml_32,ml_x32,ml_all" remap="configure">mloptions="--with-system-zlib --enable-multilib --with-multilib-list=m64"</userinput> -<userinput arch="ml_32,ml_all" remap="configure">mloptions="$mloptions,m32"</userinput> -<userinput arch="ml_x32,ml_all" remap="configure">mloptions="$mloptions,mx32"</userinput> -<userinput remap="configure">CC=$LFS_TGT-gcc \ -CXX=$LFS_TGT-g++ \ -AR=$LFS_TGT-ar \ -RANLIB=$LFS_TGT-ranlib \ -../configure \ - --prefix=/tools \ - --with-local-prefix=/tools \ - --with-native-system-header-dir=/tools/include \ - --enable-languages=c,c++ \ - --disable-libstdcxx-pch \ - --disable-bootstrap \ - --disable-libgomp \ - $mloptions</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>--enable-languages=c,c++</parameter></term> - <listitem> - <para>This option ensures that both the C and C++ compilers are - built.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-libstdcxx-pch</parameter></term> - <listitem> - <para>Do not build the pre-compiled header (PCH) for - <filename class="libraryfile">libstdc++</filename>. It takes up a - lot of space, and we have no use for it.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-bootstrap</parameter></term> - <listitem> - <para>For native builds of GCC, the default is to do a "bootstrap" - build. This does not just compile GCC, but compiles it several times. - It uses the programs compiled in a first round to compile itself a - second time, and then again a third time. The second and third - iterations are compared to make sure it can reproduce itself - flawlessly. This also implies that it was compiled correctly. - However, the LFS build method should provide a solid compiler - without the need to bootstrap each time.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>As a finishing touch, create a symlink. Many programs and scripts - run <command>cc</command> instead of <command>gcc</command>, which is - used to keep programs generic and therefore usable on all kinds of UNIX - systems where the GNU C compiler is not always installed. Running - <command>cc</command> leaves the system administrator free to decide - which C compiler to install:</para> - -<screen><userinput remap="install">ln -sv gcc /tools/bin/cc</userinput></screen> - - <caution> - <para>At this point, it is imperative to stop and ensure that the basic - functions (compiling and linking) of the new toolchain are working as - expected. To perform a sanity check, run the following commands:</para> - -<screen><userinput>echo 'int main(){}' > dummy.c -cc dummy.c -readelf -l a.out | grep ': /tools'</userinput></screen> - - <para>If everything is working correctly, there should be no errors, - and the output of the last command will be of the form:</para> - -<screen><computeroutput>[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]</computeroutput></screen> - - - <para arch="ml_32,ml_all">Repeat the test for 32-bit:</para> - -<screen arch="ml_32,ml_all"><userinput>cc -m32 dummy.c -readelf -l a.out | grep ': /tools'</userinput></screen> - - <para arch="ml_32,ml_all">In this case, the output shoud be:</para> - -<screen arch="ml_32,ml_all"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen> - - <para arch="ml_x32,ml_all">Repeat the test for x32-bit:</para> - -<screen arch="ml_x32,ml_all"><userinput>cc -mx32 dummy.c -readelf -l a.out | grep ': /tools'</userinput></screen> - - <para arch="ml_x32,ml_all">In this case, the output shoud be:</para> - -<screen arch="ml_x32,ml_all"><computeroutput>[Requesting program interpreter: /tools/libx32/ld-linux-x32.so.2]</computeroutput></screen> - - <para arch="default">Note that the dynamic linker will be - /tools/lib/ld-linux.so.2 for 32-bit machines.</para> - - <para>If the output is not shown as above or there was no output at all, - then something is wrong. Investigate and retrace the steps to find out - where the problem is and correct it. This issue must be resolved before - continuing on. First, perform the sanity check again, using - <command>gcc</command> instead of <command>cc</command>. If this works, - then the <filename class="symlink">/tools/bin/cc</filename> symlink is - missing. Install the symlink as per above. - Next, ensure that the <envar>PATH</envar> is correct. This - can be checked by running <command>echo $PATH</command> and verifying that - <filename class="directory">/tools/bin</filename> is at the head of the - list. If the <envar>PATH</envar> is wrong it could mean that you are not - logged in as user <systemitem class="username">lfs</systemitem> or that - something went wrong back in <xref linkend="ch-preps-settingenviron" - role="."/></para> - - <para>Once all is well, clean up the test files:</para> - -<screen><userinput>rm -v dummy.c a.out</userinput></screen> - - </caution> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-gcc" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 7cf862545..1918ffb26 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -25,7 +25,7 @@ <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/glibc.xml" + href="../chapter08/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&glibc-ch5-sbu;</seg> - <seg>&glibc-ch5-du;</seg> + <seg>&glibc-tmp-sbu;</seg> + <seg>&glibc-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -43,6 +43,33 @@ <sect2 role="installation"> <title>Installation of Glibc</title> + <para arch="default">First, create a symbolic link for LSB compliance. Additionally, + for x86_64, create a compatibility symbolic link required for proper + operation of the dynamic library loader:</para> + +<screen arch="default"><userinput remap="pre">case $(uname -m) in + i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3 + ;; + x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 + ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3 + ;; +esac</userinput></screen> + + <para arch="ml_32,ml_x32,ml_all">First, create symbolic links for LSB compliance + and compatibility symbolic links required for proper + operation of the dynamic library loader:</para> + +<!-- no ld-linux.so.2 here as multilib is based on x86_64, not on i686 --> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 +ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3</userinput></screen> + + <para>Some of the Glibc programs use the non-FHS compliant + <filename class="directory">/var/db</filename> directory to store their + runtime data. Apply the following patch to make such programs store their + runtime data in the FHS-compliant locations:</para> + +<screen><userinput remap="pre">patch -Np1 -i ../glibc-&glibc-version;-fhs-1.patch</userinput></screen> + <para>The Glibc documentation recommends building Glibc in a dedicated build directory:</para> @@ -52,18 +79,22 @@ cd build</userinput></screen> <para>Next, prepare Glibc for compilation:</para> <screen arch="default"><userinput remap="configure">../configure \ - --prefix=/tools \ + --prefix=/usr \ --host=$LFS_TGT \ --build=$(../scripts/config.guess) \ --enable-kernel=&min-kernel; \ - --with-headers=/tools/include</userinput></screen> + --with-headers=$LFS/usr/include \ + libc_cv_slibdir=/lib</userinput></screen> <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure \ - --prefix=/tools \ + --prefix=/usr \ --host=$LFS_TGT \ --build=$(../scripts/config.guess) \ --enable-kernel=&min-kernel; \ + --with-headers=$LFS/usr/include \ --enable-multi-arch \ - --with-headers=/tools/include</userinput></screen> + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + libc_cv_slibdir=/lib</userinput></screen> <!-- libc_cv_forced_unwind=yes \ libc_cv_c_cleanup=yes</userinput></screen> --> @@ -75,8 +106,8 @@ cd build</userinput></screen> <term><parameter>--host=$LFS_TGT, --build=$(../scripts/config.guess)</parameter></term> <listitem> <para>The combined effect of these switches is that Glibc's build system - configures itself to cross-compile, using the cross-linker and - cross-compiler in <filename class="directory">/tools</filename>.</para> + configures itself to be cross-compiled, using the cross-linker and + cross-compiler in <filename class="directory">$LFS/tools</filename>.</para> </listitem> </varlistentry> @@ -89,51 +120,23 @@ cd build</userinput></screen> </listitem> </varlistentry> - <varlistentry arch="ml_32,ml_x32,ml_all"> - <term><parameter>--enable-multi-arch</parameter></term> - <listitem> - <para>Enables glibc for multiarch environments.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>--with-headers=/tools/include</parameter></term> + <term><parameter>--with-headers=$LFS/usr/include</parameter></term> <listitem> - <para>This tells Glibc to compile itself against the headers recently - installed to the tools directory, so that it knows exactly what - features the kernel has and can optimize itself accordingly.</para> - </listitem> - </varlistentry> -<!-- - <varlistentry> - <term><parameter>libc_cv_forced_unwind=yes</parameter></term> - <listitem> - <para>The linker installed during - <xref linkend="ch-tools-binutils-pass1"/> was cross-compiled and as - such cannot be used until Glibc has been installed. This means that - the configure test for force-unwind support will fail, as it relies on - a working linker. The libc_cv_forced_unwind=yes variable is passed in - order to inform <command>configure</command> that force-unwind - support is available without it having to run the test.</para> + <para>This tells Glibc to compile itself against the headers + recently installed to the $LFS/usr/include directory, so that + it knows exactly what features the kernel has and can optimize + itself accordingly.</para> </listitem> </varlistentry> + <varlistentry> - <term><parameter>libc_cv_c_cleanup=yes</parameter></term> + <term><parameter>libc_cv_slibdir=/lib</parameter></term> <listitem> - <para>Similarly, we pass libc_cv_c_cleanup=yes through to the - <command>configure</command> script so that the test is skipped and C - cleanup handling support is configured.</para> + <para>This ensures that the library is installed in /lib instead + of the default /lib64 on 64 bit machines.</para> </listitem> </varlistentry> ---> -<!-- <varlistentry> - <term><parameter>libc_cv_ctors_header=yes</parameter></term> - <listitem> - <para>Similarly, we pass libc_cv_ctors_header=yes through to the - <command>configure</command> script so that the test is skipped and - gcc constructor support is configured.</para> - </listitem> - </varlistentry>--> </variablelist> @@ -161,216 +164,217 @@ cd build</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> + <warning><para>If <envar>LFS</envar> is not properly set, and despite the + recommendations, you are building as root, the next command will install + the newly built glibc to your host system, which most likely will render it + unusable. So double check that the environment is correctly set for user + <systemitem class="username">lfs</systemitem>.</para></warning> + +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + + <variablelist> + <title>The meaning of the <command>make install</command> option:</title> + + <varlistentry> + <term><parameter>DESTDIR=$LFS</parameter></term> + <listitem> + <para>The <envar>DESTDIR</envar> make variable is used by almost all + packages to define the location where the package should be + installed. If it is not set, it defaults to the root (<filename + class="directory">/</filename>) directory. Here we specify that + the package be installed in <filename class="directory">$LFS + </filename>, which will become the root after <xref linkend= + "ch-tools-chroot"/>.</para> + </listitem> + </varlistentry> - <caution> - <para>At this point, it is imperative to stop and ensure that the basic - functions (compiling and linking) of the new toolchain are working as - expected. To perform a sanity check, run the following commands:</para> + </variablelist> + + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> <screen><userinput>echo 'int main(){}' > dummy.c $LFS_TGT-gcc dummy.c -readelf -l a.out | grep ': /tools'</userinput></screen> +readelf -l a.out | grep '/ld-linux'</userinput></screen> - <para>If everything is working correctly, there should be no errors, - and the output of the last command will be of the form:</para> + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> -<screen><computeroutput>[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]</computeroutput></screen> +<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> - <para>Note that for 32-bit machines, the interpreter name will be - <filename>/tools/lib/ld-linux.so.2</filename>.</para> + <para arch="default">Note that for 32-bit machines, the interpreter name will be + <filename>/lib/ld-linux.so.2</filename>.</para> - <para>If the output is not shown as above or there was no output at all, - then something is wrong. Investigate and retrace the steps to find out - where the problem is and correct it. This issue must be resolved before - continuing on.</para> + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on.</para> - <para>Once all is well, clean up the test files:</para> + <para>Once all is well, clean up the test files:</para> <screen><userinput>rm -v dummy.c a.out</userinput></screen> - </caution> + </caution> - <note><para>Building Binutils in the section after next will serve as an - additional check that the toolchain has been built properly. If Binutils - fails to build, it is an indication that something has gone wrong with the - previous Binutils, GCC, or Glibc installations.</para></note> + <note><para>Building packages in the next chapter will serve as an + additional check that the toolchain has been built properly. If some + package, especially binutils-pass2 or gcc-pass2, fails to build, it is + an indication that something has gone wrong with the + previous Binutils, GCC, or Glibc installations.</para></note> - </sect2> + <para>Now that our cross-toolchain is complete, finalize the installation + of the limits.h header. For doing so, run a utility provided by the GCC + developers:</para> - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Glibc 32-bit</title> - - <para>Clean the build directory for redoing glibc for 32-bit:</para> -<screen><userinput remap="pre">mkdir ../build32 -cd ../build32</userinput></screen> - - <para>Rebuild glibc for 32-bit:</para> -<screen><userinput remap="configure">echo slibdir=/tools/lib32 > configparms -BUILD_CC="gcc -m32" \ -CC="${LFS_TGT}-gcc -m32" \ -CXX="${LFS_TGT}-g++ -m32" \ -AR="${LFS_TGT}-ar" \ -RANLIB="${LFS_TGT}-ranlib" \ -../configure --prefix=/tools \ - --build=$(../scripts/config.guess) \ - --host=${LFS_TGT32} \ - --enable-kernel=&min-kernel; \ - --with-headers=/tools/include \ - --with-binutils=/tools/bin \ - --enable-multi-arch \ - --libdir=/tools/lib32 \ - --libexecdir=/tools/lib32</userinput></screen> -<!-- \ - libc_cv_forced_unwind=yes \ - libc_cv_c_cleanup=yes</userinput></screen> --> +<screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen> - <variablelist> - <title>The meaning of the extra configure options:</title> + </sect2> - <varlistentry> - <term><parameter>--enable-multi-arch</parameter></term> - <listitem> - <para>Enables glibc for multiarch environments.</para> - </listitem> - </varlistentry> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all"> + <title>Building Glibc - 32bit</title> + + <para>Now recompile for m32. The extracted source can be + reused but needs to cleaned before installing the m32 + version of Glibc.</para> + + <para>Clear the build directory and remove artefacts from + previous build:</para> + +<screen><userinput remap="pre">make clean +find .. -name "*.a" -delete</userinput></screen> + + <para>Configure Glibc for m32 with the following commands:</para> + +<screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \ +CXX="$LFS_TGT-g++ -m32" \ +../configure \ + --prefix=/usr \ + --host=$LFS_TGT32 \ + --build=$(../scripts/config.guess) \ + --enable-kernel=&min-kernel; \ + --with-headers=$LFS/usr/include \ + --enable-multi-arch \ + --libdir=&usr-lib-m32; \ + --libexecdir=&usr-lib-m32; \ + libc_cv_slibdir=&lib-m32;</userinput></screen> - <varlistentry> - <term><parameter>--libdir=/tools/lib32, --libexecdir=/tools/lib32</parameter></term> - <listitem> - <para>Overrides location for installing 32-bit files.</para> - </listitem> - </varlistentry> + <para>Compile the package:</para> - <varlistentry> - <term><parameter>--with-binutils=/tools/bin</parameter></term> - <listitem> - <para>This tells Glibc to compile itself against the utilities - found within our "tools" heirachy, because otherwise...</para> - </listitem> - </varlistentry> +<screen><userinput remap="make">make</userinput></screen> - </variablelist> + <para>Install the package:</para> - <para>Now compile the 32-bit version of glibc:</para> -<screen><userinput remap="make">make</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -a DESTDIR&lib-m32;/* $LFS&lib-m32;/ +cp -a DESTDIR&usr-lib-m32; $LFS/usr/ +install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \ + $LFS/usr/include/gnu/ +ln -svf ..&lib-m32;/ld-linux.so.2 $LFS/lib/ld-linux.so.2</userinput></screen> - <para>Install 32-bit version of glibc:</para> -<screen><userinput remap="install">make install_root="${PWD}/DESTDIR" install -install -vdm755 /tools/lib32 -cp -Rv DESTDIR/tools/lib32/* /tools/lib32 -install -vm644 DESTDIR/tools/include/gnu/{lib-names,stubs}-32.h \ - /tools/include/gnu/ -ln -svf /tools/lib32/ld-linux.so.2 /tools/lib/</userinput></screen> + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> - </sect2> +<screen><userinput>echo 'int main(){}' > dummy.c +$LFS_TGT-gcc -m32 dummy.c +readelf -l a.out | grep '/ld-linux'</userinput></screen> - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Glibc x32-bit</title> - - <para>Create a build directory for redoing glibc for x32-bit:</para> -<screen><userinput remap="pre">mkdir ../build32x -cd ../build32x</userinput></screen> - - <para>Rebuild glibc for x32-bit:</para> -<screen><userinput remap="configure">echo slibdir=/tools/libx32 > configparms -BUILD_CC="gcc -mx32" \ -CC="${LFS_TGT}-gcc -mx32" \ -CXX="${LFS_TGT}-g++ -mx32" \ -AR="${LFS_TGT}-ar" \ -RANLIB="${LFS_TGT}-ranlib" \ -../configure --prefix=/tools \ - --build=$(../scripts/config.guess) \ - --host=${LFS_TGTX32} \ - --enable-kernel=&min-kernel; \ - --with-headers=/tools/include \ - --with-binutils=/tools/bin \ - --enable-multi-arch \ - --libdir=/tools/libx32 \ - --libexecdir=/tools/libx32</userinput></screen> -<!-- \ - libc_cv_forced_unwind=yes \ - libc_cv_c_cleanup=yes</userinput></screen> --> + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> - <variablelist> - <title>The meaning of the extra configure options:</title> +<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen> - <varlistentry> - <term><parameter>--enable-multi-arch</parameter></term> - <listitem> - <para>Enables glibc for multiarch environments.</para> - </listitem> - </varlistentry> + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on.</para> - <varlistentry> - <term><parameter>--libdir=/tools/libx32, --libexecdir=/tools/libx32</parameter></term> - <listitem> - <para>Overrides location for installing x32-bit files.</para> - </listitem> - </varlistentry> + <para>Once all is well, clean up the test files:</para> - <varlistentry> - <term><parameter>--with-binutils=/tools/bin</parameter></term> - <listitem> - <para>This tells Glibc to compile itself against the utilities - found within our "tools" heirachy, because otherwise...</para> - </listitem> - </varlistentry> +<screen><userinput>rm -v dummy.c a.out</userinput></screen> - </variablelist> + </caution> - <para>Now compile the x32-bit version of glibc:</para> -<screen><userinput remap="make">make</userinput></screen> + </sect2><!-- m32 --> - <para>Install x32-bit version of glibc:</para> -<screen><userinput remap="install">make install_root="${PWD}/DESTDIR" install -install -vdm755 /tools/libx32 -cp -Rv DESTDIR/tools/libx32/* /tools/libx32 -install -vm644 DESTDIR/tools/include/gnu/lib-names-x32.h \ - /tools/include/gnu/ -[ -e DESTDIR/tools/include/gnu/stubs-x32.h ] \ - && install -vm644 DESTDIR/tools/include/gnu/stubs-x32.h /tools/include/gnu/ \ - || ln -v /tools/include/gnu/stubs-64.h /tools/include/gnu/stubs-x32.h -ln -svf /tools/libx32/ld-linux-x32.so.2 /tools/lib/</userinput></screen> -<!-- For whatever reason the stubs-x32.h doesn't get created. The 'ln' above is -just a "brute force" workaraound - by copying the stubs-64.h file. --> - - <caution> - <para>At this point, it is imperative to stop and ensure that the basic - functions (compiling and linking) of the new toolchain are working as - expected. To perform a sanity check, run the following commands:</para> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_x32,ml_all"> + <title>Building Glibc - x32bit</title> + + <para>Now recompile for mx32. The extracted source can be + reused but needs to cleaned before installing the mx32 + version of Glibc.</para> + + <para>Clear the build directory and remove artefacts from + previous build:</para> + +<screen><userinput remap="pre">make clean +find .. -name "*.a" -delete</userinput></screen> + + <para>Configure Glibc for mx32 with the following commands:</para> + +<screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \ +CXX="$LFS_TGT-g++ -mx32" \ +../configure \ + --prefix=/usr \ + --host=$LFS_TGTX32 \ + --build=$(../scripts/config.guess) \ + --enable-kernel=&min-kernel; \ + --with-headers=$LFS/usr/include \ + --enable-multi-arch \ + --libdir=&usr-lib-mx32; \ + --libexecdir=&usr-lib-mx32; \ + libc_cv_slibdir=&lib-mx32;</userinput></screen> -<screen><userinput>echo 'int main(){}' > dummy.c -$LFS_TGT-gcc -m32 dummy.c -readelf -l a.out | grep ': /tools'</userinput></screen> + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> - <para>If everything is working correctly, there should be no errors, - and the output of the last command will be of the form:</para> + <para>Install the package:</para> -<screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen> +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -a DESTDIR&lib-mx32;/* $LFS&lib-mx32;/ +cp -a DESTDIR&usr-lib-mx32; $LFS/usr/ +install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-x32.h \ + $LFS/usr/include/gnu/ +ln -svf ..&lib-mx32;/ld-linux-x32.so.2 $LFS/lib/ld-linux-x32.so.2</userinput></screen> - <para>Redo test for x32-ABI:</para> + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> <screen><userinput>echo 'int main(){}' > dummy.c $LFS_TGT-gcc -mx32 dummy.c -readelf -l a.out | grep ': /tools'</userinput></screen> +readelf -l a.out | grep '/ld-linux-x32'</userinput></screen> - <para>Output should be like:</para> + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> -<screen><computeroutput>[Requesting program interpreter: /tools/libx32/ld-linux-x32.so.2]</computeroutput></screen> +<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-x32.so.2]</computeroutput></screen> - <para>If the output is not shown as above or there was no output at all, - then something is wrong. Investigate and retrace the steps to find out - where the problem is and correct it. This issue must be resolved before - continuing on.</para> + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on.</para> - <para>Once all is well, clean up the test files:</para> + <para>Once all is well, clean up the test files:</para> <screen><userinput>rm -v dummy.c a.out</userinput></screen> - </caution> - </sect2> - + </caution> + + </sect2><!-- mx32 --> + <sect2 role="content"> <title/> diff --git a/chapter05/grep.xml b/chapter05/grep.xml deleted file mode 100644 index 2be213b6f..000000000 --- a/chapter05/grep.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-grep" role="wrap"> - <?dbhtml filename="grep.html"?> - - <sect1info condition="script"> - <productname>grep</productname> - <productnumber>&grep-version;</productnumber> - <address>&grep-url;</address> - </sect1info> - - <title>Grep-&grep-version;</title> - - <indexterm zone="ch-tools-grep"> - <primary sortas="a-Grep">Grep</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/grep.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&grep-ch5-sbu;</seg> - <seg>&grep-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Grep</title> - - <para>Prepare Grep for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Grep test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-grep" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/gzip.xml b/chapter05/gzip.xml deleted file mode 100644 index 44b25faf7..000000000 --- a/chapter05/gzip.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-gzip" role="wrap"> - <?dbhtml filename="gzip.html"?> - - <sect1info condition="script"> - <productname>gzip</productname> - <productnumber>&gzip-version;</productnumber> - <address>&gzip-url;</address> - </sect1info> - - <title>Gzip-&gzip-version;</title> - - <indexterm zone="ch-tools-gzip"> - <primary sortas="a-Gzip">Gzip</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/gzip.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gzip-ch5-sbu;</seg> - <seg>&gzip-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Gzip</title> - - <para>Prepare Gzip for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Gzip test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-gzip" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/introduction.xml b/chapter05/introduction.xml index 33a566877..0318acf8b 100644 --- a/chapter05/introduction.xml +++ b/chapter05/introduction.xml @@ -10,20 +10,14 @@ <title>Introduction</title> - <para>This chapter shows how to build a minimal Linux system. - This system will contain just enough tools to start constructing the final - LFS system in <xref linkend="chapter-building-system"/> and allow a working - environment with more user convenience than a minimum environment would.</para> + <para>This chapter shows how to build a cross-compiler and its associated + tools. Although here cross-compilation is faked, the principles are + the same as for a real cross-toolchain.</para> - <para>There are two steps in building this minimal system. The first step - is to build a new and host-independent toolchain (compiler, assembler, - linker, libraries, and a few useful utilities). The second step uses this - toolchain to build the other essential tools.</para> - - <para>The files compiled in this chapter will be installed under the + <para>The programs compiled in this chapter will be installed under the <filename class="directory">$LFS/tools</filename> directory to keep them - separate from the files installed in the next chapter and the host - production directories. Since the packages compiled here are temporary, - we do not want them to pollute the soon-to-be LFS system.</para> + separate from the files installed in the following chapters. The libraries, + on the other hand, are installed into their final place, since they pertain + to the system we want to build.</para> </sect1> diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml index 66128aa8a..f17f9db89 100644 --- a/chapter05/libstdc++.xml +++ b/chapter05/libstdc++.xml @@ -5,8 +5,8 @@ %general-entities; ]> -<sect1 id="ch-tools-libstdcpp" role="wrap"> - <?dbhtml filename="gcc-libstdc++.html"?> +<sect1 id="ch-tools-libstdcpp-pass1" role="wrap"> + <?dbhtml filename="gcc-libstdc++-pass1.html"?> <sect1info condition="script"> <productname>gcc-libstdc++</productname> @@ -14,11 +14,11 @@ <address>&gcc-url;</address> </sect1info> - <title>Libstdc++ from GCC-&gcc-version;</title> + <title>Libstdc++ from GCC-&gcc-version;, Pass 1</title> - <indexterm zone="ch-tools-libstdcpp"> + <indexterm zone="ch-tools-libstdcpp-pass1"> <primary sortas="a-GCC">GCC</primary> - <secondary>tools, libstdc++</secondary> + <secondary>tools, libstdc++ pass 1</secondary> </indexterm> <sect2 role="package"> @@ -28,7 +28,8 @@ to compile C++ code (part of GCC is written in C++), but we had to defer its installation when we built <xref linkend="ch-tools-gcc-pass1"/> - because it depends on glibc, which was not yet available in /tools. + because it depends on glibc, which was not yet available in the target + directory. </para> <segmentedlist> @@ -36,8 +37,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&libstdcpp-ch5-sbu;</seg> - <seg>&libstdcpp-ch5-du;</seg> + <seg>&libstdcpp-tmpp1-sbu;</seg> + <seg>&libstdcpp-tmpp1-du;</seg> </seglistitem> </segmentedlist> @@ -52,19 +53,19 @@ <filename>gcc-&gcc-version;</filename> directory.</para> </note> - <para>Create a separate build directory for Libstdc++ and enter it:</para> + <para>Create a separate build directory for libstdc++ and enter it:</para> <screen><userinput remap="pre">mkdir -v build cd build</userinput></screen> - <para>Prepare Libstdc++ for compilation:</para> + <para>Prepare libstdc++ for compilation:</para> <screen><userinput remap="configure">../libstdc++-v3/configure \ --host=$LFS_TGT \ - --prefix=/tools \ + --build=$(../config.guess) \ + --prefix=/usr \ --disable-multilib \ - --disable-nls \<!-- - - -disable-libstdcxx-threads \--> + --disable-nls \ --disable-libstdcxx-pch \ --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen> @@ -74,19 +75,21 @@ cd build</userinput></screen> <varlistentry> <term><parameter>--host=...</parameter></term> <listitem> - <para>Indicates to use the cross compiler we have just built + <para>Specifies the use the cross compiler we have just built instead of the one in <filename>/usr/bin</filename>.</para> </listitem> </varlistentry> - <!-- - <varlistentry> - <term><parameter>- -disable-libstdcxx-threads</parameter></term> + + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--disable-multilib</parameter></term> <listitem> - <para>Since gcc-pass1 is built without thread support, the C++ - thread library cannot be built either.</para> + <para>Even when building the multilib version, this switch is + given. This is because the additionally built libraries are + not required in this stage and some disk space and compile + time can be saved.</para> </listitem> </varlistentry> - --> + <varlistentry> <term><parameter>--disable-libstdcxx-pch</parameter></term> <listitem> @@ -98,9 +101,9 @@ cd build</userinput></screen> <varlistentry> <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term> <listitem> - <para>This is the location where the standard include files are - searched by the C++ compiler. In a normal build, this information - is automatically passed to the Libstdc++ <command>configure</command> + <para>This is the location where the C++ compiler should search for the + standard include files. In a normal build, this information + is automatically passed to the libstdc++ <command>configure</command> options from the top level directory. In our case, this information must be explicitly given.</para> </listitem> @@ -114,7 +117,7 @@ cd build</userinput></screen> <para>Install the library:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> diff --git a/chapter05/linux-headers.xml b/chapter05/linux-headers.xml index 7a92b466f..213fe7dc3 100644 --- a/chapter05/linux-headers.xml +++ b/chapter05/linux-headers.xml @@ -24,17 +24,16 @@ <sect2 role="package"> <title/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/linux-headers.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the + kernel's API for use by Glibc.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&linux-headers-ch5-sbu;</seg> - <seg>&linux-headers-ch5-du;</seg> + <seg>&linux-headers-tmp-sbu;</seg> + <seg>&linux-headers-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -60,15 +59,148 @@ location.</para> <screen><userinput remap="make">make headers -</userinput><userinput remap="install">cp -rv usr/include/* /tools/include</userinput></screen> +find usr/include -name '.*' -delete +rm usr/include/Makefile +</userinput><userinput remap="install">cp -rv usr/include $LFS/usr</userinput></screen> </sect2> - <sect2 role="content"> - <title/> + <sect2 id="contents-linux-headers" role="content"> + <title>Contents of Linux API Headers</title> + + <segmentedlist> + <segtitle>Installed headers</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h, + /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h, + /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h, + /usr/include/sound/*.h, /usr/include/video/*.h, + and /usr/include/xen/*.h</seg> + <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm, + /usr/include/linux, /usr/include/misc, /usr/include/mtd, + /usr/include/rdma, /usr/include/scsi, /usr/include/sound, + /usr/include/video, and /usr/include/xen</seg> + </seglistitem> + </segmentedlist> - <para>Details on this package are located in - <xref linkend="contents-linux-headers" role="."/></para> + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="asm"> + <term><filename class="headerfile">/usr/include/asm/*.h</filename></term> + <listitem> + <para>The Linux API ASM Headers</para> + <indexterm zone="ch-tools-linux-headers asm"> + <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="asm-generic"> + <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term> + <listitem> + <para>The Linux API ASM Generic Headers</para> + <indexterm zone="ch-tools-linux-headers asm-generic"> + <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="drm"> + <term><filename class="headerfile">/usr/include/drm/*.h</filename></term> + <listitem> + <para>The Linux API DRM Headers</para> + <indexterm zone="ch-tools-linux-headers drm"> + <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="linux"> + <term><filename class="headerfile">/usr/include/linux/*.h</filename></term> + <listitem> + <para>The Linux API Linux Headers</para> + <indexterm zone="ch-tools-linux-headers linux"> + <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="misc"> + <term><filename class="headerfile">/usr/include/misc/*.h</filename></term> + <listitem> + <para>The Linux API Miscellaneous Headers</para> + <indexterm zone="ch-tools-linux-headers misc"> + <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mtd"> + <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term> + <listitem> + <para>The Linux API MTD Headers</para> + <indexterm zone="ch-tools-linux-headers mtd"> + <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="rdma"> + <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term> + <listitem> + <para>The Linux API RDMA Headers</para> + <indexterm zone="ch-tools-linux-headers rdma"> + <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="scsi"> + <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term> + <listitem> + <para>The Linux API SCSI Headers</para> + <indexterm zone="ch-tools-linux-headers scsi"> + <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sound"> + <term><filename class="headerfile">/usr/include/sound/*.h</filename></term> + <listitem> + <para>The Linux API Sound Headers</para> + <indexterm zone="ch-tools-linux-headers sound"> + <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="video"> + <term><filename class="headerfile">/usr/include/video/*.h</filename></term> + <listitem> + <para>The Linux API Video Headers</para> + <indexterm zone="ch-tools-linux-headers video"> + <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xen"> + <term><filename class="headerfile">/usr/include/xen/*.h</filename></term> + <listitem> + <para>The Linux API Xen Headers</para> + <indexterm zone="ch-tools-linux-headers xen"> + <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> </sect2> diff --git a/chapter05/m4.xml b/chapter05/m4.xml deleted file mode 100644 index 0dcc6b774..000000000 --- a/chapter05/m4.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-m4" role="wrap"> - <?dbhtml filename="m4.html"?> - - <sect1info condition="script"> - <productname>m4</productname> - <productnumber>&m4-version;</productnumber> - <address>&m4-url;</address> - </sect1info> - - <title>M4-&m4-version;</title> - - <indexterm zone="ch-tools-m4"> - <primary sortas="a-M4">M4</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/m4.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&m4-ch5-sbu;</seg> - <seg>&m4-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of M4</title> - - <para>First, make some fixes introduced by glibc-2.28:</para> - -<screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c -echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen> - - <para>Prepare M4 for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the M4 test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-m4" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/ncurses.xml b/chapter05/ncurses.xml deleted file mode 100644 index 9aead2c56..000000000 --- a/chapter05/ncurses.xml +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-ncurses" role="wrap"> - <?dbhtml filename="ncurses.html"?> - - <sect1info condition="script"> - <productname>ncurses</productname> - <productnumber>&ncurses-version;</productnumber> - <address>&ncurses-url;</address> - </sect1info> - - <title>Ncurses-&ncurses-version;</title> - - <indexterm zone="ch-tools-ncurses"> - <primary sortas="a-Ncurses">Ncurses</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/ncurses.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&ncurses-ch5-sbu;</seg> - <seg>&ncurses-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Ncurses</title> - - <para>First, ensure that <command>gawk</command> is found first during configuration:</para> - -<screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen> - - <para>Prepare Ncurses for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools \ - --with-shared \ - --without-debug \ - --without-ada \ - --enable-widec \ - --enable-overwrite</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--without-ada</parameter></term> - <listitem> - <para>This ensures that Ncurses does not build support for the Ada - compiler which may be present on the host but will not be available - once we enter the <command>chroot</command> environment.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-overwrite</parameter></term> - <listitem> - <para>This tells Ncurses to install its header files into - <filename class="directory">/tools/include</filename>, instead of - <filename class="directory">/tools/include/ncurses</filename>, to - ensure that other packages can find the Ncurses headers - successfully.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-widec</parameter></term> - <listitem> - <para>This switch causes wide-character libraries (e.g., <filename - class="libraryfile">libncursesw.so.&ncurses-version;</filename>) - to be built instead of normal ones (e.g., <filename - class="libraryfile">libncurses.so.&ncurses-version;</filename>). - These wide-character libraries are usable in both multibyte and - traditional 8-bit locales, while normal libraries work properly - only in 8-bit locales. Wide-character and normal libraries are - source-compatible, but not binary-compatible.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package has a test suite, but it can only be run after the - package has been installed. The tests reside in the - <filename class="directory">test/</filename> directory. See the - <filename>README</filename> file in that directory for further details. - </para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install -ln -s libncursesw.so /tools/lib/libncurses.so</userinput></screen> - - </sect2> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Ncurses - 32 bit</title> - - <para>Prepare Ncurses for compilation:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -m32" \ -./configure --prefix=/tools \ - --libdir=/tools/lib32 \ - --with-shared \ - --without-debug \ - --without-ada \ - --enable-widec \ - --enable-overwrite \ - --host="${LFS_TGT32}"</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && -cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> - - </sect2> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Ncurses - x32 bit</title> - - <para>Repeat for the x32-ABI:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -mx32" \ -./configure --prefix=/tools \ - --libdir=/tools/libx32 \ - --with-shared \ - --without-debug \ - --without-ada \ - --enable-widec \ - --enable-overwrite \ - --host="${LFS_TGTX32}"</userinput></screen> - -<screen><userinput remap="make">make</userinput></screen> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && -cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-ncurses" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/patch.xml b/chapter05/patch.xml deleted file mode 100644 index 15049bbe5..000000000 --- a/chapter05/patch.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-patch" role="wrap"> - <?dbhtml filename="patch.html"?> - - <sect1info condition="script"> - <productname>patch</productname> - <productnumber>&patch-version;</productnumber> - <address>&patch-url;</address> - </sect1info> - - <title>Patch-&patch-version;</title> - - <indexterm zone="ch-tools-patch"> - <primary sortas="a-Patch">Patch</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/patch.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&patch-ch5-sbu;</seg> - <seg>&patch-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Patch</title> - - <para>Prepare Patch for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Patch test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-patch" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/sed.xml b/chapter05/sed.xml deleted file mode 100644 index 9a945e772..000000000 --- a/chapter05/sed.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-sed" role="wrap"> - <?dbhtml filename="sed.html"?> - - <sect1info condition="script"> - <productname>sed</productname> - <productnumber>&sed-version;</productnumber> - <address>&sed-url;</address> - </sect1info> - - <title>Sed-&sed-version;</title> - - <indexterm zone="ch-tools-sed"> - <primary sortas="a-Sed">Sed</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/sed.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&sed-ch5-sbu;</seg> - <seg>&sed-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Sed</title> - - <para>Prepare Sed for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Sed test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-sed" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/stripping.xml b/chapter05/stripping.xml deleted file mode 100644 index 354426161..000000000 --- a/chapter05/stripping.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-stripping"> - <?dbhtml filename="stripping.html"?> - - <title>Stripping</title> - - <para>The steps in this section are optional, but if the LFS partition is - rather small, it is beneficial to learn that unnecessary items can be removed. - The executables and libraries built so far contain about 70 MB of unneeded - debugging symbols. Remove those symbols with:</para> - -<screen arch="default"><userinput>strip --strip-debug /tools/lib/* -/usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> - -<screen arch="ml_32"><userinput>strip --strip-debug /tools/lib{,32}/* -/usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> -<screen arch="ml_x32"><userinput>strip --strip-debug /tools/lib{,x32}/* -/usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> -<screen arch="ml_all"><userinput>strip --strip-debug /tools/lib{,{,x}32}/* -/usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> - - <para>These commands will skip a number of files, reporting that it does not - recognize their file format. Most of these are scripts instead of binaries. - Also use the system strip command to include the strip binary in /tools.</para> - - <para>Take care <emphasis>not</emphasis> to use - <parameter>--strip-unneeded</parameter> on the libraries. The static - ones would be destroyed and the toolchain packages would need to be - built all over again.</para> - - <para>To save more, remove the documentation:</para> - -<screen><userinput>rm -rf /tools/{,share}/{info,man,doc}</userinput></screen> - - <para>The libtool .la files are only useful when linking with static - libraries. They are unneeded, and potentially harmful, when using dynamic - shared libraries, specially when using also non-autotools build systems. - Remove those files now:</para> - -<screen arch="default"><userinput>find /tools/{lib,libexec} -name \*.la -delete</userinput></screen> - -<screen arch="ml_32"><userinput>find /tools/{lib{,32},libexec} -name \*.la -delete</userinput></screen> -<screen arch="ml_x32"><userinput>find /tools/{lib{,x32},libexec} -name \*.la -delete</userinput></screen> -<screen arch="ml_all"><userinput>find /tools/{lib{,{,x}32},libexec} -name \*.la -delete</userinput></screen> - - <para>At this point, you should have at least 3 GB of free space in - <envar>$LFS</envar> that can be used to build and install Glibc and Gcc in - the next phase. If you can build and install Glibc, you can build and install - the rest too.</para> - -</sect1> diff --git a/chapter05/tar.xml b/chapter05/tar.xml deleted file mode 100644 index 002dc228f..000000000 --- a/chapter05/tar.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-tar" role="wrap"> - <?dbhtml filename="tar.html"?> - - <sect1info condition="script"> - <productname>tar</productname> - <productnumber>&tar-version;</productnumber> - <address>&tar-url;</address> - </sect1info> - - <title>Tar-&tar-version;</title> - - <indexterm zone="ch-tools-tar"> - <primary sortas="a-Tar">Tar</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/tar.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&tar-ch5-sbu;</seg> - <seg>&tar-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Tar</title> - - <para>Prepare Tar for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Tar test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-tar" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/toolchaintechnotes.xml b/chapter05/toolchaintechnotes.xml deleted file mode 100644 index e0ab899eb..000000000 --- a/chapter05/toolchaintechnotes.xml +++ /dev/null @@ -1,166 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-toolchaintechnotes"> - <?dbhtml filename="toolchaintechnotes.html"?> - - <title>Toolchain Technical Notes</title> - - <para>This section explains some of the rationale and technical details - behind the overall build method. It is not essential to immediately - understand everything in this section. Most of this information will be - clearer after performing an actual build. This section can be referred - to at any time during the process.</para> - - <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to - produce a temporary area that contains a known-good set of tools that can be - isolated from the host system. By using <command>chroot</command>, the - commands in the remaining chapters will be contained within that environment, - ensuring a clean, trouble-free build of the target LFS system. The build - process has been designed to minimize the risks for new readers and to provide - the most educational value at the same time.</para> - - <note> - <para>Before continuing, be aware of the name of the working platform, - often referred to as the target triplet. A simple way to determine the - name of the target triplet is to run the <command>config.guess</command> - script that comes with the source for many packages. Unpack the Binutils - sources and run the script: <userinput>./config.guess</userinput> and note - the output. For example, for a 32-bit Intel processor the - output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit - system it will be <emphasis>x86_64-pc-linux-gnu</emphasis>.</para> - - <para>Also be aware of the name of the platform's dynamic linker, often - referred to as the dynamic loader (not to be confused with the standard - linker <command>ld</command> that is part of Binutils). The dynamic linker - provided by Glibc finds and loads the shared libraries needed by a program, - prepares the program to run, and then runs it. The name of the dynamic - linker for a 32-bit Intel machine will be <filename - class="libraryfile">ld-linux.so.2</filename> (<filename - class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems). A - sure-fire way to determine the name of the dynamic linker is to inspect a - random binary from the host system by running: <userinput>readelf -l - <name of binary> | grep interpreter</userinput> and noting the - output. The authoritative reference covering all platforms is in the - <filename>shlib-versions</filename> file in the root of the Glibc source - tree.</para> - </note> - - <para>Some key technical points of how the <xref - linkend="chapter-temporary-tools"/> build method works:</para> - - <itemizedlist> - <listitem> - <para>Slightly adjusting the name of the working platform, by changing the - "vendor" field target triplet by way of the - <envar>LFS_TGT</envar> variable, ensures that the first build of Binutils - and GCC produces a compatible cross-linker and cross-compiler. Instead of - producing binaries for another architecture, the cross-linker and - cross-compiler will produce binaries compatible with the current - hardware.</para> - </listitem> - <listitem> - <para> The temporary libraries are cross-compiled. Because a - cross-compiler by its nature cannot rely on anything from its host - system, this method removes potential contamination of the target - system by lessening the chance of headers or libraries from the host - being incorporated into the new tools. Cross-compilation also allows for - the possibility of building both 32-bit and 64-bit libraries on 64-bit - capable hardware.</para> - </listitem> - <listitem> - <para>Careful manipulation of the GCC source tells the compiler which target - dynamic linker will be used.</para> - </listitem> - </itemizedlist> - - <para>Binutils is installed first because the <command>configure</command> - runs of both GCC and Glibc perform various feature tests on the assembler - and linker to determine which software features to enable or disable. This - is more important than one might first realize. An incorrectly configured - GCC or Glibc can result in a subtly broken toolchain, where the impact of - such breakage might not show up until near the end of the build of an - entire distribution. A test suite failure will usually highlight this error - before too much additional work is performed.</para> - - <para>Binutils installs its assembler and linker in two locations, - <filename class="directory">/tools/bin</filename> and <filename - class="directory">/tools/$LFS_TGT/bin</filename>. The tools in one - location are hard linked to the other. An important facet of the linker is - its library search order. Detailed information can be obtained from - <command>ld</command> by passing it the <parameter>--verbose</parameter> - flag. For example, an <userinput>ld --verbose | grep SEARCH</userinput> - will illustrate the current search paths and their order. It shows which - files are linked by <command>ld</command> by compiling a dummy program and - passing the <parameter>--verbose</parameter> switch to the linker. For example, - <userinput>gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</userinput> - will show all the files successfully opened during the linking.</para> - - <para>The next package installed is GCC. An example of what can be - seen during its run of <command>configure</command> is:</para> - -<screen><computeroutput>checking what assembler to use... /tools/i686-lfs-linux-gnu/bin/as -checking what linker to use... /tools/i686-lfs-linux-gnu/bin/ld</computeroutput></screen> - - <para>This is important for the reasons mentioned above. It also demonstrates - that GCC's configure script does not search the PATH directories to find which - tools to use. However, during the actual operation of <command>gcc</command> - itself, the same search paths are not necessarily used. To find out which - standard linker <command>gcc</command> will use, run: - <userinput>gcc -print-prog-name=ld</userinput>.</para> - - <para>Detailed information can be obtained from <command>gcc</command> by - passing it the <parameter>-v</parameter> command line option while compiling - a dummy program. For example, <userinput>gcc -v dummy.c</userinput> will show - detailed information about the preprocessor, compilation, and assembly stages, - including <command>gcc</command>'s included search paths and their order.</para> - - <para>Next installed are sanitized Linux API headers. These allow the standard - C library (Glibc) to interface with features that the Linux kernel will - provide.</para> - - <para>The next package installed is Glibc. The most important considerations - for building Glibc are the compiler, binary tools, and kernel headers. The - compiler is generally not an issue since Glibc will always use the compiler - relating to the <parameter>--host</parameter> parameter passed to its - configure script; e.g. in our case, the compiler will be - <command>i686-lfs-linux-gnu-gcc</command>. The binary tools and kernel - headers can be a bit more complicated. Therefore, take no risks and use the - available configure switches to enforce the correct selections. After the run - of <command>configure</command>, check the contents of the - <filename>config.make</filename> file in the <filename - class="directory">glibc-build</filename> directory for all important details. - Note the use of <parameter>CC="i686-lfs-gnu-gcc"</parameter> to control which - binary tools are used and the use of the <parameter>-nostdinc</parameter> and - <parameter>-isystem</parameter> flags to control the compiler's include - search path. These items highlight an important aspect of the Glibc - package—it is very self-sufficient in terms of its build machinery and - generally does not rely on toolchain defaults.</para> - - <para>During the second pass of Binutils, we are able to utilize the - <parameter>--with-lib-path</parameter> configure switch to control - <command>ld</command>'s library search path.</para> - - <para>For the second pass of GCC, its sources also need to be modified to - tell GCC to use the new dynamic linker. Failure to do so will result in the - GCC programs themselves having the name of the dynamic linker from the host - system's <filename class="directory">/lib</filename> directory embedded into - them, which would defeat the goal of getting away from the host. From this - point onwards, the core toolchain is self-contained and self-hosted. The - remainder of the <xref linkend="chapter-temporary-tools"/> packages all build - against the new Glibc in <filename - class="directory">/tools</filename>.</para> - - <para>Upon entering the chroot environment in <xref - linkend="chapter-building-system"/>, the first major package to be - installed is Glibc, due to its self-sufficient nature mentioned above. - Once this Glibc is installed into <filename - class="directory">/usr</filename>, we will perform a quick changeover of the - toolchain defaults, and then proceed in building the rest of the target - LFS system.</para> - -</sect1> diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml deleted file mode 100644 index 3ba23638f..000000000 --- a/chapter05/util-linux.xml +++ /dev/null @@ -1,180 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-util-linux" role="wrap"> - <?dbhtml filename="util-linux.html"?> - - <sect1info condition="script"> - <productname>util-linux</productname> - <productnumber>&util-linux-version;</productnumber> - <address>&util-linux-url;</address> - </sect1info> - - <title>Util-linux-&util-linux-version;</title> - - <indexterm zone="ch-tools-util-linux"> - <primary sortas="a-Util-linux">Util-linux</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Util-linux package contains miscellaneous utility programs.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&util-linux-ch5-sbu;</seg> - <seg>&util-linux-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Util-linux</title> - - <para>Prepare Util-linux for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools \ - --without-python \ - --disable-makeinstall-chown \ - --without-systemdsystemunitdir \ - --without-ncurses \ - PKG_CONFIG=""</userinput></screen> - - <variablelist> - <title>The meaning of the configure option:</title> - - <varlistentry> - <term><parameter>--without-python</parameter></term> - <listitem> - <para>This switch disables using <application>Python</application> - if it is installed on the host system. It avoids trying to build - unneeded bindings.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-makeinstall-chown</parameter></term> - <listitem> - <para>This switch disables using the <command>chown</command> command - during installation. This is not needed when installing into the - /tools directory and avoids the necessity of installing as - root.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--without-ncurses</parameter></term> - <listitem> - <para>This switch disables using the ncurses library for - the build process. This is not needed when installing into the - /tools directory and avoids problems on some host distros.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--without-systemdsystemunitdir</parameter></term> - <listitem> - <para>On systems that use systemd, the package tries to install - a systemd specific file to a non-existent directory in /tools. - This switch disables the unnecessary action.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><envar>PKG_CONFIG=""</envar></term> - <listitem> - <para>Setting this environment variable prevents adding unneeded - features that may be available on the host. Note that the location - shown for setting this environment variable is different from other - LFS sections where variables are set preceding the command. This - location is shown to demonstrate an alternative way of setting an - environment variable when using configure.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-utillinux" role="."/></para> - - </sect2> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Util-Linux - 32 bit</title> - - <para>Prepare Util-Linux for compilation:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -m32" \ -./configure \ - --prefix=/tools \ - --libdir=/tools/lib32 \ - --without-python \ - --disable-makeinstall-chown \ - --without-systemdsystemunitdir \ - --without-ncurses \ - --host="${LFS_TGT32}" \ - PKG_CONFIG=""</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && -cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> - - </sect2> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Util-Linux - x32 bit</title> - - <para>Repeat for the x32-ABI:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -mx32" \ -./configure \ - --prefix=/tools \ - --libdir=/tools/libx32 \ - --without-python \ - --disable-makeinstall-chown \ - --without-systemdsystemunitdir \ - --without-ncurses \ - --host="${LFS_TGTX32}" \ - PKG_CONFIG=""</userinput></screen> - -<screen><userinput remap="make">make</userinput></screen> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && -cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> - - </sect2> - -</sect1> diff --git a/chapter05/xz.xml b/chapter05/xz.xml deleted file mode 100644 index 8fac7434a..000000000 --- a/chapter05/xz.xml +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-tools-xz" role="wrap"> - <?dbhtml filename="xz.html"?> - - <sect1info condition="script"> - <productname>xz</productname> - <productnumber>&xz-version;</productnumber> - <address>&xz-url;</address> - </sect1info> - - <title>Xz-&xz-version;</title> - - <indexterm zone="ch-tools-xz"> - <primary sortas="a-xz">Xz</primary> - <secondary>tools</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/xz.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&xz-ch5-sbu;</seg> - <seg>&xz-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Xz</title> - - <para>Prepare Xz for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Xz test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Xz - 32 bit</title> - - <para>Prepare Xz for compilation:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -m32" \ -./configure \ - --prefix=/tools \ - --libdir=/tools/lib32 \ - --host="${LFS_TGT32}"</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && -cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> - - </sect2> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Xz - x32 bit</title> - - <para>Repeat for the x32-ABI:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -mx32" \ -./configure \ - --prefix=/tools \ - --libdir=/tools/libx32 \ - --host="${LFS_TGTX32}"</userinput></screen> - -<screen><userinput remap="make">make</userinput></screen> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && -cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> - - </sect2> - - <sect2 role="content"> - <title/> - - <para>Details on this package are located in - <xref linkend="contents-xz" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/zlib.xml b/chapter05/zlib.xml deleted file mode 100644 index 01a6da5d1..000000000 --- a/chapter05/zlib.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 arch="ml_32,ml_x32,ml_all" id="ch-tools-zlib" role="wrap"> - <?dbhtml filename="zlib.html"?> - - <sect1info condition="script"> - <productname>zlib</productname> - <productnumber>&zlib-version;</productnumber> - <address>&zlib-url;</address> - </sect1info> - - <title>Zlib-&zlib-version;</title> - - <indexterm zone="ch-tools-zlib"> - <primary sortas="a-Zlib">Zlib</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Zlib package contains compression and decompression routines used by - some programs.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&zlib-ch6-sbu;</seg> - <seg>&zlib-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Zlib</title> - - <para>Prepare Zlib for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Zlib - 32 bit</title> - - <para>Prepare Zlib for compilation:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -m32" ./configure --prefix=/tools --libdir=/tools/lib32</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && -cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> - - </sect2> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Zlib - x32 bit</title> - - <para>Repeat for the x32-ABI:</para> - -<screen><userinput remap="configure">make distclean && -CC="${LFS_TGT}-gcc -mx32" ./configure --prefix=/tools --libdir=/tools/libx32</userinput></screen> - -<screen><userinput remap="make">make</userinput></screen> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && -cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> - - </sect2> - -</sect1> - diff --git a/chapter06/bash.xml b/chapter06/bash.xml index 4d06fc2a3..6cb1dc728 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-bash" role="wrap"> +<sect1 id="ch-tools-bash" role="wrap"> <?dbhtml filename="bash.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Bash-&bash-version;</title> - <indexterm zone="ch-system-bash"> + <indexterm zone="ch-tools-bash"> <primary sortas="a-Bash">Bash</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Bash package contains the Bourne-Again SHell.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/bash.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bash-ch6-sbu;</seg> - <seg>&bash-ch6-du;</seg> + <seg>&bash-tmp-sbu;</seg> + <seg>&bash-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -40,27 +43,24 @@ <sect2 role="installation"> <title>Installation of Bash</title> - <para>Incorporate some upstream fixes:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen> - <para>Prepare Bash for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr \ - --docdir=/usr/share/doc/bash-&bash-version; \ - --without-bash-malloc \ - --with-installed-readline</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --build=$(support/config.guess) \ + --host=$LFS_TGT \ + --without-bash-malloc</userinput></screen> <variablelist> - <title>The meaning of the new configure option:</title> + <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>--with-installed-readline</parameter></term> + <term><parameter>--without-bash-malloc</parameter></term> <listitem> - <para>This option tells Bash to use the <filename - class="libraryfile">readline</filename> library that is already - installed on the system rather than using its own readline - version.</para> + <para>This option turns off the use of Bash's memory allocation + (<function>malloc</function>) function which is known to cause + segmentation faults. By turning this option off, Bash will use + the <function>malloc</function> functions from Glibc which are + more stable.</para> </listitem> </varlistentry> @@ -70,103 +70,26 @@ <screen><userinput remap="make">make</userinput></screen> - <para>Skip down to <quote>Install the - package</quote> if not running the test suite.</para> - - <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para> - -<screen><userinput remap="test">chown -Rv tester .</userinput></screen> + <para>Install the package:</para> - <para>Now, run the tests as the <systemitem - class="username">tester</systemitem> user:</para> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> -<screen><userinput remap="test">su tester << EOF -PATH=$PATH make tests < $(tty) -EOF</userinput></screen> + <para>Move the excutable to where it is expected:</para> - <para>The <systemitem class="username">tester</systemitem> - user does not have enough permissions for all the tests to pass. This shows - up in some <quote>diff</quote> output in four test results. Portions of the - run-execscript, run-lastpipe, run-read, and run-test programs - are known to fail in the LFS chroot environment, but pass if the tests - are run in a full system.</para> +<screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen> - <para>Install the package and move the main executable to - <filename class='directory'>/bin</filename>:</para> + <para>Make a link for the programs that use <command>sh</command> for + a shell:</para> -<screen><userinput remap="install">make install -mv -vf /usr/bin/bash /bin</userinput></screen> - - <para>Run the newly compiled <command>bash</command> program (replacing the one that is - currently being executed):</para> - -<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> - - <note> - <para>The parameters used make the <command>bash</command> - process an interactive login shell and continue to disable hashing so - that new programs are found as they become available.</para> - </note> +<screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen> </sect2> - <sect2 id="contents-bash" role="content"> - <title>Contents of Bash</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>bash, bashbug, and sh (link to bash)</seg> - <seg>/usr/include/bash, /usr/lib/bash, and - /usr/share/doc/bash-&bash-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bash"> - <term><command>bash</command></term> - <listitem> - <para>A widely-used command interpreter; it performs many types of - expansions and substitutions on a given command line before executing - it, thus making this interpreter a powerful tool</para> - <indexterm zone="ch-system-bash bash"> - <primary sortas="b-bash">bash</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bashbug"> - <term><command>bashbug</command></term> - <listitem> - <para>A shell script to help the user compose and mail standard - formatted bug reports concerning <command>bash</command></para> - <indexterm zone="ch-system-bash bashbug"> - <primary sortas="b-bashbug">bashbug</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sh"> - <term><command>sh</command></term> - <listitem> - <para>A symlink to the <command>bash</command> program; when invoked - as <command>sh</command>, <command>bash</command> tries to mimic the - startup behavior of historical versions of <command>sh</command> as - closely as possible, while conforming to the POSIX standard as - well</para> - <indexterm zone="ch-system-bash sh"> - <primary sortas="b-sh">sh</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-bash" role="."/></para> </sect2> diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml new file mode 100644 index 000000000..671931c38 --- /dev/null +++ b/chapter06/binutils-pass2.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-binutils-pass2" role="wrap"> + <?dbhtml filename="binutils-pass2.html"?> + + <sect1info condition="script"> + <productname>binutils-pass2</productname> + <productnumber>&binutils-version;</productnumber> + <address>&binutils-url;</address> + </sect1info> + + <title>Binutils-&binutils-version; - Pass 2</title> + + <indexterm zone="ch-tools-binutils-pass2"> + <primary sortas="a-Binutils">Binutils</primary> + <secondary>tools, pass 2</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/binutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&binutils-tmpp2-sbu;</seg> + <seg>&binutils-tmpp2-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Binutils</title> + + <para>Create a separate build directory again:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Prepare Binutils for compilation:</para> + +<screen arch="default"><userinput remap="configure">../configure \ + --prefix=/usr \ + --build=$(../config.guess) \ + --host=$LFS_TGT \ + --disable-nls \ + --enable-shared \ + --disable-werror \ + --enable-64-bit-bfd</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure \ + --prefix=/usr \ + --build=$(../config.guess) \ + --host=$LFS_TGT \ + --disable-nls \ + --enable-shared \ + --disable-werror \ + --enable-64-bit-bfd \ + --enable-multilib</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title> + + <varlistentry> + <term><parameter>--enable-shared</parameter></term> + <listitem> + <para>Builds <filename + class="libraryfile">libbfd</filename> as a shared library.</para> + </listitem> + </varlistentry> + + + <varlistentry> + <term><parameter>--enable-64-bit-bfd</parameter></term> + <listitem> + <para>Enables 64-bit support (on hosts with narrower word sizes). + May not be needed on 64-bit systems, but does no harm.</para> + </listitem> + </varlistentry> + + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--enable-multilib</parameter></term> + <listitem> + <para>Enables multilib support in bintutils.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-binutils" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 388e94ac2..11bc5d499 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -5,111 +5,30 @@ %general-entities; ]> -<chapter id="chapter-building-system" xreflabel="Chapter 6"> +<chapter id="chapter-temporary-tools" xreflabel="Chapter 6"> <?dbhtml dir="chapter06"?> <?dbhtml filename="chapter06.html"?> - <title>Installing Basic System Software</title> + <title>Cross Compiling Temporary Tools</title> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/> - - <!-- arch="ml_32,ml_x32,ml_all" only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc-32.xml"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> - - <!-- systemd only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> - - <!-- sysv only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> - - <!-- Both sysv on systemd builds --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> - - <!-- Both sysv and systemd builds --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/> - - <!-- sysv only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-firmware.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> </chapter> diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index ffef82f84..fe036755e 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-coreutils" role="wrap"> +<sect1 id="ch-tools-coreutils" role="wrap"> <?dbhtml filename="coreutils.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Coreutils-&coreutils-version;</title> - <indexterm zone="ch-system-coreutils"> + <indexterm zone="ch-tools-coreutils"> <primary sortas="a-Coreutils">Coreutils</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Coreutils package contains utilities for showing and setting the - basic system characteristics.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/coreutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&coreutils-ch6-sbu;</seg> - <seg>&coreutils-ch6-du;</seg> + <seg>&coreutils-tmp-sbu;</seg> + <seg>&coreutils-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -41,59 +43,23 @@ <sect2 role="installation"> <title>Installation of Coreutils</title> - <para>POSIX requires that programs from Coreutils recognize character - boundaries correctly even in multibyte locales. The following patch fixes - this non-compliance and other internationalization-related bugs.</para> + <para>Prepare Coreutils for compilation:</para> -<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen> - - <note> - <para>In the past, many bugs were found in this patch. When reporting new - bugs to Coreutils maintainers, please check first if they are reproducible - without this patch.</para> - </note> - - <!-- this has been fixed in upstream gnulib, when a new version of - coreutils is released, please check #4055 to see if the change has been - picked up in this package --> - <para>Suppress a test which on some machines can loop forever:</para> - -<screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen> - - <para>Now prepare Coreutils for compilation:</para> - -<screen><userinput remap="configure">autoreconf -fiv -FORCE_UNSAFE_CONFIGURE=1 ./configure \ - --prefix=/usr \ +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ + --enable-install-program=hostname \ --enable-no-install-program=kill,uptime</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> <varlistentry> - <term><command>autoreconf</command></term> - <listitem> - <para>This command updates generated configuration files - consistent with the latest version of automake. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> - <listitem> - <para>This environment variable allows the package to be - built as the root user. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-no-install-program=kill,uptime</parameter></term> + <term><envar>--enable-install-program=hostname</envar></term> <listitem> - <para>The purpose of this switch is to prevent Coreutils from - installing binaries that will be installed by other packages later. - </para> + <para>This enables the <command>hostname</command> binary to be built + and installed – it is disabled by default but is required by the + Perl test suite.</para> </listitem> </varlistentry> </variablelist> @@ -102,1186 +68,37 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ <screen><userinput remap="make">make</userinput></screen> - <para>Skip down to <quote>Install the - package</quote> if not running the test suite.</para> - - <para>Now the test suite is ready to be run. First, run the tests that are - meant to be run as user <systemitem class="username">root</systemitem>:</para> - -<screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen> - - <para>We're going to run the remainder of the tests as the - <systemitem class="username">tester</systemitem> user. Certain tests, - however, require that the user be a member of more than one group. So that - these tests are not skipped we'll add a temporary group and make the - user <systemitem class="username">tester</systemitem> a part of it:</para> - -<screen><userinput remap="test">echo "dummy:x:102:tester" >> /etc/group</userinput></screen> - - <para>Fix some of the permissions so that the non-root user can compile and - run the tests:</para> - -<screen><userinput remap="test">chown -Rv tester . </userinput></screen> - - <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput> - environment includes /tools/bin.</para> - -<screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> -<!-- - <para>The test program test-getlogin is known to fail in a - partially built system environment like the chroot environment here, but - passes if run at the end of this chapter. The test program tty.sh is - also known to fail.</para> ---> - - <para>Remove the temporary group:</para> - -<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> - - <para>Move programs to the locations specified by the FHS:</para> - -<screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin -mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin -mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin -mv -v /usr/bin/chroot /usr/sbin -mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 -sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen> - - <para revision="sysv">Some of the scripts in the LFS-Bootscripts package - depend on <command>head</command>, <command>nice</command>, - <command>sleep</command>, and <command>touch</command>. As <filename - class="directory">/usr</filename> may not be available during the early and - late stages of booting, those binaries need to be on the root partition to - maintain FHS compliance:</para> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> +<!-- + <para>The above command refuses to install <filename>su</filename> + because the program cannot be installed setuid root as a non-privileged + user. By manually installing it, we can use it for running tests in the + final system as a non-privileged user. Install it with:</para> -<screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen> +<screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen> +--> + <para>Move programs to their final expected locations. Although this is + not necessary in this temporary environment, we must do so because some + programs harcode executable locations:</para> + +<screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin +mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin +mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin +mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin +mv -v $LFS/usr/bin/chroot $LFS/usr/sbin +mkdir -pv $LFS/usr/share/man/man8 +mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8 +sed -i 's/"1"/"8"/' $LFS/usr/share/man/man8/chroot.8</userinput></screen> </sect2> - <sect2 id="contents-coreutils" role="content"> - <title>Contents of Coreutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>[, b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown, - chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, - dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, - head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir, - mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, - pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, - rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, - sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, - sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, - tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and - yes</seg> - <seg>libstdbuf.so (in /usr/libexec/coreutils)</seg> - <seg>/usr/libexec/coreutils</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="base32"> - <term><command>base32</command></term> - <listitem> - <para>Encodes and decodes data according to the base32 specification - (RFC 4648)</para> - <indexterm zone="ch-system-coreutils base64"> - <primary sortas="b-base64">base64</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="base64"> - <term><command>base64</command></term> - <listitem> - <para>Encodes and decodes data according to the base64 specification - (RFC 4648)</para> - <indexterm zone="ch-system-coreutils base64"> - <primary sortas="b-base64">base64</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="b2sum"> - <term><command>b2sum</command></term> - <listitem> - <para>Prints or checks BLAKE2 (512-bit) checksums</para> - <indexterm zone="ch-system-coreutils b2sum"> - <primary sortas="b-b2sum">b2sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="basename"> - <term><command>basename</command></term> - <listitem> - <para>Strips any path and a given suffix from a file name</para> - <indexterm zone="ch-system-coreutils basename"> - <primary sortas="b-basename">basename</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="basenc"> - <term><command>basenc</command></term> - <listitem> - <para>Encodes or decodes data using various algorithms</para> - <indexterm zone="ch-system-coreutils basenc"> - <primary sortas="b-basenc">basenc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cat"> - <term><command>cat</command></term> - <listitem> - <para>Concatenates files to standard output</para> - <indexterm zone="ch-system-coreutils cat"> - <primary sortas="b-cat">cat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chcon"> - <term><command>chcon</command></term> - <listitem> - <para>Changes security context for files and directories</para> - <indexterm zone="ch-system-coreutils chcon"> - <primary sortas="b-chcon">chcon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chgrp"> - <term><command>chgrp</command></term> - <listitem> - <para>Changes the group ownership of files and directories</para> - <indexterm zone="ch-system-coreutils chgrp"> - <primary sortas="b-chgrp">chgrp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chmod"> - <term><command>chmod</command></term> - <listitem> - <para>Changes the permissions of each file to the given mode; the mode - can be either a symbolic representation of the changes to make or an - octal number representing the new permissions</para> - <indexterm zone="ch-system-coreutils chmod"> - <primary sortas="b-chmod">chmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chown"> - <term><command>chown</command></term> - <listitem> - <para>Changes the user and/or group ownership of files and - directories</para> - <indexterm zone="ch-system-coreutils chown"> - <primary sortas="b-chown">chown</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chroot"> - <term><command>chroot</command></term> - <listitem> - <para>Runs a command with the specified directory as the - <filename class="directory">/</filename> directory</para> - <indexterm zone="ch-system-coreutils chroot"> - <primary sortas="b-chroot">chroot</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cksum"> - <term><command>cksum</command></term> - <listitem> - <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte - counts of each specified file</para> - <indexterm zone="ch-system-coreutils cksum"> - <primary sortas="b-cksum">cksum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="comm"> - <term><command>comm</command></term> - <listitem> - <para>Compares two sorted files, outputting in three columns the lines - that are unique and the lines that are common</para> - <indexterm zone="ch-system-coreutils comm"> - <primary sortas="b-comm">comm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cp"> - <term><command>cp</command></term> - <listitem> - <para>Copies files</para> - <indexterm zone="ch-system-coreutils cp"> - <primary sortas="b-cp">cp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="csplit"> - <term><command>csplit</command></term> - <listitem> - <para>Splits a given file into several new files, separating them - according to given patterns or line numbers and outputting the byte - count of each new file</para> - <indexterm zone="ch-system-coreutils csplit"> - <primary sortas="b-csplit">csplit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cut"> - <term><command>cut</command></term> - <listitem> - <para>Prints sections of lines, selecting the parts according to given - fields or positions</para> - <indexterm zone="ch-system-coreutils cut"> - <primary sortas="b-cut">cut</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="date"> - <term><command>date</command></term> - <listitem> - <para>Displays the current time in the given format, or sets the - system date</para> - <indexterm zone="ch-system-coreutils date"> - <primary sortas="b-date">date</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dd"> - <term><command>dd</command> </term> - <listitem> - <para>Copies a file using the given block size and count, while - optionally performing conversions on it</para> - <indexterm zone="ch-system-coreutils dd"> - <primary sortas="b-dd">dd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="df"> - <term><command>df</command></term> - <listitem> - <para>Reports the amount of disk space available (and used) on all - mounted file systems, or only on the file systems holding the selected - files</para> - <indexterm zone="ch-system-coreutils df"> - <primary sortas="b-df">df</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dir"> - <term><command>dir</command></term> - <listitem> - <para>Lists the contents of each given directory (the same as - the <command>ls</command> command)</para> - <indexterm zone="ch-system-coreutils dir"> - <primary sortas="b-dir">dir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dircolors"> - <term><command>dircolors</command></term> - <listitem> - <para>Outputs commands to set the <envar>LS_COLOR</envar> - environment variable to change the color scheme used by - <command>ls</command></para> - <indexterm zone="ch-system-coreutils dircolors"> - <primary sortas="b-dircolors">dircolors</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dirname"> - <term><command>dirname</command></term> - <listitem> - <para>Strips the non-directory suffix from a file name</para> - <indexterm zone="ch-system-coreutils dirname"> - <primary sortas="b-dirname">dirname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="du"> - <term><command>du</command></term> - <listitem> - <para>Reports the amount of disk space used by the current directory, - by each of the given directories (including all subdirectories) or by - each of the given files</para> - <indexterm zone="ch-system-coreutils du"> - <primary sortas="b-du">du</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="echo"> - <term><command>echo</command></term> - <listitem> - <para>Displays the given strings</para> - <indexterm zone="ch-system-coreutils echo"> - <primary sortas="b-echo">echo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="env"> - <term><command>env</command></term> - <listitem> - <para>Runs a command in a modified environment</para> - <indexterm zone="ch-system-coreutils env"> - <primary sortas="b-env">env</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="expand"> - <term><command>expand</command></term> - <listitem> - <para>Converts tabs to spaces</para> - <indexterm zone="ch-system-coreutils expand"> - <primary sortas="b-expand">expand</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="expr"> - <term><command>expr</command></term> - <listitem> - <para>Evaluates expressions</para> - <indexterm zone="ch-system-coreutils expr"> - <primary sortas="b-expr">expr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="factor"> - <term><command>factor</command></term> - <listitem> - <para>Prints the prime factors of all specified integer numbers</para> - <indexterm zone="ch-system-coreutils factor"> - <primary sortas="b-factor">factor</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="false"> - <term><command>false</command></term> - <listitem> - <para>Does nothing, unsuccessfully; it always exits with a status code - indicating failure</para> - <indexterm zone="ch-system-coreutils false"> - <primary sortas="b-false">false</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fmt"> - <term><command>fmt</command></term> - <listitem> - <para>Reformats the paragraphs in the given files</para> - <indexterm zone="ch-system-coreutils fmt"> - <primary sortas="b-fmt">fmt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fold"> - <term><command>fold</command></term> - <listitem> - <para>Wraps the lines in the given files</para> - <indexterm zone="ch-system-coreutils fold"> - <primary sortas="b-fold">fold</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groups"> - <term><command>groups</command></term> - <listitem> - <para>Reports a user's group memberships</para> - <indexterm zone="ch-system-coreutils groups"> - <primary sortas="b-groups">groups</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="head"> - <term><command>head</command></term> - <listitem> - <para>Prints the first ten lines (or the given number of lines) - of each given file</para> - <indexterm zone="ch-system-coreutils head"> - <primary sortas="b-head">head</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hostid"> - <term><command>hostid</command></term> - <listitem> - <para>Reports the numeric identifier (in hexadecimal) of the host</para> - <indexterm zone="ch-system-coreutils hostid"> - <primary sortas="b-hostid">hostid</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="id"> - <term><command>id</command></term> - <listitem> - <para>Reports the effective user ID, group ID, and group memberships - of the current user or specified user</para> - <indexterm zone="ch-system-coreutils id"> - <primary sortas="b-id">id</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="install"> - <term><command>install</command> </term> - <listitem> - <para>Copies files while setting their permission modes and, if - possible, their owner and group</para> - <indexterm zone="ch-system-coreutils install"> - <primary sortas="b-install">install</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="join"> - <term><command>join</command></term> - <listitem> - <para>Joins the lines that have identical join fields from two - separate files</para> - <indexterm zone="ch-system-coreutils join"> - <primary sortas="b-join">join</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="link"> - <term><command>link</command></term> - <listitem> - <para>Creates a hard link with the given name to a file</para> - <indexterm zone="ch-system-coreutils link"> - <primary sortas="b-link">link</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ln"> - <term><command>ln</command></term> - <listitem> - <para>Makes hard links or soft (symbolic) links between files</para> - <indexterm zone="ch-system-coreutils ln"> - <primary sortas="b-ln">ln</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="logname"> - <term><command>logname</command></term> - <listitem> - <para>Reports the current user's login name</para> - <indexterm zone="ch-system-coreutils logname"> - <primary sortas="b-logname">logname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ls"> - <term><command>ls</command></term> - <listitem> - <para>Lists the contents of each given directory</para> - <indexterm zone="ch-system-coreutils ls"> - <primary sortas="b-ls">ls</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="md5sum"> - <term><command>md5sum</command></term> - <listitem> - <para>Reports or checks Message Digest 5 (MD5) checksums</para> - <indexterm zone="ch-system-coreutils md5sum"> - <primary sortas="b-md5sum">md5sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkdir"> - <term><command>mkdir</command></term> - <listitem> - <para>Creates directories with the given names</para> - <indexterm zone="ch-system-coreutils mkdir"> - <primary sortas="b-mkdir">mkdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfifo"> - <term><command>mkfifo</command></term> - <listitem> - <para>Creates First-In, First-Outs (FIFOs), a "named - pipe" in UNIX parlance, with the given names</para> - <indexterm zone="ch-system-coreutils mkfifo"> - <primary sortas="b-mkfifo">mkfifo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mknod"> - <term><command>mknod</command></term> - <listitem> - <para>Creates device nodes with the given names; a device node is a - character special file, a block special file, or a FIFO</para> - <indexterm zone="ch-system-coreutils mknod"> - <primary sortas="b-mknod">mknod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mktemp"> - <term><command>mktemp</command></term> - <listitem> - <para>Creates temporary files in a secure manner; it is used in scripts</para> - <indexterm zone="ch-system-coreutils mktemp"> - <primary sortas="b-mktemp">mktemp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mv"> - <term><command>mv</command></term> - <listitem> - <para>Moves or renames files or directories</para> - <indexterm zone="ch-system-coreutils mv"> - <primary sortas="b-mv">mv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nice"> - <term><command>nice</command></term> - <listitem> - <para>Runs a program with modified scheduling priority</para> - <indexterm zone="ch-system-coreutils nice"> - <primary sortas="b-nice">nice</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nl"> - <term><command>nl</command></term> - <listitem> - <para>Numbers the lines from the given files</para> - <indexterm zone="ch-system-coreutils nl"> - <primary sortas="b-nl">nl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nohup"> - <term><command>nohup</command></term> - <listitem> - <para>Runs a command immune to hangups, with its output redirected to - a log file</para> - <indexterm zone="ch-system-coreutils nohup"> - <primary sortas="b-nohup">nohup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nproc"> - <term><command>nproc</command></term> - <listitem> - <para>Prints the number of processing units available to a - process</para> - <indexterm zone="ch-system-coreutils nproc"> - <primary sortas="b-nproc">nproc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="numfmt"> - <term><command>numfmt</command></term> - <listitem> - <para>Converts numbers to or from human-readable strings</para> - <indexterm zone="ch-system-coreutils numfmt"> - <primary sortas="b-numfmt">numfmt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="od"> - <term><command>od</command></term> - <listitem> - <para>Dumps files in octal and other formats</para> - <indexterm zone="ch-system-coreutils od"> - <primary sortas="b-od">od</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="paste"> - <term><command>paste</command></term> - <listitem> - <para>Merges the given files, joining sequentially corresponding lines - side by side, separated by tab characters</para> - <indexterm zone="ch-system-coreutils paste"> - <primary sortas="b-paste">paste</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pathchk"> - <term><command>pathchk</command></term> - <listitem> - <para>Checks if file names are valid or portable</para> - <indexterm zone="ch-system-coreutils pathchk"> - <primary sortas="b-pathchk">pathchk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pinky"> - <term><command>pinky</command></term> - <listitem> - <para>Is a lightweight finger client; it reports some information - about the given users</para> - <indexterm zone="ch-system-coreutils pinky"> - <primary sortas="b-pinky">pinky</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pr"> - <term><command>pr</command></term> - <listitem> - <para>Paginates and columnates files for printing</para> - <indexterm zone="ch-system-coreutils pr"> - <primary sortas="b-pr">pr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="printenv"> - <term><command>printenv</command></term> - <listitem> - <para>Prints the environment</para> - <indexterm zone="ch-system-coreutils printenv"> - <primary sortas="b-printenv">printenv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="printf"> - <term><command>printf</command></term> - <listitem> - <para>Prints the given arguments according to the given format, much - like the C printf function</para> - <indexterm zone="ch-system-coreutils printf"> - <primary sortas="b-printf">printf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ptx"> - <term><command>ptx</command></term> - <listitem> - <para>Produces a permuted index from the contents of the given files, - with each keyword in its context</para> - <indexterm zone="ch-system-coreutils ptx"> - <primary sortas="b-ptx">ptx</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pwd"> - <term><command>pwd</command></term> - <listitem> - <para>Reports the name of the current working directory</para> - <indexterm zone="ch-system-coreutils pwd"> - <primary sortas="b-pwd">pwd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="readlink"> - <term><command>readlink</command></term> - <listitem> - <para>Reports the value of the given symbolic link</para> - <indexterm zone="ch-system-coreutils readlink"> - <primary sortas="b-readlink">readlink</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="realpath"> - <term><command>realpath</command></term> - <listitem> - <para>Prints the resolved path</para> - <indexterm zone="ch-system-coreutils realpath"> - <primary sortas="b-realpath">realpath</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rm"> - <term><command>rm</command></term> - <listitem> - <para>Removes files or directories</para> - <indexterm zone="ch-system-coreutils rm"> - <primary sortas="b-rm">rm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rmdir"> - <term><command>rmdir</command></term> - <listitem> - <para>Removes directories if they are empty</para> - <indexterm zone="ch-system-coreutils rmdir"> - <primary sortas="b-rmdir">rmdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="runcon"> - <term><command>runcon</command></term> - <listitem> - <para>Runs a command with specified security context</para> - <indexterm zone="ch-system-coreutils runcon"> - <primary sortas="b-runcon">runcon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="seq"> - <term><command>seq</command></term> - <listitem> - <para>Prints a sequence of numbers within a given range and with a - given increment</para> - <indexterm zone="ch-system-coreutils seq"> - <primary sortas="b-seq">seq</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha1sum"> - <term><command>sha1sum</command></term> - <listitem> - <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) - checksums</para> - <indexterm zone="ch-system-coreutils sha1sum"> - <primary sortas="b-sha1sum">sha1sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha224sum"> - <term><command>sha224sum</command></term> - <listitem> - <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha224sum"> - <primary sortas="b-sha224sum">sha224sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha256sum"> - <term><command>sha256sum</command></term> - <listitem> - <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha256sum"> - <primary sortas="b-sha256sum">sha256sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha384sum"> - <term><command>sha384sum</command></term> - <listitem> - <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha384sum"> - <primary sortas="b-sha384sum">sha384sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha512sum"> - <term><command>sha512sum</command></term> - <listitem> - <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha512sum"> - <primary sortas="b-sha512sum">sha512sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shred"> - <term><command>shred</command></term> - <listitem> - <para>Overwrites the given files repeatedly with complex patterns, - making it difficult to recover the data</para> - <indexterm zone="ch-system-coreutils shred"> - <primary sortas="b-shred">shred</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shuf"> - <term><command>shuf</command></term> - <listitem> - <para>Shuffles lines of text</para> - <indexterm zone="ch-system-coreutils shuf"> - <primary sortas="b-shuf">shuf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sleep"> - <term><command>sleep</command></term> - <listitem> - <para>Pauses for the given amount of time</para> - <indexterm zone="ch-system-coreutils sleep"> - <primary sortas="b-sleep">sleep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sort"> - <term><command>sort</command></term> - <listitem> - <para>Sorts the lines from the given files</para> - <indexterm zone="ch-system-coreutils sort"> - <primary sortas="b-sort">sort</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="split"> - <term><command>split</command></term> - <listitem> - <para>Splits the given file into pieces, by size or by number of - lines</para> - <indexterm zone="ch-system-coreutils split"> - <primary sortas="b-split">split</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="stat"> - <term><command>stat</command></term> - <listitem> - <para>Displays file or filesystem status</para> - <indexterm zone="ch-system-coreutils stat"> - <primary sortas="b-stat">stat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="stdbuf"> - <term><command>stdbuf</command></term> - <listitem> - <para>Runs commands with altered buffering operations for its standard - streams</para> - <indexterm zone="ch-system-coreutils stdbuf"> - <primary sortas="b-stdbuf">stdbuf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="stty"> - <term><command>stty</command></term> - <listitem> - <para>Sets or reports terminal line settings</para> - <indexterm zone="ch-system-coreutils stty"> - <primary sortas="b-stty">stty</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sum"> - <term><command>sum</command></term> - <listitem> - <para>Prints checksum and block counts for each given file</para> - <indexterm zone="ch-system-coreutils sum"> - <primary sortas="b-sum">sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sync"> - <term><command>sync</command></term> - <listitem> - <para>Flushes file system buffers; it forces changed blocks to disk - and updates the super block</para> - <indexterm zone="ch-system-coreutils sync"> - <primary sortas="b-sync">sync</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tac"> - <term><command>tac</command></term> - <listitem> - <para>Concatenates the given files in reverse</para> - <indexterm zone="ch-system-coreutils tac"> - <primary sortas="b-tac">tac</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tail"> - <term><command>tail</command></term> - <listitem> - <para>Prints the last ten lines (or the given number of lines) of each - given file</para> - <indexterm zone="ch-system-coreutils tail"> - <primary sortas="b-tail">tail</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tee"> - <term><command>tee</command></term> - <listitem> - <para>Reads from standard input while writing both to standard output - and to the given files</para> - <indexterm zone="ch-system-coreutils tee"> - <primary sortas="b-tee">tee</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="test"> - <term><command>test</command></term> - <listitem> - <para>Compares values and checks file types</para> - <indexterm zone="ch-system-coreutils test"> - <primary sortas="b-test">test</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="timeout"> - <term><command>timeout</command></term> - <listitem> - <para>Runs a command with a time limit</para> - <indexterm zone="ch-system-coreutils timeout"> - <primary sortas="b-timeout">timeout</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="touch"> - <term><command>touch</command></term> - <listitem> - <para>Changes file timestamps, setting the access and modification - times of the given files to the current time; files that do not exist - are created with zero length</para> - <indexterm zone="ch-system-coreutils touch"> - <primary sortas="b-touch">touch</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tr"> - <term><command>tr</command></term> - <listitem> - <para>Translates, squeezes, and deletes the given characters from - standard input</para> - <indexterm zone="ch-system-coreutils tr"> - <primary sortas="b-tr">tr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="true"> - <term><command>true</command></term> - <listitem> - <para>Does nothing, successfully; it always exits with a status code - indicating success</para> - <indexterm zone="ch-system-coreutils true"> - <primary sortas="b-true">true</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="truncate"> - <term><command>truncate</command></term> - <listitem> - <para>Shrinks or expands a file to the specified size</para> - <indexterm zone="ch-system-coreutils truncate"> - <primary sortas="b-truncate">truncate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tsort"> - <term><command>tsort</command></term> - <listitem> - <para>Performs a topological sort; it writes a completely ordered list - according to the partial ordering in a given file</para> - <indexterm zone="ch-system-coreutils tsort"> - <primary sortas="b-tsort">tsort</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tty"> - <term><command>tty</command></term> - <listitem> - <para>Reports the file name of the terminal connected to standard - input</para> - <indexterm zone="ch-system-coreutils tty"> - <primary sortas="b-tty">tty</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uname"> - <term><command>uname</command></term> - <listitem> - <para>Reports system information</para> - <indexterm zone="ch-system-coreutils uname"> - <primary sortas="b-uname">uname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unexpand"> - <term><command>unexpand</command></term> - <listitem> - <para>Converts spaces to tabs</para> - <indexterm zone="ch-system-coreutils unexpand"> - <primary sortas="b-unexpand">unexpand</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uniq"> - <term><command>uniq</command></term> - <listitem> - <para>Discards all but one of successive identical lines</para> - <indexterm zone="ch-system-coreutils uniq"> - <primary sortas="b-uniq">uniq</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unlink"> - <term><command>unlink</command></term> - <listitem> - <para>Removes the given file</para> - <indexterm zone="ch-system-coreutils unlink"> - <primary sortas="b-unlink">unlink</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="users"> - <term><command>users</command></term> - <listitem> - <para>Reports the names of the users currently logged on</para> - <indexterm zone="ch-system-coreutils users"> - <primary sortas="b-users">users</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vdir"> - <term><command>vdir</command></term> - <listitem> - <para>Is the same as <command>ls -l</command></para> - <indexterm zone="ch-system-coreutils vdir"> - <primary sortas="b-vdir">vdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="wc"> - <term><command>wc</command></term> - <listitem> - <para>Reports the number of lines, words, and bytes for each given - file, as well as a total line when more than one file is given</para> - <indexterm zone="ch-system-coreutils wc"> - <primary sortas="b-wc">wc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="who"> - <term><command>who</command></term> - <listitem> - <para>Reports who is logged on</para> - <indexterm zone="ch-system-coreutils who"> - <primary sortas="b-who">who</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="whoami"> - <term><command>whoami</command></term> - <listitem> - <para>Reports the user name associated with the current effective - user ID</para> - <indexterm zone="ch-system-coreutils whoami"> - <primary sortas="b-whoami">whoami</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="yes"> - <term><command>yes</command></term> - <listitem> - <para>Repeatedly outputs <quote>y</quote> or a given string until - killed</para> - <indexterm zone="ch-system-coreutils yes"> - <primary sortas="b-yes">yes</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libstdbuf"> - <term><filename class="libraryfile">libstdbuf</filename></term> - <listitem> - <para>Library used by <command>stdbuf</command></para> - <indexterm zone="ch-system-coreutils libstdbuf"> - <primary sortas="c-libstdbuf">libstdbuf</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-coreutils" role="."/></para> </sect2> diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml deleted file mode 100644 index 0fbd114d5..000000000 --- a/chapter06/createfiles.xml +++ /dev/null @@ -1,401 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-createfiles"> - <?dbhtml filename="createfiles.html"?> - - <title>Creating Essential Files and Symlinks</title> - - <indexterm zone="ch-system-createfiles"> - <primary sortas="e-/etc/passwd">/etc/passwd</primary> - </indexterm> - - <indexterm zone="ch-system-createfiles"> - <primary sortas="e-/etc/group">/etc/group</primary> - </indexterm> - - <indexterm zone="ch-system-createfiles"> - <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> - </indexterm> - - <indexterm zone="ch-system-createfiles"> - <primary sortas="e-/var/log/btmp">/var/log/btmp</primary> - </indexterm> - - <indexterm zone="ch-system-createfiles"> - <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary> - </indexterm> - - <indexterm zone="ch-system-createfiles"> - <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary> - </indexterm> - - <para>Some programs use hard-wired paths to programs which do not exist yet. - In order to satisfy these programs, create a number of symbolic links which - will be replaced by real files throughout the course of this chapter after the - software has been installed:</para> - -<screen><userinput>ln -sv /tools/bin/{bash,cat,chmod,dd,echo,false,ln,ls,mkdir,pwd,rm,stty,touch} /bin -ln -sv /tools/bin/{env,install,perl,printf} /usr/bin -ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib -ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib - -ln -sv bash /bin/sh -for lib in blkid mount uuid fdisk -do - ln -sv /tools/lib/lib$lib.so* /usr/lib - sed 's|/tools|/usr|' /tools/lib/pkgconfig/${lib}.pc \ - > /usr/lib/pkgconfig/${lib}.pc -done -for incdir in blkid libmount uuid libfdisk -do - ln -svf /tools/include/$incdir /usr/include -done - -mkdir -pv /tools/lib/locale -ln -sv /usr/lib/locale/locale-archive /tools/lib/locale</userinput></screen> - - <para arch="ml_32,ml_all">32-bit builds also require these links:</para> - -<screen arch="ml_32,ml_all"><userinput>ln -sv /tools/lib32/libgcc_s.so{,.1} /usr/lib32 -ln -sv /tools/lib32/libstdc++.{a,so{,.6}} /usr/lib32 -for lib in blkid mount uuid fdisk -do - ln -sv /tools/lib32/lib$lib.so* /usr/lib32/ - sed 's|/tools|/usr|' /tools/lib32/pkgconfig/${lib}.pc \ - > /usr/lib32/pkgconfig/${lib}.pc -done</userinput></screen> - - <para arch="ml_x32,ml_all">x32-bit builds also require these links:</para> - -<screen arch="ml_x32,ml_all"><userinput>ln -sv /tools/libx32/libgcc_s.so{,.1} /usr/libx32 -ln -sv /tools/libx32/libstdc++.{a,so{,.6}} /usr/libx32 -ln -sv /usr/libx32 / -for lib in blkid mount uuid fdisk -do - ln -sv /tools/libx32/lib$lib.so* /usr/libx32/ - sed 's|/tools|/usr|' /tools/libx32/pkgconfig/${lib}.pc \ - > /usr/libx32/pkgconfig/${lib}.pc -done</userinput></screen> - - <variablelist> - <title>The purpose of each link:</title> - - <varlistentry> - <term><parameter><filename>/bin/bash</filename></parameter></term> - <listitem> - <para>Many <command>bash</command> scripts specify - <filename>/bin/bash</filename>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/cat</filename></parameter></term> - <listitem> - <para>This pathname is hard-coded into Glibc's configure script.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/dd</filename></parameter></term> - <listitem> - <para>The path to <filename>dd</filename> will be hard-coded into the - <filename>/usr/bin/libtool</filename> utility.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/echo</filename></parameter></term> - <listitem> - <para>This is to satisfy one of the tests in Glibc's test suite, which - expects <filename>/bin/echo</filename>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/usr/bin/env</filename></parameter></term> - <listitem> - <para>This pathname is hard-coded into some packages build procedures. - <!-- systemd This may not be needed if we move sysd to the end--></para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/usr/bin/install</filename></parameter></term> - <listitem> - <para>The path to <filename>install</filename> will be hard-coded into - the <filename>/usr/lib/bash/Makefile.inc</filename> file.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/ln</filename></parameter></term> - <listitem> - <para>The path to <filename>ln</filename> will be hard-coded into the - <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/Config_heavy.pl</filename> - file.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/pwd</filename></parameter></term> - <listitem> - <para>Some <command>configure</command> scripts, particularly Glibc's, - have this pathname hard-coded.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/rm</filename></parameter></term> - <listitem> - <para>The path to <filename>rm</filename> will be hard-coded into the - <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/Config_heavy.pl</filename> - file.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/stty</filename></parameter></term> - <listitem> - <para>This pathname is hard-coded into Expect, therefore it is needed - for Binutils and GCC test suites to pass.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/usr/bin/perl</filename></parameter></term> - <listitem> - <para>Many Perl scripts hard-code this path to the - <command>perl</command> program.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/usr/lib/libgcc_s.so{,.1}</filename></parameter></term> - <listitem> - <para>Glibc needs this for the pthreads library to work.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/usr/lib/libstdc++{,.6}</filename></parameter></term> - <listitem> - <para>This is needed by several tests in Glibc's test suite, as well as - for C++ support in GMP.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter><filename>/bin/sh</filename></parameter></term> - <listitem> - <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term> - <parameter> - <filename>/usr/lib/lib{blkid,fdisk,mount,uuid}.so*</filename>, - <filename>/usr/include/{blkid,libfdisk,libmount,uuid}</filename>, - <filename>/usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</filename> - </parameter> - </term> - <listitem> - <para>These links and files allow - <phrase revision="sysv">eudev</phrase> - <phrase revision="systemd">systemd</phrase> to find the - util-linux libraries installed in chapter 5, without creating - wrong references to /tools. The uuid library is also needed for - building a python module.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term> - <parameter> - <filename>/tools/lib/locale/locale-archive</filename> - </parameter> - </term> - <listitem> - <para>Some programs built in chapter 5 look for installed - locale descriptions in this file. The locale descriptions will be - installed in <filename>/usr/lib/locale/locale-archive</filename> - after building the final glibc. The symlink allows those programs - to use the installed locales.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Historically, Linux maintains a list of the mounted file systems in the - file <filename>/etc/mtab</filename>. Modern kernels maintain this list - internally and exposes it to the user via the <filename - class="directory">/proc</filename> filesystem. To satisfy utilities that - expect the presence of <filename>/etc/mtab</filename>, create the following - symbolic link:</para> - -<screen><userinput>ln -sv /proc/self/mounts /etc/mtab</userinput></screen> - - <para>In order for user <systemitem class="username">root</systemitem> to be - able to login and for the name <quote>root</quote> to be recognized, there - must be relevant entries in the <filename>/etc/passwd</filename> and - <filename>/etc/group</filename> files.</para> - - <para>Create the <filename>/etc/passwd</filename> file by running the following - command:</para> - -<screen revision="sysv"><userinput>cat > /etc/passwd << "EOF" -<literal>root:x:0:0:root:/root:/bin/bash -bin:x:1:1:bin:/dev/null:/bin/false -daemon:x:6:6:Daemon User:/dev/null:/bin/false -messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false -nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> -EOF</userinput></screen> - -<screen revision="systemd"><userinput>cat > /etc/passwd << "EOF" -<literal>root:x:0:0:root:/root:/bin/bash -bin:x:1:1:bin:/dev/null:/bin/false -daemon:x:6:6:Daemon User:/dev/null:/bin/false -messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false -systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false -systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false -systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false -systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false -systemd-network:x:76:76:systemd Network Management:/:/bin/false -systemd-resolve:x:77:77:systemd Resolver:/:/bin/false -systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false -systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false -nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> -EOF</userinput></screen> - - <para>The actual password for <systemitem class="username">root</systemitem> - (the <quote>x</quote> used here is just a placeholder) will be set later.</para> - - <para>Create the <filename>/etc/group</filename> file by running the following - command:</para> - -<screen revision="sysv"><userinput>cat > /etc/group << "EOF" -<literal>root:x:0: -bin:x:1:daemon -sys:x:2: -kmem:x:3: -tape:x:4: -tty:x:5: -daemon:x:6: -floppy:x:7: -disk:x:8: -lp:x:9: -dialout:x:10: -audio:x:11: -video:x:12: -utmp:x:13: -usb:x:14: -cdrom:x:15: -adm:x:16: -messagebus:x:18: -input:x:24: -mail:x:34: -kvm:x:61: -wheel:x:97: -nogroup:x:99: -users:x:999:</literal> -EOF</userinput></screen> - -<screen revision="systemd"><userinput>cat > /etc/group << "EOF" -<literal>root:x:0: -bin:x:1:daemon -sys:x:2: -kmem:x:3: -tape:x:4: -tty:x:5: -daemon:x:6: -floppy:x:7: -disk:x:8: -lp:x:9: -dialout:x:10: -audio:x:11: -video:x:12: -utmp:x:13: -usb:x:14: -cdrom:x:15: -adm:x:16: -messagebus:x:18: -systemd-journal:x:23: -input:x:24: -mail:x:34: -kvm:x:61: -systemd-bus-proxy:x:72: -systemd-journal-gateway:x:73: -systemd-journal-remote:x:74: -systemd-journal-upload:x:75: -systemd-network:x:76: -systemd-resolve:x:77: -systemd-timesync:x:78: -systemd-coredump:x:79: -wheel:x:97: -nogroup:x:99: -users:x:999:</literal> -EOF</userinput></screen> - - <para>The created groups are not part of any standard—they are groups - decided on in part by the requirements of the Udev configuration in this - chapter, and in part by common convention employed by a number of existing - Linux distributions. In addition, some test suites rely on specific users - or groups. The Linux Standard Base (LSB, available at <ulink - url="http://www.linuxbase.org"/>) recommends only that, besides the group - <systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0, - a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be - present. All other group names and GIDs can be chosen freely by the system - administrator since well-written programs do not depend on GID numbers, but - rather use the group's name.</para> - - <para>Some tests later in the chapter need a regular user. We add this - user here and delete this account at the end of the chapter.</para> - -<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd -echo "tester:x:101:" >> /etc/group -install -o tester -d /home/tester</userinput></screen> - - <para>To remove the <quote>I have no name!</quote> prompt, start a new - shell. Since a full Glibc was installed in <xref - linkend="chapter-temporary-tools"/> and the - <filename>/etc/passwd</filename> and <filename>/etc/group</filename> - files have been created, user name and group name resolution will now - work:</para> - -<screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen> - - <para>Note the use of the <parameter>+h</parameter> directive. This tells - <command>bash</command> not to use its internal path hashing. Without this - directive, <command>bash</command> would remember the paths to binaries it has - executed. To ensure the use of the newly compiled binaries as soon as they are - installed, the <parameter>+h</parameter> directive will be used for the duration - of this chapter.</para> - - <para>The <command>login</command>, <command>agetty</command>, and - <command>init</command> programs (and others) use a number of log - files to record information such as who was logged into the system and - when. However, these programs will not write to the log files if they - do not already exist. Initialize the log files and give them - proper permissions:</para> - -<screen><userinput>touch /var/log/{btmp,lastlog,faillog,wtmp} -chgrp -v utmp /var/log/lastlog -chmod -v 664 /var/log/lastlog -chmod -v 600 /var/log/btmp</userinput></screen> - - <para>The <filename>/var/log/wtmp</filename> file records all logins and - logouts. The <filename>/var/log/lastlog</filename> file records when each - user last logged in. The <filename>/var/log/faillog</filename> file records - failed login attempts. The <filename>/var/log/btmp</filename> file records - the bad login attempts.</para> - - <note><para>The <filename>/run/utmp</filename> file records the users that - are currently logged in. This file is created dynamically in the boot - scripts.</para></note> - -</sect1> diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml index 0d8bd5c77..af4d95429 100644 --- a/chapter06/diffutils.xml +++ b/chapter06/diffutils.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-diffutils" role="wrap"> +<sect1 id="ch-tools-diffutils" role="wrap"> <?dbhtml filename="diffutils.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Diffutils-&diffutils-version;</title> - <indexterm zone="ch-system-diffutils"> + <indexterm zone="ch-tools-diffutils"> <primary sortas="a-Diffutils">Diffutils</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Diffutils package contains programs that show the differences - between files or directories.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/diffutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&diffutils-ch6-sbu;</seg> - <seg>&diffutils-ch6-du;</seg> + <seg>&diffutils-tmp-sbu;</seg> + <seg>&diffutils-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -43,82 +45,23 @@ <para>Prepare Diffutils for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> + <sect2 role="content"> + <title/> - <sect2 id="contents-diffutils" role="content"> - <title>Contents of Diffutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>cmp, diff, diff3, and sdiff</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="cmp"> - <term><command>cmp</command></term> - <listitem> - <para>Compares two files and reports whether or in which bytes they - differ</para> - <indexterm zone="ch-system-diffutils cmp"> - <primary sortas="b-cmp">cmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="diff"> - <term><command>diff</command></term> - <listitem> - <para>Compares two files or directories and reports which lines in - the files differ</para> - <indexterm zone="ch-system-diffutils diff"> - <primary sortas="b-diff">diff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="diff3"> - <term><command>diff3</command></term> - <listitem> - <para>Compares three files line by line</para> - <indexterm zone="ch-system-diffutils diff3"> - <primary sortas="b-diff3">diff3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sdiff"> - <term><command>sdiff</command></term> - <listitem> - <para>Merges two files and interactively outputs the results</para> - <indexterm zone="ch-system-diffutils sdiff"> - <primary sortas="b-sdiff">sdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-diffutils" role="."/></para> </sect2> diff --git a/chapter06/file.xml b/chapter06/file.xml index f33c7d462..035e02f72 100644 --- a/chapter06/file.xml +++ b/chapter06/file.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-file" role="wrap"> +<sect1 id="ch-tools-file" role="wrap"> <?dbhtml filename="file.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>File-&file-version;</title> - <indexterm zone="ch-system-file"> + <indexterm zone="ch-tools-file"> <primary sortas="a-File">File</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The File package contains a utility for determining the type of a given - file or files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/file.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&file-ch6-sbu;</seg> - <seg>&file-ch6-du;</seg> + <seg>&file-tmp-sbu;</seg> + <seg>&file-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -43,120 +45,26 @@ <para>Prepare File for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of File - 32-bit</title> - - <para>Clean previous build:</para> - -<screen><userinput remap="pre">make distclean</userinput></screen> - - <para>Prepare File for compilation:</para> - -<screen><userinput remap="configure">CC="gcc -m32" ./configure \ - --prefix=/usr \ - --libdir=/usr/lib32 \ - --host=i686-pc-linux-gnu</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 -rm -rf DESTDIR</userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of File - x32-bit</title> - - <para>Clean previous build:</para> - -<screen><userinput remap="pre">make distclean</userinput></screen> - - <para>Prepare File for compilation:</para> - -<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ - --prefix=/usr \ - --libdir=/usr/libx32 \ - --host=x86_64-pc-linux-gnux32</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> +<!-- devs: if using - -build here, the build system wants to compile + the signature file with "file" on the build system, but stops if it is not + the same version. One possibility would be to build "file" on the build + system first, but it is simpler to have the system think it is not + cross-compiling, and use the just built "file". --> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 -rm -rf DESTDIR</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-file" role="content"> - <title>Contents of File</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>file</seg> - <seg>libmagic.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="file"> - <term><command>file</command></term> - <listitem> - <para>Tries to classify each given file; it does this by performing - several tests—file system tests, magic number tests, and language - tests</para> - <indexterm zone="ch-system-file file"> - <primary sortas="b-file">file</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libmagic"> - <term><filename class="libraryfile">libmagic</filename></term> - <listitem> - <para>Contains routines for magic number recognition, used by the - <command>file</command> program</para> - <indexterm zone="ch-system-file libmagic"> - <primary sortas="c-libmagic">libmagic</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in <xref linkend="contents-file" role="."/></para> </sect2> diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml index 37393f0de..e6a19202b 100644 --- a/chapter06/findutils.xml +++ b/chapter06/findutils.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-findutils" role="wrap"> +<sect1 id="ch-tools-findutils" role="wrap"> <?dbhtml filename="findutils.html"?> <sect1info condition="script"> @@ -16,25 +16,25 @@ <title>Findutils-&findutils-version;</title> - <indexterm zone="ch-system-findutils"> + <indexterm zone="ch-tools-findutils"> <primary sortas="a-Findutils">Findutils</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Findutils package contains programs to find files. These programs - are provided to recursively search through a directory tree and to - create, maintain, and search a database (often faster than the recursive - find, but unreliable if the database has not been recently updated).</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/findutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&findutils-ch6-sbu;</seg> - <seg>&findutils-ch6-du;</seg> + <seg>&findutils-tmp-sbu;</seg> + <seg>&findutils-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -45,116 +45,30 @@ <para>Prepare Findutils for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--localstatedir</parameter></term> - <listitem> - <para>This option changes the location of the <command>locate</command> - database to be in <filename class="directory">/var/lib/locate</filename>, - which is FHS-compliant.</para> - </listitem> - </varlistentry> - - </variablelist> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">chown -Rv tester . -su tester -c "PATH=$PATH make check"</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> - - <para revision="sysv">Some of the scripts in the LFS-Bootscripts package - depend on <command>find</command>. As <filename - class="directory">/usr</filename> may not be available during the early - stages of booting, this program needs to be on the root partition. The - <command>updatedb</command> script also needs to be modified to correct an - explicit path:</para> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - <para revision="systemd"> Some packages in BLFS and beyond expect the - <command>find</command> program in <filename - class="directory">/bin</filename>, so make sure it's placed there:</para> + <para>Move the excutable to its final expected location:</para> -<screen><userinput remap="install">mv -v /usr/bin/find /bin -sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/bin/find $LFS/bin +sed -i 's|find:=${BINDIR}|find:=/bin|' $LFS/usr/bin/updatedb</userinput></screen> </sect2> - <sect2 id="contents-findutils" role="content"> - <title>Contents of Findutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>find, locate, updatedb, and xargs</seg> - <seg>/var/lib/locate</seg> - </seglistitem> - - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="find"> - <term><command>find</command></term> - <listitem> - <para>Searches given directory trees for files matching the specified - criteria</para> - <indexterm zone="ch-system-findutils find"> - <primary sortas="b-find">find</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="locate"> - <term><command>locate</command></term> - <listitem> - <para>Searches through a database of file names and reports the names - that contain a given string or match a given pattern</para> - <indexterm zone="ch-system-findutils locate"> - <primary sortas="b-locate">locate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="updatedb"> - <term><command>updatedb</command></term> - <listitem> - <para>Updates the <command>locate</command> database; it scans the - entire file system (including other file systems that are currently - mounted, unless told not to) and puts every file name it finds into - the database</para> - <indexterm zone="ch-system-findutils updatedb"> - <primary sortas="b-updatedb">updatedb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xargs"> - <term><command>xargs</command></term> - <listitem> - <para>Can be used to apply a given command to a list of files</para> - <indexterm zone="ch-system-findutils xargs"> - <primary sortas="b-xargs">xargs</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-findutils" role="."/></para> </sect2> diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index b112eb10d..efe7b4380 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-gawk" role="wrap"> +<sect1 id="ch-tools-gawk" role="wrap"> <?dbhtml filename="gawk.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Gawk-&gawk-version;</title> - <indexterm zone="ch-system-gawk"> + <indexterm zone="ch-tools-gawk"> <primary sortas="a-Gawk">Gawk</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Gawk package contains programs for manipulating text files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gawk.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gawk-ch6-sbu;</seg> - <seg>&gawk-ch6-du;</seg> + <seg>&gawk-tmp-sbu;</seg> + <seg>&gawk-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -46,82 +49,25 @@ <para>Prepare Gawk for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> - - <para>If desired, install the documentation:</para> - -<screen><userinput remap="install">mkdir -v /usr/share/doc/gawk-&gawk-version; -cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-gawk" role="content"> - <title>Contents of Gawk</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>awk (link to gawk), gawk, and awk-&gawk-version;</seg> - <seg>filefuncs.so, fnmatch.so, fork.so, inplace.so, intdiv.so, ordchr.so, - readdir.so, readfile.so, revoutput.so, revtwoway.so, rwarray.so, - and time.so (all in /usr/lib/gawk)</seg> - <seg>/usr/lib/gawk, /usr/libexec/awk, /usr/share/awk, and - /usr/share/doc/gawk-&gawk-version;</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="awk"> - <term><command>awk</command></term> - <listitem> - <para>A link to <command>gawk</command></para> - <indexterm zone="ch-system-gawk awk"> - <primary sortas="b-awk">awk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gawk"> - <term><command>gawk</command></term> - <listitem> - <para>A program for manipulating text files; it is the GNU - implementation of <command>awk</command></para> - <indexterm zone="ch-system-gawk gawk"> - <primary sortas="b-gawk">gawk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gawk-version"> - <term><command>gawk-&gawk-version;</command></term> - <listitem> - <para>A hard link to <command>gawk</command></para> - <indexterm zone="ch-system-gawk gawk-version"> - <primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-gawk" role="."/></para> </sect2> diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml new file mode 100644 index 000000000..55da9ef9a --- /dev/null +++ b/chapter06/gcc-pass2.xml @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-gcc-pass2" role="wrap" xreflabel="gcc-pass2"> + <?dbhtml filename="gcc-pass2.html"?> + + <sect1info condition="script"> + <productname>gcc-pass2</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>GCC-&gcc-version; - Pass 2</title> + + <indexterm zone="ch-tools-gcc-pass2"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, pass 2</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gcc.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&gcc-tmpp2-sbu;</seg> + <seg>&gcc-tmpp2-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of GCC</title> + + <para>As in the first build of GCC, the GMP, MPFR, and MPC packages are + required. Unpack the tarballs and move them into the required directory + names:</para> + +<screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz +mv -v mpfr-&mpfr-version; mpfr +tar -xf ../gmp-&gmp-version;.tar.xz +mv -v gmp-&gmp-version; gmp +tar -xf ../mpc-&mpc-version;.tar.gz +mv -v mpc-&mpc-version; mpc</userinput> +<userinput remap="pre" arch="ml_32,ml_x32,ml_all">tar -xf ../isl-&isl-version;.tar.xz +mv -v isl-&isl-version; isl</userinput></screen> + + + <para arch="default">If building on x86_64, change the default directory name for 64-bit + libraries to <quote>lib</quote>:</para> + +<screen arch="default"><userinput remap="pre">case $(uname -m) in + x86_64) + sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 + ;; +esac</userinput></screen> + + <para arch="ml_32,ml_x32,ml_all">Change the default directory name for + libraries:</para> + +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ + -e '/m32=/s/m32=.*/m32=..\&lib-m32;$(call if_multiarch,:i386-linux-gnu)/' \ + -i.orig gcc/config/i386/t-linux64</userinput></screen> + +<screen><userinput remap="pre">patch -Np1 -i ../&gcc-cross-patch;</userinput></screen> + + <para>Create a separate build directory again:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Create a symlink that allows libgcc to be built with posix threads + support:</para> + +<screen><userinput remap="pre">mkdir -pv $LFS_TGT/libgcc +ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput></screen> + + <para>Before starting to build GCC, remember to unset any environment + variables that override the default optimization flags.</para> + + <para>Now prepare GCC for compilation:</para> + +<screen arch="default"><userinput remap="configure">../configure \ + --build=$(../config.guess) \ + --host=$LFS_TGT \ + --prefix=/usr \ + CC_FOR_TARGET=$LFS_TGT-gcc \ + --with-build-sysroot=$LFS \ + --enable-initfini-array \ + --disable-nls \ + --disable-multilib \ + --disable-decimal-float \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libstdcxx \ + --enable-languages=c,c++</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure" + arch="ml_32">mlist=m64,m32</userinput><userinput remap="configure" + arch="ml_x32">mlist=m64,mx32</userinput><userinput remap="configure" + arch="ml_all">mlist=m64,m32,mx32</userinput> +<userinput remap="configure">../configure \ + --build=$(../config.guess) \ + --host=$LFS_TGT \ + --prefix=/usr \ + CC_FOR_TARGET=$LFS_TGT-gcc \ + --with-build-sysroot=$LFS \ + --enable-initfini-array \ + --disable-nls \ + --enable-multilib --with-multilib-list=$mlist \ + --disable-decimal-float \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libstdcxx \ + --enable-languages=c,c++ \ + --with-system-zlib</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title><!-- WIP --> + + <varlistentry> + <term><parameter>-with-build-sysroot=$LFS</parameter></term> + <listitem> + <para>Normally, using <parameter>--host</parameter> ensures that + a cross-compiler is used for building GCC, and that compiler knows + that it has to look for headers and libraries in <filename + class="directory">$LFS</filename>. But the build system of GCC uses + other tools, which are not aware of this location. This switch is + needed to have them find the needed files in <filename + class="directory">$LFS</filename>, and not on the host.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--enable-initfini-array</parameter></term> + <listitem> + <para>This option is automatically enabled when building a native + compiler with a native compiler on x86. But here, we build with + a cross compiler, so we need to explicitely set this option.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + + <para>As a finishing touch, create a utility symlink. Many programs and scripts + run <command>cc</command> instead of <command>gcc</command>, which is + used to keep programs generic and therefore usable on all kinds of UNIX + systems where the GNU C compiler is not always installed. Running + <command>cc</command> leaves the system administrator free to decide + which C compiler to install:</para> + +<screen><userinput remap="install">ln -sv gcc $LFS/usr/bin/cc</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/glibc-32.xml b/chapter06/glibc-32.xml deleted file mode 100644 index d16693a0b..000000000 --- a/chapter06/glibc-32.xml +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 arch="ml_32,ml_x32,ml_all" id="ch-system-glibc-32" role="wrap"> - <?dbhtml filename="glibc-32.html"?> - - <sect1info condition="script"> - <productname>glibc-32</productname> - <productnumber>&glibc-version;</productnumber> - <address>&glibc-url;</address> - </sect1info> - - <title>Glibc-&glibc-version; - 32-bit</title> - - <indexterm zone="ch-system-glibc-32"> - <primary sortas="a-Glibc-32">Glibc-32</primary> - </indexterm> - - <sect2 role="installation"> - <title>Preparation to install of ML-Glibc</title> - -<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen> - -<!-- No longer needed - <para>Fix a problem introduced with the linux-5.2 kernel:</para> - -<screen><userinput remap="pre">sed -i '/asm.socket.h/a# include <linux/sockios.h>' \ - sysdeps/unix/sysv/linux/bits/socket.h</userinput></screen> ---> - <para>Temporarily move a file that would get overwritten by the 32-bit builds:</para> - -<screen><userinput remap="pre">mv /usr/include/limits.h{,.backup} </userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Glibc - 32-bit</title> - - <para>The Glibc documentation recommends building Glibc - in a dedicated build directory:</para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Prepare Glibc for compilation:</para> - -<screen><userinput remap="configure">CC="gcc -m32 -ffile-prefix-map=/tools=/usr" \ -CXX="g++ -m32 -ffile-prefix-map=/tools=/usr" \ -../configure --prefix=/usr \ - --disable-werror \ - --enable-kernel=&min-kernel; \ - --enable-stack-protector=strong \ - --with-headers=/usr/include \ - --enable-multi-arch \ - --libdir=/usr/lib32 \ - --libexecdir=/usr/lib32 \ - libc_cv_slibdir=/usr/lib32 \ - i686-pc-linux-gnu</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile -make install_root=$PWD/DESTDIR install -mv -v DESTDIR/usr/lib32/* /usr/lib32/ -install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \ - /usr/include/gnu/ -ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-linux.so.2 -ln -svf ../usr/lib32/ld-linux.so.2 /lib/ld-lsb.so.3 -ln -svf ../lib/locale /usr/lib32/locale</userinput></screen> - - <para>Configure the linker cache configuration:</para> - -<screen><userinput>echo "/usr/lib32" > /etc/ld.so.conf.d/lib32.conf -ldconfig</userinput></screen> - - <para>Do cleanup:</para> - -<screen><userinput>cd .. -rm -rf build</userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> - -<!-- -In case the compilation ends with - -... -if test -r /autolfs/sources/glibc-2.29/build/DESTDIR/usr/include/gnu/stubs-x32.h && cmp -s /autolfs/sources/glibc-2.29/build/stubs.h /autolfs/sources/glibc-2.29/build/DESTDIR/usr/include/gnu/stubs-x32.h; \ -then echo 'stubs.h unchanged'; \ -else /usr/bin/install -c -m 644 /autolfs/sources/glibc-2.29/build/stubs.h /autolfs/sources/glibc-2.29/build/DESTDIR/usr/include/gnu/stubs-x32.h; fi -rm -f /autolfs/sources/glibc-2.29/build/stubs.h -/autolfs/sources/glibc-2.29/build/elf/sln /autolfs/sources/glibc-2.29/build/elf/symlink.list -/autolfs/sources/glibc-2.29/build/elf/sln: /autolfs/sources/glibc-2.29/build/elf/sln: cannot execute binary file -make[1]: *** [Makefile:106: install-symbolic-link] Error 126 -make[1]: Leaving directory '/autolfs/sources/glibc-2.29' -make: *** [Makefile:12: install] Error 2 - -it is a good sign that the actually running kernel isn't ML-enabled. -ArchLinux's kernels are configured like - -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -# CONFIG_X86_X32 is not set <<<<< - -It isn't x32-enabled ==> Error when building x32 stuff ---> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Glibc - x32-bit</title> - - <para>The Glibc documentation recommends building Glibc - in a dedicated build directory:</para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Prepare Glibc for compilation:</para> - -<screen><userinput remap="configure">CC="gcc -mx32 -ffile-prefix-map=/tools=/usr" \ -CXX="g++ -mx32 -ffile-prefix-map=/tools=/usr" \ -../configure --prefix=/usr \ - --disable-werror \ - --enable-kernel=&min-kernel; \ - --enable-stack-protector=strong \ - --with-headers=/usr/include \ - --enable-multi-arch \ - --libdir=/usr/libx32 \ - --libexecdir=/usr/libx32 \ - libc_cv_slibdir=/usr/libx32 \ - x86_64-pc-linux-gnux32</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile -make install_root=$PWD/DESTDIR install -mv -v DESTDIR/usr/libx32/* /usr/libx32/ -install -vm644 DESTDIR/usr/include/gnu/lib-names-x32.h /usr/include/gnu/ -[ -e DESTDIR/usr/include/gnu/stubs-x32.h ] \ - && install -vm644 DESTDIR/usr/include/gnu/stubs-x32.h /usr/include/gnu/ \ - || ln -v /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-x32.h -ln -svf ../usr/libx32/ld-linux-x32.so.2 /lib/ld-linux-x32.so.2 -ln -svf ../lib/locale /usr/libx32/locale</userinput></screen> -<!-- For whatever reason the stubs-x32.h doesn't get created. The 'ln' above is -just a "brute force" workaraound by copying the stubs-64.h file. --> - - <para>Configure the linker cache configuration:</para> - -<screen><userinput>echo "/usr/libx32" > /etc/ld.so.conf.d/libx32.conf -ldconfig</userinput></screen> - - <para>Do cleanup:</para> - -<screen><userinput>cd .. -rm -rf build</userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ Cleanup ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 role="installation"> - <title>Cleanup</title> - - <para>Restore the file we moved temporarily away:</para> - -<screen><userinput remap="pre">mv /usr/include/limits.h{.backup,} </userinput></screen> - - </sect2> - -</sect1> diff --git a/chapter06/grep.xml b/chapter06/grep.xml index 58b0db366..494b8616d 100644 --- a/chapter06/grep.xml +++ b/chapter06/grep.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-grep" role="wrap"> +<sect1 id="ch-tools-grep" role="wrap"> <?dbhtml filename="grep.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Grep-&grep-version;</title> - <indexterm zone="ch-system-grep"> + <indexterm zone="ch-tools-grep"> <primary sortas="a-Grep">Grep</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Grep package contains programs for searching through files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/grep.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&grep-ch6-sbu;</seg> - <seg>&grep-ch6-du;</seg> + <seg>&grep-tmp-sbu;</seg> + <seg>&grep-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -42,69 +45,25 @@ <para>Prepare Grep for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --bindir=/bin</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-grep" role="content"> - <title>Contents of Grep</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>egrep, fgrep, and grep</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="egrep"> - <term><command>egrep</command></term> - <listitem> - <para>Prints lines matching an extended regular expression</para> - <indexterm zone="ch-system-grep egrep"> - <primary sortas="b-egrep">egrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fgrep"> - <term><command>fgrep</command></term> - <listitem> - <para>Prints lines matching a list of fixed strings</para> - <indexterm zone="ch-system-grep fgrep"> - <primary sortas="b-fgrep">fgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grep"> - <term><command>grep</command></term> - <listitem> - <para>Prints lines matching a basic regular expression</para> - <indexterm zone="ch-system-grep grep"> - <primary sortas="b-grep">grep</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-grep" role="."/></para> </sect2> diff --git a/chapter06/grub.xml b/chapter06/grub.xml deleted file mode 100644 index 25a61077b..000000000 --- a/chapter06/grub.xml +++ /dev/null @@ -1,374 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-grub" role="wrap"> - <?dbhtml filename="grub.html"?> - - <sect1info condition="script"> - <productname>grub</productname> - <productnumber>&grub-version;</productnumber> - <address>&grub-url;</address> - </sect1info> - - <title>GRUB-&grub-version;</title> - - <indexterm zone="ch-system-grub"> - <primary sortas="a-Grub">GRUB</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The GRUB package contains the GRand Unified Bootloader.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&grub-ch6-sbu;</seg> - <seg>&grub-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of GRUB</title> - - <para>Prepare GRUB for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --sbindir=/sbin \ - --sysconfdir=/etc \ - --disable-efiemu \ - --disable-werror</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>--disable-werror</parameter></term> - <listitem> - <para>This allows the build to complete with warnings introduced - by more recent Flex versions.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-efiemu</parameter></term> - <listitem> - <para>This option minimizes what is built by disabling a feature and - testing programs not needed for LFS.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install -mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen> - - <para>Using GRUB to make your LFS system bootable will be discussed in - <xref linkend="ch-bootable-grub"/>.</para> - - </sect2> - - <sect2 id="contents-gRUB" role="content"> - <title>Contents of GRUB</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - - <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest, - grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless, - grub-menulst2cfg, grub-mkconfig, - grub-mkimage, grub-mklayout, grub-mknetdir, - grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone, - grub-ofpathname, grub-probe, grub-reboot, grub-render-label, - grub-script-check, - grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg> - - <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install - is first run)</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="grub-bios-setup"> - <term><command>grub-bios-setup</command></term> - <listitem> - <para>Is a helper program for grub-install</para> - <indexterm zone="ch-system-grub grub-bios-setup"> - <primary sortas="b-grub-bios-setup">grub-bios-setup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-editenv"> - <term><command>grub-editenv</command></term> - <listitem> - <para>A tool to edit the environment block</para> - <indexterm zone="ch-system-grub grub-editenv"> - <primary sortas="b-grub-editenv">grub-editenv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-file"> - <term><command>grub-file</command></term> - <listitem> - <para>Checks if FILE is of the specified type.</para> - <indexterm zone="ch-system-grub grub-file"> - <primary sortas="b-grub-file">grub-file</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-fstest"> - <term><command>grub-fstest</command></term> - <listitem> - <para>Tool to debug the filesystem driver</para> - <indexterm zone="ch-system-grub grub-fstest"> - <primary sortas="b-grub-fstest">grub-fstest</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-glue-efi"> - <term><command>grub-glue-efi</command></term> - <listitem> - <para>Processes ia32 and amd64 EFI images and glues them - according to Apple format.</para> - <indexterm zone="ch-system-grub grub-glue-efi"> - <primary sortas="b-grub-glue-efi">grub-glue-efi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-install"> - <term><command>grub-install</command></term> - <listitem> - <para>Install GRUB on your drive</para> - <indexterm zone="ch-system-grub grub-install"> - <primary sortas="b-grub-install">grub-install</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-kbdcomp"> - <term><command>grub-kbdcomp</command></term> - <listitem> - <para>Script that converts an xkb layout into one recognized by - GRUB</para> - <indexterm zone="ch-system-grub grub-kbdcomp"> - <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-macbless"> - <term><command>grub-macbless</command></term> - <listitem> - <para>Mac-style bless on HFS or HFS+ files</para> - <indexterm zone="ch-system-grub grub-macbless"> - <primary sortas="b-grub-macbless">grub-macbless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-menulst2cfg"> - <term><command>grub-menulst2cfg</command></term> - <listitem> - <para>Converts a GRUB Legacy <filename>menu.lst</filename> - into a <filename>grub.cfg</filename> for use with GRUB 2</para> - <indexterm zone="ch-system-grub grub-menulst2cfg"> - <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkconfig"> - <term><command>grub-mkconfig</command></term> - <listitem> - <para>Generate a grub config file</para> - <indexterm zone="ch-system-grub grub-mkconfig"> - <primary sortas="b-grub-mkconfig">grub-mkconfig</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkimage"> - <term><command>grub-mkimage</command></term> - <listitem> - <para>Make a bootable image of GRUB</para> - <indexterm zone="ch-system-grub grub-mkimage"> - <primary sortas="b-grub-mkimage">grub-mkimage</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mklayout"> - <term><command>grub-mklayout</command></term> - <listitem> - <para>Generates a GRUB keyboard layout file</para> - <indexterm zone="ch-system-grub grub-mklayout"> - <primary sortas="b-grub-mklayout">grub-mklayout</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mknetdir"> - <term><command>grub-mknetdir</command></term> - <listitem> - <para>Prepares a GRUB netboot directory</para> - <indexterm zone="ch-system-grub grub-mknetdir"> - <primary sortas="b-grub-mknetdir">grub-mknetdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkpasswd-pbkdf2"> - <term><command>grub-mkpasswd-pbkdf2</command></term> - <listitem> - <para>Generates an encrypted PBKDF2 password for use in the boot - menu</para> - <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2"> - <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkrelpath"> - <term><command>grub-mkrelpath</command></term> - <listitem> - <para>Makes a system pathname relative to its root</para> - <indexterm zone="ch-system-grub grub-mkrelpath"> - <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkrescue"> - <term><command>grub-mkrescue</command></term> - <listitem> - <para>Make a bootable image of GRUB suitable for a floppy disk or CDROM/DVD</para> - <indexterm zone="ch-system-grub grub-mkrescue"> - <primary sortas="b-grub-mkrescue">grub-mkrescue</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkstandalone"> - <term><command>grub-mkstandalone</command></term> - <listitem> - <para>Generates a standalone image</para> - <indexterm zone="ch-system-grub grub-mkstandalone"> - <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-ofpathname"> - <term><command>grub-ofpathname</command></term> - <listitem> - <para>Is a helper program that prints the path of a GRUB device</para> - <indexterm zone="ch-system-grub grub-ofpathname"> - <primary sortas="b-grub-ofpathname">grub-ofpathname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-probe"> - <term><command>grub-probe</command></term> - <listitem> - <para>Probe device information for a given path or device</para> - <indexterm zone="ch-system-grub grub-probe"> - <primary sortas="b-grub-probe">grub-probe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-reboot"> - <term><command>grub-reboot</command></term> - <listitem> - <para>Sets the default boot entry for GRUB for the next boot only</para> - <indexterm zone="ch-system-grub grub-reboot"> - <primary sortas="b-grub-reboot">grub-reboot</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-render-label"> - <term><command>grub-render-label</command></term> - <listitem> - <para>Render Apple .disk_label for Apple Macs</para> - <indexterm zone="ch-system-grub grub-render-label"> - <primary sortas="b-grub-render-label">grub-render-label</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-script-check"> - <term><command>grub-script-check</command></term> - <listitem> - <para>Checks GRUB configuration script for syntax errors</para> - <indexterm zone="ch-system-grub grub-script-check"> - <primary sortas="b-grub-script-check">grub-script-check</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-set-default"> - <term><command>grub-set-default</command></term> - <listitem> - <para>Sets the default boot entry for GRUB</para> - <indexterm zone="ch-system-grub grub-set-default"> - <primary sortas="b-grub-set-default">grub-set-default</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-sparc64-setup"> - <term><command>grub-sparc64-setup</command></term> - <listitem> - <para>Is a helper program for grub-setup</para> - <indexterm zone="ch-system-grub grub-sparc64-setup"> - <primary sortas="b-grub-sparc64-setup">grub-setup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-syslinux2cfg"> - <term><command>grub-syslinux2cfg</command></term> - <listitem> - <para>Transform a syslinux config file into grub.cfg format</para> - <indexterm zone="ch-system-grub grub-syslinux2cfg"> - <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml index 09eebbdf7..90d554b0d 100644 --- a/chapter06/gzip.xml +++ b/chapter06/gzip.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-gzip" role="wrap"> +<sect1 id="ch-tools-gzip" role="wrap"> <?dbhtml filename="gzip.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Gzip-&gzip-version;</title> - <indexterm zone="ch-system-gzip"> + <indexterm zone="ch-tools-gzip"> <primary sortas="a-Gzip">Gzip</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Gzip package contains programs for compressing and decompressing - files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gzip.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gzip-ch6-sbu;</seg> - <seg>&gzip-ch6-du;</seg> + <seg>&gzip-tmp-sbu;</seg> + <seg>&gzip-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -43,193 +45,27 @@ <para>Prepare Gzip for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Two tests are known to fail in the LFS environment: - help-version and zmore.</para> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - <para>Move a program that needs to be on the root filesystem:</para> + <para>Move the excutable to its final expected location:</para> -<screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/bin/gzip $LFS/bin</userinput></screen> </sect2> - <sect2 id="contents-gzip" role="content"> - <title>Contents of Gzip</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>gunzip, gzexe, gzip, uncompress (hard link with gunzip), zcat, zcmp, - zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="gunzip"> - <term><command>gunzip</command></term> - <listitem> - <para>Decompresses gzipped files</para> - <indexterm zone="ch-system-gzip gunzip"> - <primary sortas="b-gunzip">gunzip</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gzexe"> - <term><command>gzexe</command></term> - <listitem> - <para>Creates self-decompressing executable files</para> - <indexterm zone="ch-system-gzip gzexe"> - <primary sortas="b-gzexe">gzexe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gzip"> - <term><command>gzip</command></term> - <listitem> - <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para> - <indexterm zone="ch-system-gzip gzip"> - <primary sortas="b-gzip">gzip</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uncompress"> - <term><command>uncompress</command></term> - <listitem> - <para>Decompresses compressed files</para> - <indexterm zone="ch-system-gzip uncompress"> - <primary sortas="b-uncompress">uncompress</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zcat"> - <term><command>zcat</command></term> - <listitem> - <para>Decompresses the given gzipped files to standard output</para> - <indexterm zone="ch-system-gzip zcat"> - <primary sortas="b-zcat">zcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zcmp"> - <term><command>zcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zcmp"> - <primary sortas="b-zcmp">zcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zdiff"> - <term><command>zdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zdiff"> - <primary sortas="b-zdiff">zdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zegrep"> - <term><command>zegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zegrep"> - <primary sortas="b-zegrep">zegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zfgrep"> - <term><command>zfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zfgrep"> - <primary sortas="b-zfgrep">zfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zforce"> - <term><command>zforce</command></term> - <listitem> - <para>Forces a <filename class="extension">.gz</filename> extension on - all given files that are gzipped files, so that <command>gzip</command> - will not compress them again; this can be useful when file names were - truncated during a file transfer</para> - <indexterm zone="ch-system-gzip zforce"> - <primary sortas="b-zforce">zforce</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zgrep"> - <term><command>zgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zgrep"> - <primary sortas="b-zgrep">zgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zless"> - <term><command>zless</command></term> - <listitem> - <para>Runs <command>less</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zless"> - <primary sortas="b-zless">zless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zmore"> - <term><command>zmore</command></term> - <listitem> - <para>Runs <command>more</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zmore"> - <primary sortas="b-zmore">zmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="znew"> - <term><command>znew</command></term> - <listitem> - <para>Re-compresses files from <command>compress</command> format to - <command>gzip</command> format—<filename - class="extension">.Z</filename> to <filename - class="extension">.gz</filename></para> - <indexterm zone="ch-system-gzip znew"> - <primary sortas="b-znew">znew</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-gzip" role="."/></para> </sect2> diff --git a/chapter06/introduction.xml b/chapter06/introduction.xml index 876112796..ed8000fa8 100644 --- a/chapter06/introduction.xml +++ b/chapter06/introduction.xml @@ -5,79 +5,26 @@ %general-entities; ]> -<sect1 id="ch-system-introduction"> +<sect1 id="ch-tools-introduction-cross"> <?dbhtml filename="introduction.html"?> <title>Introduction</title> - <para>In this chapter, we enter the building site and start constructing the - LFS system in earnest. That is, we chroot into the temporary mini Linux system, - make a few final preparations, and then begin installing the packages.</para> - - <para>The installation of this software is straightforward. Although in many - cases the installation instructions could be made shorter and more generic, - we have opted to provide the full instructions for every package to minimize - the possibilities for mistakes. The key to learning what makes a Linux system - work is to know what each package is used for and why you (or the system) - may need it.</para> - - <para>We do not recommend using optimizations. They can make - a program run slightly faster, but they may also cause compilation - difficulties and problems when running the program. If a package refuses to - compile when using optimization, try to compile it without optimization and - see if that fixes the problem. Even if the package does compile when using - optimization, there is the risk it may have been compiled incorrectly because - of the complex interactions between the code and build tools. Also note that - the <option>-march</option> and <option>-mtune</option> options using values - not specified in the book have not been tested. This may cause problems with - the toolchain packages (Binutils, GCC and Glibc). The small potential gains - achieved in using compiler optimizations are often outweighed by the risks. - First-time builders of LFS are encouraged to build without custom - optimizations. The subsequent system will still run very fast and be stable - at the same time.</para> - - <para>The order that packages are installed in this chapter needs to be - strictly followed to ensure that no program accidentally acquires a path - referring to <filename class="directory">/tools</filename> hard-wired into - it. For the same reason, do not compile separate packages in parallel. - Compiling in parallel may save time (especially on dual-CPU machines), but it - could result in a program containing a hard-wired path to <filename - class="directory">/tools</filename>, which will cause the program to stop - working when that directory is removed.</para> - - <para>Before the installation instructions, each installation page provides - information about the package, including a concise description of what it - contains, approximately how long it will take to build, and how much disk - space is required during this building process. Following the installation - instructions, there is a list of programs and libraries (along with brief - descriptions of these) that the package installs.</para> - - <note><para>The SBU values and required disk space includes - test suite data for all applicable packages in Chapter 6.</para></note> - - <sect2> - <title>About libraries</title> - - <para>In general, the LFS editors discourage building and installing static - libraries. The original purpose for most static libraries has been made - obsolete in a modern Linux system. In addition linking a static library - into a program can be detrimental. If an update to the library is needed - to remove a security problem, all programs that use the static library will - need to be relinked to the new library. Since the use of static libraries - is not always obvious, the relevant programs (and the procedures needed to - do the linking) may not even be known.</para> - - <para>In the procedures in Chapter 6, we remove or disable installation of - most static libraries. Usually this is done by passing a - <option>--disable-static</option> option to <command>configure</command>. - In other cases, alternate means are needed. In a few cases, especially - glibc and gcc, the use of static libraries remains essential to the general - package building process. </para> - - <para>For a more complete discussion of libraries, see the discussion - <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> - Libraries: Static or shared?</ulink> in the BLFS book.</para> - - </sect2> + <para>This chapter shows how to cross-compile basic utilities using + the just built cross-toolchain. Those utilities are installed into + their final location, but cannot be used yet. Basic tasks still rely on + the host's tools. Nevertheless, the installed libraries are used when + linking.</para> + + <para>Using the utilities will be possible in next chapter after entering + the <quote>chroot</quote> environment. But all the packages built in the + present chapter need to be built before we do that. Therefore we cannot be + independent of the host system yet.</para> + + <para>Once again, let us recall that improper setting of <envar>LFS</envar> + together with building as root, may render your computer unusable. + This whole chapter must be done as user <systemitem + class="username">lfs</systemitem>, with the enviroment as described in + <xref linkend="ch-preps-settingenviron"/>.</para> </sect1> diff --git a/chapter06/isl.xml b/chapter06/isl.xml deleted file mode 100644 index 8420101af..000000000 --- a/chapter06/isl.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-isl" role="wrap"> - <?dbhtml filename="isl.html"?> - - <sect1info condition="script"> - <productname>isl</productname> - <productnumber>&isl-version;</productnumber> - <address>&isl-url;</address> - </sect1info> - - <title>ISL-&isl-version;</title> - - <indexterm zone="ch-system-isl"> - <primary sortas="a-ISL">ISL</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>ISL is a thread-safe C library for manipulating sets and relations - of integer points bounded by affine constraints.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&isl-ch6-sbu;</seg> - <seg>&isl-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of ISL</title> - - <para>Prepare ISL for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --docdir=/usr/share/doc/isl-&isl-version;</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>--docdir=/usr/share/doc/isl-&isl-version;</parameter></term> - <listitem> - <para>This variable specifies the correct place for the - documentation.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package and its documentation:</para> - -<screen><userinput remap="install">make install -install -vd /usr/share/doc/isl-&isl-version; -install -m644 doc/{CodingStyle,manual.pdf,SubmittingPatches,user.pod} \ - /usr/share/doc/isl-&isl-version;</userinput></screen> - - <para>Finally, move a misplaced file:</para> - -<screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib -mv -v /usr/lib/libisl*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> - - </sect2> - - <sect2 id="contents-isl" role="content"> - <title>Contents of ISL</title> - - <segmentedlist> - <segtitle>Installed Libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>libisl.so</seg> - <seg>/usr/share/doc/isl-&isl-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libisl"> - <term><filename class="libraryfile">libisl</filename></term> - <listitem> - <para>Contains integer set manipulation functions</para> - <indexterm zone="ch-system-isl libisl"> - <primary sortas="c-libisl">libisl</primary> - </indexterm> - </listitem> - </varlistentry> - </variablelist> - - </sect2> - -</sect1> - diff --git a/chapter06/linux-firmware.xml b/chapter06/linux-firmware.xml deleted file mode 100644 index 6042cda9e..000000000 --- a/chapter06/linux-firmware.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<!-- - Linux Firmware - ~~~~~~~~~~~~~~ - - Checkout the tree at - https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ - - $ PKGNAME=linux-firmware-$(date +%Y%m%d) - $ mkdir -pv $PKGNAME - $ cd $PKGNAME - $ <<checkout git tree here>> - $ cd .. - $ tar -cJf ${PKGNAME}.tar.xz $PKGNAME ---> -<sect1 id="ch-system-linux-firmware" role="wrap"> - <?dbhtml filename="linux-firmware.html"?> - - <sect1info condition="script"> - <productname>linux-firmware</productname> - <productnumber>&linux-firmware-version;</productnumber> - <address>&linux-firmware-url;</address> - </sect1info> - - <title>Linux-Firmware-&linux-firmware-version;</title> - - <indexterm zone="ch-system-linux-firmware"> - <primary sortas="a-Linux-Firmware">Linux-Firmware</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Linux-Firmware package contains propietary kernel "blobs" - required for some specific hardware.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&linux-firmware-ch6-sbu;</seg> - <seg>&linux-firmware-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Linux-Firmware</title> - - <para>Install the Linux-Firmware package with the following commands:</para> - -<screen><userinput remap="install">cp -Rv * /lib/firmware</userinput></screen> - - </sect2> - -</sect1> diff --git a/chapter06/linux-headers.xml b/chapter06/linux-headers.xml deleted file mode 100644 index f1d4cb14e..000000000 --- a/chapter06/linux-headers.xml +++ /dev/null @@ -1,209 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-linux-headers" role="wrap"> - <?dbhtml filename="linux-headers.html"?> - - <sect1info condition="script"> - <productname>linux-headers</productname> - <productnumber>&linux-version;</productnumber> - <address>&linux-url;</address> - </sect1info> - - <title>Linux-&linux-version; API Headers</title> - - <indexterm zone="ch-system-linux-headers"> - <primary sortas="a-Linux">Linux</primary> - <secondary>API headers</secondary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the - kernel's API for use by Glibc.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&linux-headers-ch6-sbu;</seg> - <seg>&linux-headers-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Linux API Headers</title> - - <para>The Linux kernel needs to expose an Application Programming Interface - (API) for the system's C library (Glibc in LFS) to use. This is done - by way of sanitizing various C header files that are shipped in the Linux - kernel source tarball.</para> - - <para>Make sure there are no stale files and dependencies lying around - from previous activity:</para> - -<screen><userinput remap="pre">make mrproper</userinput></screen> - - <para>Now extract the user-visible kernel headers from the source. - The recommended make target <quote>headers_install</quote> cannot be - used, because it requires <application>rsync</application>, which is - not available in <filename class="directory">/tools</filename>. The - headers are first placed in <filename class="directory">./usr</filename>, - then some files used by the kernel developers are removed, then - the files are copied to their final location.</para> - -<screen><userinput remap="make">make headers -find usr/include -name '.*' -delete -rm usr/include/Makefile -</userinput><userinput remap="install">cp -rv usr/include/* /usr/include</userinput></screen> - - </sect2> - - <sect2 id="contents-linux-headers" role="content"> - <title>Contents of Linux API Headers</title> - - <segmentedlist> - <segtitle>Installed headers</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h, - /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h, - /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h, - /usr/include/sound/*.h, /usr/include/video/*.h, - and /usr/include/xen/*.h</seg> - <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm, - /usr/include/linux, /usr/include/misc, /usr/include/mtd, - /usr/include/rdma, /usr/include/scsi, /usr/include/sound, - /usr/include/video, and /usr/include/xen</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="asm"> - <term><filename class="headerfile">/usr/include/asm/*.h</filename></term> - <listitem> - <para>The Linux API ASM Headers</para> - <indexterm zone="ch-system-linux-headers asm"> - <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="asm-generic"> - <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term> - <listitem> - <para>The Linux API ASM Generic Headers</para> - <indexterm zone="ch-system-linux-headers asm-generic"> - <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="drm"> - <term><filename class="headerfile">/usr/include/drm/*.h</filename></term> - <listitem> - <para>The Linux API DRM Headers</para> - <indexterm zone="ch-system-linux-headers drm"> - <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="linux"> - <term><filename class="headerfile">/usr/include/linux/*.h</filename></term> - <listitem> - <para>The Linux API Linux Headers</para> - <indexterm zone="ch-system-linux-headers linux"> - <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="misc"> - <term><filename class="headerfile">/usr/include/misc/*.h</filename></term> - <listitem> - <para>The Linux API Miscellaneous Headers</para> - <indexterm zone="ch-system-linux-headers misc"> - <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mtd"> - <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term> - <listitem> - <para>The Linux API MTD Headers</para> - <indexterm zone="ch-system-linux-headers mtd"> - <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rdma"> - <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term> - <listitem> - <para>The Linux API RDMA Headers</para> - <indexterm zone="ch-system-linux-headers rdma"> - <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="scsi"> - <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term> - <listitem> - <para>The Linux API SCSI Headers</para> - <indexterm zone="ch-system-linux-headers scsi"> - <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sound"> - <term><filename class="headerfile">/usr/include/sound/*.h</filename></term> - <listitem> - <para>The Linux API Sound Headers</para> - <indexterm zone="ch-system-linux-headers sound"> - <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="video"> - <term><filename class="headerfile">/usr/include/video/*.h</filename></term> - <listitem> - <para>The Linux API Video Headers</para> - <indexterm zone="ch-system-linux-headers video"> - <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xen"> - <term><filename class="headerfile">/usr/include/xen/*.h</filename></term> - <listitem> - <para>The Linux API Xen Headers</para> - <indexterm zone="ch-system-linux-headers xen"> - <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/m4.xml b/chapter06/m4.xml index 7fe282ee7..7a28a08cc 100644 --- a/chapter06/m4.xml +++ b/chapter06/m4.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-m4" role="wrap"> +<sect1 id="ch-tools-m4" role="wrap"> <?dbhtml filename="m4.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>M4-&m4-version;</title> - <indexterm zone="ch-system-m4"> + <indexterm zone="ch-tools-m4"> <primary sortas="a-M4">M4</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The M4 package contains a macro processor.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/m4.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&m4-ch6-sbu;</seg> - <seg>&m4-ch6-du;</seg> + <seg>&m4-tmp-sbu;</seg> + <seg>&m4-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -40,64 +43,31 @@ <sect2 role="installation"> <title>Installation of M4</title> - <para>First, make some fixes required by glibc-2.28:</para> + <para>First, make some fixes introduced by glibc-2.28:</para> <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen> <para>Prepare M4 for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-m4" role="content"> - <title>Contents of M4</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - - <seglistitem> - <seg>m4</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="m4"> - <!-- Don't remove the extra space, it prevet a FOP warning. --> - <term><command>m4 </command></term> - <listitem> - <para>Copies the given files while expanding the macros that they - contain [These macros are either built-in or user-defined and can - take any number of arguments. Besides performing macro expansion, - <command>m4</command> has built-in functions for including named - files, running Unix commands, performing integer arithmetic, - manipulating text, recursion, etc. The <command>m4</command> program - can be used either as a front-end to a compiler or as a macro processor - in its own right.]</para> - <indexterm zone="ch-system-m4 m4"> - <primary sortas="b-m4">m4</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in + <xref linkend="contents-m4" role="."/></para> </sect2> diff --git a/chapter06/make.xml b/chapter06/make.xml index 9c649cdc5..cf0dbce18 100644 --- a/chapter06/make.xml +++ b/chapter06/make.xml @@ -4,8 +4,7 @@ <!ENTITY % general-entities SYSTEM "../general.ent"> %general-entities; ]> - -<sect1 id="ch-system-make" role="wrap"> +<sect1 id="ch-tools-make" role="wrap"> <?dbhtml filename="make.html"?> <sect1info condition="script"> @@ -16,22 +15,25 @@ <title>Make-&make-version;</title> - <indexterm zone="ch-system-make"> + <indexterm zone="ch-tools-make"> <primary sortas="a-Make">Make</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Make package contains a program for compiling packages.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/make.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&make-ch6-sbu;</seg> - <seg>&make-ch6-du;</seg> + <seg>&make-tmp-sbu;</seg> + <seg>&make-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -39,60 +41,42 @@ <sect2 role="installation"> <title>Installation of Make</title> -<!-- - <para>Again, work around an error caused by glibc-2.27 and later:</para> -<screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen> ---> <para>Prepare Make for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --without-guile \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> - <para>Compile the package:</para> + <variablelist> + <title>The meaning of the new configure option:</title> -<screen><userinput remap="make">make</userinput></screen> + <varlistentry> + <term><parameter>--without-guile</parameter></term> + <listitem> + <para>Although we are cross-compiling, configure tries to use + guile from the build host if it finds it. This makes compilation + fail, so this switch prevents using it.</para> + </listitem> + </varlistentry> + </variablelist> - <para>The test suite needs to know where supporting perl files are located. - We use an environment variable to accomplish this. To test the - results, issue:</para> + <para>Compile the package:</para> -<screen><userinput remap="test">make check</userinput></screen> +<screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> + <sect2 role="content"> + <title/> - <sect2 id="contents-make" role="content"> - <title>Contents of Make</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - - <seglistitem> - <seg>make</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="make"> - <term><command>make</command></term> - <listitem> - <para>Automatically determines which pieces of a package need to - be (re)compiled and then issues the relevant commands</para> - <indexterm zone="ch-system-make make"> - <primary sortas="b-make">make</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-make" role="."/></para> </sect2> diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index ba5daaec3..0e3646b87 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-ncurses" role="wrap"> +<sect1 id="ch-tools-ncurses" role="wrap"> <?dbhtml filename="ncurses.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Ncurses-&ncurses-version;</title> - <indexterm zone="ch-system-ncurses"> + <indexterm zone="ch-tools-ncurses"> <primary sortas="a-Ncurses">Ncurses</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Ncurses package contains libraries for terminal-independent - handling of character screens.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/ncurses.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&ncurses-ch6-sbu;</seg> - <seg>&ncurses-ch6-du;</seg> + <seg>&ncurses-tmp-sbu;</seg> + <seg>&ncurses-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -41,32 +43,55 @@ <sect2 role="installation"> <title>Installation of Ncurses</title> - <para>Don't install a static library that is not handled by configure:</para> + <para>First, ensure that <command>gawk</command> is found first during configuration:</para> -<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen> +<screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen> + + <para>Then, run the following commands to build the <quote>tic</quote> + program on the build host:</para> + +<screen><userinput remap="pre">mkdir build +pushd build + ../configure + make -C include + make -C progs tic +popd</userinput></screen> <para>Prepare Ncurses for compilation:</para> -<screen arch="default"><userinput remap="configure">./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --with-shared \ - --without-debug \ - --without-normal \ - --enable-pc-files \ +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./config.guess) \ + --mandir=/usr/share/man \ + --with-manpage-format=normal \ + --with-shared \ + --without-debug \ + --without-ada \ + --without-normal \ --enable-widec</userinput></screen> -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --with-shared \ - --without-debug \ - --without-normal \ - --enable-pc-files \ - --enable-widec \ - --with-pkg-config-libdir=/usr/lib/pkgconfig</userinput></screen> <variablelist> <title>The meaning of the new configure options:</title> <varlistentry> + <term><parameter>--with-manpage-format=normal</parameter></term> + <listitem> + <para>This prevents Ncurses installing compressed manual + pages, which may happen if the host distribution itself + has compressed manual pages.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--without-ada</parameter></term> + <listitem> + <para>This ensures that Ncurses does not build support for the Ada + compiler which may be present on the host but will not be available + once we enter the <command>chroot</command> environment.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><parameter>--enable-widec</parameter></term> <listitem> <para>This switch causes wide-character libraries (e.g., <filename @@ -81,14 +106,6 @@ </varlistentry> <varlistentry> - <term><parameter>--enable-pc-files</parameter></term> - <listitem> - <para>This switch generates and installs .pc files for pkg-config. - </para> - </listitem> - </varlistentry> - - <varlistentry> <term><parameter>--without-normal</parameter></term> <listitem> <para>This switch disables building and installing most static libraries. @@ -96,417 +113,111 @@ </listitem> </varlistentry> - <varlistentry arch="ml_32,ml_x32,ml_all"> - <term><parameter>--with-pkg-config-libdir=/usr/lib/pkgconfig</parameter></term> - <listitem> - <para>This switch forces .pc to be installed in /usr/lib/pkgconfig. If - not set, .pc files gets installed in /usr/lib32 even for 64bit binaries. - </para> - </listitem> - </varlistentry> - </variablelist> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>This package has a test suite, but it can only be run after the - package has been installed. The tests reside in the - <filename class="directory">test/</filename> directory. See the - <filename>README</filename> file in that directory for further details. - </para> - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> +<!-- TODO: check and document --> +<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install +ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen> <para>Move the shared libraries to the <filename class="directory">/lib</filename> directory, where they are expected to reside:</para> -<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen> <para>Because the libraries have been moved, one symlink points to a non-existent file. Recreate it:</para> -<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen> - - <para>Many applications still expect the linker to be able to find - non-wide-character Ncurses libraries. Trick such applications into linking with - wide-character libraries by means of symlinks and linker scripts:</para> - -<screen><userinput remap="install">for lib in ncurses form panel menu ; do - rm -vf /usr/lib/lib${lib}.so - echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so - ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc -done</userinput></screen> - - <para>Finally, make sure that old applications that look for - <filename class="libraryfile">-lcurses</filename> at build time are still - buildable:</para> - -<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so -echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so -ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen> - - <para>If desired, install the Ncurses documentation:</para> - -<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version; -cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen> - - <note> - <para>The instructions above don't create non-wide-character Ncurses - libraries since no package installed by compiling from sources would link - against them at runtime. However, the only known binary-only - applications that link against non-wide-character Ncurses libraries - require version 5. If you must have such libraries because of some binary-only - application or to be compliant with LSB, build the package again with the - following commands:</para> - -<screen><userinput remap="install">make distclean -./configure --prefix=/usr \ - --with-shared \ - --without-normal \ - --without-debug \ - --without-cxx-binding \ - --with-abi-version=5 -make sources libs -cp -av lib/lib*.so.5* /usr/lib</userinput></screen> - - </note> +<screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Ncurses - 32-bit</title> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all"> + <title>Building Ncurses - 32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Ncurses for compilation:</para> + <para>Prepare Ncurses for compilation:</para> -<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ - ./configure --prefix=/usr \ - --libdir=/usr/lib32 \ - --mandir=/usr/share/man \ - --with-shared \ - --without-debug \ - --without-normal \ - --enable-pc-files \ - --enable-widec \ - --host=i686-pc-linux-gnu \ - --with-pkg-config-libdir=/usr/lib32/pkgconfig</userinput></screen> +<screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \ +CXX="$LFS_TGT-g++ -m32" \ +./configure --prefix=/usr \ + --host=$LFS_TGT32 \ + --libdir=&usr-lib-m32; \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --enable-pc-files \ + --enable-widec \ + --with-pkg-config-libdir=&usr-lib-m32;/pkgconfig</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">make -j1</userinput></screen> +<screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -for lib in ncurses form panel menu ; do - rm -vf DESTDIR/usr/lib32/lib${lib}.so - echo "INPUT(-l${lib}w)" > DESTDIR/usr/lib32/lib${lib}.so - ln -svf ${lib}w.pc DESTDIR/usr/lib32/pkgconfig/$lib.pc -done -rm -vf DESTDIR/usr/lib32/libcursesw.so -echo "INPUT(-lncursesw)" > DESTDIR/usr/lib32/libcursesw.so -ln -sfv libncurses.so DESTDIR/usr/lib32/libcurses.so -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install +ln -s libncursesw.so DESTDIR&usr-lib-m32;/libcursesw.so +cp -Rv DESTDIR&usr-lib-m32;/* $LFS&usr-lib-m32; rm -rf DESTDIR</userinput></screen> - <para>If desired, make the version 5 libraries in 32bit as well:</para> + </sect2><!-- m32 --> -<screen><userinput remap="install">make distclean -CC="gcc -m32" CXX="g++ -m32" \ - ./configure --prefix=/usr \ - --with-shared \ - --without-normal \ - --without-debug \ - --without-cxx-binding \ - --with-abi-version=5 \ - --host=i686-pc-linux-gnu -make -j1 sources libs -cp -av lib/lib*.so.5* /usr/lib32</userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Ncurses - x32-bit</title> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_x32,ml_all"> + <title>Building Ncurses - x32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Ncurses for compilation:</para> + <para>Prepare Ncurses for compilation:</para> -<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \ - ./configure --prefix=/usr \ - --libdir=/usr/libx32 \ - --mandir=/usr/share/man \ - --with-shared \ - --without-debug \ - --without-normal \ - --enable-pc-files \ - --enable-widec \ - --host=x86_64-pc-linux-gnux32 \ - --with-pkg-config-libdir=/usr/libx32/pkgconfig</userinput></screen> +<screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \ +CXX="$LFS_TGT-g++ -mx32" \ +./configure --prefix=/usr \ + --host=$LFS_TGTX32 \ + --libdir=&usr-lib-mx32; \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --enable-pc-files \ + --enable-widec \ + --with-pkg-config-libdir=&usr-lib-mx32;/pkgconfig</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">make -j1</userinput></screen> +<screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -for lib in ncurses form panel menu ; do - rm -vf DESTDIR/usr/libx32/lib${lib}.so - echo "INPUT(-l${lib}w)" > DESTDIR/usr/libx32/lib${lib}.so - ln -svf ${lib}w.pc DESTDIR/usr/libx32/pkgconfig/$lib.pc -done -rm -vf DESTDIR/usr/libx32/libcursesw.so -echo "INPUT(-lncursesw)" > DESTDIR/usr/libx32/libcursesw.so -ln -sfv libncurses.so DESTDIR/usr/libx32/libcurses.so -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install +ln -s libncursesw.so DESTDIR&usr-lib-mx32;/libcursesw.so +cp -Rv DESTDIR&usr-lib-mx32;/* $LFS&usr-lib-mx32; rm -rf DESTDIR</userinput></screen> -<!-- Any package out there which still needs version 5? - Leave it out for x32bit for now. - - <para>If desired, make the version 5 libraries in x32bit as well:</para> - -<screen><userinput remap="install">make distclean -CC="gcc -mx32" CXX="g++ -mx32" \ - ./configure - -prefix=/usr \ - - -with-shared \ - - -without-normal \ - - -without-debug \ - - -without-cxx-binding \ - - -with-abi-version=5 -make -j1 sources libs -cp -av lib/lib*.so.5* /usr/libx32</userinput></screen> ---> - </sect2> - - <sect2 id="contents-ncurses" role="content"> - <title>Contents of Ncurses</title> + </sect2><!-- mx32 --> - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg> - captoinfo (link to tic), - clear, - infocmp, - infotocap (link to tic), - ncursesw6-config, - reset (link to tset), - tabs, - tic, - toe, - tput, and - tset - </seg> - <seg> - libcursesw.so (symlink and linker script to libncursesw.so), - libformw.so, - libmenuw.so, - libncursesw.so, - libncurses++w.a, - libpanelw.so, and their non-wide-character counterparts without "w" - in the library names.</seg> - <seg> - /usr/share/tabset, - /usr/share/terminfo, and - /usr/share/doc/ncurses-&ncurses-version; - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="captoinfo"> - <term><command>captoinfo</command></term> - <listitem> - <para>Converts a termcap description into a terminfo description</para> - <indexterm zone="ch-system-ncurses captoinfo"> - <primary sortas="b-captoinfo">captoinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="clear"> - <term><command>clear</command></term> - <listitem> - <para>Clears the screen, if possible</para> - <indexterm zone="ch-system-ncurses clear"> - <primary sortas="b-clear">clear</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="infocmp"> - <term><command>infocmp</command></term> - <listitem> - <para>Compares or prints out terminfo descriptions</para> - <indexterm zone="ch-system-ncurses infocmp"> - <primary sortas="b-infocmp">infocmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="infotocap"> - <term><command>infotocap</command></term> - <listitem> - <para>Converts a terminfo description into a termcap description</para> - <indexterm zone="ch-system-ncurses infotocap"> - <primary sortas="b-infotocap">infotocap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ncursesw6-config"> - <term><command>ncursesw6-config</command></term> - <listitem> - <para>Provides configuration information for ncurses</para> - <indexterm zone="ch-system-ncurses ncursesw6-config"> - <primary sortas="b-ncursesw6-config">ncursesw6-config</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="reset"> - <term><command>reset</command></term> - <listitem> - <para>Reinitializes a terminal to its default values</para> - <indexterm zone="ch-system-ncurses reset"> - <primary sortas="b-reset">reset</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tabs"> - <term><command>tabs</command></term> - <listitem> - <para>Clears and sets tab stops on a terminal</para> - <indexterm zone="ch-system-ncurses tabs"> - <primary sortas="b-tabs">tabs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tic"> - <term><command>tic</command></term> - <listitem> - <para>The terminfo entry-description compiler that translates a - terminfo file from source format into the binary format needed for the - ncurses library routines [A terminfo file contains information on the - capabilities of a certain terminal.]</para> - <indexterm zone="ch-system-ncurses tic"> - <primary sortas="b-tic">tic</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="toe"> - <term><command>toe</command></term> - <listitem> - <para>Lists all available terminal types, giving the primary name and - description for each</para> - <indexterm zone="ch-system-ncurses toe"> - <primary sortas="b-toe">toe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tput"> - <term><command>tput</command></term> - <listitem> - <para>Makes the values of terminal-dependent capabilities available to - the shell; it can also be used to reset or initialize a terminal or - report its long name</para> - <indexterm zone="ch-system-ncurses tput"> - <primary sortas="b-tput">tput</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tset"> - <term><command>tset</command></term> - <listitem> - <para>Can be used to initialize terminals</para> - <indexterm zone="ch-system-ncurses tset"> - <primary sortas="b-tset">tset</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcursesw"> - <term><filename class="libraryfile">libcursesw</filename></term> - <listitem> - <para>A link to <filename>libncursesw</filename></para> - <indexterm zone="ch-system-ncurses libcursesw"> - <primary sortas="c-libcursesw">libcursesw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libncursesw"> - <term><filename class="libraryfile">libncursesw</filename></term> - <listitem> - <para>Contains functions to display text in many complex ways on a - terminal screen; a good example of the use of these functions is the - menu displayed during the kernel's <command>make - menuconfig</command></para> - <indexterm zone="ch-system-ncurses libncursesw"> - <primary sortas="c-libncursesw">libncursesw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libformw"> - <term><filename class="libraryfile">libformw</filename></term> - <listitem> - <para>Contains functions to implement forms</para> - <indexterm zone="ch-system-ncurses libformw"> - <primary sortas="c-libformw">libformw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libmenuw"> - <term><filename class="libraryfile">libmenuw</filename></term> - <listitem> - <para>Contains functions to implement menus</para> - <indexterm zone="ch-system-ncurses libmenuw"> - <primary sortas="c-libmenuw">libmenuw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libpanelw"> - <term><filename class="libraryfile">libpanelw</filename></term> - <listitem> - <para>Contains functions to implement panels</para> - <indexterm zone="ch-system-ncurses libpanelw"> - <primary sortas="c-libpanelw">libpanelw</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-ncurses" role="."/></para> </sect2> diff --git a/chapter06/patch.xml b/chapter06/patch.xml index 6c6c6852b..7032d6eea 100644 --- a/chapter06/patch.xml +++ b/chapter06/patch.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-patch" role="wrap"> +<sect1 id="ch-tools-patch" role="wrap"> <?dbhtml filename="patch.html"?> <sect1info condition="script"> @@ -16,24 +16,25 @@ <title>Patch-&patch-version;</title> - <indexterm zone="ch-system-patch"> + <indexterm zone="ch-tools-patch"> <primary sortas="a-Patch">Patch</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Patch package contains a program for modifying or creating files - by applying a <quote>patch</quote> file typically created by the - <command>diff</command> program.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/patch.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&patch-ch6-sbu;</seg> - <seg>&patch-ch6-du;</seg> + <seg>&patch-tmp-sbu;</seg> + <seg>&patch-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -44,52 +45,25 @@ <para>Prepare Patch for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-patch" role="content"> - <title>Contents of Patch</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - - <seglistitem> - <seg>patch</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="patch"> - <term><command>patch</command></term> - <listitem> - <para>Modifies files according to a patch file [A patch file is - normally a difference listing created with the <command>diff</command> - program. By applying these differences to the original files, - <command>patch</command> creates the patched versions.]</para> - <indexterm zone="ch-system-patch patch"> - <primary sortas="b-patch">patch</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-patch" role="."/></para> </sect2> diff --git a/chapter06/sed.xml b/chapter06/sed.xml index 71bfc245f..d079f836d 100644 --- a/chapter06/sed.xml +++ b/chapter06/sed.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-sed" role="wrap"> +<sect1 id="ch-tools-sed" role="wrap"> <?dbhtml filename="sed.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Sed-&sed-version;</title> - <indexterm zone="ch-system-sed"> + <indexterm zone="ch-tools-sed"> <primary sortas="a-Sed">Sed</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Sed package contains a stream editor.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/sed.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> - <segtitle>&buildtime;</segtitle> + <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&sed-ch6-sbu;</seg> - <seg>&sed-ch6-du;</seg> + <seg>&sed-tmp-sbu;</seg> + <seg>&sed-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -40,61 +43,27 @@ <sect2 role="installation"> <title>Installation of Sed</title> - <para>First fix an issue in the LFS environment:</para> - -<screen><userinput remap="pre">sed -i 's/usr/tools/' build-aux/help2man</userinput></screen> - <para>Prepare Sed for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> - - <para>Compile the package and generate the HTML documentation:</para> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --bindir=/bin</userinput></screen> -<screen><userinput remap="make">make -make html</userinput></screen> + <para>Compile the package:</para> - <para>To test the results, issue:</para> +<screen><userinput remap="make">make</userinput></screen> -<screen><userinput remap="test">chown -Rv tester . -su tester -c "PATH=$PATH make check"</userinput></screen> + <para>Install the package:</para> - <para>Install the package and its documentation:</para> - -<screen><userinput remap="install">make install -install -d -m755 /usr/share/doc/sed-&sed-version; -install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-sed" role="content"> - <title>Contents of Sed</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>sed</seg> - <seg>/usr/share/doc/sed-&sed-version;</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="sed"> - <term><command>sed</command></term> - <listitem> - <para>Filters and transforms text files in a single pass</para> - <indexterm zone="ch-system-sed sed"> - <primary sortas="b-sed">sed</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-sed" role="."/></para> </sect2> diff --git a/chapter06/tar.xml b/chapter06/tar.xml index d148c4695..8a82cff5c 100644 --- a/chapter06/tar.xml +++ b/chapter06/tar.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-tar" role="wrap"> +<sect1 id="ch-tools-tar" role="wrap"> <?dbhtml filename="tar.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Tar-&tar-version;</title> - <indexterm zone="ch-system-tar"> + <indexterm zone="ch-tools-tar"> <primary sortas="a-Tar">Tar</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Tar package contains an archiving program.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/tar.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&tar-ch6-sbu;</seg> - <seg>&tar-ch6-du;</seg> + <seg>&tar-tmp-sbu;</seg> + <seg>&tar-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -42,74 +45,25 @@ <para>Prepare Tar for compilation:</para> -<screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 \ -./configure --prefix=/usr \ +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ --bindir=/bin</userinput></screen> - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> - <listitem> - <para>This forces the test for <function>mknod</function> to be run - as root. It is generally considered dangerous to run this test as - the root user, but as it is being run on a system that has only been - partially built, overriding it is OK.</para> - </listitem> - </varlistentry> - </variablelist> - <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results (about 3 SBU), issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - -<!-- Seems to pass for version 1.31. Keeping as a comment just in case... - <para>One test, link mismatch, is known to fail.</para> ---> - <para>Install the package:</para> -<screen><userinput remap="install">make install -make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> + <sect2 role="content"> + <title/> - <sect2 id="contents-tar" role="content"> - <title>Contents of Tar</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>tar</seg> - <seg>/usr/share/doc/tar-&tar-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="tar"> - <term><command>tar</command></term> - <listitem> - <para>Creates, extracts files from, and lists the contents of archives, - also known as tarballs</para> - <indexterm zone="ch-system-tar tar"> - <primary sortas="b-tar">tar</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in <xref linkend="contents-tar" role="."/></para> </sect2> diff --git a/chapter06/xz.xml b/chapter06/xz.xml index 79081bbb1..f8d397d1b 100644 --- a/chapter06/xz.xml +++ b/chapter06/xz.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-xz" role="wrap"> +<sect1 id="ch-tools-xz" role="wrap"> <?dbhtml filename="xz.html"?> <sect1info condition="script"> @@ -16,26 +16,25 @@ <title>Xz-&xz-version;</title> - <indexterm zone="ch-system-xz"> + <indexterm zone="ch-tools-xz"> <primary sortas="a-xz">Xz</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Xz package contains programs for compressing and decompressing - files. It provides capabilities for the lzma and the newer xz compression - formats. Compressing text files with <command>xz</command> yields a better - compression percentage than with the traditional <command>gzip</command> or - <command>bzip2</command> commands.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/xz.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&xz-ch6-sbu;</seg> - <seg>&xz-ch6-du;</seg> + <seg>&xz-tmp-sbu;</seg> + <seg>&xz-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -44,378 +43,33 @@ <sect2 role="installation"> <title>Installation of Xz</title> - <para>Prepare Xz for compilation with:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package and make sure that all essential files are in the - correct directory:</para> - -<screen><userinput remap="install">make install -mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin -mv -v /usr/lib/liblzma.so.* /lib -ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen> - - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Xz - 32-bit</title> - - <para>Clean previous build:</para> - -<screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Xz for compilation:</para> -<screen><userinput remap="configure">CC="gcc -m32" ./configure \ - --prefix=/usr \ - --disable-static \ - --libdir=/usr/lib32 \ - --host=i686-pc-linux-gnu</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ + --disable-static \ + --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen> - <para>Compile the package:</para> + <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 -rm -rf DESTDIR</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> - - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Xz - x32-bit</title> - - <para>Clean previous build:</para> - -<screen><userinput remap="pre">make distclean</userinput></screen> + <para>Make sure that all essential files are in the correct directory:</para> - <para>Prepare Xz for compilation:</para> - -<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ - --prefix=/usr \ - --disable-static \ - --libdir=/usr/libx32 \ - --host=x86_64-pc-linux-gnux32</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 -rm -rf DESTDIR</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} $LFS/bin +mv -v $LFS/usr/lib/liblzma.so.* $LFS/lib +ln -svf ../../lib/$(readlink $LFS/usr/lib/liblzma.so) $LFS/usr/lib/liblzma.so</userinput></screen> </sect2> - <sect2 id="contents-xz" role="content"> - <title>Contents of Xz</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg> - lzcat (link to xz), - lzcmp (link to xzdiff), - lzdiff (link to xzdiff), - lzegrep (link to xzgrep), - lzfgrep (link to xzgrep), - lzgrep (link to xzgrep), - lzless (link to xzless), - lzma (link to xz), - lzmadec, - lzmainfo, - lzmore (link to xzmore), - unlzma (link to xz), - unxz (link to xz), - xz, - xzcat (link to xz), - xzcmp (link to xzdiff), - xzdec, - xzdiff, - xzegrep (link to xzgrep), - xzfgrep (link to xzgrep), - xzgrep, - xzless, and - xzmore</seg> - <seg> - liblzma.so - </seg> - <seg> - /usr/include/lzma and - /usr/share/doc/xz-&xz-version; - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="lzcat"> - <term><command>lzcat</command></term> - <listitem> - <para>Decompresses to standard output</para> - <indexterm zone="ch-system-xz lzcat"> - <primary sortas="b-lzcat">lzcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzcmp"> - <term><command>lzcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzcmp"> - <primary sortas="b-lzcmp">lzcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzdiff"> - <term><command>lzdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzdiff"> - <primary sortas="b-lzdiff">lzdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzegrep"> - <term><command>lzegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzegrep"> - <primary sortas="b-lzegrep">lzegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzfgrep"> - <term><command>lzfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzfgrep"> - <primary sortas="b-lzfgrep">lzfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzgrep"> - <term><command>lzgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzgrep"> - <primary sortas="b-lzgrep">lzgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzless"> - <term><command>lzless</command></term> - <listitem> - <para>Runs <command>less</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzless"> - <primary sortas="b-lzless">lzless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzma"> - <term><command>lzma</command></term> - <listitem> - <para>Compresses or decompresses files using the LZMA format</para> - <indexterm zone="ch-system-xz lzma"> - <primary sortas="b-lzma">lzma</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzmadec"> - <term><command>lzmadec</command></term> - <listitem> - <para>A small and fast decoder for LZMA compressed files</para> - <indexterm zone="ch-system-xz lzmadec"> - <primary sortas="b-lzmadec">lzmadec</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzmainfo"> - <term><command>lzmainfo</command></term> - <listitem> - <para>Shows information stored in the LZMA compressed file header</para> - <indexterm zone="ch-system-xz lzmainfo"> - <primary sortas="b-lzmainfo">lzmainfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzmore"> - <term><command>lzmore</command></term> - <listitem> - <para>Runs <command>more</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzmore"> - <primary sortas="b-lzmamore">lzmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unlzma"> - <term><command>unlzma</command></term> - <listitem> - <para>Decompresses files using the LZMA format</para> - <indexterm zone="ch-system-xz unlzma"> - <primary sortas="b-unlzma">unlzma</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unxz"> - <term><command>unxz</command></term> - <listitem> - <para>Decompresses files using the XZ format</para> - <indexterm zone="ch-system-xz unxz"> - <primary sortas="b-unxz">unxz</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xz"> - <term><command>xz</command></term> - <listitem> - <para>Compresses or decompresses files using the XZ format</para> - <indexterm zone="ch-system-xz xz"> - <primary sortas="b-xz">xz</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzcat"> - <term><command>xzcat</command></term> - <listitem> - <para>Decompresses to standard output</para> - <indexterm zone="ch-system-xz xzcat"> - <primary sortas="b-xzcat">xzcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzcmp"> - <term><command>xzcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzcmp"> - <primary sortas="b-xzcmp">xzcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzdec"> - <term><command>xzdec</command></term> - <listitem> - <para>A small and fast decoder for XZ compressed files</para> - <indexterm zone="ch-system-xz xzdec"> - <primary sortas="b-xzdec">xzdec</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzdiff"> - <term><command>xzdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzdiff"> - <primary sortas="b-xzdiff">xzdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzegrep"> - <term><command>xzegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzegrep"> - <primary sortas="b-xzegrep">xzegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzfgrep"> - <term><command>xzfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzfgrep"> - <primary sortas="b-xzfgrep">xzfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzgrep"> - <term><command>xzgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzgrep"> - <primary sortas="b-xzgrep">xzgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzless"> - <term><command>xzless</command></term> - <listitem> - <para>Runs <command>less</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzless"> - <primary sortas="b-xzless">xzless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzmore"> - <term><command>xzmore</command></term> - <listitem> - <para>Runs <command>more</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzmore"> - <primary sortas="b-xzmore">xzmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="liblzma"> - <term><filename class="libraryfile">liblzma</filename></term> - <listitem> - <para>The library implementing lossless, block-sorting data - compression, using the Lempel-Ziv-Markov chain algorithm</para> - <indexterm zone="ch-system-xz liblzma"> - <primary sortas="c-liblzma">liblzma</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in <xref linkend="contents-xz" role="."/></para> </sect2> diff --git a/chapter05/bison.xml b/chapter07/bison.xml index 98c8cdc35..a3718bf19 100644 --- a/chapter05/bison.xml +++ b/chapter07/bison.xml @@ -25,7 +25,7 @@ <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/bison.xml" + href="../chapter08/bison.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bison-ch5-sbu;</seg> - <seg>&bison-ch5-du;</seg> + <seg>&bison-tmp-sbu;</seg> + <seg>&bison-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -45,15 +45,25 @@ <para>Prepare Bison for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen> - <para>Compile the package:</para> + <variablelist> + <title>The meaning of the new configure option:</title> -<screen><userinput remap="make">make</userinput></screen> + <varlistentry> + <term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term> + <listitem> + <para>This tells the build system to install bison documentation + into a versioned directory.</para> + </listitem> + </varlistentry> - <para>To test the results, issue:</para> + </variablelist> -<screen><userinput remap="test">make check</userinput></screen> + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> diff --git a/chapter07/changingowner.xml b/chapter07/changingowner.xml new file mode 100644 index 000000000..78a987722 --- /dev/null +++ b/chapter07/changingowner.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-changingowner"> + <?dbhtml filename="changingowner.html"?> + + <title>Changing Ownership</title> + + <note> + <para>The commands in the remainder of this book must be performed while + logged in as user <systemitem class="username">root</systemitem> and no + longer as user <systemitem class="username">lfs</systemitem>. Also, double + check that <envar>$LFS</envar> is set in <systemitem + class="username">root</systemitem>'s environment.</para> + </note> + + <para>Currently, the whole directory hierarchy in <filename + class="directory">$LFS</filename> + is owned by the user <systemitem class="username">lfs</systemitem>, a user + that exists only on the host system. If the directories and files under <filename + class="directory">$LFS</filename> are kept as they are, they will be + owned by a user ID without a corresponding account. This is dangerous because + a user account created later could get this same user ID and would own all + the files under <filename class="directory">$LFS</filename>, thus exposing + these files to possible malicious manipulation.</para> + + <para>To address this issue, change the + ownership of the <filename class="directory">$LFS/*</filename> directories to + user <systemitem class="username">root</systemitem> by running the following + command:</para> + +<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} +case $(uname -m) in + x86_64) chown -R root:root $LFS/lib64 ;; +esac</userinput></screen> + + <para arch="ml_32,ml_x32,ml_all">Some more directories exists for + multilib support. Change their ownership, too:</para> +<screen arch="ml_32,ml_x32,ml_all"><userinput arch="ml_32,ml_all">chown -R root:root $LFS&lib-m32;</userinput> +<userinput arch="ml_x32,ml_all">chown -R root:root $LFS&lib-mx32;</userinput></screen> + +</sect1> diff --git a/chapter07/chapter07.xml b/chapter07/chapter07.xml index b745594da..aba235220 100644 --- a/chapter07/chapter07.xml +++ b/chapter07/chapter07.xml @@ -5,39 +5,32 @@ %general-entities; ]> -<chapter id="chapter-config" xreflabel="Chapter 7"> +<chapter id="chapter-chroot-temporary-tools" xreflabel="Chapter 7"> <?dbhtml dir="chapter07"?> <?dbhtml filename="chapter07.html"?> - <title>System Configuration</title> + <title>Entering Chroot and Building Additional Temporary Tools</title> - <!-- sysv --> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts.xml"/> - - <!-- systemd --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introductiond.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="networkd.xml"/> - - <!-- common --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinks.xml"/> - - <!-- sysv --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="profile.xml"/> - - <!-- systemd --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="clock.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="consoled.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="locale.xml"/> - - <!-- common --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="etcshells.xml"/> - - <!-- systemd --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd-custom.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++-pass2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> + +<!-- + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/> +--> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/> </chapter> diff --git a/chapter06/chroot.xml b/chapter07/chroot.xml index c4a66bf00..7f85a73e8 100644 --- a/chapter06/chroot.xml +++ b/chapter07/chroot.xml @@ -5,22 +5,25 @@ %general-entities; ]> -<sect1 id="ch-system-chroot"> +<sect1 id="ch-tools-chroot"> <?dbhtml filename="chroot.html"?> <title>Entering the Chroot Environment</title> - <para>It is time to enter the chroot environment to begin building and - installing the final LFS system. As user <systemitem + <para>Now that all the packages which are required to build the rest of the + needed tools are on the system, it is time to enter the chroot environment to + finish installing the remaining temporary tools. This environment will be in + use also for installing the final system. As user <systemitem class="username">root</systemitem>, run the following command to enter the - realm that is, at the moment, populated with only the temporary tools:</para> + environment that is, at the moment, populated with only the temporary + tools:</para> -<screen role="nodump"><userinput>chroot "$LFS" /tools/bin/env -i \ +<screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i \ HOME=/root \ TERM="$TERM" \ PS1='(lfs chroot) \u:\w\$ ' \ - PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ - /tools/bin/bash --login +h</userinput></screen> + PATH=/bin:/usr/bin:/sbin:/usr/sbin \ + /bin/bash --login +h</userinput></screen> <para>The <parameter>-i</parameter> option given to the <command>env</command> command will clear all variables of the chroot environment. After that, only @@ -29,19 +32,19 @@ <parameter>TERM=$TERM</parameter> construct will set the <envar>TERM</envar> variable inside chroot to the same value as outside chroot. This variable is needed for programs like <command>vim</command> and <command>less</command> - to operate properly. If other variables are needed, such as + to operate properly. If other variables are desired, such as <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set them again.</para> <para>From this point on, there is no need to use the - <envar>LFS</envar> variable anymore, because all work will be restricted + <envar>LFS</envar> variable anymore because all work will be restricted to the LFS file system. This is because the Bash shell is told that <filename class="directory">$LFS</filename> is now the root (<filename class="directory">/</filename>) directory.</para> - <para>Notice that <filename class="directory">/tools/bin</filename> comes last - in the <envar>PATH</envar>. This means that a temporary tool will no longer be - used once its final version is installed. This occurs when the shell does not + <para>Notice that <filename class="directory">/tools/bin</filename> is not + in the <envar>PATH</envar>. This means that the cross toolchain will no longer be + used in the chroot environment. This occurs when the shell does not <quote>remember</quote> the locations of executed binaries—for this reason, hashing is switched off by passing the <parameter>+h</parameter> option to <command>bash</command>.</para> @@ -55,8 +58,8 @@ chapter and the following chapters are run from within the chroot environment. If you leave this environment for any reason (rebooting for example), ensure that the virtual kernel filesystems are mounted as - explained in <xref linkend="ch-system-bindmount"/> and <xref - linkend="ch-system-kernfsmount"/> and enter chroot again before continuing + explained in <xref linkend="ch-tools-bindmount"/> and <xref + linkend="ch-tools-kernfsmount"/> and enter chroot again before continuing with the installation.</para> </note> diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml new file mode 100644 index 000000000..c81ec9b1c --- /dev/null +++ b/chapter07/createfiles.xml @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-createfiles"> + <?dbhtml filename="createfiles.html"?> + + <title>Creating Essential Files and Symlinks</title> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/etc/passwd">/etc/passwd</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/etc/group">/etc/group</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/log/btmp">/var/log/btmp</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary> + </indexterm> + + <para>Historically, Linux maintains a list of the mounted file systems in the + file <filename>/etc/mtab</filename>. Modern kernels maintain this list + internally and exposes it to the user via the <filename + class="directory">/proc</filename> filesystem. To satisfy utilities that + expect the presence of <filename>/etc/mtab</filename>, create the following + symbolic link:</para> + +<screen><userinput>ln -sv /proc/self/mounts /etc/mtab</userinput></screen> + + <para>Create a basic <filename>/etc/hosts</filename> file to be + referenced in some test suites, and in one of Perl's configuration files + as well:</para> + +<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> + + <para>In order for user <systemitem class="username">root</systemitem> to be + able to login and for the name <quote>root</quote> to be recognized, there + must be relevant entries in the <filename>/etc/passwd</filename> and + <filename>/etc/group</filename> files.</para> + + <para>Create the <filename>/etc/passwd</filename> file by running the following + command:</para> + +<screen revision="sysv"><userinput>cat > /etc/passwd << "EOF" +<literal>root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/bin/false +daemon:x:6:6:Daemon User:/dev/null:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> +EOF</userinput></screen> + +<screen revision="systemd"><userinput>cat > /etc/passwd << "EOF" +<literal>root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/bin/false +daemon:x:6:6:Daemon User:/dev/null:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false +systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false +systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false +systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false +systemd-network:x:76:76:systemd Network Management:/:/bin/false +systemd-resolve:x:77:77:systemd Resolver:/:/bin/false +systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false +systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false +nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> +EOF</userinput></screen> + + <para>The actual password for <systemitem class="username">root</systemitem> + will be set later.</para> + + <para>Create the <filename>/etc/group</filename> file by running the following + command:</para> + +<screen revision="sysv"><userinput>cat > /etc/group << "EOF" +<literal>root:x:0: +bin:x:1:daemon +sys:x:2: +kmem:x:3: +tape:x:4: +tty:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +usb:x:14: +cdrom:x:15: +adm:x:16: +messagebus:x:18: +input:x:24: +mail:x:34: +kvm:x:61: +wheel:x:97: +nogroup:x:99: +users:x:999:</literal> +EOF</userinput></screen> + +<screen revision="systemd"><userinput>cat > /etc/group << "EOF" +<literal>root:x:0: +bin:x:1:daemon +sys:x:2: +kmem:x:3: +tape:x:4: +tty:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +usb:x:14: +cdrom:x:15: +adm:x:16: +messagebus:x:18: +systemd-journal:x:23: +input:x:24: +mail:x:34: +kvm:x:61: +systemd-bus-proxy:x:72: +systemd-journal-gateway:x:73: +systemd-journal-remote:x:74: +systemd-journal-upload:x:75: +systemd-network:x:76: +systemd-resolve:x:77: +systemd-timesync:x:78: +systemd-coredump:x:79: +wheel:x:97: +nogroup:x:99: +users:x:999:</literal> +EOF</userinput></screen> + + <para>The created groups are not part of any standard—they are groups + decided on in part by the requirements of the Udev configuration in Chapter + 9, and in part by common convention employed by a number of existing Linux + distributions. In addition, some test suites rely on specific users or + groups. The Linux Standard Base (LSB, available at <ulink + url="http://refspecs.linuxfoundation.org/lsb.shtml"/>) only recommends that, + besides the group <systemitem class="groupname">root</systemitem> with a + Group ID (GID) of 0, a group <systemitem class="groupname">bin</systemitem> + with a GID of 1 be present. All other group names and GIDs can be chosen + freely by the system administrator since well-written programs do not depend + on GID numbers, but rather use the group's name.</para> + + <para>Some tests in <xref linkend="chapter-building-system"/> need a regular + user. We add this user here and delete this account at the end of that + chapter.</para> + +<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd +echo "tester:x:101:" >> /etc/group +install -o tester -d /home/tester</userinput></screen> + + <para>To remove the <quote>I have no name!</quote> prompt, start a new + shell. Since the + <filename>/etc/passwd</filename> and <filename>/etc/group</filename> + files have been created, user name and group name resolution will now + work:</para> + +<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> + + <para>Note the use of the <parameter>+h</parameter> directive. This tells + <command>bash</command> not to use its internal path hashing. Without this + directive, <command>bash</command> would remember the paths to binaries it has + executed. To ensure the use of the newly compiled binaries as soon as they are + installed, the <parameter>+h</parameter> directive will be used for the duration + of this and the next chapter.</para> + + <para>The <command>login</command>, <command>agetty</command>, and + <command>init</command> programs (and others) use a number of log + files to record information such as who was logged into the system and + when. However, these programs will not write to the log files if they + do not already exist. Initialize the log files and give them + proper permissions:</para> + +<screen><userinput>touch /var/log/{btmp,lastlog,faillog,wtmp} +chgrp -v utmp /var/log/lastlog +chmod -v 664 /var/log/lastlog +chmod -v 600 /var/log/btmp</userinput></screen> + + <para>The <filename>/var/log/wtmp</filename> file records all logins and + logouts. The <filename>/var/log/lastlog</filename> file records when each + user last logged in. The <filename>/var/log/faillog</filename> file records + failed login attempts. The <filename>/var/log/btmp</filename> file records + the bad login attempts.</para> + + <note><para>The <filename>/run/utmp</filename> file records the users that + are currently logged in. This file is created dynamically in the boot + scripts.</para></note> + +</sect1> diff --git a/chapter06/creatingdirs.xml b/chapter07/creatingdirs.xml index 5dc9c5e80..7e843aeff 100644 --- a/chapter06/creatingdirs.xml +++ b/chapter07/creatingdirs.xml @@ -5,37 +5,30 @@ %general-entities; ]> -<sect1 id="ch-system-creatingdirs"> +<sect1 id="ch-tools-creatingdirs"> <?dbhtml filename="creatingdirs.html"?> <title>Creating Directories</title> - <para>It is time to create some structure in the LFS file system. Create a - standard directory tree by issuing the following commands:</para> + <para>It is time to create the full structure in the LFS file system. Create + a standard directory tree by issuing the following commands:</para> <screen><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt} -mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} -install -dv -m 0750 /root -install -dv -m 1777 /tmp /var/tmp +mkdir -pv /{media/{floppy,cdrom},srv,var} mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} -mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo} -mkdir -v /usr/libexec +mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} mkdir -pv /usr/{,local/}share/man/man{1..8} -mkdir -v /usr/lib/pkgconfig - -case $(uname -m) in - x86_64) mkdir -v /lib64 ;; -esac +install -dv -m 1777 /tmp /var/tmp +install -dv -m 0750 /root mkdir -v /var/{log,mail,spool} ln -sv /run /var/run ln -sv /run/lock /var/lock mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local}</userinput></screen> -<screen arch="ml_32,mlx32,ml_all"><userinput arch="ml_32,ml_all">mkdir -pv /usr/lib32 -install -vdm755 /usr/lib32/pkgconfig</userinput> -<userinput arch="ml_x32,ml_all">mkdir -pv /usr/libx32 -install -vdm755 /usr/libx32/pkgconfig</userinput></screen> + + <para arch="ml_32,ml_x32,ml_all">Required directories for multilib + support has already been created while previous installation steps.</para> <para>Directories are, by default, created with permission mode 755, but this is not desirable for all directories. In the commands above, two diff --git a/chapter05/gettext.xml b/chapter07/gettext.xml index ff064cb7e..12a8b5cfd 100644 --- a/chapter05/gettext.xml +++ b/chapter07/gettext.xml @@ -25,7 +25,7 @@ <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/gettext.xml" + href="../chapter08/gettext.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gettext-ch5-sbu;</seg> - <seg>&gettext-ch5-du;</seg> + <seg>&gettext-tmp-sbu;</seg> + <seg>&gettext-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -52,16 +52,7 @@ <variablelist> <title>The meaning of the configure option:</title> -<!-- - <varlistentry> - <term><parameter>EMACS="no"</parameter></term> - <listitem> - <para>This prevents the configure script from determining where to - install Emacs Lisp files as the test is known to hang on some hosts. - </para> - </listitem> - </varlistentry> ---> + <varlistentry> <term><parameter>--disable-shared</parameter></term> <listitem> @@ -76,22 +67,17 @@ <screen><userinput remap="make">make</userinput></screen> - <para> - Due to the limited environment, running the test suite at this stage - is not recommended.</para> - - <para>Install the <command>msgfmt</command>, <command>msgmerge</command> and + <para>Install the <command>msgfmt</command>, <command>msgmerge</command>, and <command>xgettext</command> programs:</para> -<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /tools/bin</userinput></screen> +<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen> </sect2> <sect2 role="content"> <title/> - <para>Details on this package are located in - <xref linkend="contents-gettext" role="."/></para> + <para>Details on this package are located in <xref linkend="contents-gettext" role="."/></para> </sect2> diff --git a/chapter07/introduction.xml b/chapter07/introduction.xml index cbc197a7b..1d53f6987 100644 --- a/chapter07/introduction.xml +++ b/chapter07/introduction.xml @@ -5,221 +5,29 @@ %general-entities; ]> -<sect1 id="ch-config-introduction" revision="sysv"> +<sect1 id="ch-tools-introduction-chroot"> <?dbhtml filename="introduction.html"?> <title>Introduction</title> - <para>Booting a Linux system involves several tasks. The process must - mount both virtual and real file systems, initialize devices, activate swap, - check file systems for integrity, mount any swap partitions or files, set - the system clock, bring up networking, start any daemons required by the - system, and accomplish any other custom tasks needed by the user. This - process must be organized to ensure the tasks are performed in the correct - order but, at the same time, be executed as fast as possible.</para> + <para>This chapter shows how to build the last missing bits of the temporary + system: first, the tools needed by the build machinery of various packages, + then three packages needed to run tests. Now that all circular dependencies + have been resolved, we can use a <quote>chroot</quote> environment, + completely isolated the host operating system used for the build, except + for the running kernel.</para> + + <para>For proper operation of the isolated environment, some communication + with the running kernel must be established. This is done through the + so-called <emphasis>Virtual Kernel File Systems</emphasis>, which must be + mounted when entering the chroot environment. You may want to check + that they are mounted by issuing <command>findmnt</command>.</para> + + <para>Until <xref linkend="ch-tools-chroot"/>, the commands must be + run as <systemitem class="username">root</systemitem>, with the + <envar>LFS</envar> variable set. After entering chroot, all commands + are run as root, fortunately without access to the OS of the computer + you built LFS on. Be careful anyway, as it is easy to destroy the whole + LFS system with badly formed commands.</para> -<!-- <para>In the packages that were installed in Chapter 6, there were two - different boot systems installed. LFS provides the ability to easily - select which system the user wants to use and to compare and contrast the - two systems by actually running each system on the local computer. The - advantages and disadvantages of these systems is presented below.</para>--> - - <sect2 id='sysv-desc'> - <title>System V</title> - - <para>System V is the classic boot process that has been used in Unix and - Unix-like systems such as Linux since about 1983. It consists of a small - program, <command>init</command>, that sets up basic programs such as - <command>login</command> (via getty) and runs a script. This script, - usually named <command>rc</command>, controls the execution of a set of - additional scripts that perform the tasks required to initialize the - system.</para> - - <para>The <command>init</command> program is controlled by the - <filename>/etc/inittab</filename> file and is organized into run levels that - can be run by the user:</para> - -<literallayout> -0 — halt -1 — Single user mode -2 — Multiuser, without networking -3 — Full multiuser mode -4 — User definable -5 — Full multiuser mode with display manager -6 — reboot -</literallayout> - - <para>The usual default run level is 3 or 5.</para> - - <bridgehead renderas="sect3">Advantages</bridgehead> - - <itemizedlist> - <listitem> - <para>Established, well understood system.</para> - </listitem> - - <listitem> - <para>Easy to customize.</para> - </listitem> - - </itemizedlist> - - - <bridgehead renderas="sect3">Disadvantages</bridgehead> - - <itemizedlist> - <listitem> - <para>Slower to boot. A medium speed base LFS system - takes 8-12 seconds where the boot time is measured from the - first kernel message to the login prompt. Network - connectivity is typically established about 2 seconds - after the login prompt.</para> - </listitem> - - <listitem> - <para>Serial processing of boot tasks. This is related to the previous - point. A delay in any process such as a file system check, will - delay the entire boot process.</para> - </listitem> - - <listitem> - <para>Does not directly support advanced features like - control groups (cgroups), and per-user fair share scheduling.</para> - </listitem> - - <listitem> - <para>Adding scripts requires manual, static sequencing decisions.</para> - </listitem> - - </itemizedlist> - - </sect2> -<!-- - <sect2 id='sysd-desc'> - <title>Systemd</title> - - <para>Systemd is a group of interconnected programs that handles system and - individual process requests. It provides a dependency system between - various entities called "units". It automatically addresses dependencies - between units and can execute several startup tasks in parallel. It - provides login, inetd, logging, time, and networking services. </para> - - <bridgehead renderas="sect3">Advantages</bridgehead> - - <itemizedlist> - <listitem> - <para>Used on many established distributions by default.</para> - </listitem> - - <listitem> - <para>There is extensive documentation. - See <ulink url="http://www.freedesktop.org/wiki/Software/systemd/"/>.</para> - </listitem> - - <listitem> - <para>Parallel execution of boot processes. A medium speed - base LFS system takes 6-10 seconds from kernel start to a - login prompt. Network connectivity is typically established - about 2 seconds after the login prompt. More complex startup - procedures may show a greater speedup when compared to System V.</para> - </listitem> - - <listitem> - <para>Implements advanced features such as control groups to - manage related processes.</para> - </listitem> - - <listitem> - <para>Maintains backward compatibility with System V programs - and scripts.</para> - </listitem> - </itemizedlist> - - <bridgehead renderas="sect3">Disadvantages</bridgehead> - - <itemizedlist> - <listitem> - <para>There is a substantial learning curve.</para> - </listitem> - - <listitem> - <para>Some advanced features such as dbus or cgroups cannot be - disabled if they are not otherwise needed.</para> - </listitem> - - <listitem> - <para>Although implemented as several executable programs - the user cannot choose to implement only the portions desired.</para> - </listitem> - - <listitem> - <para>Due to the nature of using compiled programs, systemd is - more difficult to debug.</para> - </listitem> - - <listitem> - <para>Logging is done in a binary format. Extra tools must - be used to process logs or additional processes must be implemented - to duplicate traditional logging programs.</para> - </listitem> - - </itemizedlist> - - </sect2> ---> -<!-- - <sect2 id='sysv'> - <title>Selecting a Boot Method</title> - - <para>Selecting a boot method in LFS is relatively easy. - Both systems are installed side-by-side. The only task needed is to - ensure the files that are needed by the system have the correct names. - The following scripts do that.</para> - -<screen><userinput remap="install">cat > /usr/sbin/set-systemd << "EOF" -#! /bin/bash - -ln -svfn init-systemd /sbin/init -ln -svfn init.d-systemd /etc/init.d - -for tool in halt poweroff reboot runlevel shutdown telinit; do - ln -sfvn ${tool}-systemd /sbin/${tool} - ln -svfn ${tool}-systemd.8 /usr/share/man/man8/${tool}.8 -done - -echo "Now reboot with /sbin/reboot-sysv" -EOF - -chmod 0744 /usr/sbin/set-systemd - -cat > /usr/sbin/set-sysv << "EOF" -#! /bin/bash - -ln -sfvn init-sysv /sbin/init -ln -svfn init.d-sysv /etc/init.d - -for tool in halt poweroff reboot runlevel shutdown telinit; do - ln -sfvn ${tool}-sysv /sbin/${tool} - ln -svfn ${tool}-sysv.8 /usr/share/man/man8/${tool}.8 -done - -echo "Now reboot with /sbin/reboot-systemd" -EOF - -chmod 0744 /usr/sbin/set-sysv</userinput></screen> - - <note><para>The comment about the correct command to reboot in the - above scripts is correct. The reboot command for the current boot - system must be used after the script changes the default reboot command. - </para></note> - - <para>Now set the desired boot system. The default is System V:</para> - -<screen><userinput remap="install">/usr/sbin/set-sysv</userinput></screen> - - <para>Changing the boot system can be done at any time by running the - appropriate script above and rebooting.</para> - - </sect2> ---> </sect1> diff --git a/chapter06/kernfs.xml b/chapter07/kernfs.xml index 8d9091c73..a23b7e195 100644 --- a/chapter06/kernfs.xml +++ b/chapter07/kernfs.xml @@ -5,12 +5,12 @@ %general-entities; ]> -<sect1 id="ch-system-kernfs"> +<sect1 id="ch-tools-kernfs"> <?dbhtml filename="kernfs.html"?> <title>Preparing Virtual Kernel File Systems</title> - <indexterm zone="ch-system-kernfs"> + <indexterm zone="ch-tools-kernfs"> <primary sortas="e-/dev/">/dev/*</primary> </indexterm> @@ -30,9 +30,10 @@ <para>When the kernel boots the system, it requires the presence of a few device nodes, in particular the <filename class="devicefile">console</filename> and <filename - class="devicefile">null</filename> devices. The device nodes must be created - on the hard disk so that they are available before <command>udevd</command> - has been started, and additionally when Linux is started with + class="devicefile">null</filename> devices. The device nodes must be + created on the hard disk so that they are available before the kernel + populates <systemitem class="filesystem">/dev</systemitem>), and + additionally when Linux is started with <parameter>init=/bin/bash</parameter>. Create the devices by running the following commands:</para> @@ -41,7 +42,7 @@ mknod -m 666 $LFS/dev/null c 1 3</userinput></screen> </sect2> - <sect2 id="ch-system-bindmount"> + <sect2 id="ch-tools-bindmount"> <title>Mounting and Populating /dev</title> <para>The recommended method of populating the <filename @@ -63,7 +64,7 @@ mknod -m 666 $LFS/dev/null c 1 3</userinput></screen> </sect2> - <sect2 id="ch-system-kernfsmount"> + <sect2 id="ch-tools-kernfsmount"> <title>Mounting Virtual Kernel File Systems</title> <para>Now mount the remaining virtual kernel filesystems:</para> @@ -72,7 +73,7 @@ mknod -m 666 $LFS/dev/null c 1 3</userinput></screen> mount -vt proc proc $LFS/proc mount -vt sysfs sysfs $LFS/sys mount -vt tmpfs tmpfs $LFS/run</userinput></screen> - +<!-- <variablelist> <title>The meaning of the mount options for devpts:</title> @@ -100,7 +101,7 @@ mount -vt tmpfs tmpfs $LFS/run</userinput></screen> </varlistentry> </variablelist> - +--> <para>In some host systems, <filename>/dev/shm</filename> is a symbolic link to <filename class="directory">/run/shm</filename>. The /run tmpfs was mounted above so in this case only a diff --git a/chapter07/libstdc++-pass2.xml b/chapter07/libstdc++-pass2.xml new file mode 100644 index 000000000..16a256b63 --- /dev/null +++ b/chapter07/libstdc++-pass2.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-libstdcpp-pass2" role="wrap"> + <?dbhtml filename="gcc-libstdc++-pass2.html"?> + + <sect1info condition="script"> + <productname>gcc-libstdc++</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>Libstdc++ from GCC-&gcc-version;, Pass 2</title> + + <indexterm zone="ch-tools-libstdcpp-pass2"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, libstdc++ pass 2</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>When building <xref linkend="ch-tools-gcc-pass2"/> we had to defer + the installation of the C++ standard library because no suitable compiler + was available to compile it. We could not use the compiler built in that + section because it is a native compiler and should not be used outside of + chroot and risks polluting the libraries with some host components.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&libstdcpp-tmpp2-sbu;</seg> + <seg>&libstdcpp-tmpp2-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Target Libstdc++</title> + + <note> + <para><application>Libstdc++</application> is part of the GCC sources. + You should first unpack the GCC tarball and change to the + <filename>gcc-&gcc-version;</filename> directory.</para> + </note> + + <para>Create a link which exists when building libstdc++ in the gcc tree:</para> + +<screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen> + + <para>Create a separate build directory for libstdc++ and enter it:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Prepare libstdc++ for compilation:</para> + +<screen arch="default"><userinput remap="configure">../libstdc++-v3/configure \ + CXXFLAGS="-g -O2 -D_GNU_SOURCE" \ + --prefix=/usr \ + --disable-multilib \ + --disable-nls \ + --disable-libstdcxx-pch</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../libstdc++-v3/configure \ + CXXFLAGS="-g -O2 -D_GNU_SOURCE" \ + --prefix=/usr \ + --enable-multilib \ + --disable-nls \ + --disable-libstdcxx-pch \ + --host=x86_64-lfs-linux-gnu</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term> + <listitem> + <para>These flags are passed by the top level Makefile when doing + a full build of GCC.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-libstdcxx-pch</parameter></term> + <listitem> + <para>This switch prevents the installation of precompiled + include files, which are not needed at this stage.</para> + </listitem> + </varlistentry> + + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--enable-multilib</parameter></term> + <listitem> + <para>This switch is set by default but it is added here + explicitly for documentary purpose. The libstdc++ libraries + will be built for every arch (m64, m32, mx32) which are + made available in <xref linkend="ch-tools-gcc-pass1"/>.</para> + </listitem> + </varlistentry> + + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--host=x86_64-pc-linux-gnu</parameter></term> + <listitem> + <para>Since up to now, the cross-compile tools are used. This + switch is set to place headers used for multilib to locations + where the final system can pick them up correctly.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile libstdc++ by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the library:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter05/perl.xml b/chapter07/perl.xml index 2bb15453b..7921cf3d9 100644 --- a/chapter05/perl.xml +++ b/chapter07/perl.xml @@ -25,7 +25,7 @@ <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/perl.xml" + href="../chapter08/perl.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&perl-ch5-sbu;</seg> - <seg>&perl-ch5-du;</seg> + <seg>&perl-tmp-sbu;</seg> + <seg>&perl-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -45,11 +45,10 @@ <para>Prepare Perl for compilation:</para> -<screen><userinput remap="configure">sh Configure -des -Dprefix=/tools -Dlibs=-lm -Uloclibpth -Ulocincpth</userinput></screen> +<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr</userinput></screen> <variablelist> - <title>The meaning of the Configure options:</title> - + <title>The meaning of the new Configure options:</title> <varlistentry> <term><parameter>-des</parameter></term> <listitem> @@ -59,44 +58,22 @@ </listitem> </varlistentry> - <varlistentry> - <term> - <parameter>-Uloclibpth</parameter> and - <parameter>-Ulocincpth</parameter> - </term> - <listitem> - <para>These entries undefine variables that cause the configuration - to search for locally installed components that may exist on the - host system.</para> - </listitem> - </varlistentry> - </variablelist> - - - - <para>Build the package:</para> + <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>Although Perl comes with a test suite, it would be better to wait - until it is installed in the next chapter.</para> - - <para>Only a few of the utilities and libraries need to be installed at this - time:</para> + <para>Install the package:</para> -<screen><userinput remap="install">cp -v perl cpan/podlators/scripts/pod2man /tools/bin -mkdir -pv /tools/lib/perl5/&perl-version; -cp -Rv lib/* /tools/lib/perl5/&perl-version;</userinput></screen> +<screen><userinput remap="install">make install</userinput></screen> </sect2> <sect2 role="content"> <title/> - <para>Details on this package are located in - <xref linkend="contents-perl" role="."/></para> + <para>Details on this package are located in <xref linkend="contents-perl" role="."/></para> </sect2> diff --git a/chapter05/python.xml b/chapter07/python.xml index fcca9c92c..a3b9239cf 100644 --- a/chapter05/python.xml +++ b/chapter07/python.xml @@ -18,14 +18,14 @@ <indexterm zone="ch-tools-Python"> <primary sortas="a-Python">Python</primary> - <secondary>tools</secondary> + <secondary>temporary</secondary> </indexterm> <sect2 role="package"> <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/python.xml" + href="../chapter08/python.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&python-ch5-sbu;</seg> - <seg>&python-ch5-du;</seg> + <seg>&python-tmp-sbu;</seg> + <seg>&python-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -50,18 +50,9 @@ uppercase first letter).</para> </note> - <para>This package first builds the Python interpreter, then some - standard Python modules. The main script for building modules is - written in Python, and uses hard-coded paths to the host <filename - class="directory">/usr/include</filename> and <filename - class="directory">/usr/lib</filename> directories. To prevent them - from being used, issue:</para> - -<screen><userinput remap="pre">sed -i '/def add_multiarch_paths/a \ return' setup.py</userinput></screen> - <para>Prepare Python for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/tools --without-ensurepip</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --without-ensurepip</userinput></screen> <variablelist> <title>The meaning of the configure option:</title> @@ -80,10 +71,6 @@ <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. The test suite requires TK and - and X Windows and cannot be run at this time. - </para> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> @@ -93,8 +80,7 @@ <sect2 role="content"> <title/> - <para>Details on this package are located in - <xref linkend="contents-python" role="."/></para> + <para>Details on this package are located in <xref linkend="contents-python" role="."/></para> </sect2> diff --git a/chapter07/stripping.xml b/chapter07/stripping.xml new file mode 100644 index 000000000..da0bd3991 --- /dev/null +++ b/chapter07/stripping.xml @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-stripping"> + <?dbhtml filename="stripping.html"?> + + <title>Cleaning up and Saving the Temporary System</title> + + <para>The libtool .la files are only useful when linking with static + libraries. They are unneeded, and potentially harmful, when using dynamic + shared libraries, specially when using non-autotools build systems. + While still in chroot, remove those files now:</para> + +<screen><userinput>find /usr/{lib,libexec} -name \*.la -delete</userinput></screen> + + <note><para> + All the remaining steps in this section are optional. Nevertheless, + as soon as you begin installing packages in <xref + linkend="chapter-building-system"/>, the temporary tools will be + overwritten. So it may be a good idea to do a backup of the temporary + tools as described below. The other steps are only needed if you are + really short on disk space. + </para></note> + + <para> + The following steps are performed from outside the chroot + environment. That means, you have to leave the chroot environment + first before continuing. The reason for that is to: + <itemizedlist> + <listitem> + <para> + make sure that objects are not in use while they are + manipulated. + </para> + </listitem> + <listitem> + <para> + get access to file system locations outside of the chroot + environment to store/read the backup archive which should + not be placed within the + <filename class="directory">$LFS</filename> hierarchy for + safety reasons. + </para> + </listitem> + </itemizedlist> + </para> + + <para> + Leave the chroot environment and unmount the kernel virtual file + systems: + </para> + + <note> + <para>All of the following instructions are executed by + <systemitem class="username">root</systemitem>. Take extra + care about the commands you're going to run as mistakes + here can modify your host system. Be aware that the + environment variable <envar>LFS</envar> is set for user + <systemitem class="username">lfs</systemitem> by default + but it might <emphasis>not</emphasis> be set for + <systemitem class="username">root</systemitem>. Whenever + commands are to be executed by <systemitem class="username">root</systemitem>, + make sure you have set <envar>LFS</envar> accordingly. + This has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>. + </para> + </note> + +<screen role="nodump"><userinput>exit +umount $LFS/dev{/pts,} +umount $LFS/{sys,proc,run}</userinput></screen> + + <sect2> + <title>Stripping</title> + + <para>If the LFS partition is rather small, it is good to + know that unnecessary items can be removed. The executables and + libraries built so far contain a little over 90 MB of unneeded debugging + symbols.</para> + + <para>Strip off debugging symbols from binaries:</para> +<screen role="nodump"><userinput>strip --strip-debug $LFS/usr/lib/* +strip --strip-unneeded $LFS/usr/{,s}bin/* +strip --strip-unneeded $LFS/tools/bin/*</userinput></screen> + + <para>These commands will skip a number of files reporting that it does not + recognize their file format. Most of these are scripts instead of binaries. + <!--Note that we use the <command>strip</command> program built in + <quote>Binutils pass 2</quote>, since it is the one that knows how to strip + our cross-compiled programs.--></para> + + <para>Take care <emphasis>NOT</emphasis> to use + <parameter>--strip-unneeded</parameter> on the libraries. The static + ones would be destroyed and the toolchain packages would need to be + built all over again.</para> + + <para>To save more space (slightly more than 35 MB), remove the documentation:</para> + +<screen role="nodump"><userinput>rm -rf $LFS/usr/share/{info,man,doc}</userinput></screen> + + <para>At this point, you should have at least 5 GB of free space on the + chroot partition that can be used to build and install Glibc and GCC in + the next phase. If you can build and install Glibc, you can build and install + the rest too. You can check the free disk space with the command + <command>df -h $LFS</command>.</para> + + </sect2> + + <sect2> + <title>Backup</title> + + <para> + Now that the essential tools have been created, its time to think about + a backup. When every check has passed successfully in the previously + built packages, your temporary tools are in a good state and might be + backed up for later reuse. In case of fatal failures in the subsequent + chapters, it often turns out that removing everything and starting over + (more carefully) is the best option to recover. Unfortunately, all the + temporary tools will be removed, too. To avoid spending extra time to + redo something which has been built successfully, prepare a backup. + </para> + + <para> + Make sure you have at least 600 MB free disk space (the source tarballs + will be included in the backup archive) in the home directory of user + <systemitem class="username">root</systemitem>. + </para> + + <para> + Create the backup archive by running the following command: + </para> + +<screen role="nodump" revision="sysv"><userinput>cd $LFS && +tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen> + +<screen role="nodump" revision="systemd"><userinput>cd $LFS && +tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen> + + <para> + Replace <envar>$HOME</envar> by a directory of your choice if you + do not want to have the backup stored in <systemitem + class="username">root</systemitem>'s home directory. + </para> + </sect2> + + <sect2> + <title>Restore</title> + + <para> + In case some mistakes have been made and you need to start over, you can + use this backup to restore the temporary tools and save some recovery time. + Since the sources are located under + <filename class="directory">$LFS</filename>, they are included in the + backup archive as well, so they do not need to be downloaded again. After + checking that <envar>$LFS</envar> is set properly, + restore the backup by executing the following commands: + </para> + +<!-- Make the following look different so users don't blindly run the + restore when they don't need to. --> + +<screen role="nodump" revision="sysv"><computeroutput>cd $LFS && +rm -rf ./* && +tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput></screen> + +<screen role="nodump" revision="systemd"><computeroutput>cd $LFS && +rm -rf ./* && +tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput></screen> + + <para> + Again, double check that the environment has been setup properly + and continue building the rest of the system. + </para> + + <important> + <para> + If you left the chroot environment either to strip off debug + symbols, create a backup, or restart building using a restore, + remember to mount the kernel virtual filesystems now again as + described in <xref linkend='ch-tools-kernfs'/> and re-enter + the chroot environment (see <xref linkend='ch-tools-chroot'/>) + again before continuing. + </para> + </important> + + </sect2> + +</sect1> diff --git a/chapter05/texinfo.xml b/chapter07/texinfo.xml index 3e5ecfaef..af7d5ab30 100644 --- a/chapter05/texinfo.xml +++ b/chapter07/texinfo.xml @@ -18,14 +18,14 @@ <indexterm zone="ch-tools-texinfo"> <primary sortas="a-Texinfo">Texinfo</primary> - <secondary>tools</secondary> + <secondary>temporary</secondary> </indexterm> <sect2 role="package"> <title/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/texinfo.xml" + href="../chapter08/texinfo.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&texinfo-ch5-sbu;</seg> - <seg>&texinfo-ch5-du;</seg> + <seg>&texinfo-tmp-sbu;</seg> + <seg>&texinfo-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -45,7 +45,7 @@ <para>Prepare Texinfo for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> <note> <para>As part of the configure process, a test is made that indicates an @@ -57,12 +57,6 @@ <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Texinfo test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> @@ -72,8 +66,7 @@ <sect2 role="content"> <title/> - <para>Details on this package are located in - <xref linkend="contents-texinfo" role="."/></para> + <para>Details on this package are located in <xref linkend="contents-texinfo" role="."/></para> </sect2> diff --git a/chapter07/util-linux.xml b/chapter07/util-linux.xml new file mode 100644 index 000000000..5df23f37a --- /dev/null +++ b/chapter07/util-linux.xml @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-util-linux" role="wrap"> + <?dbhtml filename="util-linux.html"?> + + <sect1info condition="script"> + <productname>util-linux</productname> + <productnumber>&util-linux-version;</productnumber> + <address>&util-linux-url;</address> + </sect1info> + + <title>Util-linux-&util-linux-version;</title> + + <indexterm zone="ch-tools-util-linux"> + <primary sortas="a-Util-linux">Util-linux</primary> + <secondary>tools</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Util-linux package contains miscellaneous utility programs.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&util-linux-tmp-sbu;</seg> + <seg>&util-linux-tmp-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Util-linux</title> + + <para>First create a directory + to enable storage for the <command>hwclock</command> program:</para> + +<screen><userinput remap="pre">mkdir -pv /var/lib/hwclock</userinput></screen> + + <para>Prepare Util-linux for compilation:</para> + +<screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --docdir=/usr/share/doc/util-linux-&util-linux-version; \ + --disable-chfn-chsh \ + --disable-login \ + --disable-nologin \ + --disable-su \ + --disable-setpriv \ + --disable-runuser \ + --disable-pylibmount \ + --disable-static \ + --without-python</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term> + <listitem> + <para>This sets the location of the file recording information about + the hardware clock in accordance to the FHS. This is not stricly + needed for this temporary tool, but it prevents creating a file + at another location, which would not be overwritten or removed + when building the final util-linux package.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-*</parameter></term> + <listitem> + <para>These switches prevent warnings about building components + that require packages not in LFS or not installed yet.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--without-python</parameter></term> + <listitem> + <para>This switch disables using <application>Python</application>. + It avoids trying to build unneeded bindings.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_32,ml_all" role="installation"> + <title>Installation of Util-linux - 32-bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare Util-linux for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -m32" \ +./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --docdir=/usr/share/doc/util-linux-&util-linux-version; \ + --disable-chfn-chsh \ + --disable-login \ + --disable-nologin \ + --disable-su \ + --disable-setpriv \ + --disable-runuser \ + --disable-pylibmount \ + --disable-static \ + --without-python \ + --libdir=&usr-lib-m32; \ + --host=i686-pc-linux-gnu</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_x32,ml_all" role="installation"> + <title>Installation of Util-linux - x32-bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare Util-linux for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -mx32" \ +./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --docdir=/usr/share/doc/util-linux-&util-linux-version; \ + --disable-chfn-chsh \ + --disable-login \ + --disable-nologin \ + --disable-su \ + --disable-setpriv \ + --disable-runuser \ + --disable-pylibmount \ + --disable-static \ + --without-python \ + --libdir=&usr-lib-mx32; \ + --host=x86_64-pc-linux-gnux32</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- mx32 --> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in <xref linkend="contents-utillinux" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/aboutdebug.xml b/chapter08/aboutdebug.xml index f49618c83..d646b797e 100644 --- a/chapter06/aboutdebug.xml +++ b/chapter08/aboutdebug.xml @@ -13,8 +13,8 @@ <para>Most programs and libraries are, by default, compiled with debugging symbols included (with <command>gcc</command>'s <parameter>-g</parameter> option). This means that when debugging a - program or library that was compiled with debugging information - included, the debugger can provide not only memory addresses, but also + program or library that was compiled with debugging information, + the debugger can provide not only memory addresses, but also the names of the routines and variables.</para> <para>However, the inclusion of these debugging symbols enlarges a diff --git a/chapter06/acl.xml b/chapter08/acl.xml index 8b2846dac..00d219885 100644 --- a/chapter06/acl.xml +++ b/chapter08/acl.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&acl-ch6-sbu;</seg> - <seg>&acl-ch6-du;</seg> + <seg>&acl-fin-sbu;</seg> + <seg>&acl-fin-du;</seg> </seglistitem> </segmentedlist> @@ -79,20 +79,24 @@ ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so</userinput>< </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Acl - 32-bit</title> + <title>Installation of Acl - 32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Acl for compilation:</para> + <para>Prepare Xz for compilation:</para> -<screen><userinput remap="configure">CC="gcc -m32" ./configure \ - --prefix=/usr --libdir=/usr/lib32 \ - --disable-static --libexecdir=/usr/lib32 \ +<screen><userinput remap="configure">CC="gcc -m32" ./configure \ + --prefix=/usr \ + --disable-static \ + --libdir=&usr-lib-m32; \ + --libexecdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu</userinput></screen> <para>Compile the package:</para> @@ -101,26 +105,30 @@ ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so</userinput>< <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Acl - x32-bit</title> + <title>Installation of Acl - x32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Acl for compilation:</para> + <para>Prepare Xz for compilation:</para> -<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ - --prefix=/usr --libdir=/usr/libx32 \ - --disable-static --libexecdir=/usr/libx32 \ +<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ + --prefix=/usr \ + --disable-static \ + --libdir=&usr-lib-mx32; \ + --libexecdir=&usr-lib-mx32; \ --host=x86_64-pc-linux-gnux32</userinput></screen> <para>Compile the package:</para> @@ -129,11 +137,11 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-acl" role="content"> <title>Contents of Acl</title> diff --git a/chapter06/adjusting.xml b/chapter08/adjusting.xml index 3e6b49e19..4bd8a85cc 100644 --- a/chapter06/adjusting.xml +++ b/chapter08/adjusting.xml @@ -50,7 +50,7 @@ readelf -l a.out | grep ': /lib'</userinput></screen> <para os="b">There should be no errors, and the output of the last command will be (allowing for - platform-specific differences in dynamic linker name):</para> + platform-specific differences in the dynamic linker name):</para> <screen os="c"><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> @@ -104,7 +104,7 @@ SEARCH_DIR("/lib")</computeroutput></screen> <screen os="o"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen> - <para os="p">Lastly, make sure GCC is using the correct dynamic linker:</para> + <para os="p">Make sure GCC is using the correct dynamic linker:</para> <screen os="q"><userinput>grep found dummy.log</userinput></screen> @@ -115,8 +115,8 @@ SEARCH_DIR("/lib")</computeroutput></screen> <para os="t">If the output does not appear as shown above or is not received at all, then something is seriously wrong. Investigate and retrace the - steps to find out where the problem is and correct it. The most likely - reason is that something went wrong with the specs file adjustment. Any + steps to find out where the problem is and correct it. <!--The most likely + reason is that something went wrong with the specs file adjustment.--> Any issues will need to be resolved before continuing with the process.</para> <para os="u">Once everything is working correctly, clean up the test files:</para> diff --git a/chapter06/attr.xml b/chapter08/attr.xml index 69b62bde9..dcc416cd9 100644 --- a/chapter06/attr.xml +++ b/chapter08/attr.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&attr-ch6-sbu;</seg> - <seg>&attr-ch6-du;</seg> + <seg>&attr-fin-sbu;</seg> + <seg>&attr-fin-du;</seg> </seglistitem> </segmentedlist> @@ -78,21 +78,23 @@ ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so</userinput </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Attr - 32-bit</title> + <title>Installation of Attr - 32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Attr for compilation:</para> + <para>Prepare Xz for compilation:</para> <screen><userinput remap="configure">CC="gcc -m32" ./configure \ --prefix=/usr \ --disable-static \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu</userinput></screen> <para>Compile the package:</para> @@ -101,27 +103,29 @@ ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so</userinput <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Attr - x32-bit</title> + <title>Installation of Attr - x32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Attr for compilation:</para> + <para>Prepare Xz for compilation:</para> <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ --prefix=/usr \ --disable-static \ - --libdir=/usr/libx32 \ + --libdir=&usr-lib-mx32; \ --host=x86_64-pc-linux-gnux32</userinput></screen> <para>Compile the package:</para> @@ -130,11 +134,11 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-attr" role="content"> <title>Contents of Attr</title> diff --git a/chapter06/autoconf.xml b/chapter08/autoconf.xml index 6652747fd..53d97070b 100644 --- a/chapter06/autoconf.xml +++ b/chapter08/autoconf.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&autoconf-ch6-sbu;</seg> - <seg>&autoconf-ch6-du;</seg> + <seg>&autoconf-fin-sbu;</seg> + <seg>&autoconf-fin-du;</seg> </seglistitem> </segmentedlist> @@ -43,7 +43,7 @@ <para>First, fix a bug generated by Perl 5.28.</para> -<screen><userinput remap="pre">sed '361 s/{/\\{/' -i bin/autoscan.in</userinput></screen> +<screen><userinput remap="pre">sed -i '361 s/{/\\{/' bin/autoscan.in</userinput></screen> <para>Prepare Autoconf for compilation:</para> @@ -59,7 +59,7 @@ <screen><userinput remap="test">make check</userinput></screen> <!-- - <para>This takes a long time, about &autoconf-ch6-sbu-tests; SBUs. In addition, + <para>This takes a long time, about &autoconf-fin-sbu-tests; SBUs. In addition, several tests are skipped that use Automake. For full test coverage, Autoconf can be re-tested after Automake has been installed. In addition, two tests fail due to changes in libtool-2.4.3 and later.</para> diff --git a/chapter06/automake.xml b/chapter08/automake.xml index 11dccfad3..f89f71ced 100644 --- a/chapter06/automake.xml +++ b/chapter08/automake.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&automake-ch6-sbu;</seg> - <seg>&automake-ch6-du;</seg> + <seg>&automake-fin-sbu;</seg> + <seg>&automake-fin-du;</seg> </seglistitem> </segmentedlist> @@ -43,7 +43,7 @@ <para>Fix a failing test:</para> -<screen><userinput remap="pre">sed -i "s/''/etags/" t/tags-lisp-space.sh</userinput></screen> +<screen><userinput remap="pre">sed -i "s/''/etags/" t/tags-lisp-space.sh</userinput></screen> <para>Prepare Automake for compilation:</para> @@ -53,26 +53,12 @@ <screen><userinput remap="make">make</userinput></screen> -<!--<para>There are a couple of tests that incorrectly link to the - wrong version of the flex library, so we temporarily work around - the problem. Also, using the -j4 make option speeds up the tests, even on - systems with only one processor, due to internal delays in individual - tests. To test the results, issue:</para> - --> - <para> Using the -j4 make option speeds up the tests, even on systems with only one processor, due to internal delays in individual tests. To test the results, issue:</para> - <!--<screen><userinput remap="test">sed -i "s:./configure:LEXLIB=/usr/lib/libfl.a &:" t/lex-{clean,depend}-cxx.sh - make -j4 check</userinput></screen>--> - <screen><userinput remap="test">make -j4 check</userinput></screen> - - <para>One test is known to fail in the LFS environment: - tags-lisp-space.sh.</para> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> diff --git a/chapter08/bash.xml b/chapter08/bash.xml new file mode 100644 index 000000000..b8dd5fe40 --- /dev/null +++ b/chapter08/bash.xml @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-bash" role="wrap"> + <?dbhtml filename="bash.html"?> + + <sect1info condition="script"> + <productname>bash</productname> + <productnumber>&bash-version;</productnumber> + <address>&bash-url;</address> + </sect1info> + + <title>Bash-&bash-version;</title> + + <indexterm zone="ch-system-bash"> + <primary sortas="a-Bash">Bash</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Bash package contains the Bourne-Again SHell.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&bash-fin-sbu;</seg> + <seg>&bash-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Bash</title> + + <para>Incorporate some upstream fixes:</para> + +<screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen> + + <para>Prepare Bash for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr \ + --docdir=/usr/share/doc/bash-&bash-version; \ + --without-bash-malloc \ + --with-installed-readline</userinput></screen> + + <variablelist> + <title>The meaning of the new configure option:</title> + + <varlistentry> + <term><parameter>--with-installed-readline</parameter></term> + <listitem> + <para>This option tells Bash to use the <filename + class="libraryfile">readline</filename> library that is already + installed on the system rather than using its own readline + version.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Skip down to <quote>Install the + package</quote> if not running the test suite.</para> + + <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para> + +<screen><userinput remap="test">chown -Rv tester .</userinput></screen> + + <para>Now, run the tests as the <systemitem + class="username">tester</systemitem> user:</para> + +<screen><userinput remap="test">su tester << EOF +PATH=$PATH make tests < $(tty) +EOF</userinput></screen> + + <para>Install the package and move the main executable to + <filename class='directory'>/bin</filename>:</para> + +<screen><userinput remap="install">make install +mv -vf /usr/bin/bash /bin</userinput></screen> + + <para>Run the newly compiled <command>bash</command> program (replacing the one that is + currently being executed):</para> + +<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> + + <note> + <para>The parameters used make the <command>bash</command> + process an interactive login shell and continues to disable hashing so + that new programs are found as they become available.</para> + </note> + + </sect2> + + <sect2 id="contents-bash" role="content"> + <title>Contents of Bash</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed directory</segtitle> + + <seglistitem> + <seg>bash, bashbug, and sh (link to bash)</seg> + <seg>/usr/include/bash, /usr/lib/bash, and + /usr/share/doc/bash-&bash-version;</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="bash"> + <term><command>bash</command></term> + <listitem> + <para>A widely-used command interpreter; it performs many types of + expansions and substitutions on a given command line before executing + it, thus making this interpreter a powerful tool</para> + <indexterm zone="ch-system-bash bash"> + <primary sortas="b-bash">bash</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="bashbug"> + <term><command>bashbug</command></term> + <listitem> + <para>A shell script to help the user compose and mail standard + formatted bug reports concerning <command>bash</command></para> + <indexterm zone="ch-system-bash bashbug"> + <primary sortas="b-bashbug">bashbug</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sh"> + <term><command>sh</command></term> + <listitem> + <para>A symlink to the <command>bash</command> program; when invoked + as <command>sh</command>, <command>bash</command> tries to mimic the + startup behavior of historical versions of <command>sh</command> as + closely as possible, while conforming to the POSIX standard as + well</para> + <indexterm zone="ch-system-bash sh"> + <primary sortas="b-sh">sh</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/bc.xml b/chapter08/bc.xml index f78bd270e..a499937e3 100644 --- a/chapter06/bc.xml +++ b/chapter08/bc.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bc-ch6-sbu;</seg> - <seg>&bc-ch6-du;</seg> + <seg>&bc-fin-sbu;</seg> + <seg>&bc-fin-du;</seg> </seglistitem> </segmentedlist> @@ -40,62 +40,18 @@ <sect2 role="installation"> <title>Installation of Bc</title> -<!-- - <para>First, change an internal script to use <command>sed</command> instead - of <command>ed</command>:</para> - -<screen><userinput remap="pre">cat > bc/fix-libmath_h << "EOF" -#! /bin/bash -sed -e '1 s/^/{"/' \ - -e 's/$/",/' \ - -e '2,$ s/^/"/' \ - -e '$ d' \ - -i libmath.h - -sed -e '$ s/$/0}/' \ - -i libmath.h -EOF</userinput></screen> - - <para>Create temporary symbolic links so the package can find - the readline library and confirm that its required libncurses - library is available. Even though the libraries are in /tools/lib - at this point, the system will use /usr/lib at the end of - this chapter.</para> - -<screen><userinput remap="pre">ln -sv /tools/lib/libncursesw.so.6 /usr/lib/libncursesw.so.6 -ln -sfv libncursesw.so.6 /usr/lib/libncurses.so</userinput></screen> - - <para>Fix an issue in <command>configure</command> due to missing - files in the early stages of LFS:</para> - -<screen><userinput remap="pre">sed -i -e '/flex/s/as_fn_error/: ;; # &/' configure</userinput></screen> ---> + <para>Prepare Bc for compilation:</para> -<!-- -<screen><userinput remap="configure">./configure - -prefix=/usr \ - - -with-readline \ - - -mandir=/usr/share/man \ - - -infodir=/usr/share/info</userinput></screen> ---> + <screen><userinput remap="configure">PREFIX=/usr CC=gcc CFLAGS="-std=c99" ./configure.sh -G -O3</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> -<!-- - <varlistentry> - <term><parameter>- -with-readline</parameter></term> - <listitem> - <para>This option tells Bc to use the <filename - class="libraryfile">readline</filename> library that is already - installed on the system rather than using its own readline - version.</para> - </listitem> - </varlistentry> ---> + <varlistentry> <term><parameter>CC=gcc CFLAGS="-std=c99"</parameter></term> <listitem> - <para>These parameters specify the compiler and C standard to use.</para> + <para>These parameters specify the compiler and the C standard to use.</para> </listitem> </varlistentry> @@ -118,14 +74,6 @@ ln -sfv libncursesw.so.6 /usr/lib/libncurses.so</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> -<!-- - <para>To test bc, run the commands below. There is quite a bit of output, - so you may want to redirect it to a file. There are a very small percentage - of tests (10 of 12,144) that will indicate a round off error at the last - digit.</para> - -<screen><userinput remap="test">echo "quit" | ./bc/bc -l Test/checklib.b</userinput></screen> ---> <para>To test bc, run:</para> diff --git a/chapter06/binutils.xml b/chapter08/binutils.xml index 04dbd199c..33f756f92 100644 --- a/chapter06/binutils.xml +++ b/chapter08/binutils.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&binutils-ch6-sbu;</seg> - <seg>&binutils-ch6-du;</seg> + <seg>&binutils-fin-sbu;</seg> + <seg>&binutils-fin-du;</seg> </seglistitem> </segmentedlist> @@ -72,7 +72,7 @@ cd build</userinput></screen> <para>Prepare Binutils for compilation:</para> -<screen><userinput remap="configure">../configure --prefix=/usr \ +<screen arch="default"><userinput remap="configure">../configure --prefix=/usr \ --enable-gold \ --enable-ld=default \ --enable-plugins \ @@ -80,6 +80,16 @@ cd build</userinput></screen> --disable-werror \ --enable-64-bit-bfd \ --with-system-zlib</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure --prefix=/usr \ + --enable-gold \ + --enable-ld=default \ + --enable-plugins \ + --enable-shared \ + --disable-werror \ + --enable-64-bit-bfd \ + --with-system-zlib \ + --enable-multilib</userinput></screen> + <variablelist> <title>The meaning of the configure parameters:</title> @@ -114,6 +124,13 @@ cd build</userinput></screen> </listitem> </varlistentry> + <varlistentry arch="ml_32,ml_x32,ml_all"> + <term><parameter>--enable-multilib</parameter></term> + <listitem> + <para>Enables multilib support in bintutils.</para> + </listitem> + </varlistentry> + <varlistentry> <term><parameter>--with-system-zlib</parameter></term> <listitem> diff --git a/chapter06/bison.xml b/chapter08/bison.xml index 23b6f0a95..1727660d8 100644 --- a/chapter06/bison.xml +++ b/chapter08/bison.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bison-ch6-sbu;</seg> - <seg>&bison-ch6-du;</seg> + <seg>&bison-fin-sbu;</seg> + <seg>&bison-fin-du;</seg> </seglistitem> </segmentedlist> @@ -39,38 +39,19 @@ <sect2 role="installation"> <title>Installation of Bison</title> -<!-- - <para>First, fix a build problem with the current version:</para> -<screen><userinput remap="pre">sed -i '9327 s/mv/cp/' Makefile.in</userinput></screen> ---> <para>Prepare Bison for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen> -<!-- I could not find a race condidtion in the current version. - <para>Compile the package, but work around a race condition in the - current version:</para> - -<screen><userinput remap="make">make -j1</userinput></screen>--> - <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results (about 5.5 SBU), issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Fourteen tests fail in the "Diagnostics" section, probably because of - missing locales.</para> + <para>The tests are known to fail using multiple processors. + To test the results (about 5.5 SBU), issue:</para> -<!-- - <para>There is a circular dependency between bison and flex with regard to - the checks. If desired, after installing flex in the next section, the - bison package can be rebuilt and the bison checks can be run with - <command>make check</command>.</para> ---> +<screen><userinput remap="test">make -j1 check</userinput></screen> <para>Install the package:</para> diff --git a/chapter06/bzip2.xml b/chapter08/bzip2.xml index d742086a8..d00cbd664 100644 --- a/chapter06/bzip2.xml +++ b/chapter08/bzip2.xml @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bzip2-ch6-sbu;</seg> - <seg>&bzip2-ch6-du;</seg> + <seg>&bzip2-fin-sbu;</seg> + <seg>&bzip2-fin-du;</seg> </seglistitem> </segmentedlist> @@ -97,10 +97,12 @@ ln -sv bzip2 /bin/bzcat</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Bzip2 - 32-bit</title> + <title>Installation of Bzip2 - 32bit</title> <para>Clean previous build:</para> @@ -108,25 +110,26 @@ ln -sv bzip2 /bin/bzcat</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -m32/" \ - -i Makefile{,-libbz2_so} +<screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -m32/" -i Makefile{,-libbz2_so} make -f Makefile-libbz2_so make libbz2.a</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">install -Dm755 libbz2.so.1.0.8 /usr/lib32/libbz2.so.1.0.8 -ln -sf libbz2.so.1.0.8 /usr/lib32/libbz2.so -ln -sf libbz2.so.1.0.8 /usr/lib32/libbz2.so.1 -ln -sf libbz2.so.1.0.8 /usr/lib32/libbz2.so.1.0 -install -Dm644 libbz2.a /usr/lib32/libbz2.a</userinput></screen> +<screen><userinput remap="install">install -Dm755 libbz2.so.1.0.8 &usr-lib-m32;/libbz2.so.1.0.8 +ln -sf libbz2.so.1.0.8 &usr-lib-m32;/libbz2.so +ln -sf libbz2.so.1.0.8 &usr-lib-m32;/libbz2.so.1 +ln -sf libbz2.so.1.0.8 &usr-lib-m32;/libbz2.so.1.0 +install -Dm644 libbz2.a &usr-lib-m32;/libbz2.a</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Bzip2 - x32-bit</title> + <title>Installation of Bzip2 - x32bit</title> <para>Clean previous build:</para> @@ -134,20 +137,19 @@ install -Dm644 libbz2.a /usr/lib32/libbz2.a</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -mx32/" \ - -i Makefile{,-libbz2_so} +<screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -mx32/" -i Makefile{,-libbz2_so} make -f Makefile-libbz2_so make libbz2.a</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">install -Dm755 libbz2.so.1.0.8 /usr/libx32/libbz2.so.1.0.8 -ln -sf libbz2.so.1.0.8 /usr/libx32/libbz2.so -ln -sf libbz2.so.1.0.8 /usr/libx32/libbz2.so.1 -ln -sf libbz2.so.1.0.8 /usr/libx32/libbz2.so.1.0 -install -Dm644 libbz2.a /usr/libx32/libbz2.a</userinput></screen> +<screen><userinput remap="install">install -Dm755 libbz2.so.1.0.8 &usr-lib-mx32;/libbz2.so.1.0.8 +ln -sf libbz2.so.1.0.8 &usr-lib-mx32;/libbz2.so +ln -sf libbz2.so.1.0.8 &usr-lib-mx32;/libbz2.so.1 +ln -sf libbz2.so.1.0.8 &usr-lib-mx32;/libbz2.so.1.0 +install -Dm644 libbz2.a &usr-lib-mx32;/libbz2.a</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-bzip2" role="content"> <title>Contents of Bzip2</title> diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 32112e37a..70ab37feb 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -5,15 +5,105 @@ %general-entities; ]> -<chapter id="chapter-bootable" xreflabel="Chapter 8"> +<chapter id="chapter-building-system" xreflabel="Chapter 8"> <?dbhtml dir="chapter08"?> <?dbhtml filename="chapter08.html"?> - <title>Making the LFS System Bootable</title> + <title>Installing Basic System Software</title> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fstab.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernel.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> + + <!-- systemd only --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> + + <!-- sysv only --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> + + <!-- Both sysv on systemd builds --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> + + <!-- Both sysv and systemd builds --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/> + + <!-- sysv only --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/> </chapter> diff --git a/chapter06/check.xml b/chapter08/check.xml index e7936f6b2..fc28a9113 100644 --- a/chapter06/check.xml +++ b/chapter08/check.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&check-ch5-sbu;</seg> - <seg>&check-ch5-du;</seg> + <seg>&check-fin-sbu;</seg> + <seg>&check-fin-du;</seg> </seglistitem> </segmentedlist> @@ -56,11 +56,9 @@ <para>Note that the Check test suite may take a relatively long (up to 4 SBU) time.</para> - <para>Install the package and fix a script:</para> + <para>Install the package:</para> - <screen><userinput remap="install">make docdir=/usr/share/doc/check-&check-version; install && -sed -i '1 s/tools/usr/' /usr/bin/checkmk</userinput></screen> -<!-- Removes a hardcoded call to /tools/bin/gawk at line 1 of checkmk. --> + <screen><userinput remap="install">make docdir=/usr/share/doc/check-&check-version; install</userinput></screen> </sect2> diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml new file mode 100644 index 000000000..fcf10b1dc --- /dev/null +++ b/chapter08/coreutils.xml @@ -0,0 +1,1292 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-coreutils" role="wrap"> + <?dbhtml filename="coreutils.html"?> + + <sect1info condition="script"> + <productname>coreutils</productname> + <productnumber>&coreutils-version;</productnumber> + <address>&coreutils-url;</address> + </sect1info> + + <title>Coreutils-&coreutils-version;</title> + + <indexterm zone="ch-system-coreutils"> + <primary sortas="a-Coreutils">Coreutils</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Coreutils package contains utilities for showing and setting the + basic system characteristics.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&coreutils-fin-sbu;</seg> + <seg>&coreutils-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Coreutils</title> + + <para>POSIX requires that programs from Coreutils recognize character + boundaries correctly even in multibyte locales. The following patch fixes + this non-compliance and other internationalization-related bugs.</para> + +<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen> + + <note> + <para>In the past, many bugs were found in this patch. When reporting new + bugs to Coreutils maintainers, please check first if they are reproducible + without this patch.</para> + </note> + + <!-- this has been fixed in upstream gnulib, when a new version of + coreutils is released, please check #4055 to see if the change has been + picked up in this package --> + <para>Suppress a test which on some machines can loop forever:</para> + +<screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen> + + <para>Now prepare Coreutils for compilation:</para> + +<screen><userinput remap="configure">autoreconf -fiv +FORCE_UNSAFE_CONFIGURE=1 ./configure \ + --prefix=/usr \ + --enable-no-install-program=kill,uptime</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><command>autoreconf</command></term> + <listitem> + <para>This command updates generated configuration files + consistent with the latest version of automake. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> + <listitem> + <para>This environment variable allows the package to be + built as the root user. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--enable-no-install-program=kill,uptime</parameter></term> + <listitem> + <para>The purpose of this switch is to prevent Coreutils from + installing binaries that will be installed by other packages later. + </para> + </listitem> + </varlistentry> + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Skip down to <quote>Install the + package</quote> if not running the test suite.</para> + + <para>Now the test suite is ready to be run. First, run the tests that are + meant to be run as user <systemitem class="username">root</systemitem>:</para> + +<screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen> + + <para>We're going to run the remainder of the tests as the + <systemitem class="username">tester</systemitem> user. Certain tests + require that the user be a member of more than one group. So that + these tests are not skipped, add a temporary group and make the + user <systemitem class="username">tester</systemitem> a part of it:</para> + +<screen><userinput remap="test">echo "dummy:x:102:tester" >> /etc/group</userinput></screen> + + <para>Fix some of the permissions so that the non-root user can compile and + run the tests:</para> + +<screen><userinput remap="test">chown -Rv tester . </userinput></screen> + + <para>Now run the tests:</para> + +<screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> + + <para>Remove the temporary group:</para> + +<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen> + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para>Move programs to the locations specified by the FHS:</para> + +<screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin +mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin +mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin +mv -v /usr/bin/chroot /usr/sbin +mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 +sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8</userinput></screen> + + <para revision="sysv">Some of the scripts in the LFS-Bootscripts package + depend on <command>head</command>, <command>nice</command>, + <command>sleep</command>, and <command>touch</command>. As <filename + class="directory">/usr</filename> may not be available during the early and + late stages of booting, those binaries need to be on the root partition to + maintain FHS compliance:</para> + +<screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen> + + </sect2> + + <sect2 id="contents-coreutils" role="content"> + <title>Contents of Coreutils</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed library</segtitle> + <segtitle>Installed directory</segtitle> + + <seglistitem> + <seg>[, b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown, + chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, + dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, + head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir, + mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, + pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, + rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, + sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, + sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, + tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and + yes</seg> + <seg>libstdbuf.so (in /usr/libexec/coreutils)</seg> + <seg>/usr/libexec/coreutils</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="lbracket"> + <term><command>[</command></term> + <listitem> + <para>Is an actual command, /usr/bin/[, that is a synonym + for the <command>test</command> command.</para> + <indexterm zone="ch-system-coreutils lbracket"> + <primary sortas="b-111">[</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="base32"> + <term><command>base32</command></term> + <listitem> + <para>Encodes and decodes data according to the base32 specification + (RFC 4648)</para> + <indexterm zone="ch-system-coreutils base64"> + <primary sortas="b-base64">base64</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="base64"> + <term><command>base64</command></term> + <listitem> + <para>Encodes and decodes data according to the base64 specification + (RFC 4648)</para> + <indexterm zone="ch-system-coreutils base64"> + <primary sortas="b-base64">base64</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="b2sum"> + <term><command>b2sum</command></term> + <listitem> + <para>Prints or checks BLAKE2 (512-bit) checksums</para> + <indexterm zone="ch-system-coreutils b2sum"> + <primary sortas="b-b2sum">b2sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="basename"> + <term><command>basename</command></term> + <listitem> + <para>Strips any path and a given suffix from a file name</para> + <indexterm zone="ch-system-coreutils basename"> + <primary sortas="b-basename">basename</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="basenc"> + <term><command>basenc</command></term> + <listitem> + <para>Encodes or decodes data using various algorithms</para> + <indexterm zone="ch-system-coreutils basenc"> + <primary sortas="b-basenc">basenc</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="cat"> + <term><command>cat</command></term> + <listitem> + <para>Concatenates files to standard output</para> + <indexterm zone="ch-system-coreutils cat"> + <primary sortas="b-cat">cat</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="chcon"> + <term><command>chcon</command></term> + <listitem> + <para>Changes security context for files and directories</para> + <indexterm zone="ch-system-coreutils chcon"> + <primary sortas="b-chcon">chcon</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="chgrp"> + <term><command>chgrp</command></term> + <listitem> + <para>Changes the group ownership of files and directories</para> + <indexterm zone="ch-system-coreutils chgrp"> + <primary sortas="b-chgrp">chgrp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="chmod"> + <term><command>chmod</command></term> + <listitem> + <para>Changes the permissions of each file to the given mode; the mode + can be either a symbolic representation of the changes to make or an + octal number representing the new permissions</para> + <indexterm zone="ch-system-coreutils chmod"> + <primary sortas="b-chmod">chmod</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="chown"> + <term><command>chown</command></term> + <listitem> + <para>Changes the user and/or group ownership of files and + directories</para> + <indexterm zone="ch-system-coreutils chown"> + <primary sortas="b-chown">chown</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="chroot"> + <term><command>chroot</command></term> + <listitem> + <para>Runs a command with the specified directory as the + <filename class="directory">/</filename> directory</para> + <indexterm zone="ch-system-coreutils chroot"> + <primary sortas="b-chroot">chroot</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="cksum"> + <term><command>cksum</command></term> + <listitem> + <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte + counts of each specified file</para> + <indexterm zone="ch-system-coreutils cksum"> + <primary sortas="b-cksum">cksum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="comm"> + <term><command>comm</command></term> + <listitem> + <para>Compares two sorted files, outputting in three columns the lines + that are unique and the lines that are common</para> + <indexterm zone="ch-system-coreutils comm"> + <primary sortas="b-comm">comm</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="cp"> + <term><command>cp</command></term> + <listitem> + <para>Copies files</para> + <indexterm zone="ch-system-coreutils cp"> + <primary sortas="b-cp">cp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="csplit"> + <term><command>csplit</command></term> + <listitem> + <para>Splits a given file into several new files, separating them + according to given patterns or line numbers and outputting the byte + count of each new file</para> + <indexterm zone="ch-system-coreutils csplit"> + <primary sortas="b-csplit">csplit</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="cut"> + <term><command>cut</command></term> + <listitem> + <para>Prints sections of lines, selecting the parts according to given + fields or positions</para> + <indexterm zone="ch-system-coreutils cut"> + <primary sortas="b-cut">cut</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="date"> + <term><command>date</command></term> + <listitem> + <para>Displays the current time in the given format, or sets the + system date</para> + <indexterm zone="ch-system-coreutils date"> + <primary sortas="b-date">date</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dd"> + <term><command>dd</command> </term> + <listitem> + <para>Copies a file using the given block size and count, while + optionally performing conversions on it</para> + <indexterm zone="ch-system-coreutils dd"> + <primary sortas="b-dd">dd</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="df"> + <term><command>df</command></term> + <listitem> + <para>Reports the amount of disk space available (and used) on all + mounted file systems, or only on the file systems holding the selected + files</para> + <indexterm zone="ch-system-coreutils df"> + <primary sortas="b-df">df</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dir"> + <term><command>dir</command></term> + <listitem> + <para>Lists the contents of each given directory (the same as + the <command>ls</command> command)</para> + <indexterm zone="ch-system-coreutils dir"> + <primary sortas="b-dir">dir</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dircolors"> + <term><command>dircolors</command></term> + <listitem> + <para>Outputs commands to set the <envar>LS_COLOR</envar> + environment variable to change the color scheme used by + <command>ls</command></para> + <indexterm zone="ch-system-coreutils dircolors"> + <primary sortas="b-dircolors">dircolors</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dirname"> + <term><command>dirname</command></term> + <listitem> + <para>Strips the non-directory suffix from a file name</para> + <indexterm zone="ch-system-coreutils dirname"> + <primary sortas="b-dirname">dirname</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="du"> + <term><command>du</command></term> + <listitem> + <para>Reports the amount of disk space used by the current directory, + by each of the given directories (including all subdirectories) or by + each of the given files</para> + <indexterm zone="ch-system-coreutils du"> + <primary sortas="b-du">du</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="echo"> + <term><command>echo</command></term> + <listitem> + <para>Displays the given strings</para> + <indexterm zone="ch-system-coreutils echo"> + <primary sortas="b-echo">echo</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="env"> + <term><command>env</command></term> + <listitem> + <para>Runs a command in a modified environment</para> + <indexterm zone="ch-system-coreutils env"> + <primary sortas="b-env">env</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="expand"> + <term><command>expand</command></term> + <listitem> + <para>Converts tabs to spaces</para> + <indexterm zone="ch-system-coreutils expand"> + <primary sortas="b-expand">expand</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="expr"> + <term><command>expr</command></term> + <listitem> + <para>Evaluates expressions</para> + <indexterm zone="ch-system-coreutils expr"> + <primary sortas="b-expr">expr</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="factor"> + <term><command>factor</command></term> + <listitem> + <para>Prints the prime factors of all specified integer numbers</para> + <indexterm zone="ch-system-coreutils factor"> + <primary sortas="b-factor">factor</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="false"> + <term><command>false</command></term> + <listitem> + <para>Does nothing, unsuccessfully; it always exits with a status code + indicating failure</para> + <indexterm zone="ch-system-coreutils false"> + <primary sortas="b-false">false</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="fmt"> + <term><command>fmt</command></term> + <listitem> + <para>Reformats the paragraphs in the given files</para> + <indexterm zone="ch-system-coreutils fmt"> + <primary sortas="b-fmt">fmt</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="fold"> + <term><command>fold</command></term> + <listitem> + <para>Wraps the lines in the given files</para> + <indexterm zone="ch-system-coreutils fold"> + <primary sortas="b-fold">fold</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="groups"> + <term><command>groups</command></term> + <listitem> + <para>Reports a user's group memberships</para> + <indexterm zone="ch-system-coreutils groups"> + <primary sortas="b-groups">groups</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="head"> + <term><command>head</command></term> + <listitem> + <para>Prints the first ten lines (or the given number of lines) + of each given file</para> + <indexterm zone="ch-system-coreutils head"> + <primary sortas="b-head">head</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="hostid"> + <term><command>hostid</command></term> + <listitem> + <para>Reports the numeric identifier (in hexadecimal) of the host</para> + <indexterm zone="ch-system-coreutils hostid"> + <primary sortas="b-hostid">hostid</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="id"> + <term><command>id</command></term> + <listitem> + <para>Reports the effective user ID, group ID, and group memberships + of the current user or specified user</para> + <indexterm zone="ch-system-coreutils id"> + <primary sortas="b-id">id</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="install"> + <term><command>install</command> </term> + <listitem> + <para>Copies files while setting their permission modes and, if + possible, their owner and group</para> + <indexterm zone="ch-system-coreutils install"> + <primary sortas="b-install">install</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="join"> + <term><command>join</command></term> + <listitem> + <para>Joins the lines that have identical join fields from two + separate files</para> + <indexterm zone="ch-system-coreutils join"> + <primary sortas="b-join">join</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="link"> + <term><command>link</command></term> + <listitem> + <para>Creates a hard link with the given name to a file</para> + <indexterm zone="ch-system-coreutils link"> + <primary sortas="b-link">link</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="ln"> + <term><command>ln</command></term> + <listitem> + <para>Makes hard links or soft (symbolic) links between files</para> + <indexterm zone="ch-system-coreutils ln"> + <primary sortas="b-ln">ln</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="logname"> + <term><command>logname</command></term> + <listitem> + <para>Reports the current user's login name</para> + <indexterm zone="ch-system-coreutils logname"> + <primary sortas="b-logname">logname</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="ls"> + <term><command>ls</command></term> + <listitem> + <para>Lists the contents of each given directory</para> + <indexterm zone="ch-system-coreutils ls"> + <primary sortas="b-ls">ls</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="md5sum"> + <term><command>md5sum</command></term> + <listitem> + <para>Reports or checks Message Digest 5 (MD5) checksums</para> + <indexterm zone="ch-system-coreutils md5sum"> + <primary sortas="b-md5sum">md5sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mkdir"> + <term><command>mkdir</command></term> + <listitem> + <para>Creates directories with the given names</para> + <indexterm zone="ch-system-coreutils mkdir"> + <primary sortas="b-mkdir">mkdir</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mkfifo"> + <term><command>mkfifo</command></term> + <listitem> + <para>Creates First-In, First-Outs (FIFOs), a "named + pipe" in UNIX parlance, with the given names</para> + <indexterm zone="ch-system-coreutils mkfifo"> + <primary sortas="b-mkfifo">mkfifo</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mknod"> + <term><command>mknod</command></term> + <listitem> + <para>Creates device nodes with the given names; a device node is a + character special file, a block special file, or a FIFO</para> + <indexterm zone="ch-system-coreutils mknod"> + <primary sortas="b-mknod">mknod</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mktemp"> + <term><command>mktemp</command></term> + <listitem> + <para>Creates temporary files in a secure manner; it is used in scripts</para> + <indexterm zone="ch-system-coreutils mktemp"> + <primary sortas="b-mktemp">mktemp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mv"> + <term><command>mv</command></term> + <listitem> + <para>Moves or renames files or directories</para> + <indexterm zone="ch-system-coreutils mv"> + <primary sortas="b-mv">mv</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="nice"> + <term><command>nice</command></term> + <listitem> + <para>Runs a program with modified scheduling priority</para> + <indexterm zone="ch-system-coreutils nice"> + <primary sortas="b-nice">nice</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="nl"> + <term><command>nl</command></term> + <listitem> + <para>Numbers the lines from the given files</para> + <indexterm zone="ch-system-coreutils nl"> + <primary sortas="b-nl">nl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="nohup"> + <term><command>nohup</command></term> + <listitem> + <para>Runs a command immune to hangups, with its output redirected to + a log file</para> + <indexterm zone="ch-system-coreutils nohup"> + <primary sortas="b-nohup">nohup</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="nproc"> + <term><command>nproc</command></term> + <listitem> + <para>Prints the number of processing units available to a + process</para> + <indexterm zone="ch-system-coreutils nproc"> + <primary sortas="b-nproc">nproc</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="numfmt"> + <term><command>numfmt</command></term> + <listitem> + <para>Converts numbers to or from human-readable strings</para> + <indexterm zone="ch-system-coreutils numfmt"> + <primary sortas="b-numfmt">numfmt</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="od"> + <term><command>od</command></term> + <listitem> + <para>Dumps files in octal and other formats</para> + <indexterm zone="ch-system-coreutils od"> + <primary sortas="b-od">od</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="paste"> + <term><command>paste</command></term> + <listitem> + <para>Merges the given files, joining sequentially corresponding lines + side by side, separated by tab characters</para> + <indexterm zone="ch-system-coreutils paste"> + <primary sortas="b-paste">paste</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="pathchk"> + <term><command>pathchk</command></term> + <listitem> + <para>Checks if file names are valid or portable</para> + <indexterm zone="ch-system-coreutils pathchk"> + <primary sortas="b-pathchk">pathchk</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="pinky"> + <term><command>pinky</command></term> + <listitem> + <para>Is a lightweight finger client; it reports some information + about the given users</para> + <indexterm zone="ch-system-coreutils pinky"> + <primary sortas="b-pinky">pinky</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="pr"> + <term><command>pr</command></term> + <listitem> + <para>Paginates and columnates files for printing</para> + <indexterm zone="ch-system-coreutils pr"> + <primary sortas="b-pr">pr</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="printenv"> + <term><command>printenv</command></term> + <listitem> + <para>Prints the environment</para> + <indexterm zone="ch-system-coreutils printenv"> + <primary sortas="b-printenv">printenv</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="printf"> + <term><command>printf</command></term> + <listitem> + <para>Prints the given arguments according to the given format, much + like the C printf function</para> + <indexterm zone="ch-system-coreutils printf"> + <primary sortas="b-printf">printf</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="ptx"> + <term><command>ptx</command></term> + <listitem> + <para>Produces a permuted index from the contents of the given files, + with each keyword in its context</para> + <indexterm zone="ch-system-coreutils ptx"> + <primary sortas="b-ptx">ptx</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="pwd"> + <term><command>pwd</command></term> + <listitem> + <para>Reports the name of the current working directory</para> + <indexterm zone="ch-system-coreutils pwd"> + <primary sortas="b-pwd">pwd</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="readlink"> + <term><command>readlink</command></term> + <listitem> + <para>Reports the value of the given symbolic link</para> + <indexterm zone="ch-system-coreutils readlink"> + <primary sortas="b-readlink">readlink</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="realpath"> + <term><command>realpath</command></term> + <listitem> + <para>Prints the resolved path</para> + <indexterm zone="ch-system-coreutils realpath"> + <primary sortas="b-realpath">realpath</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="rm"> + <term><command>rm</command></term> + <listitem> + <para>Removes files or directories</para> + <indexterm zone="ch-system-coreutils rm"> + <primary sortas="b-rm">rm</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="rmdir"> + <term><command>rmdir</command></term> + <listitem> + <para>Removes directories if they are empty</para> + <indexterm zone="ch-system-coreutils rmdir"> + <primary sortas="b-rmdir">rmdir</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="runcon"> + <term><command>runcon</command></term> + <listitem> + <para>Runs a command with specified security context</para> + <indexterm zone="ch-system-coreutils runcon"> + <primary sortas="b-runcon">runcon</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="seq"> + <term><command>seq</command></term> + <listitem> + <para>Prints a sequence of numbers within a given range and with a + given increment</para> + <indexterm zone="ch-system-coreutils seq"> + <primary sortas="b-seq">seq</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sha1sum"> + <term><command>sha1sum</command></term> + <listitem> + <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) + checksums</para> + <indexterm zone="ch-system-coreutils sha1sum"> + <primary sortas="b-sha1sum">sha1sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sha224sum"> + <term><command>sha224sum</command></term> + <listitem> + <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para> + <indexterm zone="ch-system-coreutils sha224sum"> + <primary sortas="b-sha224sum">sha224sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sha256sum"> + <term><command>sha256sum</command></term> + <listitem> + <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para> + <indexterm zone="ch-system-coreutils sha256sum"> + <primary sortas="b-sha256sum">sha256sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sha384sum"> + <term><command>sha384sum</command></term> + <listitem> + <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para> + <indexterm zone="ch-system-coreutils sha384sum"> + <primary sortas="b-sha384sum">sha384sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sha512sum"> + <term><command>sha512sum</command></term> + <listitem> + <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para> + <indexterm zone="ch-system-coreutils sha512sum"> + <primary sortas="b-sha512sum">sha512sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="shred"> + <term><command>shred</command></term> + <listitem> + <para>Overwrites the given files repeatedly with complex patterns, + making it difficult to recover the data</para> + <indexterm zone="ch-system-coreutils shred"> + <primary sortas="b-shred">shred</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="shuf"> + <term><command>shuf</command></term> + <listitem> + <para>Shuffles lines of text</para> + <indexterm zone="ch-system-coreutils shuf"> + <primary sortas="b-shuf">shuf</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sleep"> + <term><command>sleep</command></term> + <listitem> + <para>Pauses for the given amount of time</para> + <indexterm zone="ch-system-coreutils sleep"> + <primary sortas="b-sleep">sleep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sort"> + <term><command>sort</command></term> + <listitem> + <para>Sorts the lines from the given files</para> + <indexterm zone="ch-system-coreutils sort"> + <primary sortas="b-sort">sort</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="split"> + <term><command>split</command></term> + <listitem> + <para>Splits the given file into pieces, by size or by number of + lines</para> + <indexterm zone="ch-system-coreutils split"> + <primary sortas="b-split">split</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="stat"> + <term><command>stat</command></term> + <listitem> + <para>Displays file or filesystem status</para> + <indexterm zone="ch-system-coreutils stat"> + <primary sortas="b-stat">stat</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="stdbuf"> + <term><command>stdbuf</command></term> + <listitem> + <para>Runs commands with altered buffering operations for its standard + streams</para> + <indexterm zone="ch-system-coreutils stdbuf"> + <primary sortas="b-stdbuf">stdbuf</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="stty"> + <term><command>stty</command></term> + <listitem> + <para>Sets or reports terminal line settings</para> + <indexterm zone="ch-system-coreutils stty"> + <primary sortas="b-stty">stty</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sum"> + <term><command>sum</command></term> + <listitem> + <para>Prints checksum and block counts for each given file</para> + <indexterm zone="ch-system-coreutils sum"> + <primary sortas="b-sum">sum</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sync"> + <term><command>sync</command></term> + <listitem> + <para>Flushes file system buffers; it forces changed blocks to disk + and updates the super block</para> + <indexterm zone="ch-system-coreutils sync"> + <primary sortas="b-sync">sync</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tac"> + <term><command>tac</command></term> + <listitem> + <para>Concatenates the given files in reverse</para> + <indexterm zone="ch-system-coreutils tac"> + <primary sortas="b-tac">tac</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tail"> + <term><command>tail</command></term> + <listitem> + <para>Prints the last ten lines (or the given number of lines) of each + given file</para> + <indexterm zone="ch-system-coreutils tail"> + <primary sortas="b-tail">tail</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tee"> + <term><command>tee</command></term> + <listitem> + <para>Reads from standard input while writing both to standard output + and to the given files</para> + <indexterm zone="ch-system-coreutils tee"> + <primary sortas="b-tee">tee</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="test"> + <term><command>test</command></term> + <listitem> + <para>Compares values and checks file types</para> + <indexterm zone="ch-system-coreutils test"> + <primary sortas="b-test">test</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="timeout"> + <term><command>timeout</command></term> + <listitem> + <para>Runs a command with a time limit</para> + <indexterm zone="ch-system-coreutils timeout"> + <primary sortas="b-timeout">timeout</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="touch"> + <term><command>touch</command></term> + <listitem> + <para>Changes file timestamps, setting the access and modification + times of the given files to the current time; files that do not exist + are created with zero length</para> + <indexterm zone="ch-system-coreutils touch"> + <primary sortas="b-touch">touch</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tr"> + <term><command>tr</command></term> + <listitem> + <para>Translates, squeezes, and deletes the given characters from + standard input</para> + <indexterm zone="ch-system-coreutils tr"> + <primary sortas="b-tr">tr</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="true"> + <term><command>true</command></term> + <listitem> + <para>Does nothing, successfully; it always exits with a status code + indicating success</para> + <indexterm zone="ch-system-coreutils true"> + <primary sortas="b-true">true</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="truncate"> + <term><command>truncate</command></term> + <listitem> + <para>Shrinks or expands a file to the specified size</para> + <indexterm zone="ch-system-coreutils truncate"> + <primary sortas="b-truncate">truncate</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tsort"> + <term><command>tsort</command></term> + <listitem> + <para>Performs a topological sort; it writes a completely ordered list + according to the partial ordering in a given file</para> + <indexterm zone="ch-system-coreutils tsort"> + <primary sortas="b-tsort">tsort</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tty"> + <term><command>tty</command></term> + <listitem> + <para>Reports the file name of the terminal connected to standard + input</para> + <indexterm zone="ch-system-coreutils tty"> + <primary sortas="b-tty">tty</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="uname"> + <term><command>uname</command></term> + <listitem> + <para>Reports system information</para> + <indexterm zone="ch-system-coreutils uname"> + <primary sortas="b-uname">uname</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="unexpand"> + <term><command>unexpand</command></term> + <listitem> + <para>Converts spaces to tabs</para> + <indexterm zone="ch-system-coreutils unexpand"> + <primary sortas="b-unexpand">unexpand</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="uniq"> + <term><command>uniq</command></term> + <listitem> + <para>Discards all but one of successive identical lines</para> + <indexterm zone="ch-system-coreutils uniq"> + <primary sortas="b-uniq">uniq</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="unlink"> + <term><command>unlink</command></term> + <listitem> + <para>Removes the given file</para> + <indexterm zone="ch-system-coreutils unlink"> + <primary sortas="b-unlink">unlink</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="users"> + <term><command>users</command></term> + <listitem> + <para>Reports the names of the users currently logged on</para> + <indexterm zone="ch-system-coreutils users"> + <primary sortas="b-users">users</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="vdir"> + <term><command>vdir</command></term> + <listitem> + <para>Is the same as <command>ls -l</command></para> + <indexterm zone="ch-system-coreutils vdir"> + <primary sortas="b-vdir">vdir</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="wc"> + <term><command>wc</command></term> + <listitem> + <para>Reports the number of lines, words, and bytes for each given + file, as well as a total line when more than one file is given</para> + <indexterm zone="ch-system-coreutils wc"> + <primary sortas="b-wc">wc</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="who"> + <term><command>who</command></term> + <listitem> + <para>Reports who is logged on</para> + <indexterm zone="ch-system-coreutils who"> + <primary sortas="b-who">who</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="whoami"> + <term><command>whoami</command></term> + <listitem> + <para>Reports the user name associated with the current effective + user ID</para> + <indexterm zone="ch-system-coreutils whoami"> + <primary sortas="b-whoami">whoami</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="yes"> + <term><command>yes</command></term> + <listitem> + <para>Repeatedly outputs <quote>y</quote> or a given string until + killed</para> + <indexterm zone="ch-system-coreutils yes"> + <primary sortas="b-yes">yes</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libstdbuf"> + <term><filename class="libraryfile">libstdbuf</filename></term> + <listitem> + <para>Library used by <command>stdbuf</command></para> + <indexterm zone="ch-system-coreutils libstdbuf"> + <primary sortas="c-libstdbuf">libstdbuf</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/dbus.xml b/chapter08/dbus.xml index bb4bffc76..211399207 100644 --- a/chapter06/dbus.xml +++ b/chapter08/dbus.xml @@ -36,8 +36,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&dbus-ch6-sbu;</seg> - <seg>&dbus-ch6-du;</seg> + <seg>&dbus-fin-sbu;</seg> + <seg>&dbus-fin-du;</seg> </seglistitem> </segmentedlist> @@ -63,7 +63,7 @@ <varlistentry> <term><parameter>--with-console-auth-dir=/run/console</parameter></term> <listitem> - <para>This specifies the location of the ConsoleKit auth + <para>This specifies the location of the ConsoleKit authorization directory.</para> </listitem> </varlistentry> @@ -91,7 +91,7 @@ <screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen> - <para>Create a symlink, so that D-Bus and systemd can use the same + <para>Create a symlink so that D-Bus and systemd can use the same <filename>machine-id</filename> file:</para> <screen><userinput remap="install">ln -sfv /etc/machine-id /var/lib/dbus</userinput></screen> @@ -130,7 +130,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri <varlistentry id="dbus-cleanup-sockets"> <term><command>dbus-cleanup-sockets</command></term> <listitem> - <para>Used to clean up leftover sockets in a directory</para> + <para>is used to remove leftover sockets in a directory</para> <indexterm zone="ch-system-dbus dbus-cleanup-sockets"> <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary> </indexterm> @@ -140,7 +140,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri <varlistentry id="dbus-daemon"> <term><command>dbus-daemon</command></term> <listitem> - <para>The D-Bus message bus daemon</para> + <para>Is the D-Bus message bus daemon</para> <indexterm zone="ch-system-dbus dbus-daemon"> <primary sortas="b-dbus-daemon">dbus-daemon</primary> </indexterm> @@ -193,7 +193,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri <varlistentry id="dbus-test-tool"> <term><command>dbus-test-tool</command></term> <listitem> - <para>A tool to help packages test + <para>Is a tool to help packages test <application>D-Bus</application></para> <indexterm zone="ch-system-dbus dbus-test-tool"> <primary sortas="b-dbus-test-tool">dbus-test-tool</primary> diff --git a/chapter05/dejagnu.xml b/chapter08/dejagnu.xml index a821e9bba..da6a44aa9 100644 --- a/chapter05/dejagnu.xml +++ b/chapter08/dejagnu.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&dejagnu-ch5-sbu;</seg> - <seg>&dejagnu-ch5-du;</seg> + <seg>&dejagnu-tmp-sbu;</seg> + <seg>&dejagnu-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -44,11 +44,15 @@ <para>Prepare DejaGNU for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr +makeinfo --html --no-split -o doc/dejagnu.html doc/dejagnu.texi +makeinfo --plaintext -o doc/dejagnu.txt doc/dejagnu.texi</userinput></screen> <para>Build and install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make install +install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version; +install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen> <para>To test the results, issue:</para> diff --git a/chapter08/diffutils.xml b/chapter08/diffutils.xml new file mode 100644 index 000000000..8889077d5 --- /dev/null +++ b/chapter08/diffutils.xml @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-diffutils" role="wrap"> + <?dbhtml filename="diffutils.html"?> + + <sect1info condition="script"> + <productname>diffutils</productname> + <productnumber>&diffutils-version;</productnumber> + <address>&diffutils-url;</address> + </sect1info> + + <title>Diffutils-&diffutils-version;</title> + + <indexterm zone="ch-system-diffutils"> + <primary sortas="a-Diffutils">Diffutils</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Diffutils package contains programs that show the differences + between files or directories.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&diffutils-fin-sbu;</seg> + <seg>&diffutils-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Diffutils</title> + + <para>Prepare Diffutils for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + + <sect2 id="contents-diffutils" role="content"> + <title>Contents of Diffutils</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + + <seglistitem> + <seg>cmp, diff, diff3, and sdiff</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="cmp"> + <term><command>cmp</command></term> + <listitem> + <para>Compares two files and reports whether or in which bytes they + differ</para> + <indexterm zone="ch-system-diffutils cmp"> + <primary sortas="b-cmp">cmp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="diff"> + <term><command>diff</command></term> + <listitem> + <para>Compares two files or directories and reports which lines in + the files differ</para> + <indexterm zone="ch-system-diffutils diff"> + <primary sortas="b-diff">diff</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="diff3"> + <term><command>diff3</command></term> + <listitem> + <para>Compares three files line by line</para> + <indexterm zone="ch-system-diffutils diff3"> + <primary sortas="b-diff3">diff3</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sdiff"> + <term><command>sdiff</command></term> + <listitem> + <para>Merges two files and interactively outputs the results</para> + <indexterm zone="ch-system-diffutils sdiff"> + <primary sortas="b-sdiff">sdiff</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/e2fsprogs.xml b/chapter08/e2fsprogs.xml index 529324061..65d8604cd 100644 --- a/chapter06/e2fsprogs.xml +++ b/chapter08/e2fsprogs.xml @@ -23,7 +23,7 @@ <sect2 role="package"> <title/> - <para>The E2fsprogs package contains the utilities for handling the + <para>The e2fsprogs package contains the utilities for handling the <systemitem class="filesystem">ext2</systemitem> file system. It also supports the <systemitem class="filesystem">ext3</systemitem> and <systemitem class="filesystem">ext4</systemitem> journaling @@ -34,8 +34,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&e2fsprogs-ch6-sbu;</seg> - <seg>&e2fsprogs-ch6-du;</seg> + <seg>&e2fsprogs-fin-sbu;</seg> + <seg>&e2fsprogs-fin-du;</seg> </seglistitem> </segmentedlist> @@ -44,19 +44,14 @@ <sect2 role="installation"> <title>Installation of E2fsprogs</title> - <para>The E2fsprogs documentation recommends that the package be built in + <para>The e2fsprogs documentation recommends that the package be built in a subdirectory of the source tree: </para> <screen><userinput remap="pre">mkdir -v build cd build</userinput></screen> - <para>Prepare E2fsprogs for compilation:</para> + <para>Prepare e2fsprogs for compilation:</para> -<!--<screen><userinput remap="configure">LIBS=-L/tools/lib \ -CFLAGS=-I/tools/include \ -CFLAGS=-I/tools/include \ -PKG_CONFIG_PATH=/tools/lib/pkgconfig \ -../configure - -prefix=/usr \--> <screen><userinput remap="configure">../configure --prefix=/usr \ --bindir=/bin \ --with-root-prefix="" \ @@ -67,16 +62,8 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \ --disable-fsck</userinput></screen> <variablelist> - <title>The meaning of the environment variable and configure options:</title> -<!-- - <varlistentry> - <term><parameter>PKG_CONFIG_PATH, LIBS, CFLAGS</parameter></term> - <listitem> - <para>These variables enable e2fsprogs to be built using the - <xref linkend="ch-tools-util-linux"/> package built earlier.</para> - </listitem> - </varlistentry> ---> + <title>The meaning of the configure options:</title> + <varlistentry> <term><parameter>--with-root-prefix=""</parameter> and <parameter>--bindir=/bin</parameter></term> @@ -87,7 +74,7 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \ programs still need to be available. They belong in directories like <filename class="directory">/lib</filename> and <filename class="directory">/sbin</filename>. If this option is not passed - to E2fsprogs' configure, the programs are installed into the + to configure, the programs are installed into the <filename class="directory">/usr</filename> directory.</para> </listitem> </varlistentry> @@ -103,11 +90,11 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \ <varlistentry> <term><parameter>--disable-*</parameter></term> <listitem> - <para>This prevents E2fsprogs from building and installing the + <para>This prevents e2fsprogs from building and installing the <systemitem class="library">libuuid</systemitem> and <systemitem class="library">libblkid</systemitem> libraries, the <systemitem class="daemon">uuidd</systemitem> daemon, and the - <command>fsck</command> wrapper, as Util-Linux installs more + <command>fsck</command> wrapper, as util-linux installs more recent versions.</para> </listitem> </varlistentry> @@ -117,25 +104,20 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \ <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> -<!-- - <para>To set up and run the test suite we need to first link some - libraries from /tools/lib to a location where the test programs look. - To run the tests, issue:</para> ---> <para>To run the tests, issue:</para> <screen><userinput remap="test">make check</userinput></screen> -<!--ln -sfv /tools/lib/lib{blk,uu}id.so.1 lib --> -<!--make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>--> - - <para>One of the E2fsprogs tests will attempt to allocate 256 MB of memory. +<!-- This is a ridiculous amount now! And is it still true? + <para>One of the e2fsprogs tests will attempt to allocate 256 MB of memory. If you do not have significantly more RAM than this, be sure to enable sufficient swap space for the test. See <xref linkend="ch-partitioning-creatingfilesystem"/> and <xref linkend="ch-partitioning-mounting"/> for details on creating and enabling swap space.</para> - +--> + <para>On a spinning disk, the tests take a little more than 4 SBUs. They + can be much shorter on an SSD (down to about 1.5 SBUs).</para> <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> diff --git a/chapter06/eudev.xml b/chapter08/eudev.xml index b3ba1f568..c8e17e3d5 100644 --- a/chapter06/eudev.xml +++ b/chapter08/eudev.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&eudev-ch6-sbu;</seg> - <seg>&eudev-ch6-du;</seg> + <seg>&eudev-fin-sbu;</seg> + <seg>&eudev-fin-du;</seg> </seglistitem> </segmentedlist> </sect2> @@ -89,10 +89,12 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Eudev - 32-bit</title> + <title>Installation of Eudev - 32bit</title> <para>Clean previous build:</para> @@ -105,11 +107,11 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen> --prefix=/usr \ --bindir=/sbin \ --sbindir=/sbin \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --sysconfdir=/etc \ - --libexecdir=/lib32 \ + --libexecdir=&lib-m32; \ --with-rootprefix= \ - --with-rootlibdir=/usr/lib32 \ + --with-rootlibdir=&usr-lib-m32; \ --disable-manpages \ --disable-static \ --config-cache</userinput></screen> @@ -121,15 +123,17 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> - - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Eudev - x32-bit</title> + <title>Installation of Eudev - x32bit</title> <para>Clean previous build:</para> @@ -138,16 +142,16 @@ rm -rf DESTDIR</userinput></screen> <para>Prepare Eudev for compilation:</para> <screen><userinput remap="configure">CC="gcc -mx32" \ -./configure --prefix=/usr \ - --bindir=/sbin \ - --sbindir=/sbin \ - --libdir=/usr/libx32 \ - --sysconfdir=/etc \ - --libexecdir=/libx32 \ - --with-rootprefix= \ - --with-rootlibdir=/usr/libx32 \ - --disable-manpages \ - --disable-static \ +./configure --prefix=/usr \ + --bindir=/sbin \ + --sbindir=/sbin \ + --libdir=&usr-lib-mx32; \ + --sysconfdir=/etc \ + --libexecdir=&lib-mx32; \ + --with-rootprefix= \ + --with-rootlibdir=&usr-lib-mx32; \ + --disable-manpages \ + --disable-static \ --config-cache</userinput></screen> <para>Compile the package:</para> @@ -157,11 +161,11 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> - + </sect2><!-- mx32 --> + <sect2 id="conf-eudev" role="configuration"> <title>Configuring Eudev</title> diff --git a/chapter06/expat.xml b/chapter08/expat.xml index dc84d65c1..dae9016fe 100644 --- a/chapter06/expat.xml +++ b/chapter08/expat.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&expat-ch6-sbu;</seg> - <seg>&expat-ch6-du;</seg> + <seg>&expat-fin-sbu;</seg> + <seg>&expat-fin-du;</seg> </seglistitem> </segmentedlist> @@ -41,10 +41,6 @@ <sect2 role="installation"> <title>Installation of Expat</title> - <para>First fix a problem with the regression tests in the LFS environment:</para> - -<screen><userinput remap="pre">sed -i 's|usr/bin/env |bin/|' run.sh.in</userinput></screen> - <para>Prepare Expat for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr \ @@ -69,10 +65,12 @@ </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Expat - 32-bit</title> + <title>Installation of Expat - 32bit</title> <para>Clean previous build but keep precompiled doc because it cannot be rebuilt in this stage of the system:</para> @@ -84,7 +82,7 @@ make clean</userinput></screen> <screen><userinput remap="configure">CC="gcc -m32" ./configure \ --prefix=/usr \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu</userinput></screen> <para>Compile the package:</para> @@ -94,17 +92,20 @@ make clean</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Expat - x32-bit</title> + <title>Installation of Expat - x32bit</title> - <para>Clean previous build:</para> + <para>Clean previous build but keep precompiled doc because it + cannot be rebuilt in this stage of the system:</para> <screen><userinput remap="pre">sed -e "/^am__append_1/ s/doc//" -i Makefile make clean</userinput></screen> @@ -112,8 +113,8 @@ make clean</userinput></screen> <para>Prepare Expat for compilation:</para> <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ - --prefix=/usr \ - --libdir=/usr/libx32 \ + --prefix=/usr \ + --libdir=&usr-lib-mx32; \ --host=x86_64-pc-linux-gnux32</userinput></screen> <para>Compile the package:</para> @@ -123,10 +124,10 @@ make clean</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-expat" role="content"> <title>Contents of Expat</title> diff --git a/chapter05/expect.xml b/chapter08/expect.xml index a2cc67d0e..da374bd9d 100644 --- a/chapter05/expect.xml +++ b/chapter08/expect.xml @@ -38,8 +38,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&expect-ch5-sbu;</seg> - <seg>&expect-ch5-du;</seg> + <seg>&expect-tmp-sbu;</seg> + <seg>&expect-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -48,39 +48,31 @@ <sect2 role="installation"> <title>Installation of Expect</title> - <para>First, force Expect's configure script to use <filename>/bin/stty</filename> - instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system. - This will ensure that our test suite tools remain sane for the final builds of our - toolchain:</para> + <para>Prepare Expect for compilation:</para> -<screen><userinput remap="pre">cp -v configure{,.orig} -sed 's:/usr/local/bin:/bin:' configure.orig > configure</userinput></screen> - - <para>Now prepare Expect for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/tools \ - --with-tcl=/tools/lib \ - --with-tclinclude=/tools/include</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --with-tcl=/usr/lib \ + --enable-shared \ + --mandir=/usr/share/man \ + --with-tclinclude=/usr/include</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>--with-tcl=/tools/lib</parameter></term> + <term><parameter>--with-tcl=/usr/lib</parameter></term> <listitem> - <para>This ensures that the configure script finds the Tcl - installation in the temporary tools location instead of possibly - locating an existing one on the host system.</para> + <para>This parameter is needed to tell + <command>configure</command> where the + <command>tclConfig.sh</command> script is located.</para> </listitem> </varlistentry> <varlistentry> - <term><parameter>--with-tclinclude=/tools/include</parameter></term> + <term><parameter>--with-tclinclude=/usr/include</parameter></term> <listitem> <para>This explicitly tells Expect where to find Tcl's internal - headers. Using this option avoids conditions where - <command>configure</command> fails because it cannot automatically - discover the location of Tcl's headers.</para> + headers.</para> </listitem> </varlistentry> @@ -90,33 +82,14 @@ sed 's:/usr/local/bin:/bin:' configure.orig > configure</userinput></screen> <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Expect test suite anyway, issue the following command:</para> + <para>To test the results, issue:</para> <screen><userinput remap="test">make test</userinput></screen> - <para>Note that the Expect test suite is known to experience failures under - certain host conditions that are not within our control. Therefore, - test suite failures here are not surprising and are not considered - critical.</para> - <para>Install the package:</para> -<screen><userinput remap="install">make SCRIPTS="" install</userinput></screen> - - <variablelist> - <title>The meaning of the make parameter:</title> - - <varlistentry> - <term><parameter>SCRIPTS=""</parameter></term> - <listitem> - <para>This prevents installation of the supplementary Expect - scripts, which are not needed.</para> - </listitem> - </varlistentry> - - </variablelist> +<screen><userinput remap="install">make install +ln -svf expect&expect-version;/libexpect&expect-version;.so /usr/lib</userinput></screen> </sect2> diff --git a/chapter08/file.xml b/chapter08/file.xml new file mode 100644 index 000000000..b444fdad2 --- /dev/null +++ b/chapter08/file.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-file" role="wrap"> + <?dbhtml filename="file.html"?> + + <sect1info condition="script"> + <productname>file</productname> + <productnumber>&file-version;</productnumber> + <address>&file-url;</address> + </sect1info> + + <title>File-&file-version;</title> + + <indexterm zone="ch-system-file"> + <primary sortas="a-File">File</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The File package contains a utility for determining the type of a given + file or files.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&file-fin-sbu;</seg> + <seg>&file-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of File</title> + + <para>Prepare File for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_32,ml_all" role="installation"> + <title>Installation of File - 32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare File for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -m32" ./configure \ + --prefix=/usr \ + --libdir=&usr-lib-m32; \ + --host=i686-pc-linux-gnu</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_x32,ml_all" role="installation"> + <title>Installation of File - x32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare File for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ + --prefix=/usr \ + --libdir=&usr-lib-mx32; \ + --host=x86_64-pc-linux-gnux32</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- mx32 --> + + <sect2 id="contents-file" role="content"> + <title>Contents of File</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed library</segtitle> + + <seglistitem> + <seg>file</seg> + <seg>libmagic.so</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="file"> + <term><command>file</command></term> + <listitem> + <para>Tries to classify each given file; it does this by performing + several tests—file system tests, magic number tests, and language + tests</para> + <indexterm zone="ch-system-file file"> + <primary sortas="b-file">file</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libmagic"> + <term><filename class="libraryfile">libmagic</filename></term> + <listitem> + <para>Contains routines for magic number recognition, used by the + <command>file</command> program</para> + <indexterm zone="ch-system-file libmagic"> + <primary sortas="c-libmagic">libmagic</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter08/findutils.xml b/chapter08/findutils.xml new file mode 100644 index 000000000..f55e5cbb1 --- /dev/null +++ b/chapter08/findutils.xml @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-findutils" role="wrap"> + <?dbhtml filename="findutils.html"?> + + <sect1info condition="script"> + <productname>findutils</productname> + <productnumber>&findutils-version;</productnumber> + <address>&findutils-url;</address> + </sect1info> + + <title>Findutils-&findutils-version;</title> + + <indexterm zone="ch-system-findutils"> + <primary sortas="a-Findutils">Findutils</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Findutils package contains programs to find files. These programs + are provided to recursively search through a directory tree and to + create, maintain, and search a database (often faster than the recursive + find, but is unreliable if the database has not been recently updated).</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&findutils-fin-sbu;</seg> + <seg>&findutils-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Findutils</title> + + <para>Prepare Findutils for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--localstatedir</parameter></term> + <listitem> + <para>This option changes the location of the <command>locate</command> + database to be in <filename class="directory">/var/lib/locate</filename>, + which is FHS-compliant.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">chown -Rv tester . +su tester -c "PATH=$PATH make check"</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para revision="sysv">Some of the scripts in the LFS-Bootscripts package + depend on <command>find</command>. As <filename + class="directory">/usr</filename> may not be available during the early + stages of booting, this program needs to be on the root partition. The + <command>updatedb</command> script also needs to be modified to correct an + explicit path:</para> + + <para revision="systemd"> Some packages in BLFS and beyond expect the + <command>find</command> program in <filename + class="directory">/bin</filename>, so make sure it's placed there:</para> + +<screen><userinput remap="install">mv -v /usr/bin/find /bin +sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen> + + </sect2> + + <sect2 id="contents-findutils" role="content"> + <title>Contents of Findutils</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed directory</segtitle> + + <seglistitem> + <seg>find, locate, updatedb, and xargs</seg> + <seg>/var/lib/locate</seg> + </seglistitem> + + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="find"> + <term><command>find</command></term> + <listitem> + <para>Searches given directory trees for files matching the specified + criteria</para> + <indexterm zone="ch-system-findutils find"> + <primary sortas="b-find">find</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="locate"> + <term><command>locate</command></term> + <listitem> + <para>Searches through a database of file names and reports the names + that contain a given string or match a given pattern</para> + <indexterm zone="ch-system-findutils locate"> + <primary sortas="b-locate">locate</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="updatedb"> + <term><command>updatedb</command></term> + <listitem> + <para>Updates the <command>locate</command> database; it scans the + entire file system (including other file systems that are currently + mounted, unless told not to) and puts every file name it finds into + the database</para> + <indexterm zone="ch-system-findutils updatedb"> + <primary sortas="b-updatedb">updatedb</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xargs"> + <term><command>xargs</command></term> + <listitem> + <para>Can be used to apply a given command to a list of files</para> + <indexterm zone="ch-system-findutils xargs"> + <primary sortas="b-xargs">xargs</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/flex.xml b/chapter08/flex.xml index bd4bd545f..fc8574c1d 100644 --- a/chapter06/flex.xml +++ b/chapter08/flex.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&flex-ch6-sbu;</seg> - <seg>&flex-ch6-du;</seg> + <seg>&flex-fin-sbu;</seg> + <seg>&flex-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter08/gawk.xml b/chapter08/gawk.xml new file mode 100644 index 000000000..940fe3833 --- /dev/null +++ b/chapter08/gawk.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-gawk" role="wrap"> + <?dbhtml filename="gawk.html"?> + + <sect1info condition="script"> + <productname>gawk</productname> + <productnumber>&gawk-version;</productnumber> + <address>&gawk-url;</address> + </sect1info> + + <title>Gawk-&gawk-version;</title> + + <indexterm zone="ch-system-gawk"> + <primary sortas="a-Gawk">Gawk</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Gawk package contains programs for manipulating text files.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&gawk-fin-sbu;</seg> + <seg>&gawk-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Gawk</title> + + <para>First, ensure some unneeded files are not installed:</para> + +<screen><userinput remap="pre">sed -i 's/extras//' Makefile.in</userinput></screen> + + <para>Prepare Gawk for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para>If desired, install the documentation:</para> + +<screen><userinput remap="install">mkdir -v /usr/share/doc/gawk-&gawk-version; +cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen> + + </sect2> + + <sect2 id="contents-gawk" role="content"> + <title>Contents of Gawk</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed libraries</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + <seg>awk (link to gawk), gawk, and awk-&gawk-version;</seg> + <seg>filefuncs.so, fnmatch.so, fork.so, inplace.so, intdiv.so, ordchr.so, + readdir.so, readfile.so, revoutput.so, revtwoway.so, rwarray.so, + and time.so (all in /usr/lib/gawk)</seg> + <seg>/usr/lib/gawk, /usr/libexec/awk, /usr/share/awk, and + /usr/share/doc/gawk-&gawk-version;</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="awk"> + <term><command>awk</command></term> + <listitem> + <para>A link to <command>gawk</command></para> + <indexterm zone="ch-system-gawk awk"> + <primary sortas="b-awk">awk</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="gawk"> + <term><command>gawk</command></term> + <listitem> + <para>A program for manipulating text files; it is the GNU + implementation of <command>awk</command></para> + <indexterm zone="ch-system-gawk gawk"> + <primary sortas="b-gawk">gawk</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="gawk-version"> + <term><command>gawk-&gawk-version;</command></term> + <listitem> + <para>A hard link to <command>gawk</command></para> + <indexterm zone="ch-system-gawk gawk-version"> + <primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/gcc.xml b/chapter08/gcc.xml index 5eabb9ce5..c811b714d 100644 --- a/chapter06/gcc.xml +++ b/chapter08/gcc.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gcc-ch6-sbu;</seg> - <seg>&gcc-ch6-du;</seg> + <seg>&gcc-fin-sbu;</seg> + <seg>&gcc-fin-du;</seg> </seglistitem> </segmentedlist> @@ -41,8 +41,8 @@ <sect2 role="installation"> <title>Installation of GCC</title> - <para arch="default">If building on x86_64, change the default directory - name for 64-bit libraries to <quote>lib</quote>:</para> + <para arch="default">If building on x86_64, change the default directory name for 64-bit + libraries to <quote>lib</quote>:</para> <screen arch="default"><userinput remap="pre">case $(uname -m) in x86_64) @@ -54,8 +54,8 @@ esac</userinput></screen> <para arch="ml_32,ml_x32,ml_all">Change the default directory name for 64-bit libraries to <quote>lib</quote>:</para> -<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ - -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \ +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ + -e '/m32=/s/m32=.*/m32=..\&lib-m32;$(call if_multiarch,:i386-linux-gnu)/' \ -i.orig gcc/config/i386/t-linux64</userinput></screen> <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> @@ -65,47 +65,46 @@ cd build</userinput></screen> <para>Prepare GCC for compilation:</para> -<screen><userinput arch="default" remap="configure">mloptions="--disable-multilib"</userinput> -<userinput arch="ml_32,ml_x32,ml_all" remap="configure">mloptions="--enable-multilib --with-multilib-list=m64"</userinput> -<userinput arch="ml_32,ml_all" remap="configure">mloptions="$mloptions,m32"</userinput> -<userinput arch="ml_x32,ml_all" remap="configure">mloptions="$mloptions,mx32"</userinput> -<userinput remap="configure">SED=sed \ -../configure --prefix=/usr \ +<screen arch="default"><userinput remap="configure">../configure --prefix=/usr \ + LD=ld \ --enable-languages=c,c++ \ + --disable-multilib \ --disable-bootstrap \ - --with-system-zlib \ - $mloptions</userinput></screen> - - <para>Note that for other languages, there are some prerequisites that + --with-system-zlib</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure" + arch="ml_32" >mlist=m64,m32</userinput><userinput remap="configure" + arch="ml_x32">mlist=m64,mx32</userinput><userinput remap="configure" + arch="ml_all">mlist=m64,m32,mx32</userinput> +<userinput remap="configure">../configure --prefix=/usr \ + LD=ld \ + --enable-languages=c,c++ \ + --enable-multilib \ + --with-multilib-list=$mlist \ + --disable-bootstrap \ + --with-system-zlib</userinput></screen> + + <para>Note that for other programming languages there are some prerequisites that are not yet available. See the - <ulink url="&blfs-book;general/gcc.html">BLFS Book</ulink> + <ulink url="&blfs-book;general/gcc.html">BLFS Book GCC page</ulink> for instructions on how to build all of GCC's supported languages.</para> <variablelist> <title>The meaning of the new configure parameters:</title> <varlistentry> - <term><envar>SED=sed</envar></term> + <term><parameter>LD=ld</parameter></term> <listitem> - <para>Setting this environment variable prevents a hard-coded - path to /tools/bin/sed.</para> + <para>This parameter makes the configure script use the ld installed + by the binutils built earlier in this chapter, rather than + the cross-built version which would otherwise be used.</para> </listitem> </varlistentry> - <!-- - <varlistentry> - <term><parameter>- -disable-libmpx</parameter></term> - <listitem> - <para>This switch tells GCC to not build mpx (Memory Protection - Extensions) that can cause problems on some processors. It has - been removed from the next version of gcc.</para> - </listitem> - </varlistentry> - --> + <varlistentry> <term><parameter>--with-system-zlib</parameter></term> <listitem> <para>This switch tells GCC to link to the system installed copy of - the Zlib library, rather than its own internal copy.</para> + the zlib library, rather than its own internal copy.</para> </listitem> </varlistentry> </variablelist> @@ -119,8 +118,8 @@ cd build</userinput></screen> critical. Do not skip it under any circumstance.</para> </important> - <para>One set of tests in the GCC test suite is known to exhaust the stack, - so increase the stack size prior to running the tests:</para> + <para>One set of tests in the GCC test suite is known to exhaust the default + stack, so increase the stack size prior to running the tests:</para> <screen><userinput remap="test">ulimit -s 32768</userinput></screen> @@ -143,10 +142,11 @@ su tester -c "PATH=$PATH make -k check"</userinput></screen> <para>Six tests related to get_time are known to fail. These are apparently related to the en_HK locale.</para> +<!-- don't fail anymore after the move of iana-etc and /etc/hosts <para>Two tests named lookup.cc and reverse.cc in experimental/net are known to fail in LFS chroot environment because they require /etc/hosts and iana-etc.</para> - +--> <para>A few unexpected failures cannot always be avoided. The GCC developers are usually aware of these issues, but have not resolved them yet. Unless the test results are vastly different from those at the above URL, @@ -172,19 +172,19 @@ rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</useri <systemitem class="username">root</systemitem> user and group:</para> <screen><userinput remap="install">chown -v -R root:root \ - /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include{,-fixed}</userinput></screen> + /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen> <para>Create a symlink required by the <ulink url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s09.html">FHS</ulink> for "historical" reasons.</para> <screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen> - + <!-- already done earlier <para>Many packages use the name <command>cc</command> to call the C compiler. To satisfy those packages, create a symlink:</para> <screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen> - + --> <para>Add a compatibility symlink to enable building programs with Link Time Optimization (LTO):</para> @@ -194,7 +194,7 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ <para>Now that our final toolchain is in place, it is important to again ensure that compiling and linking will work as expected. We do this by performing - the same sanity checks as we did earlier in the chapter:</para> + some sanity checks:</para> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml" @@ -224,8 +224,8 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> - <para>Depending on your machine architecture, the above may differ slightly, - the difference usually being the name of the directory + <para>Depending on your machine architecture, the above may differ slightly. + The difference will be the name of the directory after <filename class="directory">/usr/lib/gcc</filename>. The important thing to look for here is that <command>gcc</command> has found all three <filename>crt*.o</filename> files under the @@ -247,16 +247,8 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed /usr/include</computeroutput></screen> - <para>Again, note that the directory named after your target triplet may be - different than the above, depending on your architecture.</para> - -<!-- This appears to be obsolete - - <note><para>As of version 4.3.0, GCC now unconditionally installs the - <filename>limits.h</filename> file into the private - <filename class="directory">include-fixed</filename> directory, and that - directory is required to be in place.</para></note> ---> + <para>Again, the directory named after your target triplet may be + different than the above, depending on your system architecture.</para> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml" @@ -279,9 +271,10 @@ SEARCH_DIR("/usr/local/lib") SEARCH_DIR("/lib") SEARCH_DIR("/usr/lib");</computeroutput></screen> - <para arch="default">A 32-bit system may see a few different directories. - For example, here is the output from an i686 machine:</para> + <para arch="default">A 32-bit system may see a few different directories. For example, here + is the output from an i686 machine:</para> +<!-- not using entities here as the dir names has nothing to do with multilib --> <screen arch="default"><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32") SEARCH_DIR("/usr/local/lib32") SEARCH_DIR("/lib32") @@ -338,7 +331,7 @@ SEARCH_DIR("/usr/lib");</computeroutput></screen> <para>Finally, move a misplaced file:</para> <screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib -mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> +mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> </sect2> diff --git a/chapter06/gdbm.xml b/chapter08/gdbm.xml index f953b63f9..df2ab3409 100644 --- a/chapter06/gdbm.xml +++ b/chapter08/gdbm.xml @@ -24,7 +24,7 @@ <title/> <para>The GDBM package contains the GNU Database Manager. It is a library - of database functions that use extensible hashing and work similar to the + of database functions that use extensible hashing and works similar to the standard UNIX dbm. The library provides primitives for storing key/data pairs, searching and retrieving the data by its key and deleting a key along with its data. </para> @@ -34,8 +34,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gdbm-ch6-sbu;</seg> - <seg>&gdbm-ch6-du;</seg> + <seg>&gdbm-fin-sbu;</seg> + <seg>&gdbm-fin-du;</seg> </seglistitem> </segmentedlist> @@ -60,8 +60,8 @@ <varlistentry> <term><envar>--enable-libgdbm-compat</envar></term> <listitem> - <para>This switch enables the libgdbm compatibility library to be - built, as some packages outside of LFS may require the older DBM + <para>This switch enables building the libgdbm compatibility library. + Some packages outside of LFS may require the older DBM routines it provides.</para> </listitem> </varlistentry> diff --git a/chapter06/gettext.xml b/chapter08/gettext.xml index 2c4683804..cafe26182 100644 --- a/chapter06/gettext.xml +++ b/chapter08/gettext.xml @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gettext-ch6-sbu;</seg> - <seg>&gettext-ch6-du;</seg> + <seg>&gettext-fin-sbu;</seg> + <seg>&gettext-fin-du;</seg> </seglistitem> </segmentedlist> @@ -43,31 +43,6 @@ <sect2 role="installation"> <title>Installation of Gettext</title> - <!-- This has been fixed in upstream gnulib, when a new version of - gettext is released, please check #4055 to see if the change has been - picked up in this package - - As of April 11, 2018, 'TESTS = test-lock' is in gettext-runtime/tests/Makefile.am - Perhaps the test is fixed. - - There is no reference to 'test' or TEST in gettext-tools/gnulib-tests/Makefile.am - --> - <!-- - <para>First, suppress two invocations of test-lock which on some machines - can loop forever:</para> - -<screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in && -sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>--> - - <!-- As of April 11, 2018 appdata.* is NOT in git master, but appears - to be in metainfo.{its,loc}, When updating, check BLFS gnome-screenshot. --> - -<!-- - <para>Now fix a configuration file:</para> - -<screen><userinput remap="pre">sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' \ - -i gettext-tools/its/appdata.loc</userinput></screen> ---> <para>Prepare Gettext for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr \ @@ -76,8 +51,9 @@ sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinpu <para>Compile the package:</para> -<screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen> - +<!--<screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>--> +<screen><userinput remap="make">make</userinput></screen> +<!-- <variablelist> <title>The meaning of the make parameter:</title> @@ -92,7 +68,7 @@ sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinpu </varlistentry> </variablelist> - +--> <para>To test the results (this takes a long time, around 3 SBUs), issue:</para> diff --git a/chapter06/glibc.xml b/chapter08/glibc.xml index 75d771919..0886bbefd 100644 --- a/chapter06/glibc.xml +++ b/chapter08/glibc.xml @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&glibc-ch6-sbu;</seg> - <seg>&glibc-ch6-du;</seg> + <seg>&glibc-fin-sbu;</seg> + <seg>&glibc-fin-du;</seg> </seglistitem> </segmentedlist> @@ -43,47 +43,13 @@ <sect2 role="installation"> <title>Installation of Glibc</title> - <note><para>The Glibc build system is self-contained and will install - perfectly, even though the compiler specs file and linker are still - pointing to <filename class="directory">/tools</filename>. The specs - and linker cannot be adjusted before the Glibc install because the - Glibc autoconf tests would give false results and defeat the goal - of achieving a clean build.</para></note> - <para>Some of the Glibc programs use the non-FHS compliant <filename class="directory">/var/db</filename> directory to store their runtime data. Apply the following patch to make such programs store their runtime data in the FHS-compliant locations:</para> <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen> -<!-- - <para>Fix a minor security issue with glob functions:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&glibc-glob-patch;</userinput></screen> ---> -<!-- No longer needed - <para>Fix a problem introduced with the linux-5.2 kernel:</para> - -<screen><userinput remap="pre">sed -i '/asm.socket.h/a# include <linux/sockios.h>' \ - sysdeps/unix/sysv/linux/bits/socket.h</userinput></screen> ---> - <para>Create a symlink for LSB - compliance. Additionally, for x86_64, create a compatibility symlink - required for the dynamic loader to function correctly:</para> - -<screen><userinput remap="pre">case $(uname -m) in - i?86) ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3 - ;; - x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64 - ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 - ;; -esac</userinput></screen> -<!-- - <para>Remove a file that may be left over from a previous build attempt: - </para> -<screen><userinput remap="pre">rm -f /usr/include/limits.h</userinput></screen> ---> <para>The Glibc documentation recommends building Glibc in a dedicated build directory:</para> @@ -92,31 +58,38 @@ cd build</userinput></screen> <para>Prepare Glibc for compilation:</para> -<screen><userinput remap="configure">CC="gcc -ffile-prefix-map=/tools=/usr" \ -../configure --prefix=/usr \ - --disable-werror \ - --enable-kernel=&min-kernel; \ - --enable-stack-protector=strong \ - --with-headers=/usr/include \ +<screen arch="default"><userinput remap="configure">../configure --prefix=/usr \ + --disable-werror \ + --enable-kernel=&min-kernel; \ + --enable-stack-protector=strong \ + --with-headers=/usr/include \ + libc_cv_slibdir=/lib</userinput></screen> +<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure --prefix=/usr \ + --disable-werror \ + --enable-kernel=&min-kernel; \ + --enable-stack-protector=strong \ + --with-headers=/usr/include \ + --enable-multi-arch \ libc_cv_slibdir=/lib</userinput></screen> - <variablelist> - <title>The meaning of the options and new configure parameters:</title> + <variablelist> + <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>CC="gcc -ffile-prefix-map=/tools=/usr"</parameter></term> + <term><parameter>--disable-werror</parameter></term> <listitem> - <para>Make GCC record any references to files in /tools in result - of the compilation as if the files resided in /usr. This avoids - introduction of invalid paths in debugging symbols.</para> + <para>This option disables the -Werror option passed to + GCC. This is necessary for running the test suite.</para> </listitem> </varlistentry> <varlistentry> - <term><parameter>--disable-werror</parameter></term> + <term><parameter>--enable-kernel=&min-kernel;</parameter></term> <listitem> - <para>This option disables the -Werror option passed to - GCC. This is necessary for running the test suite.</para> + <para>This option tells the build system that this glibc may + be used with kernels as old as &min-kernel;. This means generating + workarounds in case a system call introduced in a later version + cannot be used.</para> </listitem> </varlistentry> @@ -128,13 +101,12 @@ cd build</userinput></screen> smashing attacks.</para> </listitem> </varlistentry> - +<!-- do we need this one? --> <varlistentry> <term><parameter>--with-headers=/usr/include</parameter></term> <listitem> <para>This option tells the build system where to find the - kernel API headers. By default, those headers are sought in - <filename class="directory">/tools/include</filename>.</para> + kernel API headers.</para> </listitem> </varlistentry> @@ -182,7 +154,7 @@ esac</userinput></screen> <para><emphasis>misc/tst-ttyname</emphasis> is known to fail in the LFS chroot environment.</para> </listitem> - +<!-- <listitem> <para><emphasis>inet/tst-idna_name_classify</emphasis> is known to fail in the LFS chroot environment.</para> @@ -193,7 +165,7 @@ esac</userinput></screen> <emphasis>posix/tst-getaddrinfo5</emphasis> may fail on some architectures.</para> </listitem> - +--> <listitem> <para>The <emphasis>nss/tst-nss-files-hosts-multi</emphasis> test may fail for reasons that have not been determined.</para> @@ -212,18 +184,7 @@ esac</userinput></screen> systems where the CPU is not a relatively new Intel or AMD processor.</para> </listitem> -<!-- - <listitem> - <para>The - <emphasis>nptl/tst-thread-affinity-{pthread,pthread2,sched}</emphasis> - tests may fail for reasons that have not been determined. </para> - </listitem> - <listitem> - <para>Other tests known to fail on some architectures are - malloc/tst-malloc-usable and nptl/tst-cleanupx4. </para> - </listitem> ---> </itemizedlist> <para>Though it is a harmless message, the install stage of Glibc will @@ -388,7 +349,7 @@ unset ZONEINFO</userinput></screen> <varlistentry> <term><parameter>zic -L /dev/null ...</parameter></term> <listitem> - <para>This creates posix time zones, without any leap seconds. It is + <para>This creates posix time zones without any leap seconds. It is conventional to put these in both <filename class="directory">zoneinfo</filename> and <filename class="directory">zoneinfo/posix</filename>. It is @@ -396,7 +357,7 @@ unset ZONEINFO</userinput></screen> <filename class="directory">zoneinfo</filename>, otherwise various test-suites will report errors. On an embedded system, where space is tight and you do not intend to ever update the time zones, you could save - 1.9MB by not using the <filename class="directory">posix</filename> + 1.9 MB by not using the <filename class="directory">posix</filename> directory, but some applications or test-suites might produce some failures.</para> </listitem> @@ -476,23 +437,12 @@ unset ZONEINFO</userinput></screen> </literal> EOF</userinput></screen> - <para arch="default">If desired, the dynamic loader can also search a directory and + <para>If desired, the dynamic loader can also search a directory and include the contents of files found there. Generally the files in this include directory are one line specifying the desired library path. To add this capability run the following commands:</para> -<screen role="nodump" arch="default"><userinput>cat >> /etc/ld.so.conf << "EOF" -<literal># Add an include directory -include /etc/ld.so.conf.d/*.conf -</literal> -EOF -mkdir -pv /etc/ld.so.conf.d</userinput></screen> - - <para arch="ml_32,ml_x32,ml_all">The dynamic loader can also search a directory and - include the contents of files found there. Generally the files in - this include directory are one line specifying the desired library path. - To add this capability run the following commands:</para> -<screen arch="ml_32,ml_x32,ml_all"><userinput>cat >> /etc/ld.so.conf << "EOF" +<screen role="nodump"><userinput>cat >> /etc/ld.so.conf << "EOF" <literal># Add an include directory include /etc/ld.so.conf.d/*.conf </literal> @@ -502,6 +452,155 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen> </sect3> </sect2> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all"> + <title>Building Glibc - 32bit</title> + + <para>Now recompile for m32. The extracted source can be + reused but needs to cleaned before installing the m32 + version of Glibc.</para> + + <para>Clear the build directory and remove artefacts from + previous build:</para> + +<screen><userinput remap="pre">rm -rf ./* +find .. -name "*.a" -delete</userinput></screen> + + <para>Configure Glibc for m32 with the following commands:</para> + +<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ +../configure \ + --prefix=/usr \ + --host=i686-pc-linux-gnu \ + --build=$(../scripts/config.guess) \ + --enable-kernel=&min-kernel; \ + --with-headers=/usr/include \ + --enable-multi-arch \ + --libdir=&usr-lib-m32; \ + --libexecdir=&usr-lib-m32; \ + libc_cv_slibdir=&lib-m32;</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -a DESTDIR&lib-m32;/* &lib-m32;/ +cp -a DESTDIR&usr-lib-m32;/* &usr-lib-m32;/ +install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \ + /usr/include/gnu/ +ln -svf ..&lib-m32;/ld-linux.so.2 /lib/ld-linux.so.2</userinput></screen> + + <para>Add the library name to the dynamic loader config:</para> + +<screen role="install"><userinput>echo "&usr-lib-m32;" >> /etc/ld.so.conf</userinput></screen> + + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> + +<screen><userinput>echo 'int main(){}' > dummy.c +gcc -m32 dummy.c +readelf -l a.out | grep '/ld-linux'</userinput></screen> + + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> + +<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen> + + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on.</para> + + <para>Once all is well, clean up the test files:</para> + +<screen><userinput>rm -v dummy.c a.out</userinput></screen> + + </caution> + + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_x32,ml_all"> + <title>Building Glibc - x32bit</title> + + <para>Now recompile for mx32. The extracted source can be + reused but needs to cleaned before installing the mx32 + version of Glibc.</para> + + <para>Clear the build directory and remove artefacts from + previous build:</para> + +<screen><userinput remap="pre">rm -rf ./* +find .. -name "*.a" -delete</userinput></screen> + + <para>Configure Glibc for mx32 with the following commands:</para> + +<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \ +../configure \ + --prefix=/usr \ + --host=x86_64-pc-linux-gnux32 \ + --build=$(../scripts/config.guess) \ + --enable-kernel=&min-kernel; \ + --with-headers=$LFS/usr/include \ + --enable-multi-arch \ + --libdir=&usr-lib-mx32; \ + --libexecdir=&usr-lib-mx32; \ + libc_cv_slibdir=&lib-mx32;</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -a DESTDIR&lib-mx32;/* &lib-mx32;/ +cp -a DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;/ +install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-x32.h \ + /usr/include/gnu/ +ln -svf ..&lib-mx32;/ld-linux-x32.so.2 /lib/ld-linux-x32.so.2</userinput></screen> + + <para>Add the library name to the dynamic loader config:</para> + +<screen role="install"><userinput>echo "&usr-lib-mx32;" >> /etc/ld.so.conf</userinput></screen> + + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> + +<screen><userinput>echo 'int main(){}' > dummy.c +gcc -mx32 dummy.c +readelf -l a.out | grep '/ld-linux-x32'</userinput></screen> + + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> + +<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-x32.so.2]</computeroutput></screen> + + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on.</para> + + <para>Once all is well, clean up the test files:</para> + +<screen><userinput>rm -v dummy.c a.out</userinput></screen> + + </caution> + + </sect2><!-- mx32 --> + <sect2 id="contents-glibc" role="content"> <title>Contents of Glibc</title> diff --git a/chapter06/gmp.xml b/chapter08/gmp.xml index a1a9f5ea1..ddd6babb4 100644 --- a/chapter06/gmp.xml +++ b/chapter08/gmp.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gmp-ch6-sbu;</seg> - <seg>&gmp-ch6-du;</seg> + <seg>&gmp-fin-sbu;</seg> + <seg>&gmp-fin-du;</seg> </seglistitem> </segmentedlist> @@ -120,9 +120,12 @@ make install-html</userinput></screen> </sect2> - <!-- ~~~~~ m32 ~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of GMP - 32-bit</title> + <title>Installation of GMP - 32bit</title> <para>Clean previous build:</para> @@ -131,24 +134,40 @@ make install-html</userinput></screen> <para>Generic libraries can be created by running the following:</para> -<screen><userinput>cp -v configfsf.guess config.guess +<screen><userinput remap="pre">cp -v configfsf.guess config.guess cp -v configfsf.sub config.sub</userinput></screen> <para>Prepare GMP for compilation:</para> <screen><userinput remap="configure">ABI="32" \ -CC="gcc -m32" \ -CXX="g++ -m32" \ +CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=i686" \ +CXXFLAGS="$CFLAGS" \ +PKG_CONFIG_PATH="&usr-lib-m32;/pkgconfig" \ ./configure \ --prefix=/usr \ --disable-static \ --enable-cxx \ - --libdir=/usr/lib32 \ - --host=i686-pc-linux-gnu</userinput></screen> + --libdir=&usr-lib-m32; \ + --includedir=&usr-inc-m32;/gmp</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title> + + <varlistentry> + <term><parameter>--includedir=&usr-inc-m32;/gmp</parameter></term> + <listitem> + <para>Some definitions in gmp.h differs for each arch but + has same name. Therefore, the headers must be separated from + each other.</para> + </listitem> + </varlistentry> + + </variablelist> <para>Compile the package:</para> -<screen><userinput remap="make">make</userinput></screen> +<screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile +make</userinput></screen> <important> <para>The test suite for GMP in this section is considered critical. @@ -159,7 +178,7 @@ CXX="g++ -m32" \ <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen> - <para>Ensure that all 190 tests in the test suite passed. + <para>Ensure that all 197 tests in the test suite passed. Check the results by issuing the following command:</para> <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen> @@ -167,12 +186,16 @@ CXX="g++ -m32" \ <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; +cp -Rv DESTDIR&usr-inc-m32;/* &usr-inc-m32;/ rm -rf DESTDIR</userinput></screen> - </sect2> - - <!-- ~~~~~ mx32 ~~~~~ --> + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_x32,ml_all" role="installation"> <title>Installation of GMP - x32-bit</title> @@ -183,24 +206,26 @@ rm -rf DESTDIR</userinput></screen> <para>Generic libraries can be created by running the following:</para> -<screen><userinput>cp -v configfsf.guess config.guess +<screen><userinput remap="pre">cp -v configfsf.guess config.guess cp -v configfsf.sub config.sub</userinput></screen> <para>Prepare GMP for compilation:</para> <screen><userinput remap="configure">ABI="x32" \ -CC="gcc -mx32" \ -CXX="g++ -mx32" \ +CFLAGS="-mx32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=x86-64" \ +CXXFLAGS="$CFLAGS" \ +PKG_CONFIG_PATH="&usr-lib-mx32;/pkgconfig" \ ./configure \ --prefix=/usr \ --disable-static \ --enable-cxx \ - --libdir=/usr/libx32 \ - --host=x86_64-pc-linux-gnux32</userinput></screen> + --libdir=&usr-lib-mx32; \ + --includedir=&usr-inc-mx32;/gmp</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">make</userinput></screen> +<screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile +make</userinput></screen> <important> <para>The test suite for GMP in this section is considered critical. @@ -211,7 +236,7 @@ CXX="g++ -mx32" \ <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen> - <para>Ensure that all 190 tests in the test suite passed. + <para>Ensure that all 197 tests in the test suite passed. Check the results by issuing the following command:</para> <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen> @@ -219,11 +244,12 @@ CXX="g++ -mx32" \ <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; +cp -Rv DESTDIR&usr-inc-mx32;/* &usr-inc-mx32;/ rm -rf DESTDIR</userinput></screen> - </sect2> - + </sect2><!-- mx32 --> + <sect2 id="contents-gmp" role="content"> <title>Contents of GMP</title> diff --git a/chapter06/gperf.xml b/chapter08/gperf.xml index d8c5b6594..aa42fe18b 100644 --- a/chapter06/gperf.xml +++ b/chapter08/gperf.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gperf-ch6-sbu;</seg> - <seg>&gperf-ch6-du;</seg> + <seg>&gperf-fin-sbu;</seg> + <seg>&gperf-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter08/grep.xml b/chapter08/grep.xml new file mode 100644 index 000000000..ef6357281 --- /dev/null +++ b/chapter08/grep.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-grep" role="wrap"> + <?dbhtml filename="grep.html"?> + + <sect1info condition="script"> + <productname>grep</productname> + <productnumber>&grep-version;</productnumber> + <address>&grep-url;</address> + </sect1info> + + <title>Grep-&grep-version;</title> + + <indexterm zone="ch-system-grep"> + <primary sortas="a-Grep">Grep</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Grep package contains programs for searching through the contents of files.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&grep-fin-sbu;</seg> + <seg>&grep-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Grep</title> + + <para>Prepare Grep for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 id="contents-grep" role="content"> + <title>Contents of Grep</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + + <seglistitem> + <seg>egrep, fgrep, and grep</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="egrep"> + <term><command>egrep</command></term> + <listitem> + <para>Prints lines matching an extended regular expression</para> + <indexterm zone="ch-system-grep egrep"> + <primary sortas="b-egrep">egrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="fgrep"> + <term><command>fgrep</command></term> + <listitem> + <para>Prints lines matching a list of fixed strings</para> + <indexterm zone="ch-system-grep fgrep"> + <primary sortas="b-fgrep">fgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grep"> + <term><command>grep</command></term> + <listitem> + <para>Prints lines matching a basic regular expression</para> + <indexterm zone="ch-system-grep grep"> + <primary sortas="b-grep">grep</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/groff.xml b/chapter08/groff.xml index aad0cbf85..032130217 100644 --- a/chapter06/groff.xml +++ b/chapter08/groff.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&groff-ch6-sbu;</seg> - <seg>&groff-ch6-du;</seg> + <seg>&groff-fin-sbu;</seg> + <seg>&groff-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter08/grub.xml b/chapter08/grub.xml index b6485b94d..51726e87f 100644 --- a/chapter08/grub.xml +++ b/chapter08/grub.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-bootable-grub" role="wrap"> +<sect1 id="ch-system-grub" role="wrap"> <?dbhtml filename="grub.html"?> <sect1info condition="script"> @@ -14,204 +14,361 @@ <address>&grub-url;</address> </sect1info> - <title>Using GRUB to Set Up the Boot Process</title> - - <sect2> - <title>Introduction</title> - - <warning><para>Configuring GRUB incorrectly can render your system - inoperable without an alternate boot device such as a CD-ROM. This - section is not required to boot your LFS system. You may just - want to modify your current boot loader, e.g. Grub-Legacy, GRUB2, or - LILO.</para></warning> - - - <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote> - the computer if the computer becomes unusable (un-bootable). If you do not - already have a boot device, you can create one. In order for the procedure - below to work, you need to jump ahead to BLFS and install - <userinput>xorriso</userinput> from the <ulink - url="&blfs-book;multimedia/libisoburn.html"> - libisoburn</ulink> package.</para> - -<screen role="nodump"><userinput>cd /tmp -grub-mkrescue --output=grub-img.iso -xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen> - - <note> - <para> - To boot LFS on host systems that have UEFI enabled, the kernel needs to - have been built with the CONFIG_EFI_STUB capabality described in the - previous section. However, LFS can be booted using GRUB2 without such - an addition. To do this, the UEFI Mode and Secure Boot capabilities in - the host system's BIOS need to be turned off. For details, see <ulink - url="&hints-root;lfs-uefi.txt"> - the lfs-uefi.txt hint</ulink> at - &hints-root;lfs-uefi.txt. - </para> - </note> + <title>GRUB-&grub-version;</title> - </sect2> + <indexterm zone="ch-system-grub"> + <primary sortas="a-Grub">GRUB</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The GRUB package contains the GRand Unified Bootloader.</para> - <sect2> - <title>GRUB Naming Conventions</title> - - <para>GRUB uses its own naming structure for drives and partitions in - the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis> - is the hard drive number and <emphasis>m</emphasis> is the partition - number. The hard drive number starts from zero, but the partition number - starts from one for normal partitions and five for extended partitions. - Note that this is different from earlier versions where - both numbers started from zero. For example, partition <filename - class="partition">sda1</filename> is <emphasis>(hd0,1)</emphasis> to - GRUB and <filename class="partition">sdb3</filename> is - <emphasis>(hd1,3)</emphasis>. In contrast to Linux, GRUB does not - consider CD-ROM drives to be hard drives. For example, if using a CD - on <filename class="partition">hdb</filename> and a second hard drive - on <filename class="partition">hdc</filename>, that second hard drive - would still be <emphasis>(hd1)</emphasis>.</para> + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&grub-fin-sbu;</seg> + <seg>&grub-fin-du;</seg> + </seglistitem> + </segmentedlist> </sect2> - <sect2> - <title>Setting Up the Configuration</title> - - <para>GRUB works by writing data to the first physical track of the - hard disk. This area is not part of any file system. The programs - there access GRUB modules in the boot partition. The default location - is /boot/grub/.</para> - - <para>The location of the boot partition is a choice of the user that - affects the configuration. One recommendation is to have a separate small - (suggested size is 100 MB) partition just for boot information. That way - each build, whether LFS or some commercial distro, can access the same boot - files and access can be made from any booted system. If you choose to do - this, you will need to mount the separate partition, move all files in the - current <filename class="directory">/boot</filename> directory (e.g. the - linux kernel you just built in the previous section) to the new partition. - You will then need to unmount the partition and remount it as <filename - class="directory">/boot</filename>. If you do this, be sure to update - <filename>/etc/fstab</filename>.</para> - - <para>Using the current lfs partition will also work, but configuration - for multiple systems is more difficult.</para> - - <para>Using the above information, determine the appropriate - designator for the root partition (or boot partition, if a separate - one is used). For the following example, it is assumed that the root - (or separate boot) partition is <filename - class="partition">sda2</filename>.</para> - - <para>Install the GRUB files into <filename - class="directory">/boot/grub</filename> and set up the boot track:</para> - - <warning> - <para>The following command will overwrite the current boot loader. Do not - run the command if this is not desired, for example, if using a third party - boot manager to manage the Master Boot Record (MBR).</para> - </warning> - -<screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen> - - <note> - <para>If the system has been booted using UEFI, - <command>grub-install</command> will try to install files for the - <emphasis>x86_64-efi</emphasis> target, but those files - have not been installed in chapter 6. If this is the case, add - <option>--target i386-pc</option> to the command above.</para> - </note> - -<!-- This does not seem to be true any more - <note><para><application>grub-install</application> is a script and calls another - program, grub-probe, that may fail with a message "cannot stat `/dev/root'". - If so, create a temporary symbolic link from your root partition to /dev/root:</para> - -<screen role="nodump"><userinput>ln -sv /dev/sda2 /dev/root</userinput></screen> - - <para>The symbolic link will only be present until the system is rebooted. - The link is only needed for the installation procedure. - </para></note> ---> + <sect2 role="installation"> + <title>Installation of GRUB</title> + + <para>Prepare GRUB for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr \ + --sbindir=/sbin \ + --sysconfdir=/etc \ + --disable-efiemu \ + --disable-werror</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title> + + <varlistentry> + <term><parameter>--disable-werror</parameter></term> + <listitem> + <para>This allows the build to complete with warnings introduced + by more recent Flex versions.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-efiemu</parameter></term> + <listitem> + <para>This option minimizes what is built by disabling a feature and + testing programs not needed for LFS.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>This package does not come with a test suite.</para> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install +mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen> + + <para>Using GRUB to make your LFS system bootable will be discussed in + <xref linkend="ch-bootable-grub"/>.</para> + </sect2> - <sect2 id="grub-cfg"> - <title>Creating the GRUB Configuration File</title> - - <para>Generate <filename>/boot/grub/grub.cfg</filename>:</para> - - <screen arch="default" revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF" -<literal># Begin /boot/grub/grub.cfg -set default=0 -set timeout=5 - -insmod ext2 -set root=(hd0,2) - -menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { - linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro -}</literal> -EOF</userinput></screen> - - <screen arch="default" revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF" -<literal># Begin /boot/grub/grub.cfg -set default=0 -set timeout=5 - -insmod ext2 -set root=(hd0,2) - -menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;" { - linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro -}</literal> -EOF</userinput></screen> - - <screen arch="ml_32,ml_x32,ml_all" revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF" -<literal># Begin /boot/grub/grub.cfg -set default=0 -set timeout=5 - -insmod ext2 -set root=(hd0,2) - -menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;-multilib" { - linux /boot/vmlinuz-&linux-version;-lfs-&version;-multilib root=/dev/sda2 ro -}</literal> -EOF</userinput></screen> - - <screen arch="ml_32,ml_x32,ml_all" revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF" -<literal># Begin /boot/grub/grub.cfg -set default=0 -set timeout=5 - -insmod ext2 -set root=(hd0,2) - -menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;-multilib" { - linux /boot/vmlinuz-&linux-version;-lfs-&versiond;-multilib root=/dev/sda2 ro -}</literal> -EOF</userinput></screen> - - - <note><para>From <application>GRUB</application>'s perspective, the - kernel files are relative to the partition used. If you - used a separate /boot partition, remove /boot from the above - <emphasis>linux</emphasis> line. You will also need to change the - <emphasis>set root</emphasis> line to point to the boot partition. - </para></note> - - <para>GRUB is an extremely powerful program and it provides a tremendous - number of options for booting from a wide variety of devices, operating - systems, and partition types. There are also many options for customization - such as graphical splash screens, playing sounds, mouse input, etc. The - details of these options are beyond the scope of this introduction.</para> - - <caution><para>There is a command, <application>grub-mkconfig</application>, that - can write a configuration file automatically. It uses a set of scripts in - /etc/grub.d/ and will destroy any customizations that you make. These scripts - are designed primarily for non-source distributions and are not recommended for - LFS. If you install a commercial Linux distribution, there is a good chance - that this program will be run. Be sure to back up your grub.cfg file.</para></caution> - - </sect2> + <sect2 id="contents-gRUB" role="content"> + <title>Contents of GRUB</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + + <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest, + grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless, + grub-menulst2cfg, grub-mkconfig, + grub-mkimage, grub-mklayout, grub-mknetdir, + grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone, + grub-ofpathname, grub-probe, grub-reboot, grub-render-label, + grub-script-check, + grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg> + + <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install + is first run)</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="grub-bios-setup"> + <term><command>grub-bios-setup</command></term> + <listitem> + <para>Is a helper program for grub-install</para> + <indexterm zone="ch-system-grub grub-bios-setup"> + <primary sortas="b-grub-bios-setup">grub-bios-setup</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-editenv"> + <term><command>grub-editenv</command></term> + <listitem> + <para>A tool to edit the environment block</para> + <indexterm zone="ch-system-grub grub-editenv"> + <primary sortas="b-grub-editenv">grub-editenv</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-file"> + <term><command>grub-file</command></term> + <listitem> + <para>Checks if FILE is of the specified type.</para> + <indexterm zone="ch-system-grub grub-file"> + <primary sortas="b-grub-file">grub-file</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-fstest"> + <term><command>grub-fstest</command></term> + <listitem> + <para>Tool to debug the filesystem driver</para> + <indexterm zone="ch-system-grub grub-fstest"> + <primary sortas="b-grub-fstest">grub-fstest</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-glue-efi"> + <term><command>grub-glue-efi</command></term> + <listitem> + <para>Processes ia32 and amd64 EFI images and glues them + according to Apple format.</para> + <indexterm zone="ch-system-grub grub-glue-efi"> + <primary sortas="b-grub-glue-efi">grub-glue-efi</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-install"> + <term><command>grub-install</command></term> + <listitem> + <para>Install GRUB on your drive</para> + <indexterm zone="ch-system-grub grub-install"> + <primary sortas="b-grub-install">grub-install</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-kbdcomp"> + <term><command>grub-kbdcomp</command></term> + <listitem> + <para>Script that converts an xkb layout into one recognized by + GRUB</para> + <indexterm zone="ch-system-grub grub-kbdcomp"> + <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-macbless"> + <term><command>grub-macbless</command></term> + <listitem> + <para>Mac-style bless on HFS or HFS+ files</para> + <indexterm zone="ch-system-grub grub-macbless"> + <primary sortas="b-grub-macbless">grub-macbless</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-menulst2cfg"> + <term><command>grub-menulst2cfg</command></term> + <listitem> + <para>Converts a GRUB Legacy <filename>menu.lst</filename> + into a <filename>grub.cfg</filename> for use with GRUB 2</para> + <indexterm zone="ch-system-grub grub-menulst2cfg"> + <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mkconfig"> + <term><command>grub-mkconfig</command></term> + <listitem> + <para>Generate a grub config file</para> + <indexterm zone="ch-system-grub grub-mkconfig"> + <primary sortas="b-grub-mkconfig">grub-mkconfig</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mkimage"> + <term><command>grub-mkimage</command></term> + <listitem> + <para>Make a bootable image of GRUB</para> + <indexterm zone="ch-system-grub grub-mkimage"> + <primary sortas="b-grub-mkimage">grub-mkimage</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mklayout"> + <term><command>grub-mklayout</command></term> + <listitem> + <para>Generates a GRUB keyboard layout file</para> + <indexterm zone="ch-system-grub grub-mklayout"> + <primary sortas="b-grub-mklayout">grub-mklayout</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mknetdir"> + <term><command>grub-mknetdir</command></term> + <listitem> + <para>Prepares a GRUB netboot directory</para> + <indexterm zone="ch-system-grub grub-mknetdir"> + <primary sortas="b-grub-mknetdir">grub-mknetdir</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mkpasswd-pbkdf2"> + <term><command>grub-mkpasswd-pbkdf2</command></term> + <listitem> + <para>Generates an encrypted PBKDF2 password for use in the boot + menu</para> + <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2"> + <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mkrelpath"> + <term><command>grub-mkrelpath</command></term> + <listitem> + <para>Makes a system pathname relative to its root</para> + <indexterm zone="ch-system-grub grub-mkrelpath"> + <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mkrescue"> + <term><command>grub-mkrescue</command></term> + <listitem> + <para>Make a bootable image of GRUB suitable for a floppy disk or CDROM/DVD</para> + <indexterm zone="ch-system-grub grub-mkrescue"> + <primary sortas="b-grub-mkrescue">grub-mkrescue</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-mkstandalone"> + <term><command>grub-mkstandalone</command></term> + <listitem> + <para>Generates a standalone image</para> + <indexterm zone="ch-system-grub grub-mkstandalone"> + <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-ofpathname"> + <term><command>grub-ofpathname</command></term> + <listitem> + <para>Is a helper program that prints the path of a GRUB device</para> + <indexterm zone="ch-system-grub grub-ofpathname"> + <primary sortas="b-grub-ofpathname">grub-ofpathname</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-probe"> + <term><command>grub-probe</command></term> + <listitem> + <para>Probe device information for a given path or device</para> + <indexterm zone="ch-system-grub grub-probe"> + <primary sortas="b-grub-probe">grub-probe</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-reboot"> + <term><command>grub-reboot</command></term> + <listitem> + <para>Sets the default boot entry for GRUB for the next boot only</para> + <indexterm zone="ch-system-grub grub-reboot"> + <primary sortas="b-grub-reboot">grub-reboot</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-render-label"> + <term><command>grub-render-label</command></term> + <listitem> + <para>Render Apple .disk_label for Apple Macs</para> + <indexterm zone="ch-system-grub grub-render-label"> + <primary sortas="b-grub-render-label">grub-render-label</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-script-check"> + <term><command>grub-script-check</command></term> + <listitem> + <para>Checks GRUB configuration script for syntax errors</para> + <indexterm zone="ch-system-grub grub-script-check"> + <primary sortas="b-grub-script-check">grub-script-check</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-set-default"> + <term><command>grub-set-default</command></term> + <listitem> + <para>Sets the default boot entry for GRUB</para> + <indexterm zone="ch-system-grub grub-set-default"> + <primary sortas="b-grub-set-default">grub-set-default</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-sparc64-setup"> + <term><command>grub-sparc64-setup</command></term> + <listitem> + <para>Is a helper program for grub-setup</para> + <indexterm zone="ch-system-grub grub-sparc64-setup"> + <primary sortas="b-grub-sparc64-setup">grub-setup</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="grub-syslinux2cfg"> + <term><command>grub-syslinux2cfg</command></term> + <listitem> + <para>Transform a syslinux config file into grub.cfg format</para> + <indexterm zone="ch-system-grub grub-syslinux2cfg"> + <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> </sect1> diff --git a/chapter08/gzip.xml b/chapter08/gzip.xml new file mode 100644 index 000000000..5040f2e0b --- /dev/null +++ b/chapter08/gzip.xml @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-gzip" role="wrap"> + <?dbhtml filename="gzip.html"?> + + <sect1info condition="script"> + <productname>gzip</productname> + <productnumber>&gzip-version;</productnumber> + <address>&gzip-url;</address> + </sect1info> + + <title>Gzip-&gzip-version;</title> + + <indexterm zone="ch-system-gzip"> + <primary sortas="a-Gzip">Gzip</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Gzip package contains programs for compressing and decompressing + files.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&gzip-fin-sbu;</seg> + <seg>&gzip-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Gzip</title> + + <para>Prepare Gzip for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para>Move a program that needs to be on the root filesystem:</para> + +<screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen> + + </sect2> + + <sect2 id="contents-gzip" role="content"> + <title>Contents of Gzip</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + + <seglistitem> + <seg>gunzip, gzexe, gzip, uncompress (hard link with gunzip), zcat, zcmp, + zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="gunzip"> + <term><command>gunzip</command></term> + <listitem> + <para>Decompresses gzipped files</para> + <indexterm zone="ch-system-gzip gunzip"> + <primary sortas="b-gunzip">gunzip</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="gzexe"> + <term><command>gzexe</command></term> + <listitem> + <para>Creates self-decompressing executable files</para> + <indexterm zone="ch-system-gzip gzexe"> + <primary sortas="b-gzexe">gzexe</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="gzip"> + <term><command>gzip</command></term> + <listitem> + <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para> + <indexterm zone="ch-system-gzip gzip"> + <primary sortas="b-gzip">gzip</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="uncompress"> + <term><command>uncompress</command></term> + <listitem> + <para>Decompresses compressed files</para> + <indexterm zone="ch-system-gzip uncompress"> + <primary sortas="b-uncompress">uncompress</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zcat"> + <term><command>zcat</command></term> + <listitem> + <para>Decompresses the given gzipped files to standard output</para> + <indexterm zone="ch-system-gzip zcat"> + <primary sortas="b-zcat">zcat</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zcmp"> + <term><command>zcmp</command></term> + <listitem> + <para>Runs <command>cmp</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zcmp"> + <primary sortas="b-zcmp">zcmp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zdiff"> + <term><command>zdiff</command></term> + <listitem> + <para>Runs <command>diff</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zdiff"> + <primary sortas="b-zdiff">zdiff</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zegrep"> + <term><command>zegrep</command></term> + <listitem> + <para>Runs <command>egrep</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zegrep"> + <primary sortas="b-zegrep">zegrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zfgrep"> + <term><command>zfgrep</command></term> + <listitem> + <para>Runs <command>fgrep</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zfgrep"> + <primary sortas="b-zfgrep">zfgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zforce"> + <term><command>zforce</command></term> + <listitem> + <para>Forces a <filename class="extension">.gz</filename> extension on + all given files that are gzipped files, so that <command>gzip</command> + will not compress them again; this can be useful when file names were + truncated during a file transfer</para> + <indexterm zone="ch-system-gzip zforce"> + <primary sortas="b-zforce">zforce</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zgrep"> + <term><command>zgrep</command></term> + <listitem> + <para>Runs <command>grep</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zgrep"> + <primary sortas="b-zgrep">zgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zless"> + <term><command>zless</command></term> + <listitem> + <para>Runs <command>less</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zless"> + <primary sortas="b-zless">zless</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="zmore"> + <term><command>zmore</command></term> + <listitem> + <para>Runs <command>more</command> on gzipped files</para> + <indexterm zone="ch-system-gzip zmore"> + <primary sortas="b-zmore">zmore</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="znew"> + <term><command>znew</command></term> + <listitem> + <para>Re-compresses files from <command>compress</command> format to + <command>gzip</command> format—<filename + class="extension">.Z</filename> to <filename + class="extension">.gz</filename></para> + <indexterm zone="ch-system-gzip znew"> + <primary sortas="b-znew">znew</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/iana-etc.xml b/chapter08/iana-etc.xml index 42ab25c34..65530f9d8 100644 --- a/chapter06/iana-etc.xml +++ b/chapter08/iana-etc.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&iana-etc-ch6-sbu;</seg> - <seg>&iana-etc-ch6-du;</seg> + <seg>&iana-etc-fin-sbu;</seg> + <seg>&iana-etc-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/inetutils.xml b/chapter08/inetutils.xml index c8fdd456f..bbdc54955 100644 --- a/chapter06/inetutils.xml +++ b/chapter08/inetutils.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&inetutils-ch6-sbu;</seg> - <seg>&inetutils-ch6-du;</seg> + <seg>&inetutils-fin-sbu;</seg> + <seg>&inetutils-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/intltool.xml b/chapter08/intltool.xml index 9e9ebad20..d48c93015 100644 --- a/chapter06/intltool.xml +++ b/chapter08/intltool.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&intltool-ch6-sbu;</seg> - <seg>&intltool-ch6-du;</seg> + <seg>&intltool-fin-sbu;</seg> + <seg>&intltool-fin-du;</seg> </seglistitem> </segmentedlist> @@ -45,6 +45,10 @@ <screen><userinput remap="pre">sed -i 's:\\\${:\\\$\\{:' intltool-update.in</userinput></screen> + <note><para>The above regular expression looks unusual because of all the + backslashes. What it does is add a backslash before the right brace + character in the sequence '\${' resulting in '\$\{'.</para></note> + <para>Prepare Intltool for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> diff --git a/chapter08/introduction.xml b/chapter08/introduction.xml index 5cb40b882..b63ce1c3e 100644 --- a/chapter08/introduction.xml +++ b/chapter08/introduction.xml @@ -5,14 +5,71 @@ %general-entities; ]> -<sect1 id="ch-bootable-introduction"> +<sect1 id="ch-system-introduction"> <?dbhtml filename="introduction.html"?> <title>Introduction</title> - <para>It is time to make the LFS system bootable. This chapter - discusses creating an <filename>fstab</filename> file, building a - kernel for the new LFS system, and installing the GRUB boot loader so - that the LFS system can be selected for booting at startup.</para> + <para>In this chapter, we start constructing the LFS system in earnest. + </para> + + <para>The installation of this software is straightforward. Although in many + cases the installation instructions could be made shorter and more generic, + we have opted to provide the full instructions for every package to minimize + the possibilities for mistakes. The key to learning what makes a Linux system + work is to know what each package is used for and why you (or the system) + may need it.</para> + + <para>We do not recommend using optimizations. They can make + a program run slightly faster, but they may also cause compilation + difficulties and problems when running the program. If a package refuses to + compile when using optimization, try to compile it without optimization and + see if that fixes the problem. Even if the package does compile when using + optimization, there is the risk it may have been compiled incorrectly because + of the complex interactions between the code and build tools. Also note that + the <option>-march</option> and <option>-mtune</option> options using values + not specified in the book have not been tested. This may cause problems with + the toolchain packages (Binutils, GCC and Glibc). The small potential gains + achieved in using compiler optimizations are often outweighed by the risks. + First-time builders of LFS are encouraged to build without custom + optimizations. The subsequent system will still run very fast and be stable + at the same time.</para> + + <para>Before the installation instructions, each installation page provides + information about the package, including a concise description of what it + contains, approximately how long it will take to build, and how much disk + space is required during this building process. Following the installation + instructions, there is a list of programs and libraries (along with brief + descriptions) that the package installs.</para> + + <note><para>The SBU values and required disk space includes test suite data + for all applicable packages in <xref linkend="chapter-building-system"/>. SBU + values have been calculated using a single CPU core (-j1) for all + operations.</para></note> + + <sect2> + <title>About libraries</title> + + <para>In general, the LFS editors discourage building and installing static + libraries. The original purpose for most static libraries has been made + obsolete in a modern Linux system. In addition, linking a static library + into a program can be detrimental. If an update to the library is needed + to remove a security problem, all programs that use the static library will + need to be relinked to the new library. Since the use of static libraries + is not always obvious, the relevant programs (and the procedures needed to + do the linking) may not even be known.</para> + + <para>In the procedures in this chapter, we remove or disable installation of + most static libraries. Usually this is done by passing a + <option>--disable-static</option> option to <command>configure</command>. + In other cases, alternate means are needed. In a few cases, especially + glibc and gcc, the use of static libraries remains essential to the general + package building process. </para> + + <para>For a more complete discussion of libraries, see the discussion + <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> + Libraries: Static or shared?</ulink> in the BLFS book.</para> + + </sect2> </sect1> diff --git a/chapter06/iproute2.xml b/chapter08/iproute2.xml index 8b868df65..9e609e3cf 100644 --- a/chapter06/iproute2.xml +++ b/chapter08/iproute2.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&iproute2-ch6-sbu;</seg> - <seg>&iproute2-ch6-du;</seg> + <seg>&iproute2-fin-sbu;</seg> + <seg>&iproute2-fin-du;</seg> </seglistitem> </segmentedlist> @@ -47,14 +47,14 @@ be installed. Prevent this by running the commands below. If the <command>arpd</command> binary is needed, instructions for compiling Berkeley DB can be found in the BLFS Book at - <ulink url="&blfs-book;server/databases.html#db"/>. + <ulink url="&blfs-book;server/db.html"/>. </para> <screen><userinput remap="pre">sed -i /ARPD/d Makefile rm -fv man/man8/arpd.8</userinput></screen> <para>It is also necessary to disable building two modules that - requires <ulink url="&blfs-book;postlfs/iptables.html"/>.</para> + require <ulink url="&blfs-book;postlfs/iptables.html"/>.</para> <screen><userinput remap="pre">sed -i 's/.m_ipt.o//' tc/Makefile</userinput></screen> diff --git a/chapter06/kbd.xml b/chapter08/kbd.xml index a72ca29a8..a219102eb 100644 --- a/chapter06/kbd.xml +++ b/chapter08/kbd.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&kbd-ch6-sbu;</seg> - <seg>&kbd-ch6-du;</seg> + <seg>&kbd-fin-sbu;</seg> + <seg>&kbd-fin-du;</seg> </seglistitem> </segmentedlist> @@ -41,21 +41,21 @@ <sect2 role="installation"> <title>Installation of Kbd</title> - <para>The behaviour of the Backspace and Delete keys is not consistent + <para>The behaviour of the backspace and delete keys is not consistent across the keymaps in the Kbd package. The following patch fixes this issue for i386 keymaps:</para> <screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen> - <para>After patching, the Backspace key generates the character with code 127, - and the Delete key generates a well-known escape sequence.</para> + <para>After patching, the backspace key generates the character with code 127, + and the delete key generates a well-known escape sequence.</para> <para>Remove the redundant <command>resizecons</command> program (it requires the defunct svgalib to provide the video mode files - for normal use <command>setfont</command> sizes the console appropriately) together with its manpage.</para> -<screen><userinput remap="pre">sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure +<screen><userinput remap="pre">sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen> <para>Prepare Kbd for compilation:</para> @@ -63,21 +63,12 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen> <screen><userinput remap="configure">./configure --prefix=/usr --disable-vlock</userinput></screen> <variablelist> - <title>The meaning of the configure options:</title> -<!-- - <varlistentry> - <term><parameter>- -datadir=/lib/kbd</parameter></term> - <listitem> - <para>This option puts keyboard layout data in a directory that will - always be on the root partition instead of the default <filename - class="directory">/usr/share/kbd</filename>.</para> - </listitem> - </varlistentry> ---> + <title>The meaning of the configure option:</title> + <varlistentry> <term><parameter>--disable-vlock</parameter></term> <listitem> - <para>This option prevents the vlock utility from being built, as it + <para>This option prevents the vlock utility from being built because it requires the PAM library, which isn't available in the chroot environment.</para> </listitem> @@ -104,19 +95,9 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen> such languages have to download working keymaps separately.</para> </note> -<!-- - <para>Some of the scripts in the LFS-Bootscripts package depend on - <command>kbd_mode</command>, <command>loadkeys</command>, - <command>openvt</command>, and - <command>setfont</command>. As <filename class="directory">/usr</filename> - may not be available during the early stages of booting, those binaries - need to be on the root partition:</para> - -<screen><userinput remap="install">mv -v /usr/bin/{kbd_mode,loadkeys,openvt,setfont} /bin</userinput></screen> ---> <para>If desired, install the documentation:</para> -<screen><userinput remap="install">mkdir -v /usr/share/doc/kbd-&kbd-version; +<screen><userinput remap="install">mkdir -v /usr/share/doc/kbd-&kbd-version; cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version;</userinput></screen> </sect2> diff --git a/chapter06/kmod.xml b/chapter08/kmod.xml index e29660f00..27155e6ed 100644 --- a/chapter06/kmod.xml +++ b/chapter08/kmod.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&kmod-ch6-sbu;</seg> - <seg>&kmod-ch6-du;</seg> + <seg>&kmod-fin-sbu;</seg> + <seg>&kmod-fin-du;</seg> </seglistitem> </segmentedlist> @@ -78,12 +78,7 @@ LFS chroot environment. At a minimum the git program is required and several tests will not run outside of a git repository. </para> -<!-- - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> ---> - <para>Install the package, and create symlinks for + <para>Install the package and create symlinks for compatibility with Module-Init-Tools (the package that previously handled Linux kernel modules):</para> @@ -97,27 +92,30 @@ ln -sfv kmod /bin/lsmod</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Kmod - 32-bit</title> + <title>Installation of Kmod - 32bit</title> - <para>Clean previous build but keep man pages as they cannot be recreated - since xsltproc isn't installed yet:</para> + <para>Clean previous build but keep man pages as they cannot + be recreated since xsltproc isn't installed yet:</para> -<screen><userinput>sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile +<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile make clean</userinput></screen> <para>Prepare Kmod for compilation:</para> -<screen><userinput remap="configure">CC="gcc -m32" ./configure \ - --prefix=/usr \ - --bindir=/bin \ - --libdir=/usr/lib32 \ - --sysconfdir=/etc \ - --with-xz --with-zlib \ - --host=i686-pc-linux-gnu \ - --with-rootlibdir=/usr/lib32</userinput></screen> +<screen><userinput remap="configure">CC="gcc -m32" ./configure \ + --prefix=/usr \ + --bindir=/bin \ + --libdir=&usr-lib-m32; \ + --sysconfdir=/etc \ + --with-xz \ + --with-zlib \ + --host=i686-pc-linux-gnu \ + --with-rootlibdir=&usr-lib-m32;</userinput></screen> <para>Compile the package:</para> @@ -126,32 +124,35 @@ make clean</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Kmod - x32-bit</title> + <title>Installation of Kmod - x32bit</title> - <para>Clean previous build:</para> + <para>Clean previous build but keep man pages as they cannot + be recreated since xsltproc isn't installed yet:</para> -<screen><userinput>sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile +<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile make clean</userinput></screen> <para>Prepare Kmod for compilation:</para> -<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ +<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ --prefix=/usr \ --bindir=/bin \ - --libdir=/usr/libx32 \ + --libdir=&usr-lib-mx32; \ --sysconfdir=/etc \ --with-xz \ --with-zlib \ --host=x86_64-pc-linux-gnux32 \ - --with-rootlibdir=/usr/libx32</userinput></screen> + --with-rootlibdir=&usr-lib-mx32;</userinput></screen> <para>Compile the package:</para> @@ -160,10 +161,10 @@ make clean</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-kmod" role="content"> <title>Contents of Kmod</title> diff --git a/chapter06/less.xml b/chapter08/less.xml index 087b2e6a3..237cf1e15 100644 --- a/chapter06/less.xml +++ b/chapter08/less.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&less-ch6-sbu;</seg> - <seg>&less-ch6-du;</seg> + <seg>&less-fin-sbu;</seg> + <seg>&less-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/libcap.xml b/chapter08/libcap.xml index 9af65e4c6..210265568 100644 --- a/chapter06/libcap.xml +++ b/chapter08/libcap.xml @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&libcap-ch6-sbu;</seg> - <seg>&libcap-ch6-du;</seg> + <seg>&libcap-fin-sbu;</seg> + <seg>&libcap-fin-du;</seg> </seglistitem> </segmentedlist> @@ -79,8 +79,12 @@ ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen> </sect2> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Libcap - 32-bit</title> + <title>Installation of Libcap - 32bit</title> <para>Clean previous build:</para> @@ -93,14 +97,19 @@ ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 -chmod -v 755 /usr/lib32/libcap.so.&libcap-version; +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; +sed -e "s|^libdir=.*|libdir=&usr-lib-m32;|" -i &usr-lib-m32;/pkgconfig/lib{cap,psx}.pc +chmod -v 755 &usr-lib-m32;/libcap.so.&libcap-version; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Libcap - x32-bit</title> + <title>Installation of Libcap - x32bit</title> <para>Clean previous build:</para> @@ -108,16 +117,17 @@ rm -rf DESTDIR</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">make CC="gcc -mx32"</userinput></screen> +<screen><userinput remap="make">make CC="gcc -mx32 -march=x86-64"</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make lib=libx32 prefix=$PWD/DESTDIR/usr -C libcap install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 -chmod -v 755 /usr/libx32/libcap.so.&libcap-version; +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; +sed -e "s|^libdir=.*|libdir=&usr-lib-mx32;|" -i &usr-lib-mx32;/pkgconfig/lib{cap,psx}.pc +chmod -v 755 &usr-lib-mx32;/libcap.so.&libcap-version; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-libcap" role="content"> <title>Contents of Libcap</title> diff --git a/chapter06/libelf.xml b/chapter08/libelf.xml index 65b91d7d2..66a1189aa 100644 --- a/chapter06/libelf.xml +++ b/chapter08/libelf.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&elfutils-ch6-sbu;</seg> - <seg>&elfutils-ch6-du;</seg> + <seg>&elfutils-fin-sbu;</seg> + <seg>&elfutils-fin-du;</seg> </seglistitem> </segmentedlist> @@ -56,7 +56,7 @@ <screen><userinput remap="test">make check</userinput></screen> - <para>One test, run-elfclassify.sh, is known to fail.</para> +<!-- <para>One test, run-elfclassify.sh, is known to fail.</para>--> <para>Install only Libelf:</para> @@ -66,18 +66,22 @@ rm /usr/lib/libelf.a</userinput></screen> </sect2> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Libelf - 32-bit</title> + <title>Installation of Libelf - 32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Libelf for compilation:</para> + <para>Prepare Libtool for compilation:</para> <screen><userinput remap="configure">CC="gcc -m32" ./configure \ - --prefix=/usr \ - --libdir=/usr/lib32 \ + --prefix=/usr \ + --libdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu \ --disable-debuginfod</userinput></screen> @@ -88,24 +92,28 @@ rm /usr/lib/libelf.a</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install -install -vDm644 config/libelf.pc DESTDIR/usr/lib32/pkgconfig/libelf.pc -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +install -vDm644 config/libelf.pc DESTDIR&usr-lib-m32;/pkgconfig/libelf.pc +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Libelf - x32-bit</title> + <title>Installation of Libelf - x32bit</title> <para>Clean previous build:</para> <screen><userinput remap="pre">make distclean</userinput></screen> - <para>Prepare Libelf for compilation:</para> + <para>Prepare Libtool for compilation:</para> <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ - --prefix=/usr \ - --libdir=/usr/libx32 \ + --prefix=/usr \ + --libdir=&usr-lib-m32; \ --host=x86_64-pc-linux-gnux32 \ --disable-debuginfod</userinput></screen> @@ -116,11 +124,11 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install -install -vDm644 config/libelf.pc DESTDIR/usr/libx32/pkgconfig/libelf.pc -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +install -vDm644 config/libelf.pc DESTDIR&usr-lib-mx32;/pkgconfig/libelf.pc +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-elfutils" role="content"> <title>Contents of Libelf</title> diff --git a/chapter06/libffi.xml b/chapter08/libffi.xml index a363187d7..db68f858b 100644 --- a/chapter06/libffi.xml +++ b/chapter08/libffi.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&libffi-ch6-sbu;</seg> - <seg>&libffi-ch6-du;</seg> + <seg>&libffi-fin-sbu;</seg> + <seg>&libffi-fin-du;</seg> </seglistitem> </segmentedlist> @@ -49,18 +49,7 @@ If this is not done, all applications that link to libffi will trigger Illegal Operation Errors.</para> </note> -<!-- - <para>Modify the Makefile to install headers into the standard - <filename class="directory">/usr/include</filename> directory instead of - <filename class="directory">/usr/lib/libffi-&libffi-version;/include</filename>.</para> - -<screen><userinput remap="pre">sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \ - -i include/Makefile.in - -sed -e '/^includedir/ s/=.*$/=@includedir@/' \ - -e 's/^Cflags: -I${includedir}/Cflags:/' \ - -i libffi.pc.in</userinput></screen> ---> + <para>Prepare libffi for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native</userinput></screen> @@ -71,14 +60,14 @@ sed -e '/^includedir/ s/=.*$/=@includedir@/' \ <varlistentry> <term><parameter>--with-gcc-arch=native</parameter></term> <listitem> - <para>Ensure gcc optimizes for the current system. If this + <para>Ensure GCC optimizes for the current system. If this is not specified, the system is guessed and the code generated may not be correct for some systems. If the generated code will be copied from the native system to a less capable system, use the less capable system as a parameter. For details about alternative system types, see <ulink url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'> - the x86 options in the gcc manual</ulink>.</para> + the x86 options in the GCC manual</ulink>.</para> </listitem> </varlistentry> @@ -92,18 +81,18 @@ sed -e '/^includedir/ s/=.*$/=@includedir@/' \ <screen><userinput remap="test">make check</userinput></screen> - <para>Six tests, all related to test-callback.c, are known to fail.</para> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Libffi - 32-bit</title> + <title>Installation of Libffi - 32bit</title> <para>Clean previous build:</para> @@ -111,11 +100,10 @@ sed -e '/^includedir/ s/=.*$/=@includedir@/' \ <para>Prepare Libffi for compilation:</para> -<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ -./configure \ +<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" ./configure \ --prefix=/usr \ --disable-static \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --with-gcc-arch=i686 \ --host=i686-pc-linux-gnu</userinput></screen> @@ -130,15 +118,17 @@ sed -e '/^includedir/ s/=.*$/=@includedir@/' \ <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Libffi - x32-bit</title> + <title>Installation of Libtool - x32bit</title> <para>Clean previous build:</para> @@ -146,12 +136,11 @@ rm -rf DESTDIR</userinput></screen> <para>Prepare Libffi for compilation:</para> -<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \ -./configure \ - --prefix=/usr \ - --disable-static \ - --with-gcc-arch=x86_64 \ - --libdir=/usr/libx32 \ +<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" ./configure \ + --prefix=/usr \ + --disable-static \ + --libdir=&usr-lib-mx32; \ + --with-gcc-arch=x86_64 \ --host=x86_64-unknown-linux-gnux32</userinput></screen> <para>Compile the package:</para> @@ -165,10 +154,10 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-libffi" role="content"> <title>Contents of Libffi</title> diff --git a/chapter06/libpipeline.xml b/chapter08/libpipeline.xml index 6496e792d..5d275d381 100644 --- a/chapter06/libpipeline.xml +++ b/chapter08/libpipeline.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&libpipeline-ch6-sbu;</seg> - <seg>&libpipeline-ch6-du;</seg> + <seg>&libpipeline-fin-sbu;</seg> + <seg>&libpipeline-fin-du;</seg> </seglistitem> </segmentedlist> @@ -45,22 +45,6 @@ <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> -<!-- -<screen><userinput remap="configure">PKG_CONFIG_PATH=/tools/lib/pkgconfig ./configure - -prefix=/usr</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>PKG_CONFIG_PATH</parameter></term> - <listitem> - <para>Use pkg-config to obtain the location of the test - library metadata built in <xref linkend="ch-system-check"/>.</para> - </listitem> - </varlistentry> - - </variablelist> ---> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> diff --git a/chapter06/libtool.xml b/chapter08/libtool.xml index 91e11270a..c6f43742a 100644 --- a/chapter06/libtool.xml +++ b/chapter08/libtool.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&libtool-ch6-sbu;</seg> - <seg>&libtool-ch6-du;</seg> + <seg>&libtool-fin-sbu;</seg> + <seg>&libtool-fin-du;</seg> </seglistitem> </segmentedlist> @@ -70,10 +70,12 @@ </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Libtool - 32-bit</title> + <title>Installation of Libtool - 32bit</title> <para>Clean previous build:</para> @@ -83,7 +85,7 @@ <screen><userinput remap="configure">CC="gcc -m32" ./configure \ --prefix=/usr \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu</userinput></screen> <para>Compile the package:</para> @@ -92,16 +94,18 @@ <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Libtool - x32-bit</title> + <title>Installation of Libtool - x32bit</title> <para>Clean previous build:</para> @@ -110,8 +114,8 @@ rm -rf DESTDIR</userinput></screen> <para>Prepare Libtool for compilation:</para> <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ - --prefix=/usr \ - --libdir=/usr/libx32 \ + --prefix=/usr \ + --libdir=&usr-lib-mx32; \ --host=x86_64-pc-linux-gnux32</userinput></screen> <para>Compile the package:</para> @@ -120,12 +124,11 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> - + </sect2><!-- mx32 --> <sect2 id="contents-libtool" role="content"> <title>Contents of Libtool</title> diff --git a/chapter08/m4.xml b/chapter08/m4.xml new file mode 100644 index 000000000..54608bfeb --- /dev/null +++ b/chapter08/m4.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-m4" role="wrap"> + <?dbhtml filename="m4.html"?> + + <sect1info condition="script"> + <productname>m4</productname> + <productnumber>&m4-version;</productnumber> + <address>&m4-url;</address> + </sect1info> + + <title>M4-&m4-version;</title> + + <indexterm zone="ch-system-m4"> + <primary sortas="a-M4">M4</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The M4 package contains a macro processor.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&m4-fin-sbu;</seg> + <seg>&m4-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of M4</title> + + <para>First, make some fixes required by glibc-2.28 and later:</para> + +<screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c +echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen> + + <para>Prepare M4 for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 id="contents-m4" role="content"> + <title>Contents of M4</title> + + <segmentedlist> + <segtitle>Installed program</segtitle> + + <seglistitem> + <seg>m4</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="m4"> + <!-- Don't remove the extra space, it prevet a FOP warning. --> + <term><command>m4 </command></term> + <listitem> + <para>Copies the given files while expanding the macros that they + contain. These macros are either built-in or user-defined and can + take any number of arguments. Besides performing macro expansion, + <command>m4</command> has built-in functions for including named + files, running Unix commands, performing integer arithmetic, + manipulating text, recursion, etc. The <command>m4</command> program + can be used either as a front-end to a compiler or as a macro processor + in its own right.</para> + <indexterm zone="ch-system-m4 m4"> + <primary sortas="b-m4">m4</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter05/make.xml b/chapter08/make.xml index 205ae5f15..080ed3989 100644 --- a/chapter05/make.xml +++ b/chapter08/make.xml @@ -4,7 +4,8 @@ <!ENTITY % general-entities SYSTEM "../general.ent"> %general-entities; ]> -<sect1 id="ch-tools-make" role="wrap"> + +<sect1 id="ch-system-make" role="wrap"> <?dbhtml filename="make.html"?> <sect1info condition="script"> @@ -15,25 +16,23 @@ <title>Make-&make-version;</title> - <indexterm zone="ch-tools-make"> + <indexterm zone="ch-system-make"> <primary sortas="a-Make">Make</primary> - <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/make.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + <para>The Make package contains a program for controlling the generation of + executables and other non-source files of a package from source files.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&make-ch5-sbu;</seg> - <seg>&make-ch5-du;</seg> + <seg>&make-fin-sbu;</seg> + <seg>&make-fin-du;</seg> </seglistitem> </segmentedlist> @@ -42,34 +41,19 @@ <sect2 role="installation"> <title>Installation of Make</title> <!-- - <para>First, work around an error caused by glibc-2.27 and later:</para> + <para>Again, work around an error caused by glibc-2.27 and later:</para> <screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen> --> <para>Prepare Make for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/tools --without-guile</userinput></screen> - - <variablelist> - <title>The meaning of the configure option:</title> - - <varlistentry> - <term><parameter>--without-guile</parameter></term> - <listitem> - <para>This ensures that Make-&make-version; won't link against Guile libraries, which - may be present on the host system, but won't be available within the - <command>chroot</command> environment in the next chapter.</para> - </listitem> - </varlistentry> - </variablelist> +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Make test suite anyway, issue the following command:</para> + <para>To test the results, issue:</para> <screen><userinput remap="test">make check</userinput></screen> @@ -79,11 +63,35 @@ </sect2> - <sect2 role="content"> - <title/> - <para>Details on this package are located in - <xref linkend="contents-make" role="."/></para> + <sect2 id="contents-make" role="content"> + <title>Contents of Make</title> + + <segmentedlist> + <segtitle>Installed program</segtitle> + + <seglistitem> + <seg>make</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="make"> + <term><command>make</command></term> + <listitem> + <para>Automatically determines which pieces of a package need to + be (re)compiled and then issues the relevant commands</para> + <indexterm zone="ch-system-make make"> + <primary sortas="b-make">make</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> </sect2> diff --git a/chapter06/man-db.xml b/chapter08/man-db.xml index f2f46b891..45b1f4fa2 100644 --- a/chapter06/man-db.xml +++ b/chapter08/man-db.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&man-db-ch6-sbu;</seg> - <seg>&man-db-ch6-du;</seg> + <seg>&man-db-fin-sbu;</seg> + <seg>&man-db-fin-du;</seg> </seglistitem> </segmentedlist> @@ -126,21 +126,10 @@ <screen><userinput remap="test">make check</userinput></screen> - <para>One test, man-missing-locales, is known to fail in the LFS chroot envirnment.</para> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> -<!-- - <para revision="sysv">Remove an unwanted directory used for service files - which would cause some BLFS packages to also install files there: </para> - -<screen revision="sysv"><userinput remap="install">rm -rfv /lib/systemd</userinput></screen> - - <para revision="systemd">Remove a reference to a non-existent user:</para> -<screen revision="systemd"><userinput remap="install">sed -i "s:man man:root root:g" /usr/lib/tmpfiles.d/man-db.conf</userinput></screen> ---> </sect2> <sect2> diff --git a/chapter06/man-pages.xml b/chapter08/man-pages.xml index 3d2c52046..1fe3f4287 100644 --- a/chapter06/man-pages.xml +++ b/chapter08/man-pages.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&man-pages-ch6-sbu;</seg> - <seg>&man-pages-ch6-du;</seg> + <seg>&man-pages-fin-sbu;</seg> + <seg>&man-pages-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/meson.xml b/chapter08/meson.xml index 0b49c5441..b3c3224c5 100644 --- a/chapter06/meson.xml +++ b/chapter08/meson.xml @@ -23,27 +23,31 @@ <sect2 role="package"> <title/> - <para>Meson is an open source build system meant to be both extremely fast, - and, even more importantly, as user friendly as possible.</para> + <para>Meson is an open source build system meant to be both extremely fast + and as user friendly as possible.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&meson-ch6-sbu;</seg> - <seg>&meson-ch6-du;</seg> + <seg>&meson-fin-sbu;</seg> + <seg>&meson-fin-du;</seg> </seglistitem> </segmentedlist> + <tip revision="sysv"> + <para>This section is not strictly required for LFS if not using + systemd. On the other hand, meson/ninja is a powerful build system, + which is expected to be used more and more often. It is required for + several packages in <ulink url="&blfs-book;">the BLFS + book</ulink>.</para> + </tip> + </sect2> <sect2 role="installation"> <title>Installation of Meson</title> -<!-- - <para>Apply a fix from upstream to fix a regression:</para> -<screen><userinput remap="pre">sed -i "s@isfile(a)@& and not a.startswith('/dev')@" mesonbuild/interpreter.py</userinput></screen> ---> <para>Compile Meson with the following command:</para> <screen><userinput remap="make">python3 setup.py build</userinput></screen> @@ -64,8 +68,8 @@ cp -rv dest/* /</userinput></screen> <para>By default <command>python3 setup.py install</command> installs various files (such as man pages) into Python Eggs. With a specified root location, <command>setup.py</command> installs - these files into a standard hierarchy. Then we can just copy - the hierarchy so the files will be in the standard location. + these files into a standard hierarchy. Then the hierarchy + can just be copied to the standard location. </para> </listitem> </varlistentry> diff --git a/chapter06/mpc.xml b/chapter08/mpc.xml index 2d518c8c1..ad46b7e43 100644 --- a/chapter06/mpc.xml +++ b/chapter08/mpc.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&mpc-ch6-sbu;</seg> - <seg>&mpc-ch6-du;</seg> + <seg>&mpc-fin-sbu;</seg> + <seg>&mpc-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/mpfr.xml b/chapter08/mpfr.xml index ff8e323b7..f2344facb 100644 --- a/chapter06/mpfr.xml +++ b/chapter08/mpfr.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&mpfr-ch6-sbu;</seg> - <seg>&mpfr-ch6-du;</seg> + <seg>&mpfr-fin-sbu;</seg> + <seg>&mpfr-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml new file mode 100644 index 000000000..58c343253 --- /dev/null +++ b/chapter08/ncurses.xml @@ -0,0 +1,470 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-ncurses" role="wrap"> + <?dbhtml filename="ncurses.html"?> + + <sect1info condition="script"> + <productname>ncurses</productname> + <productnumber>&ncurses-version;</productnumber> + <address>&ncurses-url;</address> + </sect1info> + + <title>Ncurses-&ncurses-version;</title> + + <indexterm zone="ch-system-ncurses"> + <primary sortas="a-Ncurses">Ncurses</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Ncurses package contains libraries for terminal-independent + handling of character screens.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&ncurses-fin-sbu;</seg> + <seg>&ncurses-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Ncurses</title> + + <para>Don't install a static library that is not handled by configure:</para> + +<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen> + + <para>Prepare Ncurses for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --enable-pc-files \ + --enable-widec</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title> + + <varlistentry> + <term><parameter>--enable-widec</parameter></term> + <listitem> + <para>This switch causes wide-character libraries (e.g., <filename + class="libraryfile">libncursesw.so.&ncurses-version;</filename>) + to be built instead of normal ones (e.g., <filename + class="libraryfile">libncurses.so.&ncurses-version;</filename>). + These wide-character libraries are usable in both multibyte and + traditional 8-bit locales, while normal libraries work properly + only in 8-bit locales. Wide-character and normal libraries are + source-compatible, but not binary-compatible.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--enable-pc-files</parameter></term> + <listitem> + <para>This switch generates and installs .pc files for pkg-config. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--without-normal</parameter></term> + <listitem> + <para>This switch disables building and installing most static libraries. + </para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>This package has a test suite, but it can only be run after the + package has been installed. The tests reside in the + <filename class="directory">test/</filename> directory. See the + <filename>README</filename> file in that directory for further details. + </para> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para>Move the shared libraries to the + <filename class="directory">/lib</filename> directory, where they are + expected to reside:</para> + +<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen> + + <para>Because the libraries have been moved, one symlink points to + a non-existent file. Recreate it:</para> + +<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen> + + <para>Many applications still expect the linker to be able to find + non-wide-character Ncurses libraries. Trick such applications into linking with + wide-character libraries by means of symlinks and linker scripts:</para> + +<screen><userinput remap="install">for lib in ncurses form panel menu ; do + rm -vf /usr/lib/lib${lib}.so + echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so + ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc +done</userinput></screen> + + <para>Finally, make sure that old applications that look for + <filename class="libraryfile">-lcurses</filename> at build time are still + buildable:</para> + +<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so +echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so +ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen> + + <para>If desired, install the Ncurses documentation:</para> + +<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version; +cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen> + + <note> + + <para>The instructions above don't create non-wide-character Ncurses + libraries since no package installed by compiling from sources would link + against them at runtime. However, the only known binary-only + applications that link against non-wide-character Ncurses libraries + require version 5. If you must have such libraries because of some binary-only + application or to be compliant with LSB, build the package again with the + following commands:</para> + +<screen role="nodump"><userinput>make distclean +./configure --prefix=/usr \ + --with-shared \ + --without-normal \ + --without-debug \ + --without-cxx-binding \ + --with-abi-version=5 +make sources libs +cp -av lib/lib*.so.5* /usr/lib</userinput></screen> + </note> + + </sect2> + + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all"> + <title>Building Ncurses - 32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare Ncurses for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ +./configure --prefix=/usr \ + --host=i686-pc-linux-gnu \ + --libdir=&usr-lib-m32; \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --enable-pc-files \ + --enable-widec \ + --with-pkg-config-libdir=&usr-lib-m32;/pkgconfig</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +mkdir -p DESTDIR&usr-lib-m32;/pkgconfig +for lib in ncurses form panel menu ; do + rm -vf DESTDIR&usr-lib-m32;/lib${lib}.so + echo "INPUT(-l${lib}w)" > DESTDIR&usr-lib-m32;/lib${lib}.so + ln -svf ${lib}w.pc DESTDIR&usr-lib-m32;/pkgconfig/$lib.pc +done +rm -vf DESTDIR&usr-lib-m32;/libcursesw.so +echo "INPUT(-lncursesw)" > DESTDIR&usr-lib-m32;/libcursesw.so +ln -sfv libncurses.so DESTDIR&usr-lib-m32;/libcurses.so +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_x32,ml_all"> + <title>Building Ncurses - x32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare Ncurses for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \ +./configure --prefix=/usr \ + --host=x86_64-pc-linux-gnux32 \ + --libdir=&usr-lib-mx32; \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --enable-pc-files \ + --enable-widec \ + --with-pkg-config-libdir=&usr-lib-mx32;/pkgconfig</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +mkdir -p DESTDIR&usr-lib-mx32;/pkgconfig +for lib in ncurses form panel menu ; do + rm -vf DESTDIR&usr-lib-mx32;/lib${lib}.so + echo "INPUT(-l${lib}w)" > DESTDIR&usr-lib-mx32;/lib${lib}.so + ln -svf ${lib}w.pc DESTDIR&usr-lib-mx32;/pkgconfig/$lib.pc +done +rm -vf DESTDIR&usr-lib-mx32;/libcursesw.so +echo "INPUT(-lncursesw)" > DESTDIR&usr-lib-mx32;/libcursesw.so +ln -sfv libncurses.so DESTDIR&usr-lib-mx32;/libcurses.so +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- mx32 --> + + <sect2 id="contents-ncurses" role="content"> + <title>Contents of Ncurses</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed libraries</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + <seg> + captoinfo (link to tic), + clear, + infocmp, + infotocap (link to tic), + ncursesw6-config, + reset (link to tset), + tabs, + tic, + toe, + tput, and + tset + </seg> + <seg> + libcursesw.so (symlink and linker script to libncursesw.so), + libformw.so, + libmenuw.so, + libncursesw.so, + libncurses++w.a, + libpanelw.so, and their non-wide-character counterparts without "w" + in the library names.</seg> + <seg> + /usr/share/tabset, + /usr/share/terminfo, and + /usr/share/doc/ncurses-&ncurses-version; + </seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="captoinfo"> + <term><command>captoinfo</command></term> + <listitem> + <para>Converts a termcap description into a terminfo description</para> + <indexterm zone="ch-system-ncurses captoinfo"> + <primary sortas="b-captoinfo">captoinfo</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="clear"> + <term><command>clear</command></term> + <listitem> + <para>Clears the screen, if possible</para> + <indexterm zone="ch-system-ncurses clear"> + <primary sortas="b-clear">clear</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="infocmp"> + <term><command>infocmp</command></term> + <listitem> + <para>Compares or prints out terminfo descriptions</para> + <indexterm zone="ch-system-ncurses infocmp"> + <primary sortas="b-infocmp">infocmp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="infotocap"> + <term><command>infotocap</command></term> + <listitem> + <para>Converts a terminfo description into a termcap description</para> + <indexterm zone="ch-system-ncurses infotocap"> + <primary sortas="b-infotocap">infotocap</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="ncursesw6-config"> + <term><command>ncursesw6-config</command></term> + <listitem> + <para>Provides configuration information for ncurses</para> + <indexterm zone="ch-system-ncurses ncursesw6-config"> + <primary sortas="b-ncursesw6-config">ncursesw6-config</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="reset"> + <term><command>reset</command></term> + <listitem> + <para>Reinitializes a terminal to its default values</para> + <indexterm zone="ch-system-ncurses reset"> + <primary sortas="b-reset">reset</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tabs"> + <term><command>tabs</command></term> + <listitem> + <para>Clears and sets tab stops on a terminal</para> + <indexterm zone="ch-system-ncurses tabs"> + <primary sortas="b-tabs">tabs</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tic"> + <term><command>tic</command></term> + <listitem> + <para>The terminfo entry-description compiler that translates a + terminfo file from source format into the binary format needed for the + ncurses library routines [A terminfo file contains information on the + capabilities of a certain terminal.]</para> + <indexterm zone="ch-system-ncurses tic"> + <primary sortas="b-tic">tic</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="toe"> + <term><command>toe</command></term> + <listitem> + <para>Lists all available terminal types, giving the primary name and + description for each</para> + <indexterm zone="ch-system-ncurses toe"> + <primary sortas="b-toe">toe</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tput"> + <term><command>tput</command></term> + <listitem> + <para>Makes the values of terminal-dependent capabilities available to + the shell; it can also be used to reset or initialize a terminal or + report its long name</para> + <indexterm zone="ch-system-ncurses tput"> + <primary sortas="b-tput">tput</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tset"> + <term><command>tset</command></term> + <listitem> + <para>Can be used to initialize terminals</para> + <indexterm zone="ch-system-ncurses tset"> + <primary sortas="b-tset">tset</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libcursesw"> + <term><filename class="libraryfile">libcursesw</filename></term> + <listitem> + <para>A link to <filename>libncursesw</filename></para> + <indexterm zone="ch-system-ncurses libcursesw"> + <primary sortas="c-libcursesw">libcursesw</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libncursesw"> + <term><filename class="libraryfile">libncursesw</filename></term> + <listitem> + <para>Contains functions to display text in many complex ways on a + terminal screen; a good example of the use of these functions is the + menu displayed during the kernel's <command>make + menuconfig</command></para> + <indexterm zone="ch-system-ncurses libncursesw"> + <primary sortas="c-libncursesw">libncursesw</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libformw"> + <term><filename class="libraryfile">libformw</filename></term> + <listitem> + <para>Contains functions to implement forms</para> + <indexterm zone="ch-system-ncurses libformw"> + <primary sortas="c-libformw">libformw</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libmenuw"> + <term><filename class="libraryfile">libmenuw</filename></term> + <listitem> + <para>Contains functions to implement menus</para> + <indexterm zone="ch-system-ncurses libmenuw"> + <primary sortas="c-libmenuw">libmenuw</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libpanelw"> + <term><filename class="libraryfile">libpanelw</filename></term> + <listitem> + <para>Contains functions to implement panels</para> + <indexterm zone="ch-system-ncurses libpanelw"> + <primary sortas="c-libpanelw">libpanelw</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/ninja.xml b/chapter08/ninja.xml index e998c64fb..20613c542 100644 --- a/chapter06/ninja.xml +++ b/chapter08/ninja.xml @@ -30,11 +30,20 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&ninja-ch6-sbu;</seg> - <seg>&ninja-ch6-du;</seg> + <seg>&ninja-fin-sbu;</seg> + <seg>&ninja-fin-du;</seg> </seglistitem> </segmentedlist> + <tip revision="sysv"> + <para>This section is not strictly required for LFS if not using + systemd. On the other hand, ninja associated to meson makes + a powerful build system combination, + which is expected to be used more and more often. It is required for + several packages in <ulink url="&blfs-book;">the BLFS + book</ulink>.</para> + </tip> + </sect2> <sect2 role="installation"> diff --git a/chapter06/openssl.xml b/chapter08/openssl.xml index 41f02651b..50cd2a812 100644 --- a/chapter06/openssl.xml +++ b/chapter08/openssl.xml @@ -25,7 +25,7 @@ <para>The OpenSSL package contains management tools and libraries relating to cryptography. These are useful for providing cryptographic functions - to other packages, such as OpenSSH, email applications and web browsers + to other packages, such as OpenSSH, email applications, and web browsers (for accessing HTTPS sites). </para> <segmentedlist> @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&openssl-ch6-sbu;</seg> - <seg>&openssl-ch6-du;</seg> + <seg>&openssl-fin-sbu;</seg> + <seg>&openssl-fin-du;</seg> </seglistitem> </segmentedlist> @@ -42,12 +42,7 @@ <sect2 role="installation"> <title>Installation of OpenSSL</title> -<!-- - <para>First, fix a problem identified upstream:</para> -<screen><userinput remap="pre">sed -i '/\} data/s/ =.*$/;\n memset(\&data, 0, sizeof(data));/' \ - crypto/rand/rand_lib.c</userinput></screen> ---> <para>Prepare OpenSSL for compilation:</para> <screen><userinput remap="configure">./config --prefix=/usr \ @@ -80,10 +75,12 @@ cp -vfr doc/* /usr/share/doc/openssl-&openssl-version;</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of OpenSSL - 32-bit</title> + <title>Installation of OpenSSL - 32bit</title> <para>Clean previous build:</para> @@ -96,27 +93,30 @@ CC="gcc -m32 -march=i686" \ CXX="g++ -m32 -march=i686" \ ./config \ --prefix=/usr \ - --libdir=/usr/lib32 \ - --openssldir=/etc/ssl \ - --libdir=lib32 \ - shared \ - zlib-dynamic</userinput></screen> + --libdir=&usr-lib-m32; \ + --openssldir=/etc/ssl \ + --libdir=lib32 \ + shared \ + zlib-dynamic</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> + <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of OpenSSL - x32-bit</title> + <title>Installation of OpenSSL - x32bit</title> <para>Clean previous build:</para> @@ -129,22 +129,23 @@ CC="gcc -mx32" \ CXX="g++ -mx32" \ ./config \ --prefix=/usr \ - --libdir=/usr/libx32 \ - --openssldir=/etc/ssl \ - --libdir=libx32 \ - shared \ - zlib-dynamic</userinput></screen> + --libdir=&usr-lib-mx32; \ + --openssldir=/etc/ssl \ + --libdir=libx32 \ + shared \ + zlib-dynamic</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> + <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-openssl" role="content"> <title>Contents of OpenSSL</title> diff --git a/chapter08/patch.xml b/chapter08/patch.xml new file mode 100644 index 000000000..870007b98 --- /dev/null +++ b/chapter08/patch.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-patch" role="wrap"> + <?dbhtml filename="patch.html"?> + + <sect1info condition="script"> + <productname>patch</productname> + <productnumber>&patch-version;</productnumber> + <address>&patch-url;</address> + </sect1info> + + <title>Patch-&patch-version;</title> + + <indexterm zone="ch-system-patch"> + <primary sortas="a-Patch">Patch</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Patch package contains a program for modifying or creating files + by applying a <quote>patch</quote> file typically created by the + <command>diff</command> program.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&patch-fin-sbu;</seg> + <seg>&patch-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Patch</title> + + <para>Prepare Patch for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 id="contents-patch" role="content"> + <title>Contents of Patch</title> + + <segmentedlist> + <segtitle>Installed program</segtitle> + + <seglistitem> + <seg>patch</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="patch"> + <term><command>patch</command></term> + <listitem> + <para>Modifies files according to a patch file (A patch file is + normally a difference listing created with the <command>diff</command> + program. By applying these differences to the original files, + <command>patch</command> creates the patched versions.)</para> + <indexterm zone="ch-system-patch patch"> + <primary sortas="b-patch">patch</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/perl.xml b/chapter08/perl.xml index 284464d87..fd5e07f06 100644 --- a/chapter06/perl.xml +++ b/chapter08/perl.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&perl-ch6-sbu;</seg> - <seg>&perl-ch6-du;</seg> + <seg>&perl-fin-sbu;</seg> + <seg>&perl-fin-du;</seg> </seglistitem> </segmentedlist> @@ -41,12 +41,6 @@ <sect2 role="installation"> <title>Installation of Perl</title> - <para>First create a basic <filename>/etc/hosts</filename> file to be - referenced in one of Perl's configuration files as well as the optional - test suite:</para> - -<screen><userinput remap="pre">echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> - <para>This version of Perl now builds the Compress::Raw::Zlib and Compress::Raw::BZip2 modules. By default Perl will use an internal copy of the sources for the build. diff --git a/chapter06/pkgconfig.xml b/chapter08/pkgconfig.xml index 3c311e389..b987a7652 100644 --- a/chapter06/pkgconfig.xml +++ b/chapter08/pkgconfig.xml @@ -23,17 +23,17 @@ <sect2 role="package"> <title/> - <para> The pkg-config package contains a tool for passing the include path - and/or library paths to build tools during the configure and make file - execution.</para> + <para>The pkg-config package contains a tool for passing the include path + and/or library paths to build tools during the configure and make phases + of package installations.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&pkgconfig-ch6-sbu;</seg> - <seg>&pkgconfig-ch6-du;</seg> + <seg>&pkgconfig-fin-sbu;</seg> + <seg>&pkgconfig-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/pkgmgt.xml b/chapter08/pkgmgt.xml index d28038467..14e94fdaf 100644 --- a/chapter06/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -45,36 +45,33 @@ <title>Upgrade Issues</title> <para>A Package Manager makes it easy to upgrade to newer versions when they - are released. Generally the instructions in the LFS and BLFS Book can be + are released. Generally the instructions in the LFS and BLFS books can be used to upgrade to the newer versions. Here are some points that you should be aware of when upgrading packages, especially on a running system.</para> <itemizedlist> <listitem> <para>If Glibc needs to be upgraded to a newer version, (e.g. from - glibc-2.19 to glibc-2.20), it is safer to rebuild LFS. Though you + glibc-2.31 to glibc-2.32), it is safer to rebuild LFS. Though you <emphasis>may</emphasis> be able to rebuild all the packages in their dependency order, we do not recommend it. </para> </listitem> - <listitem> - <para>If a package containing a shared library is updated, and if the - name of the library changes, then all the packages dynamically linked - to the library need to be recompiled to link against the newer library. - (Note that there is no correlation between the package version and the - name of the library.) For example, consider a package foo-1.2.3 that - installs a shared library with name - <filename class='libraryfile'>libfoo.so.1</filename>. Say you upgrade - the package to a newer version foo-1.2.4 that installs a shared library - with name <filename class='libraryfile'>libfoo.so.2</filename>. In this - case, all packages that are dynamically linked to - <filename class='libraryfile'>libfoo.so.1</filename> need to be - recompiled to link against - <filename class='libraryfile'>libfoo.so.2</filename>. Note that you - should not remove the previous libraries until the dependent packages - are recompiled.</para> - </listitem> - </itemizedlist> + <listitem> <para>If a package containing a shared library is updated, and + if the name of the library changes, then any the packages dynamically + linked to the library need to be recompiled in order to link against the + newer library. (Note that there is no correlation between the package + version and the name of the library.) For example, consider a package + foo-1.2.3 that installs a shared library with name <filename + class='libraryfile'>libfoo.so.1</filename>. If you upgrade the package to + a newer version foo-1.2.4 that installs a shared library with name + <filename class='libraryfile'>libfoo.so.2</filename>. In this case, any + packages that are dynamically linked to <filename + class='libraryfile'>libfoo.so.1</filename> need to be recompiled to link + against <filename class='libraryfile'>libfoo.so.2</filename> in order to + use the new library version. You should not remove the previous + libraries unless all the dependent packages are recompiled.</para> + </listitem> </itemizedlist> </sect2> diff --git a/chapter06/procps.xml b/chapter08/procps.xml index 59bf0864c..b09f0f69d 100644 --- a/chapter06/procps.xml +++ b/chapter08/procps.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&procps-ng-ch6-sbu;</seg> - <seg>&procps-ng-ch6-du;</seg> + <seg>&procps-ng-fin-sbu;</seg> + <seg>&procps-ng-fin-du;</seg> </seglistitem> </segmentedlist> @@ -58,7 +58,7 @@ --with-systemd</userinput></screen> <variablelist> - <title>The meaning of the configure options:</title> + <title>The meaning of the configure option:</title> <varlistentry> <term><parameter>--disable-kill</parameter></term> diff --git a/chapter06/psmisc.xml b/chapter08/psmisc.xml index b01303131..febf90748 100644 --- a/chapter06/psmisc.xml +++ b/chapter08/psmisc.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&psmisc-ch6-sbu;</seg> - <seg>&psmisc-ch6-du;</seg> + <seg>&psmisc-fin-sbu;</seg> + <seg>&psmisc-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/python.xml b/chapter08/python.xml index cc440903d..f25b8a691 100644 --- a/chapter06/python.xml +++ b/chapter08/python.xml @@ -17,7 +17,7 @@ <title>Python-&python-version;</title> <indexterm zone="ch-system-Python"> - <primary sortas="a-python">python</primary> + <primary sortas="a-Python">Python</primary> </indexterm> <sect2 role="package"> @@ -25,15 +25,15 @@ <para>The Python 3 package contains the Python development environment. It is useful for object-oriented programming, writing scripts, prototyping - large programs or developing entire applications.</para> + large programs, or developing entire applications.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&python-ch6-sbu;</seg> - <seg>&python-ch6-du;</seg> + <seg>&python-fin-sbu;</seg> + <seg>&python-fin-du;</seg> </seglistitem> </segmentedlist> @@ -84,7 +84,7 @@ <screen><userinput remap="make">make</userinput></screen> <para>To test the results, issue <command>make test</command>. - Some tests requiring network connection or additional packages are + Some tests requiring a network connection or additional packages are skipped. The test named test_normalization fails because network configuration is not completed yet. For more comprehensive results, the test can be rerun when Python 3 is reinstalled in BLFS.</para> @@ -170,8 +170,8 @@ tar --strip-components=1 \ <para> is a <application>Python</application> program that reads <application>Python 2.x</application> source code and applies a - series of fixes to transform it into valid - <application>Python 3.x</application> code. + series of fixes to transform it into + valid <application>Python 3.x</application> code. </para> <indexterm zone="ch-system-Python"> <primary sortas="b-2to3">2to3</primary> @@ -231,20 +231,7 @@ tar --strip-components=1 \ </indexterm> </listitem> </varlistentry> -<!-- - <varlistentry id="pyvenv"> - <term><command>pyvenv</command></term> - <listitem> - <para> - creates virtual <application>Python</application> environments in - one or more target directories. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-pyvenv">pyvenv</primary> - </indexterm> - </listitem> - </varlistentry> ---> + </variablelist> </sect2> diff --git a/chapter06/readline.xml b/chapter08/readline.xml index 8cd3759b5..4077b23b4 100644 --- a/chapter06/readline.xml +++ b/chapter08/readline.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&readline-ch6-sbu;</seg> - <seg>&readline-ch6-du;</seg> + <seg>&readline-fin-sbu;</seg> + <seg>&readline-fin-du;</seg> </seglistitem> </segmentedlist> @@ -60,12 +60,12 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen> <title>The meaning of the configure option:</title> <varlistentry> - <term><parameter>--with-curses"</parameter></term> + <term><parameter>--with-curses</parameter></term> <listitem> <para>This option tells Readline that it can find the termcap - library functions in the curses library, rather than a separate - termcap library. It allows generating a correct - <filename>readline.pc</filename> file.</para> + library functions in the curses library, rather than a separate + termcap library. It allows generating a correct + <filename>readline.pc</filename> file.</para> </listitem> </varlistentry> @@ -73,13 +73,13 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen> <para>Compile the package:</para> -<screen><userinput remap="make">make SHLIB_LIBS="-L/tools/lib -lncursesw"</userinput></screen> +<screen><userinput remap="make">make SHLIB_LIBS="-lncursesw"</userinput></screen> <variablelist> <title>The meaning of the make option:</title> <varlistentry> - <term><parameter>SHLIB_LIBS="-L/tools/lib -lncursesw"</parameter></term> + <term><parameter>SHLIB_LIBS="-lncursesw"</parameter></term> <listitem> <para>This option forces Readline to link against the <filename class="libraryfile">libncursesw</filename> library.</para> @@ -92,7 +92,7 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make SHLIB_LIBS="-L/tools/lib -lncursesw" install</userinput></screen> +<screen><userinput remap="install">make SHLIB_LIBS="-lncursesw" install</userinput></screen> <para>Now move the dynamic libraries to a more appropriate location and fix up some permissions and symbolic links:</para> @@ -108,10 +108,12 @@ ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</us </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Readline - 32-bit</title> + <title>Installation of Readline - 32bit</title> <para>Clean previous build:</para> @@ -119,9 +121,9 @@ ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</us <para>Prepare Readline for compilation:</para> -<screen><userinput remap="configure">CC="gcc -m32 -march=i686" ./configure \ +<screen><userinput remap="configure">CC="gcc -m32" ./configure \ --prefix=/usr \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --disable-static \ --host=i686-pc-linux-gnu</userinput></screen> @@ -132,15 +134,17 @@ ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</us <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Readline - x32-bit</title> + <title>Installation of Readline - x32bit</title> <para>Clean previous build:</para> @@ -150,7 +154,7 @@ rm -rf DESTDIR</userinput></screen> <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ --prefix=/usr \ - --libdir=/usr/libx32 \ + --libdir=&usr-lib-mx32; \ --disable-static \ --host=x86_64-pc-linux-gnux32</userinput></screen> @@ -161,10 +165,10 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-readline" role="content"> <title>Contents of Readline</title> diff --git a/chapter06/revisedchroot.xml b/chapter08/revisedchroot.xml index b80e32115..409baf2f6 100644 --- a/chapter06/revisedchroot.xml +++ b/chapter08/revisedchroot.xml @@ -26,24 +26,15 @@ chroot "$LFS" /usr/bin/env -i \ PATH=/bin:/usr/bin:/sbin:/usr/sbin \ /bin/bash --login</userinput></screen> - <para>The reason for this is that the programs in <filename - class="directory">/tools</filename> are no longer needed. For this reason - you can delete the <filename class="directory">/tools</filename> - directory if so desired.</para> - - <note> - <para>Removing <filename class="directory">/tools</filename> will also - remove the temporary copies of Tcl, Expect, and DejaGNU which were used - for running the toolchain tests. If you need these programs later on, - they will need to be recompiled and re-installed. The BLFS book has - instructions for this (see <ulink url="&blfs-root;"/>).</para> - </note> + <para>Here the <parameter>+h</parameter> option is not used anymore, since + all the previous programs have been replaced: hashing is therefore + possible.</para> <para>If the virtual kernel file systems have been unmounted, either manually or through a reboot, ensure that the virtual kernel file systems are mounted when reentering the chroot. This process was explained in <xref - linkend="ch-system-bindmount"/> and <xref - linkend="ch-system-kernfsmount"/>.</para> + linkend="ch-tools-bindmount"/> and <xref + linkend="ch-tools-kernfsmount"/>.</para> <para>There were several static libraries that were not suppressed earlier in the chapter in order to satisfy the regression tests in several packages. These @@ -56,7 +47,13 @@ rm -f /usr/lib/libbz2.a rm -f /usr/lib/lib{com_err,e2p,ext2fs,ss}.a rm -f /usr/lib/libltdl.a rm -f /usr/lib/libfl.a -rm -f /usr/lib/libz.a</userinput></screen> +rm -f /usr/lib/libz.a</userinput><userinput arch="ml_32,ml_all"> +rm -f &usr-lib-m32;/libbz2.a +rm -f &usr-lib-m32;/libltdl.a +rm -f &usr-lib-m32;/libz.a</userinput><userinput arch="ml_x32,ml_all"> +rm -f &usr-lib-mx32;/libbz2.a +rm -f &usr-lib-mx32;/libltdl.a +rm -f &usr-lib-mx32;/libz.a</userinput></screen> <para>There are also several files installed in the /usr/lib and /usr/libexec directories with a file name extention of .la. These are "libtool archive" @@ -65,18 +62,16 @@ rm -f /usr/lib/libz.a</userinput></screen> shared libraries, specially when using also non-autotools build systems. To remove them, run:</para> - <screen arch="default"><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen> - <screen arch="ml_32"><userinput>find /usr/lib{,32} /usr/libexec -name \*.la -delete</userinput></screen> -<screen arch="ml_x32"><userinput>find /usr/lib{,x32} /usr/libexec -name \*.la -delete</userinput></screen> - <screen arch="ml_all"><userinput>find /usr/lib{,{,x}32} /usr/libexec -name \*.la -delete</userinput></screen> +<screen><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput><userinput arch="ml_32,ml_all"> +find &usr-lib-m32; -name \*.la -delete</userinput><userinput arch="ml_x32,ml_all"> +find &usr-lib-mx32; -name \*.la -delete</userinput></screen> <para>For more information about libtool archive files, see the <ulink url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool Archive (.la) files"</ulink>.</para> - <para>Finally, remove the temporary 'tester' usr account created at the - beginning of this chapter.</para> + <para>Finally, remove the temporary 'tester' user account created at the + beginning of the previous chapter.</para> -<screen><userinput>sed -i '/tester/d' /etc/passwd /etc/group -rm -rf /home/tester</userinput></screen> +<screen><userinput>userdel -r tester</userinput></screen> </sect1> diff --git a/chapter08/sed.xml b/chapter08/sed.xml new file mode 100644 index 000000000..77d30479b --- /dev/null +++ b/chapter08/sed.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-sed" role="wrap"> + <?dbhtml filename="sed.html"?> + + <sect1info condition="script"> + <productname>sed</productname> + <productnumber>&sed-version;</productnumber> + <address>&sed-url;</address> + </sect1info> + + <title>Sed-&sed-version;</title> + + <indexterm zone="ch-system-sed"> + <primary sortas="a-Sed">Sed</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Sed package contains a stream editor.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&sed-fin-sbu;</seg> + <seg>&sed-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Sed</title> + + <para>Prepare Sed for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> + + <para>Compile the package and generate the HTML documentation:</para> + +<screen><userinput remap="make">make +make html</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">chown -Rv tester . +su tester -c "PATH=$PATH make check"</userinput></screen> + + <para>Install the package and its documentation:</para> + +<screen><userinput remap="install">make install +install -d -m755 /usr/share/doc/sed-&sed-version; +install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen> + + </sect2> + + <sect2 id="contents-sed" role="content"> + <title>Contents of Sed</title> + + <segmentedlist> + <segtitle>Installed program</segtitle> + <segtitle>Installed directory</segtitle> + + <seglistitem> + <seg>sed</seg> + <seg>/usr/share/doc/sed-&sed-version;</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="sed"> + <term><command>sed</command></term> + <listitem> + <para>Filters and transforms text files in a single pass</para> + <indexterm zone="ch-system-sed sed"> + <primary sortas="b-sed">sed</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/shadow.xml b/chapter08/shadow.xml index 7fd621bdb..3ccbfbb58 100644 --- a/chapter06/shadow.xml +++ b/chapter08/shadow.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&shadow-ch6-sbu;</seg> - <seg>&shadow-ch6-du;</seg> + <seg>&shadow-fin-sbu;</seg> + <seg>&shadow-fin-du;</seg> </seglistitem> </segmentedlist> @@ -67,13 +67,14 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s for user mailboxes that Shadow uses by default to the <filename class="directory">/var/mail</filename> location used currently:</para> -<screen><userinput remap="pre">sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \ - -e 's@/var/spool/mail@/var/mail@' etc/login.defs</userinput></screen> +<screen><userinput remap="pre">sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ + -e 's:/var/spool/mail:/var/mail:' \ + -i etc/login.defs</userinput></screen> <note> <para>If you chose to build Shadow with Cracklib support, run the following:</para> -<screen role="nodump"><userinput>sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs</userinput></screen> +<screen role="nodump"><userinput>sed -i 's:DICTPATH.*:DICTPATH\t/lib/cracklib/pw_dict:' etc/login.defs</userinput></screen> </note> <para>Make a minor change to make the first group number generated @@ -84,7 +85,8 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s <para>Prepare Shadow for compilation:</para> <screen><userinput remap="configure">touch /usr/bin/passwd -./configure --sysconfdir=/etc --with-group-name-max-length=32</userinput></screen> +./configure --sysconfdir=/etc \ + --with-group-name-max-length=32</userinput></screen> <variablelist> <title>The meaning of the configure option:</title> diff --git a/chapter06/strippingagain.xml b/chapter08/strippingagain.xml index b7a5cf0cd..f787d7218 100644 --- a/chapter06/strippingagain.xml +++ b/chapter08/strippingagain.xml @@ -13,7 +13,7 @@ <para>This section is optional. If the intended user is not a programmer and does not plan to do any debugging on the system software, the system size can be decreased - by about 90 MB by removing the debugging symbols from binaries and + by about 2 GB by removing the debugging symbols from binaries and libraries. This causes no inconvenience other than not being able to debug the software fully anymore.</para> @@ -30,97 +30,82 @@ url='&blfs-book;/general/gdb.html'>gdb</ulink> later in BLFS. </para> -<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from gcc --> +<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC --> <!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"--> -<screen arch="default"><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" +<screen><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" cd /lib - for LIB in $save_lib; do objcopy --only-keep-debug $LIB $LIB.dbg strip --strip-unneeded $LIB objcopy --add-gnu-debuglink=$LIB.dbg $LIB -done +done</userinput> +<userinput arch="ml_32,ml_all"> +cd &lib-m32; +for LIB in $save_lib; do + objcopy --only-keep-debug $LIB $LIB.dbg + strip --strip-unneeded $LIB + objcopy --add-gnu-debuglink=$LIB.dbg $LIB +done</userinput> +<userinput arch="ml_x32,ml_all"> +cd &lib-mx32; +for LIB in $save_lib; do + objcopy --only-keep-debug $LIB $LIB.dbg + strip --strip-unneeded $LIB + objcopy --add-gnu-debuglink=$LIB.dbg $LIB +done</userinput><userinput> save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;--> cd /usr/lib - for LIB in $save_usrlib; do objcopy --only-keep-debug $LIB $LIB.dbg strip --strip-unneeded $LIB objcopy --add-gnu-debuglink=$LIB.dbg $LIB -done - -unset LIB save_lib save_usrlib</userinput></screen> - -<screen arch="ml_32,ml_x32,ml_all"><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" - -cd /lib - -for LIB in $save_lib; do +done</userinput> +<userinput arch="ml_32,ml_all"> +cd &usr-lib-m32; +for LIB in $save_usrlib; do objcopy --only-keep-debug $LIB $LIB.dbg strip --strip-unneeded $LIB objcopy --add-gnu-debuglink=$LIB.dbg $LIB -done - -save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; - libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;--> - -for libdir in /usr/lib{,{,x}32}; do - cd $libdir - for LIB in $save_usrlib; do - objcopy --only-keep-debug $LIB $LIB.dbg - strip --strip-unneeded $LIB - objcopy --add-gnu-debuglink=$LIB.dbg $LIB - done -done +done</userinput> +<userinput arch="ml_x32,ml_all"> +cd &usr-lib-mx32; +for LIB in $save_usrlib; do + objcopy --only-keep-debug $LIB $LIB.dbg + strip --strip-unneeded $LIB + objcopy --add-gnu-debuglink=$LIB.dbg $LIB +done</userinput><userinput> unset LIB save_lib save_usrlib</userinput></screen> - <para>Before performing the stripping, take special care to ensure that +<!-- <para>Before performing the stripping, take special care to ensure that none of the binaries that are about to be stripped are running:</para> <screen role="nodump"><userinput>exec /tools/bin/bash</userinput></screen> - <!-- - If - unsure whether the user entered chroot with the command given in - <xref linkend="ch-system-chroot" role=","/> first use the version - of bash we created in - chroot:</para> - -<screen role="nodump"><userinput>logout</userinput></screen> - - <para>Then reenter it with:</para> - -<screen role="nodump"><userinput>chroot $LFS /tools/bin/env -i \ - HOME=/root TERM=$TERM \ - PS1='(lfs chroot) \u:\w\$ ' \ - PATH=/bin:/usr/bin:/sbin:/usr/sbin \ - /tools/bin/bash - -login</userinput></screen>--> - <para>Now the binaries and libraries can be safely stripped:</para> - -<screen arch="default"><userinput>/tools/bin/find /usr/lib -type f -name \*.a \ - -exec /tools/bin/strip --strip-debug {} ';' - -/tools/bin/find /lib /usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) \ - -exec /tools/bin/strip --strip-unneeded {} ';' - -/tools/bin/find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ - -exec /tools/bin/strip --strip-all {} ';'</userinput></screen> - -<screen arch="ml_32,ml_x32,ml_all"><userinput>/tools/bin/find /usr/lib{,{,x}32} -type f -name \*.a \ - -exec /tools/bin/strip --strip-debug {} ';' - -/tools/bin/find /lib /usr/lib{,{,x}32} -type f \( -name \*.so* -a ! -name \*dbg \) \ - -exec /tools/bin/strip --strip-unneeded {} ';' - -/tools/bin/find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ - -exec /tools/bin/strip --strip-all {} ';'</userinput></screen> +--> + <para>Now the binaries and libraries can be stripped:</para> +<screen><userinput>find /usr/lib -type f -name \*.a \ + -exec strip --strip-debug {} ';'</userinput> +<userinput arch="ml_32,ml_all">find &usr-lib-m32; -type f -name \*.a \ + -exec strip --strip-debug {} ';'</userinput> +<userinput arch="ml_x32,ml_all">find &usr-lib-mx32; -type f -name \*.a \ + -exec strip --strip-debug {} ';'</userinput><userinput> + +find /lib /usr/lib -type f -name \*.so* ! -name \*dbg \ + -exec strip --strip-unneeded {} ';'</userinput> +<userinput arch="ml_32,ml_all">find &lib-m32; &usr-lib-m32; -type f -name \*.so* ! -name \*dbg \ + -exec strip --strip-unneeded {} ';'</userinput> +<userinput arch="ml_x32,ml_all">find &lib-mx32; &usr-lib-mx32; -type f -name \*.so* ! -name \*dbg \ + -exec strip --strip-unneeded {} ';'</userinput><userinput> + +find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ + -exec strip --strip-all {} ';'</userinput></screen> <para>A large number of files will be reported as having their file format not recognized. These warnings can be safely ignored. These diff --git a/chapter06/sysklogd.xml b/chapter08/sysklogd.xml index e96980cb4..9aec7ba9b 100644 --- a/chapter06/sysklogd.xml +++ b/chapter08/sysklogd.xml @@ -23,7 +23,7 @@ <sect2 role="package"> <title/> - <para>The Sysklogd package contains programs for logging system messages, + <para>The sysklogd package contains programs for logging system messages, such as those given by the kernel when unusual things happen.</para> <segmentedlist> @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&sysklogd-ch6-sbu;</seg> - <seg>&sysklogd-ch6-du;</seg> + <seg>&sysklogd-fin-sbu;</seg> + <seg>&sysklogd-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter06/systemd.xml b/chapter08/systemd.xml index 1566261c2..88824d17b 100644 --- a/chapter06/systemd.xml +++ b/chapter08/systemd.xml @@ -31,24 +31,22 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&systemd-ch6-sbu;</seg> - <seg>&systemd-ch6-du;</seg> + <seg>&systemd-fin-sbu;</seg> + <seg>&systemd-fin-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of systemd</title> -<!-- - <para>First, apply a patch to fix various bugs since the release - of systemd-243.</para> -<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-consolidated_fixes-2.patch</userinput></screen> ---> + <para>First, apply a patch to fix the build with GCC-10 and fix a segfault:</para> - <para>Create a symlink to work around missing xsltproc:</para> +<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-gcc_10-fixes-2.patch</userinput></screen> + + <para>Create a symlink to work around the xsltproc command not being installed:</para> -<screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen> +<screen><userinput remap="pre">ln -sf /bin/true /usr/bin/xsltproc</userinput></screen> <para>Set up the man pages:</para> @@ -73,7 +71,6 @@ LANG=en_US.UTF-8 \ meson --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - -Dc_args=-Wno-format-overflow \ -Dblkid=true \ -Dbuildtype=release \ -Ddefault-dnssec=no \ @@ -99,22 +96,10 @@ meson --prefix=/usr \ <title>The meaning of the meson options:</title> <varlistentry> - <term><parameter>-Dc_args=-Wno-format-overflow</parameter></term> - <listitem> - <para>The defaults flags passed to gcc contain - <parameter>-Werror=format-overflow</parameter>, which generates - an error with GCC 10. Passing this parameter prevents the error - from occuring.</para> - </listitem> - </varlistentry> - - <varlistentry> <term><parameter>-D*-path=*</parameter></term> <listitem> - <para>These switches provide location of binaries needed by - systemd at runtime that have not yet been installed, or who's - pkgconfig files are currently only in - <filename>/tools/lib/pkgconfig</filename>.</para> + <para>These switches provide the location of binaries needed by + systemd at runtime that have not yet been installed.</para> </listitem> </varlistentry> @@ -156,7 +141,7 @@ meson --prefix=/usr \ <term><parameter>-Droot*</parameter></term> <listitem> <para>These switches ensure that core programs and - shared libraries are installed in the subdirectories + shared libraries are installed in subdirectories of the root partition.</para> </listitem> </varlistentry> @@ -202,11 +187,7 @@ meson --prefix=/usr \ <para>Compile the package:</para> <screen><userinput remap="make">LANG=en_US.UTF-8 ninja</userinput></screen> -<!-- - <para>To test the package, execute the following command:</para> -<screen><userinput remap="test">LANG=en_US.UTF-8 ninja test</userinput></screen> ---> <para>Install the package:</para> <screen><userinput remap="install">LANG=en_US.UTF-8 ninja install</userinput></screen> @@ -234,49 +215,38 @@ meson --prefix=/usr \ <para>Prevent systemd from resetting the maximum PID value which causes some problems with packages and units in BLFS:</para> - <screen><userinput remap="adjust">rm -f /usr/lib/sysctl.d/50-pid-max.conf</userinput></screen> - <!-- - <para>Prevent systemd from creating <filename>/run/nologin</filename> - to allow unprivileged user logins without - <application>systemd-logind</application>:</para> - -<screen><userinput remap="adjust">rm -f /usr/lib/tmpfiles.d/systemd-nologin.conf</userinput></screen> - --> </sect2> -<!-- ====== 32-bit ===== --> - + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all" role="installation"> <title>Installation of systemd - 32-bit</title> - <para>If still in the build directory, step out:</para> -<screen><userinput remap="pre">cd ..</userinput></screen> - <para>Clean previous build:</para> -<screen><userinput remap="pre">rm -rf build</userinput></screen> +<screen><userinput remap="pre">rm -rf *</userinput></screen> <para>Create a symlink to work around missing xsltproc:</para> -<screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen> +<!-- screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen --> +<screen><userinput remap="pre">ln -sf /bin/true /usr/bin/xsltproc</userinput></screen> +<!-- with cross-LFS we have util-linux in place: <para>Because we have not yet installed the final version of Util-Linux, create links to the libraries in the approprite location:</para> <screen><userinput remap="pre">for file in /tools/lib32/lib{blkid,mount,uuid}*; do ln -sf $file /usr/lib32/ done</userinput></screen> - - <para>Set up the man pages:</para> - -<screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen> +--> <para>Prepare systemd for compilation:</para> - <screen><userinput remap="configure">cd build -PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/tools/lib32/pkgconfig" \ + <screen><userinput remap="configure">PKG_CONFIG_PATH="&usr-lib-m32;/pkgconfig" \ CC="gcc -m32 -march=i686" \ CXX="g++ -m32 -march=i686" \ LANG=en_US.UTF-8 \ @@ -293,7 +263,7 @@ meson --prefix=/usr \ -Dldconfig=false \ -Dmount-path=/bin/mount \ -Drootprefix= \ - -Drootlibdir=/usr/lib32 \ + -Drootlibdir=&usr-lib-m32; \ -Dsplit-usr=true \ -Dsulogin-path=/sbin/sulogin \ -Dsysusers=false \ @@ -308,38 +278,26 @@ meson --prefix=/usr \ <para>Install the package:</para> <screen><userinput remap="install">LANG=en_US.UTF-8 DESTDIR=$PWD/DESTDIR ninja install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR rm -f /usr/bin/xsltproc</userinput></screen> - </sect2> - -<!-- ====== x32-bit ===== --> + </sect2><!-- m32 --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_x32,ml_all" role="installation"> <title>Installation of systemd - x32-bit</title> - <para>If still in the build directory, step out:</para> -<screen><userinput remap="pre">cd ..</userinput></screen> - <para>Clean previous build:</para> -<screen><userinput remap="pre">rm -rf build</userinput></screen> +<screen><userinput remap="pre">rm -rf *</userinput></screen> <para>Create a symlink to work around missing xsltproc:</para> -<screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen> - - <para>Because we have not yet installed the final version of Util-Linux, - create links to the libraries in the approprite location:</para> - -<screen><userinput remap="pre">for file in /tools/libx32/lib{blkid,mount,uuid}*; do - ln -sf $file /usr/libx32/ -done</userinput></screen> - - <para>Set up the man pages:</para> - -<screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen> +<screen><userinput remap="pre">ln -sf /bin/true /usr/bin/xsltproc</userinput></screen> <para>Fix an issue on x32:</para> @@ -348,8 +306,7 @@ sed '/long drift_freq;/s@long @int64_t @' -i src/timesync/timesyncd-manager.h</u <para>Prepare systemd for compilation:</para> -<screen><userinput remap="configure">cd build -PKG_CONFIG_PATH="/tools/libx32/pkgconfig:/usr/libx32/pkgconfig" \ +<screen><userinput remap="configure">PKG_CONFIG_PATH="&usr-lib-mx32;/pkgconfig" \ CC="gcc -mx32" \ CXX="g++ -mx32" \ CFLAGS+="-Wno-error=shift-overflow" \ @@ -368,7 +325,7 @@ meson --prefix=/usr \ -Dldconfig=false \ -Dmount-path=/bin/mount \ -Drootprefix= \ - -Drootlibdir=/usr/libx32 \ + -Drootlibdir=&usr-lib-mx32; \ -Dsplit-usr=true \ -Dsulogin-path=/sbin/sulogin \ -Dsysusers=false \ @@ -383,11 +340,11 @@ meson --prefix=/usr \ <para>Install the package:</para> <screen><userinput remap="install">LANG=en_US.UTF-8 DESTDIR=$PWD/DESTDIR ninja install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR rm -f /usr/bin/xsltproc</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-systemd" role="content"> <title>Contents of systemd</title> @@ -435,7 +392,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="bootctl"> <term><command>bootctl</command></term> <listitem> - <para>Used to query the firmware and boot manager settings</para> + <para>Is used to query the firmware and boot manager settings</para> <indexterm zone="ch-system-systemd bootctl"> <primary sortas="b-bootctl">bootctl</primary> </indexterm> @@ -445,7 +402,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="busctl"> <term><command>busctl</command></term> <listitem> - <para>Used to introspect and monitor the D-Bus bus</para> + <para>Is used to introspect and monitor the D-Bus bus</para> <indexterm zone="ch-system-systemd busctl"> <primary sortas="b-busctl">busctl</primary> </indexterm> @@ -455,7 +412,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="coredumpctl"> <term><command>coredumpctl</command></term> <listitem> - <para>Used to retrieve coredumps from the systemd journal</para> + <para>Is used to retrieve coredumps from the systemd journal</para> <indexterm zone="ch-system-systemd coredumpctl"> <primary sortas="b-coredumpctl">coredumpctl</primary> </indexterm> @@ -479,7 +436,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="hostnamectl"> <term><command>hostnamectl</command></term> <listitem> - <para>Used to query and change the system hostname and related + <para>Is used to query and change the system hostname and related settings</para> <indexterm zone="ch-system-systemd hostnamectl"> <primary sortas="b-hostnamectl">hostnamectl</primary> @@ -490,9 +447,10 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="init"> <term><command>init</command></term> <listitem> - <para>The first process to be started when the kernel has initialized + <para>Is the first process to be started when the kernel has initialized the hardware which takes over the boot process and starts all - processes according to its configuration files</para> + processes according to its configuration files. In this case, it starts + systemd.</para> <indexterm zone="ch-system-systemd init"> <primary sortas="b-init">init</primary> </indexterm> @@ -502,7 +460,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="journalctl"> <term><command>journalctl</command></term> <listitem> - <para>Used to query the contents of the systemd journal</para> + <para>Is used to query the contents of the systemd journal</para> <indexterm zone="ch-system-systemd journalctl"> <primary sortas="b-journalctl">journalctl</primary> </indexterm> @@ -512,8 +470,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="kernel-install"> <term><command>kernel-install</command></term> <listitem> - <para>Used to add and remove kernel and initramfs images to and - from /boot</para> + <para>Is used to add and remove kernel and initramfs images to and + from /boot. In LFS, this is done manually.</para> <indexterm zone="ch-system-systemd kernel-install"> <primary sortas="b-kernel-install">kernel-install</primary> </indexterm> @@ -523,7 +481,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="localectl"> <term><command>localectl</command></term> <listitem> - <para>Used to query and change the system locale and keyboard layout + <para>Is used to query and change the system locale and keyboard layout settings</para> <indexterm zone="ch-system-systemd localectl"> <primary sortas="b-localectl">localectl</primary> @@ -534,7 +492,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="loginctl"> <term><command>loginctl</command></term> <listitem> - <para>Used to introspect and control the state of the systemd Login + <para>Is used to introspect and control the state of the systemd Login Manager</para> <indexterm zone="ch-system-systemd loginctl"> <primary sortas="b-loginctl">loginctl</primary> @@ -545,7 +503,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="machinectl"> <term><command>machinectl</command></term> <listitem> - <para>Used to introspect and control the state of the systemd Virtual + <para>Is used to introspect and control the state of the systemd Virtual Machine and Container Registration Manager</para> <indexterm zone="ch-system-systemd machinectl"> <primary sortas="b-machinectl">machinectl</primary> @@ -556,8 +514,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="networkctl"> <term><command>networkctl</command></term> <listitem> - <para>Used to introspect the state of the network links as seen by - systemd-networkd</para> + <para>Is used to introspect and configure the state of the network + links configured by systemd-networkd</para> <indexterm zone="ch-system-systemd networkctl"> <primary sortas="b-networkctl">networkctl</primary> </indexterm> @@ -567,7 +525,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="portablectl"> <term><command>portablectl</command></term> <listitem> - <para>Used to attach or detach portable services from the local + <para>Is used to attach or detach portable services from the local system</para> <indexterm zone="ch-system-systemd portablectl"> <primary sortas="b-portablectl">portablectl</primary> @@ -578,7 +536,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="poweroff"> <term><command>poweroff</command></term> <listitem> - <para>Tells the kernel to halt the system and switch off the computer + <para>Instructs the kernel to halt the system and switch off the computer (see <command>halt</command>)</para> <indexterm zone="ch-system-systemd poweroff"> <primary sortas="b-poweroff">poweroff</primary> @@ -589,7 +547,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="reboot"> <term><command>reboot</command></term> <listitem> - <para>Tells the kernel to reboot the system (see + <para>Instructs the kernel to reboot the system (see <command>halt</command>)</para> <indexterm zone="ch-system-systemd reboot"> <primary sortas="b-reboot">reboot</primary> @@ -600,7 +558,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="resolvconf"> <term><command>resolvconf</command></term> <listitem> - <para>Register DNS server and domain configuration with + <para>Registers DNS server and domain configuration with <command>systemd-resolved</command></para> <indexterm zone="ch-system-systemd resolvconf"> <primary sortas="b-resolvconf">resolvconf</primary> @@ -611,8 +569,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="resolvectl"> <term><command>resolvectl</command></term> <listitem> - <para>Send control commands to the network name resolution - manager, or resolve domain names, IPv4 and IPv6 addresses, + <para>Sends control commands to the network name resolution + manager, or resolves domain names, IPv4 and IPv6 addresses, DNS records, and services.</para> <indexterm zone="ch-system-systemd resolvectl"> <primary sortas="b-resolvectl">resolvectl</primary> @@ -623,7 +581,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="runlevel"> <term><command>runlevel</command></term> <listitem> - <para>Reports the previous and the current run-level, as noted in the + <para>Outputs the previous and the current run-level, as noted in the last run-level record in <filename>/var/run/utmp</filename></para> <indexterm zone="ch-system-systemd runlevel"> <primary sortas="b-runlevel">runlevel</primary> @@ -634,8 +592,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="shutdown"> <term><command>shutdown</command></term> <listitem> - <para>Brings the system down in a secure way, signaling all processes - and notifying all logged-in users</para> + <para>Brings the system down in a safe and secure manner, signaling + all processes and notifying all logged-in users</para> <indexterm zone="ch-system-systemd shutdown"> <primary sortas="b-shutdown">shutdown</primary> </indexterm> @@ -645,7 +603,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemctl"> <term><command>systemctl</command></term> <listitem> - <para>Used to introspect and control the state of the systemd system + <para>Is used to introspect and control the state of the systemd system and service manager</para> <indexterm zone="ch-system-systemd systemctl"> <primary sortas="b-systemctl">systemctl</primary> @@ -656,8 +614,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-analyze"> <term><command>systemd-analyze</command></term> <listitem> - <para>Used to determine system boot-up performance of the current - boot</para> + <para>Is used to determine system startup performance of the current + boot, as well as identify troublesome systemd units</para> <indexterm zone="ch-system-systemd systemd-analyze"> <primary sortas="b-systemd-analyze">systemd-analyze</primary> </indexterm> @@ -667,7 +625,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-ask-password"> <term><command>systemd-ask-password</command></term> <listitem> - <para>Used to query a system password or passphrase from the user, + <para>Is used to query a system password or passphrase from the user, using a question message specified on the command line</para> <indexterm zone="ch-system-systemd systemd-ask-password"> <primary sortas="b-systemd-ask-password">systemd-ask-password</primary> @@ -678,7 +636,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-cat"> <term><command>systemd-cat</command></term> <listitem> - <para>Used to connect STDOUT and STDERR of a process with the Journal + <para>Is used to connect the STDOUT and STDERR outputs of a process + with the systemd journal. </para> <indexterm zone="ch-system-systemd systemd-cat"> <primary sortas="b-systemd-cat">systemd-cat</primary> @@ -711,7 +670,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-delta"> <term><command>systemd-delta</command></term> <listitem> - <para>Used to identify and compare configuration files in + <para>Is used to identify and compare configuration files in <filename class="directory">/etc</filename> that override default counterparts in <filename class="directory">/usr</filename></para> <indexterm zone="ch-system-systemd systemd-delta"> @@ -723,7 +682,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-detect-virt"> <term><command>systemd-detect-virt</command></term> <listitem> - <para>Detects execution in a virtualized environment</para> + <para>Detects whether the system is being run in a virtual + environment, and adjusts udev accordingly.</para> <indexterm zone="ch-system-systemd systemd-detect-virt"> <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary> </indexterm> @@ -733,7 +693,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-escape"> <term><command>systemd-escape</command></term> <listitem> - <para>Used to escape strings for inclusion in systemd unit + <para>Is used to escape strings for inclusion in systemd unit names</para> <indexterm zone="ch-system-systemd systemd-escape"> <primary sortas="b-systemd-escape">systemd-escape</primary> @@ -744,7 +704,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-hwdb"> <term><command>systemd-hwdb</command></term> <listitem> - <para>Used to manage hardware database (hwdb)</para> + <para>Is used to manage the hardware database (hwdb)</para> <indexterm zone="ch-system-systemd systemd-hwdb"> <primary sortas="b-systemd-hwdb">systemd-hwdb</primary> </indexterm> @@ -754,7 +714,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-id128"> <term><command>systemd-id128</command></term> <listitem> - <para>Generate and print id128 strings</para> + <para>Generates and prints id128 strings</para> <indexterm zone="ch-system-systemd systemd-id128"> <primary sortas="b-systemd-id128">systemd-id128</primary> </indexterm> @@ -764,8 +724,9 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-inhibit"> <term><command>systemd-inhibit</command></term> <listitem> - <para>Used to execute a program with a shutdown, sleep or idle - inhibitor lock taken</para> + <para>Is used to execute a program with a shutdown, sleep or idle + inhibitor lock taken, preventing an action such as a system shutdown + until the process is completed.</para> <indexterm zone="ch-system-systemd systemd-inhibit"> <primary sortas="b-systemd-inhibit">systemd-inhibit</primary> </indexterm> @@ -775,7 +736,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-machine-id-setup"> <term><command>systemd-machine-id-setup</command></term> <listitem> - <para>Used by system installer tools to initialize the machine ID + <para>Is used by system installer tools to initialize the machine ID stored in <filename>/etc/machine-id</filename> at install time with a randomly generated ID</para> <indexterm zone="ch-system-systemd systemd-machine-id-setup"> @@ -787,7 +748,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-mount"> <term><command>systemd-mount</command></term> <listitem> - <para>A tool to temporarily mount or auto-mount a drive.</para> + <para>Is used to temporarily mount or automount disks.</para> <indexterm zone="ch-system-systemd systemd-mount"> <primary sortas="b-systemd-mount">systemd-mount</primary> </indexterm> @@ -797,7 +758,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-notify"> <term><command>systemd-notify</command></term> <listitem> - <para>Used by daemon scripts to notify the init system about status + <para>Is used by daemon scripts to notify the init system about status changes</para> <indexterm zone="ch-system-systemd systemd-notify"> <primary sortas="b-systemd-notify">systemd-notify</primary> @@ -808,7 +769,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-nspawn"> <term><command>systemd-nspawn</command></term> <listitem> - <para>Used to run a command or OS in a light-weight namespace + <para>Is used to run a command or OS in a light-weight namespace container</para> <indexterm zone="ch-system-systemd systemd-nspawn"> <primary sortas="b-systemd-nspawn">systemd-nspawn</primary> @@ -819,7 +780,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-path"> <term><command>systemd-path</command></term> <listitem> - <para>Used to query system and user paths</para> + <para>Is used to query system and user paths</para> <indexterm zone="ch-system-systemd systemd-path"> <primary sortas="b-systemd-path">systemd-path</primary> </indexterm> @@ -829,7 +790,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-repart"> <term><command>systemd-repart</command></term> <listitem> - <para>Used go grow and add partitions to a partition table when + <para>Is used to grow and add partitions to a partition table when systemd is used in an OS image (e.g. a container).</para> <indexterm zone="ch-system-systemd systemd-repart"> <primary sortas="b-systemd-repart">systemd-repart</primary> @@ -840,7 +801,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-resolve"> <term><command>systemd-resolve</command></term> <listitem> - <para>Used to resolve domain names, IPV4 and IPv6 addresses, DNS + <para>Is used to resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services</para> <indexterm zone="ch-system-systemd systemd-resolve"> <primary sortas="b-systemd-resolve">systemd-resolve</primary> @@ -851,29 +812,20 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-run"> <term><command>systemd-run</command></term> <listitem> - <para>Used to create and start a transient .service or a .scope unit - and run the specified command in it</para> + <para>Is used to create and start a transient .service or a .scope + unit and run the specified command in it. This is useful for + validating systemd units.</para> <indexterm zone="ch-system-systemd systemd-run"> <primary sortas="b-systemd-run">systemd-run</primary> </indexterm> </listitem> </varlistentry> - <!-- <varlistentry id="systemd-stdio-bridge"> - <term><command>systemd-stdio-bridge</command></term> - <listitem> - <para>To be completed</para> - <indexterm zone="ch-system-systemd systemd-stdio-bridge"> - <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary> - </indexterm> - </listitem> - </varlistentry> --> - <varlistentry id="systemd-socket-activate"> <term><command>systemd-socket-activate</command></term> <listitem> - <para>A tool to listen on socket devices and launch a process upon - connection.</para> + <para>Is used to listen on socket devices and launch a process upon + a successful connection to the socket.</para> <indexterm zone="ch-system-systemd systemd-socket-activate"> <primary sortas="b-systemd-socket-activate">systemd-socket-activate</primary> </indexterm> @@ -896,7 +848,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-umount"> <term><command>systemd-umount</command></term> <listitem> - <para>Unmount mount points</para> + <para>Unmounts mount points</para> <indexterm zone="ch-system-systemd systemd-umount"> <primary sortas="b-systemd-umount">systemd-umount</primary> </indexterm> @@ -906,7 +858,8 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="systemd-tty-ask-password-agent"> <term><command>systemd-tty-ask-password-agent</command></term> <listitem> - <para>Used to list or process pending systemd password requests</para> + <para>Is used to list and/or process pending systemd password + requests</para> <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent"> <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary> </indexterm> @@ -927,7 +880,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="timedatectl"> <term><command>timedatectl</command></term> <listitem> - <para>Used to query and change the system clock and its settings + <para>Is used to query and change the system clock and its settings </para> <indexterm zone="ch-system-systemd timedatectl"> <primary sortas="b-timedatectl">timedatectl</primary> @@ -938,10 +891,10 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="udevadm"> <term><command>udevadm</command></term> <listitem> - <para>Generic udev administration tool: controls the udevd daemon, - provides info from the Udev database, monitors uevents, waits for - uevents to finish, tests udev configuration, and triggers uevents - for a given device</para> + <para>Is a generic udev administration tool which controls the udevd + daemon, provides info from the Udev hardware database, monitors + uevents, waits for uevents to finish, tests udev configuration, and + triggers uevents for a given device</para> <indexterm zone="ch-system-systemd udevadm"> <primary sortas="b-udevadm">udevadm</primary> </indexterm> @@ -951,7 +904,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="libsystemd"> <term><filename class="libraryfile">libsystemd</filename></term> <listitem> - <para>The main systemd utility library</para> + <para>Is the main systemd utility library</para> <indexterm zone="ch-system-systemd libsystemd"> <primary sortas="c-libsystemd">libsystemd</primary> </indexterm> @@ -961,7 +914,7 @@ rm -f /usr/bin/xsltproc</userinput></screen> <varlistentry id="libudev"> <term><filename class="libraryfile">libudev</filename></term> <listitem> - <para>A library to access Udev device information</para> + <para>Is a library to access Udev device information</para> <indexterm zone="ch-system-systemd libudev"> <primary sortas="c-libudev">libudev</primary> </indexterm> diff --git a/chapter06/sysvinit.xml b/chapter08/sysvinit.xml index 0c171acf5..4a68cc37b 100644 --- a/chapter06/sysvinit.xml +++ b/chapter08/sysvinit.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&sysvinit-ch6-sbu;</seg> - <seg>&sysvinit-ch6-du;</seg> + <seg>&sysvinit-fin-sbu;</seg> + <seg>&sysvinit-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter08/tar.xml b/chapter08/tar.xml new file mode 100644 index 000000000..50a49d80b --- /dev/null +++ b/chapter08/tar.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-tar" role="wrap"> + <?dbhtml filename="tar.html"?> + + <sect1info condition="script"> + <productname>tar</productname> + <productnumber>&tar-version;</productnumber> + <address>&tar-url;</address> + </sect1info> + + <title>Tar-&tar-version;</title> + + <indexterm zone="ch-system-tar"> + <primary sortas="a-Tar">Tar</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Tar package provides the ability to create tar archives as well + as perform various other kinds of archive manipulation. Tar can be used on + previously created archives to extract files, to store additional files, or + to update or list files which were already stored. </para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&tar-fin-sbu;</seg> + <seg>&tar-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Tar</title> + + <para>Prepare Tar for compilation:</para> + +<screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 \ +./configure --prefix=/usr \ + --bindir=/bin</userinput></screen> + + <variablelist> + <title>The meaning of the configure option:</title> + + <varlistentry> + <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> + <listitem> + <para>This forces the test for <function>mknod</function> to be run + as root. It is generally considered dangerous to run this test as + the root user, but as it is being run on a system that has only been + partially built, overriding it is OK.</para> + </listitem> + </varlistentry> + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results (about 3 SBU), issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + +<!-- Seems to pass for version 1.31. Keeping as a comment just in case... + <para>One test, link mismatch, is known to fail.</para> +--> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install +make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen> + + </sect2> + + + <sect2 id="contents-tar" role="content"> + <title>Contents of Tar</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed directory</segtitle> + + <seglistitem> + <seg>tar</seg> + <seg>/usr/share/doc/tar-&tar-version;</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="tar"> + <term><command>tar</command></term> + <listitem> + <para>Creates, extracts files from, and lists the contents of archives, + also known as tarballs</para> + <indexterm zone="ch-system-tar tar"> + <primary sortas="b-tar">tar</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter05/tcl.xml b/chapter08/tcl.xml index f2265fd8d..1df22b81c 100644 --- a/chapter05/tcl.xml +++ b/chapter08/tcl.xml @@ -3,6 +3,8 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ <!ENTITY % general-entities SYSTEM "../general.ent"> %general-entities; + <!ENTITY tdbc-ver "1.1.1"> + <!ENTITY itcl-ver "4.2.0"> ]> <sect1 id="ch-tools-tcl" role="wrap"> @@ -32,8 +34,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&tcl-ch5-sbu;</seg> - <seg>&tcl-ch5-du;</seg> + <seg>&tcl-tmp-sbu;</seg> + <seg>&tcl-tmp-du;</seg> </seglistitem> </segmentedlist> @@ -43,40 +45,74 @@ <title>Installation of Tcl</title> <para>This package and the next two (Expect and DejaGNU) are - installed to support running the test suites for GCC and Binutils and other + installed to support running the test suites for GCC and binutils and other packages. Installing three packages for testing purposes may seem excessive, but it is very reassuring, if not essential, to know that the - most important tools are working properly. Even if the test suites are not - run in this chapter (they are not mandatory), these packages are required - to run the test suites in <xref linkend="chapter-building-system"/>.</para> + most important tools are working properly. These packages are required + to run the test suites in this chapter.</para> - <para>Note that the Tcl package used here is a minimal version needed +<!-- <para>Note that the Tcl package used here is a minimal version needed to run the LFS tests. For the full package, see the - <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para> + <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>--> + + <para>First, unpack the documentation by issuing the following command:</para> + +<screen><userinput remap="pre">tar -xf ../tcl8.6.10-html.tar.gz --strip-components=1</userinput></screen> <para>Prepare Tcl for compilation:</para> -<screen><userinput remap="configure">cd unix -./configure --prefix=/tools</userinput></screen> +<screen><userinput remap="configure">SRCDIR=$(pwd) +cd unix +./configure --prefix=/usr \ + --mandir=/usr/share/man \ + $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</parameter></term> + <listitem> + <para>The construct <parameter>$(<shell command>)</parameter> + is replaced by the output of the shell command. Here this output is + empty if running on a 32 bit machine, and is + <parameter>--enable-64bit</parameter> if running on a 64 bit machine. + </para> + </listitem> + </varlistentry> + + </variablelist> <para>Build the package:</para> -<screen><userinput remap="make">make</userinput></screen> +<screen><userinput remap="make">make + +sed -e "s|$SRCDIR/unix|/usr/lib|" \ + -e "s|$SRCDIR|/usr/include|" \ + -i tclConfig.sh + +sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \ + -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh + +sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \ + -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \ + -i pkgs/itcl&itcl-ver;/itclConfig.sh + +unset SRCDIR</userinput></screen> - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Tcl test suite anyway, issue the following command:</para> + <para>The various <quote>sed</quote> instructions after the + <quote>make</quote> command removes references to the build directory from + the configuration files and replaces them with the install directory. + This is not mandatory for the remainder of LFS, but may be needed in case a + package built later uses Tcl.</para> -<screen><userinput remap="test">TZ=UTC make test</userinput></screen> + <para>To test the results, issue:</para> - <para>The Tcl test suite may experience failures under certain host - conditions that are not fully understood. Therefore, test suite failures - here are not surprising, and are not considered critical. The - <parameter>TZ=UTC</parameter> parameter sets the time zone to Coordinated - Universal Time (UTC), but only - for the duration of the test suite run. This ensures that the clock tests - are exercised correctly. Details on the <envar>TZ</envar> environment - variable are provided in <xref linkend="chapter-config"/>.</para> +<screen><userinput remap="test">make test</userinput></screen> <para>Install the package:</para> @@ -85,16 +121,15 @@ <para>Make the installed library writable so debugging symbols can be removed later:</para> -<screen><userinput remap="install">chmod -v u+w /tools/lib/libtcl&tcl-major-version;.so</userinput></screen> +<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen> - <para>Install Tcl's headers. The next package, Expect, requires them - to build.</para> + <para>Install Tcl's headers. The next package, Expect, requires them.</para> <screen><userinput remap="install">make install-private-headers</userinput></screen> <para>Now make a necessary symbolic link:</para> -<screen><userinput remap="install">ln -sv tclsh&tcl-major-version; /tools/bin/tclsh</userinput></screen> +<screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen> </sect2> @@ -106,8 +141,14 @@ <segtitle>Installed library</segtitle> <seglistitem> - <seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg> - <seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg> + <seg> + tclsh (link to tclsh&tcl-major-version;) and + tclsh&tcl-major-version; + </seg> + <seg> + libtcl&tcl-major-version;.so and + libtclstub&tcl-major-version;.a + </seg> </seglistitem> </segmentedlist> diff --git a/chapter06/texinfo.xml b/chapter08/texinfo.xml index d61df477b..7257ae5b5 100644 --- a/chapter06/texinfo.xml +++ b/chapter08/texinfo.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&texinfo-ch6-sbu;</seg> - <seg>&texinfo-ch6-du;</seg> + <seg>&texinfo-fin-sbu;</seg> + <seg>&texinfo-fin-du;</seg> </seglistitem> </segmentedlist> @@ -46,7 +46,7 @@ <screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen> <variablelist> - <title>The meaning of the configure options:</title> + <title>The meaning of the configure option:</title> <varlistentry> <term><parameter>--disable-static</parameter></term> @@ -101,10 +101,10 @@ recreated, the following optional commands will accomplish the task:</para> <screen role="nodump"><userinput>pushd /usr/share/info -rm -v dir -for f in * - do install-info $f dir 2>/dev/null -done + rm -v dir + for f in * + do install-info $f dir 2>/dev/null + done popd</userinput></screen> </sect2> diff --git a/chapter06/util-linux.xml b/chapter08/util-linux.xml index 5ee12d1b5..2c94f3b11 100644 --- a/chapter06/util-linux.xml +++ b/chapter08/util-linux.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&util-linux-ch6-sbu;</seg> - <seg>&util-linux-ch6-du;</seg> + <seg>&util-linux-fin-sbu;</seg> + <seg>&util-linux-fin-du;</seg> </seglistitem> </segmentedlist> @@ -50,12 +50,6 @@ <screen><userinput remap="pre">mkdir -pv /var/lib/hwclock</userinput></screen> - <para>Remove the earlier created symlinks and files:</para> - -<screen><userinput remap="pre">rm -vf /usr/include/{blkid,libfdisk,libmount,uuid} -rm -vf /usr/lib/lib{blkid,fdisk,mount,uuid}.so* -rm -vf /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</userinput></screen> - <para>Prepare Util-linux for compilation:</para> <screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ @@ -96,7 +90,7 @@ rm -vf /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</userinput></screen> <warning><para>Running the test suite as the root user can be harmful to your system. To run it, the CONFIG_SCSI_DEBUG option for the kernel must - be available in the currently running system, and must be built as a + be available in the currently running system and must be built as a module. Building it into the kernel will prevent booting. For complete coverage, other BLFS packages must be installed. If desired, this test can be run after rebooting into the completed LFS system and running:</para> @@ -113,7 +107,9 @@ su tester -c "make -k check"</userinput></screen> </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_32,ml_all" role="installation"> <title>Installation of Util-linux - 32-bit</title> @@ -137,7 +133,7 @@ su tester -c "make -k check"</userinput></screen> --disable-static \ --without-python \ --without-systemd \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu \ --without-systemdsystemunitdir \ --enable-libmount-force-mountinfo</userinput></screen> @@ -154,7 +150,7 @@ su tester -c "make -k check"</userinput></screen> --disable-pylibmount \ --disable-static \ --without-python \ - --libdir=/usr/lib32 \ + --libdir=&usr-lib-m32; \ --host=i686-pc-linux-gnu \ --enable-libmount-force-mountinfo</userinput></screen> @@ -165,12 +161,14 @@ su tester -c "make -k check"</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> <sect2 arch="ml_x32,ml_all" role="installation"> <title>Installation of Util-linux - x32-bit</title> @@ -195,7 +193,7 @@ rm -rf DESTDIR</userinput></screen> --without-python \ --without-systemd \ --without-systemdsystemunitdir \ - --libdir=/usr/libx32 \ + --libdir=&usr-lib-mx32; \ --host=x86_64-pc-linux-gnux32 \ --enable-libmount-force-mountinfo</userinput></screen> @@ -211,7 +209,7 @@ rm -rf DESTDIR</userinput></screen> --disable-pylibmount \ --disable-static \ --without-python \ - --libdir=/usr/libx32 \ + --libdir=&usr-lib-mx32; \ --host=x86_64-pc-linux-gnux32 \ --enable-libmount-force-mountinfo</userinput></screen> @@ -222,10 +220,10 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-utillinux" role="content"> <title>Contents of Util-linux</title> diff --git a/chapter06/vim.xml b/chapter08/vim.xml index 263122bd7..4d06d5a08 100644 --- a/chapter06/vim.xml +++ b/chapter08/vim.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&vim-ch6-sbu;</seg> - <seg>&vim-ch6-du;</seg> + <seg>&vim-fin-sbu;</seg> + <seg>&vim-fin-du;</seg> </seglistitem> </segmentedlist> @@ -54,11 +54,7 @@ <screen><userinput remap="pre">echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h</userinput></screen> -<!-- <para>Disable a test that fails:</para> - -<screen><userinput remap="pre">sed -i '/call/{s/split/xsplit/;s/303/492/}' src/testdir/test_recover.vim</userinput></screen> ---> - <para>Prepare Vim for compilation:</para> + <para>Prepare vim for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> @@ -66,19 +62,17 @@ <screen><userinput remap="make">make</userinput></screen> - <para>To prepare the tests, ensure that the - <systemitem class="username">tester</systemitem> user can write - to the sources tree:</para> + <para>To prepare the tests, ensure that user + <systemitem class="username">tester</systemitem> can write + to the source tree:</para> <screen><userinput remap="test">chown -Rv tester .</userinput></screen> - <para>Now run the tests as the <systemitem - class="username">tester</systemitem> user:</para> + <para>Now run the tests as user <systemitem + class="username">tester</systemitem>:</para> <screen><userinput remap="test">su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log</userinput></screen> -<!--<screen><userinput remap="test">LANG=en_US.UTF-8 make -j1 test &> vim-test.log</userinput></screen>--> - <para>The test suite outputs a lot of binary data to the screen. This can cause issues with the settings of the current terminal. The problem can be avoided by redirecting the output to a log file as shown above. A @@ -100,7 +94,7 @@ for L in /usr/share/man/{,*/}man1/vim.1; do ln -sv vim.1 $(dirname $L)/vi.1 done</userinput></screen> - <para>By default, Vim's documentation is installed in <filename + <para>By default, vim's documentation is installed in <filename class="directory">/usr/share/vim</filename>. The following symlink allows the documentation to be accessed via <filename class="directory">/usr/share/doc/vim-&vim-version;</filename>, making @@ -109,10 +103,10 @@ done</userinput></screen> <screen><userinput remap="install">ln -sv ../&vim-docdir;/doc /usr/share/doc/vim-&vim-version;</userinput></screen> <para>If an X Window System is going to be installed on the LFS - system, it may be necessary to recompile Vim after installing X. Vim + system, it may be necessary to recompile vim after installing X. Vim comes with a GUI version of the editor that requires X and some additional libraries to be installed. For more information on this - process, refer to the Vim documentation and the Vim installation page + process, refer to the vim documentation and the vim installation page in the BLFS book at <ulink url="&blfs-book;postlfs/vim.html"/>.</para> @@ -157,7 +151,7 @@ EOF</userinput></screen> vi-compatible manner. Remove the <quote>no</quote> to keep the old <command>vi</command> behavior. The <parameter>set backspace=2</parameter> setting allows backspacing over line breaks, autoindents, and the start of - insert. The <parameter>syntax on</parameter> parameter enables vim's syntax + an insert. The <parameter>syntax on</parameter> parameter enables vim's syntax highlighting. The <parameter>set mouse=</parameter> setting enables proper pasting of text with the mouse when working in chroot or over a remote connection. Finally, the <emphasis>if</emphasis> statement with the @@ -165,18 +159,14 @@ EOF</userinput></screen> <command>vim</command>'s guess about the background color of some terminal emulators. This gives the highlighting a better color scheme for use on the black background of these programs.</para> -<!-- - <para>Creating an empty <filename>~/.vimrc</filename> prevents vim from - overriding settings in <filename>/etc/vimrc</filename> by using - <filename>/usr/share/vim/vim80/defaults.vim</filename>.</para> ---> + <para>Documentation for other available options can be obtained by running the following command:</para> <screen role="nodump"><userinput>vim -c ':options'</userinput></screen> <note> - <para>By default, Vim only installs spell files for the English language. + <para>By default, vim only installs spell files for the English language. To install spell files for your preferred language, download the <filename>*.spl</filename> and optionally, the <filename>*.sug</filename> files for your language and character encoding from <ulink diff --git a/chapter06/xml-parser.xml b/chapter08/xml-parser.xml index 54d5bcb35..62053d566 100644 --- a/chapter06/xml-parser.xml +++ b/chapter08/xml-parser.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&xml-parser-ch6-sbu;</seg> - <seg>&xml-parser-ch6-du;</seg> + <seg>&xml-parser-fin-sbu;</seg> + <seg>&xml-parser-fin-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter08/xz.xml b/chapter08/xz.xml new file mode 100644 index 000000000..add27025e --- /dev/null +++ b/chapter08/xz.xml @@ -0,0 +1,426 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-system-xz" role="wrap"> + <?dbhtml filename="xz.html"?> + + <sect1info condition="script"> + <productname>xz</productname> + <productnumber>&xz-version;</productnumber> + <address>&xz-url;</address> + </sect1info> + + <title>Xz-&xz-version;</title> + + <indexterm zone="ch-system-xz"> + <primary sortas="a-xz">Xz</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Xz package contains programs for compressing and decompressing + files. It provides capabilities for the lzma and the newer xz compression + formats. Compressing text files with <command>xz</command> yields a better + compression percentage than with the traditional <command>gzip</command> or + <command>bzip2</command> commands.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&xz-fin-sbu;</seg> + <seg>&xz-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Xz</title> + + <para>Prepare Xz for compilation with:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr \ + --disable-static \ + --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + <para>Install the package and make sure that all essential files are in the + correct directory:</para> + +<screen><userinput remap="install">make install +mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin +mv -v /usr/lib/liblzma.so.* /lib +ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen> + + </sect2> + + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_32,ml_all" role="installation"> + <title>Installation of Xz - 32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare Xz for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -m32" ./configure \ + --prefix=/usr \ + --disable-static \ + --libdir=&usr-lib-m32; \ + --host=i686-pc-linux-gnu</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_x32,ml_all" role="installation"> + <title>Installation of Xz - x32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make distclean</userinput></screen> + + <para>Prepare Xz for compilation:</para> + +<screen><userinput remap="configure">CC="gcc -mx32" ./configure \ + --prefix=/usr \ + --disable-static \ + --libdir=&usr-lib-mx32; \ + --host=x86_64-pc-linux-gnux32</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; +rm -rf DESTDIR</userinput></screen> + + </sect2><!-- mx32 --> + + <sect2 id="contents-xz" role="content"> + <title>Contents of Xz</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed libraries</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + <seg> + lzcat (link to xz), + lzcmp (link to xzdiff), + lzdiff (link to xzdiff), + lzegrep (link to xzgrep), + lzfgrep (link to xzgrep), + lzgrep (link to xzgrep), + lzless (link to xzless), + lzma (link to xz), + lzmadec, + lzmainfo, + lzmore (link to xzmore), + unlzma (link to xz), + unxz (link to xz), + xz, + xzcat (link to xz), + xzcmp (link to xzdiff), + xzdec, + xzdiff, + xzegrep (link to xzgrep), + xzfgrep (link to xzgrep), + xzgrep, + xzless, and + xzmore</seg> + <seg> + liblzma.so + </seg> + <seg> + /usr/include/lzma and + /usr/share/doc/xz-&xz-version; + </seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="lzcat"> + <term><command>lzcat</command></term> + <listitem> + <para>Decompresses to standard output</para> + <indexterm zone="ch-system-xz lzcat"> + <primary sortas="b-lzcat">lzcat</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzcmp"> + <term><command>lzcmp</command></term> + <listitem> + <para>Runs <command>cmp</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzcmp"> + <primary sortas="b-lzcmp">lzcmp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzdiff"> + <term><command>lzdiff</command></term> + <listitem> + <para>Runs <command>diff</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzdiff"> + <primary sortas="b-lzdiff">lzdiff</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzegrep"> + <term><command>lzegrep</command></term> + <listitem> + <para>Runs <command>egrep</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzegrep"> + <primary sortas="b-lzegrep">lzegrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzfgrep"> + <term><command>lzfgrep</command></term> + <listitem> + <para>Runs <command>fgrep</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzfgrep"> + <primary sortas="b-lzfgrep">lzfgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzgrep"> + <term><command>lzgrep</command></term> + <listitem> + <para>Runs <command>grep</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzgrep"> + <primary sortas="b-lzgrep">lzgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzless"> + <term><command>lzless</command></term> + <listitem> + <para>Runs <command>less</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzless"> + <primary sortas="b-lzless">lzless</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzma"> + <term><command>lzma</command></term> + <listitem> + <para>Compresses or decompresses files using the LZMA format</para> + <indexterm zone="ch-system-xz lzma"> + <primary sortas="b-lzma">lzma</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzmadec"> + <term><command>lzmadec</command></term> + <listitem> + <para>A small and fast decoder for LZMA compressed files</para> + <indexterm zone="ch-system-xz lzmadec"> + <primary sortas="b-lzmadec">lzmadec</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzmainfo"> + <term><command>lzmainfo</command></term> + <listitem> + <para>Shows information stored in the LZMA compressed file header</para> + <indexterm zone="ch-system-xz lzmainfo"> + <primary sortas="b-lzmainfo">lzmainfo</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="lzmore"> + <term><command>lzmore</command></term> + <listitem> + <para>Runs <command>more</command> on LZMA compressed files</para> + <indexterm zone="ch-system-xz lzmore"> + <primary sortas="b-lzmamore">lzmore</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="unlzma"> + <term><command>unlzma</command></term> + <listitem> + <para>Decompresses files using the LZMA format</para> + <indexterm zone="ch-system-xz unlzma"> + <primary sortas="b-unlzma">unlzma</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="unxz"> + <term><command>unxz</command></term> + <listitem> + <para>Decompresses files using the XZ format</para> + <indexterm zone="ch-system-xz unxz"> + <primary sortas="b-unxz">unxz</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xz"> + <term><command>xz</command></term> + <listitem> + <para>Compresses or decompresses files using the XZ format</para> + <indexterm zone="ch-system-xz xz"> + <primary sortas="b-xz">xz</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzcat"> + <term><command>xzcat</command></term> + <listitem> + <para>Decompresses to standard output</para> + <indexterm zone="ch-system-xz xzcat"> + <primary sortas="b-xzcat">xzcat</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzcmp"> + <term><command>xzcmp</command></term> + <listitem> + <para>Runs <command>cmp</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzcmp"> + <primary sortas="b-xzcmp">xzcmp</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzdec"> + <term><command>xzdec</command></term> + <listitem> + <para>A small and fast decoder for XZ compressed files</para> + <indexterm zone="ch-system-xz xzdec"> + <primary sortas="b-xzdec">xzdec</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzdiff"> + <term><command>xzdiff</command></term> + <listitem> + <para>Runs <command>diff</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzdiff"> + <primary sortas="b-xzdiff">xzdiff</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzegrep"> + <term><command>xzegrep</command></term> + <listitem> + <para>Runs <command>egrep</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzegrep"> + <primary sortas="b-xzegrep">xzegrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzfgrep"> + <term><command>xzfgrep</command></term> + <listitem> + <para>Runs <command>fgrep</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzfgrep"> + <primary sortas="b-xzfgrep">xzfgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzgrep"> + <term><command>xzgrep</command></term> + <listitem> + <para>Runs <command>grep</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzgrep"> + <primary sortas="b-xzgrep">xzgrep</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzless"> + <term><command>xzless</command></term> + <listitem> + <para>Runs <command>less</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzless"> + <primary sortas="b-xzless">xzless</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xzmore"> + <term><command>xzmore</command></term> + <listitem> + <para>Runs <command>more</command> on XZ compressed files</para> + <indexterm zone="ch-system-xz xzmore"> + <primary sortas="b-xzmore">xzmore</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="liblzma"> + <term><filename class="libraryfile">liblzma</filename></term> + <listitem> + <para>The library implementing lossless, block-sorting data + compression, using the Lempel-Ziv-Markov chain algorithm</para> + <indexterm zone="ch-system-xz liblzma"> + <primary sortas="c-liblzma">liblzma</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/zlib.xml b/chapter08/zlib.xml index 3f47a3816..16734314b 100644 --- a/chapter06/zlib.xml +++ b/chapter08/zlib.xml @@ -31,8 +31,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&zlib-ch6-sbu;</seg> - <seg>&zlib-ch6-du;</seg> + <seg>&zlib-fin-sbu;</seg> + <seg>&zlib-fin-du;</seg> </seglistitem> </segmentedlist> @@ -67,10 +67,12 @@ ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></scr </sect2> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> - + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + <sect2 arch="ml_32,ml_all" role="installation"> - <title>Installation of Zlib - 32-bit</title> + <title>Installation of Zlib - 32bit</title> <para>Clean previous build:</para> @@ -78,10 +80,9 @@ ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></scr <para>Prepare Zlib for compilation:</para> -<!-- configure doesn't know option - -host=i686-pc-linux-gnu --> -<screen><userinput remap="configure">CC="gcc -m32 -march=i686" \ +<screen><userinput remap="configure">CC="gcc -m32" \ ./configure --prefix=/usr \ - --libdir=/usr/lib32</userinput></screen> + --libdir=&usr-lib-m32;</userinput></screen> <para>Compile the package:</para> @@ -90,15 +91,17 @@ ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></scr <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 +cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> - <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> - <sect2 arch="ml_x32,ml_all" role="installation"> - <title>Installation of Zlib - x32-bit</title> + <title>Installation of Zlib - x32bit</title> <screen><userinput remap="pre">make distclean</userinput></screen> @@ -106,7 +109,7 @@ rm -rf DESTDIR</userinput></screen> <screen><userinput remap="configure">CC="gcc -mx32" \ ./configure --prefix=/usr \ - --libdir=/usr/libx32</userinput></screen> + --libdir=&usr-lib-mx32;</userinput></screen> <para>Compile the package:</para> @@ -115,10 +118,10 @@ rm -rf DESTDIR</userinput></screen> <para>Install the package:</para> <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 +cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32; rm -rf DESTDIR</userinput></screen> - </sect2> + </sect2><!-- mx32 --> <sect2 id="contents-zlib" role="content"> <title>Contents of Zlib</title> diff --git a/chapter06/zstd.xml b/chapter08/zstd.xml index 71e7794b6..e4fe3637f 100644 --- a/chapter06/zstd.xml +++ b/chapter08/zstd.xml @@ -32,8 +32,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&zstd-ch6-sbu;</seg> - <seg>&zstd-ch6-du;</seg> + <seg>&zstd-fin-sbu;</seg> + <seg>&zstd-fin-du;</seg> </seglistitem> </segmentedlist> @@ -63,6 +63,52 @@ ln -sfv ../../lib/$(readlink /usr/lib/libzstd.so) /usr/lib/libzstd.so</userinput </sect2> + <!-- - - - - - - - - - --> + <!-- Multilib - 32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_32,ml_all" role="installation"> + <title>Installation of Zstd - 32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make clean</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">CC="gcc -m32" make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">CC="gcc -m32" make prefix=/usr DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR/usr/lib/* &usr-lib-m32;/ +sed -e "/^libdir/s/lib$&lib-m32;/" -i &usr-lib-m32;/pkgconfig/libzstd.pc</userinput></screen> + + </sect2><!-- m32 --> + + <!-- - - - - - - - - - --> + <!-- Multilib - x32bit --> + <!-- - - - - - - - - - --> + + <sect2 arch="ml_x32,ml_all" role="installation"> + <title>Installation of Zstd - x32bit</title> + + <para>Clean previous build:</para> + +<screen><userinput remap="pre">make clean</userinput></screen> + + <para>Compile the package:</para> + +<screen><userinput remap="make">CC="gcc -mx32" make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">CC="gcc -mx32" make prefix=/usr DESTDIR=$PWD/DESTDIR install +cp -Rv DESTDIR/usr/lib/* &usr-lib-mx32;/ +sed -e "/^libdir/s/lib$&lib-mx32;/" -i &usr-lib-mx32;/pkgconfig/libzstd.pc</userinput></screen> + + </sect2><!-- mx32 --> + <sect2 id="contents-zstd" role="content"> <title>Contents of Zstd</title> diff --git a/chapter07/bootscripts.xml b/chapter09/bootscripts.xml index 5c2b28d7c..009590d64 100644 --- a/chapter07/bootscripts.xml +++ b/chapter09/bootscripts.xml @@ -33,8 +33,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&lfs-bootscripts-ch7-sbu;</seg> - <seg>&lfs-bootscripts-ch7-du;</seg> + <seg>&lfs-bootscripts-cfg-sbu;</seg> + <seg>&lfs-bootscripts-cfg-du;</seg> </seglistitem> </segmentedlist> diff --git a/chapter09/chapter09.xml b/chapter09/chapter09.xml index c8deeb388..499e66a6f 100644 --- a/chapter09/chapter09.xml +++ b/chapter09/chapter09.xml @@ -5,15 +5,39 @@ %general-entities; ]> -<chapter id="chapter-finalizing" xreflabel="Chapter 9"> +<chapter id="chapter-config" xreflabel="Chapter 9"> <?dbhtml dir="chapter09"?> <?dbhtml filename="chapter09.html"?> - <title>The End</title> + <title>System Configuration</title> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="theend.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="getcounted.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reboot.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="whatnow.xml"/> + <!-- sysv --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts.xml"/> + + <!-- systemd --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introductiond.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="networkd.xml"/> + + <!-- common --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinks.xml"/> + + <!-- sysv --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="profile.xml"/> + + <!-- systemd --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="clock.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="consoled.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="locale.xml"/> + + <!-- common --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="etcshells.xml"/> + + <!-- systemd --> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd-custom.xml"/> </chapter> diff --git a/chapter07/clock.xml b/chapter09/clock.xml index 872ba677c..585017e35 100644 --- a/chapter07/clock.xml +++ b/chapter09/clock.xml @@ -16,7 +16,7 @@ <para>This section discusses how to configure the <command>systemd-timedated</command> system service, which configures - system clock and timezone.</para> + the system clock and timezone.</para> <para>If you cannot remember whether or not the hardware clock is set to UTC, find out by running the <userinput>hwclock --localtime --show</userinput> @@ -30,7 +30,7 @@ time.</para> <para><command>systemd-timedated</command> reads <filename>/etc/adjtime</filename>, - and depending on the contents of the file, it sets the clock to either UTC or + and depending on the contents of the file, sets the clock to either UTC or local time.</para> <para>Create the <filename>/etc/adjtime</filename> file with the following contents @@ -59,7 +59,7 @@ EOF</userinput></screen> <screen role="nodump"><userinput>timedatectl set-time YYYY-MM-DD HH:MM:SS</userinput></screen> - <para>Hardware clock will also be updated accordingly.</para> + <para>The hardware clock will also be updated accordingly.</para> <para>To change your current time zone, issue:</para> diff --git a/chapter07/consoled.xml b/chapter09/consoled.xml index bf1fdc8e0..76d304d44 100644 --- a/chapter07/consoled.xml +++ b/chapter09/consoled.xml @@ -24,8 +24,8 @@ information. Decide which keymap and screen font will be used. Various language-specific HOWTOs can also help with this, see <ulink url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. - Examine <command>localectl list-keymaps</command> output for a list of - valid console keymaps. Look in + Examine the output of <command>localectl list-keymaps</command> for a list of + valid console keymaps. Look in the <filename class="directory">/usr/share/consolefonts</filename> directory for valid screen fonts.</para> @@ -106,34 +106,34 @@ EOF</userinput></screen> <varlistentry> <term>list-x11-keymap-models</term> <listitem> - <para>Show known X11 keyboard mapping models.</para> + <para>Shows known X11 keyboard mapping models.</para> </listitem> </varlistentry> <varlistentry> <term>list-x11-keymap-layouts</term> <listitem> - <para>Show known X11 keyboard mapping layouts.</para> + <para>Shows known X11 keyboard mapping layouts.</para> </listitem> </varlistentry> <varlistentry> <term>list-x11-keymap-variants</term> <listitem> - <para>Show known X11 keyboard mapping variants.</para> + <para>Shows known X11 keyboard mapping variants.</para> </listitem> </varlistentry> <varlistentry> <term>list-x11-keymap-options</term> <listitem> - <para>Show known X11 keyboard mapping options.</para> + <para>Shows known X11 keyboard mapping options.</para> </listitem> </varlistentry> </variablelist> <note><para>Using any of the parameters listed above requires the - XKeyboard Config package from BLFS.</para></note> + XKeyboard-Config package from BLFS.</para></note> </sect1> diff --git a/chapter07/etcshells.xml b/chapter09/etcshells.xml index 30961c80c..bc2ef933a 100644 --- a/chapter07/etcshells.xml +++ b/chapter09/etcshells.xml @@ -10,8 +10,8 @@ <!-- <sect1info> - <othername>$LastChangedBy$</othername> - <date>$Date$</date> + <othername>$LastChangedBy: renodr $</othername> + <date>$Date: 2020-06-12 23:04:48 +0200 (Fr, 12. Jun 2020) $</date> </sect1info> --> <title>Creating the /etc/shells File</title> @@ -23,13 +23,13 @@ <para>The <filename>shells</filename> file contains a list of login shells on the system. Applications use this file to determine whether a shell is valid. For each shell a single line should be - present, consisting of the shell's path, relative to the root of the + present, consisting of the shell's path relative to the root of the directory structure (/).</para> <para>For example, this file is consulted by <command>chsh</command> to determine whether an unprivileged user may change the login shell for her - own account. If the command name is not listed, the user will be denied of - change.</para> + own account. If the command name is not listed, the user will be denied the + ability to change shells.</para> <para>It is a requirement for applications such as <application>GDM</application> which does not populate the diff --git a/chapter07/inputrc.xml b/chapter09/inputrc.xml index 00d36877f..de5401d2c 100644 --- a/chapter07/inputrc.xml +++ b/chapter09/inputrc.xml @@ -15,14 +15,14 @@ </indexterm> <para>The <filename>inputrc</filename> file is the configuration file for - the Readline library, which provides editing capabilities while the user is + the readline library, which provides editing capabilities while the user is entering a line from the terminal. It works by translating keyboard inputs - into specific actions. Readline is used by Bash and most other shells as + into specific actions. Readline is used by bash and most other shells as well as many other applications.</para> <para>Most people do not need user-specific functionality so the command below creates a global <filename>/etc/inputrc</filename> used by everyone who - logs in. If you later decide you need to override the defaults on a per-user + logs in. If you later decide you need to override the defaults on a per user basis, you can create a <filename>.inputrc</filename> file in the user's home directory with the modified mappings.</para> diff --git a/chapter09/introduction.xml b/chapter09/introduction.xml new file mode 100644 index 000000000..875003f14 --- /dev/null +++ b/chapter09/introduction.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-config-introduction" revision="sysv"> + <?dbhtml filename="introduction.html"?> + + <title>Introduction</title> + + <para>Booting a Linux system involves several tasks. The process must + mount both virtual and real file systems, initialize devices, activate swap, + check file systems for integrity, mount any swap partitions or files, set + the system clock, bring up networking, start any daemons required by the + system, and accomplish any other custom tasks needed by the user. This + process must be organized to ensure the tasks are performed in the correct + order but, at the same time, be executed as fast as possible.</para> + + <sect2 id='sysv-desc'> + <title>System V</title> + + <para>System V is the classic boot process that has been used in Unix and + Unix-like systems such as Linux since about 1983. It consists of a small + program, <command>init</command>, that sets up basic programs such as + <command>login</command> (via getty) and runs a script. This script, + usually named <command>rc</command>, controls the execution of a set of + additional scripts that perform the tasks required to initialize the + system.</para> + + <para>The <command>init</command> program is controlled by the + <filename>/etc/inittab</filename> file and is organized into run levels that + can be run by the user:</para> + +<literallayout>0 — halt +1 — Single user mode +2 — Multiuser, without networking +3 — Full multiuser mode +4 — User definable +5 — Full multiuser mode with display manager +6 — reboot</literallayout> + + <para>The usual default run level is 3 or 5.</para> + + <bridgehead renderas="sect3">Advantages</bridgehead> + + <itemizedlist> + <listitem> + <para>Established, well understood system.</para> + </listitem> + + <listitem> + <para>Easy to customize.</para> + </listitem> + + </itemizedlist> + + + <bridgehead renderas="sect3">Disadvantages</bridgehead> + + <itemizedlist> + <listitem> + <para>May be slower to boot. A medium speed base LFS system + takes 8-12 seconds where the boot time is measured from the + first kernel message to the login prompt. Network + connectivity is typically established about 2 seconds + after the login prompt.</para> + </listitem> + + <listitem> + <para>Serial processing of boot tasks. This is related to the previous + point. A delay in any process such as a file system check, will + delay the entire boot process.</para> + </listitem> + + <listitem> + <para>Does not directly support advanced features like + control groups (cgroups), and per-user fair share scheduling.</para> + </listitem> + + <listitem> + <para>Adding scripts requires manual, static sequencing decisions.</para> + </listitem> + + </itemizedlist> + + </sect2> + +</sect1> + diff --git a/chapter07/introductiond.xml b/chapter09/introductiond.xml index fa2403edb..f0be70cec 100644 --- a/chapter07/introductiond.xml +++ b/chapter09/introductiond.xml @@ -38,7 +38,7 @@ </listitem> </itemizedlist> - <para>Third, configuring the system clock and keyboard layout.</para> + <para>Third, configuring the system clock and keyboard layout is shown.</para> <itemizedlist> <listitem> @@ -49,9 +49,8 @@ </listitem> </itemizedlist> - <para>Fourth, a brief introduction to the scripts and configuration - files used when the user logs into the system.</para> + files used when the user logs into the system is presented.</para> <itemizedlist> <listitem> @@ -62,7 +61,7 @@ </listitem> </itemizedlist> - <para>And finally, configuring the systemd behavior.</para> + <para>And finally, configuring the behavior of systemd is discussed.</para> <itemizedlist> <listitem> diff --git a/chapter07/locale.xml b/chapter09/locale.xml index 5f473ac72..23442a513 100644 --- a/chapter07/locale.xml +++ b/chapter09/locale.xml @@ -14,16 +14,16 @@ <primary sortas="e-etc-locale-conf">/etc/locale.conf</primary> </indexterm> - <para>The <filename>/etc/locale.conf</filename> below sets some + <para>The <filename>/etc/locale.conf</filename> file below sets some environment variables necessary for native language support. Setting them properly results in:</para> <itemizedlist> <listitem> - <para>The output of programs translated into the native language</para> + <para>The output of programs being translated into your native language</para> </listitem> <listitem> - <para>Correct classification of characters into letters, digits and other + <para>The correct classification of characters into letters, digits and other classes. This is necessary for <command>bash</command> to properly accept non-ASCII characters in command lines in non-English locales</para> </listitem> @@ -31,15 +31,15 @@ <para>The correct alphabetical sorting order for the country</para> </listitem> <listitem> - <para>Appropriate default paper size</para> + <para>The appropriate default paper size</para> </listitem> <listitem> - <para>Correct formatting of monetary, time, and date values</para> + <para>The correct formatting of monetary, time, and date values</para> </listitem> </itemizedlist> <para>Replace <replaceable><ll></replaceable> below with the two-letter code - for the desired language (e.g., <quote>en</quote>) and + for your desired language (e.g., <quote>en</quote>) and <replaceable><CC></replaceable> with the two-letter code for the appropriate country (e.g., <quote>GB</quote>). <replaceable><charmap></replaceable> should be replaced with the canonical charmap for your chosen locale. Optional @@ -54,7 +54,7 @@ is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>. Some applications cannot handle the various synonyms correctly (e.g., require that <quote>UTF-8</quote> is written as <quote>UTF-8</quote>, not - <quote>utf8</quote>), so it is safest in most + <quote>utf8</quote>), so it is the safest in most cases to choose the canonical name for a particular locale. To determine the canonical name, run the following command, where <replaceable><locale name></replaceable> is the output given by <command>locale -a</command> for @@ -80,8 +80,8 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen> encoding used by the locale, the local currency, and the prefix to dial before the telephone number in order to get into the country. If any of the commands above fail with a message similar to the one shown below, this means - that your locale was either not installed in Chapter 6 or is not supported by - the default installation of Glibc.</para> + that your locale was either not installed in Chapter 6 or is not + supported by the default installation of Glibc.</para> <screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen> @@ -90,7 +90,7 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen> Further instructions assume that there are no such error messages from Glibc.</para> - <!-- FIXME: the xlib example will became obsolete real soon --> + <!-- FIXME: the xlib example will become obsolete in the future.--> <para>Some packages beyond LFS may also lack support for your chosen locale. One example is the X library (part of the X Window System), which outputs the following error message if the locale does not exactly match one of the character @@ -142,11 +142,13 @@ EOF</userinput></screen> substitutes them with question marks in that locale. Also, an attempt to send mail with such characters from Mutt or Pine results in non-RFC-conforming messages being sent (the charset in the outgoing mail is indicated as <quote>unknown - 8-bit</quote>). So you can use the <quote>C</quote> locale only if you are sure that - you will never need 8-bit characters.</para> + 8-bit</quote>). It's suggested that you use the <quote>C</quote> locale only + if you are certain that you will never need 8-bit characters.</para> +<!-- <para>UTF-8 based locales are not supported well by many programs. Work is in progress to document and, if possible, fix such problems, see <ulink url="&blfs-book;introduction/locale-issues.html"/>.</para> +--> </sect1> diff --git a/chapter07/network.xml b/chapter09/network.xml index 2a86df669..45cd1d438 100644 --- a/chapter07/network.xml +++ b/chapter09/network.xml @@ -13,17 +13,7 @@ <indexterm zone="ch-config-network"> <primary sortas="d-network">network</primary> <secondary>configuring</secondary></indexterm> -<!-- - <para>This section only applies if a network card is to be - configured.</para> - - <para>If a network card will not be used, there is likely no need to create - any configuration files relating to network cards. If that is the case, you - will need to remove the <filename class="symlink">network</filename> symlinks - from all run-level directories (<filename - class="directory">/etc/rc.d/rc*.d</filename>) after the bootscripts are - installed in <xref linkend="ch-config-bootscripts"/>.</para> ---> + <sect2> <title>Creating Network Interface Configuration Files</title> @@ -37,7 +27,7 @@ address(es), subnet masks, and so forth. It is necessary that the stem of the filename be <emphasis>ifconfig</emphasis>.</para> - <note><para>If the procedure in the previous section was not used, Udev + <note><para>If the procedure in the previous section was not used, udev will assign network card interface names based on system physical characteristics such as enp2s1. If you are not sure what your interface name is, you can always run <command>ip link</command> or <command>ls @@ -64,7 +54,7 @@ EOF</userinput></screen> <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the System V network script will bring up the Network Interface Card (NIC) during - booting of the system. If set to anything but <quote>yes</quote> the NIC + the system boot process. If set to anything but <quote>yes</quote> the NIC will be ignored by the network script and not be automatically brought up. The interface can be manually started or stopped with the <command>ifup</command> and <command>ifdown</command> commands.</para> @@ -208,7 +198,7 @@ EOF</userinput></screen> <screen><userinput>cat > /etc/hosts << "EOF" <literal># Begin /etc/hosts -127.0.0.1 localhost +127.0.0.1 localhost.localdomain localhost 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> <replaceable><192.168.1.1></replaceable> <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> <replaceable>[alias1] [alias2 ...]</replaceable> ::1 localhost ip6-localhost ip6-loopback diff --git a/chapter07/networkd.xml b/chapter09/networkd.xml index b95d9b390..229b313b1 100644 --- a/chapter07/networkd.xml +++ b/chapter09/networkd.xml @@ -48,7 +48,7 @@ <para> Udev normally assigns network card interface names based - on system physical characteristics such as enp2s1. If you are + on physical system characteristics such as enp2s1. If you are not sure what your interface name is, you can always run <command>ip link</command> after you have booted your system. </para> @@ -76,10 +76,9 @@ <para> Create a manual naming scheme, for example by naming the interfaces something like "internet0", "dmz0", or "lan0". - For that, create .link - files in /etc/systemd/network/, that choose an explicit name or a - better naming scheme for one, some, or all of your interfaces. - For example: + To do that, create .link files in /etc/systemd/network/ that + select an explicit name or a better naming scheme for your + network interfaces. For example: </para> <screen role="nodump"><userinput>cat > /etc/systemd/network/10-ether0.link << "EOF" @@ -170,9 +169,9 @@ EOF</userinput></screen> <note><para>If using another means to configure your network interfaces (ex: ppp, network-manager, etc.), or if using any type of - local resolver (ex: bind, dnsmasq, etc.), or any other software that - generates an <filename>/etc/resolv.conf</filename> (ex: resolvconf), the - <command>systemd-resolved</command> service should not be + local resolver (ex: bind, dnsmasq, unbound, etc.), or any other software + that generates an <filename>/etc/resolv.conf</filename> (ex: resolvconf), + the <command>systemd-resolved</command> service should not be used.</para></note> <para>When using <command>systemd-resolved</command> for DNS @@ -206,11 +205,13 @@ EOF</userinput></screen> <para>Replace <replaceable><IP address of the nameserver></replaceable> - with the IP address of the DNS most appropriate for the setup. There will - often be more than one entry (requirements demand secondary servers for - fallback capability). If you only need or want one DNS server, remove the - second <emphasis>nameserver</emphasis> line from the file. The IP address - may also be a router on the local network.</para> + with the IP address of the DNS server most appropriate for your setup. + There will often be more than one entry (requirements demand secondary + servers for fallback capability). If you only need or want one DNS server, + remove the second <emphasis>nameserver</emphasis> line from the file. + The IP address may also be a router on the local network. Another option + is to use the Google Public DNS service using the IP addresses below as + nameservers.</para> <note><para>The Google Public IPv4 DNS addresses are <parameter>8.8.8.8</parameter> and <parameter>8.8.4.4</parameter> @@ -262,7 +263,7 @@ EOF</userinput></screen> </indexterm> <para>Decide on a fully-qualified domain name (FQDN), and possible aliases - for use in the <filename>/etc/hosts</filename> file. If using static + for use in the <filename>/etc/hosts</filename> file. If using static IP addresses, you'll also need to decide on an IP address. The syntax for a hosts file entry is:</para> @@ -285,16 +286,15 @@ EOF</userinput></screen> this IP could be lfs.example.org.</para> <para>Even if not using a network card, a valid FQDN is still required. - This is necessary for certain programs to operate correctly.</para> + This is necessary for certain programs, such as MTAs, to operate properly.</para> - <para>If using DHCP, DHCPv6, IPv6 Autoconfiguration, or if a network card - is not going to be configured, create the <filename>/etc/hosts</filename> - file by running the following command:</para> +<!-- + <para>Create the /etc/hosts file using the following command:</para> <screen role="nodump"><userinput>cat > /etc/hosts << "EOF" <literal># Begin /etc/hosts -127.0.0.1 localhost +127.0.0.1 localhost.localdomain localhost 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes @@ -302,18 +302,15 @@ ff02::2 ip6-allrouters # End /etc/hosts</literal> EOF</userinput></screen> +--> - <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents - the IPv6 loopback interface. 127.0.1.1 is a loopback entry reserved - specifically for the FQDN.</para> - - <para>If using a static address, create the <filename>/etc/hosts</filename> - file by running this command instead:</para> + <para>Create the <filename>/etc/hosts</filename> file using the following + command:</para> <screen><userinput>cat > /etc/hosts << "EOF" <literal># Begin /etc/hosts -127.0.0.1 localhost +127.0.0.1 localhost.localdomain localhost 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> <replaceable><192.168.0.2></replaceable> <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> <replaceable>[alias1] [alias2] ...</replaceable> ::1 localhost ip6-localhost ip6-loopback @@ -328,8 +325,14 @@ EOF</userinput></screen> <replaceable><HOSTNAME></replaceable> values need to be changed for specific uses or requirements (if assigned an IP address by a network/system administrator and the machine will be connected to an - existing network). The optional alias name(s) can be omitted.</para> - + existing network). The optional alias name(s) can be omitted, and the + <replaceable><192.168.0.2</replaceable> line can be omitted if you + are using a connection configured with DHCP or IPv6 Autoconfiguration.</para> + + <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents + the IPv6 loopback interface. 127.0.1.1 is a loopback entry reserved + specifically for the FQDN.</para> + </sect2> </sect1> diff --git a/chapter07/profile.xml b/chapter09/profile.xml index 226dd9fac..ec39d3a30 100644 --- a/chapter07/profile.xml +++ b/chapter09/profile.xml @@ -103,8 +103,8 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen> encoding used by the locale, the local currency, and the prefix to dial before the telephone number in order to get into the country. If any of the commands above fail with a message similar to the one shown below, this means - that your locale was either not installed in Chapter 6 or is not supported by - the default installation of Glibc.</para> + that your locale was either not installed in <xref linkend="ch-system-glibc"/> + or is not supported by the default installation of Glibc.</para> <screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen> @@ -114,7 +114,7 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen> Glibc.</para> <!-- FIXME: the xlib example will became obsolete real soon --> - <para>Some packages beyond LFS may also lack support for your chosen locale. One + <!--<para>Some packages beyond LFS may also lack support for your chosen locale. One example is the X library (part of the X Window System), which outputs the following error message if the locale does not exactly match one of the character map names in its internal files:</para> @@ -128,7 +128,7 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen> by running the <command>locale charmap</command> command in both locales. For example, one would have to change "de_DE.ISO-8859-15@euro" to "de_DE@euro" in order to get this locale recognized by Xlib.</para> - +--> <para>Other packages can also function incorrectly (but may not necessarily display any error messages) if the locale name does not meet their expectations. In those cases, investigating how other Linux distributions support your locale @@ -145,7 +145,7 @@ export LANG=<replaceable><ll>_<CC>.<charmap><@modifiers> # End /etc/profile</literal> EOF</userinput></screen> - <para>The <quote>C</quote> (default) and <quote>en_US</quote> (the recommended + <para>The <quote>C</quote> (default) and <quote>en_US.utf8</quote> (the recommended one for United States English users) locales are different. <quote>C</quote> uses the US-ASCII 7-bit character set, and treats bytes with the high bit set as invalid characters. That's why, e.g., the <command>ls</command> command diff --git a/chapter07/symlinks.xml b/chapter09/symlinks.xml index 951e6976d..3b46a67b0 100644 --- a/chapter07/symlinks.xml +++ b/chapter09/symlinks.xml @@ -21,7 +21,7 @@ discovered. For example, on a computer having two network cards made by Intel and Realtek, the network card manufactured by Intel may become eth0 and the Realtek card becomes eth1. In some cases, after a reboot the cards - get renumbered the other way around.</para> + could get renumbered the other way around.</para> <para>In the new naming scheme, typical network device names would then be something like enp5s0 or wlp3s0. If this naming convention is not @@ -44,7 +44,7 @@ <sect3> <title>Creating Custom Udev Rules</title> - <para>The naming scheme can be customized by creating custom Udev + <para>The naming scheme can be customized by creating custom udev rules. A script has been included that generates the initial rules. Generate these rules by running:</para> @@ -68,24 +68,24 @@ along with its driver in parentheses, if the driver can be found. Neither the hardware ID nor the driver is used to determine which name to give an interface; this information is only for reference. The second line is the - Udev rule that matches this NIC and actually assigns it a name.</para> + udev rule that matches this NIC and actually assigns it a name.</para> - <para>All Udev rules are made up of several keys, separated by commas and + <para>All udev rules are made up of several keys, separated by commas and optional whitespace. This rule's keys and an explanation of each of them are as follows:</para> <itemizedlist> <listitem> - <para><literal>SUBSYSTEM=="net"</literal> - This tells Udev to ignore + <para><literal>SUBSYSTEM=="net"</literal> - This tells udev to ignore devices that are not network cards.</para> </listitem> <listitem> - <para><literal>ACTION=="add"</literal> - This tells Udev to ignore this + <para><literal>ACTION=="add"</literal> - This tells udev to ignore this rule for a uevent that isn't an add ("remove" and "change" uevents also happen, but don't need to rename network interfaces).</para> </listitem> <listitem> - <para><literal>DRIVERS=="?*"</literal> - This exists so that Udev will + <para><literal>DRIVERS=="?*"</literal> - This exists so that udev will ignore VLAN or bridge sub-interfaces (because these sub-interfaces do not have drivers). These sub-interfaces are skipped because the name that would be assigned would collide with their parent devices.</para> @@ -96,14 +96,14 @@ </listitem> <listitem> <para><literal>ATTR{type}=="1"</literal> - This ensures the rule only - matches the primary interface in the case of certain wireless drivers, + matches the primary interface in the case of certain wireless drivers which create multiple virtual interfaces. The secondary interfaces are skipped for the same reason that VLAN and bridge sub-interfaces are skipped: there would be a name collision otherwise.</para> </listitem> <listitem> <para><literal>NAME</literal> - The value of this key is the name that - Udev will assign to this interface.</para> + udev will assign to this interface.</para> </listitem> </itemizedlist> @@ -133,8 +133,8 @@ default for USB and FireWire devices), where the rules it creates depend on the physical path to the CD or DVD device. Second, it can operate in <quote>by-id</quote> mode (default for IDE and SCSI devices), where the - rules it creates depend on identification strings stored in the CD or DVD - device itself. The path is determined by Udev's <command>path_id</command> + rules it creates depend on identification strings stored on the CD or DVD + device itself. The path is determined by udev's <command>path_id</command> script, and the identification strings are read from the hardware by its <command>ata_id</command> or <command>scsi_id</command> programs, depending on which type of device you have.</para> @@ -159,11 +159,11 @@ <important><para>External devices (for example, a USB-connected CD drive) should not use by-path persistence, because each time the device is plugged into a new external port, its physical path will change. All - externally-connected devices will have this problem if you write Udev rules + externally-connected devices will have this problem if you write udev rules to recognize them by their physical path; the problem is not limited to CD and DVD drives.</para></important> - <para>If you wish to see the values that the Udev scripts will use, then + <para>If you wish to see the values that the udev scripts will use, then for the appropriate CD-ROM device, find the corresponding directory under <filename class="directory">/sys</filename> (e.g., this can be <filename class="directory">/sys/block/hdd</filename>) and @@ -182,18 +182,18 @@ as follows (where <replaceable>mode</replaceable> is one of <quote>by-id</quote> or <quote>by-path</quote>):</para> -<screen role="nodump"><userinput>sed -i -e 's/"write_cd_rules"/"write_cd_rules <replaceable>mode</replaceable>"/' \ - /etc/udev/rules.d/83-cdrom-symlinks.rules</userinput></screen> +<screen role="nodump"><userinput>sed -e 's/"write_cd_rules"/"write_cd_rules <replaceable>mode</replaceable>"/' \ + -i /etc/udev/rules.d/83-cdrom-symlinks.rules</userinput></screen> <para>Note that it is not necessary to create the rules files or symlinks - at this time, because you have bind-mounted the host's - <filename class="directory">/dev</filename> directory into the LFS system, + at this time because you have bind-mounted the host's + <filename class="directory">/dev</filename> directory into the LFS system and we assume the symlinks exist on the host. The rules and symlinks will be created the first time you boot your LFS system.</para> <para>However, if you have multiple CD-ROM devices, then the symlinks generated at that time may point to different devices than they point to on - your host, because devices are not discovered in a predictable order. The + your host because devices are not discovered in a predictable order. The assignments created when you first boot the LFS system will be stable, so this is only an issue if you need the symlinks on both systems to point to the same device. If you need that, then inspect (and possibly edit) the @@ -212,9 +212,9 @@ E.g., if you have a USB web camera and a TV tuner, sometimes <filename>/dev/video0</filename> refers to the camera and <filename>/dev/video1</filename> refers to the tuner, and sometimes - after a reboot the order changes to the opposite one. + after a reboot the order changes. For all classes of hardware except sound cards and network cards, this is - fixable by creating Udev rules for custom persistent symlinks. + fixable by creating udev rules for custom persistent symlinks. The case of network cards is covered separately in <xref linkend="ch-config-network"/>, and sound card configuration can be found in <ulink url="&blfs-book;postlfs/devices.html">BLFS</ulink>.</para> @@ -237,10 +237,8 @@ <screen role="nodump"><userinput>cat > /etc/udev/rules.d/83-duplicate_devs.rules << "EOF" <literal> # Persistent symlinks for webcam and tuner -KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", \ - SYMLINK+="webcam" -KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", \ - SYMLINK+="tvtuner" +KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", SYMLINK+="webcam" +KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", SYMLINK+="tvtuner" </literal> EOF</userinput></screen> diff --git a/chapter07/systemd-custom.xml b/chapter09/systemd-custom.xml index 787fd4572..809c1a273 100644 --- a/chapter07/systemd-custom.xml +++ b/chapter09/systemd-custom.xml @@ -49,13 +49,14 @@ EOF</userinput></screen> <title>Disabling tmpfs for /tmp</title> <para>By default, <filename class="directory">/tmp</filename> is created as - a tmpfs. If this is not desired, it can be overridden by the following:</para> + a tmpfs. If this is not desired, it can be overridden by executing the + following command:</para> <screen role="nodump"><userinput>ln -sfv /dev/null /etc/systemd/system/tmp.mount</userinput></screen> <para>Alternatively, if a a separate partition for <filename class="directory">/tmp</filename> is desired, specify that - partition in an <filename>/etc/fstab</filename> entry.</para> + partition in a <filename>/etc/fstab</filename> entry.</para> <warning> <para> @@ -87,7 +88,7 @@ EOF</userinput></screen> <filename class="directory">/etc/tmpfiles.d</filename> override files with the same name in <filename class="directory">/usr/lib/tmpfiles.d</filename>. See - <filename>tmpfiles.d(5)</filename> manual page for file format + <filename>tmpfiles.d(5)</filename> manual page for file format details.</para> <para> @@ -103,7 +104,7 @@ EOF</userinput></screen> is really only applicable to btrfs filesystems. It references type v which in turn references type d (directory). This then creates the specified directory if is is not present and adjusts the permissions - and ownership as specified. Contents of the directory will be + and ownership as specified. Contents of the directory will be subject to time based cleanup if the age argument is specified. </para> @@ -121,7 +122,7 @@ cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d</userinput></screen> <sect2> <title>Overriding Default Services Behavior</title> - <para>The parameter of a unit can be overriden by creating a directory + <para>The parameters of a unit can be overriden by creating a directory and a configuration file in <filename class="directory">/etc/systemd/system</filename>. For example:</para> @@ -180,7 +181,7 @@ EOF</userinput></screen> <para>Logging on a system booted with systemd is handled with systemd-journald (by default), rather than a typical unix syslog daemon. - You can also add a normal syslog daemon and have both work side by + You can also add a normal syslog daemon and have both operate side by side if desired. The systemd-journald program stores journal entries in a binary format rather than a plain text log file. To assist with parsing the file, the command <command>journalctl</command> is provided. @@ -202,7 +203,7 @@ EOF</userinput></screen> chronological order.</para> </listitem> <listitem> - <para><command>journalctl -f</command>: povides functionality similar + <para><command>journalctl -f</command>: provides functionality similar to tail -f (follow).</para> </listitem> </itemizedlist> @@ -215,23 +216,23 @@ EOF</userinput></screen> <para>Core dumps are useful to debug crashed programs, especially when a daemon process crashes. On systemd booted systems the core dumping is handled by <command>systemd-coredump</command>. It will - log the core dump into the journal and store the core dump itself in + log the core dump in the journal and store the core dump itself in <filename class="directory">/var/lib/systemd/coredump</filename>. - To retrieve and process core dumps, <command>coredumpctl</command> + To retrieve and process core dumps, the <command>coredumpctl</command> tool is provided. Here are some examples of frequently used commands: </para> <itemizedlist> <listitem> <para><command>coredumpctl -r</command>: lists all core dumps in - reversed chronological order.</para> + reverse chronological order.</para> </listitem> <listitem> - <para><command>coredumpctl -1 info</command>: show the information - of the last core dump.</para> + <para><command>coredumpctl -1 info</command>: shows the information + from the last core dump.</para> </listitem> <listitem> - <para><command>coredumpctl -1 debug</command>: load the last core + <para><command>coredumpctl -1 debug</command>: loads the last core dump into <ulink url="&blfs-book;general/gdb.html">GDB</ulink>. </para> </listitem> @@ -249,7 +250,7 @@ cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF MaxUse=5G</literal> EOF</userinput></screen> - <para>See <filename>systemd-coredump(8)</filename>, + <para>See the <filename>systemd-coredump(8)</filename>, <filename>coredumpctl(1)</filename>, and <filename>coredump.conf.d(5)</filename> manual pages for more information.</para> @@ -284,7 +285,7 @@ EOF</userinput></screen> advantage of explicitly allowing and disallowing processes to run after the user session has ended, but breaks backwards compatibility with tools like <command>nohup</command> and utilities that use - <function>deamon()</function>. + <function>daemon()</function>. </para> </listitem> <listitem> @@ -298,7 +299,7 @@ EOF</userinput></screen> </listitem> <listitem> <para> - <emphasis>Disable at build-time</emphasis>: You can enable + <emphasis>Disable at build-time</emphasis>: You can disable lingering by default while building systemd by adding the switch <parameter>-Ddefault-kill-user-processes=false</parameter> to the <command>meson</command> command for systemd. This completely diff --git a/chapter07/udev.xml b/chapter09/udev.xml index 6060849be..a3a7c0cf9 100644 --- a/chapter07/udev.xml +++ b/chapter09/udev.xml @@ -15,7 +15,7 @@ <secondary>usage</secondary> </indexterm> - <para>In <xref linkend="chapter-building-system"/>, we installed the Udev + <para>In <xref linkend="chapter-building-system"/>, we installed the udev package when <phrase revision="sysv">eudev</phrase> <phrase revision="systemd">systemd</phrase> was built. Before we go into the details regarding how this works, a brief history of previous methods of @@ -30,7 +30,7 @@ major and minor device numbers for every possible device that might exist in the world.</para> - <para>Using the Udev method, only those devices which are detected by the + <para>Using the udev method, only those devices which are detected by the kernel get device nodes created for them. Because these device nodes will be created each time the system boots, they will be stored on a <systemitem class="filesystem">devtmpfs</systemitem> file system (a virtual file system @@ -135,7 +135,7 @@ <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file might contain the string <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>. - The default rules provided with Udev will cause <command>udevd</command> + The default rules provided with udev will cause <command>udevd</command> to call out to <command>/sbin/modprobe</command> with the contents of the <envar>MODALIAS</envar> uevent environment variable (which should be the same as the contents of the <filename>modalias</filename> file in sysfs), @@ -149,7 +149,7 @@ be prevented.</para> <para>The kernel itself is also able to load modules for network - protocols, filesystems and NLS support on demand.</para> + protocols, filesystems, and NLS support on demand.</para> </sect3> @@ -177,12 +177,12 @@ <para>Udev will only load a module if it has a bus-specific alias and the bus driver properly exports the necessary aliases to <systemitem class="filesystem">sysfs</systemitem>. In other cases, one should - arrange module loading by other means. With Linux-&linux-version;, Udev is + arrange module loading by other means. With Linux-&linux-version;, udev is known to load properly-written drivers for INPUT, IDE, PCI, USB, SCSI, SERIO, and FireWire devices.</para> <para>To determine if the device driver you require has the necessary - support for Udev, run <command>modinfo</command> with the module name as + support for udev, run <command>modinfo</command> with the module name as the argument. Now try locating the device directory under <filename class="directory">/sys/bus</filename> and check whether there is a <filename>modalias</filename> file there.</para> @@ -190,7 +190,7 @@ <para>If the <filename>modalias</filename> file exists in <systemitem class="filesystem">sysfs</systemitem>, the driver supports the device and can talk to it directly, but doesn't have the alias, it is a bug in the - driver. Load the driver without the help from Udev and expect the issue + driver. Load the driver without the help from udev and expect the issue to be fixed later.</para> <para>If there is no <filename>modalias</filename> file in the relevant @@ -206,7 +206,7 @@ </sect3> <sect3> - <title>A kernel module is not loaded automatically, and Udev is not + <title>A kernel module is not loaded automatically, and udev is not intended to load it</title> <para>If the <quote>wrapper</quote> module only enhances the @@ -214,7 +214,7 @@ <emphasis>snd-pcm-oss</emphasis> enhances the functionality of <emphasis>snd-pcm</emphasis> by making the sound cards available to OSS applications), configure <command>modprobe</command> to load the wrapper - after Udev loads the wrapped module. To do this, add a + after udev loads the wrapped module. To do this, add a <quote>softdep</quote> line to the corresponding <filename>/etc/modprobe.d/<replaceable><filename></replaceable>.conf</filename> file. For example:</para> @@ -223,13 +223,13 @@ <para>Note that the <quote>softdep</quote> command also allows <literal>pre:</literal> dependencies, or a mixture of both - <literal>pre:</literal> and <literal>post:</literal>. See the - <filename>modprobe.d(5)</filename> manual page for more information + <literal>pre:</literal> and <literal>post:</literal> dependencies. See + the <filename>modprobe.d(5)</filename> manual page for more information on <quote>softdep</quote> syntax and capabilities.</para> - <para>If the module in question is not a wrapper and is useful by itself, - configure the <command>modules</command> bootscript to load this - module on system boot. To do this, add the module name to the + <para revision="sysv">If the module in question is not a wrapper and is + useful by itself, configure the <command>modules</command> bootscript to + load this module on system boot. To do this, add the module name to the <filename>/etc/sysconfig/modules</filename> file on a separate line. This works for wrapper modules too, but is suboptimal in that case.</para> @@ -279,7 +279,7 @@ <para>Further text assumes that the driver is built statically into the kernel or already loaded as a module, and that you have already checked - that Udev doesn't create a misnamed device.</para> + that udev doesn't create a misnamed device.</para> <para>Udev has no information needed to create a device node if a kernel driver does not export its data to @@ -297,12 +297,12 @@ <sect3> <title>Device naming order changes randomly after rebooting</title> - <para>This is due to the fact that Udev, by design, handles uevents and + <para>This is due to the fact that udev, by design, handles uevents and loads modules in parallel, and thus in an unpredictable order. This will never be <quote>fixed</quote>. You should not rely upon the kernel device names being stable. Instead, create your own rules that make symlinks with stable names based on some stable attributes of the device, such as a - serial number or the output of various *_id utilities installed by Udev. + serial number or the output of various *_id utilities installed by udev. See <xref linkend="ch-config-symlinks"/> and <xref linkend="ch-config-network"/> for examples.</para> diff --git a/chapter07/usage.xml b/chapter09/usage.xml index 2d68f38fd..d59b38b29 100644 --- a/chapter07/usage.xml +++ b/chapter09/usage.xml @@ -235,50 +235,6 @@ EOF</userinput></screen> <para>For information on kernel module loading and udev, see <xref linkend="module-loading"/>.</para> -<!-- - <sect3> - <title>Module Loading</title> - - <para>Device drivers compiled as modules may have aliases built into them. - Aliases are visible in the output of the <command>modinfo</command> - program and are usually related to the bus-specific identifiers of devices - supported by a module. For example, the <emphasis>snd-fm801</emphasis> - driver supports PCI devices with vendor ID 0x1319 and device ID 0x0801, - and has an alias of <quote>pci:v00001319d00000801sv*sd*bc04sc01i*</quote>. - For most devices, the bus driver exports the alias of the driver that - would handle the device via <systemitem - class="filesystem">sysfs</systemitem>. E.g., the - <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file - might contain the string - <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>. - The default rules provided with Udev will cause <command>udevd</command> - to call out to <command>/sbin/modprobe</command> with the contents of the - <envar>MODALIAS</envar> uevent environment variable (which should be the - same as the contents of the <filename>modalias</filename> file in sysfs), - thus loading all modules whose aliases match this string after wildcard - expansion.</para> - - <para>In this example, this means that, in addition to - <emphasis>snd-fm801</emphasis>, the obsolete (and unwanted) - <emphasis>forte</emphasis> driver will be loaded if it is - available. See below for ways in which the loading of unwanted drivers can - be prevented.</para> - - <para>The kernel itself is also able to load modules for network - protocols, filesystems and NLS support on demand.</para> - - </sect3> - - <sect3> - <title>Handling Hotpluggable/Dynamic Devices</title> - - <para>When you plug in a device, such as a Universal Serial Bus (USB) MP3 - player, the kernel recognizes that the device is now connected and - generates a uevent. This uevent is then handled by - <command>udevd</command> as described above.</para> - - </sect3> ---> </sect2> <sect2 id="ch-config-clock"> @@ -293,11 +249,11 @@ EOF</userinput></screen> (CMOS) clock. If the hardware clock is set to UTC, this script will convert the hardware clock's time to the local time using the <filename>/etc/localtime</filename> file (which tells the - <command>hwclock</command> program which timezone the user is in). There is no + <command>hwclock</command> program which timezone to use). There is no way to detect whether or not the hardware clock is set to UTC, so this needs to be configured manually.</para> - <para>The <command>setclock</command> is run via + <para>The <command>setclock</command> program is run via <application>udev</application> when the kernel detects the hardware capability upon boot. It can also be run manually with the stop parameter to store the system time to the CMOS clock.</para> @@ -315,7 +271,7 @@ EOF</userinput></screen> <para>Change the value of the <envar>UTC</envar> variable below to a value of <parameter>0</parameter> (zero) if the hardware clock - is <emphasis>not</emphasis> set to UTC time.</para> + is <emphasis>NOT</emphasis> set to UTC time.</para> <para>Create a new file <filename>/etc/sysconfig/clock</filename> by running the following:</para> @@ -336,7 +292,7 @@ EOF</userinput></screen> at <ulink url="&hints-root;time.txt"/>. It explains issues such as time zones, UTC, and the <envar>TZ</envar> environment variable.</para> - <note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set + <note><para>The CLOCKPARAMS and UTC paramaters may also be set in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note> </sect2> @@ -352,7 +308,7 @@ EOF</userinput></screen> </indexterm> <para>This section discusses how to configure the <command>console</command> - bootscript that sets up the keyboard map, console font and console kernel log + bootscript that sets up the keyboard map, console font, and console kernel log level. If non-ASCII characters (e.g., the copyright sign, the British pound sign and Euro symbol) will not be used and the keyboard is a U.S. one, much of this section can be skipped. Without the configuration file, (or @@ -378,7 +334,7 @@ EOF</userinput></screen> <term>LOGLEVEL</term> <listitem> <para>This variable specifies the log level for kernel messages sent - to the console as set by <command>dmesg</command>. Valid levels are + to the console as set by <command>dmesg -n</command>. Valid levels are from "1" (no messages) to "8". The default level is "7".</para> </listitem> </varlistentry> @@ -505,7 +461,7 @@ EOF</userinput></screen> <listitem> <para>Due to the use of a 512-glyph LatArCyrHeb-16 font in the previous example, bright colors are no longer available on the Linux console unless - a framebuffer is used. If one wants to have bright colors without + a framebuffer is used. If one wants to have bright colors without a framebuffer and can live without characters not belonging to his language, it is still possible to use a language-specific 256-glyph font, as illustrated below:</para> @@ -548,7 +504,7 @@ EOF</userinput></screen> are not multibyte. This deficiency doesn't affect keymaps for European languages, because there accents are added to unaccented ASCII characters, or two ASCII characters are composed together. However, in - UTF-8 mode it is a problem, e.g., for the Greek language, where one + UTF-8 mode it is a problem; e.g., for the Greek language, where one sometimes needs to put an accent on the letter <quote>alpha</quote>. The solution is either to avoid the use of UTF-8, or to install the X window system that doesn't have this limitation in its input @@ -556,11 +512,11 @@ EOF</userinput></screen> </listitem> <listitem> - <para>For Chinese, Japanese, Korean and some other languages, the Linux + <para>For Chinese, Japanese, Korean, and some other languages, the Linux console cannot be configured to display the needed characters. Users who need such languages should install the X Window System, fonts that cover the necessary character ranges, and the proper input method (e.g., - SCIM, it supports a wide variety of languages).</para> + SCIM, supports a wide variety of languages).</para> </listitem> </itemizedlist> @@ -571,7 +527,7 @@ EOF</userinput></screen> <para>The <filename>/etc/sysconfig/console</filename> file only controls the Linux text console localization. It has nothing to do with setting the proper keyboard layout and terminal fonts in the X Window System, with - ssh sessions or with a serial console. In such situations, limitations + ssh sessions, or with a serial console. In such situations, limitations mentioned in the last two list items above do not apply.</para> </note> @@ -585,9 +541,9 @@ EOF</userinput></screen> <secondary>configuring</secondary> </indexterm> - <para>At times, it is desired to create files at boot time. For instance, + <para>At times, it is desirable to create files at boot time. For instance, the <filename class="directory">/tmp/.ICE-unix</filename> directory - may be desired. This can be done by creating an entry in the + is often needed. This can be done by creating an entry in the <filename>/etc/sysconfig/createfiles</filename> configuration script. The format of this file is embedded in the comments of the default configuration file.</para> diff --git a/chapter10/chapter10.xml b/chapter10/chapter10.xml new file mode 100644 index 000000000..d7236b21c --- /dev/null +++ b/chapter10/chapter10.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<chapter id="chapter-bootable" xreflabel="Chapter 10"> + <?dbhtml dir="chapter10"?> + <?dbhtml filename="chapter10.html"?> + + <title>Making the LFS System Bootable</title> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fstab.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernel.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> + +</chapter> diff --git a/chapter08/fstab.xml b/chapter10/fstab.xml index ebfae3aaf..ebfae3aaf 100644 --- a/chapter08/fstab.xml +++ b/chapter10/fstab.xml diff --git a/chapter10/grub.xml b/chapter10/grub.xml new file mode 100644 index 000000000..fbc1eef9f --- /dev/null +++ b/chapter10/grub.xml @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-bootable-grub" role="wrap"> + <?dbhtml filename="grub.html"?> + + <sect1info condition="script"> + <productname>grub</productname> + <productnumber>&grub-version;</productnumber> + <address>&grub-url;</address> + </sect1info> + + <title>Using GRUB to Set Up the Boot Process</title> + + <sect2> + <title>Introduction</title> + + <warning><para>Configuring GRUB incorrectly can render your system + inoperable without an alternate boot device such as a CD-ROM or bootable + USB drive. This section is not required to boot your LFS system. You may + just want to modify your current boot loader, e.g. Grub-Legacy, GRUB2, or + LILO.</para></warning> + + <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote> + the computer if the computer becomes unusable (un-bootable). If you do not + already have a boot device, you can create one. In order for the procedure + below to work, you need to jump ahead to BLFS and install + <userinput>xorriso</userinput> from the <ulink + url="&blfs-book;multimedia/libisoburn.html"> + libisoburn</ulink> package.</para> + +<screen role="nodump"><userinput>cd /tmp +grub-mkrescue --output=grub-img.iso +xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen> + + <note> + <para> + To boot LFS on host systems that have UEFI enabled, the kernel needs to + have been built with the CONFIG_EFI_STUB capabality described in the + previous section. However, LFS can be booted using GRUB2 without such + an addition. To do this, the UEFI Mode and Secure Boot capabilities in + the host system's BIOS need to be turned off. For details, see <ulink + url="&hints-root;lfs-uefi.txt"> + the lfs-uefi.txt hint</ulink> at + &hints-root;lfs-uefi.txt. + </para> + </note> + + </sect2> + + <sect2> + <title>GRUB Naming Conventions</title> + + <para>GRUB uses its own naming structure for drives and partitions in + the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis> + is the hard drive number and <emphasis>m</emphasis> is the partition + number. The hard drive number starts from zero, but the partition number + starts from one for normal partitions and five for extended partitions. + Note that this is different from earlier versions where + both numbers started from zero. For example, partition <filename + class="partition">sda1</filename> is <emphasis>(hd0,1)</emphasis> to + GRUB and <filename class="partition">sdb3</filename> is + <emphasis>(hd1,3)</emphasis>. In contrast to Linux, GRUB does not + consider CD-ROM drives to be hard drives. For example, if using a CD + on <filename class="partition">hdb</filename> and a second hard drive + on <filename class="partition">hdc</filename>, that second hard drive + would still be <emphasis>(hd1)</emphasis>.</para> + + </sect2> + + <sect2> + <title>Setting Up the Configuration</title> + + <para>GRUB works by writing data to the first physical track of the + hard disk. This area is not part of any file system. The programs + there access GRUB modules in the boot partition. The default location + is /boot/grub/.</para> + + <para>The location of the boot partition is a choice of the user that + affects the configuration. One recommendation is to have a separate small + (suggested size is 200 MB) partition just for boot information. That way + each build, whether LFS or some commercial distro, can access the same boot + files and access can be made from any booted system. If you choose to do + this, you will need to mount the separate partition, move all files in the + current <filename class="directory">/boot</filename> directory (e.g. the + linux kernel you just built in the previous section) to the new partition. + You will then need to unmount the partition and remount it as <filename + class="directory">/boot</filename>. If you do this, be sure to update + <filename>/etc/fstab</filename>.</para> + + <para>Using the current lfs partition will also work, but configuration + for multiple systems is more difficult.</para> + + <para>Using the above information, determine the appropriate + designator for the root partition (or boot partition, if a separate + one is used). For the following example, it is assumed that the root + (or separate boot) partition is <filename + class="partition">sda2</filename>.</para> + + <para>Install the GRUB files into <filename + class="directory">/boot/grub</filename> and set up the boot track:</para> + + <warning> + <para>The following command will overwrite the current boot loader. Do not + run the command if this is not desired, for example, if using a third party + boot manager to manage the Master Boot Record (MBR).</para> + </warning> + +<screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen> + + <note> + <para>If the system has been booted using UEFI, + <command>grub-install</command> will try to install files for the + <emphasis>x86_64-efi</emphasis> target, but those files + have not been installed in chapter 6. If this is the case, add + <option>--target i386-pc</option> to the command above.</para> + </note> + +<!-- This does not seem to be true any more + <note><para><application>grub-install</application> is a script and calls another + program, grub-probe, that may fail with a message "cannot stat `/dev/root'". + If so, create a temporary symbolic link from your root partition to /dev/root:</para> + +<screen role="nodump"><userinput>ln -sv /dev/sda2 /dev/root</userinput></screen> + + <para>The symbolic link will only be present until the system is rebooted. + The link is only needed for the installation procedure. + </para></note> +--> + </sect2> + + <sect2 id="grub-cfg"> + <title>Creating the GRUB Configuration File</title> + + <para>Generate <filename>/boot/grub/grub.cfg</filename>:</para> + + <screen revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF" +<literal># Begin /boot/grub/grub.cfg +set default=0 +set timeout=5 + +insmod ext2 +set root=(hd0,2) + +menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { + linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro +}</literal> +EOF</userinput></screen> + + <screen revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF" +<literal># Begin /boot/grub/grub.cfg +set default=0 +set timeout=5 + +insmod ext2 +set root=(hd0,2) + +menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;" { + linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro +}</literal> +EOF</userinput></screen> + + + <note><para>From <application>GRUB</application>'s perspective, the + kernel files are relative to the partition used. If you + used a separate /boot partition, remove /boot from the above + <emphasis>linux</emphasis> line. You will also need to change the + <emphasis>set root</emphasis> line to point to the boot partition. + </para></note> + + <para>GRUB is an extremely powerful program and it provides a tremendous + number of options for booting from a wide variety of devices, operating + systems, and partition types. There are also many options for customization + such as graphical splash screens, playing sounds, mouse input, etc. The + details of these options are beyond the scope of this introduction.</para> + + <caution><para>There is a command, <application>grub-mkconfig</application>, that + can write a configuration file automatically. It uses a set of scripts in + /etc/grub.d/ and will destroy any customizations that you make. These scripts + are designed primarily for non-source distributions and are not recommended for + LFS. If you install a commercial Linux distribution, there is a good chance + that this program will be run. Be sure to back up your grub.cfg file.</para></caution> + + </sect2> + +</sect1> diff --git a/chapter10/introduction.xml b/chapter10/introduction.xml new file mode 100644 index 000000000..2b233ec08 --- /dev/null +++ b/chapter10/introduction.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-bootable-introduction"> + <?dbhtml filename="introduction.html"?> + + <title>Introduction</title> + + <para>It is time to make the LFS system bootable. This chapter + discusses creating the <filename>/etc/fstab</filename> file, building a + kernel for the new LFS system, and installing the GRUB boot loader so + that the LFS system can be selected for booting at startup.</para> + +</sect1> diff --git a/chapter08/kernel.xml b/chapter10/kernel.xml index 94f050b4e..a724bd078 100644 --- a/chapter08/kernel.xml +++ b/chapter10/kernel.xml @@ -30,8 +30,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&linux-ch8-sbu;</seg> - <seg>&linux-ch8-du;</seg> + <seg>&linux-knl-sbu;</seg> + <seg>&linux-knl-du;</seg> </seglistitem> </segmentedlist> @@ -110,7 +110,6 @@ File systems ---> Pseudo filesystems ---> [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL] [*] Tmpfs extended attributes [CONFIG_TMPFS_XATTR]</screen> - </note> <note revision="systemd"> @@ -257,14 +256,9 @@ File systems ---> the automatic setup of the boot process described in the next section. The following command assumes an x86 architecture:</para> -<screen arch="default" revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> - -<screen arch="ml_32,ml_x32,ml_all" revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;-multilib</userinput></screen> - -<screen arch="default" revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;</userinput></screen> - -<screen arch="ml_32,ml_x32,ml_all" revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;-multilib</userinput></screen> +<screen revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> +<screen revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;</userinput></screen> <para><filename>System.map</filename> is a symbol file for the kernel. It maps the function entry points of every function in the kernel API, @@ -326,7 +320,7 @@ cp -r Documentation/* /usr/share/doc/linux-&linux-version;</userinput></screen> class="directory">/usr/include</filename>) should <emphasis>always</emphasis> be the ones against which Glibc was compiled, that is, the sanitised headers installed in <xref - linkend="ch-system-linux-headers"/>. Therefore, they should + linkend="ch-tools-linux-headers"/>. Therefore, they should <emphasis>never</emphasis> be replaced by either the raw kernel headers or any other kernel sanitized headers.</para> </warning> @@ -373,10 +367,8 @@ EOF</userinput></screen> <seglistitem> <seg>config-&linux-version;, - <phrase arch="default" revision="sysv">vmlinuz-&linux-version;-lfs-&version;,</phrase> - <phrase arch="default" revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;,</phrase> - <phrase arch="ml_32,ml_x32,ml_all" revision="sysv">vmlinuz-&linux-version;-lfs-&version;-multilib,</phrase> - <phrase arch="ml_32,ml_x32,ml_all" revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;-multilib,</phrase> + <phrase revision="sysv">vmlinuz-&linux-version;-lfs-&version;,</phrase> + <phrase revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;,</phrase> and System.map-&linux-version;</seg> <seg>/lib/modules, /usr/share/doc/linux-&linux-version;</seg> </seglistitem> diff --git a/chapter11/chapter11.xml b/chapter11/chapter11.xml new file mode 100644 index 000000000..8b4c53a1d --- /dev/null +++ b/chapter11/chapter11.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<chapter id="chapter-finalizing" xreflabel="Chapter 11"> + <?dbhtml dir="chapter11"?> + <?dbhtml filename="chapter11.html"?> + + <title>The End</title> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="theend.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="getcounted.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reboot.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="whatnow.xml"/> + +</chapter> diff --git a/chapter09/getcounted.xml b/chapter11/getcounted.xml index bc0ad8908..bc0ad8908 100644 --- a/chapter09/getcounted.xml +++ b/chapter11/getcounted.xml diff --git a/chapter09/reboot.xml b/chapter11/reboot.xml index c6a857dbd..1822e6165 100644 --- a/chapter09/reboot.xml +++ b/chapter11/reboot.xml @@ -89,10 +89,6 @@ umount -v $LFS/run umount -v $LFS/proc umount -v $LFS/sys</userinput></screen> - <para>Unmount the LFS file system itself:</para> - -<screen><userinput>umount -v $LFS</userinput></screen> - <para>If multiple partitions were created, unmount the other partitions before unmounting the main one, like this:</para> @@ -100,6 +96,10 @@ umount -v $LFS/sys</userinput></screen> umount -v $LFS/home umount -v $LFS</userinput></screen> + <para>Unmount the LFS file system itself:</para> + +<screen><userinput>umount -v $LFS</userinput></screen> + <para>Now, reboot the system with:</para> <screen role="nodump"><userinput>shutdown -r now</userinput></screen> diff --git a/chapter09/theend.xml b/chapter11/theend.xml index 9f2ca17cc..6a5f8ad7a 100644 --- a/chapter09/theend.xml +++ b/chapter11/theend.xml @@ -36,7 +36,7 @@ <screen revision="systemd"><userinput>echo &versiond; > /etc/lfs-release</userinput></screen> <para>Two files describing the installed system may be used by packages - that will be installed on the system, either in binary form or by building + that can be installed on the system later, either in binary form or by building them.</para> <para>The first one shows the status of your diff --git a/chapter09/whatnow.xml b/chapter11/whatnow.xml index 273eb7740..9e6062cf7 100644 --- a/chapter09/whatnow.xml +++ b/chapter11/whatnow.xml @@ -57,7 +57,7 @@ <para>The Beyond Linux From Scratch book covers installation procedures for a wide range of software beyond the scope of the LFS - Book. The BLFS project is located at <ulink url="&blfs-root;"/>.</para> + Book. The BLFS project is located at <ulink url="&blfs-book;"/>.</para> </listitem> <listitem> @@ -65,7 +65,7 @@ <para>The LFS Hints are a collection of educational documents submitted by volunteers in the LFS community. The hints are available - at <ulink url="&hints-index;"/>.</para> + at <ulink url="&hints-root;"/>.</para> </listitem> <listitem> diff --git a/general.ent b/general.ent index 47c54b421..c2f4da343 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ -<!ENTITY version "SVN-20200531"> +<!ENTITY version "SVN-20200622"> <!ENTITY short-version "svn"> <!-- Used below in &blfs-book; Change to x.y for release but not -rc releases --> <!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" --> -<!ENTITY versiond "20200531-systemd"> +<!ENTITY versiond "20200622-systemd"> <!ENTITY short-versiond "systemd"> <!ENTITY generic-versiond "systemd"> -<!ENTITY releasedate "May 31st, 2020"> +<!ENTITY releasedate "June 22nd, 2020"> <!ENTITY copyrightdate "1999-2020"><!-- jhalfs needs a literal dash, not – --> @@ -54,3 +54,11 @@ <!ENTITY % patches-entities SYSTEM "patches.ent"> %patches-entities; + +<!-- multilib definitions --> +<!ENTITY lib-m32 "/lib32"> +<!ENTITY lib-mx32 "/libx32"> +<!ENTITY usr-lib-m32 "/usr/lib32"> +<!ENTITY usr-lib-mx32 "/usr/libx32"> +<!ENTITY usr-inc-m32 "/usr/include/m32"> +<!ENTITY usr-inc-mx32 "/usr/include/mx32"> @@ -23,21 +23,29 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter02/chapter02.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter03/chapter03.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter04/chapter04.xml"/> -<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter05/chapter05.xml"/> </part> <part id="part3"> -<title>Building the LFS System</title> +<title>Building the LFS Cross Toolchain and Temporary Tools</title> <?dbhtml filename="part3.html"?> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part3intro/part3intro.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter05/chapter05.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter06/chapter06.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter07/chapter07.xml"/> +</part> + +<part id="part4"> +<title>Building the LFS System</title> +<?dbhtml filename="part4.html"?> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter08/chapter08.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter09/chapter09.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter10/chapter10.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter11/chapter11.xml"/> </part> -<part id="part4"> +<part id="part5"> <title>Appendices</title> -<?dbhtml filename="part4.html"?> +<?dbhtml filename="part5.html"?> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/acronymlist.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/acknowledgments.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/dependencies.xml"/> diff --git a/packages.ent b/packages.ent index 5bfa2f4ce..715917ba7 100644 --- a/packages.ent +++ b/packages.ent @@ -4,32 +4,39 @@ For empty *-home entities use " " not "" Packages sizes allways in KB Allowed deviation in SBUs : 10% - Allowed deviation in disk usage : 2% --> + Allowed deviation in disk usage : 2% + + Suffixes: + *-tmp-* Package info for Temporary Tools + *-fin-* Package info for Final System + *-cfg-* Package info for System Configuration + *-knl-* Package info for Kernel stuff +--> <!ENTITY acl-version "2.2.53"> <!ENTITY acl-size "513 KB"> <!ENTITY acl-url "&savannah;/releases/acl/acl-&acl-version;.tar.gz"> <!ENTITY acl-md5 "007aabf1dbb550bcddde52a244cd1070"> <!ENTITY acl-home "&savannah-nongnu;/projects/acl"> -<!ENTITY acl-ch6-du "6.4 MB"> -<!ENTITY acl-ch6-sbu "0.1 SBU"> +<!ENTITY acl-fin-du "6.2 MB"> +<!ENTITY acl-fin-sbu "0.1 SBU"> <!ENTITY attr-version "2.4.48"> <!ENTITY attr-size "457 KB"> <!ENTITY attr-url "&savannah;/releases/attr/attr-&attr-version;.tar.gz"> <!ENTITY attr-md5 "bc1e5cb5c96d99b24886f1f527d3bb3d"> <!ENTITY attr-home "&savannah-nongnu;/projects/attr"> -<!ENTITY attr-ch6-du "4.2 MB"> -<!ENTITY attr-ch6-sbu "less than 0.1 SBU"> +<!ENTITY attr-fin-du "4.2 MB"> +<!ENTITY attr-fin-sbu "less than 0.1 SBU"> <!ENTITY autoconf-version "2.69"> <!ENTITY autoconf-size "1,186 KB"> <!ENTITY autoconf-url "&gnu;autoconf/autoconf-&autoconf-version;.tar.xz"> <!ENTITY autoconf-md5 "50f97f4159805e374639a73e2636f22e"> <!ENTITY autoconf-home "&gnu-software;autoconf/"> -<!ENTITY autoconf-ch6-du "79 MB"> -<!ENTITY autoconf-ch6-sbu-tests "3.2"> -<!ENTITY autoconf-ch6-sbu "less than 0.1 SBU (about &autoconf-ch6-sbu-tests; SBU with tests)"> +<!ENTITY autoconf-fin-du "79 MB"> +<!ENTITY autoconf-fin-sbu-tests "3.3"> +<!ENTITY autoconf-fin-sbu "less than 0.1 SBU (about &autoconf-fin-sbu-tests; SBU with tests)"> <!ENTITY automake-version "1.16.2"> <!ENTITY am-minor-version "1.16"> @@ -37,58 +44,61 @@ <!ENTITY automake-url "&gnu;automake/automake-&automake-version;.tar.xz"> <!ENTITY automake-md5 "6cb234c86f3f984df29ce758e6d0d1d7"> <!ENTITY automake-home "&gnu-software;automake/"> -<!ENTITY automake-ch6-du "107 MB"> -<!ENTITY automake-ch6-sbu "less than 0.1 SBU (about 8.1 SBU with tests)"> +<!ENTITY automake-fin-du "107 MB"> +<!ENTITY automake-fin-sbu "less than 0.1 SBU (about 8 SBU with tests)"> <!ENTITY bash-version "5.0"> <!ENTITY bash-size "9,898 KB"> <!ENTITY bash-url "&gnu;bash/bash-&bash-version;.tar.gz"> <!ENTITY bash-md5 "2b44b47b905be16f45709648f671820b"> <!ENTITY bash-home "&gnu-software;bash/"> -<!ENTITY bash-ch5-du "67 MB"> -<!ENTITY bash-ch5-sbu "0.4 SBU"> -<!ENTITY bash-ch6-du "62 MB"> -<!ENTITY bash-ch6-sbu "1.9 SBU"> +<!ENTITY bash-tmp-du "64 MB"> +<!ENTITY bash-tmp-sbu "0.4 SBU"> +<!ENTITY bash-fin-du "48 MB"> +<!ENTITY bash-fin-sbu "1.8 SBU"> <!ENTITY bc-version "2.7.2"> <!ENTITY bc-size "185 KB"> <!ENTITY bc-url "https://github.com/gavinhoward/bc/releases/download/&bc-version;/bc-&bc-version;.tar.xz"> <!ENTITY bc-md5 "28235ceaf2280b909591ace7a3a4f051"> -<!ENTITY bc-home "https://github.com/gavinhoward/bc"> -<!ENTITY bc-ch6-du "2.9 MB"> -<!ENTITY bc-ch6-sbu "0.1 SBU"> +<!ENTITY bc-home "https://git.yzena.com/gavin/bc"> +<!ENTITY bc-fin-du "3.2 MB"> +<!ENTITY bc-fin-sbu "0.1 SBU"> <!ENTITY binutils-version "2.34"> <!ENTITY binutils-size "21,131 KB"> <!ENTITY binutils-url "&gnu;binutils/binutils-&binutils-version;.tar.xz"> <!ENTITY binutils-md5 "664ec3a2df7805ed3464639aaae332d6"> <!ENTITY binutils-home "&gnu-software;binutils/"> -<!ENTITY binutils-ch5p1-du "625 MB"> -<!ENTITY binutils-ch5p1-sbu "1 SBU"> -<!ENTITY binutils-ch5p2-du "651 MB"> -<!ENTITY binutils-ch5p2-sbu "1.1 SBU"> -<!ENTITY binutils-ch6-du "5.1 GB"> -<!ENTITY binutils-ch6-sbu "6.7 SBU"> - -<!ENTITY bison-version "3.6.2"> -<!ENTITY bison-size "2,411 KB"> +<!ENTITY binutils-tmpp1-du "611 MB"> +<!ENTITY binutils-tmpp1-sbu "1 SBU"> +<!ENTITY binutils-tmpp2-du "492 MB"> +<!ENTITY binutils-tmpp2-sbu "1.2 SBU"> +<!ENTITY binutils-fin-du "4.7 GB"> +<!ENTITY binutils-fin-sbu "6.6 SBU"> + +<!ENTITY bison-version "3.6.4"> +<!ENTITY bison-size "2,415 KB"> <!ENTITY bison-url "&gnu;bison/bison-&bison-version;.tar.xz"> -<!ENTITY bison-md5 "fa5f7c67c523f1d8b2155f55e67f7e1c"> +<!ENTITY bison-md5 "08bf8aa8334d7f817b7b24509ef412bf"> <!ENTITY bison-home "&gnu-software;bison/"> -<!ENTITY bison-ch5-du "43 MB"> -<!ENTITY bison-ch5-sbu "0.3 SBU"> -<!ENTITY bison-ch6-du "52 MB"> -<!ENTITY bison-ch6-sbu "5.8 SBU"> +<!ENTITY bison-tmp-du "47 MB"> +<!ENTITY bison-tmp-sbu "0.3 SBU"> +<!ENTITY bison-fin-du "50 MB"> +<!ENTITY bison-fin-sbu "5.6 SBU"> <!ENTITY bzip2-version "1.0.8"> <!ENTITY bzip2-size "792 KB"> <!ENTITY bzip2-url "https://www.sourceware.org/pub/bzip2/bzip2-&bzip2-version;.tar.gz"> <!ENTITY bzip2-md5 "67e051268d0c475ea773822f7500d0e5"> +<!ENTITY bzip2-home " "> <!--<!ENTITY bzip2-home "http://www.bzip.org/">--> -<!ENTITY bzip2-ch5-du "6.4 MB"> -<!ENTITY bzip2-ch5-sbu "less than 0.1 SBU"> -<!ENTITY bzip2-ch6-du "7.7 MB"> -<!ENTITY bzip2-ch6-sbu "less than 0.1 SBU"> +<!-- No more bzip2 in temp tools +<!ENTITY bzip2-tmp-du "6.4 MB"> +<!ENTITY bzip2-tmp-sbu "less than 0.1 SBU">--> +<!ENTITY bzip2-fin-du "7.7 MB"> +<!ENTITY bzip2-fin-sbu "less than 0.1 SBU"> +<!-- Does not seem to be used in this book <!ENTITY ref5-version "&version;"> <!ENTITY ref5-size "REF5-SUM KB"> @@ -99,81 +109,81 @@ <!ENTITY ref6-size "REF6-SUM KB"> <!ENTITY ref6-url "&anduin-sources;/reference-files/chapter6-files-&version;.ref"> <!ENTITY ref6-md5 "REF6-MD5SUM"> - +--> <!ENTITY check-version "0.14.0"> <!ENTITY check-size "753 KB"> <!ENTITY check-url "&github;/libcheck/check/releases/download/&check-version;/check-&check-version;.tar.gz"> <!ENTITY check-md5 "270e82a445be6026040267a5e11cc94b"> <!ENTITY check-home "https://libcheck.github.io/check"> -<!ENTITY check-ch5-du "13 MB"> -<!ENTITY check-ch5-sbu "0.1 SBU (about 3.5 SBU with tests)"> +<!ENTITY check-fin-du "12 MB"> +<!ENTITY check-fin-sbu "0.1 SBU (about 3.3 SBU with tests)"> <!ENTITY coreutils-version "8.32"> <!ENTITY coreutils-size "5,418 KB"> <!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.xz"> <!ENTITY coreutils-md5 "022042695b7d5bcf1a93559a9735e668"> <!ENTITY coreutils-home "&gnu-software;coreutils/"> -<!ENTITY coreutils-ch5-du "157 MB"> -<!ENTITY coreutils-ch5-sbu "0.7 SBU"> -<!ENTITY coreutils-ch6-du "202 MB"> -<!ENTITY coreutils-ch6-sbu "2.3 SBU"> +<!ENTITY coreutils-tmp-du "170 MB"> +<!ENTITY coreutils-tmp-sbu "0.6 SBU"> +<!ENTITY coreutils-fin-du "157 MB"> +<!ENTITY coreutils-fin-sbu "2.6 SBU"> -<!ENTITY dbus-version "1.12.16"> +<!ENTITY dbus-version "1.12.18"> <!ENTITY dbus-size "2,048 KB"> <!ENTITY dbus-url "https://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz"> -<!ENTITY dbus-md5 "2dbeae80dfc9e3632320c6a53d5e8890"> +<!ENTITY dbus-md5 "4ca570c281be35d0b30ab83436712242"> <!ENTITY dbus-home "https://www.freedesktop.org/wiki/Software/dbus"> -<!ENTITY dbus-ch6-du "18 MB"> -<!ENTITY dbus-ch6-sbu "0.2 SBU"> +<!ENTITY dbus-fin-du "18 MB"> +<!ENTITY dbus-fin-sbu "0.2 SBU"> <!ENTITY dejagnu-version "1.6.2"> <!ENTITY dejagnu-size "514 KB"> <!ENTITY dejagnu-url "&gnu;dejagnu/dejagnu-&dejagnu-version;.tar.gz"> <!ENTITY dejagnu-md5 "e1b07516533f351b3aba3423fafeffd6"> <!ENTITY dejagnu-home "&gnu-software;dejagnu/"> -<!ENTITY dejagnu-ch5-du "3.2 MB"> -<!ENTITY dejagnu-ch5-sbu "less than 0.1 SBU"> +<!ENTITY dejagnu-tmp-du "4.6 MB"> +<!ENTITY dejagnu-tmp-sbu "less than 0.1 SBU"> <!ENTITY diffutils-version "3.7"> <!ENTITY diffutils-size "1,415 KB"> <!ENTITY diffutils-url "&gnu;diffutils/diffutils-&diffutils-version;.tar.xz"> <!ENTITY diffutils-md5 "4824adc0e95dbbf11dfbdfaad6a1e461"> <!ENTITY diffutils-home "&gnu-software;diffutils/"> -<!ENTITY diffutils-ch5-du "26 MB"> -<!ENTITY diffutils-ch5-sbu "0.2 SBU"> -<!ENTITY diffutils-ch6-du "36 MB"> -<!ENTITY diffutils-ch6-sbu "0.4 SBU"> +<!ENTITY diffutils-tmp-du "26 MB"> +<!ENTITY diffutils-tmp-sbu "0.2 SBU"> +<!ENTITY diffutils-fin-du "33 MB"> +<!ENTITY diffutils-fin-sbu "0.4 SBU"> <!ENTITY e2fsprogs-version "1.45.6"> <!ENTITY e2fsprogs-size "7,753 KB"> <!ENTITY e2fsprogs-url "https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v&e2fsprogs-version;/e2fsprogs-&e2fsprogs-version;.tar.gz"> <!ENTITY e2fsprogs-md5 "cccfb706d162514e4f9dbfbc9e5d65ee"> <!ENTITY e2fsprogs-home "http://e2fsprogs.sourceforge.net/"> -<!ENTITY e2fsprogs-ch6-du "108 MB"> -<!ENTITY e2fsprogs-ch6-sbu "1.6 SBU"> +<!ENTITY e2fsprogs-fin-du "106 MB"> +<!ENTITY e2fsprogs-fin-sbu "4.4 SBU on a spinning disk, 1.7 SBU on an SSD"> -<!ENTITY elfutils-version "0.179"> -<!ENTITY elfutils-size "8,846 KB"> +<!ENTITY elfutils-version "0.180"> +<!ENTITY elfutils-size "8,867 KB"> <!ENTITY elfutils-url "https://sourceware.org/ftp/elfutils/&elfutils-version;/elfutils-&elfutils-version;.tar.bz2"> -<!ENTITY elfutils-md5 "8ee56b371b5a7ea081284c44e5164600"> +<!ENTITY elfutils-md5 "23feddb1b3859b03ffdbaf53ba6bd09b"> <!ENTITY elfutils-home "https://sourceware.org/ftp/elfutils/"> -<!ENTITY elfutils-ch6-du "124 MB"> -<!ENTITY elfutils-ch6-sbu "0.9 SBU"> +<!ENTITY elfutils-fin-du "121 MB"> +<!ENTITY elfutils-fin-sbu "1.0 SBU"> <!ENTITY eudev-version "3.2.9"> <!ENTITY eudev-size "1,914 KB"> <!ENTITY eudev-url "https://dev.gentoo.org/~blueness/eudev/eudev-&eudev-version;.tar.gz"> <!ENTITY eudev-md5 "dedfb1964f6098fe9320de827957331f"> -<!ENTITY eudev-ch6-du "83 MB"> -<!ENTITY eudev-ch6-sbu "0.2 SBU"> +<!ENTITY eudev-fin-du "82 MB"> +<!ENTITY eudev-fin-sbu "0.2 SBU"> <!ENTITY expat-version "2.2.9"> <!ENTITY expat-size "413 KB"> <!ENTITY expat-url "&sourceforge;expat/expat-&expat-version;.tar.xz"> <!ENTITY expat-md5 "d2384fa607223447e713e1b9bd272376"> <!ENTITY expat-home "https://libexpat.github.io/"> -<!ENTITY expat-ch6-du "11 MB"> -<!ENTITY expat-ch6-sbu "0.1 SBU"> +<!ENTITY expat-fin-du "14 MB"> +<!ENTITY expat-fin-sbu "0.1 SBU"> <!ENTITY expect-version "5.45.4"> <!ENTITY expect-lib-version "5.45"> @@ -181,60 +191,61 @@ <!ENTITY expect-url "&sourceforge;expect/expect&expect-version;.tar.gz"> <!ENTITY expect-md5 "00fce8de158422f5ccd2666512329bd2"> <!ENTITY expect-home "https://core.tcl.tk/expect/"> -<!ENTITY expect-ch5-du "4.0 MB"> -<!ENTITY expect-ch5-sbu "0.1 SBU"> +<!ENTITY expect-tmp-du "3.9 MB"> +<!ENTITY expect-tmp-sbu "0.1 SBU"> -<!ENTITY file-version "5.38"> -<!ENTITY file-size "911 KB"> +<!ENTITY file-version "5.39"> +<!ENTITY file-size "932 KB"> <!ENTITY file-url "ftp://ftp.astron.com/pub/file/file-&file-version;.tar.gz"> -<!ENTITY file-md5 "3217633ed09c7cd35ed8d04191675574"> +<!ENTITY file-md5 "1c450306053622803a25647d88f80f25"> <!ENTITY file-home "https://www.darwinsys.com/file/"> -<!ENTITY file-ch5-du "20 MB"> -<!ENTITY file-ch5-sbu "0.1 SBU"> -<!ENTITY file-ch6-du "20 MB"> -<!ENTITY file-ch6-sbu "0.1 SBU"> +<!ENTITY file-tmp-du "20 MB"> +<!ENTITY file-tmp-sbu "0.1 SBU"> +<!ENTITY file-fin-du "13 MB"> +<!ENTITY file-fin-sbu "0.1 SBU"> <!ENTITY findutils-version "4.7.0"> <!ENTITY findutils-size "1,851 KB"> <!ENTITY findutils-url "&gnu;findutils/findutils-&findutils-version;.tar.xz"> <!ENTITY findutils-md5 "731356dec4b1109b812fecfddfead6b2"> <!ENTITY findutils-home "&gnu-software;findutils/"> -<!ENTITY findutils-ch5-du "39 MB"> -<!ENTITY findutils-ch5-sbu "0.3 SBU"> -<!ENTITY findutils-ch6-du "57 MB"> -<!ENTITY findutils-ch6-sbu "0.7 SBU"> +<!ENTITY findutils-tmp-du "40 MB"> +<!ENTITY findutils-tmp-sbu "0.2 SBU"> +<!ENTITY findutils-fin-du "51 MB"> +<!ENTITY findutils-fin-sbu "0.7 SBU"> <!ENTITY flex-version "2.6.4"> <!ENTITY flex-size "1,386 KB"> <!ENTITY flex-url "&github;/westes/flex/releases/download/v&flex-version;/flex-&flex-version;.tar.gz"> <!ENTITY flex-md5 "2882e3179748cc9f9c23ec593d6adc8d"> <!ENTITY flex-home "&github;/westes/flex"> -<!ENTITY flex-ch5-du "15 MB"> -<!ENTITY flex-ch5-sbu "0.1 SBU"> -<!ENTITY flex-ch6-du "36 MB"> -<!ENTITY flex-ch6-sbu "0.4 SBU"> +<!-- only in final system now +<!ENTITY flex-tmp-du "15 MB"> +<!ENTITY flex-tmp-sbu "0.1 SBU">--> +<!ENTITY flex-fin-du "36 MB"> +<!ENTITY flex-fin-sbu "0.4 SBU"> <!ENTITY gawk-version "5.1.0"> <!ENTITY gawk-size "3,081 KB"> <!ENTITY gawk-url "&gnu;gawk/gawk-&gawk-version;.tar.xz"> <!ENTITY gawk-md5 "8470c34eeecc41c1aa0c5d89e630df50"> <!ENTITY gawk-home "&gnu-software;gawk/"> -<!ENTITY gawk-ch5-du "46 MB"> -<!ENTITY gawk-ch5-sbu "0.2 SBU"> -<!ENTITY gawk-ch6-du "47 MB"> -<!ENTITY gawk-ch6-sbu "0.4 SBU"> +<!ENTITY gawk-tmp-du "46 MB"> +<!ENTITY gawk-tmp-sbu "0.2 SBU"> +<!ENTITY gawk-fin-du "43 MB"> +<!ENTITY gawk-fin-sbu "0.4 SBU"> <!ENTITY gcc-version "10.1.0"> <!ENTITY gcc-size "72,844 KB"> <!ENTITY gcc-url "&gnu;gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.xz"> <!ENTITY gcc-md5 "7d48e00245330c48b670ec9a2c518291"> <!ENTITY gcc-home "https://gcc.gnu.org/"> -<!ENTITY gcc-ch5p1-du "3.9 GB"> -<!ENTITY gcc-ch5p1-sbu "12 SBU"> -<!ENTITY gcc-ch5p2-du "4.3 GB"> -<!ENTITY gcc-ch5p2-sbu "14 SBU"> -<!ENTITY gcc-ch6-du "4.9 GB "> -<!ENTITY gcc-ch6-sbu "103 SBU (with tests)"> +<!ENTITY gcc-tmpp1-du "3.7 GB"> +<!ENTITY gcc-tmpp1-sbu "11 SBU"> +<!ENTITY gcc-tmpp2-du "3.6 GB"> +<!ENTITY gcc-tmpp2-sbu "11 SBU"> +<!ENTITY gcc-fin-du "4.4 GB "> +<!ENTITY gcc-fin-sbu "103 SBU (with tests)"> <!ENTITY libquadmath-version "0.0.0"> <!ENTITY libstdcpp-version "6.0.28"> <!ENTITY libitm-version "1.0.0"> @@ -243,36 +254,38 @@ <!--<!ENTITY libmpxwrap-version "2.0.1">--> <!--<!ENTITY libcilkrts-version "5.0.0">--> -<!ENTITY libstdcpp-ch5-du "878 MB"> -<!ENTITY libstdcpp-ch5-sbu "0.5 SBU"> +<!ENTITY libstdcpp-tmpp1-du "952 MB"> +<!ENTITY libstdcpp-tmpp1-sbu "0.4 SBU"> +<!ENTITY libstdcpp-tmpp2-du "1.1 GB"> +<!ENTITY libstdcpp-tmpp2-sbu "1.1 SBU"> <!ENTITY gdbm-version "1.18.1"> <!ENTITY gdbm-size "920 KB"> <!ENTITY gdbm-url "&gnu;gdbm/gdbm-&gdbm-version;.tar.gz"> <!ENTITY gdbm-md5 "988dc82182121c7570e0cb8b4fcd5415"> <!ENTITY gdbm-home "&gnu-software;gdbm/"> -<!ENTITY gdbm-ch6-du "11 MB"> -<!ENTITY gdbm-ch6-sbu "0.1 SBU"> +<!ENTITY gdbm-fin-du "11 MB"> +<!ENTITY gdbm-fin-sbu "0.1 SBU"> <!ENTITY gettext-version "0.20.2"> <!ENTITY gettext-size "9,292 KB"> <!ENTITY gettext-url "&gnu;gettext/gettext-&gettext-version;.tar.xz"> <!ENTITY gettext-md5 "0cf5f68338d5d941bbf9ac93b847310f"> <!ENTITY gettext-home "&gnu-software;gettext/"> -<!ENTITY gettext-ch5-du "300 MB"> -<!ENTITY gettext-ch5-sbu "1.6 SBU"> -<!ENTITY gettext-ch6-du "249 MB"> -<!ENTITY gettext-ch6-sbu "2.7 SBU"> +<!ENTITY gettext-tmp-du "303 MB"> +<!ENTITY gettext-tmp-sbu "1.7 SBU"> +<!ENTITY gettext-fin-du "231 MB"> +<!ENTITY gettext-fin-sbu "2.8 SBU"> <!ENTITY glibc-version "2.31"> <!ENTITY glibc-size "16,286 KB"> <!ENTITY glibc-url "&gnu;glibc/glibc-&glibc-version;.tar.xz"> <!ENTITY glibc-md5 "78a720f17412f3c3282be5a6f3363ec6"> <!ENTITY glibc-home "&gnu-software;libc/"> -<!ENTITY glibc-ch5-du "896 MB"> -<!ENTITY glibc-ch5-sbu "4.5 SBU"> -<!ENTITY glibc-ch6-du "5.5 GB"> -<!ENTITY glibc-ch6-sbu "19 SBU"> +<!ENTITY glibc-tmp-du "750 MB"> +<!ENTITY glibc-tmp-sbu "4.2 SBU"> +<!ENTITY glibc-fin-du "2.6 GB"> +<!ENTITY glibc-fin-sbu "19 SBU"> <!ENTITY libthread_db-version "1.0"> <!ENTITY gmp-version "6.2.0"> @@ -280,316 +293,307 @@ <!ENTITY gmp-url "&gnu;gmp/gmp-&gmp-version;.tar.xz"> <!ENTITY gmp-md5 "a325e3f09e6d91e62101e59f9bda3ec1"> <!ENTITY gmp-home "&gnu-software;gmp/"> -<!ENTITY gmp-ch6-du "51 MB"> -<!ENTITY gmp-ch6-sbu "1.1 SBU"> +<!ENTITY gmp-fin-du "51 MB"> +<!ENTITY gmp-fin-sbu "1.1 SBU"> <!ENTITY gperf-version "3.1"> <!ENTITY gperf-size "1,188 KB"> <!ENTITY gperf-url "&gnu;gperf/gperf-&gperf-version;.tar.gz"> <!ENTITY gperf-md5 "9e251c0a618ad0824b51117d5d9db87e"> <!ENTITY gperf-home "&gnu-software;gperf/"> -<!ENTITY gperf-ch6-du "6.3 MB"> -<!ENTITY gperf-ch6-sbu "less than 0.1 SBU"> +<!ENTITY gperf-fin-du "6.4 MB"> +<!ENTITY gperf-fin-sbu "less than 0.1 SBU"> <!ENTITY grep-version "3.4"> <!ENTITY grep-size "1,520 KB"> <!ENTITY grep-url "&gnu;grep/grep-&grep-version;.tar.xz"> <!ENTITY grep-md5 "111b117d22d6a7d049d6ae7505e9c4d2"> <!ENTITY grep-home "&gnu-software;grep/"> -<!ENTITY grep-ch5-du "25 MB"> -<!ENTITY grep-ch5-sbu "0.2 SBU"> -<!ENTITY grep-ch6-du "39 MB"> -<!ENTITY grep-ch6-sbu "0.7 SBU"> +<!ENTITY grep-tmp-du "26 MB"> +<!ENTITY grep-tmp-sbu "0.2 SBU"> +<!ENTITY grep-fin-du "37 MB"> +<!ENTITY grep-fin-sbu "0.7 SBU"> <!ENTITY groff-version "1.22.4"> <!ENTITY groff-size "4,044 KB"> <!ENTITY groff-url "&gnu;groff/groff-&groff-version;.tar.gz"> <!ENTITY groff-md5 "08fb04335e2f5e73f23ea4c3adbf0c5f"> <!ENTITY groff-home "&gnu-software;groff/"> -<!ENTITY groff-ch6-du "95 MB"> -<!ENTITY groff-ch6-sbu "0.5 SBU"> +<!ENTITY groff-fin-du "96 MB"> +<!ENTITY groff-fin-sbu "0.5 SBU"> <!ENTITY grub-version "2.04"> <!ENTITY grub-size "6,245 KB"> <!ENTITY grub-url "https://ftp.gnu.org/gnu/grub/grub-&grub-version;.tar.xz"> <!ENTITY grub-md5 "5aaca6713b47ca2456d8324a58755ac7"> <!ENTITY grub-home "&gnu-software;grub/"> -<!ENTITY grub-ch6-du "161 MB"> -<!ENTITY grub-ch6-sbu "0.8 SBU"> +<!ENTITY grub-fin-du "154 MB"> +<!ENTITY grub-fin-sbu "0.8 SBU"> <!ENTITY gzip-version "1.10"> <!ENTITY gzip-size "757 KB"> <!ENTITY gzip-url "&gnu;gzip/gzip-&gzip-version;.tar.xz"> <!ENTITY gzip-md5 "691b1221694c3394f1c537df4eee39d3"> <!ENTITY gzip-home "&gnu-software;gzip/"> -<!ENTITY gzip-ch5-du "10 MB"> -<!ENTITY gzip-ch5-sbu "0.1 SBU"> -<!ENTITY gzip-ch6-du "20 MB"> -<!ENTITY gzip-ch6-sbu "0.1 SBU"> +<!ENTITY gzip-tmp-du "10 MB"> +<!ENTITY gzip-tmp-sbu "0.1 SBU"> +<!ENTITY gzip-fin-du "19 MB"> +<!ENTITY gzip-fin-sbu "0.1 SBU"> <!ENTITY iana-etc-version "20200429"> <!ENTITY iana-etc-size "574 KB"> <!ENTITY iana-etc-url "&anduin-sources;/iana-etc-&iana-etc-version;.tar.gz"> <!ENTITY iana-etc-md5 "f9f7cda56c0ebe6ac2fa69a0be5d5400"> <!ENTITY iana-etc-home "http://freecode.com/projects/iana-etc"> -<!ENTITY iana-etc-ch6-du "4.7 MB"> -<!ENTITY iana-etc-ch6-sbu "less than 0.1 SBU"> +<!ENTITY iana-etc-fin-du "4.7 MB"> +<!ENTITY iana-etc-fin-sbu "less than 0.1 SBU"> <!ENTITY inetutils-version "1.9.4"> <!ENTITY inetutils-size "1,333 KB"> <!ENTITY inetutils-url "&gnu;inetutils/inetutils-&inetutils-version;.tar.xz"> <!ENTITY inetutils-md5 "87fef1fa3f603aef11c41dcc097af75e"> <!ENTITY inetutils-home "&gnu-software;inetutils/"> -<!ENTITY inetutils-ch6-du "29 MB"> -<!ENTITY inetutils-ch6-sbu "0.3 SBU"> +<!ENTITY inetutils-fin-du "29 MB"> +<!ENTITY inetutils-fin-sbu "0.3 SBU"> <!ENTITY intltool-version "0.51.0"> <!ENTITY intltool-size "159 KB"> <!ENTITY intltool-url "https://launchpad.net/intltool/trunk/&intltool-version;/+download/intltool-&intltool-version;.tar.gz"> <!ENTITY intltool-md5 "12e517cac2b57a0121cda351570f1e63"> <!ENTITY intltool-home "https://freedesktop.org/wiki/Software/intltool"> -<!ENTITY intltool-ch6-du "1.5 MB"> -<!ENTITY intltool-ch6-sbu "less than 0.1 SBU"> +<!ENTITY intltool-fin-du "1.5 MB"> +<!ENTITY intltool-fin-sbu "less than 0.1 SBU"> -<!ENTITY iproute2-version "5.6.0"> -<!ENTITY iproute2-size "738 KB"> +<!ENTITY iproute2-version "5.7.0"> +<!ENTITY iproute2-size "747 KB"> <!ENTITY iproute2-url "&kernel;linux/utils/net/iproute2/iproute2-&iproute2-version;.tar.xz"> -<!ENTITY iproute2-md5 "9da0c352707c34b8b1fec3bf42fcfd09"> +<!ENTITY iproute2-md5 "da22ab8562eda56ae232872fa72e4870"> <!ENTITY iproute2-home "&kernel;linux/utils/net/iproute2/"> -<!ENTITY iproute2-ch6-du "14 MB"> -<!ENTITY iproute2-ch6-sbu "0.2 SBU"> +<!ENTITY iproute2-fin-du "14 MB"> +<!ENTITY iproute2-fin-sbu "0.2 SBU"> <!ENTITY isl-version "0.22.1"> <!ENTITY isl-size "1.6 MB"> <!ENTITY isl-url "http://isl.gforge.inria.fr/isl-&isl-version;.tar.xz"> <!ENTITY isl-md5 "6e124849a9b62e3e2d5d51e955323f6e"> <!ENTITY isl-home "http://isl.gforge.inria.fr/"> -<!ENTITY isl-ch6-du "20 MB"> -<!ENTITY isl-ch6-sbu "0.1 SBU"> +<!ENTITY isl-fin-du "20 MB"> +<!ENTITY isl-fin-sbu "0.1 SBU"> <!ENTITY kbd-version "2.2.0"> <!ENTITY kbd-size "1,090 KB"> <!ENTITY kbd-url "https://www.kernel.org/pub/linux/utils/kbd/kbd-&kbd-version;.tar.xz"> <!ENTITY kbd-md5 "d1d7ae0b5fb875dc082731e09cd0c8bc"> <!ENTITY kbd-home "http://ftp.altlinux.org/pub/people/legion/kbd"> -<!ENTITY kbd-ch6-du "36 MB"> -<!ENTITY kbd-ch6-sbu "0.1 SBU"> +<!ENTITY kbd-fin-du "36 MB"> +<!ENTITY kbd-fin-sbu "0.1 SBU"> <!ENTITY kmod-version "27"> <!ENTITY kmod-size "537 KB"> <!ENTITY kmod-url "&kernel;linux/utils/kernel/kmod/kmod-&kmod-version;.tar.xz"> <!ENTITY kmod-md5 "3973a74786670d3062d89a827e266581"> <!ENTITY kmod-home " "> -<!ENTITY kmod-ch6-du "13 MB"> -<!ENTITY kmod-ch6-sbu "0.1 SBU"> +<!ENTITY kmod-fin-du "13 MB"> +<!ENTITY kmod-fin-sbu "0.1 SBU"> <!ENTITY less-version "551"> <!ENTITY less-size "339 KB"> <!ENTITY less-url "http://www.greenwoodsoftware.com/less/less-&less-version;.tar.gz"> <!ENTITY less-md5 "4ad4408b06d7a6626a055cb453f36819"> <!ENTITY less-home "http://www.greenwoodsoftware.com/less/"> -<!ENTITY less-ch6-du "4.1 MB"> -<!ENTITY less-ch6-sbu "less than 0.1 SBU"> +<!ENTITY less-fin-du "4.1 MB"> +<!ENTITY less-fin-sbu "less than 0.1 SBU"> <!ENTITY lfs-bootscripts-version "20191031"> <!-- Scripts depend on this format --> <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz"> <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!ENTITY lfs-bootscripts-home " "> -<!ENTITY lfs-bootscripts-ch7-du "BOOTSCRIPTS-INSTALL-KB KB"> -<!ENTITY lfs-bootscripts-ch7-sbu "less than 0.1 SBU"> +<!ENTITY lfs-bootscripts-cfg-du "BOOTSCRIPTS-INSTALL-KB KB"> +<!ENTITY lfs-bootscripts-cfg-sbu "less than 0.1 SBU"> -<!ENTITY libcap-version "2.34"> -<!ENTITY libcap-size "109 KB"> +<!ENTITY libcap-version "2.36"> +<!ENTITY libcap-size "112 KB"> <!ENTITY libcap-url "&kernel;linux/libs/security/linux-privs/libcap2/libcap-&libcap-version;.tar.xz"> -<!ENTITY libcap-md5 "66028a8080a0891c54b202bb5e749035"> +<!ENTITY libcap-md5 "3d8cd4a87650cdee130691cb110c2ce2"> <!ENTITY libcap-home "https://sites.google.com/site/fullycapable/"> -<!ENTITY libcap-ch6-du "8.5 MB"> -<!ENTITY libcap-ch6-sbu "less than 0.1 SBU"> +<!ENTITY libcap-fin-du "11 MB"> +<!ENTITY libcap-fin-sbu "less than 0.1 SBU"> <!ENTITY libffi-version "3.3"> <!ENTITY libffi-size "1,275 KB"> <!ENTITY libffi-url "ftp://sourceware.org/pub/libffi/libffi-&libffi-version;.tar.gz"> <!ENTITY libffi-md5 "6313289e32f1d38a9df4770b014a2ca7"> <!ENTITY libffi-home "https://sourceware.org/libffi/"> -<!ENTITY libffi-ch6-du "10 MB"> -<!ENTITY libffi-ch6-sbu "1.9 SBU"> +<!ENTITY libffi-fin-du "10 MB"> +<!ENTITY libffi-fin-sbu "1.9 SBU"> <!ENTITY libpipeline-version "1.5.2"> <!ENTITY libpipeline-size "971 KB"> <!ENTITY libpipeline-url "&savannah;/releases/libpipeline/libpipeline-&libpipeline-version;.tar.gz"> <!ENTITY libpipeline-md5 "169de4cc1f6f7f7d430a5bed858b2fd3"> <!ENTITY libpipeline-home "http://libpipeline.nongnu.org/"> -<!ENTITY libpipeline-ch6-du "9.2 MB"> -<!ENTITY libpipeline-ch6-sbu "0.2 SBU"> +<!ENTITY libpipeline-fin-du "10 MB"> +<!ENTITY libpipeline-fin-sbu "0.2 SBU"> <!ENTITY libtool-version "2.4.6"> <!ENTITY libtool-size "951 KB"> <!ENTITY libtool-url "&gnu;libtool/libtool-&libtool-version;.tar.xz"> <!ENTITY libtool-md5 "1bfb9b923f2c1339b4d2ce1807064aa5"> <!ENTITY libtool-home "&gnu-software;libtool/"> -<!ENTITY libtool-ch6-du "43 MB"> -<!ENTITY libtool-ch6-sbu "1.8 SBU"> +<!ENTITY libtool-fin-du "43 MB"> +<!ENTITY libtool-fin-sbu "1.9 SBU"> <!ENTITY linux-major-version "5"> -<!ENTITY linux-minor-version "6"> -<!ENTITY linux-patch-version "15"> +<!ENTITY linux-minor-version "7"> +<!ENTITY linux-patch-version "2"> <!--<!ENTITY linux-version "&linux-major-version;.&linux-minor-version;">--> <!ENTITY linux-version "&linux-major-version;.&linux-minor-version;.&linux-patch-version;"> -<!ENTITY linux-size "109,193 KB"> +<!ENTITY linux-size "110,047 KB"> <!ENTITY linux-url "&kernel;linux/kernel/v&linux-major-version;.x/linux-&linux-version;.tar.xz"> -<!ENTITY linux-md5 "41f02b34dbb66ffa6b71bb3e2361e94d"> +<!ENTITY linux-md5 "3aec12c426030b27553006ea515a91a1"> <!ENTITY linux-home "https://www.kernel.org/"> <!-- measured for 4.8.3 / gcc-6.2.0 on x86_64 : minimum is allnoconfig extended for a hopefully-bootable build on desktop machine, max is allyesconfig which requires openssl --> -<!ENTITY linux-ch8-du "960 - 4250 MB (typically about 1100 MB)"> -<!ENTITY linux-ch8-sbu "4.4 - 66.0 SBU (typically about 6 SBU)"> - -<!ENTITY linux-headers-ch5-du "1 GB"> -<!ENTITY linux-headers-ch5-sbu "0.1 SBU"> -<!ENTITY linux-headers-ch6-du "1 GB"> -<!ENTITY linux-headers-ch6-sbu "0.1 SBU"> - -<!ENTITY linux-firmware-version "20200219"> -<!ENTITY linux-firmware-size "107 MB"> -<!ENTITY linux-firmware-url "http://www.linuxfromscratch.org/~dj/linux-firmware-&linux-firmware-version;.tar.xz"> -<!ENTITY linux-firmware-md5 "6f0bc3f1daa494c4c4c7c7578da92030"> -<!ENTITY linux-firmware-home "http://www.kernel.org/"> -<!ENTITY linux-firmware-ch5-du "520 MB"> -<!ENTITY linux-firmware-ch5-sbu "0.1 SBU"> -<!ENTITY linux-firmware-ch6-du "&linux-firmware-ch5-du;"> -<!ENTITY linux-firmware-ch6-sbu "&linux-firmware-ch5-sbu;"> +<!ENTITY linux-knl-du "960 - 4250 MB (typically about 1100 MB)"> +<!ENTITY linux-knl-sbu "4.4 - 66.0 SBU (typically about 6 SBU)"> + +<!ENTITY linux-headers-tmp-du "1 GB"> +<!ENTITY linux-headers-tmp-sbu "0.1 SBU"> +<!-- Removed in this book +<!ENTITY linux-headers-fin-du "1 GB"> +<!ENTITY linux-headers-fin-sbu "0.1 SBU">--> <!ENTITY m4-version "1.4.18"> <!ENTITY m4-size "1,180 KB"> <!ENTITY m4-url "&gnu;m4/m4-&m4-version;.tar.xz"> <!ENTITY m4-md5 "730bb15d96fffe47e148d1e09235af82"> <!ENTITY m4-home "&gnu-software;m4/"> -<!ENTITY m4-ch5-du "20 MB"> -<!ENTITY m4-ch5-sbu "0.2 SBU"> -<!ENTITY m4-ch6-du "33 MB"> -<!ENTITY m4-ch6-sbu "0.4 SBU"> +<!ENTITY m4-tmp-du "22 MB"> +<!ENTITY m4-tmp-sbu "0.1 SBU"> +<!ENTITY m4-fin-du "31 MB"> +<!ENTITY m4-fin-sbu "0.4 SBU"> <!ENTITY make-version "4.3"> <!ENTITY make-size "2,263 KB"> <!ENTITY make-url "&gnu;make/make-&make-version;.tar.gz"> <!ENTITY make-md5 "fc7a67ea86ace13195b0bce683fd4469"> <!ENTITY make-home "&gnu-software;make/"> -<!ENTITY make-ch5-du "16 MB"> -<!ENTITY make-ch5-sbu "0.1 SBU"> -<!ENTITY make-ch6-du "16 MB"> -<!ENTITY make-ch6-sbu "0.5 SBU"> +<!ENTITY make-tmp-du "16 MB"> +<!ENTITY make-tmp-sbu "0.1 SBU"> +<!ENTITY make-fin-du "13 MB"> +<!ENTITY make-fin-sbu "0.5 SBU"> -<!ENTITY man-db-version "2.9.1"> -<!ENTITY man-db-size "1,832 KB"> +<!ENTITY man-db-version "2.9.2"> +<!ENTITY man-db-size "1,844 KB"> <!ENTITY man-db-url "&savannah;/releases/man-db/man-db-&man-db-version;.tar.xz"> -<!ENTITY man-db-md5 "593f4f0a26ab4f66f5b81cf6c0c7364c"> +<!ENTITY man-db-md5 "86c7b99ce5969d9b20bf9aeae8d86e0b"> <!ENTITY man-db-home "https://www.nongnu.org/man-db/"> -<!ENTITY man-db-ch6-du "40 MB"> -<!ENTITY man-db-ch6-sbu "0.5 SBU"> +<!ENTITY man-db-fin-du "40 MB"> +<!ENTITY man-db-fin-sbu "0.5 SBU"> -<!ENTITY man-pages-version "5.06"> -<!ENTITY man-pages-size "1,664 KB"> +<!ENTITY man-pages-version "5.07"> +<!ENTITY man-pages-size "1,677 KB"> <!ENTITY man-pages-url "&kernel;linux/docs/man-pages/man-pages-&man-pages-version;.tar.xz"> -<!ENTITY man-pages-md5 "df2054d875c83bbc0bc0cfb8f53f3d43"> +<!ENTITY man-pages-md5 "4423c3e8d8e8224382ff244449c29468"> <!ENTITY man-pages-home "https://www.kernel.org/doc/man-pages/"> -<!ENTITY man-pages-ch6-du "31 MB"> -<!ENTITY man-pages-ch6-sbu "less than 0.1 SBU"> +<!ENTITY man-pages-fin-du "31 MB"> +<!ENTITY man-pages-fin-sbu "less than 0.1 SBU"> -<!ENTITY meson-version "0.54.2"> +<!ENTITY meson-version "0.54.3"> <!ENTITY meson-size "1,652 KB"> <!ENTITY meson-url "&github;/mesonbuild/meson/releases/download/&meson-version;/meson-&meson-version;.tar.gz"> -<!ENTITY meson-md5 "6da6600c230d4124a73ca77ffef69cad"> +<!ENTITY meson-md5 "4ec36e59f182ac6f890585e8baff6fe4"> <!ENTITY meson-home "https://mesonbuild.com"> -<!ENTITY meson-ch6-du "31 MB"> -<!ENTITY meson-ch6-sbu "less than 0.1 SBU"> +<!ENTITY meson-fin-du "33 MB"> +<!ENTITY meson-fin-sbu "less than 0.1 SBU"> <!ENTITY mpc-version "1.1.0"> <!ENTITY mpc-size "685 KB"> <!ENTITY mpc-url "https://ftp.gnu.org/gnu/mpc/mpc-&mpc-version;.tar.gz"> <!ENTITY mpc-md5 "4125404e41e482ec68282a2e687f6c73"> <!ENTITY mpc-home "http://www.multiprecision.org/"> -<!ENTITY mpc-ch6-du "22 MB"> -<!ENTITY mpc-ch6-sbu "0.3 SBU"> +<!ENTITY mpc-fin-du "21 MB"> +<!ENTITY mpc-fin-sbu "0.3 SBU"> <!ENTITY mpfr-version "4.0.2"> <!ENTITY mpfr-size "1,409 KB"> <!ENTITY mpfr-url "http://www.mpfr.org/mpfr-&mpfr-version;/mpfr-&mpfr-version;.tar.xz"> <!ENTITY mpfr-md5 "320fbc4463d4c8cb1e566929d8adc4f8"> <!ENTITY mpfr-home "https://www.mpfr.org/"> -<!ENTITY mpfr-ch6-du "37 MB"> -<!ENTITY mpfr-ch6-sbu "0.8 SBU"> +<!ENTITY mpfr-fin-du "36 MB"> +<!ENTITY mpfr-fin-sbu "0.8 SBU"> <!ENTITY ncurses-version "6.2"> <!ENTITY ncurses-size "3,346 KB"> <!ENTITY ncurses-url "&gnu;ncurses/ncurses-&ncurses-version;.tar.gz"> <!ENTITY ncurses-md5 "e812da327b1c2214ac1aed440ea3ae8d"> <!ENTITY ncurses-home "&gnu-software;ncurses/"> -<!ENTITY ncurses-ch5-du "41 MB"> -<!ENTITY ncurses-ch5-sbu "0.6 SBU"> -<!ENTITY ncurses-ch6-du "43 MB"> -<!ENTITY ncurses-ch6-sbu "0.4 SBU"> +<!ENTITY ncurses-tmp-du "48 MB"> +<!ENTITY ncurses-tmp-sbu "0.7 SBU"> +<!ENTITY ncurses-fin-du "32 MB"> +<!ENTITY ncurses-fin-sbu "0.4 SBU"> <!ENTITY ninja-version "1.10.0"> <!ENTITY ninja-size "206 KB"> <!ENTITY ninja-url "&github;/ninja-build/ninja/archive/v&ninja-version;/ninja-&ninja-version;.tar.gz"> <!ENTITY ninja-md5 "cf1d964113a171da42a8940e7607e71a"> <!ENTITY ninja-home "https://ninja-build.org/"> -<!ENTITY ninja-ch6-du "89 MB"> -<!ENTITY ninja-ch6-sbu "0.3 SBU"> +<!ENTITY ninja-fin-du "78 MB"> +<!ENTITY ninja-fin-sbu "0.3 SBU"> <!ENTITY openssl-version "1.1.1g"> <!ENTITY openssl-size "9,572 KB"> <!ENTITY openssl-url "https://www.openssl.org/source/openssl-&openssl-version;.tar.gz"> <!ENTITY openssl-md5 "76766e98997660138cdaf13a187bd234"> <!ENTITY openssl-home "https://www.openssl.org/"> -<!ENTITY openssl-ch6-du "147 MB"> -<!ENTITY openssl-ch6-sbu "2.2 SBU"> +<!ENTITY openssl-fin-du "150 MB"> +<!ENTITY openssl-fin-sbu "2.1 SBU"> <!ENTITY patch-version "2.7.6"> <!ENTITY patch-size "766 KB"> <!ENTITY patch-url "&gnu;patch/patch-&patch-version;.tar.xz"> <!ENTITY patch-md5 "78ad9937e4caadcba1526ef1853730d5"> <!ENTITY patch-home "https://savannah.gnu.org/projects/patch/"> -<!ENTITY patch-ch5-du "13 MB"> -<!ENTITY patch-ch5-sbu "0.2 SBU"> -<!ENTITY patch-ch6-du "13 MB"> -<!ENTITY patch-ch6-sbu "0.2 SBU"> +<!ENTITY patch-tmp-du "13 MB"> +<!ENTITY patch-tmp-sbu "0.1 SBU"> +<!ENTITY patch-fin-du "12 MB"> +<!ENTITY patch-fin-sbu "0.2 SBU"> -<!ENTITY perl-version "5.30.2"> -<!ENTITY perl-size "12,084 KB"> +<!ENTITY perl-version "5.30.3"> +<!ENTITY perl-size "12,088 KB"> <!ENTITY perl-url "https://www.cpan.org/src/5.0/perl-&perl-version;.tar.xz"> -<!ENTITY perl-md5 "4bfa12b528522a50de0470b8b70b9b3b"> +<!ENTITY perl-md5 "0af2ab0f01ec13e37cc13a27de930936"> <!ENTITY perl-home "https://www.perl.org/"> -<!ENTITY perl-ch5-du "275 MB"> -<!ENTITY perl-ch5-sbu "1.5 SBU"> -<!ENTITY perl-ch6-du "272 MB"> -<!ENTITY perl-ch6-sbu "9.2 SBU"> +<!ENTITY perl-tmp-du "261 MB"> +<!ENTITY perl-tmp-sbu "1.5 SBU"> +<!ENTITY perl-fin-du "240 MB"> +<!ENTITY perl-fin-sbu "8.5 SBU"> <!ENTITY pkgconfig-version "0.29.2"> <!ENTITY pkgconfig-size "1,970 KB"> <!ENTITY pkgconfig-url "https://pkg-config.freedesktop.org/releases/pkg-config-&pkgconfig-version;.tar.gz"> <!ENTITY pkgconfig-md5 "f6e931e319531b736fadc017f470e68a"> <!ENTITY pkgconfig-home "https://www.freedesktop.org/wiki/Software/pkg-config"> -<!ENTITY pkgconfig-ch6-du "30 MB"> -<!ENTITY pkgconfig-ch6-sbu "0.3 SBU"> +<!ENTITY pkgconfig-fin-du "30 MB"> +<!ENTITY pkgconfig-fin-sbu "0.4 SBU"> <!ENTITY procps-ng-version "3.3.16"> <!ENTITY procps-ng-size "840 KB"> <!ENTITY procps-ng-url "https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-&procps-ng-version;.tar.xz"> <!ENTITY procps-ng-md5 "e8dc8455e573bdc40b8381d572bbb89b"> <!ENTITY procps-ng-home "https://sourceforge.net/projects/procps-ng"> -<!ENTITY procps-ng-ch6-du "17 MB"> -<!ENTITY procps-ng-ch6-sbu "0.1 SBU"> +<!ENTITY procps-ng-fin-du "16 MB"> +<!ENTITY procps-ng-fin-sbu "0.1 SBU"> <!ENTITY psmisc-version "23.3"> <!ENTITY psmisc-size "305 KB"> <!ENTITY psmisc-url "https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-&psmisc-version;.tar.xz"> <!ENTITY psmisc-md5 "573bf80e6b0de86e7f307e310098cf86"> <!ENTITY psmisc-home "http://psmisc.sourceforge.net/"> -<!ENTITY psmisc-ch6-du "4.6 MB"> -<!ENTITY psmisc-ch6-sbu "less than 0.1 SBU"> +<!ENTITY psmisc-fin-du "4.7 MB"> +<!ENTITY psmisc-fin-sbu "less than 0.1 SBU"> <!-- If python minor version changes, updates in python and meson pages will be needed: python3.6 and python3.6m --> @@ -600,10 +604,10 @@ <!ENTITY python-url "https://www.python.org/ftp/python/&python-version;/Python-&python-version;.tar.xz"> <!ENTITY python-md5 "3000cf50aaa413052aef82fd2122ca78"> <!ENTITY python-home "https://www.python.org/"> -<!ENTITY python-ch5-du "409 MB"> -<!ENTITY python-ch5-sbu "1.3 SBU"> -<!ENTITY python-ch6-du "426 MB"> -<!ENTITY python-ch6-sbu "1.2 SBU"> +<!ENTITY python-tmp-du "397 MB"> +<!ENTITY python-tmp-sbu "1.2 SBU"> +<!ENTITY python-fin-du "246 MB"> +<!ENTITY python-fin-sbu "1.2 SBU"> <!ENTITY python-docs-url "https://www.python.org/ftp/python/doc/&python-version;/python-&python-version;-docs-html.tar.bz2"> <!ENTITY python-docs-md5 "2568df23eb5ad90aabab4b1e84b99fd9"> <!ENTITY python-docs-size "6,404 KB"> @@ -613,34 +617,34 @@ <!ENTITY readline-url "&gnu;readline/readline-&readline-version;.tar.gz"> <!ENTITY readline-md5 "7e6c1f16aee3244a69aba6e438295ca3"> <!ENTITY readline-home "https://tiswww.case.edu/php/chet/readline/rltop.html"> -<!ENTITY readline-ch6-du "15 MB"> -<!ENTITY readline-ch6-sbu "0.1 SBU"> +<!ENTITY readline-fin-du "15 MB"> +<!ENTITY readline-fin-sbu "0.1 SBU"> <!ENTITY sed-version "4.8"> <!ENTITY sed-size "1,317 KB"> <!ENTITY sed-url "&gnu;sed/sed-&sed-version;.tar.xz"> <!ENTITY sed-md5 "6d906edfdb3202304059233f51f9a71d"> <!ENTITY sed-home "&gnu-software;sed/"> -<!ENTITY sed-ch5-du "21 MB"> -<!ENTITY sed-ch5-sbu "0.2 SBU"> -<!ENTITY sed-ch6-du "34 MB"> -<!ENTITY sed-ch6-sbu "0.4 SBU"> +<!ENTITY sed-tmp-du "21 MB"> +<!ENTITY sed-tmp-sbu "0.1 SBU"> +<!ENTITY sed-fin-du "32 MB"> +<!ENTITY sed-fin-sbu "0.5 SBU"> <!ENTITY shadow-version "4.8.1"> <!ENTITY shadow-size "1,574 KB"> <!ENTITY shadow-url "&github;/shadow-maint/shadow/releases/download/&shadow-version;/shadow-&shadow-version;.tar.xz"> <!ENTITY shadow-md5 "4b05eff8a427cf50e615bda324b5bc45"> <!ENTITY shadow-home "https://pkg-shadow.alioth.debian.org/"> -<!ENTITY shadow-ch6-du "46 MB"> -<!ENTITY shadow-ch6-sbu "0.2 SBU"> +<!ENTITY shadow-fin-du "45 MB"> +<!ENTITY shadow-fin-sbu "0.2 SBU"> <!ENTITY sysklogd-version "1.5.1"> <!ENTITY sysklogd-size "88 KB"> <!ENTITY sysklogd-url "http://www.infodrom.org/projects/sysklogd/download/sysklogd-&sysklogd-version;.tar.gz"> <!ENTITY sysklogd-md5 "c70599ab0d037fde724f7210c2c8d7f8"> <!ENTITY sysklogd-home "http://www.infodrom.org/projects/sysklogd/"> -<!ENTITY sysklogd-ch6-du "0.6 MB"> -<!ENTITY sysklogd-ch6-sbu "less than 0.1 SBU"> +<!ENTITY sysklogd-fin-du "0.6 MB"> +<!ENTITY sysklogd-fin-sbu "less than 0.1 SBU"> <!ENTITY systemd-version "245"> <!--<!ENTITY systemd-stable "6b4878d">--> @@ -655,26 +659,26 @@ <!--<!ENTITY systemd-man-url "&anduin-sources;/systemd-man-pages-&systemd-version;-&systemd-stable;.tar.xz">--> <!ENTITY systemd-man-url "&anduin-sources;/systemd-man-pages-&systemd-version;.tar.xz"> <!ENTITY systemd-man-md5 "ecf8cc4baa33b91ad4212d28e88f8edd"> -<!ENTITY systemd-ch6-du "176 MB"> -<!ENTITY systemd-ch6-sbu "1.9 SBU"> +<!ENTITY systemd-fin-du "249 MB"> +<!ENTITY systemd-fin-sbu "1.9 SBU"> <!ENTITY sysvinit-version "2.96"> <!ENTITY sysvinit-size "120 KB"> <!ENTITY sysvinit-url "&savannah;/releases/sysvinit/sysvinit-&sysvinit-version;.tar.xz"> <!ENTITY sysvinit-md5 "48cebffebf2a96ab09bec14bf9976016"> <!ENTITY sysvinit-home "https://savannah.nongnu.org/projects/sysvinit"> -<!ENTITY sysvinit-ch6-du "1.4 MB"> -<!ENTITY sysvinit-ch6-sbu "less than 0.1 SBU"> +<!ENTITY sysvinit-fin-du "1.4 MB"> +<!ENTITY sysvinit-fin-sbu "less than 0.1 SBU"> <!ENTITY tar-version "1.32"> <!ENTITY tar-size "2,055 KB"> <!ENTITY tar-url "&gnu;tar/tar-&tar-version;.tar.xz"> <!ENTITY tar-md5 "83e38700a80a26e30b2df054e69956e5"> <!ENTITY tar-home "&gnu-software;tar/"> -<!ENTITY tar-ch5-du "38 MB"> -<!ENTITY tar-ch5-sbu "0.3 SBU"> -<!ENTITY tar-ch6-du "45 MB"> -<!ENTITY tar-ch6-sbu "2.0 SBU"> +<!ENTITY tar-tmp-du "39 MB"> +<!ENTITY tar-tmp-sbu "0.2 SBU"> +<!ENTITY tar-fin-du "39 MB"> +<!ENTITY tar-fin-sbu "2.5 SBU"> <!ENTITY tcl-version "8.6.10"> <!ENTITY tcl-major-version "8.6"> @@ -682,18 +686,21 @@ <!ENTITY tcl-url "https://downloads.sourceforge.net/tcl/tcl&tcl-version;-src.tar.gz"> <!ENTITY tcl-md5 "97c55573f8520bcab74e21bfd8d0aadc"> <!ENTITY tcl-home "http://tcl.sourceforge.net/"> -<!ENTITY tcl-ch5-du "72 MB"> -<!ENTITY tcl-ch5-sbu "0.9 SBU"> +<!ENTITY tcl-docs-url "https://downloads.sourceforge.net/tcl/tcl&tcl-version;-html.tar.gz"> +<!ENTITY tcl-docs-md5 "a012711241ba3a5bd4a04e833001d489"> +<!ENTITY tcl-docs-size "1,171 KB"> +<!ENTITY tcl-tmp-du "76 MB"> +<!ENTITY tcl-tmp-sbu "0.9 SBU"> <!ENTITY texinfo-version "6.7"> <!ENTITY texinfo-size "4,237 KB"> <!ENTITY texinfo-url "&gnu;texinfo/texinfo-&texinfo-version;.tar.xz"> <!ENTITY texinfo-md5 "d4c5d8cc84438c5993ec5163a59522a6"> <!ENTITY texinfo-home "&gnu-software;texinfo/"> -<!ENTITY texinfo-ch5-du "104 MB"> -<!ENTITY texinfo-ch5-sbu "0.2 SBU"> -<!ENTITY texinfo-ch6-du "116 MB"> -<!ENTITY texinfo-ch6-sbu "0.7 SBU"> +<!ENTITY texinfo-tmp-du "105 MB"> +<!ENTITY texinfo-tmp-sbu "0.3 SBU"> +<!ENTITY texinfo-fin-du "104 MB"> +<!ENTITY texinfo-fin-sbu "0.7 SBU"> <!ENTITY tzdata-version "2020a"> <!ENTITY tzdata-size "388 KB"> @@ -713,10 +720,10 @@ <!ENTITY util-linux-url "&kernel;linux/utils/util-linux/v&util-linux-minor;/util-linux-&util-linux-version;.tar.xz"> <!ENTITY util-linux-md5 "248a4d0810c9193e0e9a4bb3f26b93d8"> <!ENTITY util-linux-home "http://freecode.com/projects/util-linux"> -<!ENTITY util-linux-ch5-du "154 MB"> -<!ENTITY util-linux-ch5-sbu "0.9 SBU"> -<!ENTITY util-linux-ch6-du "289 MB"> -<!ENTITY util-linux-ch6-sbu "1.1 SBU"> +<!ENTITY util-linux-tmp-du "129 MB"> +<!ENTITY util-linux-tmp-sbu "0.7 SBU"> +<!ENTITY util-linux-fin-du "254 MB"> +<!ENTITY util-linux-fin-sbu "1.3 SBU"> <!ENTITY vim-version "8.2.0814"> <!ENTITY vim-majmin "82"> @@ -726,40 +733,40 @@ <!ENTITY vim-url "&anduin-sources;/vim-&vim-version;.tar.gz"> <!ENTITY vim-md5 "02b8b91bd2a9a97879fc60616f4eb767"> <!ENTITY vim-home "https://www.vim.org"> -<!ENTITY vim-ch6-du "202 MB"> -<!ENTITY vim-ch6-sbu "1.7 SBU"> +<!ENTITY vim-fin-du "198 MB"> +<!ENTITY vim-fin-sbu "3.0 SBU"> <!ENTITY xml-parser-version "2.46"> <!ENTITY xml-parser-size "249 KB"> <!ENTITY xml-parser-url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-&xml-parser-version;.tar.gz"> <!ENTITY xml-parser-md5 "80bb18a8e6240fcf7ec2f7b57601c170"> <!ENTITY xml-parser-home "&github;/chorny/XML-Parser"> -<!ENTITY xml-parser-ch6-du "2.4 MB"> -<!ENTITY xml-parser-ch6-sbu "less than 0.1 SBU"> +<!ENTITY xml-parser-fin-du "2.4 MB"> +<!ENTITY xml-parser-fin-sbu "less than 0.1 SBU"> <!ENTITY xz-version "5.2.5"> <!ENTITY xz-size "1,122 KB"> <!ENTITY xz-url "https://tukaani.org/xz/xz-&xz-version;.tar.xz"> <!ENTITY xz-md5 "aa1621ec7013a19abab52a8aff04fe5b"> <!ENTITY xz-home "https://tukaani.org/xz"> -<!ENTITY xz-ch5-du "18 MB"> -<!ENTITY xz-ch5-sbu "0.2 SBU"> -<!ENTITY xz-ch6-du "16 MB"> -<!ENTITY xz-ch6-sbu "0.2 SBU"> +<!ENTITY xz-tmp-du "16 MB"> +<!ENTITY xz-tmp-sbu "0.1 SBU"> +<!ENTITY xz-fin-du "15 MB"> +<!ENTITY xz-fin-sbu "0.2 SBU"> <!ENTITY zlib-version "1.2.11"> <!ENTITY zlib-size "457 KB"> <!ENTITY zlib-url "https://zlib.net/zlib-&zlib-version;.tar.xz"> <!ENTITY zlib-md5 "85adef240c5f370b308da8c938951a68"> <!ENTITY zlib-home "https://www.zlib.net/"> -<!ENTITY zlib-ch6-du "5.1 MB"> -<!ENTITY zlib-ch6-sbu "less than 0.1 SBU"> +<!ENTITY zlib-fin-du "5.1 MB"> +<!ENTITY zlib-fin-sbu "less than 0.1 SBU"> <!ENTITY zstd-version "1.4.5"> <!ENTITY zstd-size "1,928 KB"> <!ENTITY zstd-url "https://github.com/facebook/zstd/releases/download/v&zstd-version;/zstd-&zstd-version;.tar.gz"> <!ENTITY zstd-md5 "dd0b53631303b8f972dafa6fd34beb0c"> <!ENTITY zstd-home "https://facebook.github.io/zstd/"> -<!ENTITY zstd-ch6-du "16 MB"> -<!ENTITY zstd-ch6-sbu "0.7 SBU"> +<!ENTITY zstd-fin-du "16 MB"> +<!ENTITY zstd-fin-sbu "0.6 SBU"> diff --git a/chapter05/generalinstructions.xml b/part3intro/generalinstructions.xml index bf1ec6112..a441b17ef 100644 --- a/chapter05/generalinstructions.xml +++ b/part3intro/generalinstructions.xml @@ -5,7 +5,8 @@ %general-entities; ]> -<sect1 id="ch-tools-generalinstructions"> +<sect1 id="ch-tools-generalinstructions" + xreflabel="General Compilation Instructions"> <?dbhtml filename="generalinstructions.html"?> <title>General Compilation Instructions</title> @@ -18,7 +19,7 @@ <listitem> <para>Several of the packages are patched before compilation, but only when the patch is needed to circumvent a problem. A patch is often needed in - both this and the next chapter, but sometimes in only one or the other. + both this and the following chapters, but sometimes in only one location. Therefore, do not be concerned if instructions for a downloaded patch seem to be missing. Warning messages about <emphasis>offset</emphasis> or <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do @@ -81,9 +82,9 @@ <listitem> <para>Place all the sources and patches in a directory that will be accessible from the chroot environment such as - <filename class="directory">/mnt/lfs/sources/</filename>. Do + <filename class="directory">/mnt/lfs/sources/</filename>.<!-- Do <emphasis>not</emphasis> put sources in - <filename class="directory">/mnt/lfs/tools/</filename>.</para> + <filename class="directory">/mnt/lfs/tools/</filename>. --></para> </listitem> <listitem> <para>Change to the sources directory.</para> @@ -93,8 +94,9 @@ <orderedlist numeration="loweralpha" spacing="compact"> <listitem> <para>Using the <command>tar</command> program, extract the package - to be built. In Chapter 5, ensure you are the <emphasis>lfs</emphasis> - user when extracting the package.</para> + to be built. In <xref linkend="chapter-cross-tools"/> and + <xref linkend="chapter-temporary-tools"/>, ensure you are + the <emphasis>lfs</emphasis> user when extracting the package.</para> </listitem> <listitem> <para>Change to the directory created when the package was diff --git a/part3intro/introduction.xml b/part3intro/introduction.xml new file mode 100644 index 000000000..6d30ffe49 --- /dev/null +++ b/part3intro/introduction.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-part3intro-intro"> + <?dbhtml filename="introduction.html"?> + + <title>Introduction</title> + + <para>This part is divided into three stages: first building a cross + compiler and its associated libraries; second, use this cross toolchain + to build several utilities in a way that isolates them from the host + distribution; third, enter the chroot environment, which further improves + host isolation, and build the remaining tools needed to build the final + system.</para> + + <important><para>With this part begins the real work of building a new + system. It requires much care in ensuring that the instructions are + followed exactly as the book shows them. You should try to understand + what they do, and whatever your eagerness to finish your build, you should + refrain from blindly type them as shown, but rather read documentation when + there is something you do not understand. Also, keep track of your typing + and of the output of commands, by sending them to a file, using the + <command>tee</command> utility. This allows for better diagnosing + if something gets wrong.</para></important> + + <para>The next section gives a technical introduction to the build process, + while the following one contains <emphasis role="strong">very + important</emphasis> general instructions.</para> + +</sect1> diff --git a/part3intro/part3intro.xml b/part3intro/part3intro.xml new file mode 100644 index 000000000..a4d8eecda --- /dev/null +++ b/part3intro/part3intro.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<preface id="partintro-cross-temp"> + <?dbhtml dir="partintro"?> + <?dbhtml filename="partintro.html"?> + + <title>Important Preliminary Material</title> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="toolchaintechnotes.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="generalinstructions.xml"/> + +</preface> diff --git a/part3intro/toolchaintechnotes.xml b/part3intro/toolchaintechnotes.xml new file mode 100644 index 000000000..42dc19ac2 --- /dev/null +++ b/part3intro/toolchaintechnotes.xml @@ -0,0 +1,340 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-toolchaintechnotes" xreflabel="Toolchain Technical Notes"> + <?dbhtml filename="toolchaintechnotes.html"?> + + <title>Toolchain Technical Notes</title> + + <para>This section explains some of the rationale and technical details + behind the overall build method. It is not essential to immediately + understand everything in this section. Most of this information will be + clearer after performing an actual build. This section can be referred + to at any time during the process.</para> + + <para>The overall goal of <xref linkend="chapter-cross-tools"/> and <xref + linkend="chapter-temporary-tools"/> is to produce a temporary area that + contains a known-good set of tools that can be isolated from the host system. + By using <command>chroot</command>, the commands in the remaining chapters + will be contained within that environment, ensuring a clean, trouble-free + build of the target LFS system. The build process has been designed to + minimize the risks for new readers and to provide the most educational value + at the same time.</para> + + <para>The build process is based on the process of + <emphasis>cross-compilation</emphasis>. Cross-compilation is normally used + for building a compiler and its toolchain for a machine different from + the one that is used for the build. This is not strictly needed for LFS, + since the machine where the new system will run is the same as the one + used for the build. But cross-compilation has the great advantage that + anything that is cross-compiled cannot depend on the host environment.</para> + + <sect2 id="cross-compile" xreflabel="About Cross-Compilation"> + + <title>About Cross-Compilation</title> + + <para>Cross-compilation involves some concepts that deserve a section on + their own. Although this section may be omitted in a first reading, it + is strongly suggested to come back to it later in order to get a full + grasp of the build process.</para> + + <para>Let us first define some terms used in this context:</para> + + <variablelist> + <varlistentry><term>build</term><listitem> + <para>is the machine where we build programs. Note that this machine + is referred to as the <quote>host</quote> in other + sections.</para></listitem> + </varlistentry> + + <varlistentry><term>host</term><listitem> + <para>is the machine/system where the built programs will run. Note + that this use of <quote>host</quote> is not the same as in other + sections.</para></listitem> + </varlistentry> + + <varlistentry><term>target</term><listitem> + <para>is only used for compilers. It is the machine the compiler + produces code for. It may be different from both build and + host.</para></listitem> + </varlistentry> + + </variablelist> + + <para>As an example, let us imagine the following scenario (sometimes + referred to as <quote>Canadian Cross</quote>): we may have a + compiler on a slow machine only, let's call the machine A, and the compiler + ccA. We may have also a fast machine (B), but with no compiler, and we may + want to produce code for another slow machine (C). To build a + compiler for machine C, we would have three stages:</para> + + <informaltable align="center"> + <tgroup cols="5"> + <colspec colnum="1" align="center"/> + <colspec colnum="2" align="center"/> + <colspec colnum="3" align="center"/> + <colspec colnum="4" align="center"/> + <colspec colnum="5" align="left"/> + <thead> + <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> + <entry>Target</entry><entry>Action</entry></row> + </thead> + <tbody> + <row> + <entry>1</entry><entry>A</entry><entry>A</entry><entry>B</entry> + <entry>build cross-compiler cc1 using ccA on machine A</entry> + </row> + <row> + <entry>2</entry><entry>A</entry><entry>B</entry><entry>C</entry> + <entry>build cross-compiler cc2 using cc1 on machine A</entry> + </row> + <row> + <entry>3</entry><entry>B</entry><entry>C</entry><entry>C</entry> + <entry>build compiler ccC using cc2 on machine B</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>Then, all the other programs needed by machine C can be compiled + using cc2 on the fast machine B. Note that unless B can run programs + produced for C, there is no way to test the built programs until machine + C itself is running. For example, for testing ccC, we may want to add a + fourth stage:</para> + + <informaltable align="center"> + <tgroup cols="5"> + <colspec colnum="1" align="center"/> + <colspec colnum="2" align="center"/> + <colspec colnum="3" align="center"/> + <colspec colnum="4" align="center"/> + <colspec colnum="5" align="left"/> + <thead> + <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> + <entry>Target</entry><entry>Action</entry></row> + </thead> + <tbody> + <row> + <entry>4</entry><entry>C</entry><entry>C</entry><entry>C</entry> + <entry>rebuild and test ccC using itself on machine C</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>In the example above, only cc1 and cc2 are cross-compilers, that is, + they produce code for a machine different from the one they are run on. + The other compilers ccA and ccC produce code for the machine they are run + on. Such compilers are called <emphasis>native</emphasis> compilers.</para> + + </sect2> + + <sect2 id="lfs-cross"> + <title>Implementation of Cross-Compilation for LFS</title> + + <note> + <para>Almost all the build systems use names of the form + cpu-vendor-kernel-os referred to as the machine triplet. An astute + reader may wonder why a <quote>triplet</quote> refers to a four component + name. The reason is history: initially, three component names were enough + to designate unambiguously a machine, but with new machines and systems + appearing, that proved insufficient. The word <quote>triplet</quote> + remained. A simple way to determine your machine triplet is to run + the <command>config.guess</command> + script that comes with the source for many packages. Unpack the binutils + sources and run the script: <userinput>./config.guess</userinput> and note + the output. For example, for a 32-bit Intel processor the + output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit + system it will be <emphasis>x86_64-pc-linux-gnu</emphasis>.</para> + + <para>Also be aware of the name of the platform's dynamic linker, often + referred to as the dynamic loader (not to be confused with the standard + linker <command>ld</command> that is part of binutils). The dynamic linker + provided by Glibc finds and loads the shared libraries needed by a + program, prepares the program to run, and then runs it. The name of the + dynamic linker for a 32-bit Intel machine will be <filename + class="libraryfile">ld-linux.so.2</filename> (<filename + class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems). A + sure-fire way to determine the name of the dynamic linker is to inspect a + random binary from the host system by running: <userinput>readelf -l + <name of binary> | grep interpreter</userinput> and noting the + output. The authoritative reference covering all platforms is in the + <filename>shlib-versions</filename> file in the root of the Glibc source + tree.</para> + </note> + + <para>In order to fake a cross compilation, the name of the host triplet + is slightly adjusted by changing the "vendor" field in the + <envar>LFS_TGT</envar> variable. We also use the + <parameter>--with-sysroot</parameter> option when building the cross linker and + cross compiler to tell them where to find the needed host files. This + ensures that none of the other programs built in <xref + linkend="chapter-temporary-tools"/> can link to libraries on the build + machine. Only two stages are mandatory, and one more for tests:</para> + + <informaltable align="center"> + <tgroup cols="5"> + <colspec colnum="1" align="center"/> + <colspec colnum="2" align="center"/> + <colspec colnum="3" align="center"/> + <colspec colnum="4" align="center"/> + <colspec colnum="5" align="left"/> + <thead> + <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> + <entry>Target</entry><entry>Action</entry></row> + </thead> + <tbody> + <row> + <entry>1</entry><entry>pc</entry><entry>pc</entry><entry>lfs</entry> + <entry>build cross-compiler cc1 using cc-pc on pc</entry> + </row> + <row> + <entry>2</entry><entry>pc</entry><entry>lfs</entry><entry>lfs</entry> + <entry>build compiler cc-lfs using cc1 on pc</entry> + </row> + <row> + <entry>3</entry><entry>lfs</entry><entry>lfs</entry><entry>lfs</entry> + <entry>rebuild and test cc-lfs using itself on lfs</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>In the above table, <quote>on pc</quote> means the commands are run + on a machine using the already installed distribution. <quote>On + lfs</quote> means the commands are run in a chrooted environment.</para> + + <para>Now, there is more about cross-compiling: the C language is not + just a compiler, but also defines a standard library. In this book, the + GNU C library, named glibc, is used. This library must + be compiled for the lfs machine, that is, using the cross compiler cc1. + But the compiler itself uses an internal library implementing complex + instructions not available in the assembler instruction set. This + internal library is named libgcc, and must be linked to the glibc + library to be fully functional! Furthermore, the standard library for + C++ (libstdc++) also needs being linked to glibc. The solution to this + chicken and egg problem is to first build a degraded cc1 based libgcc, + lacking some functionalities such as threads and exception handling, then + build glibc using this degraded compiler (glibc itself is not + degraded), then build libstdc++. But this last library will lack the + same functionalities as libgcc.</para> + + <para>This is not the end of the story: the conclusion of the preceding + paragraph is that cc1 is unable to build a fully functional libstdc++, but + this is the only compiler available for building the C/C++ libraries + during stage 2! Of course, the compiler built during stage 2, cc-lfs, + would be able to build those libraries, but (1) the build system of + GCC does not know that it is usable on pc, and (2) using it on pc + would be at risk of linking to the pc libraries, since cc-lfs is a native + compiler. So we have to build libstdc++ later, in chroot.</para> + + </sect2> + + <sect2 id="other-details"> + + <title>Other procedural details</title> + + <para>The cross-compiler will be installed in a separate <filename + class="directory">$LFS/tools</filename> directory, since it will not + be part of the final system.</para> + + <para>Binutils is installed first because the <command>configure</command> + runs of both GCC and Glibc perform various feature tests on the assembler + and linker to determine which software features to enable or disable. This + is more important than one might first realize. An incorrectly configured + GCC or Glibc can result in a subtly broken toolchain, where the impact of + such breakage might not show up until near the end of the build of an + entire distribution. A test suite failure will usually highlight this error + before too much additional work is performed.</para> + + <para>Binutils installs its assembler and linker in two locations, + <filename class="directory">$LFS/tools/bin</filename> and <filename + class="directory">$LFS/tools/$LFS_TGT/bin</filename>. The tools in one + location are hard linked to the other. An important facet of the linker is + its library search order. Detailed information can be obtained from + <command>ld</command> by passing it the <parameter>--verbose</parameter> + flag. For example, <command>$LFS_TGT-ld --verbose | grep SEARCH</command> + will illustrate the current search paths and their order. It shows which + files are linked by <command>ld</command> by compiling a dummy program and + passing the <parameter>--verbose</parameter> switch to the linker. For + example, + <command>$LFS_TGT-gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</command> + will show all the files successfully opened during the linking.</para> + + <para>The next package installed is GCC. An example of what can be + seen during its run of <command>configure</command> is:</para> + +<screen><computeroutput>checking what assembler to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as +checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld</computeroutput></screen> + + <para>This is important for the reasons mentioned above. It also + demonstrates that GCC's configure script does not search the PATH + directories to find which tools to use. However, during the actual + operation of <command>gcc</command> itself, the same search paths are not + necessarily used. To find out which standard linker <command>gcc</command> + will use, run: <command>$LFS_TGT-gcc -print-prog-name=ld</command>.</para> + + <para>Detailed information can be obtained from <command>gcc</command> by + passing it the <parameter>-v</parameter> command line option while compiling + a dummy program. For example, <command>gcc -v dummy.c</command> will show + detailed information about the preprocessor, compilation, and assembly + stages, including <command>gcc</command>'s included search paths and their + order.</para> + + <para>Next installed are sanitized Linux API headers. These allow the + standard C library (Glibc) to interface with features that the Linux + kernel will provide.</para> + + <para>The next package installed is Glibc. The most important + considerations for building Glibc are the compiler, binary tools, and + kernel headers. The compiler is generally not an issue since Glibc will + always use the compiler relating to the <parameter>--host</parameter> + parameter passed to its configure script; e.g. in our case, the compiler + will be <command>$LFS_TGT-gcc</command>. The binary tools and kernel + headers can be a bit more complicated. Therefore, take no risks and use + the available configure switches to enforce the correct selections. After + the run of <command>configure</command>, check the contents of the + <filename>config.make</filename> file in the <filename + class="directory">build</filename> directory for all important details. + Note the use of <parameter>CC="$LFS_TGT-gcc"</parameter> (with + <envar>$LFS_TGT</envar> expanded) to control which binary tools are used + and the use of the <parameter>-nostdinc</parameter> and + <parameter>-isystem</parameter> flags to control the compiler's include + search path. These items highlight an important aspect of the Glibc + package—it is very self-sufficient in terms of its build machinery + and generally does not rely on toolchain defaults.</para> + + <para>As said above, the standard C++ library is compiled next, followed in + <xref linkend="chapter-temporary-tools"/> by all the programs that need + themselves to be built. The install step of all those packages uses the + <envar>DESTDIR</envar> variable to have the + programs land into the LFS filesystem.</para> + + <para>At the end of <xref linkend="chapter-temporary-tools"/> the native + lfs compiler is installed. First binutils-pass2 is built, + with the same <envar>DESTDIR</envar> install as the other programs, + then the second pass of GCC is constructed, omitting libstdc++ + and other non-important libraries. Due to some weird logic in GCC's + configure script, <envar>CC_FOR_TARGET</envar> ends up as + <command>cc</command> when the host is the same as the target, but is + different from the build system. This is why + <parameter>CC_FOR_TARGET=$LFS_TGT-gcc</parameter> is put explicitely into + the configure options.</para> + + <para>Upon entering the chroot environment in <xref + linkend="chapter-chroot-temporary-tools"/>, the first task is to install + libstdc++. Then temporary installations of programs needed for the proper + operation of the toolchain are performed. Programs needed for testing + other programs are also built. From this point onwards, the + core toolchain is self-contained and self-hosted. In + <xref linkend="chapter-building-system"/>, final versions of all the + packages needed for a fully functional system are built, tested and + installed.</para> + + </sect2> + +</sect1> diff --git a/patches.ent b/patches.ent index 9ec504dce..f07cb22c0 100644 --- a/patches.ent +++ b/patches.ent @@ -24,6 +24,10 @@ <!ENTITY flex-fixes-patch-size "3.4 KB"> --> +<!ENTITY gcc-cross-patch "gcc-&gcc-version;-cet_fix-1.patch"> +<!ENTITY gcc-cross-patch-md5 "f37d8a6b4c943a6f8eaf541923fed838"> +<!ENTITY gcc-cross-patch-size "4.3 KB"> + <!ENTITY glibc-fhs-patch "glibc-&glibc-version;-fhs-1.patch"> <!ENTITY glibc-fhs-patch-md5 "9a5997c3452909b1769918c759eff8a2"> <!ENTITY glibc-fhs-patch-size "2.8 KB"> @@ -52,3 +56,7 @@ <!ENTITY systemd-consolidated-patch-md5 "2bad2992f4373eb925885f2ea2fb8d14"> <!ENTITY systemd-consolidated-patch-size "64 KB"> --> + +<!ENTITY systemd-gcc10-patch "systemd-&systemd-version;-gcc_10-fixes-2.patch"> +<!ENTITY systemd-gcc10-patch-md5 "5eaac1d3a66118c40814d3b81ad36b71"> +<!ENTITY systemd-gcc10-patch-size "8 KB"> diff --git a/prologue/architecture.xml b/prologue/architecture.xml index f23d19cab..9916840f5 100644 --- a/prologue/architecture.xml +++ b/prologue/architecture.xml @@ -32,7 +32,7 @@ using 4 cores, the following statistics were measured:</para> <para>As you can see, on the same hardware, the 64-bit build is only 3% faster and is 22% larger than the 32-bit build. If you plan to use LFS as a LAMP server, or a firewall, a 32-bit CPU may be largely sufficient. On the other -hand, several packages in BLFS now need more that 4GB of RAM to be built +hand, several packages in BLFS now need more than 4GB of RAM to be built and/or to run, so that if you plan to use LFS as a desktop, the LFS authors recommend building on a 64-bit system.</para> diff --git a/prologue/organization.xml b/prologue/organization.xml index 4be1ef81c..c2c82b63c 100644 --- a/prologue/organization.xml +++ b/prologue/organization.xml @@ -29,9 +29,16 @@ </sect2> <sect2> - <title>Part III - Building the LFS System</title> + <title>Part III - Building the LFS Cross Toolchain and Temporary Tools</title> - <para>Part III guides the reader through the building of the LFS + <para>Part III provides instructions for building the tools + needed for constructing the final LFS system.</para> + </sect2> + + <sect2> + <title>Part IV - Building the LFS System</title> + + <para>Part IV guides the reader through the building of the LFS system—compiling and installing all the packages one by one, setting up the boot scripts, and installing the kernel. The resulting Linux system is the foundation on which other software can be built to @@ -40,4 +47,14 @@ important files that have been installed.</para> </sect2> + <sect2> + <title>Part V - Appendices</title> + + <para>Part V provides information about the book itself including + acronyms and terms, acknowledgments, package dependencies, + a listing of LFS boot scripts, licenses for the distribution of the + book, and a comprehensive index of packages, programs, libraries, + and scripts.</para> + </sect2> + </sect1> diff --git a/prologue/typography.xml b/prologue/typography.xml index 86cbfc6b1..e4c7b5c78 100644 --- a/prologue/typography.xml +++ b/prologue/typography.xml @@ -80,8 +80,8 @@ EOF</userinput></screen> <command>man passwd</command> will print the first man page it finds that matches <quote>passwd</quote>, which will be <filename>/usr/share/man/man1/passwd.1</filename>. For this example, you will - need to run <command>man 5 passwd</command> in order to read the specific page - being referred to. It should be noted that most man pages do not have duplicate + need to run <command>man 5 passwd</command> in order to read the page + being specified. Note that most man pages do not have duplicate page names in different sections. Therefore, <command>man <replaceable><program name></replaceable></command> is generally sufficient.</para> diff --git a/prologue/why.xml b/prologue/why.xml index 4b1b263e1..e2b9a55a1 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -118,8 +118,7 @@ <listitem> <para>DejaGNU</para> - <para>This package contains a framework for testing other programs. - It is only installed in the temporary toolchain.</para> + <para>This package contains a framework for testing other programs.</para> </listitem> <listitem> @@ -141,8 +140,9 @@ <listitem revision="sysv"> <para>Eudev</para> - <para>This package is a device manager. It dynamically controls the entries - in the /dev directory as devices are added or removed from the system. + <para>This package is a device manager. It dynamically controls the ownership, + permissions, names, and symbolic links of devices in the /dev directory as + devices are added or removed from the system. </para> </listitem> @@ -166,7 +166,7 @@ <para>File</para> <para>This package contains a utility for determining the type of a - given file or files. A few packages need it to build.</para> + given file or files. A few packages need it in their build scripts.</para> </listitem> <listitem> @@ -194,7 +194,7 @@ </listitem> <listitem> - <para>Gcc</para> + <para>GCC</para> <para>This package is the Gnu Compiler Collection. It contains the C and C++ compilers as well as several others not built by LFS. @@ -218,7 +218,7 @@ <listitem> <para>Glibc</para> - <para>This package contains the main C library. Linux programs would + <para>This package contains the main C library. Linux programs will not run without it.</para> </listitem> @@ -226,7 +226,7 @@ <para>GMP</para> <para>This package contains math libraries that provide useful functions - for arbitrary precision arithmetic. It is required to build Gcc.</para> + for arbitrary precision arithmetic. It is required to build GCC.</para> </listitem> <listitem> @@ -416,14 +416,14 @@ <para>MPC</para> <para>This package contains functions for the arithmetic of complex - numbers. It is required by Gcc.</para> + numbers. It is required by GCC.</para> </listitem> <listitem> <para>MPFR</para> <para>This package contains functions for multiple precision - arithmetic. It is required by Gcc.</para> + arithmetic. It is required by GCC.</para> </listitem> <listitem> @@ -472,7 +472,7 @@ <listitem> <para>Pkg-config</para> - <para>This package provides a program to return meta-data about an + <para>This package provides a program that returns meta-data about an installed library or package.</para> </listitem> @@ -558,8 +558,7 @@ <para>Tcl</para> <para>This package contains the Tool Command Language used - in many test suites in LFS packages. It is only installed in - the temporary toolchain.</para> + in many test suites in LFS packages.</para> </listitem> <listitem> diff --git a/stylesheets/lfs-xsl/lfs.css b/stylesheets/lfs-xsl/lfs.css index e57f424c6..63a118c1b 100644 --- a/stylesheets/lfs-xsl/lfs.css +++ b/stylesheets/lfs-xsl/lfs.css @@ -162,6 +162,8 @@ div.navheader, div.navfooter { div.navheader { border-bottom: 1px solid #dbddec; + position: sticky; + top: 0; } div.navfooter { @@ -235,10 +237,14 @@ div.toc { padding-left: 1em; } -li.preface, .part li.appendix { +.book li.preface, .part li.appendix { margin-left: 1em; } +.part li.preface { + margin-left: 0em; +} + div.toc h3 { margin: 1em 0 .3em 0; } @@ -340,7 +346,7 @@ div.important em, div.warning em, div.caution em { margin-bottom: .3em; } -.table table { +.table table, .informaltable { margin-left: auto; margin-right: auto; } @@ -430,18 +436,39 @@ div.materials dd { .segtitle { float: left; + padding-left: 1em; + width: 14.5em; } -.package .segbody, .appendix .segbody { +.content .segtitle { + width: 12em; +} + +.package .segbody { display: block; padding-left: 14em; } +.appendix .segbody{ + display: block; + padding-left: 16em; +} + .content .segbody { display: block; - padding-left: 12em; + padding-left: 13em; } +.content table tr td:first-child +{ + width: 9em; + padding-right: 0px; +} + +.content table tr td:first-child p +{ + padding-right: 0px; +} /* itemizedlist */ ul { |