diff --git a/README.md b/README.md index 5c7d9d1..8655365 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ The script builds LFS by completing the following steps: 6. Begin to build tools required for minimal chroot environment. (chapter 6) -7. Enter chroot environment, and build remaing tools needed to build the entire LFS system. (chapter 7) +7. Enter chroot environment, and build remaining tools needed to build the entire LFS system. (chapter 7) 8. Build the entire LFS system from within chroot envirnment, including the kernel, GRUB, and others. (chapter 8) diff --git a/config.sh b/config.sh index 6124e05..594b456 100644 --- a/config.sh +++ b/config.sh @@ -4,8 +4,8 @@ FULLPATH=$(cd $(dirname $0) && pwd) -export LFS_VERSION=11.2 -export KERNELVERS=5.19.2 +export LFS_VERSION=12.4 +export KERNELVERS=6.16.1 export PACKAGE_LIST=$FULLPATH/packages.sh export PACKAGE_DIR=$FULLPATH/packages export LOG_DIR=$FULLPATH/logs @@ -15,7 +15,7 @@ export INSTALL_MOUNT=$FULLPATH/mnt/install export LFS_TGT=$(uname -m)-lfs-linux-gnu export LFS_FS=ext4 export LFS_IMG=$FULLPATH/lfs.img -export LFS_IMG_SIZE=$((10*1024*1024*1024)) # 10 GiB +export LFS_IMG_SIZE=$((20*1024*1024*1024)) # 20 GiB export TESTLOG_DIR=$FULLPATH/testlogs export LFSROOTLABEL=LFSROOT export LFSEFILABEL=LFSEFI diff --git a/mylfs.sh b/mylfs.sh index b46d749..93f5d8d 100755 --- a/mylfs.sh +++ b/mylfs.sh @@ -121,6 +121,7 @@ function check_dependencies { check_dependency perl_vers 5.8.8 "" perl check_dependency python3 3.4 check_dependency sed 4.1.5 + check_dependency sort 8.1 check_dependency tar 1.22 check_dependency texi2any 5.0 "" texinfo check_dependency xz 5.0.0 @@ -137,6 +138,11 @@ function check_dependencies { echo "WARNING: /usr/bin/awk should be a link to /usr/bin/gawk" fi + # TODO check that /bin/sh is a link to /bin/bash + #if [ ! -h /bin/sh -a "$(readlink -f /bin/sh)"="/bin/bash" ] + #then + # echo "WARNING: /bin/sh should be a link to /bin/bash" + # check G++ compilation echo 'int main(){}' > dummy.c && g++ -o dummy dummy.c if [ ! -x dummy ] @@ -209,6 +215,8 @@ function init_image { # reattach loop device to re-read partition table losetup -d $LOOP + # wait a couple seconds otherwise it doesn't work + sleep 2 losetup -P $LOOP $LFS_IMG # exporting for grub.cfg @@ -414,10 +422,11 @@ function unmount_image { local MOUNTED_LOCS=$(mount | grep "$LFS\|$INSTALL_MOUNT") if [ -n "$MOUNTED_LOCS" ]; then + sleep 2 echo "$MOUNTED_LOCS" | cut -d" " -f3 | tac | xargs umount fi - # detatch loop device + # detach loop device local ATTACHED_LOOP=$(losetup | grep $LFS_IMG) if [ -n "$ATTACHED_LOOP" ] then diff --git a/packages.sh b/packages.sh index 29dbf42..071849b 100644 --- a/packages.sh +++ b/packages.sh @@ -1,86 +1,90 @@ -export PKG_ACL=https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz -export PKG_ATTR=https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz -export PKG_AUTOCONF=https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz -export PKG_AUTOMAKE=https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz -export PKG_BASH=https://ftp.gnu.org/gnu/bash/bash-5.1.16.tar.gz -export PKG_BC=https://github.com/gavinhoward/bc/releases/download/6.0.1/bc-6.0.1.tar.xz -export PKG_BINUTILS=https://ftp.gnu.org/gnu/binutils/binutils-2.39.tar.xz -export PKG_BISON=https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz +export PKG_ACL=https://download.savannah.gnu.org/releases/acl/acl-2.3.2.tar.xz +export PKG_ATTR=https://download.savannah.gnu.org/releases/attr/attr-2.5.2.tar.gz +export PKG_AUTOCONF=https://mirrors.ocf.berkeley.edu/gnu/autoconf/autoconf-2.72.tar.xz +export PKG_AUTOMAKE=https://mirrors.ocf.berkeley.edu/gnu/automake/automake-1.18.1.tar.xz +export PKG_BASH=https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.3.tar.gz +export PKG_BC=https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.xz +export PKG_BINUTILS=https://mirrors.ocf.berkeley.edu/gnu/binutils/binutils-2.45.tar.xz +export PKG_BISON=https://mirrors.ocf.berkeley.edu/gnu/bison/bison-3.8.2.tar.xz export PKG_BZIP2=https://www.sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz -export PKG_CHECK=https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz -export PKG_COREUTILS=https://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.xz -export PKG_DEJAGNU=https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.3.tar.gz -export PKG_DIFFUTILS=https://ftp.gnu.org/gnu/diffutils/diffutils-3.8.tar.xz -export PKG_E2FSPROGS=https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.46.5/e2fsprogs-1.46.5.tar.gz -export PKG_ELFUTILS=https://sourceware.org/ftp/elfutils/0.187/elfutils-0.187.tar.bz2 -export PKG_EUDEV=https://github.com/eudev-project/eudev/releases/download/v3.2.11/eudev-3.2.11.tar.gz -export PKG_EXPAT=https://prdownloads.sourceforge.net/expat/expat-2.5.0.tar.xz +export PKG_COREUTILS=https://mirrors.ocf.berkeley.edu/gnu/coreutils/coreutils-9.7.tar.xz +export PKG_DBUS=https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz +export PKG_DEJAGNU=https://mirrors.ocf.berkeley.edu/gnu/dejagnu/dejagnu-1.6.3.tar.gz +export PKG_DIFFUTILS=https://mirrors.ocf.berkeley.edu/gnu/diffutils/diffutils-3.12.tar.xz +export PKG_E2FSPROGS=https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.47.3/e2fsprogs-1.47.3.tar.gz +export PKG_ELFUTILS=https://sourceware.org/ftp/elfutils/0.193/elfutils-0.193.tar.bz2 +export PKG_EXPAT=https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz export PKG_EXPECT=https://prdownloads.sourceforge.net/expect/expect5.45.4.tar.gz -export PKG_FILE=https://astron.com/pub/file/file-5.42.tar.gz -export PKG_FINDUTILS=https://ftp.gnu.org/gnu/findutils/findutils-4.9.0.tar.xz +export PKG_FILE=https://astron.com/pub/file/file-5.46.tar.gz +export PKG_FINDUTILS=https://mirrors.ocf.berkeley.edu/gnu/findutils/findutils-4.10.0.tar.xz export PKG_FLEX=https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz -export PKG_GAWK=https://ftp.gnu.org/gnu/gawk/gawk-5.1.1.tar.xz -export PKG_GCC=https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz -export PKG_GDBM=https://ftp.gnu.org/gnu/gdbm/gdbm-1.23.tar.gz -export PKG_GETTEXT=https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz -export PKG_GLIBC=https://ftp.gnu.org/gnu/glibc/glibc-2.36.tar.xz -export PKG_GMP=https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz -export PKG_GPERF=https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz -export PKG_GREP=https://ftp.gnu.org/gnu/grep/grep-3.7.tar.xz -export PKG_GROFF=https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz -export PKG_GRUB=https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz -export PKG_GZIP=https://ftp.gnu.org/gnu/gzip/gzip-1.12.tar.xz -export PKG_IANAETC=https://github.com/Mic92/iana-etc/releases/download/20220812/iana-etc-20220812.tar.gz -export PKG_INETUTILS=https://ftp.gnu.org/gnu/inetutils/inetutils-2.3.tar.xz +export PKG_FLITCORE=https://pypi.org/packages/source/f/flit-core/flit_core-3.12.0.tar.gz +export PKG_GAWK=https://mirrors.ocf.berkeley.edu/gnu/gawk/gawk-5.3.2.tar.xz +export PKG_GCC=https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz +export PKG_GDBM=https://mirrors.ocf.berkeley.edu/gnu/gdbm/gdbm-1.26.tar.gz +export PKG_GETTEXT=https://mirrors.ocf.berkeley.edu/gnu/gettext/gettext-0.26.tar.xz +export PKG_GLIBC=https://mirrors.ocf.berkeley.edu/gnu/glibc/glibc-2.42.tar.xz +export PKG_GMP=https://mirrors.ocf.berkeley.edu/gnu/gmp/gmp-6.3.0.tar.xz +export PKG_GPERF=https://mirrors.ocf.berkeley.edu/gnu/gperf/gperf-3.3.tar.gz +export PKG_GREP=https://mirrors.ocf.berkeley.edu/gnu/grep/grep-3.12.tar.xz +export PKG_GROFF=https://mirrors.ocf.berkeley.edu/gnu/groff/groff-1.23.0.tar.gz +export PKG_GRUB=https://mirrors.ocf.berkeley.edu/gnu/grub/grub-2.12.tar.xz +export PKG_GZIP=https://mirrors.ocf.berkeley.edu/gnu/gzip/gzip-1.14.tar.xz +export PKG_IANAETC=https://github.com/Mic92/iana-etc/releases/download/20250807/iana-etc-20250807.tar.gz +export PKG_INETUTILS=https://mirrors.ocf.berkeley.edu/gnu/inetutils/inetutils-2.6.tar.xz export PKG_INTLTOOL=https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz -export PKG_IPROUTE2=https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.19.0.tar.xz -export PKG_KBD=https://www.kernel.org/pub/linux/utils/kbd/kbd-2.5.1.tar.xz -export PKG_KMOD=https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-30.tar.xz -export PKG_LESS=https://www.greenwoodsoftware.com/less/less-590.tar.gz -export PKG_LFSBOOTSCRIPTS=https://www.linuxfromscratch.org/lfs/downloads/11.2/lfs-bootscripts-20220723.tar.xz -export PKG_LIBCAP=https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.65.tar.xz -export PKG_LIBFFI=https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz -export PKG_LIBPIPELINE=https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.6.tar.gz -export PKG_LIBTOOL=https://ftp.gnu.org/gnu/libtool/libtool-2.4.7.tar.xz -export PKG_LINUX=https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.19.2.tar.xz -export PKG_M4=https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz -export PKG_MAKE=https://ftp.gnu.org/gnu/make/make-4.3.tar.gz -export PKG_MANDB=https://download.savannah.gnu.org/releases/man-db/man-db-2.10.2.tar.xz -export PKG_MANPAGES=https://www.kernel.org/pub/linux/docs/man-pages/man-pages-5.13.tar.xz -export PKG_MESON=https://github.com/mesonbuild/meson/releases/download/0.63.1/meson-0.63.1.tar.gz -export PKG_MPC=https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz -export PKG_MPFR=https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz -export PKG_NCURSES=https://invisible-mirror.net/archives/ncurses/ncurses-6.3.tar.gz -export PKG_NINJA=https://github.com/ninja-build/ninja/archive/v1.11.0/ninja-1.11.0.tar.gz -export PKG_OPENSSL=https://www.openssl.org/source/openssl-3.0.5.tar.gz -export PKG_PATCH=https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz -export PKG_PERL=https://www.cpan.org/src/5.0/perl-5.36.0.tar.xz -export PKG_PKGCONFIG=https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -export PKG_PROCPS=https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.0.tar.xz -export PKG_PSMISC=https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.5.tar.xz -export PKG_PYTHON=https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tar.xz -export PKG_PYTHONDOCS=https://www.python.org/ftp/python/doc/3.10.6/python-3.10.6-docs-html.tar.bz2 -export PKG_READLINE=https://ftp.gnu.org/gnu/readline/readline-8.1.2.tar.gz -export PKG_SED=https://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz -export PKG_SHADOW=https://github.com/shadow-maint/shadow/releases/download/4.12.2/shadow-4.12.2.tar.xz -export PKG_SYSKLOGD=https://www.infodrom.org/projects/sysklogd/download/sysklogd-1.5.1.tar.gz -export PKG_SYSVINIT=https://download.savannah.gnu.org/releases/sysvinit/sysvinit-3.04.tar.xz -export PKG_TAR=https://ftp.gnu.org/gnu/tar/tar-1.34.tar.xz -export PKG_TCL=https://downloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz -export PKG_TCLDOCS=https://downloads.sourceforge.net/tcl/tcl8.6.12-html.tar.gz -export PKG_TEXINFO=https://ftp.gnu.org/gnu/texinfo/texinfo-6.8.tar.xz -export PKG_TZDATA=https://www.iana.org/time-zones/repository/releases/tzdata2022c.tar.gz -export PKG_UDEVLFS=https://anduin.linuxfromscratch.org/LFS/udev-lfs-20171102.tar.xz -export PKG_UTILLINUX=https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-2.38.1.tar.xz -export PKG_VIM=https://anduin.linuxfromscratch.org/LFS/vim-9.0.0228.tar.gz -export PKG_WHEEL=https://anduin.linuxfromscratch.org/LFS/wheel-0.37.1.tar.gz -export PKG_XMLPARSER=https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz -export PKG_XZ=https://tukaani.org/xz/xz-5.2.6.tar.xz -export PKG_ZLIB=https://zlib.net/zlib-1.2.13.tar.xz -export PKG_ZSTD=https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz -export PATCH_BZIP2=https://www.linuxfromscratch.org/patches/lfs/11.2/bzip2-1.0.8-install_docs-1.patch -export PATCH_COREUTILS=https://www.linuxfromscratch.org/patches/lfs/11.2/coreutils-9.1-i18n-1.patch -export PATCH_GLIBC=https://www.linuxfromscratch.org/patches/lfs/11.2/glibc-2.36-fhs-1.patch -export PATCH_KBD=https://www.linuxfromscratch.org/patches/lfs/11.2/kbd-2.5.1-backspace-1.patch -export PATCH_SYSVINIT=https://www.linuxfromscratch.org/patches/lfs/11.2/sysvinit-3.04-consolidated-1.patch -export PATCH_ZSTD=https://www.linuxfromscratch.org/patches/lfs/11.2/zstd-1.5.2-upstream_fixes-1.patch +export PKG_IPROUTE2=https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.16.0.tar.xz +export PKG_KBD=https://www.kernel.org/pub/linux/utils/kbd/kbd-2.8.0.tar.xz +export PKG_KMOD=https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-34.2.tar.xz +export PKG_JINJA2=https://pypi.org/packages/source/J/Jinja2/jinja2-3.1.6.tar.gz +export PKG_LESS=https://www.greenwoodsoftware.com/less/less-679.tar.gz +export PKG_LIBCAP=https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.76.tar.xz +export PKG_LIBFFI=https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2.tar.gz +export PKG_LIBPIPELINE=https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.8.tar.gz +export PKG_LIBTOOL=https://mirrors.ocf.berkeley.edu/gnu/libtool/libtool-2.5.4.tar.xz +export PKG_LIBXCRYPT=https://github.com/besser82/libxcrypt/releases/download/v4.4.38/libxcrypt-4.4.38.tar.xz +export PKG_LINUX=https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.16.1.tar.xz +export PKG_LZ4=https://github.com/lz4/lz4/releases/download/v1.10.0/lz4-1.10.0.tar.gz +export PKG_M4=https://mirrors.ocf.berkeley.edu/gnu/m4/m4-1.4.20.tar.xz +export PKG_MAKE=https://mirrors.ocf.berkeley.edu/gnu/make/make-4.4.1.tar.gz +export PKG_MANDB=https://download.savannah.gnu.org/releases/man-db/man-db-2.13.1.tar.xz +export PKG_MANPAGES=https://www.kernel.org/pub/linux/docs/man-pages/man-pages-6.15.tar.xz +export PKG_MARKUPSAFE=https://pypi.org/packages/source/M/MarkupSafe/markupsafe-3.0.2.tar.gz +export PKG_MESON=https://github.com/mesonbuild/meson/releases/download/1.8.3/meson-1.8.3.tar.gz +export PKG_MPC=https://mirrors.ocf.berkeley.edu/gnu/mpc/mpc-1.3.1.tar.gz +export PKG_MPFR=https://www.mpfr.org/mpfr-4.2.2/mpfr-4.2.2.tar.xz +export PKG_NCURSES=https://invisible-mirror.net/archives/ncurses/current/ncurses-6.5-20250809.tgz +export PKG_NINJA=https://github.com/ninja-build/ninja/archive/v1.13.1/ninja-1.13.1.tar.gz +export PKG_OPENSSL=https://www.openssl.org/source/openssl-3.5.2.tar.gz +export PKG_PACKAGING=https://files.pythonhosted.org/packages/source/p/packaging/packaging-25.0.tar.gz +export PKG_PATCH=https://mirrors.ocf.berkeley.edu/gnu/patch/patch-2.8.tar.xz +export PKG_PERL=https://www.cpan.org/src/5.0/perl-5.42.0.tar.xz +export PKG_PKGCONFIG=https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.xz +export PKG_PROCPS=https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.5.tar.xz +export PKG_PSMISC=https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.7.tar.xz +export PKG_PYTHON=https://www.python.org/ftp/python/3.13.7/Python-3.13.7.tar.xz +export PKG_PYTHONDOCS=https://www.python.org/ftp/python/doc/3.13.7/python-3.13.7-docs-html.tar.bz2 +export PKG_READLINE=https://mirrors.ocf.berkeley.edu/gnu/readline/readline-8.3.tar.gz +export PKG_SED=https://mirrors.ocf.berkeley.edu/gnu/sed/sed-4.9.tar.xz +export PKG_SETUPTOOLS=https://pypi.org/packages/source/s/setuptools/setuptools-80.9.0.tar.gz +export PKG_SHADOW=https://github.com/shadow-maint/shadow/releases/download/4.18.0/shadow-4.18.0.tar.xz +export PKG_SYSTEMD=https://github.com/systemd/systemd/archive/v257.8/systemd-257.8.tar.gz +export PKG_SYSTEMDMANPGS=https://anduin.linuxfromscratch.org/LFS/systemd-man-pages-257.8.tar.xz +export PKG_TAR=https://mirrors.ocf.berkeley.edu/gnu/tar/tar-1.35.tar.xz +export PKG_TCL=https://downloads.sourceforge.net/tcl/tcl8.6.16-src.tar.gz +export PKG_TCLDOCS=https://downloads.sourceforge.net/tcl/tcl8.6.16-html.tar.gz +export PKG_TEXINFO=https://mirrors.ocf.berkeley.edu/gnu/texinfo/texinfo-7.2.tar.xz +export PKG_TZDATA=https://www.iana.org/time-zones/repository/releases/tzdata2025b.tar.gz +export PKG_UTILLINUX=https://www.kernel.org/pub/linux/utils/util-linux/v2.41/util-linux-2.41.1.tar.xz +export PKG_VIM=https://github.com/vim/vim/archive/v9.1.1629/vim-9.1.1629.tar.gz +export PKG_WHEEL=https://pypi.org/packages/source/w/wheel/wheel-0.46.1.tar.gz +export PKG_XMLPARSER=https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz +export PKG_XZ=https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.gz +export PKG_ZLIB=https://zlib.net/fossils/zlib-1.3.1.tar.gz +export PKG_ZSTD=https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz +export PATCH_BZIP2=https://www.linuxfromscratch.org/patches/lfs/12.4/bzip2-1.0.8-install_docs-1.patch +export PATCH_COREUTILS=https://www.linuxfromscratch.org/patches/lfs/12.4/coreutils-9.7-upstream_fix-1.patch +export PATCH_COREUTILSINTL=https://www.linuxfromscratch.org/patches/lfs/12.4/coreutils-9.7-i18n-1.patch +export PATCH_GCC=http://www.linuxfromscratch.org/patches/lfs/12.4/expect-5.45.4-gcc15-1.patch +export PATCH_GLIBC=https://www.linuxfromscratch.org/patches/lfs/12.4/glibc-2.42-fhs-1.patch +export PATCH_KBD=https://www.linuxfromscratch.org/patches/lfs/12.4/kbd-2.8.0-backspace-1.patch diff --git a/phase1/binutils.sh b/phase1/binutils.sh index 1acc67e..08e57c9 100644 --- a/phase1/binutils.sh +++ b/phase1/binutils.sh @@ -9,7 +9,9 @@ cd build --target=$LFS_TGT \ --disable-nls \ --enable-gprofng=no \ - --disable-werror + --disable-werror \ + --enable-new-dtags \ + --enable-default-hash-style=gnu make diff --git a/phase1/gcc.sh b/phase1/gcc.sh index e60238b..3b87f6f 100644 --- a/phase1/gcc.sh +++ b/phase1/gcc.sh @@ -24,14 +24,15 @@ cd build ../configure \ --target=$LFS_TGT \ --prefix=$LFS/tools \ - --with-glibc-version=2.36 \ + --with-glibc-version=2.42 \ --with-sysroot=$LFS \ --with-newlib \ --without-headers \ + --enable-default-pie \ + --enable-default-ssp \ --disable-nls \ --disable-shared \ --disable-multilib \ - --disable-decimal-float \ --disable-threads \ --disable-libatomic \ --disable-libgomp \ @@ -47,5 +48,5 @@ 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)`/include/limits.h diff --git a/phase1/glibc.sh b/phase1/glibc.sh index e7aad3f..d3ffbeb 100644 --- a/phase1/glibc.sh +++ b/phase1/glibc.sh @@ -20,8 +20,8 @@ echo "rootsbindir=/usr/sbin" > configparms --prefix=/usr \ --host=$LFS_TGT \ --build=$(../scripts/config.guess) \ - --enable-kernel=3.2 \ - --with-headers=$LFS/usr/include \ + --disable-nscd \ + --enable-kernel=5.4 \ libc_cv_slibdir=/usr/lib make @@ -29,5 +29,5 @@ make DESTDIR=$LFS install sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd -$LFS/tools/libexec/gcc/$LFS_TGT/12.2.0/install-tools/mkheaders +#$LFS/tools/libexec/gcc/$LFS_TGT/12.2.0/install-tools/mkheaders diff --git a/phase1/libstdcpp.sh b/phase1/libstdcpp.sh index e161c2e..638f1af 100644 --- a/phase1/libstdcpp.sh +++ b/phase1/libstdcpp.sh @@ -9,7 +9,7 @@ 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++/15.2.0 make make DESTDIR=$LFS install diff --git a/phase2/binutils.sh b/phase2/binutils.sh index 1110cbe..3109a76 100644 --- a/phase2/binutils.sh +++ b/phase2/binutils.sh @@ -1,5 +1,5 @@ # Binutils Phase 2 -sed '6009s/$add_dir//' -i ltmain.sh +sed '6031s/$add_dir//' -i ltmain.sh mkdir build cd build @@ -12,10 +12,12 @@ cd build --enable-shared \ --enable-gprofng=no \ --disable-werror \ - --enable-64-bit-bfd + --enable-64-bit-bfd \ + --enable-new-dtags \ + --enable-default-hash-styly=gnu make make DESTDIR=$LFS install -rm $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.{a,la} +rm $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la} diff --git a/phase2/diffutils.sh b/phase2/diffutils.sh index c8e31d9..2bf4660 100644 --- a/phase2/diffutils.sh +++ b/phase2/diffutils.sh @@ -1,5 +1,7 @@ # Diffutils Phase 2 -./configure --prefix=/usr --host=$LFS_TGT +./configure --prefix=/usr --host=$LFS_TGT \ + gl_cv_func_strcasecmp_works=y \ + --build=$(./build-aux/config.guess) make make DESTDIR=$LFS install diff --git a/phase2/gcc.sh b/phase2/gcc.sh index 9e98980..6a36e7e 100644 --- a/phase2/gcc.sh +++ b/phase2/gcc.sh @@ -31,13 +31,14 @@ cd build LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ --prefix=/usr \ --with-build-sysroot=$LFS \ - --enable-initfini-array \ + --enable-default-pie \ + --enable-default-ssp \ --disable-nls \ --disable-multilib \ - --disable-decimal-float \ --disable-libatomic \ --disable-libgomp \ --disable-libquadmath \ + --disable-libsanitizer \ --disable-libssp \ --disable-libvtv \ --enable-languages=c,c++ diff --git a/phase2/grep.sh b/phase2/grep.sh index 69fb0e0..9d48b0c 100644 --- a/phase2/grep.sh +++ b/phase2/grep.sh @@ -1,6 +1,7 @@ # Grep Phase 2 ./configure --prefix=/usr \ - --host=$LFS_TGT + --host=$LFS_TGT \ + --build=$(./build-aux/config.guess) make make DESTDIR=$LFS install diff --git a/phase2/make.sh b/phase2/make.sh index d6eb172..efe44eb 100644 --- a/phase2/make.sh +++ b/phase2/make.sh @@ -1,6 +1,5 @@ # Make Phase 2 ./configure --prefix=/usr \ - --without-guile \ --host=$LFS_TGT \ --build=$(build-aux/config.guess) diff --git a/phase2/ncurses.sh b/phase2/ncurses.sh index 1eb1ff9..bdb25a1 100644 --- a/phase2/ncurses.sh +++ b/phase2/ncurses.sh @@ -1,11 +1,11 @@ # ncurses Phase 2 -sed -i s/mawk// configure mkdir build pushd build -../configure +../configure --prefix=$LFS/tools AWK=gawk make -C include make -C progs tic +install progs/tic $LFS/tools/bin popd ./configure --prefix=/usr \ @@ -19,9 +19,11 @@ popd --without-debug \ --without-ada \ --disable-stripping \ - --enable-widec + AWK=gawk make -make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install -echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so +make DESTDIR=$LFS install +ln -sv libncursesw.so $LFS/usr/lib/libncurses.so +sed -e 's/^#if.*XOPEN.*$/#if 1/' \ + -i $LFS/usr/include/curses.h diff --git a/phase2/sed.sh b/phase2/sed.sh index 03d0010..3a137c7 100644 --- a/phase2/sed.sh +++ b/phase2/sed.sh @@ -1,6 +1,7 @@ # Sed Phase 2 ./configure --prefix=/usr \ - --host=$LFS_TGT + --host=$LFS_TGT \ + --build=$(./build-aux/config.guess) make make DESTDIR=$LFS install diff --git a/phase2/xz.sh b/phase2/xz.sh index 927d3a6..da15842 100644 --- a/phase2/xz.sh +++ b/phase2/xz.sh @@ -3,7 +3,7 @@ --host=$LFS_TGT \ --build=$(build-aux/config.guess) \ --disable-static \ - --docdir=/usr/share/doc/xz-5.2.6 + --docdir=/usr/share/doc/xz-5.8.1 make make DESTDIR=$LFS install diff --git a/phase3/perl.sh b/phase3/perl.sh index e9fd034..db3726a 100644 --- a/phase3/perl.sh +++ b/phase3/perl.sh @@ -1,13 +1,14 @@ # Perl Phase 3 -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.42/core_perl \ + -D archlib=/usr/lib/perl5/5.42/core_perl \ + -D sitelib=/usr/lib/perl5/5.42/site_perl \ + -D sitearch=/usr/lib/perl5/5.42/site_perl \ + -D vendorlib=/usr/lib/perl5/5.42/vendor_perl \ + -D vendorarch=/usr/lib/perl5/5.42/vendor_perl make make install diff --git a/phase3/python.sh b/phase3/python.sh index 32a66ff..5204c4e 100644 --- a/phase3/python.sh +++ b/phase3/python.sh @@ -1,7 +1,8 @@ # Python Phase 3 -./configure --prefix=/usr \ - --enable-shared \ - --without-ensurepip +./configure --prefix=/usr \ + --enable-shared \ + --without-ensurepip \ + --without-static-libpython make make install diff --git a/phase3/utillinux.sh b/phase3/utillinux.sh index 3f0e9a6..415b409 100644 --- a/phase3/utillinux.sh +++ b/phase3/utillinux.sh @@ -3,7 +3,7 @@ mkdir -p /var/lib/hwclock ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ --libdir=/usr/lib \ - --docdir=/usr/share/doc/util-linux-2.38.1 \ + --docdir=/usr/share/doc/util-linux-2.41.1 \ --disable-chfn-chsh \ --disable-login \ --disable-nologin \ @@ -13,6 +13,7 @@ mkdir -p /var/lib/hwclock --disable-pylibmount \ --disable-static \ --without-python \ + --disable-liblastlog2\ runstatedir=/run make diff --git a/phase4/acl.sh b/phase4/acl.sh index 5199327..1105cd5 100644 --- a/phase4/acl.sh +++ b/phase4/acl.sh @@ -1,7 +1,7 @@ # Acl Phase 4 ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/acl-2.3.1 + --docdir=/usr/share/doc/acl-2.3.2 make diff --git a/phase4/attr.sh b/phase4/attr.sh index c0a2154..6cba2a8 100644 --- a/phase4/attr.sh +++ b/phase4/attr.sh @@ -2,7 +2,7 @@ ./configure --prefix=/usr \ --disable-static \ --sysconfdir=/etc \ - --docdir=/usr/share/doc/attr-2.5.1 + --docdir=/usr/share/doc/attr-2.5.2 make diff --git a/phase4/autoconf.sh b/phase4/autoconf.sh index 0558998..6623dc9 100644 --- a/phase4/autoconf.sh +++ b/phase4/autoconf.sh @@ -6,7 +6,7 @@ make if $RUN_TESTS then set +e - make check TESTSUITEFLAGS=-j4 + make check set -e fi diff --git a/phase4/automake.sh b/phase4/automake.sh index 4aa13ae..4812dfe 100644 --- a/phase4/automake.sh +++ b/phase4/automake.sh @@ -1,12 +1,12 @@ # Automake Phase 4 -./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.5 +./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.18.1 make if $RUN_TESTS then set +e - make -j4 check + make -j$(($(nproc)>4?$(nproc):4)) check set -e fi diff --git a/phase4/bash.sh b/phase4/bash.sh index d2fb6bb..9d9f7a9 100644 --- a/phase4/bash.sh +++ b/phase4/bash.sh @@ -1,7 +1,7 @@ # Bash Phase 4 ./configure --prefix=/usr \ - --docdir=/usr/share/doc/bash-5.1.16 \ --without-bash-malloc \ + --docdir=/usr/share/doc/bash-5.3 \ --with-installed-readline make @@ -11,7 +11,7 @@ if $RUN_TESTS then set +e chown -R tester . -su -s /usr/bin/expect tester << EOF +LC_ALL=C.UTF-8 su -s /usr/bin/expect tester << "EOF" set timeout -1 spawn make tests expect eof diff --git a/phase4/bc.sh b/phase4/bc.sh index 17e93af..b4add55 100644 --- a/phase4/bc.sh +++ b/phase4/bc.sh @@ -1,5 +1,5 @@ # Bc Phase 4 -CC=gcc ./configure --prefix=/usr -G -O3 -r +CC='gcc -std=c99' ./configure --prefix=/usr -G -O3 -r make diff --git a/phase4/binutils.sh b/phase4/binutils.sh index 2b888c7..5a88f95 100644 --- a/phase4/binutils.sh +++ b/phase4/binutils.sh @@ -1,23 +1,17 @@ # Binutils Phase 4 -EXPECTOUT=$(expect -c 'spawn ls') -if [ "$EXPECTOUT" != "$(echo -ne 'spawn ls\r\n')" ] -then - echo $EXPECTOUT - exit 1 -fi - mkdir build cd build ../configure --prefix=/usr \ --sysconfdir=/etc \ - --enable-gold \ --enable-ld=default \ --enable-plugins \ --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ - --with-system-zlib + --enable-new-dtags \ + --with-system-zlib \ + --enable-defualt-hash-style=gnu make tooldir=/usr @@ -30,5 +24,6 @@ fi make tooldir=/usr install -rm -f /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a +rm -rf /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a \ + /usr/share/doc/gprofng/ diff --git a/phase4/build_order.txt b/phase4/build_order.txt index b91f605..087e21b 100644 --- a/phase4/build_order.txt +++ b/phase4/build_order.txt @@ -4,6 +4,7 @@ glibc zlib bzip2 xz +lz4 zstd file readline @@ -13,6 +14,7 @@ flex tcl expect dejagnu +pkgconfig binutils gmp mpfr @@ -20,9 +22,9 @@ mpc attr acl libcap +libxcrypt shadow gcc -pkgconfig ncurses sed psmisc @@ -42,19 +44,22 @@ intltool autoconf automake openssl -kmod elfutils libffi python +flitcore +packaging wheel +setuptools ninja meson +kmod coreutils -check diffutils gawk findutils groff +grub gzip iproute2 kbd @@ -64,14 +69,12 @@ patch tar texinfo vim -eudev +markupsafe +jinja2 +systemd +dbus mandb procps utillinux e2fsprogs -sysklogd -sysvinit -lfsbootscripts linux -grub - diff --git a/phase4/coreutils.sh b/phase4/coreutils.sh index 363c18a..30df201 100644 --- a/phase4/coreutils.sh +++ b/phase4/coreutils.sh @@ -1,7 +1,10 @@ # Coreutils Phase 4 -patch -Np1 -i ../$(basename $PATCH_COREUTILS) +patch -Np1 -i ../coreutils-9.7-upstream_fix-1.patch -autoreconf -fiv +patch -Np1 -i ../coreutils-9.7-i18n-1.patch + +autoreconf -fv +automake -af FORCE_UNSAFE_CONFIGURE=1 ./configure \ --prefix=/usr \ --enable-no-install-program=kill,uptime @@ -12,11 +15,11 @@ if $RUN_TESTS then set +e make NON_ROOT_USERNAME=tester check-root - echo "dummy:x:102:tester" >> /etc/group + groupadd -g 102 dummy -U tester chown -R tester . - su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" - sed -i '/dummy/d' /etc/group - set -e + su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" \ + < /dev/null + groupdel dummy fi make install diff --git a/phase4/dbus.sh b/phase4/dbus.sh new file mode 100644 index 0000000..ae29af4 --- /dev/null +++ b/phase4/dbus.sh @@ -0,0 +1,14 @@ +# D-Bus Phase 4 +mkdir build +cd build + +meson setup --prefix=/usr --buildtype=release --wrap-mode=nofallback .. + +ninja + +ninja test + +ninja install + +ln -sf /etc/machine-id /var/lib/dbus + diff --git a/phase4/dejagnu.sh b/phase4/dejagnu.sh index 0cdbe4f..f73a924 100644 --- a/phase4/dejagnu.sh +++ b/phase4/dejagnu.sh @@ -6,6 +6,8 @@ cd build makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi makeinfo --plaintext -o doc/dejagnu.txt ../doc/dejagnu.texi +make check + make install install -dm755 /usr/share/doc/dejagnu-1.6.3 install -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-1.6.3 diff --git a/phase4/expat.sh b/phase4/expat.sh index b6bf95f..9a80411 100644 --- a/phase4/expat.sh +++ b/phase4/expat.sh @@ -1,7 +1,7 @@ # Expat Phase 4 ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/expat-2.5.0 + --docdir=/usr/share/doc/expat-2.7.1 make @@ -14,5 +14,5 @@ fi make install -install -m644 doc/*.{html,css} /usr/share/doc/expat-2.5.0 +install -m644 doc/*.{html,css} /usr/share/doc/expat-2.7.1 diff --git a/phase4/expect.sh b/phase4/expect.sh index affa96e..c9c0ba3 100644 --- a/phase4/expect.sh +++ b/phase4/expect.sh @@ -1,7 +1,10 @@ # Expect Phase 4 +patch -Np1 -i ../expect-5.45.4-gcc15-1.patch + ./configure --prefix=/usr \ --with-tcl=/usr/lib \ --enable-shared \ + --disable-rpath \ --mandir=/usr/share/man \ --with-tclinclude=/usr/include diff --git a/phase4/findutils.sh b/phase4/findutils.sh index 4d505eb..6b4540f 100644 --- a/phase4/findutils.sh +++ b/phase4/findutils.sh @@ -1,8 +1,5 @@ # Findutils Phase 4 -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 diff --git a/phase4/flex.sh b/phase4/flex.sh index a03cae5..0378ccb 100644 --- a/phase4/flex.sh +++ b/phase4/flex.sh @@ -14,5 +14,5 @@ fi make install -ln -s flex /usr/bin/lex - +ln -s flex /usr/bin/lex +ln -s flex.1 /usr/share/man/man1/lex.1 diff --git a/phase4/flitcore.sh b/phase4/flitcore.sh new file mode 100644 index 0000000..a071258 --- /dev/null +++ b/phase4/flitcore.sh @@ -0,0 +1,6 @@ +# Flit-Core Phase 4 +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + +pip3 install --no-index --find-links dist flit_core + + diff --git a/phase4/gawk.sh b/phase4/gawk.sh index ad4d3a3..02ecf12 100644 --- a/phase4/gawk.sh +++ b/phase4/gawk.sh @@ -8,12 +8,14 @@ make if $RUN_TESTS then set +e - make check + chown -R tester . + su tester -c "PATH=$PATH make check" set -e fi make install -mkdir -p /usr/share/doc/gawk-5.1.1 -cp doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.1.1 +ln -sv gawk.1 /usr/share/man/man1/awk.1 +install -Dm644 doc/{awkforai.txt,*.{eps,pdf,jpg}} -t /usr/share/doc/gawk-5.3.2 + diff --git a/phase4/gcc.sh b/phase4/gcc.sh index c5156c0..6f375b7 100644 --- a/phase4/gcc.sh +++ b/phase4/gcc.sh @@ -13,13 +13,19 @@ cd build ../configure --prefix=/usr \ LD=ld \ --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 if $RUN_TESTS then @@ -33,12 +39,14 @@ fi make install chown -R root:root \ - /usr/lib/gcc/*linux-gnu/12.2.0/include{,-fixed} + /usr/lib/gcc/$(gcc -dumpmachine)/15.2.0/include{,-fixed} ln -sr /usr/bin/cpp /usr/lib -ln -sf ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so \ - /usr/lib/bfd-plugins/ +ln -s gcc.1 /usr/share/man/man1/cc.1 + +ln -sf ../../libexec/gcc/$(gcc -dumpmachine)/15.2.0/liblto_plugin.so \ + /usr/lib/bfd-plugins/ mkdir -p /usr/share/gdb/auto-load/usr/lib mv /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib diff --git a/phase4/gettext.sh b/phase4/gettext.sh index c5f3620..ccb905e 100644 --- a/phase4/gettext.sh +++ b/phase4/gettext.sh @@ -1,7 +1,7 @@ # Gettext Phase 4 ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/gettext-0.21 + --docdir=/usr/share/doc/gettext-0.26 make diff --git a/phase4/glibc.sh b/phase4/glibc.sh index 5251e60..7ae0fd1 100644 --- a/phase4/glibc.sh +++ b/phase4/glibc.sh @@ -1,6 +1,12 @@ # Glibc Phase 4 patch -Np1 -i ../$(basename $PATCH_GLIBC) +sed -e '/unistd.h/i #include ' \ + -e '/libc_rwlock_init/c\ + __libc_rwlock_define_initialized (, reset_lock);\ + memcpy (&lock, &reset_lock, sizeof (lock));' \ + -i stdlib/abort.c + mkdir build cd build @@ -8,9 +14,9 @@ echo "rootsbindir=/usr/sbin" > configparms ../configure --prefix=/usr \ --disable-werror \ - --enable-kernel=3.2 \ + --disable-nscd \ + --enable-kernel=5.4 \ --enable-stack-protector=strong \ - --with-headers=/usr/include \ libc_cv_slibdir=/usr/lib make @@ -26,45 +32,46 @@ touch /etc/ld.so.conf sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile make install sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd -cp ../nscd/nscd.conf /etc/nscd.conf -mkdir -p /var/cache/nscd -mkdir -p /usr/lib/locale -localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true -localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 -localedef -i de_DE -f ISO-8859-1 de_DE -localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro -localedef -i de_DE -f UTF-8 de_DE.UTF-8 -localedef -i el_GR -f ISO-8859-7 el_GR -localedef -i en_GB -f ISO-8859-1 en_GB -localedef -i en_GB -f UTF-8 en_GB.UTF-8 -localedef -i en_HK -f ISO-8859-1 en_HK -localedef -i en_PH -f ISO-8859-1 en_PH -localedef -i en_US -f ISO-8859-1 en_US -localedef -i en_US -f UTF-8 en_US.UTF-8 -localedef -i es_ES -f ISO-8859-15 es_ES@euro -localedef -i es_MX -f ISO-8859-1 es_MX -localedef -i fa_IR -f UTF-8 fa_IR -localedef -i fr_FR -f ISO-8859-1 fr_FR -localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro -localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 -localedef -i is_IS -f ISO-8859-1 is_IS -localedef -i is_IS -f UTF-8 is_IS.UTF-8 -localedef -i it_IT -f ISO-8859-1 it_IT -localedef -i it_IT -f ISO-8859-15 it_IT@euro -localedef -i it_IT -f UTF-8 it_IT.UTF-8 -localedef -i ja_JP -f EUC-JP ja_JP -localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true -localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 -localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro -localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R -localedef -i ru_RU -f UTF-8 ru_RU.UTF-8 -localedef -i se_NO -f UTF-8 se_NO.UTF-8 -localedef -i ta_IN -f UTF-8 ta_IN.UTF-8 -localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 -localedef -i zh_CN -f GB18030 zh_CN.GB18030 -localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS -localedef -i zh_TW -f UTF-8 zh_TW.UTF-8 +#localedef -i C -f UTF-8 C.UTF-8 +#localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 +#localedef -i de_DE -f ISO-8859-1 de_DE +#localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro +#localedef -i de_DE -f UTF-8 de_DE.UTF-8 +#localedef -i el_GR -f ISO-8859-7 el_GR +#localedef -i en_GB -f ISO-8859-1 en_GB +#localedef -i en_GB -f UTF-8 en_GB.UTF-8 +#localedef -i en_HK -f ISO-8859-1 en_HK +#localedef -i en_PH -f ISO-8859-1 en_PH +#localedef -i en_US -f ISO-8859-1 en_US +#localedef -i en_US -f UTF-8 en_US.UTF-8 +#localedef -i es_ES -f ISO-8859-15 es_ES@euro +#localedef -i es_MX -f ISO-8859-1 es_MX +#localedef -i fa_IR -f UTF-8 fa_IR +#localedef -i fr_FR -f ISO-8859-1 fr_FR +#localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro +#localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 +#localedef -i is_IS -f ISO-8859-1 is_IS +#localedef -i is_IS -f UTF-8 is_IS.UTF-8 +#localedef -i it_IT -f ISO-8859-1 it_IT +#localedef -i it_IT -f ISO-8859-15 it_IT@euro +#localedef -i it_IT -f UTF-8 it_IT.UTF-8 +#localedef -i ja_JP -f EUC-JP ja_JP +#localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 +#localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro +#localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R +#localedef -i ru_RU -f UTF-8 ru_RU.UTF-8 +#localedef -i se_NO -f UTF-8 se_NO.UTF-8 +#localedef -i ta_IN -f UTF-8 ta_IN.UTF-8 +#localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 +#localedef -i zh_CN -f GB18030 zh_CN.GB18030 +#localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS +#localedef -i zh_TW -f UTF-8 zh_TW.UTF-8 + +# received an error during tests, maybe due to a missing locale? so try installing them all +make localedata/install-locales + +#TODO may need to add nsswitch.conf file here, ref sec 8.5.2.1 in book tar -xf ../../$(basename $PKG_TZDATA) @@ -84,3 +91,16 @@ unset ZONEINFO ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime +cat > /etc/ld.so.conf << "EOF" +# Begin /etc/ld.so.conf +/usr/local/lib +/opt/lib + +EOF + +cat >> /etc/ld.so.conf << "EOF" +# Add an include directory +include /etc/ld.so.conf.d/*.conf + +EOF +mkdir -pv /etc/ld.so.conf.d diff --git a/phase4/gmp.sh b/phase4/gmp.sh index 6927c72..ed1f838 100644 --- a/phase4/gmp.sh +++ b/phase4/gmp.sh @@ -1,8 +1,9 @@ # GMP Phase 4 +sed -i '/long long t1;/,+1s/()/(...)/' configure ./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 diff --git a/phase4/gperf.sh b/phase4/gperf.sh index 638f162..a90c311 100644 --- a/phase4/gperf.sh +++ b/phase4/gperf.sh @@ -1,12 +1,12 @@ # Gperf Phase 4 -./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1 +./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.3 make if $RUN_TESTS then set +e - make -j1 check + make check set -e fi diff --git a/phase4/grep.sh b/phase4/grep.sh index 3c3958a..8706838 100644 --- a/phase4/grep.sh +++ b/phase4/grep.sh @@ -1,4 +1,5 @@ # Grep Phase 4 +sed -i "s/echo/#echo/" src/egrep.sh ./configure --prefix=/usr make diff --git a/phase4/groff.sh b/phase4/groff.sh index 9762371..27b4852 100644 --- a/phase4/groff.sh +++ b/phase4/groff.sh @@ -1,7 +1,14 @@ # Groff Phase 4 PAGE=letter ./configure --prefix=/usr -make -j1 +make + +if $RUN_TESTS +then + set +e + make check + set -e +fi make install diff --git a/phase4/grub.sh b/phase4/grub.sh index c6ec53b..3ee87d8 100644 --- a/phase4/grub.sh +++ b/phase4/grub.sh @@ -1,3 +1,6 @@ +# Grub Phase 4 +echo depends bli part_gpt > grub-core/extra_deps.lst + ./configure --prefix=/usr \ --sysconfdir=/etc \ --disable-efiemu \ @@ -8,4 +11,5 @@ make make install mv /etc/bash_completion.d/grub /usr/share/bash-completion/completions +# TODO not sure if this is necessary yet grub-install $LOOP --target i386-pc diff --git a/phase4/inetutils.sh b/phase4/inetutils.sh index 7cc0507..dc3886c 100644 --- a/phase4/inetutils.sh +++ b/phase4/inetutils.sh @@ -1,4 +1,7 @@ # Inetutils Phase 4 + +sed -i 's/def HAVE_TERMCAP_TGETENT/ 1/' telnet/telnet.c + ./configure --prefix=/usr \ --bindir=/usr/bin \ --localstatedir=/var \ diff --git a/phase4/iproute2.sh b/phase4/iproute2.sh index 2e5c7ee..0fb704a 100644 --- a/phase4/iproute2.sh +++ b/phase4/iproute2.sh @@ -6,6 +6,5 @@ make NETNS_RUN_DIR=/run/netns make SBINDIR=/usr/sbin install -mkdir -p /usr/share/doc/iproute2-5.19.0 -cp COPYING README* /usr/share/doc/iproute2-5.19.0 +install -Dm644 COPYING README* -t /usr/share/doc/iproute2-6.16.0 diff --git a/phase4/jinja2.sh b/phase4/jinja2.sh new file mode 100644 index 0000000..cc2bbf5 --- /dev/null +++ b/phase4/jinja2.sh @@ -0,0 +1,4 @@ +# Jinja2 Phase 4 +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + +pip3 install --no-index --find-links dist Jinja2 diff --git a/phase4/kbd.sh b/phase4/kbd.sh index 5889c57..223b427 100644 --- a/phase4/kbd.sh +++ b/phase4/kbd.sh @@ -8,15 +8,8 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in make -if $RUN_TESTS -then - set +e - make check - set -e -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.8.0 + diff --git a/phase4/kmod.sh b/phase4/kmod.sh index c7f3f4d..d53fb79 100644 --- a/phase4/kmod.sh +++ b/phase4/kmod.sh @@ -1,18 +1,12 @@ # Kmod Phase 4 -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --with-openssl \ - --with-xz \ - --with-zstd \ - --with-zlib +mkdir -p build +cd build -make +meson setup --prefix=/usr .. \ + --buildtype=release \ + -D manpages=false -make install +ninja -for target in depmod insmod modinfo modprobe rmmod; do - ln -sf ../bin/kmod /usr/sbin/$target -done - -ln -sf kmod /usr/bin/lsmod +ninja install diff --git a/phase4/less.sh b/phase4/less.sh index 140e215..d7a00f0 100644 --- a/phase4/less.sh +++ b/phase4/less.sh @@ -3,5 +3,12 @@ make +if $RUN_TESTS +then + set +e + make check + set -e +fi + make install diff --git a/phase4/libffi.sh b/phase4/libffi.sh index da00cd9..c751940 100644 --- a/phase4/libffi.sh +++ b/phase4/libffi.sh @@ -2,7 +2,6 @@ ./configure --prefix=/usr \ --disable-static \ --with-gcc-arch=native \ - --disable-exec-static-tramp make diff --git a/phase4/libpipeline.sh b/phase4/libpipeline.sh index e34eaec..4624b3c 100644 --- a/phase4/libpipeline.sh +++ b/phase4/libpipeline.sh @@ -3,12 +3,5 @@ make -if $RUN_TESTS -then - set +e - make check - set -e -fi - make install diff --git a/phase4/libtool.sh b/phase4/libtool.sh index 4febc37..4cb4a04 100644 --- a/phase4/libtool.sh +++ b/phase4/libtool.sh @@ -6,7 +6,7 @@ make if $RUN_TESTS then set +e - make check TESTSUITEFLAGS=-j4 + make check set -e fi diff --git a/phase4/libxcrypt.sh b/phase4/libxcrypt.sh new file mode 100644 index 0000000..be3e048 --- /dev/null +++ b/phase4/libxcrypt.sh @@ -0,0 +1,17 @@ +# Libxcrypt Phase 4 +./configure --prefix=/usr \ + --enable-hashes=strong,glibc \ + --enable-obsolete-api=no \ + --disable-static \ + --disable-failure-tokens + +make + +if $RUN_TESTS +then + set +e + make check + set -e +fi + +make install diff --git a/phase4/linux.sh b/phase4/linux.sh index aaa8867..dea2914 100644 --- a/phase4/linux.sh +++ b/phase4/linux.sh @@ -1,5 +1,5 @@ # LINUX Phase 4 - +# section 10.3 CONFIGFILE=config-$KERNELVERS make mrproper @@ -16,12 +16,11 @@ make make modules_install -cp ./.config /boot/$CONFIGFILE - -cp arch/x86_64/boot/bzImage /boot/vmlinuz-$KERNELVERS-lfs-$LFS_VERSION +cp -i arch/x86/boot/bzImage /boot/vmlinuz-$KERNELVERS-lfs-$LFS_VERSION-systemd cp System.map /boot/System.map-$KERNELVERS -install -d /usr/share/doc/linux-$KERNELVERS -cp -r Documentation/* /usr/share/doc/linux-$KERNELVERS +cp -i .config /boot/$CONFIGFILE + +cp -r Documentation -T /usr/share/doc/linux-$KERNELVERS diff --git a/phase4/lz4.sh b/phase4/lz4.sh new file mode 100644 index 0000000..82fcf4a --- /dev/null +++ b/phase4/lz4.sh @@ -0,0 +1,4 @@ +#Lz4 Phase 4 +make BUILD_STATIC=no PREFIX=/usr +make -j1 check +make BUILD_STATIC=no PREFIX=/usr install diff --git a/phase4/make.sh b/phase4/make.sh index 5ec9cda..826a23f 100644 --- a/phase4/make.sh +++ b/phase4/make.sh @@ -6,7 +6,8 @@ make if $RUN_TESTS then set +e - make check + chown -R tester . + su tester -c "PATH=$PATH make check" set -e fi diff --git a/phase4/mandb.sh b/phase4/mandb.sh index a9ef2b2..1407073 100644 --- a/phase4/mandb.sh +++ b/phase4/mandb.sh @@ -1,14 +1,12 @@ # Man-DB Phase 4 ./configure --prefix=/usr \ - --docdir=/usr/share/doc/man-db-2.10.2 \ + --docdir=/usr/share/doc/man-db-2.13.1 \ --sysconfdir=/etc \ --disable-setuid \ --enable-cache-owner=bin \ --with-browser=/usr/bin/lynx \ --with-vgrind=/usr/bin/vgrind \ --with-grap=/usr/bin/grap \ - --with-systemdtmpfilesdir= \ - --with-systemdsystemunitdir= make diff --git a/phase4/manpages.sh b/phase4/manpages.sh index 0a65805..2ef28f4 100644 --- a/phase4/manpages.sh +++ b/phase4/manpages.sh @@ -1,3 +1,4 @@ # Man Pages Phase 4 -make prefix=/usr install +rm -v man3/crypt* +make -R GIT=false prefix=/usr install diff --git a/phase4/markupsafe.sh b/phase4/markupsafe.sh new file mode 100644 index 0000000..10948e9 --- /dev/null +++ b/phase4/markupsafe.sh @@ -0,0 +1,4 @@ +# MarkupSafe Phase 4 +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + +pip3 install --no-index --find-links dist Markupsafe diff --git a/phase4/meson.sh b/phase4/meson.sh index 9917eff..45356cb 100644 --- a/phase4/meson.sh +++ b/phase4/meson.sh @@ -1,5 +1,5 @@ # Meson Phase 4 -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 -Dm644 data/shell-completions/bash/meson /usr/share/bash-completion/completions/meson diff --git a/phase4/mpc.sh b/phase4/mpc.sh index 632f836..e88a641 100644 --- a/phase4/mpc.sh +++ b/phase4/mpc.sh @@ -1,7 +1,7 @@ # MPC Phase 4 ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/mpc-1.2.1 + --docdir=/usr/share/doc/mpc-1.3.1 make make html diff --git a/phase4/mpfr.sh b/phase4/mpfr.sh index 32ba85d..0f07e33 100644 --- a/phase4/mpfr.sh +++ b/phase4/mpfr.sh @@ -2,7 +2,7 @@ ./configure --prefix=/usr \ --disable-static \ --enable-thread-safe \ - --docdir=/usr/share/doc/mpfr-4.1.0 + --docdir=/usr/share/doc/mpfr-4.2.2 make make html diff --git a/phase4/ncurses.sh b/phase4/ncurses.sh index f296535..7a68f33 100644 --- a/phase4/ncurses.sh +++ b/phase4/ncurses.sh @@ -12,20 +12,17 @@ make make DESTDIR=$PWD/dest install -install -m755 dest/usr/lib/libncursesw.so.6.3 /usr/lib -rm dest/usr/lib/libncursesw.so.6.3 +install -m755 dest/usr/lib/libncursesw.so.6.5 /usr/lib +rm 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 -f /usr/lib/lib${lib}.so - echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so - ln -sf ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc + ln -sf lib${lib}w.so /usr/lib/lib${lib}.so + ln -sf ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc done -rm -f /usr/lib/libcursesw.so -echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so -ln -sf libncurses.so /usr/lib/libcurses.so - -mkdir -p /usr/share/doc/ncurses-6.3 -cp -R doc/* /usr/share/doc/ncurses-6.3 +ln -sf libncursesw.so /usr/lib/libcurses.so +cp -R doc -T /usr/share/doc/ncurses-6.5-20250809 diff --git a/phase4/ninja.sh b/phase4/ninja.sh index 81f19ba..e392150 100644 --- a/phase4/ninja.sh +++ b/phase4/ninja.sh @@ -10,14 +10,6 @@ sed -i '/int Guess/a \ python3 configure.py --bootstrap -if $RUN_TESTS -then - set +e - ./ninja ninja_test - ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots - set -e -fi - install -m755 ninja /usr/bin/ install -Dm644 misc/bash-completion /usr/share/bash-completion/completions/ninja install -Dm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja diff --git a/phase4/openssl.sh b/phase4/openssl.sh index d046177..bf4ea27 100644 --- a/phase4/openssl.sh +++ b/phase4/openssl.sh @@ -10,14 +10,14 @@ make if $RUN_TESTS then set +e - make test + HARNESS_JOBS=$(nproc) make test set -e fi sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile make MANSUFFIX=ssl install -mv /usr/share/doc/openssl /usr/share/doc/openssl-3.0.5 +mv /usr/share/doc/openssl /usr/share/doc/openssl-3.5.2 -cp -fr doc/* /usr/share/doc/openssl-3.0.5 +cp -fr doc/* /usr/share/doc/openssl-3.5.2 diff --git a/phase4/packaging.sh b/phase4/packaging.sh new file mode 100644 index 0000000..6b76b15 --- /dev/null +++ b/phase4/packaging.sh @@ -0,0 +1,6 @@ +# Packaging Phase 4 +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + +pip3 install --no-index --find-links dist packaging + + diff --git a/phase4/perl.sh b/phase4/perl.sh index d377bae..839fba7 100644 --- a/phase4/perl.sh +++ b/phase4/perl.sh @@ -4,28 +4,29 @@ 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 + -D prefix=/usr \ + -D vendorprefix=/usr \ + -D privlib=/usr/lib/perl5/5.42/core_perl \ + -D archlib=/usr/lib/perl5/5.42/core_perl \ + -D sitelib=/usr/lib/perl5/5.42/site_perl \ + -D sitearch=/usr/lib/perl5/5.42/site_perl \ + -D vendorlib=/usr/lib/perl5/5.42/vendor_perl \ + -D vendorarch=/usr/lib/perl5/5.42/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 $RUN_TESTS then set +e - make test + TEST_JOBS=$(nproc) make test_harness set -e fi make install +unset BUILD_ZLIB BUILD_BZIP2 diff --git a/phase4/pkgconfig.sh b/phase4/pkgconfig.sh index 61dee3b..f7b9faa 100644 --- a/phase4/pkgconfig.sh +++ b/phase4/pkgconfig.sh @@ -1,7 +1,6 @@ # Pkg-config Phase 4 ./configure --prefix=/usr \ - --with-internal-glib \ - --disable-host-tool \ + --disable-static \ --docdir=/usr/share/doc/pkg-config-0.29.2 make @@ -15,3 +14,5 @@ fi make install +ln -s pkgconf /usr/bin/pkg-config +ln -s pkgconf.1 /usr/share/man/man1/pkg-config.1 diff --git a/phase4/procps.sh b/phase4/procps.sh index 0b532b6..74f7103 100644 --- a/phase4/procps.sh +++ b/phase4/procps.sh @@ -1,15 +1,18 @@ # Procps-ng Phase 4 ./configure --prefix=/usr \ - --docdir=/usr/share/doc/procps-ng-4.0.0 \ + --docdir=/usr/share/doc/procps-ng-4.0.5 \ --disable-static \ - --disable-kill + --disable-kill \ + --enable-watch8bit \ + --with-systemd make if $RUN_TESTS then set +e - make check + chwon -R tester . + su tester -c "PATH=$PATH make check" set -e fi diff --git a/phase4/psmisc.sh b/phase4/psmisc.sh index caf10d5..2520672 100644 --- a/phase4/psmisc.sh +++ b/phase4/psmisc.sh @@ -3,5 +3,12 @@ make +if $RUN_TESTS +then + set +e + make check + set -e +fi + make install diff --git a/phase4/python.sh b/phase4/python.sh index b374bfe..c29201b 100644 --- a/phase4/python.sh +++ b/phase4/python.sh @@ -1,15 +1,20 @@ # Python Phase 4 -./configure --prefix=/usr \ - --enable-shared \ - --with-system-expat \ - --with-system-ffi \ +./configure --prefix=/usr \ + --enable-shared \ + --with-system-expat \ + --without-static-libpython \ --enable-optimizations make -make install +if $RUN_TESTS +then + set +e + make test TESTOPTS="--timeout 120" + set -e +fi -install -dm755 /usr/share/doc/python-3.10.6/html +make install cat > /etc/pip.conf << EOF [global] @@ -17,9 +22,11 @@ root-user-action = ignore disable-pip-version-check = true EOF +install -dm755 /usr/share/doc/python-3.13.7/html + tar --strip-components=1 \ --no-same-owner \ --no-same-permissions \ - -C /usr/share/doc/python-3.10.6/html \ + -C /usr/share/doc/python-3.13.7/html \ -xvf ../$(basename $PKG_PYTHONDOCS) diff --git a/phase4/readline.sh b/phase4/readline.sh index ff6f015..b24e42a 100644 --- a/phase4/readline.sh +++ b/phase4/readline.sh @@ -5,10 +5,10 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install ./configure --prefix=/usr \ --disable-static \ --with-curses \ - --docdir=/usr/share/doc/readline-8.1.2 + --docdir=/usr/share/doc/readline-8.3 make SHLIB_LIBS="-lncursesw" -make SHLIB_LIBS="-lncursesw" install +make install -install -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.1.2 +install -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.3 diff --git a/phase4/sed.sh b/phase4/sed.sh index 41be48a..6195a8c 100644 --- a/phase4/sed.sh +++ b/phase4/sed.sh @@ -13,6 +13,6 @@ then fi make install -install -d -m755 /usr/share/doc/sed-4.8 -install -m644 doc/sed.html /usr/share/doc/sed-4.8 +install -d -m755 /usr/share/doc/sed-4.9 +install -m644 doc/sed.html /usr/share/doc/sed-4.9 diff --git a/phase4/setuptools.sh b/phase4/setuptools.sh new file mode 100644 index 0000000..b8b18f0 --- /dev/null +++ b/phase4/setuptools.sh @@ -0,0 +1,4 @@ +# Setuptools Phase 4 +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + +pip3 install --no-index --find-links dist setuptools diff --git a/phase4/shadow.sh b/phase4/shadow.sh index cc193c7..60a0a89 100644 --- a/phase4/shadow.sh +++ b/phase4/shadow.sh @@ -10,8 +10,10 @@ sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ -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 diff --git a/phase4/systemd.sh b/phase4/systemd.sh new file mode 100644 index 0000000..86894cc --- /dev/null +++ b/phase4/systemd.sh @@ -0,0 +1,43 @@ +# systemd Phase 4 +sed -e 's/GROUP="render"/GROUP="video"/' \ + -e 's/GROUP="sgx", //' \ + -i rules.d/50-udev-default.rules.in + +mkdir -p build +cd build + +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-257.8 + +ninja + +echo 'NAME="Linux From Scratch"' > /etc/os-release +#ninja test + +ninja install + +tar -xf ../../systemd-man-pages-257.8.tar.xz \ + --no-same-owner --strip-components=1 \ + -C /usr/share/man + +systemd-machine-id-setup + +systemctl preset-all + diff --git a/phase4/sysvinit.sh b/phase4/sysvinit.sh deleted file mode 100644 index a180013..0000000 --- a/phase4/sysvinit.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Sysvinit Phase 4 -patch -Np1 -i ../$(basename $PATCH_SYSVINIT) - -make - -make install - diff --git a/phase4/tar.sh b/phase4/tar.sh index 8dbcdd6..a54c39e 100644 --- a/phase4/tar.sh +++ b/phase4/tar.sh @@ -13,5 +13,5 @@ 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 diff --git a/phase4/tcl.sh b/phase4/tcl.sh index d55b18e..4f28aae 100644 --- a/phase4/tcl.sh +++ b/phase4/tcl.sh @@ -1,9 +1,9 @@ # Tcl Phase 4 -tar -xf ../$(basename $PKG_TCLDOCS) --strip-components=1 SRCDIR=$(pwd) cd unix ./configure --prefix=/usr \ - --mandir=/usr/share/man + --mandir=/usr/share/man \ + -disable-rpath make @@ -11,16 +11,16 @@ sed -e "s|$SRCDIR/unix|/usr/lib|" \ -e "s|$SRCDIR|/usr/include|" \ -i tclConfig.sh -sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.3|/usr/lib/tdbc1.1.3|" \ - -e "s|$SRCDIR/pkgs/tdbc1.1.3/generic|/usr/include|" \ - -e "s|$SRCDIR/pkgs/tdbc1.1.3/library|/usr/lib/tcl8.6|" \ - -e "s|$SRCDIR/pkgs/tdbc1.1.3|/usr/include|" \ - -i pkgs/tdbc1.1.3/tdbcConfig.sh +sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.10|/usr/lib/tdbc1.1.10|" \ + -e "s|$SRCDIR/pkgs/tdbc1.1.10/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/tdbc1.1.10/library|/usr/lib/tcl8.6|" \ + -e "s|$SRCDIR/pkgs/tdbc1.1.10|/usr/include|" \ + -i pkgs/tdbc1.1.10/tdbcConfig.sh -sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.2|/usr/lib/itcl4.2.2|" \ - -e "s|$SRCDIR/pkgs/itcl4.2.2/generic|/usr/include|" \ - -e "s|$SRCDIR/pkgs/itcl4.2.2|/usr/include|" \ - -i pkgs/itcl4.2.2/itclConfig.sh +sed -e "s|$SRCDIR/unix/pkgs/itcl4.3.2|/usr/lib/itcl4.3.2|" \ + -e "s|$SRCDIR/pkgs/itcl4.3.2/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/itcl4.3.2|/usr/include|" \ + -i pkgs/itcl4.3.2/itclConfig.sh unset SRCDIR @@ -33,6 +33,8 @@ fi make install +chmod 644 /usr/lib/libtclstub8.6.a + chmod u+w /usr/lib/libtcl8.6.so make install-private-headers @@ -41,6 +43,8 @@ ln -sf tclsh8.6 /usr/bin/tclsh mv /usr/share/man/man3/{Thread,Tcl_Thread}.3 -mkdir -p /usr/share/doc/tcl-8.6.12 -cp -r ../html/* /usr/share/doc/tcl-8.6.12 +cd .. +tar -xf ../tcl8.6.16-html.tar.gz --strip-components=1 +mkdir -p /usr/share/doc/tcl-8.6.16 +cp -r ./html/* /usr/share/doc/tcl-8.6.16 diff --git a/phase4/texinfo.sh b/phase4/texinfo.sh index 046a402..6b3a6ff 100644 --- a/phase4/texinfo.sh +++ b/phase4/texinfo.sh @@ -1,4 +1,5 @@ # Texinfo Phase 4 +sed 's/! $output_file eq/$output_file ne/' -i tp/Texinfo/Convert/*.pm ./configure --prefix=/usr make @@ -12,3 +13,4 @@ fi make install +make TEXMF=/usr/share/texmf install-tex diff --git a/phase4/utillinux.sh b/phase4/utillinux.sh index d65e15a..3e32442 100644 --- a/phase4/utillinux.sh +++ b/phase4/utillinux.sh @@ -2,8 +2,9 @@ ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ --bindir=/usr/bin \ --libdir=/usr/lib \ + --runstatedir=/run \ --sbindir=/usr/sbin \ - --docdir=/usr/share/doc/util-linux-2.38.1 \ + --docdir=/usr/share/doc/util-linux-2.41.1 \ --disable-chfn-chsh \ --disable-login \ --disable-nologin \ @@ -13,14 +14,14 @@ --disable-pylibmount \ --disable-static \ --without-python \ - --without-systemd \ - --without-systemdsystemunitdir + --disable-liblastlog2 make if $RUN_TESTS then set +e + touch /etc/fstab chown -Rv tester . su tester -c "make -k check" set -e diff --git a/phase4/vim.sh b/phase4/vim.sh index dc978fa..3728c77 100644 --- a/phase4/vim.sh +++ b/phase4/vim.sh @@ -9,10 +9,12 @@ if $RUN_TESTS then set +e chown -R tester . - su tester -c "LANG=en_US.UTF-8 make -j1 test" + sed '/test_plugin_glvs/d' -i src/testdir/Make_all.mak + su tester -c "TERM=xterm-256color LANG=en_US.UTF-8 make -j1 test" \ + &> vim-test.log set -e fi make install -ln -sv ../vim/vim90/doc /usr/share/doc/vim-9.0.0228 +ln -sv ../vim/vim91/doc /usr/share/doc/vim-9.1.1629 diff --git a/phase4/wheel.sh b/phase4/wheel.sh index fafb140..c7874aa 100644 --- a/phase4/wheel.sh +++ b/phase4/wheel.sh @@ -1,3 +1,7 @@ # Wheel -pip3 install --no-index $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + +pip3 install --no-index --find-links dist wheel + + diff --git a/phase4/xz.sh b/phase4/xz.sh index 1b40faf..18b93ac 100644 --- a/phase4/xz.sh +++ b/phase4/xz.sh @@ -1,7 +1,7 @@ # Xz Phase 4 ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/xz-5.2.6 + --docdir=/usr/share/doc/xz-5.8.1 make diff --git a/phase4/zstd.sh b/phase4/zstd.sh index 8ee8028..97a28b0 100644 --- a/phase4/zstd.sh +++ b/phase4/zstd.sh @@ -1,6 +1,4 @@ # Zstd Phase 4 -patch -Np1 -i ../$(basename $PATCH_ZSTD) - make prefix=/usr if $RUN_TESTS diff --git a/version-check.sh b/version-check.sh new file mode 100644 index 0000000..1b58815 --- /dev/null +++ b/version-check.sh @@ -0,0 +1,90 @@ +#!/bin/bash +# A script to list version numbers of critical development tools + +# If you have tools installed in other directories, adjust PATH here AND +# in ~lfs/.bashrc (section 4.4) as well. + +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.4 +ver_check "GCC (C++)" g++ 5.4 +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 5.4 + +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 "OK: nproc reports $(nproc) logical cores are available" +fi