From a5c280368e7d58e3aa244d0f4af3486e171512b0 Mon Sep 17 00:00:00 2001 From: Thomas Trepl Date: Sat, 6 Feb 2021 06:41:29 +0000 Subject: [PATCH] Merge changes from trunk to multilib git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@12130 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 3 ++- chapter06/file.xml | 20 +++++++++++++++++++- chapter07/util-linux.xml | 7 +++++-- chapter08/binutils.xml | 6 +++++- chapter08/bzip2.xml | 6 +++++- chapter08/coreutils.xml | 6 +++--- chapter08/dbus.xml | 33 +++++++++++++++++++++------------ chapter08/e2fsprogs.xml | 5 ++--- chapter08/flex.xml | 5 +++-- chapter08/libtool.xml | 7 +++++++ chapter08/ncurses.xml | 9 ++++----- chapter08/python.xml | 18 +----------------- chapter08/revisedchroot.xml | 19 ------------------- chapter08/systemd.xml | 8 ++++++++ chapter08/util-linux.xml | 8 -------- chapter08/zlib.xml | 6 +++++- 16 files changed, 90 insertions(+), 76 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 242ea5df6..d61f50796 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -60,7 +60,8 @@ [pierre] - Replace the relinked libctf (which may incorrectly link against libz from the host distribution) with the one that - was linked during "make" in binutils-pass2. + was linked during "make" in binutils-pass2. Thanks to Xi Ruoyao + for the fix. [bdubbs] - Update to bc-3.2.6. Fixes diff --git a/chapter06/file.xml b/chapter06/file.xml index c9fbe0e6f..dc6024177 100644 --- a/chapter06/file.xml +++ b/chapter06/file.xml @@ -51,10 +51,28 @@ mkdir build pushd build - ../configure + ../configure --disable-bzlib \ + --disable-libseccomp \ + --disable-xzlib \ + --disable-zlib make popd + + The meaning of the new configure option: + + + --disable-* + + The configuration script attempts to use some packages from + the host distribution if the corresponding library files exist. + It may cause compilation failure if a library file exists, but + the corresponding header files do not. These options prevent + using these unneeded capabilities from the host. + + + + Prepare File for compilation: ./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess) diff --git a/chapter07/util-linux.xml b/chapter07/util-linux.xml index 1851cc5fe..e2484d664 100644 --- a/chapter07/util-linux.xml +++ b/chapter07/util-linux.xml @@ -41,8 +41,11 @@ Installation of Util-linux - First create a directory - to enable storage for the hwclock program: + The FHS recommends using the /var/lib/hwclock directory instead of the + usual /etc directory as the + location for the adjtime file. Create this directory + with: mkdir -pv /var/lib/hwclock diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml index a6f50a9c8..f3651cc90 100644 --- a/chapter08/binutils.xml +++ b/chapter08/binutils.xml @@ -180,6 +180,10 @@ cd build make tooldir=/usr install + Remove useless static libraries: + +rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a + @@ -193,7 +197,7 @@ cd build addr2line, ar, as, c++filt, dwp, elfedit, gprof, ld, ld.bfd, ld.gold, nm, objcopy, objdump, ranlib, readelf, size, strings, and strip - libbfd.{a,so}, libctf.{a,so}, libctf-nobfd.{a,so}, and libopcodes.{a,so} + libbfd.so, libctf.so, libctf-nobfd.so, and libopcodes.so /usr/lib/ldscripts diff --git a/chapter08/bzip2.xml b/chapter08/bzip2.xml index d00cbd664..49ed9fd66 100644 --- a/chapter08/bzip2.xml +++ b/chapter08/bzip2.xml @@ -95,6 +95,10 @@ rm -v /usr/bin/{bunzip2,bzcat,bzip2} ln -sv bzip2 /bin/bunzip2 ln -sv bzip2 /bin/bzcat + Remove an useless static library: + +rm -fv /usr/lib/libbz2.a + @@ -163,7 +167,7 @@ install -Dm644 libbz2.a &usr-lib-mx32;/libbz2.a bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep), bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore - libbz2.{a,so} + libbz2.so /usr/share/doc/bzip2-&bzip2-version; diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index c9f97a20d..6c1791327 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -77,9 +77,9 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ autoreconf - This command updates generated configuration files - consistent with the latest version of automake. - + The patch for internationalization has modified the + building system of the package, so the configuration files have + to be regenerated. diff --git a/chapter08/dbus.xml b/chapter08/dbus.xml index 211399207..5f51900cc 100644 --- a/chapter08/dbus.xml +++ b/chapter08/dbus.xml @@ -48,14 +48,16 @@ Prepare D-Bus for compilation: -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --disable-doxygen-docs \ - --disable-xml-docs \ +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --disable-doxygen-docs \ + --disable-xml-docs \ --docdir=/usr/share/doc/dbus-&dbus-version; \ - --with-console-auth-dir=/run/console + --with-console-auth-dir=/run/console \ + --with-system-pid-file=/run/dbus/pid \ + --with-system-socket=/run/dbus/system_bus_socket The meaning of the configure options: @@ -68,6 +70,18 @@ + + + --with-system-pid-file=/run/dbus/pid and + --with-system-socket=/run/dbus/system_bus_socket + + + These set the location of the PID file and the system bus socket + to be in /run, instead of + deprecated /var/run. + + + Compile the package: @@ -96,11 +110,6 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.soln -sfv /etc/machine-id /var/lib/dbus - Move the socket file to /run instead of the deprecated - /var/run: - - sed -i 's:/var/run:/run:' /lib/systemd/system/dbus.socket - diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml index 65d8604cd..fc6f897f5 100644 --- a/chapter08/e2fsprogs.xml +++ b/chapter08/e2fsprogs.xml @@ -122,10 +122,9 @@ cd build make install - Make the installed static libraries writable so debugging symbols can - be removed later: + Remove useless static libraries: -chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a +rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a This package installs a gzipped .info file but doesn't update the diff --git a/chapter08/flex.xml b/chapter08/flex.xml index fc8574c1d..d05474f03 100644 --- a/chapter08/flex.xml +++ b/chapter08/flex.xml @@ -53,8 +53,9 @@ Prepare Flex for compilation: - -./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version; +./configure --prefix=/usr \ + --docdir=/usr/share/doc/flex-&flex-version; \ + --disable-static Compile the package: diff --git a/chapter08/libtool.xml b/chapter08/libtool.xml index c6f43742a..e5bfb4cb0 100644 --- a/chapter08/libtool.xml +++ b/chapter08/libtool.xml @@ -68,6 +68,13 @@ make install + + + Remove an useless static library: + +rm -fv /usr/lib/libltdl.a + diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml index 58c343253..739557bfe 100644 --- a/chapter08/ncurses.xml +++ b/chapter08/ncurses.xml @@ -41,10 +41,6 @@ Installation of Ncurses - Don't install a static library that is not handled by configure: - -sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in - Prepare Ncurses for compilation: ./configure --prefix=/usr \ @@ -133,6 +129,10 @@ done echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so ln -sfv libncurses.so /usr/lib/libcurses.so + Remove a static library that is not handled by configure: + +rm -fv /usr/lib/libncurses++w.a + If desired, install the Ncurses documentation: mkdir -v /usr/share/doc/ncurses-&ncurses-version; @@ -278,7 +278,6 @@ rm -rf DESTDIR libformw.so, libmenuw.so, libncursesw.so, - libncurses++w.a, libpanelw.so, and their non-wide-character counterparts without "w" in the library names. diff --git a/chapter08/python.xml b/chapter08/python.xml index dde51f861..e84b7922e 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -94,23 +94,7 @@ Install the package: -make install -chmod -v 755 /usr/lib/libpython&python-minor;.so -chmod -v 755 /usr/lib/libpython3.so -ln -sfv pip&python-minor; /usr/bin/pip3 - - - The meaning of the install commands: - - - chmod -v 755 /usr/lib/libpython{&python-minor;,3}.so - - Fix permissions for libraries to be consistent with other - libraries. - - - - +make install If desired, install the preformatted documentation: diff --git a/chapter08/revisedchroot.xml b/chapter08/revisedchroot.xml index 6a45a1f22..6999c26fb 100644 --- a/chapter08/revisedchroot.xml +++ b/chapter08/revisedchroot.xml @@ -36,25 +36,6 @@ chroot "$LFS" /usr/bin/env -i \ linkend="ch-tools-bindmount"/> and . - There were several static libraries that were not suppressed earlier - in the chapter in order to satisfy the regression tests in several packages. These - libraries are from binutils, bzip2, e2fsprogs, flex, libtool, and zlib. If desired, - remove them now: - -rm -f /usr/lib/lib{bfd,opcodes}.a -rm -f /usr/lib/libctf{,-nobfd}.a -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 -rm -f &usr-lib-m32;/libbz2.a -rm -f &usr-lib-m32;/libltdl.a -rm -f &usr-lib-m32;/libz.a -rm -f &usr-lib-mx32;/libbz2.a -rm -f &usr-lib-mx32;/libltdl.a -rm -f &usr-lib-mx32;/libz.a - There are also several files installed in the /usr/lib and /usr/libexec directories with a file name extension of .la. These are "libtool archive" files. As already said, they are only useful when linking with static diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index e8dfdb0b4..e53ba2733 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -212,6 +212,10 @@ meson --prefix=/usr \ rm -f /usr/bin/xsltproc + Remove an useless directory: + +rm -rf /usr/lib/pam.d + Create the /etc/machine-id file needed by systemd-journald: @@ -228,10 +232,14 @@ meson --prefix=/usr \ systemctl disable systemd-time-wait-sync.service + + diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index 9dfd02b0b..456a4db06 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -42,14 +42,6 @@ Installation of Util-linux - The FHS recommends using the /var/lib/hwclock directory instead of the - usual /etc directory as the - location for the adjtime file. Create this directory - with: - -mkdir -pv /var/lib/hwclock - Prepare Util-linux for compilation: ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ diff --git a/chapter08/zlib.xml b/chapter08/zlib.xml index 16734314b..df26fd06f 100644 --- a/chapter08/zlib.xml +++ b/chapter08/zlib.xml @@ -65,6 +65,10 @@ mv -v /usr/lib/libz.so.* /lib ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so + Remove an useless static library: + +rm -fv /usr/lib/libz.a + @@ -130,7 +134,7 @@ rm -rf DESTDIR Installed libraries - libz.{a,so} + libz.so