From 61ce0b1fe4ffbf86ef3189e733f9f372cac419aa Mon Sep 17 00:00:00 2001 From: DJ Lucas Date: Sat, 14 Jun 2014 19:51:45 +0000 Subject: [PATCH] Synchronized with LFS-SVN-20140611. git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10576 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 279 ++++++++++++++++++++++++++++++++++- chapter01/how.xml | 2 +- chapter01/whatsnew.xml | 74 +++++----- chapter02/chapter02.xml | 1 + chapter03/patches.xml | 60 +++++++- chapter04/aboutsbus.xml | 3 - chapter04/chapter04.xml | 3 +- chapter04/settingenviron.xml | 9 +- chapter05/binutils-pass2.xml | 1 + chapter05/gcc-pass1.xml | 22 +-- chapter05/gcc-pass2.xml | 16 +- chapter05/libstdc++.xml | 2 +- chapter05/perl.xml | 8 +- chapter05/util-linux.xml | 1 + chapter06/acl.xml | 6 + chapter06/automake.xml | 12 +- chapter06/bash.xml | 4 +- chapter06/bc.xml | 4 + chapter06/binutils.xml | 18 ++- chapter06/coreutils.xml | 8 +- chapter06/createfiles.xml | 92 +++++++++++- chapter06/dbus.xml | 7 +- chapter06/e2fsprogs.xml | 17 ++- chapter06/gcc.xml | 31 ++-- chapter06/gdbm.xml | 49 ++++-- chapter06/glibc.xml | 6 +- chapter06/groff.xml | 6 - chapter06/mpfr.xml | 5 + chapter06/perl.xml | 4 +- chapter06/readline.xml | 7 +- chapter06/shadow.xml | 5 + chapter06/systemd.xml | 7 +- general.ent | 5 +- packages.ent | 108 +++++++------- patches.ent | 38 ++++- prologue/hostreqs.xml | 21 ++- prologue/prerequisites.xml | 4 +- prologue/why.xml | 72 +++++++++ 38 files changed, 807 insertions(+), 210 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index c910be0d2..25dcce833 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -35,6 +35,283 @@ --> + + 2014-06-14 + + + [dj] - Updated to systemd-214. + + + [dj] - Synchronized with LFS-SVN-20140611. + + + + + + 2014-06-11 + + + [bdubbs] - Several text changes. Thanks to Chris + Staub for the patches. Fixes + #3600, + #3601, + #3602, + #3603, and + #3604, + + + + [bdubbs] - Update to iproute2-3.15.0. Fixes + #3608. + + + [bdubbs] - Update to linux-3.15. Fixes + #3606. + + + [bdubbs] - Gettext-0.19.1. Fixes + #3599. + + + [bdubbs] - Fix test failure in e2fsprogs. Fixes + #3586. + + + + + + 2014-06-08 + + + [bdubbs] - Add SHLIB_LIBS to readline install command. + + + + + + 2014-06-04 + + + [bdubbs] - Update to e2fsprogs-1.42.10. Fixes + #3596. + + + [bdubbs] - Update to grep-2.20. Fixes + #3589. + + + [bdubbs] - Update to perl-5.20.0. Fixes + #3592. + + + [bdubbs] - Update to man-pages-3.68. Fixes + #3593. + + + [bdubbs] - Update to tzdata-2014d. Fixes + #3594. + + + [bdubbs] - Update to check-0.9.13. Fixes + #3596. + + + [bdubbs] - Update to linux-3.14.5. Fixes + #3597. + + + [bdubbs] - Update to eudev-1.7. Fixes + #3598. + + + + + + 2014-05-27 + + + [bdubbs] - Update to man-pages-3.67. Fixes + #3588. + + + [bdubbs] - Reformatted version check script to fit + pdf pages properly. Fixes + #3590. + + + [bdubbs] - Added a note about adding the + parent directory to the es and pt keymaps for proper + keymap loading. Fixes + #3591. + + + + + + 2014-05-19 + + + [bdubbs] - Remove unneeded configure switches from gcc. Fixes + #3582. + + + + + + 2014-05-15 + + + [bdubbs] - Fix gcc LTO symlink for i686 systems. + + + [bdubbs] - Fix kbd-2.0.1.tar.gz md5sum. Fixes + #3581 + + + [bdubbs] - Fix procps-ng url. Fixes + #3580 + + + + + + 2014-05-12 + + + [bdubbs] - Update to tzdata-2014c. Fixes + #3578 + + + [bdubbs] - Update to linux-3.14.4. Fixes + #3577 + + + + + + 2014-05-02 + + + [bdubbs] - Update several URLs in Chapter 3. Fixes + #3570. + + + [bdubbs] - Fix typo in Chapter 5, libstdc++. Fixes + #3564. + + + [bdubbs] - Removed obsolete reference to acinstall + in automake section. Fixes + #3567. + + + [bdubbs] - Removed obsolete reference to sbu home page + in Chapter 4. Fixes + #3568. + + + [bdubbs] - Update installed programs for gdbm. + Thanks to Chris Staub for the patch. Fixes + #3560. + + + + + + 2014-04-28 + + + [bdubbs] - Update to linux-3.14.2. Fixes + #3559. + + + + + + 2014-04-25 + + + [bdubbs] - Remove unneeded symlink in gcc-pass1. Fixes + #3555. + + + [bdubbs] - Update to util-linux-2.24.2. Fixes + #3554. + + + + + + 2014-04-24 + + + [bdubbs] - Update to gcc-4.9. Fixes + #3553. + + + + + + 2014-04-22 + + + [bdubbs] - Removed unneeded groff symlinks. Fixes + #3551. + + + [bdubbs] - Update users so all acl tests pass. Fixes + #3548. + + + [krejzi] - Fix a segfault in shuf program from + Coreutils. Fixes + #3550. + + + [krejzi] - Fix a segfault in Acl package. Fixes + #3549. + + + + + + 2014-04-18 + + + [bdubbs] - Updated to linux-3.14.1. Fixes + #3545. + + + [bdubbs] - Updated to man-db-2.6.7.1. Fixes + #3543. + + + [bdubbs] - Updated to iproute2-3.14.0. Fixes + #3542. + + + [bdubbs] - Updated to gawk-4.1.1. Fixes + #3541. + + + [bdubbs] - Added mpfr upstream patch. Fixes + #3537. + + + [bdubbs] - Added readline upstream patch. Fixes + #3532. + + + [bdubbs] - Added bash upstream patch. Fixes + #3531. + + + [bdubbs] - Added bc patch to address memory leaks. Fixes + #3536. + + + + 2014-04-12 @@ -48,7 +325,7 @@ 2014-04-08 - [bdubbs] - Change lex rwapper script to a symbolic + [bdubbs] - Change lex wrapper script to a symbolic link. Completes #3523. diff --git a/chapter01/how.xml b/chapter01/how.xml index 2708a7c50..d85c3e62f 100644 --- a/chapter01/how.xml +++ b/chapter01/how.xml @@ -11,7 +11,7 @@ How to Build an LFS System The LFS system will be built by using an already installed - Linux distribution (such as Debian, Mandriva, Red Hat, or SUSE). This + Linux distribution (such as Debian, OpenMandriva, Fedora, or openSUSE). This existing Linux system (the host) will be used as a starting point to provide necessary programs, including a compiler, linker, and shell, to build the new system. Select the development option diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index b6fc1645b..2f5f76159 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -21,7 +21,6 @@ Upgraded to: - @@ -49,9 +48,9 @@ - + @@ -64,9 +63,9 @@ - + @@ -82,18 +81,18 @@ Flex &flex-version; - - + - + @@ -124,9 +123,9 @@ - + @@ -157,9 +156,9 @@ - + Man-pages &man-pages-version; @@ -175,9 +174,9 @@ - + @@ -193,12 +192,12 @@ - - + @@ -211,9 +210,9 @@ Tzdata &tzdata-version; - + @@ -239,22 +238,31 @@ Added: - - + + &bash-fixes-patch; + + + &bc-memory-leak-patch; + + + &binutils-lto-patch; + + + &coreutils-shuf-segfault-patch; + + + &mpfr-fixes-patch; + + + &readline-fixes-patch; + Removed: - - - bash-4.2-fixes-12.patch + perl-5.18.2-libc-1.patch - - - readline-6.2-fixes-2.patch - - diff --git a/chapter02/chapter02.xml b/chapter02/chapter02.xml index 4402a6d9d..84484ccce 100644 --- a/chapter02/chapter02.xml +++ b/chapter02/chapter02.xml @@ -15,5 +15,6 @@ + diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 581a3763c..271eca266 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -17,7 +17,7 @@ needed to build an LFS system: - + + + Bc Memory Leak Patch - &bc-memory-leak-patch-size;: + + Download: + MD5 sum: &bc-memory-leak-patch-md5; + + + + + Binutils LTO Patch - &binutils-lto-patch-size;: + + Download: + MD5 sum: &binutils-lto-patch-md5; + + + Bzip2 Documentation Patch - &bzip2-docs-patch-size;: @@ -42,6 +58,30 @@ + + Coreutils shuf Segmentation Fault Fix Patch - &coreutils-shuf-segfault-patch-size;: + + Download: + MD5 sum: &coreutils-shuf-segfault-patch-md5; + + + + + E2fsprogs Fix Test Patch - &e2fsprogs-fix-test-patch-size;: + + Download: + MD5 sum: &e2fsprogs-fix-test-patch-md5; + + + + + Gcc Upstream Patch - &gcc-upstream-patch-size;: + + Download: + MD5 sum: &gcc-upstream-patch-md5; + + + Glibc FHS Patch - &glibc-fhs-patch-size;: @@ -58,6 +98,14 @@ + + Mpfr Upstream Fixes Patch - &mpfr-fixes-patch-size;: + + Download: + MD5 sum: &mpfr-fixes-patch-md5; + + + + + Readline Upstream Fixes Patch - &readline-fixes-patch-size;: + + Download: + MD5 sum: &readline-fixes-patch-md5; + + Systemd Compat Patch - &systemd-compat-patch-size;: diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index 265cec244..61eb2276d 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -36,9 +36,6 @@ to give an estimate of how long it might take to install a package, but the numbers can vary by as much as dozens of minutes in some cases. - To view actual timings for a number of specific machines, we recommend - The LinuxFromScratch SBU Home Page at . - For many modern systems with multiple processors (or cores) the compilation time for a package can be reduced by performing a "parallel make" by either setting an environment variable or telling the diff --git a/chapter04/chapter04.xml b/chapter04/chapter04.xml index b7f5cb2d4..fe3cdbd74 100644 --- a/chapter04/chapter04.xml +++ b/chapter04/chapter04.xml @@ -11,7 +11,8 @@ Final Preparations - + + diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml index 485269e3b..02cd717d4 100644 --- a/chapter04/settingenviron.xml +++ b/chapter04/settingenviron.xml @@ -70,12 +70,9 @@ EOF The LC_ALL variable controls the localization of certain programs, making their messages follow the conventions of a specified country. - If the host system uses a version of Glibc older than 2.2.4, having - LC_ALL set to something other than POSIX or - C (during this chapter) may cause issues if you exit the chroot - environment and wish to return later. Setting LC_ALL to - POSIX or C (the two are equivalent) ensures that - everything will work as expected in the chroot environment. + Setting LC_ALL to POSIX or C + (the two are equivalent) ensures that everything will work as expected in + the chroot environment. The LFS_TGT variable sets a non-default, but compatible machine description for use when building our cross compiler and linker and when cross diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml index 9ebf763e7..182fad342 100644 --- a/chapter05/binutils-pass2.xml +++ b/chapter05/binutils-pass2.xml @@ -56,6 +56,7 @@ RANLIB=$LFS_TGT-ranlib \ ../binutils-&binutils-version;/configure \ --prefix=/tools \ --disable-nls \ + --disable-werror \ --with-lib-path=/tools/lib \ --with-sysroot diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 8ba097d10..0900831f6 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -129,15 +129,13 @@ cd ../gcc-build --disable-libatomic \ --disable-libgomp \ --disable-libitm \ - --disable-libmudflap \ --disable-libquadmath \ --disable-libsanitizer \ --disable-libssp \ + --disable-libvtv \ + --disable-libcilkrts \ --disable-libstdc++-v3 \ - --enable-languages=c,c++ \ - --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ - --with-mpfr-lib=$(pwd)/mpfr/src/.libs - + --enable-languages=c,c++ The meaning of the configure options: @@ -222,14 +220,6 @@ cd ../gcc-build - - --with-mpfr-* - - These options enable the build system to correctly use the - in-tree copy of the MPFR sources. - - - Compile GCC by running: @@ -245,8 +235,8 @@ cd ../gcc-build Install the package: make install - - Using --disable-shared means that the + diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index ec9354e18..85cc1aff9 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -57,17 +57,15 @@ cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h - - For x86 machines, a bootstrap build of GCC uses the - compiler flag. Non-bootstrap builds - omit this flag by default, and the goal should be to produce a compiler - that is exactly the same as if it were bootstrapped. Apply the following - sed command to force the build to use the flag: + Once again, change the location of GCC's default dynamic linker to use the one installed in /tools. @@ -123,9 +121,7 @@ RANLIB=$LFS_TGT-ranlib \ --disable-libstdcxx-pch \ --disable-multilib \ --disable-bootstrap \ - --disable-libgomp \ - --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ - --with-mpfr-lib=$(pwd)/mpfr/src/.libs + --disable-libgomp The meaning of the new configure options: diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml index 23d0a3a4a..d93f46bc5 100644 --- a/chapter05/libstdc++.xml +++ b/chapter05/libstdc++.xml @@ -93,7 +93,7 @@ cd ../gcc-build - --with-gxx-include-dir=/tools/include/c++/&gcc-version; + --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version; This is the location where the standard include files are searched by the C++ compiler. In a normal build, this information diff --git a/chapter05/perl.xml b/chapter05/perl.xml index bad873d63..401a94d07 100644 --- a/chapter05/perl.xml +++ b/chapter05/perl.xml @@ -42,15 +42,17 @@ Installation of Perl - + Prepare Perl for compilation: -sh Configure -des -Dprefix=/tools +sh Configure -des -Dprefix=/tools -Dlibs=-lm Build the package: diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml index 07b8282e6..1b25e50f3 100644 --- a/chapter05/util-linux.xml +++ b/chapter05/util-linux.xml @@ -18,6 +18,7 @@ Util-linux + tools diff --git a/chapter06/acl.xml b/chapter06/acl.xml index 4da5e353b..e89bee48b 100644 --- a/chapter06/acl.xml +++ b/chapter06/acl.xml @@ -51,6 +51,12 @@ sed -i "s:| sed.*::g" test/{sbits-restore,cp,misc}.test + Additionally, fix a bug that causes getfacl -e + to segfault on overly long group name: + +sed -i -e "/TABS-1;/a if (x > (TABS-1)) x = (TABS-1);" \ + libacl/__acl_to_any_text.c + Prepare Acl for compilation: ./configure --prefix=/usr --libexecdir=/usr/lib diff --git a/chapter06/automake.xml b/chapter06/automake.xml index d02700a27..117f9c48b 100644 --- a/chapter06/automake.xml +++ b/chapter06/automake.xml @@ -73,7 +73,7 @@ make -j4 check Installed directories - acinstall, aclocal, aclocal-&am-minor-version;, automake, + aclocal, aclocal-&am-minor-version;, automake, automake-&am-minor-version;, compile, config.guess, config.sub, depcomp, install-sh, mdate-sh, missing, mkinstalldirs, py-compile, and ylwrap @@ -87,16 +87,6 @@ make -j4 check - - acinstall - - A script that installs aclocal-style M4 files - - acinstall - - - - aclocal diff --git a/chapter06/bash.xml b/chapter06/bash.xml index d19ea1a25..12f063c1b 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -39,12 +39,12 @@ Installation of Bash - + Prepare Bash for compilation: ./configure --prefix=/usr \ diff --git a/chapter06/bc.xml b/chapter06/bc.xml index 0957421bd..17be4bfcf 100644 --- a/chapter06/bc.xml +++ b/chapter06/bc.xml @@ -41,6 +41,10 @@ Installation of Bc + First, fix some minor memory leaks in the code: + +patch -Np1 -i ../&bc-memory-leak-patch; + Prepare Bc for compilation: ./configure --prefix=/usr \ diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml index d54cbe45e..dc3904c9e 100644 --- a/chapter06/binutils.xml +++ b/chapter06/binutils.xml @@ -64,6 +64,11 @@ Ask your system administrator to create more. rm -fv etc/standards.info sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in + Add an upstream patch to use gcc's link time optimization (LTO) + the default: + +patch -Np1 -i ../&binutils-lto-patch; + The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory: @@ -72,7 +77,9 @@ cd ../binutils-build Prepare Binutils for compilation: -../binutils-&binutils-version;/configure --prefix=/usr --enable-shared +../binutils-&binutils-version;/configure --prefix=/usr \ + --enable-shared \ + --disable-werror Compile the package: @@ -109,18 +116,15 @@ cd ../binutils-build make check + Six tests in the lto.exp testsuite are known to fail due + to changes in the most recent version of gcc. + Install the package: make tooldir=/usr install - - Contents of Binutils diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index b1e5199a2..d7577694f 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -40,11 +40,11 @@ Installation of Coreutils - + First, fix a segfault in shuf program: + +patch -Np1 -i ../&coreutils-shuf-segfault-patch; + 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: diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index 5161d6505..1aa193ec8 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -46,6 +46,89 @@ ln -sv /tools/lib/libstdc++.so{,.6} /usr/lib sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la ln -sv bash /bin/sh + + The purpose of each link: + + + /bin/bash + + Many bash scripts specify + /bin/bash. + + + + + /bin/cat + + This pathname is hard-coded into Glibc's configure script. + + + + + /bin/echo + + This is to satisfy one of the tests in Glibc's test suite, which + expects /bin/echo. + + + + + /bin/pwd + + Some configure scripts, particularly Glibc's, + have this pathname hard-coded. + + + + + /bin/stty + + This pathname is hard-coded into Expect, therefore it is needed + for Binutils and GCC test suites to pass. + + + + + /usr/bin/perl + + Many Perl scripts hard-code this path to the + perl program. + + + + + /usr/lib/libgcc_s.so{,.1} + + Glibc needs this for the pthreads library to work. + + + + + /usr/lib/libstdc++{,.6} + + This is needed by several tests in Glibc's test suite, as well as + for C++ support in GMP. + + + + + /usr/lib/libstdc++.la + + This prevents a /tools + reference that would otherwise be in + /usr/lib/libstdc++.la after GCC is installed. + + + + + /bin/sh + + Many shell scripts hard-code /bin/sh. + + + + + Historically, Linux maintains a list of the mounted file systems in the file /etc/mtab. Modern kernels maintain this list internally and exposes it to the user via the cat > /etc/passwd << "EOF" 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 EOF @@ -78,7 +162,7 @@ EOF cat > /etc/group << "EOF" root:x:0: -bin:x:1: +bin:x:1:daemon sys:x:2: kmem:x:3: tape:x:4: @@ -97,13 +181,15 @@ adm:x:16: messagebus:x:18: systemd-journal:x:23: mail:x:34: -nogroup:x:99: +nogroup:x:99: +users:x:999: EOF 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. The Linux Standard Base (LSB, available at ) recommends only that, besides the group root with a Group ID (GID) of 0, a group bin with a GID of 1 be diff --git a/chapter06/dbus.xml b/chapter06/dbus.xml index 476baf41d..9ed4e5b6b 100644 --- a/chapter06/dbus.xml +++ b/chapter06/dbus.xml @@ -74,7 +74,7 @@ This package does come with a testsuite, but it requires several packages that are not included in LFS. Instructions for running the testsuite can be found in the BLFS book at - . + . Install the package: @@ -93,6 +93,11 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.soln -sv /etc/machine-id /var/lib/dbus + Finally, generate a D-Bus UUID to avoid possible warnings + when building some packages in BLFS: + +dbus-uuidgen --ensure + diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml index 7aca00f9e..ca9268d48 100644 --- a/chapter06/e2fsprogs.xml +++ b/chapter06/e2fsprogs.xml @@ -44,10 +44,11 @@ Installation of E2fsprogs - First fix a problem with running regression tests in the LFS chroot + First fix some problems with running regression tests in the LFS chroot environment: -sed -i -e 's|^LD_LIBRARY_PATH.*|&:/tools/lib|' tests/test_config +patch -Np1 -i ../&e2fsprogs-fix-test-patch; +sed -i -e 's|^LD_LIBRARY_PATH.*|&:/tools/lib|' tests/test_config The E2fsprogs documentation recommends that the package be built in a subdirectory of the source tree: @@ -121,17 +122,19 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \ make - To test the results, issue: + To set up the test suite we need to temporarily copy + a library from /tools/lib so the test programs can find it. + To run the tests, issue: -make check +cp -v /tools/lib/libblkid.so.1 /lib +make check +rm -v /lib/libblkid.so.1 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 and - for details on creating and enabling swap space. Additionally, - three tests try to allocate a two terabyte partition and will fail - unless you have at least that much unused disk space available. + for details on creating and enabling swap space. Install the binaries, documentation, and shared libraries: diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index 063e0146a..9ab97ea22 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -41,6 +41,11 @@ Installation of GCC + First fix a problem identified upstream that causes some + programs to fail: + +patch -Np1 -i ../&gcc-upstream-patch; + - Also fix an error in one of the check Makefiles and disable one test in - the g++ libmudflap test suite: - -sed -i -e /autogen/d -e /check.sh/d fixincludes/Makefile.in -mv -v libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx{,.disable} - The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory: @@ -157,6 +150,20 @@ cd ../gcc-build ln -sv gcc /usr/bin/cc + Add a compatibility symlink to enable building programs with + Link Time Optimization (LTO): + +install -dm755 /usr/lib/bfd-plugins +pushd /usr/lib/bfd-plugins + +if [ $(uname -m) == "i686" ]; then + ln -sfv ../../libexec/gcc/i686-pc-linux-gnu/&gcc-version;/liblto_plugin.so +else + ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/&gcc-version;/liblto_plugin.so +fi + +popd + 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: diff --git a/chapter06/gdbm.xml b/chapter06/gdbm.xml index 051207671..a5dacdbcc 100644 --- a/chapter06/gdbm.xml +++ b/chapter06/gdbm.xml @@ -23,10 +23,11 @@ - <para>The GDBM package contains the GNU Database Manager. This is a disk - file format database which stores key/data-pairs in single files. The - actual data of any record being stored is indexed by a unique key, which can - be retrieved in less time than if it was stored in a text file.</para> + <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 + 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> <segmentedlist> <segtitle>&buildtime;</segtitle> @@ -82,7 +83,7 @@ <segtitle>Installed libraries</segtitle> <seglistitem> - <seg>testgdbm</seg> + <seg>gdbm_dump, gdbm_load, and gdbmtool</seg> <seg>libgdbm.{a,so} and libgdbm_compat.{a,so}</seg> </seglistitem> </segmentedlist> @@ -92,12 +93,32 @@ <?dbfo list-presentation="list"?> <?dbhtml list-presentation="table"?> - <varlistentry id="testgdbm"> - <term><command>testgdbm</command></term> + <varlistentry id="gdbm_dump"> + <term><command>gdbm_dump</command></term> + <listitem> + <para>Dumps a GDBM database to a file.</para> + <indexterm zone="ch-system-gdbm gdbm_dump"> + <primary sortas="b-gdbm_dump">gdbm_dump</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="gdbm_load"> + <term><command>gdbm_load</command></term> + <listitem> + <para>Recreates a GDBM database from a dump file.</para> + <indexterm zone="ch-system-gdbm gdbm_load"> + <primary sortas="b-gdbm_load">gdbm_load</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="gdbmtool"> + <term><command>gdbmtool</command></term> <listitem> <para>Tests and modifies a GDBM database</para> - <indexterm zone="ch-system-gdbm testgdbm"> - <primary sortas="b-testgdbm">testgdbm</primary> + <indexterm zone="ch-system-gdbm gdbmtool"> + <primary sortas="b-gdbmtool">gdbmtool</primary> </indexterm> </listitem> </varlistentry> @@ -112,6 +133,16 @@ </listitem> </varlistentry> + <varlistentry id="libgdbm_compat"> + <term><filename class="libraryfile">libgdbm_compat</filename></term> + <listitem> + <para>Compatibility library containing older DBM functions</para> + <indexterm zone="ch-system-gdbm libgdbm_compat"> + <primary sortas="c-libgdbm_compat">libgdbm_compat</primary> + </indexterm> + </listitem> + </varlistentry> + </variablelist> </sect2> diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 114409670..637d28c4b 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -417,7 +417,7 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen> ldd, lddlibc4, locale, localedef, makedb, mtrace, nscd, pcprofiledump, pldd, rpcgen, sln, sotruss, sprof, tzselect, xtrace, zdump, and zic</seg> - <seg>ld.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so}, + <seg>ld-&glibc-version;.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so}, libc.{a,so}, libc_nonshared.a, libcidn.so, libcrypt.{a,so}, libdl.{a,so}, libg.a, libieee.a, libm.{a,so}, libmcheck.a, libmemusage.so, libnsl.{a,so}, libnss_compat.so, @@ -703,11 +703,11 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen> </varlistentry> <varlistentry id="ld.so"> - <term><filename class="libraryfile">ld.so</filename></term> + <term><filename class="libraryfile">ld-&glibc-version;.so</filename></term> <listitem> <para>The helper program for shared library executables</para> <indexterm zone="ch-system-glibc ld.so"> - <primary sortas="c-ld.so">ld.so</primary> + <primary sortas="c-ld.so">ld-&glibc-version;.so</primary> </indexterm> </listitem> </varlistentry> diff --git a/chapter06/groff.xml b/chapter06/groff.xml index 69a51a36c..9e837f5fc 100644 --- a/chapter06/groff.xml +++ b/chapter06/groff.xml @@ -63,12 +63,6 @@ <screen><userinput remap="install">make install</userinput></screen> - <para>Some documentation programs, such as <command>xman</command>, - will not work properly without the following symlinks:</para> - -<screen><userinput remap="install">ln -sv eqn /usr/bin/geqn -ln -sv tbl /usr/bin/gtbl</userinput></screen> - </sect2> <sect2 id="contents-groff" role="content"> diff --git a/chapter06/mpfr.xml b/chapter06/mpfr.xml index 708101891..517baf755 100644 --- a/chapter06/mpfr.xml +++ b/chapter06/mpfr.xml @@ -41,6 +41,11 @@ <sect2 role="installation"> <title>Installation of MPFR + First, apply the following patch to fix various bugs that have been + addressed upstream: + +patch -Np1 -i ../&mpfr-fixes-patch; + Prepare MPFR for compilation: ./configure --prefix=/usr \ diff --git a/chapter06/perl.xml b/chapter06/perl.xml index 24f99adf0..645016932 100644 --- a/chapter06/perl.xml +++ b/chapter06/perl.xml @@ -83,8 +83,8 @@ -Dpager="/usr/bin/less -isR" - This corrects an error in the way that perldoc - invokes the less program. + This ensures that less is used instead + of more. diff --git a/chapter06/readline.xml b/chapter06/readline.xml index 5c0e3caf2..b17380a98 100644 --- a/chapter06/readline.xml +++ b/chapter06/readline.xml @@ -41,6 +41,11 @@ Installation of Readline + First install some patches to fix various bugs that have been + addressed upstream: + +patch -Np1 -i ../&readline-fixes-patch; + Reinstalling Readline will cause the old libraries to be moved to <libraryname>.old. While this is normally not a problem, in some cases it can trigger a linking bug in ldconfig. This can be @@ -75,7 +80,7 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install Install the package: -make install +make SHLIB_LIBS=-lncurses install Now move the dynamic libraries to a more appropriate location and fix up some symbolic links: diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml index 0f30426d8..8742bda28 100644 --- a/chapter06/shadow.xml +++ b/chapter06/shadow.xml @@ -72,6 +72,11 @@ find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs + Make a minor change to make the default useradd consistent with the LFS + groups file: + +sed -i 's/1000/999/' etc/useradd + Prepare Shadow for compilation: ./configure --sysconfdir=/etc diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml index 1229318fb..3961d5a53 100644 --- a/chapter06/systemd.xml +++ b/chapter06/systemd.xml @@ -47,10 +47,11 @@ KILL=/bin/kill HAVE_BLKID=1 BLKID_LIBS="-lblkid" -BLKID_CFLAGS="-I/tools/include/blkid" +BLKID_CFLAGS="-I/tools/include/blkid" +cc_cv_CFLAGS__flto=no EOF - Aditionally, fix a build error when using Util-Linux built in + Additionally, fix a build error when using Util-Linux built in Chapter 5: sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") @@ -62,7 +63,7 @@ EOF Prepare Systemd for compilation: -./configure --prefix=/usr \ +CFLAGS="-fno-lto" ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --config-cache \ diff --git a/general.ent b/general.ent index 249ebd963..905b0f243 100644 --- a/general.ent +++ b/general.ent @@ -1,5 +1,6 @@ - - + + + diff --git a/packages.ent b/packages.ent index 2bfc399cb..feee24272 100644 --- a/packages.ent +++ b/packages.ent @@ -62,7 +62,7 @@ - + @@ -92,10 +92,10 @@ - - + + - + @@ -139,10 +139,10 @@ - - - - + + + + @@ -196,20 +196,20 @@ - - + + - + - - + + - + @@ -228,10 +228,10 @@ - - - - + + + + @@ -267,10 +267,10 @@ - - + + - + @@ -305,9 +305,9 @@ - + - + @@ -327,10 +327,10 @@ - - + + - + @@ -338,7 +338,7 @@ - + @@ -395,13 +395,13 @@ - + - - + + - + + + + + + + + + + + + + @@ -10,6 +22,18 @@ + + + + + + + + + + + + @@ -18,13 +42,23 @@ + + + + + + + + + - - + + diff --git a/prologue/hostreqs.xml b/prologue/hostreqs.xml index 0a73e0132..51b112eb8 100644 --- a/prologue/hostreqs.xml +++ b/prologue/hostreqs.xml @@ -194,8 +194,21 @@ echo 'main(){}' > dummy.c && g++ -o dummy dummy.c if [ -x dummy ] then echo "g++ compilation OK"; else echo "g++ compilation failed"; fi -rm -f dummy.c dummy +rm -f dummy.c dummy + +EOF +bash version-check.sh + + Also check for some library consistency: + +cat > library-check.sh << "EOF" +#!/bin/bash for lib in lib{gmp,mpfr,mpc}.la; do echo $lib: $(if find /usr/lib* -name $lib| grep -q $lib;then :;else echo not;fi) found @@ -203,7 +216,11 @@ done unset lib EOF -bash version-check.sh +bash library-check.sh + +The files identified by this script should be all present +or all absent, but not only one or two present. + diff --git a/prologue/prerequisites.xml b/prologue/prerequisites.xml index 932c92280..3da5037dc 100644 --- a/prologue/prerequisites.xml +++ b/prologue/prerequisites.xml @@ -46,7 +46,7 @@ This guide covers the usage of assorted Linux software. This reference is also fairly old, but still valid. - + diff --git a/prologue/why.xml b/prologue/why.xml index 2e243be3d..bc2db831b 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -37,6 +37,23 @@ library. + + Acl + + This package contains utilities to administer Access + Control Lists, which are used to define more fine-grained + discretionary access rights for files and directories. + + + + + Attr + + This package contains programs for administering + extended attributes on filesystem objects. + + + Autoconf @@ -115,6 +132,14 @@ communicate with one another; it is required by Systemd. + + D-Bus + + This package contains programs to implement a message bus system, + which a simple way for applications to talk to one another. + + + DejaGNU @@ -145,6 +170,14 @@ is required by the XML::Parser Perl module. + + Expat + + This package contains programs for parsing XML. It is + required for systemd. + + + Expect @@ -228,6 +261,14 @@ required by Systemd. + + Gperf + + This package a program that generates a perfect hash function + from a key set. It is required for systemd. + + + Grep @@ -279,6 +320,13 @@ by Systemd. + + Intltool + + This package contains tools for extracting translatable + strings from source files. + + IProute2 @@ -317,6 +365,14 @@ Systemd. + + Libcap + + This package implements the user-space interfaces to + the POSIX 1003.1e capabilities available in Linux kernels. + + + Libpipeline @@ -463,6 +519,16 @@ running, and shutdown of the system. + + Systemd + + This package provides and init program + and several additional boot and system control capabilites as an + alternative to Sysvinit. It is used by many commercial distributions. + In LFS it is installed side-by-side with Sysvinit to provide the user with + alternative boot systems for comparison. + + Sysvinit @@ -516,6 +582,12 @@ required by the Intltool package. + + XML::Parser + + This package is a Perl module that interfaces with Expat. + + XZ Utils