From e88c73c0575311238614cf05e8b54c69a9a7a4e8 Mon Sep 17 00:00:00 2001 From: Krejzi Date: Tue, 4 Feb 2014 23:36:05 +0000 Subject: [PATCH] Merge latest lfs svn, update to D-Bus 1.8.0, fix Systemd to build with latest lfs changes. git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10454 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- appendices/dependencies.xml | 4 +- chapter01/changelog.xml | 128 +++++++++++++++++++++++++++++++++++- chapter05/chapter05.xml | 2 +- chapter05/ncurses.xml | 22 ++++++- chapter05/util-linux-ng.xml | 78 ---------------------- chapter05/util-linux.xml | 91 +++++++++++++++++++++++++ chapter06/acl.xml | 8 ++- chapter06/chapter06.xml | 2 +- chapter06/createfiles.xml | 3 +- chapter06/creatingdirs.xml | 2 +- chapter06/e2fsprogs.xml | 23 ++++--- chapter06/kernfs.xml | 16 ++--- chapter06/revisedchroot.xml | 2 +- chapter06/systemd.xml | 31 ++++++++- chapter09/reboot.xml | 10 +-- general.ent | 4 +- packages.ent | 60 +++++++++-------- 17 files changed, 334 insertions(+), 152 deletions(-) delete mode 100644 chapter05/util-linux-ng.xml create mode 100644 chapter05/util-linux.xml diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index f2287f2f9..260ed14d3 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -2093,7 +2093,7 @@ Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, - Gettext, Glibc, Grep, Make, Ncurses, Sed, and Zlib + Gettext, Glibc, Grep, Make, Ncurses, Sed, Udev, and Zlib @@ -2101,7 +2101,7 @@ &testsuites; - No test suite available + None diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 883358cff..e0cdd32d3 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -35,6 +35,117 @@ --> + + 2014-02-04 + + + [krejzi] - Merge LFS SVN-20140202 book. + + + [krejzi] - Update to D-Bus 1.8.0. + + + [krejzi] - Fix Systemd to build with recent LFS changes. + + + + + + 2014-02-02 + + + [bdubbs] - Update to linux-3.13.1. Fixes + #3483. + + + + + + 2014-01-27 + + + [bdubbs] - Add an environment variable to util-linux + in Chapter 5 to prevent an installation error for + hosts that have unneeded capabilities availible. + + + + + + 2014-01-26 + + + [bdubbs] - Update to man-pages-3.57. Fixes + #3480. + + + [bdubbs] - Update to man-db-2.6.6. Fixes + #3479. + + + [bdubbs] - Update to linux-3.13. Fixes + #3478. + + + + + + 2014-01-25 + + + [bdubbs] - Add a configure switch to util-linux + in Chapter 5 to prevent an installation error for + hosts that have systemd installed. + + + + + + 2014-01-22 + + + [bdubbs] - Update to check-0.9.12. Fixes + #3477. + + + [bdubbs] - Update to util-linux-2.24.1. Fixes + #3476. + + + [bdubbs] - Update to mpc-1.0.2. Fixes + #3474. + + + [bdubbs] - Update to man-pages-3.56. Fixes + #3470. + + + [bdubbs] - Update to linux-3.12.7. Fixes + #3469. + + + [bdubbs] - Update to perl-5.18.2. Fixes + #3465. + + + [bdubbs] - Update to gettext-0.18.3.2. Fixes + #3464. + + + + + + 2014-01-21 + + + [bdubbs] - Moved util-linux final build to be after + udev. Fixed up e2fsprogs and udev to use the Chapter 5 + build of util-linux. Fixes + #3467. + + + + 2014-01-17 @@ -44,6 +155,21 @@ + + 2014-01-15 + + + [bdubbs] - Added a Chapter 5 build of util-linux in + preparation for moving the Chapter 6 build to after udev. + This is not the complete fix as this build has not yet + been incorporated into Chapter 6. + + + [bdubbs] - Mount /run as a tmpfs for Chapter 6. + + + + 2014-01-14 @@ -55,7 +181,7 @@ [bdubbs] - Fix hardcoded reference to /tools in - Chapter 6 glibc. Fixes + Chapter 6 gcc. Fixes #3466. diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index d858c9a98..e5bb196dc 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -43,8 +43,8 @@ + - diff --git a/chapter05/ncurses.xml b/chapter05/ncurses.xml index 18da06aec..a18a9c819 100644 --- a/chapter05/ncurses.xml +++ b/chapter05/ncurses.xml @@ -45,8 +45,12 @@ Prepare Ncurses for compilation: -./configure --prefix=/tools --with-shared \ - --without-debug --without-ada --enable-overwrite +./configure --prefix=/tools \ + --with-shared \ + --without-debug \ + --without-ada \ + --enable-widec \ + --enable-overwrite The meaning of the configure options: @@ -71,6 +75,20 @@ + + --enable-widec + + This switch causes wide-character libraries (e.g., libncursesw.so.&ncurses-version;) + to be built instead of normal ones (e.g., libncurses.so.&ncurses-version;). + 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. + + + Compile the package: diff --git a/chapter05/util-linux-ng.xml b/chapter05/util-linux-ng.xml deleted file mode 100644 index d06249f4f..000000000 --- a/chapter05/util-linux-ng.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - %general-entities; -]> - - - - - - util-linux-ng - &util-linux-ng-version; -
&util-linux-ng-url;
-
- - Util-linux-ng-&util-linux-ng-version; - - - Util-linux-ng - tools - - - - - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="../chapter06/util-linux-ng.xml" - xpointer="xpointer(/sect1/sect2[1]/para[1])"/> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&util-linux-ng-ch5-sbu;</seg> - <seg>&util-linux-ng-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Util-linux-ng - - Prepare Util-linux-ng for compilation: - -./configure --prefix=/tools - - Only a few of the utilities contained in this package need to be - built: - -make -C disk-utils mkswap -make -C mount mount umount -make -C text-utils more - - This package does not come with a test suite. - - Install the shared libraries required by E2fsprogs: - -make -C shlibs/uuid install -make -C shlibs/blkid install - - Copy these programs to the temporary tools directory: - -cp -v disk-utils/mkswap mount/{,u}mount text-utils/more /tools/bin - - - - - - - <para>Details on this package are located in - <xref linkend="contents-utillinux" role="."/></para> - - </sect2> - -</sect1> diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml new file mode 100644 index 000000000..7156895c2 --- /dev/null +++ b/chapter05/util-linux.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-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; + + + Util-linux + + + + + + <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 + + Prepare Util-linux for compilation: + +./configure --prefix=/tools \ + --disable-makeinstall-chown \ + --without-systemdsystemunitdir \ + PKG_CONFIG="" + + + The meaning of the configure option: + + + --disable-makeinstall-chown + + This switch disables using the chown command + during installation. This is not needed when installing into the + /tools directory and avoids the necessity of installing as + root. + + + + + --without-systemdsystemunitdir + + 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. + + + + + PKG_CONFIG="" + + Setting this envronment variable prevents adding unneeded + features that may be available on the host. + + + + + Compile the package: + +make + + Install the package: + +make install + + + +
diff --git a/chapter06/acl.xml b/chapter06/acl.xml index 267160cf7..32a45409b 100644 --- a/chapter06/acl.xml +++ b/chapter06/acl.xml @@ -56,11 +56,15 @@ make The Acl tests need to be run on a filesystem that supports access - controls. You will see lot of failures because Coreutils weren't compiled - with ACL support. To test the results, issue: + controls. You will see lot of failures because Coreutils wasn't compiled + with ACL support. To anyways test the results, issue: make -k tests root-tests + Even if you run Acl tests after Coreutils has been built with + Acl support, at least 11 tests will still fail for unknown reasons. + + Install the package: make install install-dev install-lib diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index c568864d3..9e69a42bd 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -36,7 +36,6 @@ - @@ -78,6 +77,7 @@ + diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index d39f940f9..ce20549e5 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -98,7 +98,8 @@ adm:x:16: messagebus:x:18: systemd-journal:x:23: mail:x:34: -nogroup:x:99: +nogroup:x:99: +users:x:100: EOF The created groups are not part of any standard—they are groups diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml index aec7d25ec..65553e8d5 100644 --- a/chapter06/creatingdirs.xml +++ b/chapter06/creatingdirs.xml @@ -13,7 +13,7 @@ It is time to create some structure in the LFS file system. Create a standard directory tree by issuing the following commands: -mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt,run} +mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt} mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} install -dv -m 0750 /root install -dv -m 1777 /tmp /var/tmp diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml index 6efb07619..bf4332ba9 100644 --- a/chapter06/e2fsprogs.xml +++ b/chapter06/e2fsprogs.xml @@ -52,7 +52,11 @@ cd build Prepare E2fsprogs for compilation: -../configure --prefix=/usr \ +export PKG_CONFIG_PATH=/tools/lib/pkgconfig + +LIBS=-L/tools/lib \ +CFLAGS=-I/tools/include \ +../configure --prefix=/usr \ --with-root-prefix="" \ --enable-elf-shlibs \ --disable-libblkid \ @@ -61,16 +65,16 @@ cd build --disable-fsck - The meaning of the configure options: - + --with-root-prefix="" @@ -127,9 +131,10 @@ cd build make install - Install the static libraries and headers: + Install the static libraries and headers and do some clean up: -make install-libs +make install-libs +unset PKG_CONFIG_PATH Make the installed static libraries writable so debugging symbols can be removed later: diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml index bfd583455..860cdfc00 100644 --- a/chapter06/kernfs.xml +++ b/chapter06/kernfs.xml @@ -22,7 +22,7 @@ Begin by creating directories onto which the file systems will be mounted: -mkdir -pv $LFS/{dev,proc,sys} +mkdir -pv $LFS/{dev,proc,sys,run} Creating Initial Device Nodes @@ -70,7 +70,8 @@ mknod -m 666 $LFS/dev/null c 1 3 mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620 mount -vt proc proc $LFS/proc -mount -vt sysfs sysfs $LFS/sys +mount -vt sysfs sysfs $LFS/sys +mount -vt tmpfs tmpfs $LFS/run The meaning of the mount options for devpts: @@ -102,16 +103,11 @@ mount -vt sysfs sysfs $LFS/sys In some host systems, /dev/shm is a symbolic link to /run/shm. - Inside a chroot environment, this temporary file system needs - to be mounted separate from the host file system: + The /run tmpfs was mounted above so in this case only a + directory needs to be created. if [ -h $LFS/dev/shm ]; then - link=$(readlink $LFS/dev/shm) - mkdir -pv $LFS/$link - mount -vt tmpfs shm $LFS/$link - unset link -else - mount -vt tmpfs shm $LFS/dev/shm + mkdir -pv $LFS/$(readlink $LFS/dev/shm) fi diff --git a/chapter06/revisedchroot.xml b/chapter06/revisedchroot.xml index 6c4579a1e..8927a9f29 100644 --- a/chapter06/revisedchroot.xml +++ b/chapter06/revisedchroot.xml @@ -12,7 +12,7 @@ Finally, clean up some extra files left around from running tests: -rm -rf /run/* /tmp/* +rm -rf /tmp/* From now on, when reentering the chroot environment after exiting, use the following modified chroot command: diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml index 3175d6e7f..628954fae 100644 --- a/chapter06/systemd.xml +++ b/chapter06/systemd.xml @@ -40,6 +40,21 @@ Installation of Systemd + First, create a file to allow Systemd to build when using Util-Linux + built in Chapter 5: + +cat > config.cache << "EOF" +KILL=/bin/kill +HAVE_BLKID=1 +BLKID_LIBS="-lblkid" +BLKID_CFLAGS="-I/tools/include/blkid" +EOF + + Aditionally, fix a build error when using Util-Linux built in + Chapter 5: + +sed -i "s:blkid/::" src/udev/udev-builtin-blkid.c + Prepare Systemd for compilation: ./configure --prefix=/usr \ @@ -47,6 +62,7 @@ --localstatedir=/var \ --libexecdir=/usr/lib \ --docdir=/usr/share/doc/systemd-&systemd-version; \ + --config-cache \ --with-rootprefix= \ --with-rootlibdir=/lib \ --enable-split-usr \ @@ -57,7 +73,16 @@ The meaning of the configure options: - --with-root-* + --config-cache + + This switch tells the build system to use + the config.cache file which + was created earlier. + + + + + --with-root* These switches ensure that core programs and shared libraries are installed in the subdirectories @@ -86,14 +111,14 @@ Compile the package: -make +make LIBRARY_PATH=/tools/lib The package comes with a testsuite, but it doesn't work in chroot. It needs to be run from a system booted using Systemd. Install the package: -make install +make LD_LIBRARY_PATH=/tools/lib install Install manual pages which are shipped in the tarball, but were not installed by install process: diff --git a/chapter09/reboot.xml b/chapter09/reboot.xml index d8d4aa00d..cf95c024f 100644 --- a/chapter09/reboot.xml +++ b/chapter09/reboot.xml @@ -87,16 +87,8 @@ Then unmount the virtual file systems: umount -v $LFS/dev/pts - -if [ -h $LFS/dev/shm ]; then - link=$(readlink $LFS/dev/shm) - umount -v $LFS/$link - unset link -else - umount -v $LFS/dev/shm -fi - umount -v $LFS/dev +umount -v $LFS/run umount -v $LFS/proc umount -v $LFS/sys diff --git a/general.ent b/general.ent index d48f35b3c..341b76061 100644 --- a/general.ent +++ b/general.ent @@ -1,5 +1,5 @@ - - + + diff --git a/packages.ent b/packages.ent index a16d2d7f2..efc67fe34 100644 --- a/packages.ent +++ b/packages.ent @@ -92,10 +92,10 @@ - - + + - + @@ -110,10 +110,10 @@ - - + + - + @@ -228,10 +228,10 @@ - - + + - + @@ -394,13 +394,13 @@ - - + + - - + + - +