diff --git a/README.md b/README.md index e0c0aee..ccbbf4c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ edit **vars.sh** and change the options to suit the desired needs: - PAPERSIZE: the default paper size used by the groff package - MAKECHECK: to run the checks for each package in addition to the build and install process +- TMPASTMPFS: if the mountpoint for /tmp should be set up as tmpfs by systemd start with the LFS chapters: @@ -65,7 +66,7 @@ environment continue with the LFS chapters: - 10.2. Creating the /etc/fstab File -- 10.3. Linux-6.1.11 +- 10.3. Linux - 10.4. Using LFS_GRUB to Set Up the Boot Process - 11.1. The End diff --git a/bash-setup.sh b/bash-setup.sh index d62e007..755fe54 100644 --- a/bash-setup.sh +++ b/bash-setup.sh @@ -19,6 +19,24 @@ cat > /etc/profile << "EOF" # ~/.bash_profile. Personal aliases and functions should go into # ~/.bashrc. +# LFS +for i in $(locale); do + unset ${i%=*} +done + +if [[ "$TERM" = linux ]]; then + export LANG=C.UTF-8 +else + source /etc/locale.conf + + for i in $(locale); do + key=${i%=*} + if [[ -v $key ]]; then + export $key + fi + done +fi + # Functions to help us manage paths. Second argument is the name of the # path variable to be modified (default: PATH) pathremove () { diff --git a/chap5-6.sh b/chap5-6.sh index d9edad4..ac81ebd 100644 --- a/chap5-6.sh +++ b/chap5-6.sh @@ -15,7 +15,9 @@ cd build && --target=$LFS_TGT \ --disable-nls \ --enable-gprofng=no \ - --disable-werror && + --disable-werror \ + --enable-new-dtags \ + --enable-default-hash-style=gnu && make && make install && cd ../.. && @@ -48,7 +50,7 @@ cd build && ../configure \ --target=$LFS_TGT \ --prefix=$LFS/tools \ - --with-glibc-version=2.37 \ + --with-glibc-version=2.40 \ --with-sysroot=$LFS \ --with-newlib \ --without-headers \ @@ -69,7 +71,7 @@ make && make 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 && + $(dirname $($LFS_TGT-gcc -print-libgcc-file-name))/install-tools/include/limits.h && cd .. && rm -rf "$LFS_GCC" && @@ -115,8 +117,9 @@ echo "rootsbindir=/usr/sbin" > configparms && --prefix=/usr \ --host=$LFS_TGT \ --build=$(../scripts/config.guess) \ - --enable-kernel=3.2 \ + --enable-kernel=4.19 \ --with-headers=$LFS/usr/include \ + --disable-nscd \ libc_cv_slibdir=/usr/lib && make && make DESTDIR=$LFS install && @@ -127,7 +130,6 @@ readelf -l a.out | grep ld-linux echo 'If everything is working correctly, there should be no errors, and the output of the last command will be of the form: [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]' sleep 10 rm -v a.out && -$LFS/tools/libexec/gcc/$LFS_TGT/12.2.0/install-tools/mkheaders && cd ../.. && rm -rf "$LFS_GLIBC" && @@ -150,10 +152,10 @@ cd build && --disable-multilib \ --disable-nls \ --disable-libstdcxx-pch \ - --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/12.2.0 && + --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/14.2.0 && make && make DESTDIR=$LFS install && -rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la && +rm -v $LFS/usr/lib/lib{stdc++{,exp,fs},supc++}.la && cd ../.. && rm -rf "$LFS_GCC" && @@ -202,12 +204,13 @@ popd --with-cxx-shared \ --without-debug \ --without-ada \ - --disable-stripping \ - --enable-widec && + --disable-stripping && make && make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install && -echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so && +ln -sv libncursesw.so $LFS/usr/lib/libncurses.so && +sed -e 's/^#if.*XOPEN.*$/#if 1/' \ + -i $LFS/usr/include/curses.h && cd .. && rm -rf "$LFS_NCURSES" && @@ -224,7 +227,8 @@ cd "$LFS_BASH" && ./configure --prefix=/usr \ --build=$(sh support/config.guess) \ --host=$LFS_TGT \ - --without-bash-malloc && + --without-bash-malloc \ + bash_cv_strtold_broken=no && make && make DESTDIR=$LFS install && ln -sv bash $LFS/bin/sh && @@ -265,7 +269,9 @@ echo "Starting 6.6. ""$LFS_DIFFUTILS""" >> build.log tar xf "$LFS_DIFFUTILS".tar.xz && cd "$LFS_DIFFUTILS" && -./configure --prefix=/usr --host=$LFS_TGT && +./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./build-aux/config.guess) && make && make DESTDIR=$LFS install && cd .. && @@ -286,7 +292,7 @@ pushd build ../configure --disable-bzlib \ --disable-libseccomp \ --disable-xzlib \ - --disable-zlib + --disable-zlib && make popd ./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess) && @@ -310,7 +316,6 @@ cd "$LFS_FINDUTILS" && --localstatedir=/var/lib/locate \ --host=$LFS_TGT \ --build=$(build-aux/config.guess) && - make && make DESTDIR=$LFS install && cd .. && @@ -330,7 +335,6 @@ sed -i 's/extras//' Makefile.in && ./configure --prefix=/usr \ --host=$LFS_TGT \ --build=$(build-aux/config.guess) && - make && make DESTDIR=$LFS install && cd .. && @@ -347,7 +351,8 @@ echo "Starting 6.10. ""$LFS_GREP""" >> build.log tar xf "$LFS_GREP".tar.xz && cd "$LFS_GREP" && ./configure --prefix=/usr \ - --host=$LFS_TGT && + --host=$LFS_TGT \ + --build=$(./build-aux/config.guess) && make && make DESTDIR=$LFS install && cd .. && @@ -379,9 +384,6 @@ echo "Starting 6.12. ""$LFS_MAKE""" >> build.log tar xf "$LFS_MAKE".tar.gz && cd "$LFS_MAKE" && -sed -e '/ifdef SIGPIPE/,+2 d' \ - -e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' \ - -i src/main.c && ./configure --prefix=/usr \ --without-guile \ --host=$LFS_TGT \ @@ -420,7 +422,8 @@ echo "Starting 6.14. ""$LFS_SED""" >> build.log tar xf "$LFS_SED".tar.xz && cd "$LFS_SED" && ./configure --prefix=/usr \ - --host=$LFS_TGT && + --host=$LFS_TGT \ + --build=$(./build-aux/config.guess) && make && make DESTDIR=$LFS install && cd .. && @@ -459,7 +462,7 @@ cd "$LFS_XZ" && --host=$LFS_TGT \ --build=$(build-aux/config.guess) \ --disable-static \ - --docdir=/usr/share/doc/"$LFS_XZ" && + --docdir=/usr/share/doc/xz-5.6.2 && make && make DESTDIR=$LFS install && @@ -488,10 +491,12 @@ cd build && --enable-shared \ --enable-gprofng=no \ --disable-werror \ - --enable-64-bit-bfd && + --enable-64-bit-bfd \ + --enable-new-dtags \ + --enable-default-hash-style=gnu && make && make DESTDIR=$LFS install && -rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.{a,la} && +rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la} && cd ../.. && rm -rf "$LFS_BINUTILS" && @@ -534,6 +539,7 @@ cd build && --disable-libatomic \ --disable-libgomp \ --disable-libquadmath \ + --disable-libsanitizer \ --disable-libssp \ --disable-libvtv \ --enable-languages=c,c++ && diff --git a/chap7p1.sh b/chap7p1.sh index 03f1782..0111304 100644 --- a/chap7p1.sh +++ b/chap7p1.sh @@ -7,6 +7,7 @@ mkdir -pv /etc/{opt,sysconfig} && mkdir -pv /lib/firmware && mkdir -pv /media/{floppy,cdrom} && mkdir -pv /usr/{,local/}{include,src} && +mkdir -pv /usr/lib/locale && mkdir -pv /usr/local/{bin,lib,sbin} && mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} && mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} && @@ -55,7 +56,6 @@ dialout:x:10: audio:x:11: video:x:12: utmp:x:13: -usb:x:14: cdrom:x:15: adm:x:16: messagebus:x:18: @@ -76,6 +76,7 @@ wheel:x:97: users:x:999: nogroup:x:65534: EOF +localedef -i C -f UTF-8 C.UTF-8 && echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd && echo "tester:x:101:" >> /etc/group && install -o tester -d /home/tester && diff --git a/chap7p2.sh b/chap7p2.sh index b6440b4..d993c55 100644 --- a/chap7p2.sh +++ b/chap7p2.sh @@ -6,6 +6,7 @@ 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 && + cd /sources && chown root:root build.log && @@ -48,15 +49,16 @@ echo "Starting 7.9 ""$LFS_PERL""" >> build.log tar xf "$LFS_PERL".tar.xz && cd "$LFS_PERL" && -sh Configure -des \ - -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/5.36/core_perl \ - -Darchlib=/usr/lib/perl5/5.36/core_perl \ - -Dsitelib=/usr/lib/perl5/5.36/site_perl \ - -Dsitearch=/usr/lib/perl5/5.36/site_perl \ - -Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/5.36/vendor_perl && +sh Configure -des \ + -D prefix=/usr \ + -D vendorprefix=/usr \ + -D useshrplib \ + -D privlib=/usr/lib/perl5/5.40/core_perl \ + -D archlib=/usr/lib/perl5/5.40/core_perl \ + -D sitelib=/usr/lib/perl5/5.40/site_perl \ + -D sitearch=/usr/lib/perl5/5.40/site_perl \ + -D vendorlib=/usr/lib/perl5/5.40/vendor_perl \ + -D vendorarch=/usr/lib/perl5/5.40/vendor_perl && make && make install && cd .. && @@ -107,19 +109,20 @@ echo "Starting 7.12 ""$LFS_UTILLINUX""" >> build.log tar xf "$LFS_UTILLINUX".tar.xz && cd "$LFS_UTILLINUX" && mkdir -pv /var/lib/hwclock && -./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --libdir=/usr/lib \ - --docdir=/usr/share/doc/util-linux-2.38.1 \ - --disable-chfn-chsh \ - --disable-login \ - --disable-nologin \ - --disable-su \ - --disable-setpriv \ - --disable-runuser \ - --disable-pylibmount \ - --disable-static \ - --without-python \ - runstatedir=/run && +./configure --libdir=/usr/lib \ + --runstatedir=/run \ + --disable-chfn-chsh \ + --disable-login \ + --disable-nologin \ + --disable-su \ + --disable-setpriv \ + --disable-runuser \ + --disable-pylibmount \ + --disable-static \ + --disable-liblastlog2 \ + --without-python \ + ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --docdir=/usr/share/doc/util-linux-2.40.2 && make && make install && cd .. && diff --git a/chap8p1.sh b/chap8p1.sh index 1ab9204..ad348d1 100644 --- a/chap8p1.sh +++ b/chap8p1.sh @@ -8,6 +8,7 @@ echo "Starting 8.3 ""$LFS_MANPAGES""" >> build.log tar xf "$LFS_MANPAGES".tar.xz && cd "$LFS_MANPAGES" && +rm -v man3/crypt* && make prefix=/usr install && cd .. && rm -rf "$LFS_MANPAGES" && @@ -38,17 +39,15 @@ echo "Starting 8.5 ""$LFS_GLIBC""" >> build.log tar xf "$LFS_GLIBC".tar.xz && cd "$LFS_GLIBC" && -patch -Np1 -i ../glibc-2.37-fhs-1.patch && -sed '/width -=/s/workend - string/number_length/' \ - -i stdio-common/vfprintf-process-arg.c && +patch -Np1 -i ../"$LFS_GLIBC"-fhs-1.patch && mkdir -v build && cd build && echo "rootsbindir=/usr/sbin" > configparms && ../configure --prefix=/usr \ --disable-werror \ - --enable-kernel=3.2 \ + --enable-kernel=4.19 \ --enable-stack-protector=strong \ - --with-headers=/usr/include \ + --disable-nscd \ libc_cv_slibdir=/usr/lib && make && if [ "$MAKECHECK" = TRUE ]; then @@ -58,21 +57,17 @@ touch /etc/ld.so.conf && sed '/test-installation/s@$(LFS_PERL)@echo not running@' -i ../Makefile && make install && sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd && -cp -v ../nscd/nscd.conf /etc/nscd.conf && -mkdir -pv /var/cache/nscd && -install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf && -install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service && -make localedata/install-locales +make localedata/install-locales && localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true cat > /etc/nsswitch.conf << "EOF" # Begin /etc/nsswitch.conf -passwd: files -group: files -shadow: files +passwd: files systemd +group: files systemd +shadow: files systemd -hosts: files dns +hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns networks: files protocols: files @@ -82,7 +77,7 @@ rpc: files # End /etc/nsswitch.conf EOF -tar -xf ../../tzdata2022g.tar.gz && +tar -xf ../../tzdata2024a.tar.gz && ZONEINFO=/usr/share/zoneinfo && mkdir -pv $ZONEINFO/{posix,right} && for tz in etcetera southamerica northamerica europe africa antarctica \ @@ -94,8 +89,8 @@ done && cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO && zic -d $ZONEINFO -p America/New_York && unset ZONEINFO && - ln -sfv /usr/share/zoneinfo/UTC /etc/localtime && - cat > /etc/ld.so.conf << "EOF" +ln -sfv /usr/share/zoneinfo/UTC /etc/localtime && +cat > /etc/ld.so.conf << "EOF" # Begin /etc/ld.so.conf /usr/local/lib /opt/lib @@ -172,7 +167,7 @@ tar xf "$LFS_XZ".tar.xz && cd "$LFS_XZ" && ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/xz-5.4.1 && + --docdir=/usr/share/doc/xz-5.6.2 && make && if [ "$MAKECHECK" = TRUE ]; then make check | tee ../check-log_"$LFS_XZ".log; @@ -188,7 +183,26 @@ echo "$LFS_XZ" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.9 ""$LFS_ZSTD""" >> build.log +echo "Starting 8.9 ""$LFS_LZ4""" >> build.log + +tar xf "$LFS_LZ4".tar.gz && +cd "$LFS_LZ4" && +make BUILD_STATIC=no PREFIX=/usr && +if [ "$MAKECHECK" = TRUE ]; then + make -j1 check | tee ../check-log_"$LFS_LZ4".log; +fi +make BUILD_STATIC=no PREFIX=/usr install && +cd .. && +rm -rf "$LFS_LZ4" && + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Finished 8.9 ""$LFS_LZ4""" >> build.log && +echo "$LFS_LZ4" >> /installed.txt + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Starting 8.10 ""$LFS_ZSTD""" >> build.log tar xf "$LFS_ZSTD".tar.gz && cd "$LFS_ZSTD" && @@ -203,12 +217,12 @@ rm -rf "$LFS_ZSTD" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.9 ""$LFS_ZSTD""" >> build.log && +echo "Finished 8.10 ""$LFS_ZSTD""" >> build.log && echo "$LFS_ZSTD" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.10 ""$LFS_FILE""" >> build.log +echo "Starting 8.11 ""$LFS_FILE""" >> build.log tar xf "$LFS_FILE".tar.gz && cd "$LFS_FILE" && @@ -223,36 +237,35 @@ rm -rf "$LFS_FILE" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.10 ""$LFS_FILE""" >> build.log && +echo "Finished 8.11 ""$LFS_FILE""" >> build.log && echo "$LFS_FILE" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.11 ""$LFS_READLINE""" >> build.log +echo "Starting 8.12 ""$LFS_READLINE""" >> build.log tar xf "$LFS_READLINE".tar.gz && cd "$LFS_READLINE" && sed -i '/MV.*old/d' Makefile.in && sed -i '/{OLDSUFF}/c:' support/shlib-install && -patch -Np1 -i ../readline-8.2-upstream_fix-1.patch && ./configure --prefix=/usr \ --disable-static \ --with-curses \ - --docdir=/usr/share/doc/readline-8.2 && + --docdir=/usr/share/doc/readline-8.2.13 && make SHLIB_LIBS="-lncursesw" && make SHLIB_LIBS="-lncursesw" install && -install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.2 && +install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.2.13 && cd .. && rm -rf "$LFS_READLINE" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.11 ""$LFS_READLINE""" >> build.log && +echo "Finished 8.12 ""$LFS_READLINE""" >> build.log && echo "$LFS_READLINE" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.12 ""$LFS_M4""" >> build.log +echo "Starting 8.13 ""$LFS_M4""" >> build.log tar xf "$LFS_M4".tar.xz && cd "$LFS_M4" && @@ -267,12 +280,12 @@ rm -rf "$LFS_M4" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.12 ""$LFS_M4""" >> build.log && +echo "Finished 8.13 ""$LFS_M4""" >> build.log && echo "$LFS_M4" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.13 ""$LFS_BC""" >> build.log +echo "Starting 8.14 ""$LFS_BC""" >> build.log tar xf "$LFS_BC".tar.xz && cd "$LFS_BC" && @@ -287,12 +300,12 @@ rm -rf "$LFS_BC" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.13 ""$LFS_BC""" >> build.log +echo "Finished 8.14 ""$LFS_BC""" >> build.log echo "$LFS_BC" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.14 ""$LFS_FLEX""" >> build.log +echo "Starting 8.15 ""$LFS_FLEX""" >> build.log tar xf "$LFS_FLEX".tar.gz && cd "$LFS_FLEX" && @@ -304,38 +317,40 @@ if [ "$MAKECHECK" = TRUE ]; then make check | tee ../check-log_"$LFS_FLEX".log; fi make install && -ln -sv flex /usr/bin/lex && +ln -sv flex /usr/bin/lex && +ln -sv flex.1 /usr/share/man/man1/lex.1 && cd .. && rm -rf "$LFS_FLEX" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.14 ""$LFS_FLEX""" >> build.log && +echo "Finished 8.15 ""$LFS_FLEX""" >> build.log && echo "$LFS_FLEX" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.15 ""$LFS_TCL""" >> build.log +echo "Starting 8.16 ""$LFS_TCL""" >> build.log tar xf "$LFS_TCL"-src.tar.gz && cd "$LFS_TCL" && SRCDIR=$(pwd) && cd unix && ./configure --prefix=/usr \ - --mandir=/usr/share/man && + --mandir=/usr/share/man \ + --disable-rpath && make && sed -e "s|$SRCDIR/unix|/usr/lib|" \ -e "s|$SRCDIR|/usr/include|" \ -i tclConfig.sh && -sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.5|/usr/lib/tdbc1.1.5|" \ - -e "s|$SRCDIR/pkgs/tdbc1.1.5/generic|/usr/include|" \ - -e "s|$SRCDIR/pkgs/tdbc1.1.5/library|/usr/lib/tcl8.6|" \ - -e "s|$SRCDIR/pkgs/tdbc1.1.5|/usr/include|" \ - -i pkgs/tdbc1.1.5/tdbcConfig.sh && -sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.3|/usr/lib/itcl4.2.3|" \ - -e "s|$SRCDIR/pkgs/itcl4.2.3/generic|/usr/include|" \ - -e "s|$SRCDIR/pkgs/itcl4.2.3|/usr/include|" \ - -i pkgs/itcl4.2.3/itclConfig.sh && +sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.7|/usr/lib/tdbc1.1.7|" \ + -e "s|$SRCDIR/pkgs/tdbc1.1.7/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/tdbc1.1.7/library|/usr/lib/tcl8.6|" \ + -e "s|$SRCDIR/pkgs/tdbc1.1.7|/usr/include|" \ + -i pkgs/tdbc1.1.7/tdbcConfig.sh && +sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.4|/usr/lib/itcl4.2.4|" \ + -e "s|$SRCDIR/pkgs/itcl4.2.4/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/itcl4.2.4|/usr/include|" \ + -i pkgs/itcl4.2.4/itclConfig.sh && unset SRCDIR && if [ "$MAKECHECK" = TRUE ]; then make test | tee ../../check-log_"$LFS_TCL".log; @@ -346,26 +361,28 @@ make install-private-headers && ln -sfv tclsh8.6 /usr/bin/tclsh && mv /usr/share/man/man3/{Thread,Tcl_Thread}.3 && cd .. && -tar -xf ../tcl8.6.13-html.tar.gz --strip-components=1 && -mkdir -v -p /usr/share/doc/tcl-8.6.13 && -cp -v -r ./html/* /usr/share/doc/tcl-8.6.13 && +tar -xf ../tcl8.6.14-html.tar.gz --strip-components=1 && +mkdir -v -p /usr/share/doc/tcl-8.6.14 && +cp -v -r ./html/* /usr/share/doc/tcl-8.6.14 && cd .. && rm -rf "$LFS_TCL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.15 ""$LFS_TCL""" >> build.log && +echo "Finished 8.16 ""$LFS_TCL""" >> build.log && echo "$LFS_TCL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.16 ""$LFS_EXPECT""" >> build.log +echo "Starting 8.17 ""$LFS_EXPECT""" >> build.log tar xf "$LFS_EXPECT".tar.gz && cd "$LFS_EXPECT" && +patch -Np1 -i ../$LFS_EXPECT-gcc14-1.patch && ./configure --prefix=/usr \ --with-tcl=/usr/lib \ --enable-shared \ + --disable-rpath \ --mandir=/usr/share/man \ --with-tclinclude=/usr/include && make && @@ -374,16 +391,17 @@ if [ "$MAKECHECK" = TRUE ]; then fi make install && ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib && -cd .. && rm -rf "$LFS_EXPECT" && +cd .. && +rm -rf "$LFS_EXPECT" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.16 ""$LFS_EXPECT""" >> build.log && +echo "Finished 8.17 ""$LFS_EXPECT""" >> build.log && echo "$LFS_EXPECT" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.17 ""$LFS_DEJAGNU""" >> build.log +echo "Starting 8.18 ""$LFS_DEJAGNU""" >> build.log tar xf "$LFS_DEJAGNU".tar.gz && cd "$LFS_DEJAGNU" && @@ -392,30 +410,47 @@ cd build && ../configure --prefix=/usr && makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi && makeinfo --plaintext -o doc/dejagnu.txt ../doc/dejagnu.texi && -make install && -install -v -dm755 /usr/share/doc/dejagnu-1.6.3 && -install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-1.6.3 && if [ "$MAKECHECK" = TRUE ]; then make check | tee ../../check-log_"$LFS_DEJAGNU".log; fi +make install && +install -v -dm755 /usr/share/doc/dejagnu-1.6.3 && +install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-1.6.3 && cd ../.. && rm -rf "$LFS_DEJAGNU" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.17 ""$LFS_DEJAGNU""" >> build.log && +echo "Finished 8.18 ""$LFS_DEJAGNU""" >> build.log && echo "$LFS_DEJAGNU" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.18 ""$LFS_BINUTILS""" >> build.log +echo "Starting 8.19 ""$LFS_PKGCONF""" >> build.log + +tar xf "$LFS_PKGCONF".tar.xz && +cd "$LFS_PKGCONF" && +./configure --prefix=/usr \ + --disable-static \ + --docdir=/usr/share/doc/pkgconf-2.3.0 && +make && +make install && +ln -sv pkgconf /usr/bin/pkg-config && +ln -sv pkgconf.1 /usr/share/man/man1/pkg-config.1 && +cd ../.. && +rm -rf "$LFS_PKGCONF" && + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Finished 8.19 ""$LFS_PKGCONF""" >> build.log && +echo "$LFS_PKGCONF" >> /installed.txt + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Starting 8.20 ""$LFS_BINUTILS""" >> build.log tar xf "$LFS_BINUTILS".tar.xz && cd "$LFS_BINUTILS" && -echo "Verify that the PTYs are working properly inside the chroot environment" -echo "The output should be: spawn ls" -expect -c "spawn ls" -sleep 5; mkdir -v build && cd build && ../configure --prefix=/usr \ @@ -426,33 +461,34 @@ cd build && --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ - --with-system-zlib && + --enable-new-dtags \ + --with-system-zlib \ + --enable-default-hash-style=gnu && make tooldir=/usr && if [ "$MAKECHECK" = TRUE ]; then make -k check | tee ../../check-log_"$LFS_BINUTILS".log; grep '^FAIL:' $(find -name '*.log') fi make tooldir=/usr install && -rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,sframe,opcodes}.a && -rm -fv /usr/share/man/man1/{gprofng,gp-*}.1 && +rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a && cd ../.. && rm -rf "$LFS_BINUTILS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.18 ""$LFS_BINUTILS""" >> build.log && +echo "Finished 8.20 ""$LFS_BINUTILS""" >> build.log && echo "$LFS_BINUTILS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.19 ""$LFS_GMP""" >> build.log +echo "Starting 8.21 ""$LFS_GMP""" >> build.log tar xf "$LFS_GMP".tar.xz && cd "$LFS_GMP" && ./configure --prefix=/usr \ --enable-cxx \ --disable-static \ - --docdir=/usr/share/doc/gmp-6.2.1 && + --docdir=/usr/share/doc/gmp-6.3.0 && make && make html && if [ "$MAKECHECK" = TRUE ]; then @@ -467,22 +503,19 @@ rm -rf "$LFS_GMP" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.19 ""$LFS_GMP""" >> build.log && +echo "Finished 8.21 ""$LFS_GMP""" >> build.log && echo "$LFS_GMP" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.20 ""$LFS_MPFR""" >> build.log +echo "Starting 8.22 ""$LFS_MPFR""" >> build.log tar xf "$LFS_MPFR".tar.xz && cd "$LFS_MPFR" && -sed -e 's/+01,234,567/+1,234,567 /' \ - -e 's/13.10Pd/13Pd/' \ - -i tests/tsprintf.c && ./configure --prefix=/usr \ --disable-static \ --enable-thread-safe \ - --docdir=/usr/share/doc/mpfr-4.2.0 && + --docdir=/usr/share/doc/mpfr-4.2.1 && make && make html && if [ "$MAKECHECK" = TRUE ]; then @@ -495,12 +528,12 @@ rm -rf "$LFS_MPFR" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.20 ""$LFS_MPFR""" >> build.log && +echo "Finished 8.22 ""$LFS_MPFR""" >> build.log && echo "$LFS_MPFR" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.21 ""$LFS_MPC""" >> build.log +echo "Starting 8.23 ""$LFS_MPC""" >> build.log tar xf "$LFS_MPC".tar.gz && cd "$LFS_MPC" && @@ -519,19 +552,19 @@ rm -rf "$LFS_MPC" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.21 ""$LFS_MPC""" >> build.log && +echo "Finished 8.23 ""$LFS_MPC""" >> build.log && echo "$LFS_MPC" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.22 ""$LFS_ATTR""" >> build.log +echo "Starting 8.24 ""$LFS_ATTR""" >> build.log tar xf "$LFS_ATTR".tar.gz && cd "$LFS_ATTR" && ./configure --prefix=/usr \ --disable-static \ --sysconfdir=/etc \ - --docdir=/usr/share/doc/attr-2.5.1 && + --docdir=/usr/share/doc/attr-2.5.2 && make && if [ "$MAKECHECK" = TRUE ]; then make check | tee ../check-log_"$LFS_ATTR".log; @@ -542,18 +575,18 @@ rm -rf "$LFS_ATTR" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.22 ""$LFS_ATTR""" >> build.log && +echo "Finished 8.24 ""$LFS_ATTR""" >> build.log && echo "$LFS_ATTR" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.23 ""$LFS_ACL""" >> build.log +echo "Starting 8.25 ""$LFS_ACL""" >> build.log tar xf "$LFS_ACL".tar.xz && cd "$LFS_ACL" && ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/acl-2.3.1 && + --docdir=/usr/share/doc/acl-2.3.2 && make && make install && cd .. && @@ -561,12 +594,12 @@ rm -rf "$LFS_ACL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.23 ""$LFS_ACL""" >> build.log && +echo "Finished 8.25 ""$LFS_ACL""" >> build.log && echo "$LFS_ACL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.24 ""$LFS_LIBCAP""" >> build.log +echo "Starting 8.26 ""$LFS_LIBCAP""" >> build.log tar xf "$LFS_LIBCAP".tar.xz && cd "$LFS_LIBCAP" && @@ -581,27 +614,52 @@ rm -rf "$LFS_LIBCAP" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.24 ""$LFS_LIBCAP""" >> build.log && +echo "Finished 8.26 ""$LFS_LIBCAP""" >> build.log && echo "$LFS_LIBCAP" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.25 ""$LFS_SHADOW""" >> build.log +echo "Starting 8.27 ""$LFS_LIBXCRYPT""" >> build.log + +tar xf "$LFS_LIBXCRYPT".tar.xz && +cd "$LFS_LIBXCRYPT" && +./configure --prefix=/usr \ + --enable-hashes=strong,glibc \ + --enable-obsolete-api=no \ + --disable-static \ + --disable-failure-tokens && +make && +if [ "$MAKECHECK" = TRUE ]; then + make check | tee ../check-log_"$LFS_LIBXCRYPT".log; +fi +make install && +cd .. && +rm -rf "$LFS_LIBXCRYPT" && + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Finished 8.27 ""$LFS_LIBXCRYPT""" >> build.log && +echo "$LFS_LIBXCRYPT" >> /installed.txt + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Starting 8.28 ""$LFS_SHADOW""" >> build.log tar xf "$LFS_SHADOW".tar.xz && cd "$LFS_SHADOW" && -sed -i 's/groups$(EXEEXT) //' src/Makefile.in && +sed -i 's/groups$(EXEEXT) //' src/Makefile.in find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; -sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ - -e 's@#\(SHA_CRYPT_..._ROUNDS 5000\)@\100@' \ - -e 's:/var/spool/mail:/var/mail:' \ - -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \ - -i etc/login.defs && +sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \ + -e 's:/var/spool/mail:/var/mail:' \ + -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \ + -i etc/login.defs && touch /usr/bin/passwd && -./configure --sysconfdir=/etc \ - --disable-static \ +./configure --sysconfdir=/etc \ + --disable-static \ + --with-{b,yes}crypt \ + --without-libbsd \ --with-group-name-max-length=32 && make && make exec_prefix=/usr install && @@ -611,7 +669,7 @@ grpconv && mkdir -p /etc/default && useradd -D --gid 999 && # sed -i '/MAIL/s/yes/no/' /etc/default/useradd -echo root:root | chpasswd #Set the root password +echo root:root | chpasswd # Set the root password echo "The password for the user root has been set to 'root'" sleep 5 cd .. && @@ -619,12 +677,12 @@ rm -rf "$LFS_SHADOW" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.25 ""$LFS_SHADOW""" >> build.log && +echo "Finished 8.28 ""$LFS_SHADOW""" >> build.log && echo "$LFS_SHADOW" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.26 ""$LFS_GCC""" >> build.log +echo "Starting 8.29 ""$LFS_GCC""" >> build.log tar xf "$LFS_GCC".tar.xz && cd "$LFS_GCC" && @@ -641,11 +699,18 @@ cd build && --enable-languages=c,c++ \ --enable-default-pie \ --enable-default-ssp \ + --enable-host-pie \ --disable-multilib \ --disable-bootstrap \ + --disable-fixincludes \ --with-system-zlib && make && -ulimit -s 32768 && +ulimit -s -H unlimited && +sed -e '/cpython/d' -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp && +sed -e 's/no-pic /&-no-pie /' -i ../gcc/testsuite/gcc.target/i386/pr113689-1.c && +sed -e 's/300000/(1|300000)/' -i ../libgomp/testsuite/libgomp.c-c++-common/pr109062.c && +sed -e 's/{ target nonpic } //' \ + -e '/GOTPCREL/d' -i ../gcc/testsuite/gcc.target/i386/fentryname3.c && if [ "$MAKECHECK" = TRUE ]; then chown -Rv tester . && su tester -c "PATH=$PATH make -k -j""$JOBS"" check"; @@ -654,9 +719,10 @@ if [ "$MAKECHECK" = TRUE ]; then fi make install && chown -v -R root:root \ - /usr/lib/gcc/$(gcc -dumpmachine)/12.2.0/include{,-fixed} && + /usr/lib/gcc/$(gcc -dumpmachine)/14.2.0/include{,-fixed} && ln -svr /usr/bin/cpp /usr/lib && -ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so \ +ln -sv gcc.1 /usr/share/man/man1/cc.1 && +ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/14.2.0/liblto_plugin.so \ /usr/lib/bfd-plugins/ && echo "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 some sanity checks" echo "There should be no errors, and the output of the last command will be (allowing for platform-specific differences in the dynamic linker name):" @@ -666,16 +732,16 @@ cc dummy.c -v -Wl,--verbose &> dummy.log && readelf -l a.out | grep ': /lib' echo "Now make sure that we're set up to use the correct start files" echo "The output should be:" -echo "/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/Scrt1.o succeeded" -echo "/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/crti.o succeeded" -echo "/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/crtn.o succeeded" +echo "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../lib/Scrt1.o succeeded" +echo "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../lib/crti.o succeeded" +echo "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../lib/crtn.o succeeded" grep -E -o '/usr/lib.*/S?crt[1in].*succeeded' dummy.log echo "Verify that the compiler is searching for the correct header files" echo "The output should be:" echo "#include <...> search starts here:" -echo" /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include" +echo" /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/include" echo" /usr/local/include" -echo" /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include-fixed" +echo" /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/include-fixed" echo" /usr/include" grep -B4 '^ /usr/include' dummy.log echo "Verify that the new linker is being used with the correct search paths" @@ -706,35 +772,16 @@ rm -rf "$LFS_GCC" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.26 ""$LFS_GCC""" >> build.log && +echo "Finished 8.29 ""$LFS_GCC""" >> build.log && echo "$LFS_GCC" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log echo "Starting 8.27 ""$LFS_PKGCONFIG""" >> build.log -tar xf "$LFS_PKGCONFIG".tar.gz && -cd "$LFS_PKGCONFIG" && -./configure --prefix=/usr \ - --with-internal-glib \ - --disable-host-tool \ - --docdir=/usr/share/doc/pkg-config-0.29.2 && -make && -if [ "$MAKECHECK" = TRUE ]; then - make check | tee ../check-log_"$LFS_PKGCONFIG".log; -fi -make install && -cd .. && -rm -rf "$LFS_PKGCONFIG" && - CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.27 ""$LFS_PKGCONFIG""" >> build.log && -echo "$LFS_PKGCONFIG" >> /installed.txt - -CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") -echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.28 ""$LFS_NCURSES""" >> build.log +echo "Starting 8.30 ""$LFS_NCURSES""" >> build.log tar xf "$LFS_NCURSES".tar.gz && cd "$LFS_NCURSES" && @@ -745,34 +792,31 @@ cd "$LFS_NCURSES" && --without-normal \ --with-cxx-shared \ --enable-pc-files \ - --enable-widec \ --with-pkg-config-libdir=/usr/lib/pkgconfig && make && make DESTDIR=$PWD/dest install && -install -vm755 dest/usr/lib/libncursesw.so.6.4 /usr/lib && -rm -v dest/usr/lib/libncursesw.so.6.4 && +install -vm755 dest/usr/lib/libncursesw.so.6.5 /usr/lib && +rm -v dest/usr/lib/libncursesw.so.6.5 && +sed -e 's/^#if.*XOPEN.*$/#if 1/' \ + -i dest/usr/include/curses.h && cp -av dest/* / && 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 + ln -sfv lib${lib}w.so /usr/lib/lib${lib}.so + ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc done && -rm -vf /usr/lib/libcursesw.so && -echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so && -ln -sfv libncurses.so /usr/lib/libcurses.so && -mkdir -pv /usr/share/doc/ncurses-6.4 && -cp -v -R doc/* /usr/share/doc/ncurses-6.4 && +ln -sfv libncursesw.so /usr/lib/libcurses.so && +cp -v -R doc -T /usr/share/doc/ncurses-6.5 && cd .. && rm -rf "$LFS_NCURSES" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.28 ""$LFS_NCURSES""" >> build.log && +echo "Finished 8.30 ""$LFS_NCURSES""" >> build.log && echo "$LFS_NCURSES" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.29 ""$LFS_SED""" >> build.log +echo "Starting 8.31 ""$LFS_SED""" >> build.log tar xf "$LFS_SED".tar.xz && cd "$LFS_SED" && @@ -781,7 +825,7 @@ make && make html && if [ "$MAKECHECK" = TRUE ]; then chown -Rv tester . && - su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_GCC".log; + su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_SED".log; fi make install && install -d -m755 /usr/share/doc/sed-4.9 && @@ -791,38 +835,41 @@ rm -rf "$LFS_SED" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.29 ""$LFS_SED""" >> build.log && +echo "Finished 8.31 ""$LFS_SED""" >> build.log && echo "$LFS_SED" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.30 ""$LFS_PSMISC""" >> build.log +echo "Starting 8.32 ""$LFS_PSMISC""" >> build.log tar xf "$LFS_PSMISC".tar.xz && cd "$LFS_PSMISC" && ./configure --prefix=/usr && make && +if [ "$MAKECHECK" = TRUE ]; then + make check | tee ../check-log_"$LFS_PSMISC".log; +fi make install && cd .. && rm -rf "$LFS_PSMISC" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.30 ""$LFS_PSMISC""" >> build.log && +echo "Finished 8.32 ""$LFS_PSMISC""" >> build.log && echo "$LFS_PSMISC" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.31 ""$LFS_GETTEXT""" >> build.log +echo "Starting 8.33 ""$LFS_GETTEXT""" >> build.log tar xf "$LFS_GETTEXT".tar.xz && cd "$LFS_GETTEXT" && ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/gettext-0.21.1 && + --docdir=/usr/share/doc/gettext-0.22.5 && make && if [ "$MAKECHECK" = TRUE ]; then - make check | tee ../check-log_"$LFS_GCC".log; + make check | tee ../check-log_"$LFS_GETTEXT".log; fi make install && chmod -v 0755 /usr/lib/preloadable_libintl.so && @@ -831,12 +878,12 @@ rm -rf "$LFS_GETTEXT" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.31 ""$LFS_GETTEXT""" >> build.log && +echo "Finished 8.33 ""$LFS_GETTEXT""" >> build.log && echo "$LFS_GETTEXT" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.32 ""$LFS_BISON""" >> build.log +echo "Starting 8.34 ""$LFS_BISON""" >> build.log tar xf "$LFS_BISON".tar.xz && cd "$LFS_BISON" && @@ -851,12 +898,12 @@ rm -rf "$LFS_BISON" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.32 ""$LFS_BISON""" >> build.log && +echo "Finished 8.34 ""$LFS_BISON""" >> build.log && echo "$LFS_BISON" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.33 ""$LFS_GREP""" >> build.log +echo "Starting 8.35 ""$LFS_GREP""" >> build.log tar xf "$LFS_GREP".tar.xz && cd "$LFS_GREP" && @@ -872,19 +919,20 @@ rm -rf "$LFS_GREP" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.33 ""$LFS_GREP""" >> build.log && +echo "Finished 8.35 ""$LFS_GREP""" >> build.log && echo "$LFS_GREP" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.34 ""$LFS_BASH""" >> build.log +echo "Starting 8.36 ""$LFS_BASH""" >> build.log tar xf "$LFS_BASH".tar.gz && cd "$LFS_BASH" && ./configure --prefix=/usr \ --without-bash-malloc \ --with-installed-readline \ - --docdir=/usr/share/doc/bash-5.2.15 && + bash_cv_strtold_broken=no \ + --docdir=/usr/share/doc/bash-5.2.32 && make && if [ "$MAKECHECK" = TRUE ]; then chown -Rv tester . && @@ -902,7 +950,7 @@ rm -rf "$LFS_BASH" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.34 ""$LFS_BASH""" >> build.log && +echo "Finished 8.36 ""$LFS_BASH""" >> build.log && echo "$LFS_BASH" >> /installed.txt echo "Executing new bash, continue with chapter 8 p2:" diff --git a/chap8p2.sh b/chap8p2.sh index 8d526a0..4db6b94 100644 --- a/chap8p2.sh +++ b/chap8p2.sh @@ -4,14 +4,14 @@ source vars.sh CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.35 ""$LFS_LIBTOOL""" >> build.log +echo "Starting 8.37 ""$LFS_LIBTOOL""" >> build.log tar xf "$LFS_LIBTOOL".tar.xz && cd "$LFS_LIBTOOL" && ./configure --prefix=/usr && make && if [ "$MAKECHECK" = TRUE ]; then - TESTSUITEFLAGS=-j"$JOBS" make -k check | tee ../check-log_"$LFS_LIBTOOL".log; + make -k check | tee ../check-log_"$LFS_LIBTOOL".log; fi make install && rm -fv /usr/lib/libltdl.a && @@ -20,12 +20,12 @@ rm -rf "$LFS_LIBTOOL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.35 ""$LFS_LIBTOOL""" >> build.log && +echo "Finished 8.37 ""$LFS_LIBTOOL""" >> build.log && echo "$LFS_LIBTOOL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.36 ""$LFS_GDBM""" >> build.log +echo "Starting 8.38 ""$LFS_GDBM""" >> build.log tar xf "$LFS_GDBM".tar.gz && cd "$LFS_GDBM" && @@ -42,12 +42,12 @@ rm -rf "$LFS_GDBM" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.36 ""$LFS_GDBM""" >> build.log && +echo "Finished 8.38 ""$LFS_GDBM""" >> build.log && echo "$LFS_GDBM" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.37 ""$LFS_GPERF""" >> build.log +echo "Starting 8.39 ""$LFS_GPERF""" >> build.log tar xf "$LFS_GPERF".tar.gz && cd "$LFS_GPERF" && @@ -62,38 +62,39 @@ rm -rf "$LFS_GPERF" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.37 ""$LFS_GPERF""" >> build.log && +echo "Finished 8.39 ""$LFS_GPERF""" >> build.log && echo "$LFS_GPERF" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.38 ""$LFS_EXPAT""" >> build.log +echo "Starting 8.40 ""$LFS_EXPAT""" >> build.log tar xf "$LFS_EXPAT".tar.xz && cd "$LFS_EXPAT" && ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/expat-2.5.0 && + --docdir=/usr/share/doc/expat-2.6.2 && make && if [ "$MAKECHECK" = TRUE ]; then make check | tee ../check-log_"$LFS_EXPAT".log; fi make install && -install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.5.0 && +install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.6.2 && cd .. && rm -rf "$LFS_EXPAT" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.38 ""$LFS_EXPAT""" >> build.log && +echo "Finished 8.40 ""$LFS_EXPAT""" >> build.log && echo "$LFS_EXPAT" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.39 ""$LFS_INETUTILS""" >> build.log +echo "Starting 8.41 ""$LFS_INETUTILS""" >> build.log tar xf "$LFS_INETUTILS".tar.xz && cd "$LFS_INETUTILS" && +sed -i 's/def HAVE_TERMCAP_TGETENT/ 1/' telnet/telnet.c && if [ "$TELNETD" = TRUE ]; then ./configure --prefix=/usr \ --bindir=/usr/bin \ @@ -137,7 +138,7 @@ Accept=yes [Install] WantedBy=sockets.target EOF - cat > /lib/systemd/system/telnetd@.service << "EOF" +cat > /lib/systemd/system/telnetd@.service << "EOF" [Unit] Description=Telnet Per-Connection Server @@ -151,51 +152,54 @@ rm -rf "$LFS_INETUTILS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.39 ""$LFS_INETUTILS""" >> build.log && +echo "Finished 8.41 ""$LFS_INETUTILS""" >> build.log && echo "$LFS_INETUTILS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.40 ""$LFS_LESS""" >> build.log +echo "Starting 8.42 ""$LFS_LESS""" >> build.log tar xf "$LFS_LESS".tar.gz && cd "$LFS_LESS" && ./configure --prefix=/usr --sysconfdir=/etc && make && +if [ "$MAKECHECK" = TRUE ]; then + make check | tee ../check-log_"$LFS_LESS".log; +fi make install && cd .. && rm -rf "$LFS_LESS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.40 ""$LFS_LESS""" >> build.log && +echo "Finished 8.42 ""$LFS_LESS""" >> build.log && echo "$LFS_LESS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.41 ""$LFS_PERL""" >> build.log +echo "Starting 8.43 ""$LFS_PERL""" >> build.log tar xf "$LFS_PERL".tar.xz && cd "$LFS_PERL" && export BUILD_ZLIB=False && export BUILD_BZIP2=0 && -sh Configure -des \ - -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/5.36/core_perl \ - -Darchlib=/usr/lib/perl5/5.36/core_perl \ - -Dsitelib=/usr/lib/perl5/5.36/site_perl \ - -Dsitearch=/usr/lib/perl5/5.36/site_perl \ - -Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/5.36/vendor_perl \ - -Dman1dir=/usr/share/man/man1 \ - -Dman3dir=/usr/share/man/man3 \ - -Dpager="/usr/bin/less -isR" \ - -Duseshrplib \ - -Dusethreads && +sh Configure -des \ + -D prefix=/usr \ + -D vendorprefix=/usr \ + -D privlib=/usr/lib/perl5/5.40/core_perl \ + -D archlib=/usr/lib/perl5/5.40/core_perl \ + -D sitelib=/usr/lib/perl5/5.40/site_perl \ + -D sitearch=/usr/lib/perl5/5.40/site_perl \ + -D vendorlib=/usr/lib/perl5/5.40/vendor_perl \ + -D vendorarch=/usr/lib/perl5/5.40/vendor_perl \ + -D man1dir=/usr/share/man/man1 \ + -D man3dir=/usr/share/man/man3 \ + -D pager="/usr/bin/less -isR" \ + -D useshrplib \ + -D usethreads && make && if [ "$MAKECHECK" = TRUE ]; then - make test | tee ../check-log_"$LFS_PERL".log; + TEST_JOBS=$(nproc) make test_harness | tee ../check-log_"$LFS_PERL".log; fi make install && unset BUILD_ZLIB BUILD_BZIP2 @@ -204,12 +208,12 @@ rm -rf "$LFS_PERL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.41 ""$LFS_PERL""" >> build.log && +echo "Finished 8.43 ""$LFS_PERL""" >> build.log && echo "$LFS_PERL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.42 ""$LFS_XMLPARSER""" >> build.log +echo "Starting 8.44 ""$LFS_XMLPARSER""" >> build.log tar xf "$LFS_XMLPARSER".tar.gz && cd "$LFS_XMLPARSER" && @@ -224,12 +228,12 @@ rm -rf "$LFS_XMLPARSER" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.42 ""$LFS_XMLPARSER""" >> build.log && +echo "Finished 8.44 ""$LFS_XMLPARSER""" >> build.log && echo "$LFS_PERL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.43 ""$LFS_INTLTOOL""" >> build.log +echo "Starting 8.45 ""$LFS_INTLTOOL""" >> build.log tar xf "$LFS_INTLTOOL".tar.gz && cd "$LFS_INTLTOOL" && @@ -246,22 +250,19 @@ rm -rf "$LFS_INTLTOOL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.43 ""$LFS_INTLTOOL""" >> build.log && +echo "Finished 8.45 ""$LFS_INTLTOOL""" >> build.log && echo "$LFS_INTLTOOL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.44 ""$LFS_AUTOCONF""" >> build.log +echo "Starting 8.46 ""$LFS_AUTOCONF""" >> build.log tar xf "$LFS_AUTOCONF".tar.xz && cd "$LFS_AUTOCONF" && -sed -e 's/SECONDS|/&SHLVL|/' \ - -e '/BASH_ARGV=/a\ /^SHLVL=/ d' \ - -i.orig tests/local.at && ./configure --prefix=/usr && make && if [ "$MAKECHECK" = TRUE ]; then - TESTSUITEFLAGS=-j"$JOBS" make check | tee ../check-log_"$LFS_AUTOCONF".log; + make check | tee ../check-log_"$LFS_AUTOCONF".log; fi make install && cd .. && @@ -269,19 +270,19 @@ rm -rf "$LFS_AUTOCONF" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.44 ""$LFS_AUTOCONF""" >> build.log && +echo "Finished 8.46 ""$LFS_AUTOCONF""" >> build.log && echo "$LFS_AUTOCONF" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.45 ""$LFS_AUTOMAKE""" >> build.log +echo "Starting 8.47 ""$LFS_AUTOMAKE""" >> build.log tar xf "$LFS_AUTOMAKE".tar.xz && cd "$LFS_AUTOMAKE" && -./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.5 && +./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.17 && make && if [ "$MAKECHECK" = TRUE ]; then - make -j4 check | tee ../check-log_"$LFS_AUTOMAKE".log; + make -j$(($(nproc)>4?$(nproc):4)) check| tee ../check-log_"$LFS_AUTOMAKE".log; fi make install && cd .. && @@ -289,12 +290,12 @@ rm -rf "$LFS_AUTOMAKE" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.45 ""$LFS_AUTOMAKE""" >> build.log && +echo "Finished 8.47 ""$LFS_AUTOMAKE""" >> build.log && echo "$LFS_AUTOMAKE" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.46 ""$LFS_OPENSSL""" >> build.log +echo "Starting 8.48 ""$LFS_OPENSSL""" >> build.log tar xf "$LFS_OPENSSL".tar.gz && cd "$LFS_OPENSSL" && @@ -305,49 +306,50 @@ cd "$LFS_OPENSSL" && zlib-dynamic && make && if [ "$MAKECHECK" = TRUE ]; then - make test | tee ../check-log_"$LFS_OPENSSL".log; + HARNESS_JOBS=$(nproc) make test | tee ../check-log_"$LFS_OPENSSL".log; fi sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile && make MANSUFFIX=ssl install && -mv -v /usr/share/doc/openssl /usr/share/doc/openssl-3.0.8 && -cp -vfr doc/* /usr/share/doc/openssl-3.0.8 && +mv -v /usr/share/doc/openssl /usr/share/doc/openssl-3.3.1 && +cp -vfr doc/* /usr/share/doc/openssl-3.3.1 && cd .. && rm -rf "$LFS_OPENSSL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.46 ""$LFS_OPENSSL""" >> build.log && +echo "Finished 8.48 ""$LFS_OPENSSL""" >> build.log && echo "$LFS_OPENSSL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.47 ""$LFS_KMOD""" >> build.log +echo "Starting 8.49 ""$LFS_KMOD""" >> build.log tar xf "$LFS_KMOD".tar.xz && cd "$LFS_KMOD" && -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --with-openssl \ - --with-xz \ - --with-zstd \ - --with-zlib && +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --with-openssl \ + --with-xz \ + --with-zstd \ + --with-zlib \ + --disable-manpages && make && make install && for target in depmod insmod modinfo modprobe rmmod; do ln -sfv ../bin/kmod /usr/sbin/$target + rm -fv /usr/bin/$target done && -ln -sfv kmod /usr/bin/lsmod && cd .. && rm -rf "$LFS_KMOD" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.47 ""$LFS_KMOD""" >> build.log && +echo "Finished 8.49 ""$LFS_KMOD""" >> build.log && echo "$LFS_KMOD" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.48 Libelf from ""$LFS_ELFUTILS""" >> build.log +echo "Starting 8.50 Libelf from ""$LFS_ELFUTILS""" >> build.log tar xf "$LFS_ELFUTILS".tar.bz2 && cd "$LFS_ELFUTILS" && @@ -366,12 +368,12 @@ rm -rf "$LFS_ELFUTILS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.48 Libelf from ""$LFS_ELFUTILS""" >> build.log && +echo "Finished 8.50 Libelf from ""$LFS_ELFUTILS""" >> build.log && echo "Libelf from $LFS_ELFUTILS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.49 ""$LFS_LIBFFI""" >> build.log +echo "Starting 8.51 ""$LFS_LIBFFI""" >> build.log tar xf "$LFS_LIBFFI".tar.gz && cd "$LFS_LIBFFI" && @@ -388,60 +390,93 @@ rm -rf "$LFS_LIBFFI" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.49 ""$LFS_LIBFFI""" >> build.log && +echo "Finished 8.51 ""$LFS_LIBFFI""" >> build.log && echo "$LFS_LIBFFI" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.50 ""$LFS_PYTHON""" >> build.log +echo "Starting 8.52 ""$LFS_PYTHON""" >> build.log tar xf "$LFS_PYTHON".tar.xz && cd "$LFS_PYTHON" && ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ - --with-system-ffi \ --enable-optimizations && make && +if [ "$MAKECHECK" = TRUE ]; then + make test TESTOPTS="--timeout 120"| tee ../check-log_"$LFS_PYTHON".log; +fi make install && cat > /etc/pip.conf << EOF [global] root-user-action = ignore disable-pip-version-check = true EOF -install -v -dm755 /usr/share/doc/python-3.11.2/html && -tar --strip-components=1 \ - --no-same-owner \ - --no-same-permissions \ - -C /usr/share/doc/python-3.11.2/html \ - -xvf ../python-3.11.2-docs-html.tar.bz2 && +install -v -dm755 /usr/share/doc/python-3.12.5/html && +tar --no-same-owner \ + -xvf ../python-3.12.5-docs-html.tar.bz2 && +cp -R --no-preserve=mode python-3.12.5-docs-html/* \ + /usr/share/doc/python-3.12.5/html && cd .. && rm -rf "$LFS_PYTHON" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.50 ""$LFS_PYTHON""" >> build.log && +echo "Finished 8.52 ""$LFS_PYTHON""" >> build.log && echo "$LFS_PYTHON" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.51 ""$LFS_WHEEL""" >> build.log +echo "Starting 8.53 ""$LFS_FLITCORE""" >> build.log + +tar xf "$LFS_FLITCORE".tar.gz && +cd "$LFS_FLITCORE" && +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD && +pip3 install --no-index --no-user --find-links dist flit_core && +cd .. && +rm -rf "$LFS_FLITCORE" && + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Finished 8.53 ""$LFS_FLITCORE""" >> build.log && +echo "$LFS_FLITCORE" >> /installed.txt + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Starting 8.54 ""$LFS_WHEEL""" >> build.log tar xf "$LFS_WHEEL".tar.gz && cd "$LFS_WHEEL" && -PYTHONPATH=src pip3 wheel -w dist --no-build-isolation --no-deps $PWD && +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD && pip3 install --no-index --find-links=dist wheel && cd .. && rm -rf "$LFS_WHEEL" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.51 ""$LFS_WHEEL""" >> build.log && +echo "Finished 8.54 ""$LFS_WHEEL""" >> build.log && echo "$LFS_WHEEL" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.52 ""$LFS_NINJA""" >> build.log +echo "Starting 8.55 ""$LFS_SETUPTOOLS""" >> build.log + +tar xf "$LFS_SETUPTOOLS".tar.gz && +cd "$LFS_SETUPTOOLS" && +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD && +pip3 install --no-index --find-links dist setuptools && +cd .. && +rm -rf "$LFS_SETUPTOOLS" && + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Finished 8.55 ""$LFS_SETUPTOOLS""" >> build.log && +echo "$LFS_SETUPTOOLS" >> /installed.txt + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") +echo "$CURRENT_DATE_TIME" >> build.log +echo "Starting 8.56 ""$LFS_NINJA""" >> build.log tar xf "$LFS_NINJA".tar.gz && cd "$LFS_NINJA" && @@ -452,10 +487,6 @@ sed -i '/int Guess/a \ if ( j > 0 ) return j;\ ' src/ninja.cc && python3 configure.py --bootstrap && -if [ "$MAKECHECK" = TRUE ]; then - ./ninja ninja_test | tee ../check-log_"$LFS_NINJA".log; - ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots | tee -a ../check-log_"$LFS_NINJA".log; -fi install -vm755 ninja /usr/bin/ && install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja && install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja && @@ -464,16 +495,16 @@ rm -rf "$LFS_NINJA" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.52 ""$LFS_NINJA""" >> build.log && +echo "Finished 8.56 ""$LFS_NINJA""" >> build.log && echo "$LFS_NINJA" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.53 ""$LFS_MESON""" >> build.log +echo "Starting 8.57 ""$LFS_MESON""" >> build.log tar xf "$LFS_MESON".tar.gz && cd "$LFS_MESON" && -pip3 wheel -w dist --no-build-isolation --no-deps $PWD && +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD && pip3 install --no-index --find-links dist meson && install -vDm644 data/shell-completions/bash/meson /usr/share/bash-completion/completions/meson && install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/_meson && @@ -482,16 +513,16 @@ rm -rf "$LFS_MESON" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.53 ""$LFS_MESON""" >> build.log && +echo "Finished 8.57 ""$LFS_MESON""" >> build.log && echo "$LFS_MESON" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.54 ""$LFS_COREUTILS" >> build.log +echo "Starting 8.58 ""$LFS_COREUTILS" >> build.log tar xf "$LFS_COREUTILS".tar.xz && cd "$LFS_COREUTILS" && -patch -Np1 -i ../coreutils-9.1-i18n-1.patch && +patch -Np1 -i ../$LFS_COREUTILS-i18n-1.patch && autoreconf -fiv && FORCE_UNSAFE_CONFIGURE=1 ./configure \ --prefix=/usr \ @@ -499,10 +530,11 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ make && if [ "$MAKECHECK" = TRUE ]; then make NON_ROOT_USERNAME=tester check-root && - echo "dummy:x:102:tester" >> /etc/group && + groupadd -g 102 dummy -U tester && chown -Rv tester . && - su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" | tee ../check-log_"$LFS_COREUTILS".log; - sed -i '/dummy/d' /etc/group + su tester -c "PATH=$PATH make -k RUN_EXPENSIVE_TESTS=yes check" \ + < /dev/null | tee ../check-log_"$LFS_COREUTILS".log; + groupdel dummy fi make install && mv -v /usr/bin/chroot /usr/sbin && @@ -513,12 +545,12 @@ rm -rf "$LFS_COREUTILS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.54 ""$LFS_COREUTILS" >> build.log && +echo "Finished 8.58 ""$LFS_COREUTILS" >> build.log && echo "$LFS_COREUTILS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.55 ""$LFS_CHECK""" >> build.log +echo "Starting 8.59 ""$LFS_CHECK""" >> build.log tar xf "$LFS_CHECK".tar.gz && cd "$LFS_CHECK" && @@ -533,12 +565,12 @@ rm -rf "$LFS_CHECK" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.55 ""$LFS_CHECK""" >> build.log && +echo "Finished 8.59 ""$LFS_CHECK""" >> build.log && echo "$LFS_CHECK" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.56 ""$LFS_DIFFUTILS""" >> build.log +echo "Starting 8.60 ""$LFS_DIFFUTILS""" >> build.log tar xf "$LFS_DIFFUTILS".tar.xz && cd "$LFS_DIFFUTILS" && @@ -553,12 +585,12 @@ rm -rf "$LFS_DIFFUTILS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.56 ""$LFS_DIFFUTILS""" >> build.log && +echo "Finished 8.60 ""$LFS_DIFFUTILS""" >> build.log && echo "$LFS_DIFFUTILS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.57 ""$LFS_GAWK""" >> build.log +echo "Starting 8.61 ""$LFS_GAWK""" >> build.log tar xf "$LFS_GAWK".tar.xz && cd "$LFS_GAWK" && @@ -566,29 +598,29 @@ sed -i 's/extras//' Makefile.in && ./configure --prefix=/usr && make && if [ "$MAKECHECK" = TRUE ]; then - make check | tee ../check-log_"$LFS_GAWK".log; + chown -R tester . + su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_GAWK".log; fi -make LN='ln -f' install && -mkdir -pv /usr/share/doc/gawk-5.2.1 && -cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.2.1 && +rm -f /usr/bin/gawk-5.3.0; +make install && +ln -sv gawk.1 /usr/share/man/man1/awk.1 && +mkdir -pv /usr/share/doc/gawk-5.3.0 && +cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.3.0 && cd .. && rm -rf "$LFS_GAWK" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.57 ""$LFS_GAWK""" >> build.log && +echo "Finished 8.61 ""$LFS_GAWK""" >> build.log && echo "$LFS_GAWK" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.58 ""$LFS_FINDUTILS""" >> build.log +echo "Starting 8.62 ""$LFS_FINDUTILS""" >> build.log tar xf "$LFS_FINDUTILS".tar.xz && cd "$LFS_FINDUTILS" && -case $(uname -m) in - i?86) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;; - x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;; -esac && +./configure --prefix=/usr --localstatedir=/var/lib/locate && make && if [ "$MAKECHECK" = TRUE ]; then chown -Rv tester . && @@ -600,34 +632,37 @@ rm -rf "$LFS_FINDUTILS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.58 ""$LFS_FINDUTILS""" >> build.log && +echo "Finished 8.62 ""$LFS_FINDUTILS""" >> build.log && echo "$LFS_FINDUTILS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.59 ""$LFS_GROFF""" >> build.log +echo "Starting 8.63 ""$LFS_GROFF""" >> build.log tar xf "$LFS_GROFF".tar.gz && cd "$LFS_GROFF" && PAGE="$PAPERSIZE" ./configure --prefix=/usr && make && +if [ "$MAKECHECK" = TRUE ]; then + make check | tee ../check-log_"$LFS_GROFF".log; +fi make install && cd .. && rm -rf "$LFS_GROFF" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.59 ""$LFS_GROFF""" >> build.log && +echo "Finished 8.63 ""$LFS_GROFF""" >> build.log && echo "$LFS_GROFF" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.60 ""$LFS_GRUB""" >> build.log +echo "Starting 8.64 ""$LFS_GRUB""" >> build.log tar xf "$LFS_GRUB".tar.xz && cd "$LFS_GRUB" && unset {C,CPP,CXX,LD}FLAGS && -patch -Np1 -i ../grub-2.06-upstream_fixes-1.patch && +echo depends bli part_gpt > grub-core/extra_deps.lst && ./configure --prefix=/usr \ --sysconfdir=/etc \ --disable-efiemu \ @@ -640,12 +675,12 @@ rm -rf "$LFS_GRUB" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.60 ""$LFS_GRUB""" >> build.log && +echo "Finished 8.64 ""$LFS_GRUB""" >> build.log && echo "$LFS_GRUB" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.61 ""$LFS_GZIP""" >> build.log +echo "Starting 8.65 ""$LFS_GZIP""" >> build.log tar xf "$LFS_GZIP".tar.xz && cd "$LFS_GZIP" && @@ -660,12 +695,12 @@ rm -rf "$LFS_GZIP" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.61 ""$LFS_GZIP""" >> build.log && +echo "Finished 8.65 ""$LFS_GZIP""" >> build.log && echo "$LFS_GZIP" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.62 ""$LFS_IPROUTE2""" >> build.log +echo "Starting 8.66 ""$LFS_IPROUTE2""" >> build.log tar xf "$LFS_IPROUTE2".tar.xz && cd "$LFS_IPROUTE2" && @@ -673,23 +708,23 @@ sed -i /ARPD/d Makefile && rm -fv man/man8/arpd.8 && make NETNS_RUN_DIR=/run/netns && make SBINDIR=/usr/sbin install && -mkdir -pv /usr/share/doc/iproute2-6.1.0 && -cp -v COPYING README* /usr/share/doc/iproute2-6.1.0 && +mkdir -pv /usr/share/doc/iproute2-6.10.0 && +cp -v COPYING README* /usr/share/doc/iproute2-6.10.0 && cd .. && rm -rf "$LFS_IPROUTE2" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.62 ""$LFS_IPROUTE2""" >> build.log && +echo "Finished 8.66 ""$LFS_IPROUTE2""" >> build.log && echo "$LFS_IPROUTE2" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.63 ""$LFS_KBD""" >> build.log +echo "Starting 8.67 ""$LFS_KBD""" >> build.log tar xf "$LFS_KBD".tar.xz && cd "$LFS_KBD" && -patch -Np1 -i ../kbd-2.5.1-backspace-1.patch && +patch -Np1 -i ../$LFS_KBD-backspace-1.patch && sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure && sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in && ./configure --prefix=/usr --disable-vlock && @@ -698,19 +733,18 @@ if [ "$MAKECHECK" = TRUE ]; then make check | tee ../check-log_"$LFS_KBD".log; fi make install && -mkdir -pv /usr/share/doc/kbd-2.5.1 && -cp -R -v docs/doc/* /usr/share/doc/kbd-2.5.1 && +cp -R -v docs/doc -T /usr/share/doc/kbd-2.6.4 && cd .. && rm -rf "$LFS_KBD" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.63 ""$LFS_KBD""" >> build.log && +echo "Finished 8.67 ""$LFS_KBD""" >> build.log && echo "$LFS_KBD" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.64 ""$LFS_LIBPIPELINE""" >> build.log +echo "Starting 8.68 ""$LFS_LIBPIPELINE""" >> build.log tar xf "$LFS_LIBPIPELINE".tar.gz && cd "$LFS_LIBPIPELINE" && @@ -725,22 +759,20 @@ rm -rf "$LFS_LIBPIPELINE" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.64 ""$LFS_LIBPIPELINE""" >> build.log && +echo "Finished 8.68 ""$LFS_LIBPIPELINE""" >> build.log && echo "$LFS_LIBPIPELINE" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.65 ""$LFS_MAKE""" >> build.log +echo "Starting 8.69 ""$LFS_MAKE""" >> build.log tar xf "$LFS_MAKE".tar.gz && cd "$LFS_MAKE" && -sed -e '/ifdef SIGPIPE/,+2 d' \ - -e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' \ - -i src/main.c && ./configure --prefix=/usr && make && if [ "$MAKECHECK" = TRUE ]; then - make check | tee ../check-log_"$LFS_MAKE".log; + chown -R tester . && + su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_MAKE".log; fi make install && cd .. && @@ -748,12 +780,12 @@ rm -rf "$LFS_MAKE" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.65 ""$LFS_MAKE""" >> build.log && +echo "Finished 8.69 ""$LFS_MAKE""" >> build.log && echo "$LFS_MAKE" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.66 ""$LFS_PATCH""" >> build.log +echo "Starting 8.70 ""$LFS_PATCH""" >> build.log tar xf "$LFS_PATCH".tar.xz && cd "$LFS_PATCH" && @@ -768,12 +800,12 @@ rm -rf "$LFS_PATCH" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "FInished 8.66 ""$LFS_PATCH""" >> build.log && +echo "FInished 8.70 ""$LFS_PATCH""" >> build.log && echo "$LFS_PATCH" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.67 ""$LFS_TAR""" >> build.log +echo "Starting 8.71 ""$LFS_TAR""" >> build.log tar xf "$LFS_TAR".tar.xz && cd "$LFS_TAR" && @@ -784,18 +816,18 @@ if [ "$MAKECHECK" = TRUE ]; then make check | tee ../check-log_"$LFS_TAR".log; fi make install && -make -C doc install-html docdir=/usr/share/doc/tar-1.34 && +make -C doc install-html docdir=/usr/share/doc/tar-1.35 && cd .. && rm -rf "$LFS_TAR" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.67 ""$LFS_TAR""" >> build.log && +echo "Finished 8.71 ""$LFS_TAR""" >> build.log && echo "$LFS_TAR" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.68 ""$LFS_TEXINFO""" >> build.log +echo "Starting 8.72 ""$LFS_TEXINFO""" >> build.log tar xf "$LFS_TEXINFO".tar.xz && cd "$LFS_TEXINFO" && @@ -810,12 +842,12 @@ rm -rf "$LFS_TEXINFO" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.68 ""$LFS_TEXINFO""" >> build.log && +echo "Finished 8.72 ""$LFS_TEXINFO""" >> build.log && echo "$LFS_TEXINFO" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.69 ""$LFS_VIM""" >> build.log +echo "Starting 8.73 ""$LFS_VIM""" >> build.log tar xf "$LFS_VIM".tar.xz && cd "$LFS_VIM" && @@ -824,7 +856,8 @@ echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h && make && if [ "$MAKECHECK" = TRUE ]; then chown -Rv tester .; - su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log; + su tester -c "TERM=xterm-256color LANG=en_US.UTF-8 make -j1 test" \ + &> vim-test.log; cp vim-test.log ../check-log_"$LFS_VIM".log; fi make install && @@ -832,7 +865,7 @@ ln -sv vim /usr/bin/vi && for L in /usr/share/man/{,*/}man1/vim.1; do ln -sv vim.1 $(dirname $L)/vi.1 done && -ln -sv ../vim/vim90/doc /usr/share/doc/vim-9.0.1273 && +ln -sv ../vim/vim91/doc /usr/share/doc/vim-9.1.0660 && cat > /etc/vimrc << "EOF" && " Begin /etc/vimrc @@ -855,73 +888,81 @@ rm -rf "$LFS_VIM" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.69 ""$LFS_VIM""" >> build.log && +echo "Finished 8.73 ""$LFS_VIM""" >> build.log && echo "$LFS_VIM" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.70 ""$LFS_MARKUPSAFE""" >> build.log +echo "Starting 8.74 ""$LFS_MARKUPSAFE""" >> build.log tar xf "$LFS_MARKUPSAFE".tar.gz && cd "$LFS_MARKUPSAFE" && -pip3 wheel -w dist --no-build-isolation --no-deps $PWD && +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD && pip3 install --no-index --no-user --find-links dist Markupsafe && cd .. && rm -rf "$LFS_MARKUPSAFE" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.70 ""$LFS_MARKUPSAFE""" >> build.log && +echo "Finished 8.74 ""$LFS_MARKUPSAFE""" >> build.log && echo "$LFS_MARKUPSAFE" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.71 ""$LFS_JINJA2""" >> build.log +echo "Starting 8.75 ""$LFS_JINJA2""" >> build.log tar xf "$LFS_JINJA2".tar.gz && cd "$LFS_JINJA2" && -pip3 wheel -w dist --no-build-isolation --no-deps $PWD && +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD && pip3 install --no-index --no-user --find-links dist Jinja2 && cd .. && rm -rf "$LFS_JINJA2" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.71 ""$LFS_JINJA2""" >> build.log && +echo "Finished 8.75 ""$LFS_JINJA2""" >> build.log && echo "$LFS_JINJA2" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.72 ""$LFS_SYSTEMD""" >> build.log +echo "Starting 8.76 ""$LFS_SYSTEMD""" >> build.log tar xf "$LFS_SYSTEMD".tar.gz cd "$LFS_SYSTEMD" && -patch -Np1 -i ../systemd-252-security_fix-1.patch && sed -i -e 's/GROUP="render"/GROUP="video"/' \ -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in && mkdir -p build && cd build && -meson --prefix=/usr \ - --buildtype=release \ - -Ddefault-dnssec=no \ - -Dfirstboot=false \ - -Dinstall-tests=false \ - -Dldconfig=false \ - -Dsysusers=false \ - -Drpmmacrosdir=no \ - -Dhomed=false \ - -Duserdb=false \ - -Dman=false \ - -Dmode=release \ - -Dpamconfdir=no \ - -Ddocdir=/usr/share/doc/systemd-252 \ - .. && +meson setup .. \ + --prefix=/usr \ + --buildtype=release \ + -D default-dnssec=no \ + -D firstboot=false \ + -D install-tests=false \ + -D ldconfig=false \ + -D sysusers=false \ + -D rpmmacrosdir=no \ + -D homed=disabled \ + -D userdb=false \ + -D man=disabled \ + -D mode=release \ + -D pamconfdir=no \ + -D dev-kvm-mode=0660 \ + -D nobody-group=nogroup \ + -D sysupdate=disabled \ + -D ukify=disabled \ + -D docdir=/usr/share/doc/systemd-256.4 && ninja && +if [ "$MAKECHECK" = TRUE ]; then + echo 'NAME="Linux From Scratch"' > /etc/os-release && + ninja test | tee ../check-log_"$LFS_SYSTEMD".log; +fi ninja install && -tar -xf ../../systemd-man-pages-252-2.tar.xz --strip-components=1 -C /usr/share/man && +tar -xf ../../systemd-man-pages-256.4.tar.xz \ + --no-same-owner --strip-components=1 \ + -C /usr/share/man && systemd-machine-id-setup && systemctl preset-all && -systemctl disable systemd-sysupdate{,-reboot} && if [ "$TELNETD" = TRUE ]; then systemctl enable telnetd.socket fi && @@ -930,12 +971,12 @@ rm -rf "$LFS_SYSTEMD" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.72 ""$LFS_SYSTEMD""" >> build.log && +echo "Finished 8.76 ""$LFS_SYSTEMD""" >> build.log && echo "$LFS_SYSTEMD" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.73 ""$LFS_DBUS""" >> build.log +echo "Starting 8.77 ""$LFS_DBUS""" >> build.log tar xf "$LFS_DBUS".tar.xz && cd "$LFS_DBUS" && @@ -943,12 +984,16 @@ cd "$LFS_DBUS" && --sysconfdir=/etc \ --localstatedir=/var \ --runstatedir=/run \ + --enable-user-session \ --disable-static \ --disable-doxygen-docs \ --disable-xml-docs \ - --docdir=/usr/share/doc/dbus-1.14.6 \ + --docdir=/usr/share/doc/dbus-1.14.10 \ --with-system-socket=/run/dbus/system_bus_socket && make && +if [ "$MAKECHECK" = TRUE ]; then + make check | tee ../check-log_"$LFS_DBUS".log; +fi make install && ln -sfv /etc/machine-id /var/lib/dbus && cd .. && @@ -956,17 +1001,17 @@ rm -rf "$LFS_DBUS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.73 ""$LFS_DBUS""" >> build.log && +echo "Finished 8.77 ""$LFS_DBUS""" >> build.log && echo "$LFS_DBUS" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.74 ""$LFS_MANDB""" >> build.log +echo "Starting 8.78 ""$LFS_MANDB""" >> build.log tar xf "$LFS_MANDB".tar.xz && cd "$LFS_MANDB" && ./configure --prefix=/usr \ - --docdir=/usr/share/doc/man-db-2.11.2 \ + --docdir=/usr/share/doc/man-db-2.12.1 \ --sysconfdir=/etc \ --disable-setuid \ --enable-cache-owner=bin \ @@ -983,23 +1028,24 @@ rm -rf "$LFS_MANDB" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.74 ""$LFS_MANDB""" >> build.log && +echo "Finished 8.78 ""$LFS_MANDB""" >> build.log && echo "$LFS_MANDB" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.75 ""$LFS_PROCPSNG""" >> build.log +echo "Starting 8.79 ""$LFS_PROCPSNG""" >> build.log tar xf "$LFS_PROCPSNG".tar.xz cd "$LFS_PROCPSNG" && ./configure --prefix=/usr \ - --docdir=/usr/share/doc/procps-ng-4.0.2 \ + --docdir=/usr/share/doc/procps-ng-4.0.4 \ --disable-static \ --disable-kill \ --with-systemd && -make && +make src_w_LDADD='$(LDADD) -lsystemd' && if [ "$MAKECHECK" = TRUE ]; then - make check | tee ../check-log_"$LFS_MANDB".log; + chown -R tester . + su tester -c "PATH=$PATH make check" | tee ../check-log_"$LFS_MANDB".log; fi make install && cd .. && @@ -1007,29 +1053,31 @@ rm -rf "$LFS_PROCPSNG" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.75 ""$LFS_PROCPSNG""" >> build.log && +echo "Finished 8.79 ""$LFS_PROCPSNG""" >> build.log && echo "$LFS_PROCPSNG" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.76 ""$LFS_UTILLINUX""" >> build.log +echo "Starting 8.80 ""$LFS_UTILLINUX""" >> build.log tar xf "$LFS_UTILLINUX".tar.xz && cd "$LFS_UTILLINUX" && -./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --bindir=/usr/bin \ - --libdir=/usr/lib \ - --sbindir=/usr/sbin \ - --disable-chfn-chsh \ - --disable-login \ - --disable-nologin \ - --disable-su \ - --disable-setpriv \ - --disable-runuser \ - --disable-pylibmount \ - --disable-static \ - --without-python \ - --docdir=/usr/share/doc/util-linux-2.38.1 && +./configure --bindir=/usr/bin \ + --libdir=/usr/lib \ + --runstatedir=/run \ + --sbindir=/usr/sbin \ + --disable-chfn-chsh \ + --disable-login \ + --disable-nologin \ + --disable-su \ + --disable-setpriv \ + --disable-runuser \ + --disable-pylibmount \ + --disable-liblastlog2 \ + --disable-static \ + --without-python \ + ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --docdir=/usr/share/doc/util-linux-2.40.2 && make && make install && cd .. && @@ -1037,12 +1085,12 @@ rm -rf "$LFS_UTILLINUX" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.76 ""$LFS_UTILLINUX""" >> build.log && +echo "Finished 8.80 ""$LFS_UTILLINUX""" >> build.log && echo "$LFS_UTILLINUX" >> /installed.txt CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Starting 8.77 ""$LFS_E2FSPROGS""" >> build.log +echo "Starting 8.81 ""$LFS_E2FSPROGS""" >> build.log tar xf "$LFS_E2FSPROGS".tar.gz && cd "$LFS_E2FSPROGS" && @@ -1071,33 +1119,34 @@ rm -rf "$LFS_E2FSPROGS" && CURRENT_DATE_TIME=$(date +"%Y-%m-%d %T") echo "$CURRENT_DATE_TIME" >> build.log -echo "Finished 8.77 ""$LFS_E2FSPROGS""" >> build.log && +echo "Finished 8.81 ""$LFS_E2FSPROGS""" >> build.log && echo "$LFS_E2FSPROGS" >> /installed.txt save_usrlib="$(cd /usr/lib; ls ld-linux*[^g]) libc.so.6 libthread_db.so.1 libquadmath.so.0.0.0 - libstdc++.so.6.0.30 + libstdc++.so.6.0.33 libitm.so.1.0.0 libatomic.so.1.2.0" && cd /usr/lib && for LIB in $save_usrlib; do - objcopy --only-keep-debug $LIB $LIB.dbg + objcopy --only-keep-debug --compress-debug-sections=zlib $LIB $LIB.dbg cp $LIB /tmp/$LIB strip --strip-unneeded /tmp/$LIB objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB install -vm755 /tmp/$LIB /usr/lib rm /tmp/$LIB done && -online_usrbin="bash find strip" && -online_usrlib="libbfd-2.40.so - libsframe.so.0.0.0 +online_usrbin="bash find strip" +online_usrlib="libbfd-2.43.1.so + libsframe.so.1.0.0 libhistory.so.8.2 - libncursesw.so.6.4 + libncursesw.so.6.5 libm.so.6 libreadline.so.8.2 - libz.so.1.2.13 + libz.so.1.3.1 + libzstd.so.1.5.6 $(cd /usr/lib; find libnss*.so* -type f)" && for BIN in $online_usrbin; do cp /usr/bin/$BIN /tmp/$BIN @@ -1123,7 +1172,7 @@ for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \ done && unset BIN LIB save_usrlib online_usrbin online_usrlib && -rm -rf /tmp/* && +rm -rf /tmp/{*,.*} && find /usr/lib /usr/libexec -name \*.la -delete && find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf && userdel -r tester && @@ -1157,6 +1206,28 @@ EOF cat > /etc/locale.conf << EOF && LANG="$LOCALE" EOF +cat > /etc/profile << "EOF" && +# Begin /etc/profile + +for i in $(locale); do + unset ${i%=*} +done + +if [[ "$TERM" = linux ]]; then + export LANG=C.UTF-8 +else + source /etc/locale.conf + + for i in $(locale); do + key=${i%=*} + if [[ -v $key ]]; then + export $key + fi + done +fi + +# End /etc/profile +EOF cat > /etc/inputrc << "EOF" && # Begin /etc/inputrc # Modified by Chris Lynn @@ -1213,7 +1284,9 @@ cat > /etc/systemd/system/getty@tty1.service.d/noclear.conf << EOF && [Service] TTYVTDisallocate=yes EOF -# ln -sfv /dev/null /etc/systemd/system/tmp.mount +if [ "$TMPASTMPFS" != TRUE ]; then + ln -sfv /dev/null /etc/systemd/system/tmp.mount +fi mkdir -pv /etc/systemd/coredump.conf.d && cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF [Coredump] diff --git a/chroot.sh b/chroot.sh index 7685356..6c8ad9e 100644 --- a/chroot.sh +++ b/chroot.sh @@ -2,20 +2,20 @@ source vars.sh -chown -R root:root "$LFS"/{usr,lib,var,etc,bin,sbin,tools} && +chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} && case $(uname -m) in - x86_64) chown -R root:root "$LFS"/lib64 ;; + x86_64) chown --from lfs -R root:root $LFS/lib64 ;; esac && -mkdir -pv "$LFS"/{dev,proc,sys,run} && -mount -v --bind /dev "$LFS"/dev && -mount -v --bind /dev/pts "$LFS"/dev/pts && -mount -vt proc proc "$LFS"/proc && -mount -vt sysfs sysfs "$LFS"/sys && -mount -vt tmpfs tmpfs "$LFS"/run && -if [ -h "$LFS"/dev/shm ]; then - mkdir -pv "$LFS"/"$(readlink "$LFS"/dev/shm)" +mkdir -pv $LFS/{dev,proc,sys,run} && +mount -v --bind /dev $LFS/dev && +mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts && +mount -vt proc proc $LFS/proc && +mount -vt sysfs sysfs $LFS/sys && +mount -vt tmpfs tmpfs $LFS/run && +if [ -h $LFS/dev/shm ]; then + install -v -d -m 1777 $LFS$(realpath /dev/shm) else - mount -t tmpfs -o nosuid,nodev tmpfs "$LFS"/dev/shm + mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm fi echo "Entering now the chroot environment, continue with chapter 7 p1:" @@ -26,4 +26,6 @@ chroot "$LFS" /usr/bin/env -i \ TERM="$TERM" \ PS1='(lfs chroot) \u:\w\$ ' \ PATH=/usr/bin:/usr/sbin \ + MAKEFLAGS="-j$(nproc)" \ + TESTSUITEFLAGS="-j$(nproc)" \ /bin/bash --login diff --git a/re-chroot.sh b/re-chroot.sh index 66b6566..eb58728 100644 --- a/re-chroot.sh +++ b/re-chroot.sh @@ -2,15 +2,15 @@ source vars.sh -mount -v --bind /dev "$LFS"/dev && -mount -v --bind /dev/pts "$LFS"/dev/pts && -mount -vt proc proc "$LFS"/proc && -mount -vt sysfs sysfs "$LFS"/sys && -mount -vt tmpfs tmpfs "$LFS"/run && -if [ -h "$LFS"/dev/shm ]; then - mkdir -pv "$LFS"/"$(readlink "$LFS"/dev/shm)" +mount -v --bind /dev $LFS/dev&& +mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts && +mount -vt proc proc $LFS/proc && +mount -vt sysfs sysfs $LFS/sys && +mount -vt tmpfs tmpfs $LFS/run && +if [ -h $LFS/dev/shm ]; then + install -v -d -m 1777 $LFS$(realpath /dev/shm) else - mount -t tmpfs -o nosuid,nodev tmpfs "$LFS"/dev/shm + mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm fi echo "Entering now the chroot environment" @@ -20,4 +20,6 @@ chroot "$LFS" /usr/bin/env -i \ TERM="$TERM" \ PS1='(lfs chroot) \u:\w\$ ' \ PATH=/usr/bin:/usr/sbin \ + MAKEFLAGS="-j$(nproc)" \ + TESTSUITEFLAGS="-j$(nproc)" \ /bin/bash --login diff --git a/vars.sh b/vars.sh index f5e376e..151aeba 100644 --- a/vars.sh +++ b/vars.sh @@ -11,82 +11,87 @@ export KEYMAP="de-latin1" # default "en" export LOCALE="en_US.utf8" export TELNETD=TRUE export MAKECHECK=FALSE +export TMPASTMPFS=TRUE export LFS="/mnt/lfs" -export LFS_BINUTILS="binutils-2.40" -export LFS_GCC="gcc-12.2.0" -export LFS_LINUX="linux-6.1.11" +export LFS_BINUTILS="binutils-2.43.1" +export LFS_GCC="gcc-14.2.0" +export LFS_LINUX="linux-6.10.5" +export LFS_GLIBC="glibc-2.40" +export LFS_BASH="bash-5.2.32" export LFS_M4="m4-1.4.19" -export LFS_GLIBC="glibc-2.37" -export LFS_BASH="bash-5.2.15" -export LFS_COREUTILS="coreutils-9.1" -export LFS_DIFFUTILS="diffutils-3.9" -export LFS_FILE="file-5.44" -export LFS_FINDUTILS="findutils-4.9.0" -export LFS_GAWK="gawk-5.2.1" -export LFS_GREP="grep-3.8" -export LFS_GZIP="gzip-1.12" -export LFS_MAKE="make-4.4" +export LFS_COREUTILS="coreutils-9.5" +export LFS_DIFFUTILS="diffutils-3.10" +export LFS_FILE="file-5.45" +export LFS_FINDUTILS="findutils-4.10.0" +export LFS_GAWK="gawk-5.3.0" +export LFS_GREP="grep-3.11" +export LFS_GZIP="gzip-1.13" +export LFS_MAKE="make-4.4.1" export LFS_PATCH="patch-2.7.6" export LFS_SED="sed-4.9" -export LFS_TAR="tar-1.34" -export LFS_XZ="xz-5.4.1" -export LFS_GETTEXT="gettext-0.21.1" +export LFS_TAR="tar-1.35" +export LFS_XZ="xz-5.6.2" +export LFS_GETTEXT="gettext-0.22.5" export LFS_BISON="bison-3.8.2" -export LFS_PERL="perl-5.36.0" -export LFS_PYTHON="Python-3.11.2" -export LFS_TEXINFO="texinfo-7.0.2" -export LFS_UTILLINUX="util-linux-2.38.1" -export LFS_MANPAGES="man-pages-6.03" -export LFS_IANAETC="iana-etc-20230202" -export LFS_ZLIB="zlib-1.2.13" +export LFS_PERL="perl-5.40.0" +export LFS_PYTHON="Python-3.12.5" +export LFS_TEXINFO="texinfo-7.1" +export LFS_UTILLINUX="util-linux-2.40.2" +export LFS_MANPAGES="man-pages-6.9.1" +export LFS_IANAETC="iana-etc-20240806" +export LFS_ZLIB="zlib-1.3.1" +export LFS_LZ4="lz4-1.10.0" export LFS_BZIP2="bzip2-1.0.8" -export LFS_ZSTD="zstd-1.5.4" -export LFS_READLINE="readline-8.2" -export LFS_BC="bc-6.2.4" +export LFS_ZSTD="zstd-1.5.6" +export LFS_READLINE="readline-8.2.13" +export LFS_BC="bc-6.7.6" export LFS_FLEX="flex-2.6.4" -export LFS_TCL="tcl8.6.13" +export LFS_TCL="tcl8.6.14" export LFS_EXPECT="expect5.45.4" export LFS_DEJAGNU="dejagnu-1.6.3" -export LFS_MPFR="mpfr-4.2.0" -export LFS_GMP="gmp-6.2.1" +export LFS_PKGCONF="pkgconf-2.3.0" +export LFS_GMP="gmp-6.3.0" +export LFS_MPFR="mpfr-4.2.1" export LFS_MPC="mpc-1.3.1" -export LFS_ATTR="attr-2.5.1" -export LFS_ACL="acl-2.3.1" -export LFS_LIBCAP="libcap-2.67" -export LFS_SHADOW="shadow-4.13" -export LFS_PKGCONFIG="pkg-config-0.29.2" -export LFS_NCURSES="ncurses-6.4" -export LFS_PSMISC="psmisc-23.6" +export LFS_ATTR="attr-2.5.2" +export LFS_ACL="acl-2.3.2" +export LFS_LIBCAP="libcap-2.70" +export LFS_LIBXCRYPT="libxcrypt-4.4.36" +export LFS_SHADOW="shadow-4.16.0" +export LFS_NCURSES="ncurses-6.5" +export LFS_PSMISC="psmisc-23.7" export LFS_LIBTOOL="libtool-2.4.7" -export LFS_GDBM="gdbm-1.23" +export LFS_GDBM="gdbm-1.24" export LFS_GPERF="gperf-3.1" -export LFS_EXPAT="expat-2.5.0" -export LFS_INETUTILS="inetutils-2.4" -export LFS_LESS="less-608" -export LFS_XMLPARSER="XML-Parser-2.46" +export LFS_EXPAT="expat-2.6.2" +export LFS_INETUTILS="inetutils-2.5" +export LFS_LESS="less-661" +export LFS_XMLPARSER="XML-Parser-2.47" export LFS_INTLTOOL="intltool-0.51.0" -export LFS_AUTOCONF="autoconf-2.71" -export LFS_AUTOMAKE="automake-1.16.5" -export LFS_OPENSSL="openssl-3.0.8" -export LFS_KMOD="kmod-30" -export LFS_ELFUTILS="elfutils-0.188" -export LFS_LIBFFI="libffi-3.4.4" -export LFS_WHEEL="wheel-0.38.4" -export LFS_NINJA="ninja-1.11.1" -export LFS_MESON="meson-1.0.0" +export LFS_AUTOCONF="autoconf-2.72" +export LFS_AUTOMAKE="automake-1.17" +export LFS_OPENSSL="openssl-3.3.1" +export LFS_KMOD="kmod-33" +export LFS_ELFUTILS="elfutils-0.191" +export LFS_LIBFFI="libffi-3.4.6" +export LFS_FLITCORE="flit_core-3.9.0" +export LFS_WHEEL="wheel-0.44.0" +export LFS_SETUPTOOLS="setuptools-72.2.0" +export LFS_NINJA="ninja-1.12.1" +export LFS_MESON="meson-1.5.1" export LFS_CHECK="check-0.15.2" -export LFS_GROFF="groff-1.22.4" -export LFS_GRUB="grub-2.06" -export LFS_IPROUTE2="iproute2-6.1.0" -export LFS_KBD="kbd-2.5.1" +export LFS_GROFF="groff-1.23.0" +export LFS_GRUB="grub-2.12" +export LFS_IPROUTE2="iproute2-6.10.0" +export LFS_KBD="kbd-2.6.4" export LFS_LIBPIPELINE="libpipeline-1.5.7" -export LFS_VIM="vim-9.0.1273" -export LFS_MARKUPSAFE="MarkupSafe-2.1.2" -export LFS_JINJA2="Jinja2-3.1.2" -export LFS_SYSTEMD="systemd-252" -export LFS_DBUS="dbus-1.14.6" -export LFS_MANDB="man-db-2.11.2" -export LFS_PROCPSNG="procps-ng-4.0.2" -export LFS_E2FSPROGS="e2fsprogs-1.47.0" \ No newline at end of file +export LFS_VIM="vim-9.1.0660" +export LFS_MARKUPSAFE="MarkupSafe-2.1.5" +export LFS_JINJA2="Jinja2-3.1.4" +export LFS_SYSTEMD="systemd-256.4" +export LFS_DBUS="dbus-1.14.10" +export LFS_MANDB="man-db-2.12.1" +export LFS_PROCPSNG="procps-ng-4.0.4" +export LFS_E2FSPROGS="e2fsprogs-1.47.1" \ No newline at end of file diff --git a/version-check.sh b/version-check.sh index 46ca604..ba2323b 100644 --- a/version-check.sh +++ b/version-check.sh @@ -1,53 +1,90 @@ #!/bin/bash -# Simple script to list version numbers of critical development tools -export LC_ALL=C -bash --version | head -n1 | cut -d" " -f2-4 -MYSH=$(readlink -f /bin/sh) -echo "/bin/sh -> $MYSH" -echo "$MYSH" | grep -q bash || echo "ERROR: /bin/sh does not point to bash" -unset MYSH +# A script to list version numbers of critical development tools -echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3- -bison --version | head -n1 +# If you have tools installed in other directories, adjust PATH here AND +# in ~lfs/.bashrc (section 4.4) as well. -if [ -h /usr/bin/yacc ]; then - echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"; -elif [ -x /usr/bin/yacc ]; then - echo yacc is `/usr/bin/yacc --version | head -n1` +LC_ALL=C +PATH=/usr/bin:/bin + +bail() { echo "FATAL: $1"; exit 1; } +grep --version > /dev/null 2> /dev/null || bail "grep does not work" +sed '' /dev/null || bail "sed does not work" +sort /dev/null || bail "sort does not work" + +ver_check() +{ + if ! type -p $2 &>/dev/null + then + echo "ERROR: Cannot find $2 ($1)"; return 1; + fi + v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1) + if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null + then + printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0; + else + printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1"; + return 1; + fi +} + +ver_kernel() +{ + kver=$(uname -r | grep -E -o '^[0-9\.]+') + if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null + then + printf "OK: Linux Kernel $kver >= $1\n"; return 0; + else + printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver"; + return 1; + fi +} + +# Coreutils first because --version-sort needs Coreutils >= 7.0 +ver_check Coreutils sort 8.1 || bail "Coreutils too old, stop" +ver_check Bash bash 3.2 +ver_check Binutils ld 2.13.1 +ver_check Bison bison 2.7 +ver_check Diffutils diff 2.8.1 +ver_check Findutils find 4.2.31 +ver_check Gawk gawk 4.0.1 +ver_check GCC gcc 5.2 +ver_check "GCC (C++)" g++ 5.2 +ver_check Grep grep 2.5.1a +ver_check Gzip gzip 1.3.12 +ver_check M4 m4 1.4.10 +ver_check Make make 4.0 +ver_check Patch patch 2.5.4 +ver_check Perl perl 5.8.8 +ver_check Python python3 3.4 +ver_check Sed sed 4.1.5 +ver_check Tar tar 1.22 +ver_check Texinfo texi2any 5.0 +ver_check Xz xz 5.0.0 +ver_kernel 4.19 + +if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ] +then echo "OK: Linux Kernel supports UNIX 98 PTY"; +else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi + +alias_check() { + if $1 --version 2>&1 | grep -qi $2 + then printf "OK: %-4s is $2\n" "$1"; + else printf "ERROR: %-4s is NOT $2\n" "$1"; fi +} +echo "Aliases:" +alias_check awk GNU +alias_check yacc Bison +alias_check sh Bash + +echo "Compiler check:" +if printf "int main(){}" | g++ -x c++ - +then echo "OK: g++ works"; +else echo "ERROR: g++ does NOT work"; fi +rm -f a.out + +if [ "$(nproc)" = "" ]; then + echo "ERROR: nproc is not available or it produces empty output" else - echo "yacc not found" -fi - -echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2 -diff --version | head -n1 -find --version | head -n1 -gawk --version | head -n1 - -if [ -h /usr/bin/awk ]; then - echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`"; -elif [ -x /usr/bin/awk ]; then - echo awk is `/usr/bin/awk --version | head -n1` -else - echo "awk not found" -fi - -gcc --version | head -n1 -g++ --version | head -n1 -grep --version | head -n1 -gzip --version | head -n1 -cat /proc/version -m4 --version | head -n1 -make --version | head -n1 -patch --version | head -n1 -echo Perl `perl -V:version` -python3 --version -sed --version | head -n1 -tar --version | head -n1 -makeinfo --version | head -n1 # texinfo version -xz --version | head -n1 - -echo 'int 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 \ No newline at end of file + echo "OK: nproc reports $(nproc) logical cores are available" +fi \ No newline at end of file