diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index d635048c1..1cc5ae937 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -45,6 +45,15 @@ 2020-04-19 + + [pierre] - Build util-linux in chapter 5 for both books. + link util-linux libraries and headers from /usr to /tools. + Copy util-linux pkg-config files from /tools to /usr, changing + any occurence of /tools to /usr. Also move eudev before util-linux. + Fixes #4637, + #4638, and + #4642. + [pierre] - Reinstate flex in chapter 5, so that ar and ranlib (binutils) link against libfl. This allows to run tests for bison, diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml index 96b8eec1f..b164fa2db 100644 --- a/chapter05/util-linux.xml +++ b/chapter05/util-linux.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index a6b15f6b5..346df82cd 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -88,13 +88,13 @@ + + + - - - diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index 86e2d55d7..ac2805597 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -43,21 +43,21 @@ 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 /tools/lib/libfl.so* /usr/lib -ln -sv bash /bin/sh +ln -sv bash /bin/sh - - - + ln -svf /tools/include/$incdir /usr/include +done + The purpose of each link: @@ -164,25 +164,6 @@ done--> for C++ support in GMP. - - - /bin/sh @@ -191,6 +172,34 @@ done--> + + + /usr/lib/libfl.so* + + + This link allows binutils to find the flex library, and to + build enhanced versions of ar and ranlib. + + + + + + + /usr/lib/lib{blkid,fdisk,mount,uuid}.so*, + /usr/include/{blkid,libfdisk,libmount,uuid}, + /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc + + + + These links and files allow + eudev + systemd 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. + + + Historically, Linux maintains a list of the mounted file systems in the diff --git a/chapter06/eudev.xml b/chapter06/eudev.xml index 742fa5dfd..71511c3e7 100644 --- a/chapter06/eudev.xml +++ b/chapter06/eudev.xml @@ -49,17 +49,8 @@ sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c --> - -Prepare Eudev for compilation: + Prepare Eudev for compilation: ./configure --prefix=/usr \ --bindir=/sbin \ @@ -71,35 +62,24 @@ EOF --with-rootlibdir=/lib \ --enable-manpages \ --disable-static - -Compile the package: + Compile the package: make - -Create some directories now that are needed for tests, but -will also be used as a part of installation: + Create some directories now that are needed for tests, but + will also be used as a part of installation: mkdir -pv /lib/udev/rules.d mkdir -pv /etc/udev/rules.d -To test the results, issue: + To test the results, issue: make check - Install the package: make install - Install some custom rules and support files useful in an LFS environment: @@ -128,7 +108,6 @@ make -f &udev-lfs-version;/Makefile.lfs install into a binary database /etc/udev/hwdb.bin. Create the initial database: - udevadm hwdb --update This command needs to be run each time the hardware information is diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml index f64c4df72..1010c43ea 100644 --- a/chapter06/systemd.xml +++ b/chapter06/systemd.xml @@ -50,13 +50,6 @@ ln -sf /tools/bin/true /usr/bin/xsltproc - Because we have not yet installed the final version of Util-Linux, - create links to the libraries in the appropriate location: - -for file in /tools/lib/lib{blkid,mount,uuid}.so*; do - ln -sf $file /usr/lib/ -done - Set up the man pages: tar -xf ../systemd-man-pages-&systemd-version;.tar.xz @@ -76,7 +69,6 @@ done mkdir -p build cd build -PKG_CONFIG_PATH="/usr/lib/pkgconfig:/tools/lib/pkgconfig" \ LANG=en_US.UTF-8 \ meson --prefix=/usr \ --sysconfdir=/etc \ @@ -234,9 +226,6 @@ meson --prefix=/usr \ rm -f /usr/lib/sysctl.d/50-pid-max.conf - Cleanup symbolic links to Util-Linux libraries: - -rm -fv /usr/lib/lib{blkid,uuid,mount}.so* - + Remove the earlier created symlinks and files: + +rm -vf /usr/include/{blkid,libfdisk,libmount,uuid} +rm -vf /usr/lib/{blkid,fdisk,mount,uuid}.so* +rm -vf /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc + Prepare Util-linux for compilation: ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \