├── docker ├── Dockerfile ├── action.yml └── entry.sh ├── step3 ├── cleanup-tools.sh ├── man-pages.sh ├── iana.sh ├── file.sh ├── m4.sh ├── lfs-bootscripts.sh ├── psmisc.sh ├── gzip.sh ├── less.sh ├── texinfo.sh ├── groff.sh ├── bc.sh ├── patch.sh ├── cleanup-tester.sh ├── texinfo2.sh ├── xml-parser.sh ├── diffutils.sh ├── zstd.sh ├── bison.sh ├── libpipeline.sh ├── libtool.sh ├── sysvinit.sh ├── acl.sh ├── gdbm.sh ├── gperf.sh ├── python.sh ├── bison2.sh ├── zlib.sh ├── automake.sh ├── grep.sh ├── libffi.sh ├── xz.sh ├── gettext.sh ├── libcap.sh ├── wheel.sh ├── check.sh ├── tar.sh ├── ldconf.sh ├── attr.sh ├── bash.sh ├── procps.sh ├── flex.sh ├── make.sh ├── mpc.sh ├── findutils.sh ├── pkg-config.sh ├── expat.sh ├── gettext2.sh ├── elfutils.sh ├── autoconf.sh ├── intltool.sh ├── expect.sh ├── sed.sh ├── iproute.sh ├── kmod.sh ├── mpfr.sh ├── gawk.sh ├── grub.sh ├── inetutils.sh ├── gmp.sh ├── meson.sh ├── ninja.sh ├── openssl.sh ├── kbd.sh ├── coreutils.sh ├── dejagnu.sh ├── readline.sh ├── eudev.sh ├── binutils.sh ├── bzip2.sh ├── python2.sh ├── sysklogd.sh ├── tzdata.sh ├── e2fsprogs.sh ├── perl.sh ├── mandb.sh ├── util-linux.sh ├── linux.sh ├── util-linux2.sh ├── vim.sh ├── ncurses.sh ├── shadow.sh ├── gcc.sh ├── tcl.sh ├── perl2.sh ├── prep.sh ├── glibc.sh └── config-files.sh ├── step2 ├── grep.sh ├── sed.sh ├── gzip.sh ├── diffutils.sh ├── m4.sh ├── tar.sh ├── linux.sh ├── patch.sh ├── gawk.sh ├── bash.sh ├── findutils.sh ├── xz.sh ├── binutils.sh ├── make.sh ├── file.sh ├── libstdcpp.sh ├── coreutils.sh ├── ncurses.sh ├── binutils2.sh ├── glibc.sh ├── gcc.sh └── gcc2.sh ├── grub.txt ├── .github └── workflows │ └── run.yml ├── main.teak └── wget-list-sysv /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux 2 | COPY entry.sh /entry.sh 3 | ENTRYPOINT ["/entry.sh"] 4 | -------------------------------------------------------------------------------- /step3/cleanup-tools.sh: -------------------------------------------------------------------------------- 1 | rm -rf /usr/share/{info,man,doc}/* 2 | find /usr/{lib,libexec} -name \*.la -delete 3 | rm -rf /tools 4 | -------------------------------------------------------------------------------- /docker/action.yml: -------------------------------------------------------------------------------- 1 | # action.yml 2 | name: 'RunDocker' 3 | description: 'RunDocker' 4 | runs: 5 | using: 'docker' 6 | image: 'Dockerfile' 7 | -------------------------------------------------------------------------------- /step3/man-pages.sh: -------------------------------------------------------------------------------- 1 | tar -xaf man-pages-6.03.tar.xz 2 | cd man-pages-6.03 3 | make prefix=/usr install 4 | cd .. 5 | rm -rf man-pages-6.03 6 | -------------------------------------------------------------------------------- /step3/iana.sh: -------------------------------------------------------------------------------- 1 | tar -xaf iana-etc-20230202.tar.gz 2 | cd iana-etc-20230202 3 | cp services protocols /etc 4 | cd .. 5 | rm -rf iana-etc-20230202 6 | -------------------------------------------------------------------------------- /step3/file.sh: -------------------------------------------------------------------------------- 1 | tar -xaf file-5.44.tar.gz 2 | cd file-5.44 3 | ./configure --prefix=/usr 4 | make 5 | make check 6 | make install 7 | cd .. 8 | rm -rf file-5.44 9 | -------------------------------------------------------------------------------- /step3/m4.sh: -------------------------------------------------------------------------------- 1 | tar -xaf m4-1.4.19.tar.xz 2 | cd m4-1.4.19 3 | ./configure --prefix=/usr 4 | make 5 | make check 6 | make install 7 | cd .. 8 | rm -rf m4-1.4.19 9 | -------------------------------------------------------------------------------- /step3/lfs-bootscripts.sh: -------------------------------------------------------------------------------- 1 | tar -xaf lfs-bootscripts-20230101.tar.xz 2 | cd lfs-bootscripts-20230101 3 | make install 4 | cd .. 5 | rm -rf lfs-bootscripts-20230101 6 | -------------------------------------------------------------------------------- /step3/psmisc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf psmisc-23.6.tar.xz 2 | cd psmisc-23.6 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf psmisc-23.6 8 | -------------------------------------------------------------------------------- /step3/gzip.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gzip-1.12.tar.xz 2 | cd gzip-1.12 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf gzip-1.12 9 | -------------------------------------------------------------------------------- /step3/less.sh: -------------------------------------------------------------------------------- 1 | tar -xaf less-608.tar.gz 2 | cd less-608 3 | ./configure --prefix=/usr --sysconfdir=/etc 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf less-608 8 | -------------------------------------------------------------------------------- /step3/texinfo.sh: -------------------------------------------------------------------------------- 1 | tar -xaf texinfo-7.0.2.tar.xz 2 | cd texinfo-7.0.2 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf texinfo-7.0.2 8 | -------------------------------------------------------------------------------- /step3/groff.sh: -------------------------------------------------------------------------------- 1 | tar -xaf groff-1.22.4.tar.gz 2 | cd groff-1.22.4 3 | PAGE=A4 ./configure --prefix=/usr 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf groff-1.22.4 8 | -------------------------------------------------------------------------------- /step2/grep.sh: -------------------------------------------------------------------------------- 1 | tar -xaf grep-3.8.tar.xz 2 | cd grep-3.8 3 | ./configure --prefix=/usr --host=$LFS_TGT 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf grep-3.8 8 | -------------------------------------------------------------------------------- /step2/sed.sh: -------------------------------------------------------------------------------- 1 | tar -xaf sed-4.9.tar.xz 2 | cd sed-4.9 3 | ./configure --prefix=/usr --host=$LFS_TGT 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf sed-4.9 8 | -------------------------------------------------------------------------------- /step3/bc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf bc-6.2.4.tar.xz 2 | cd bc-6.2.4 3 | CC=gcc ./configure --prefix=/usr -G -O3 -r 4 | make -j`nproc` 5 | make test 6 | make install 7 | cd .. 8 | rm -rf bc-6.2.4 9 | -------------------------------------------------------------------------------- /step3/patch.sh: -------------------------------------------------------------------------------- 1 | tar -xaf patch-2.7.6.tar.xz 2 | cd patch-2.7.6 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf patch-2.7.6 9 | -------------------------------------------------------------------------------- /step2/gzip.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gzip-1.12.tar.xz 2 | cd gzip-1.12 3 | ./configure --prefix=/usr --host=$LFS_TGT 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf gzip-1.12 8 | -------------------------------------------------------------------------------- /step3/cleanup-tester.sh: -------------------------------------------------------------------------------- 1 | rm -rf /tmp/* 2 | find /usr/lib /usr/libexec -name \*.la -delete 3 | find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf 4 | userdel -r tester 5 | -------------------------------------------------------------------------------- /step3/texinfo2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf texinfo-7.0.2.tar.xz 2 | cd texinfo-7.0.2 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf texinfo-7.0.2 9 | -------------------------------------------------------------------------------- /step3/xml-parser.sh: -------------------------------------------------------------------------------- 1 | tar -xaf XML-Parser-2.46.tar.gz 2 | cd XML-Parser-2.46 3 | perl Makefile.PL 4 | make -j`nproc` 5 | make test 6 | make install 7 | cd .. 8 | rm -rf XML-Parser-2.46 9 | -------------------------------------------------------------------------------- /step3/diffutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf diffutils-3.9.tar.xz 2 | cd diffutils-3.9 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf diffutils-3.9 9 | -------------------------------------------------------------------------------- /step3/zstd.sh: -------------------------------------------------------------------------------- 1 | tar -xaf zstd-1.5.4.tar.gz 2 | cd zstd-1.5.4 3 | make prefix=/usr -j`nproc` 4 | make check 5 | make prefix=/usr install 6 | rm -v /usr/lib/libzstd.a 7 | cd .. 8 | rm -rf zstd-1.5.4 9 | -------------------------------------------------------------------------------- /step2/diffutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf diffutils-3.9.tar.xz 2 | cd diffutils-3.9 3 | ./configure --prefix=/usr --host=$LFS_TGT 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf diffutils-3.9 8 | -------------------------------------------------------------------------------- /step3/bison.sh: -------------------------------------------------------------------------------- 1 | tar -xaf bison-3.8.2.tar.xz 2 | cd bison-3.8.2 3 | ./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.8.2 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf bison-3.8.2 8 | -------------------------------------------------------------------------------- /step3/libpipeline.sh: -------------------------------------------------------------------------------- 1 | tar -xaf libpipeline-1.5.7.tar.gz 2 | cd libpipeline-1.5.7 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf libpipeline-1.5.7 9 | -------------------------------------------------------------------------------- /step3/libtool.sh: -------------------------------------------------------------------------------- 1 | tar -xaf libtool-2.4.7.tar.xz 2 | cd libtool-2.4.7 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make install 6 | rm -fv /usr/lib/libltdl.a 7 | cd .. 8 | rm -rf libtool-2.4.7 9 | -------------------------------------------------------------------------------- /step3/sysvinit.sh: -------------------------------------------------------------------------------- 1 | tar -xaf sysvinit-3.06.tar.xz 2 | cd sysvinit-3.06 3 | patch -Np1 -i ../sysvinit-3.06-consolidated-1.patch 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf sysvinit-3.06 8 | -------------------------------------------------------------------------------- /step3/acl.sh: -------------------------------------------------------------------------------- 1 | tar -xaf acl-2.3.1.tar.xz 2 | cd acl-2.3.1 3 | ./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/acl-2.3.1 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf acl-2.3.1 8 | -------------------------------------------------------------------------------- /step3/gdbm.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gdbm-1.23.tar.gz 2 | cd gdbm-1.23 3 | ./configure --prefix=/usr --disable-static --enable-libgdbm-compat 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf gdbm-1.23 9 | -------------------------------------------------------------------------------- /step3/gperf.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gperf-3.1.tar.gz 2 | cd gperf-3.1 3 | ./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1 4 | make -j`nproc` 5 | make -j1 check 6 | make install 7 | cd .. 8 | rm -rf gperf-3.1 9 | -------------------------------------------------------------------------------- /step3/python.sh: -------------------------------------------------------------------------------- 1 | tar -xaf Python-3.11.2.tar.xz 2 | cd Python-3.11.2 3 | ./configure --prefix=/usr --enable-shared --without-ensurepip 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf Python-3.11.2 8 | -------------------------------------------------------------------------------- /docker/entry.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -l 2 | pacman -Syu --noconfirm --needed wget base-devel python 3 | wget --input-file=wget-list-sysv --continue --directory-prefix=sources 4 | teak/teak main.teak lfs=lfs lfsSources=sources 5 | -------------------------------------------------------------------------------- /step2/m4.sh: -------------------------------------------------------------------------------- 1 | tar -xaf m4-1.4.19.tar.xz 2 | cd m4-1.4.19 3 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(build-aux/config.guess) 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf m4-1.4.19 8 | -------------------------------------------------------------------------------- /step2/tar.sh: -------------------------------------------------------------------------------- 1 | tar -xaf tar-1.34.tar.xz 2 | cd tar-1.34 3 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(build-aux/config.guess) 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf tar-1.34 8 | -------------------------------------------------------------------------------- /step3/bison2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf bison-3.8.2.tar.xz 2 | cd bison-3.8.2 3 | ./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.8.2 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf bison-3.8.2 9 | -------------------------------------------------------------------------------- /step3/zlib.sh: -------------------------------------------------------------------------------- 1 | tar -xaf zlib-1.2.13.tar.xz 2 | cd zlib-1.2.13 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make check 6 | make install 7 | rm -fv /usr/lib/libz.a 8 | cd .. 9 | rm -rf zlib-1.2.13 10 | -------------------------------------------------------------------------------- /step2/linux.sh: -------------------------------------------------------------------------------- 1 | tar -xaf linux-6.1.11.tar.xz 2 | cd linux-6.1.11 3 | make mrproper 4 | make headers 5 | find usr/include -type f ! -name '*.h' -delete 6 | cp -rv usr/include $LFS/usr 7 | cd .. 8 | rm -rf linux-6.1.11 9 | -------------------------------------------------------------------------------- /step3/automake.sh: -------------------------------------------------------------------------------- 1 | tar -xaf automake-1.16.5.tar.xz 2 | cd automake-1.16.5 3 | ./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.5 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf automake-1.16.5 8 | -------------------------------------------------------------------------------- /step3/grep.sh: -------------------------------------------------------------------------------- 1 | tar -xaf grep-3.8.tar.xz 2 | cd grep-3.8 3 | sed -i "s/echo/#echo/" src/egrep.sh 4 | ./configure --prefix=/usr 5 | make -j`nproc` 6 | make check 7 | make install 8 | cd .. 9 | rm -rf grep-3.8 10 | -------------------------------------------------------------------------------- /step3/libffi.sh: -------------------------------------------------------------------------------- 1 | tar -xaf libffi-3.4.4.tar.gz 2 | cd libffi-3.4.4 3 | ./configure --prefix=/usr --disable-static --with-gcc-arch=x86-64 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf libffi-3.4.4 9 | -------------------------------------------------------------------------------- /step3/xz.sh: -------------------------------------------------------------------------------- 1 | tar -xaf xz-5.4.1.tar.xz 2 | cd xz-5.4.1 3 | ./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/xz-5.4.1 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf xz-5.4.1 9 | -------------------------------------------------------------------------------- /step3/gettext.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gettext-0.21.1.tar.xz 2 | cd gettext-0.21.1 3 | ./configure --disable-shared 4 | make -j`nproc` 5 | cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin 6 | cd .. 7 | rm -rf gettext-0.21.1 8 | -------------------------------------------------------------------------------- /step3/libcap.sh: -------------------------------------------------------------------------------- 1 | tar -xaf libcap-2.67.tar.xz 2 | cd libcap-2.67 3 | sed -i '/install -m.*STA/d' libcap/Makefile 4 | make prefix=/usr lib=lib 5 | make test 6 | make prefix=/usr lib=lib install 7 | cd .. 8 | rm -rf libcap-2.67 9 | -------------------------------------------------------------------------------- /step3/wheel.sh: -------------------------------------------------------------------------------- 1 | tar -xaf wheel-0.38.4.tar.gz 2 | cd wheel-0.38.4 3 | PYTHONPATH=src pip3 wheel -w dist --no-build-isolation --no-deps $PWD 4 | pip3 install --no-index --find-links=dist wheel 5 | cd .. 6 | rm -rf wheel-0.38.4 7 | -------------------------------------------------------------------------------- /step2/patch.sh: -------------------------------------------------------------------------------- 1 | tar -xaf patch-2.7.6.tar.xz 2 | cd patch-2.7.6 3 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(build-aux/config.guess) 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf patch-2.7.6 8 | -------------------------------------------------------------------------------- /step3/check.sh: -------------------------------------------------------------------------------- 1 | tar -xaf check-0.15.2.tar.gz 2 | cd check-0.15.2 3 | ./configure --prefix=/usr --disable-static 4 | make -j`nproc` 5 | make check 6 | make docdir=/usr/share/doc/check-0.15.2 install 7 | cd .. 8 | rm -rf check-0.15.2 9 | -------------------------------------------------------------------------------- /step3/tar.sh: -------------------------------------------------------------------------------- 1 | tar -xaf tar-1.34.tar.xz 2 | cd tar-1.34 3 | FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr 4 | make -j`nproc` 5 | make install 6 | make -C doc install-html docdir=/usr/share/doc/tar-1.34 7 | cd .. 8 | rm -rf tar-1.34 9 | -------------------------------------------------------------------------------- /step3/ldconf.sh: -------------------------------------------------------------------------------- 1 | cat > /etc/ld.so.conf << "EOF" 2 | # Begin /etc/ld.so.conf 3 | /usr/local/lib 4 | /opt/lib 5 | 6 | # Add an include directory 7 | include /etc/ld.so.conf.d/*.conf 8 | 9 | EOF 10 | mkdir -pv /etc/ld.so.conf.d 11 | -------------------------------------------------------------------------------- /step3/attr.sh: -------------------------------------------------------------------------------- 1 | tar -xaf attr-2.5.1.tar.gz 2 | cd attr-2.5.1 3 | ./configure --prefix=/usr --disable-static --sysconfdir=/etc --docdir=/usr/share/doc/attr-2.5.1 4 | make -j`nproc` 5 | # make check 6 | make install 7 | cd .. 8 | rm -rf attr-2.5.1 9 | -------------------------------------------------------------------------------- /step3/bash.sh: -------------------------------------------------------------------------------- 1 | tar -xaf bash-5.2.15.tar.gz 2 | cd bash-5.2.15 3 | ./configure --prefix=/usr --without-bash-malloc --with-installed-readline --docdir=/usr/share/doc/bash-5.2.15 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf bash-5.2.15 8 | -------------------------------------------------------------------------------- /step3/procps.sh: -------------------------------------------------------------------------------- 1 | tar -xaf procps-ng-4.0.2.tar.xz 2 | cd procps-ng-4.0.2 3 | ./configure --prefix=/usr --docdir=/usr/share/doc/procps-ng-4.0.2 --disable-static --disable-kill 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf procps-ng-4.0.2 8 | -------------------------------------------------------------------------------- /step2/gawk.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gawk-5.2.1.tar.xz 2 | cd gawk-5.2.1 3 | sed -i 's/extras//' Makefile.in 4 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(build-aux/config.guess) 5 | make -j`nproc` 6 | make DESTDIR=$LFS install 7 | cd .. 8 | rm -rf gawk-5.2.1 9 | -------------------------------------------------------------------------------- /step3/flex.sh: -------------------------------------------------------------------------------- 1 | tar -xaf flex-2.6.4.tar.gz 2 | cd flex-2.6.4 3 | ./configure --prefix=/usr --docdir=/usr/share/doc/flex-2.6.4 --disable-static 4 | make -j`nproc` 5 | make check 6 | make install 7 | ln -sv flex /usr/bin/lex 8 | cd .. 9 | rm -rf flex-2.6.4 10 | -------------------------------------------------------------------------------- /step3/make.sh: -------------------------------------------------------------------------------- 1 | tar -xaf make-4.4.tar.gz 2 | cd make-4.4 3 | sed -e '/ifdef SIGPIPE/,+2 d' -e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' -i src/main.c 4 | ./configure --prefix=/usr 5 | make -j`nproc` 6 | make check 7 | make install 8 | cd .. 9 | rm -rf make-4.4 10 | -------------------------------------------------------------------------------- /step3/mpc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf mpc-1.3.1.tar.gz 2 | cd mpc-1.3.1 3 | ./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/mpc-1.3.1 4 | make -j`nproc` 5 | make html 6 | make check 7 | make install 8 | make install-html 9 | cd .. 10 | rm -rf mpc-1.3.1 11 | -------------------------------------------------------------------------------- /step2/bash.sh: -------------------------------------------------------------------------------- 1 | tar -xaf bash-5.2.15.tar.gz 2 | cd bash-5.2.15 3 | ./configure --prefix=/usr --build=$(sh support/config.guess) --host=$LFS_TGT --without-bash-malloc 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | ln -sv bash $LFS/bin/sh 7 | cd .. 8 | rm -rf bash-5.2.15 9 | -------------------------------------------------------------------------------- /step2/findutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf findutils-4.9.0.tar.xz 2 | cd findutils-4.9.0 3 | ./configure --prefix=/usr --localstatedir=/var/lib/locate --host=$LFS_TGT --build=$(build-aux/config.guess) 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | cd .. 7 | rm -rf findutils-4.9.0 8 | -------------------------------------------------------------------------------- /step3/findutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf findutils-4.9.0.tar.xz 2 | cd findutils-4.9.0 3 | ./configure --prefix=/usr --localstatedir=/var/lib/locate 4 | make -j`nproc` 5 | chown -Rv tester . 6 | su tester -c "PATH=$PATH make check" 7 | make install 8 | cd .. 9 | rm -rf findutils-4.9.0 10 | -------------------------------------------------------------------------------- /step3/pkg-config.sh: -------------------------------------------------------------------------------- 1 | tar -xaf pkg-config-0.29.2.tar.gz 2 | cd pkg-config-0.29.2 3 | ./configure --prefix=/usr --with-internal-glib --disable-host-tool --docdir=/usr/share/doc/pkg-config-0.29.2 4 | make -j`nproc` 5 | make check 6 | make install 7 | cd .. 8 | rm -rf pkg-config-0.29.2 9 | -------------------------------------------------------------------------------- /step2/xz.sh: -------------------------------------------------------------------------------- 1 | tar -xaf xz-5.4.1.tar.xz 2 | cd xz-5.4.1 3 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(build-aux/config.guess) --disable-static --docdir=/usr/share/doc/xz-5.4.1 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | rm -v $LFS/usr/lib/liblzma.la 7 | cd .. 8 | rm -rf xz-5.4.1 9 | -------------------------------------------------------------------------------- /step3/expat.sh: -------------------------------------------------------------------------------- 1 | tar -xaf expat-2.5.0.tar.xz 2 | cd expat-2.5.0 3 | ./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/expat-2.5.0 4 | make -j`nproc` 5 | make check 6 | make install 7 | install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.5.0 8 | cd .. 9 | rm -rf expat-2.5.0 10 | -------------------------------------------------------------------------------- /step3/gettext2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gettext-0.21.1.tar.xz 2 | cd gettext-0.21.1 3 | ./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/gettext-0.21.1 4 | make -j`nproc` 5 | make check 6 | make install 7 | chmod -v 0755 /usr/lib/preloadable_libintl.so 8 | cd .. 9 | rm -rf gettext-0.21.1 10 | -------------------------------------------------------------------------------- /step2/binutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf binutils-2.40.tar.xz 2 | cd binutils-2.40 3 | mkdir build 4 | cd build 5 | ../configure --prefix=$LFS/tools --with-sysroot=$LFS --target=$LFS_TGT --disable-nls --enable-gprofng=no --disable-werror 6 | make -j`nproc` 7 | make install 8 | cd ../.. 9 | rm -rf binutils-2.40 10 | -------------------------------------------------------------------------------- /step3/elfutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf elfutils-0.188.tar.bz2 2 | cd elfutils-0.188 3 | ./configure --prefix=/usr --disable-debuginfod --enable-libdebuginfod=dummy 4 | make -j`nproc` 5 | make -C libelf install 6 | install -vm644 config/libelf.pc /usr/lib/pkgconfig 7 | rm /usr/lib/libelf.a 8 | cd .. 9 | rm -rf elfutils-0.188 10 | -------------------------------------------------------------------------------- /step2/make.sh: -------------------------------------------------------------------------------- 1 | tar -xaf make-4.4.tar.gz 2 | cd make-4.4 3 | sed -e '/ifdef SIGPIPE/,+2 d' -e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' -i src/main.c 4 | ./configure --prefix=/usr --without-guile --host=$LFS_TGT --build=$(build-aux/config.guess) 5 | make -j`nproc` 6 | make DESTDIR=$LFS install 7 | cd .. 8 | rm -rf make-4.4 9 | -------------------------------------------------------------------------------- /step3/autoconf.sh: -------------------------------------------------------------------------------- 1 | tar -xaf autoconf-2.71.tar.xz 2 | cd autoconf-2.71 3 | sed -e 's/SECONDS|/&SHLVL|/' -e '/BASH_ARGV=/a\ /^SHLVL=/ d' -i.orig tests/local.at 4 | ./configure --prefix=/usr 5 | make -j`nproc` 6 | make check TESTSUITEFLAGS=-j`nproc` 7 | make install 8 | cd .. 9 | rm -rf autoconf-2.71 10 | -------------------------------------------------------------------------------- /step3/intltool.sh: -------------------------------------------------------------------------------- 1 | tar -xaf intltool-0.51.0.tar.gz 2 | cd intltool-0.51.0 3 | sed -i 's:\\\${:\\\$\\{:' intltool-update.in 4 | ./configure --prefix=/usr 5 | make -j`nproc` 6 | make check 7 | make install 8 | install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-0.51.0/I18N-HOWTO 9 | cd .. 10 | rm -rf intltool-0.51.0 11 | -------------------------------------------------------------------------------- /step3/expect.sh: -------------------------------------------------------------------------------- 1 | tar -xaf expect5.45.4.tar.gz 2 | cd expect5.45.4 3 | ./configure --prefix=/usr --with-tcl=/usr/lib --enable-shared --mandir=/usr/share/man --with-tclinclude=/usr/include 4 | make -j`nproc` 5 | make test 6 | make install 7 | ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib 8 | cd .. 9 | rm -rf expect5.45.4 10 | -------------------------------------------------------------------------------- /step3/sed.sh: -------------------------------------------------------------------------------- 1 | tar -xaf sed-4.9.tar.xz 2 | cd sed-4.9 3 | ./configure --prefix=/usr 4 | make -j`nproc` 5 | make html 6 | chown -Rv tester . 7 | su tester -c "PATH=$PATH make check" 8 | make install 9 | install -d -m755 /usr/share/doc/sed-4.9 10 | install -m644 doc/sed.html /usr/share/doc/sed-4.9 11 | cd .. 12 | rm -rf sed-4.9 13 | -------------------------------------------------------------------------------- /step3/iproute.sh: -------------------------------------------------------------------------------- 1 | tar -xaf iproute2-6.1.0.tar.xz 2 | cd iproute2-6.1.0 3 | sed -i /ARPD/d Makefile 4 | rm -fv man/man8/arpd.8 5 | make NETNS_RUN_DIR=/run/netns -j`nproc` 6 | make SBINDIR=/usr/sbin install 7 | mkdir -pv /usr/share/doc/iproute2-6.1.0 8 | cp -v COPYING README* /usr/share/doc/iproute2-6.1.0 9 | cd .. 10 | rm -rf iproute2-6.1.0 11 | -------------------------------------------------------------------------------- /step3/kmod.sh: -------------------------------------------------------------------------------- 1 | tar -xaf kmod-30.tar.xz 2 | cd kmod-30 3 | ./configure --prefix=/usr --sysconfdir=/etc --with-openssl --with-xz --with-zstd --with-zlib 4 | make -j`nproc` 5 | make install 6 | for target in depmod insmod modinfo modprobe rmmod; do 7 | ln -sfv ../bin/kmod /usr/sbin/$target 8 | done 9 | ln -sfv kmod /usr/bin/lsmod 10 | cd .. 11 | rm -rf kmod-30 12 | -------------------------------------------------------------------------------- /step3/mpfr.sh: -------------------------------------------------------------------------------- 1 | tar -xaf mpfr-4.2.0.tar.xz 2 | cd mpfr-4.2.0 3 | sed -e 's/+01,234,567/+1,234,567 /' -e 's/13.10Pd/13Pd/' -i tests/tsprintf.c 4 | ./configure --prefix=/usr --disable-static --enable-thread-safe --docdir=/usr/share/doc/mpfr-4.2.0 5 | make -j`nproc` 6 | make html 7 | make check 8 | make install 9 | make install-html 10 | cd .. 11 | rm -rf mpfr-4.2.0 12 | -------------------------------------------------------------------------------- /step3/gawk.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gawk-5.2.1.tar.xz 2 | cd gawk-5.2.1 3 | sed -i 's/extras//' Makefile.in 4 | ./configure --prefix=/usr 5 | make -j`nproc` 6 | make check 7 | make LN='ln -f' install 8 | mkdir -pv /usr/share/doc/gawk-5.2.1 9 | cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.2.1 10 | cd .. 11 | rm -rf gawk-5.2.1 12 | -------------------------------------------------------------------------------- /step3/grub.sh: -------------------------------------------------------------------------------- 1 | tar -xaf grub-2.06.tar.xz 2 | cd grub-2.06 3 | unset {C,CPP,CXX,LD}FLAGS 4 | patch -Np1 -i ../grub-2.06-upstream_fixes-1.patch 5 | ./configure --prefix=/usr --sysconfdir=/etc --disable-efiemu --disable-werror 6 | make -j`nproc` 7 | make install 8 | mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions 9 | cd .. 10 | rm -rf grub-2.06 11 | -------------------------------------------------------------------------------- /step3/inetutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf inetutils-2.4.tar.xz 2 | cd inetutils-2.4 3 | ./configure --prefix=/usr --bindir=/usr/bin --localstatedir=/var --disable-logger --disable-whois --disable-rcp --disable-rexec --disable-rlogin --disable-rsh --disable-servers 4 | make -j`nproc` 5 | # make check 6 | make install 7 | mv -v /usr/{,s}bin/ifconfig 8 | cd .. 9 | rm -rf inetutils-2.4 10 | -------------------------------------------------------------------------------- /step3/gmp.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gmp-6.2.1.tar.xz 2 | cd gmp-6.2.1 3 | cp -v configfsf.guess config.guess 4 | cp -v configfsf.sub config.sub 5 | ./configure --prefix=/usr --enable-cxx --disable-static --docdir=/usr/share/doc/gmp-6.2.1 6 | make -j`nproc` 7 | make html 8 | make check 2>&1 | tee gmp-check-log 9 | make install 10 | make install-html 11 | cd .. 12 | rm -rf gmp-6.2.1 13 | -------------------------------------------------------------------------------- /step3/meson.sh: -------------------------------------------------------------------------------- 1 | tar -xaf meson-1.0.0.tar.gz 2 | cd meson-1.0.0 3 | pip3 wheel -w dist --no-build-isolation --no-deps $PWD 4 | pip3 install --no-index --find-links dist meson 5 | install -vDm644 data/shell-completions/bash/meson /usr/share/bash-completion/completions/meson 6 | install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/_meson 7 | cd .. 8 | rm -rf meson-1.0.0 9 | -------------------------------------------------------------------------------- /step2/file.sh: -------------------------------------------------------------------------------- 1 | tar -xaf file-5.44.tar.gz 2 | cd file-5.44 3 | mkdir build 4 | pushd build 5 | ../configure --disable-bzlib --disable-libseccomp --disable-xzlib --disable-zlib 6 | make 7 | popd 8 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess) 9 | make FILE_COMPILE=$(pwd)/build/src/file 10 | make DESTDIR=$LFS install 11 | rm -v $LFS/usr/lib/libmagic.la 12 | cd .. 13 | rm -rf file-5.44 14 | -------------------------------------------------------------------------------- /step3/ninja.sh: -------------------------------------------------------------------------------- 1 | tar -xaf ninja-1.11.1.tar.gz 2 | cd ninja-1.11.1 3 | python3 configure.py --bootstrap 4 | ./ninja ninja_test 5 | ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots 6 | install -vm755 ninja /usr/bin/ 7 | install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja 8 | install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja 9 | cd .. 10 | rm -rf ninja-1.11.1 11 | -------------------------------------------------------------------------------- /step3/openssl.sh: -------------------------------------------------------------------------------- 1 | tar -xaf openssl-3.0.8.tar.gz 2 | cd openssl-3.0.8 3 | ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib shared zlib-dynamic 4 | make -j`nproc` 5 | make test 6 | sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile 7 | make MANSUFFIX=ssl install 8 | mv -v /usr/share/doc/openssl /usr/share/doc/openssl-3.0.8 9 | cp -vfr doc/* /usr/share/doc/openssl-3.0.8 10 | cd .. 11 | rm -rf openssl-3.0.8 12 | -------------------------------------------------------------------------------- /step2/libstdcpp.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gcc-12.2.0.tar.xz 2 | cd gcc-12.2.0 3 | mkdir build 4 | cd build 5 | ../libstdc++-v3/configure --host=$LFS_TGT --build=$(../config.guess) --prefix=/usr --disable-multilib --disable-nls --disable-libstdcxx-pch --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/12.2.0 6 | make -j`nproc` 7 | make DESTDIR=$LFS install 8 | rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la 9 | cd ../.. 10 | rm -rf gcc-12.2.0 11 | -------------------------------------------------------------------------------- /step3/kbd.sh: -------------------------------------------------------------------------------- 1 | tar -xaf kbd-2.5.1.tar.xz 2 | cd kbd-2.5.1 3 | patch -Np1 -i ../kbd-2.5.1-backspace-1.patch 4 | sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure 5 | sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in 6 | ./configure --prefix=/usr --disable-vlock 7 | make -j`nproc` 8 | make check 9 | make install 10 | mkdir -pv /usr/share/doc/kbd-2.5.1 11 | cp -R -v docs/doc/* /usr/share/doc/kbd-2.5.1 12 | cd .. 13 | rm -rf kbd-2.5.1 14 | -------------------------------------------------------------------------------- /step3/coreutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf coreutils-9.1.tar.xz 2 | cd coreutils-9.1 3 | patch -Np1 -i ../coreutils-9.1-i18n-1.patch 4 | autoreconf -fiv 5 | FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr --enable-no-install-program=kill,uptime 6 | make -j`nproc` 7 | make install 8 | mv -v /usr/bin/chroot /usr/sbin 9 | mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 10 | sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8 11 | cd .. 12 | rm -rf coreutils-9.1 13 | -------------------------------------------------------------------------------- /step3/dejagnu.sh: -------------------------------------------------------------------------------- 1 | tar -xaf dejagnu-1.6.3.tar.gz 2 | cd dejagnu-1.6.3 3 | mkdir -v build 4 | cd build 5 | ../configure --prefix=/usr 6 | makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi 7 | makeinfo --plaintext -o doc/dejagnu.txt ../doc/dejagnu.texi 8 | make install 9 | install -v -dm755 /usr/share/doc/dejagnu-1.6.3 10 | install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-1.6.3 11 | make check 12 | cd ../.. 13 | rm -rf dejagnu-1.6.3 14 | -------------------------------------------------------------------------------- /step3/readline.sh: -------------------------------------------------------------------------------- 1 | tar -xaf readline-8.2.tar.gz 2 | cd readline-8.2 3 | sed -i '/MV.*old/d' Makefile.in 4 | sed -i '/{OLDSUFF}/c:' support/shlib-install 5 | patch -Np1 -i ../readline-8.2-upstream_fix-1.patch 6 | ./configure --prefix=/usr --disable-static --with-curses --docdir=/usr/share/doc/readline-8.2 7 | make SHLIB_LIBS="-lncursesw" 8 | make SHLIB_LIBS="-lncursesw" install 9 | install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.2 10 | cd .. 11 | rm -rf readline-8.2 12 | -------------------------------------------------------------------------------- /step3/eudev.sh: -------------------------------------------------------------------------------- 1 | tar -xaf eudev-3.2.11.tar.gz 2 | cd eudev-3.2.11 3 | sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in 4 | ./configure --prefix=/usr --bindir=/usr/sbin --sysconfdir=/etc --enable-manpages --disable-static 5 | make -j`nproc` 6 | mkdir -pv /usr/lib/udev/rules.d 7 | mkdir -pv /etc/udev/rules.d 8 | # make check 9 | make install 10 | tar -xvf ../udev-lfs-20171102.tar.xz 11 | make -f udev-lfs-20171102/Makefile.lfs install 12 | udevadm hwdb --update 13 | cd .. 14 | rm -rf eudev-3.2.11 15 | -------------------------------------------------------------------------------- /step3/binutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf binutils-2.40.tar.xz 2 | cd binutils-2.40 3 | expect -c "spawn ls" | grep "spawn ls" 4 | mkdir -v build 5 | cd build 6 | ../configure --prefix=/usr --sysconfdir=/etc --enable-gold --enable-ld=default --enable-plugins --enable-shared --disable-werror --enable-64-bit-bfd --with-system-zlib 7 | make tooldir=/usr -j`nproc` 8 | make tooldir=/usr install 9 | rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,sframe,opcodes}.a 10 | rm -fv /usr/share/man/man1/{gprofng,gp-*}.1 11 | cd ../.. 12 | rm -rf binutils-2.40 13 | -------------------------------------------------------------------------------- /step2/coreutils.sh: -------------------------------------------------------------------------------- 1 | tar -xaf coreutils-9.1.tar.xz 2 | cd coreutils-9.1 3 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(build-aux/config.guess) --enable-install-program=hostname --enable-no-install-program=kill,uptime 4 | make -j`nproc` 5 | make DESTDIR=$LFS install 6 | mv -v $LFS/usr/bin/chroot $LFS/usr/sbin 7 | mkdir -pv $LFS/usr/share/man/man8 8 | mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8 9 | sed -i 's/"1"/"8"/' $LFS/usr/share/man/man8/chroot.8 10 | cd .. 11 | rm -rf coreutils-9.1 12 | -------------------------------------------------------------------------------- /step3/bzip2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf bzip2-1.0.8.tar.gz 2 | cd bzip2-1.0.8 3 | patch -Np1 -i ../bzip2-1.0.8-install_docs-1.patch 4 | sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile 5 | sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile 6 | make -f Makefile-libbz2_so 7 | make clean 8 | make -j`nproc` 9 | make PREFIX=/usr install 10 | cp -av libbz2.so.* /usr/lib 11 | ln -sv libbz2.so.1.0.8 /usr/lib/libbz2.so 12 | cp -v bzip2-shared /usr/bin/bzip2 13 | ln -sfv bzip2 /usr/bin/bzcat 14 | ln -sfv bzip2 /usr/bin/bunzip2 15 | rm -fv /usr/lib/libbz2.a 16 | cd .. 17 | rm -rf bzip2-1.0.8 18 | -------------------------------------------------------------------------------- /step3/python2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf Python-3.11.2.tar.xz 2 | cd Python-3.11.2 3 | ./configure --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --enable-optimizations 4 | make -j`nproc` 5 | make install 6 | cd .. 7 | rm -rf Python-3.11.2 8 | 9 | cat > /etc/pip.conf << EOF 10 | [global] 11 | root-user-action = ignore 12 | disable-pip-version-check = true 13 | EOF 14 | 15 | install -v -dm755 /usr/share/doc/python-3.11.2/html 16 | 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 17 | -------------------------------------------------------------------------------- /step3/sysklogd.sh: -------------------------------------------------------------------------------- 1 | tar -xaf sysklogd-1.5.1.tar.gz 2 | cd sysklogd-1.5.1 3 | sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c 4 | sed -i 's/union wait/int/' syslogd.c 5 | make -j`nproc` 6 | make BINDIR=/sbin install 7 | cd .. 8 | rm -rf sysklogd-1.5.1 9 | 10 | cat > /etc/syslog.conf << "EOF" 11 | # Begin /etc/syslog.conf 12 | 13 | auth,authpriv.* -/var/log/auth.log 14 | *.*;auth,authpriv.none -/var/log/sys.log 15 | daemon.* -/var/log/daemon.log 16 | kern.* -/var/log/kern.log 17 | mail.* -/var/log/mail.log 18 | user.* -/var/log/user.log 19 | *.emerg * 20 | 21 | # End /etc/syslog.conf 22 | EOF 23 | -------------------------------------------------------------------------------- /step2/ncurses.sh: -------------------------------------------------------------------------------- 1 | tar -xaf ncurses-6.4.tar.gz 2 | cd ncurses-6.4 3 | sed -i s/mawk// configure 4 | mkdir build 5 | pushd build 6 | ../configure 7 | make -C include 8 | make -C progs tic 9 | popd 10 | ./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess) --mandir=/usr/share/man --with-manpage-format=normal --with-shared --without-normal --with-cxx-shared --without-debug --without-ada --disable-stripping --enable-widec 11 | make -j`nproc` 12 | make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install 13 | echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so 14 | cd .. 15 | rm -rf ncurses-6.4 16 | -------------------------------------------------------------------------------- /step2/binutils2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf binutils-2.40.tar.xz 2 | cd binutils-2.40 3 | sed '6009s/$add_dir//' -i ltmain.sh 4 | mkdir -v build 5 | cd build 6 | ../configure \ 7 | --prefix=/usr \ 8 | --build=$(../config.guess) \ 9 | --host=$LFS_TGT \ 10 | --disable-nls \ 11 | --enable-shared \ 12 | --enable-gprofng=no \ 13 | --disable-werror \ 14 | --enable-64-bit-bfd 15 | make -j`nproc` 16 | make DESTDIR=$LFS install 17 | rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.{a,la} 18 | cd ../.. 19 | rm -rf binutils-2.40 20 | -------------------------------------------------------------------------------- /step3/tzdata.sh: -------------------------------------------------------------------------------- 1 | mkdir -p tzdata2022g 2 | cd tzdata2022g 3 | tar -xf ../tzdata2022g.tar.gz 4 | ZONEINFO=/usr/share/zoneinfo 5 | mkdir -pv $ZONEINFO/{posix,right} 6 | for tz in etcetera southamerica northamerica europe africa antarctica \ 7 | asia australasia backward; do 8 | zic -L /dev/null -d $ZONEINFO ${tz} 9 | zic -L /dev/null -d $ZONEINFO/posix ${tz} 10 | zic -L leapseconds -d $ZONEINFO/right ${tz} 11 | done 12 | cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO 13 | zic -d $ZONEINFO -p America/New_York 14 | unset ZONEINFO 15 | cd .. 16 | rm -rf tzdata2022g 17 | ln -sfv /usr/share/zoneinfo/GMT /etc/localtime 18 | -------------------------------------------------------------------------------- /step2/glibc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf glibc-2.37.tar.xz 2 | cd glibc-2.37 3 | ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 4 | ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3 5 | patch -Np1 -i ../glibc-2.37-fhs-1.patch 6 | mkdir -v build 7 | cd build 8 | echo "rootsbindir=/usr/sbin" > configparms 9 | ../configure --prefix=/usr --host=$LFS_TGT --build=$(../scripts/config.guess) --enable-kernel=3.2 --with-headers=$LFS/usr/include libc_cv_slibdir=/usr/lib 10 | make -j1 11 | make DESTDIR=$LFS install 12 | sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd 13 | cd ../.. 14 | rm -rf glibc-2.37 15 | $LFS/tools/libexec/gcc/$LFS_TGT/12.2.0/install-tools/mkheaders 16 | -------------------------------------------------------------------------------- /step3/e2fsprogs.sh: -------------------------------------------------------------------------------- 1 | tar -xaf e2fsprogs-1.47.0.tar.gz 2 | cd e2fsprogs-1.47.0 3 | mkdir -v build 4 | cd build 5 | ../configure --prefix=/usr \ 6 | --sysconfdir=/etc \ 7 | --enable-elf-shlibs \ 8 | --disable-libblkid \ 9 | --disable-libuuid \ 10 | --disable-uuidd \ 11 | --disable-fsck 12 | make -j`nproc` 13 | make install 14 | rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a 15 | gunzip -v /usr/share/info/libext2fs.info.gz 16 | install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info 17 | cd ../.. 18 | rm -rf e2fsprogs-1.47.0 19 | -------------------------------------------------------------------------------- /step3/perl.sh: -------------------------------------------------------------------------------- 1 | tar -xaf perl-5.36.0.tar.xz 2 | cd perl-5.36.0 3 | sh Configure -des \ 4 | -Dprefix=/usr \ 5 | -Dvendorprefix=/usr \ 6 | -Dprivlib=/usr/lib/perl5/5.36/core_perl \ 7 | -Darchlib=/usr/lib/perl5/5.36/core_perl \ 8 | -Dsitelib=/usr/lib/perl5/5.36/site_perl \ 9 | -Dsitearch=/usr/lib/perl5/5.36/site_perl \ 10 | -Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \ 11 | -Dvendorarch=/usr/lib/perl5/5.36/vendor_perl 12 | make -j`nproc` 13 | make install 14 | cd .. 15 | rm -rf perl-5.36.0 16 | -------------------------------------------------------------------------------- /step3/mandb.sh: -------------------------------------------------------------------------------- 1 | tar -xaf man-db-2.11.2.tar.xz 2 | cd man-db-2.11.2 3 | ./configure --prefix=/usr \ 4 | --docdir=/usr/share/doc/man-db-2.11.2 \ 5 | --sysconfdir=/etc \ 6 | --disable-setuid \ 7 | --enable-cache-owner=bin \ 8 | --with-browser=/usr/bin/lynx \ 9 | --with-vgrind=/usr/bin/vgrind \ 10 | --with-grap=/usr/bin/grap \ 11 | --with-systemdtmpfilesdir= \ 12 | --with-systemdsystemunitdir= 13 | make -j`nproc` 14 | make check 15 | make install 16 | cd .. 17 | rm -rf man-db-2.11.2 18 | -------------------------------------------------------------------------------- /step3/util-linux.sh: -------------------------------------------------------------------------------- 1 | tar -xaf util-linux-2.38.1.tar.xz 2 | cd util-linux-2.38.1 3 | mkdir -pv /var/lib/hwclock 4 | ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 5 | --libdir=/usr/lib \ 6 | --docdir=/usr/share/doc/util-linux-2.38.1 \ 7 | --disable-chfn-chsh \ 8 | --disable-login \ 9 | --disable-nologin \ 10 | --disable-su \ 11 | --disable-setpriv \ 12 | --disable-runuser \ 13 | --disable-pylibmount \ 14 | --disable-static \ 15 | --without-python \ 16 | runstatedir=/run 17 | make -j`nproc` 18 | make install 19 | cd .. 20 | rm -rf util-linux-2.38.1 21 | -------------------------------------------------------------------------------- /step3/linux.sh: -------------------------------------------------------------------------------- 1 | tar -xaf linux-6.1.11.tar.xz 2 | cd linux-6.1.11 3 | make mrproper 4 | cp ../../linux_config .config 5 | make -j`nproc` 6 | make modules_install 7 | cp -iv arch/x86/boot/bzImage /boot/vmlinuz-6.1.11-lfs-11.3 8 | cp -iv System.map /boot/System.map-6.1.11 9 | install -d /usr/share/doc/linux-6.1.11 10 | cp -r Documentation/* /usr/share/doc/linux-6.1.11 11 | cd .. 12 | rm -rf linux-6.1.11 13 | 14 | install -v -m755 -d /etc/modprobe.d 15 | cat > /etc/modprobe.d/usb.conf << "EOF" 16 | # Begin /etc/modprobe.d/usb.conf 17 | 18 | install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true 19 | install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true 20 | 21 | # End /etc/modprobe.d/usb.conf 22 | EOF 23 | -------------------------------------------------------------------------------- /step3/util-linux2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf util-linux-2.38.1.tar.xz 2 | cd util-linux-2.38.1 3 | ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 4 | --bindir=/usr/bin \ 5 | --libdir=/usr/lib \ 6 | --sbindir=/usr/sbin \ 7 | --disable-chfn-chsh \ 8 | --disable-login \ 9 | --disable-nologin \ 10 | --disable-su \ 11 | --disable-setpriv \ 12 | --disable-runuser \ 13 | --disable-pylibmount \ 14 | --disable-static \ 15 | --without-python \ 16 | --without-systemd \ 17 | --without-systemdsystemunitdir \ 18 | --docdir=/usr/share/doc/util-linux-2.38.1 19 | make -j`nproc` 20 | make install 21 | cd .. 22 | rm -rf util-linux-2.38.1 23 | -------------------------------------------------------------------------------- /grub.txt: -------------------------------------------------------------------------------- 1 | To install with GRUB: 2 | 1. Create a fresh partition and mount it. 3 | 2. Extract lfs.tar.xz onto the partition (remove the leading directory). 4 | 3. Mount /dev, /proc, /sys and /run (see .github/workflows/run.yml). 5 | 4. Modify /etc/fstab with your partition's UUID. 6 | 5. Install GRUB with something like: 7 | sudo chroot /mnt /usr/bin/env -i HOME=/root TERM="$TERM" PATH=/usr/bin:/usr/sbin grub-install /dev/sdX 8 | 6. Create /boot/grub/grub.cfg with something like: 9 | set default=0 10 | set timeout=5 11 | 12 | insmod ext2 13 | search --set=root --fs-uuid ReplaceMeWithTheFileSystemUUID 14 | 15 | menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" { 16 | linux /boot/vmlinuz-6.1.11-lfs-11.3 root=PARTUUID=ReplaceMeWithThePartitionUUID ro 17 | } 18 | Note that partition and file system UUIDs are different! 19 | 7. Reboot and hope it works :) 20 | -------------------------------------------------------------------------------- /step3/vim.sh: -------------------------------------------------------------------------------- 1 | tar -xaf vim-9.0.1273.tar.xz 2 | cd vim-9.0.1273 3 | echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h 4 | ./configure --prefix=/usr 5 | make -j`nproc` 6 | # chown -Rv tester . 7 | # su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log 8 | make install 9 | ln -sv vim /usr/bin/vi 10 | for L in /usr/share/man/{,*/}man1/vim.1; do 11 | ln -sv vim.1 $(dirname $L)/vi.1 12 | done 13 | ln -sv ../vim/vim90/doc /usr/share/doc/vim-9.0.1273 14 | cd .. 15 | rm -rf vim-9.0.1273 16 | 17 | cat > /etc/vimrc << "EOF" 18 | " Begin /etc/vimrc 19 | 20 | " Ensure defaults are set before customizing settings, not after 21 | source $VIMRUNTIME/defaults.vim 22 | let skip_defaults_vim=1 23 | 24 | set nocompatible 25 | set backspace=2 26 | set mouse= 27 | syntax on 28 | if (&term == "xterm") || (&term == "putty") 29 | set background=dark 30 | endif 31 | 32 | " End /etc/vimrc 33 | EOF 34 | -------------------------------------------------------------------------------- /step2/gcc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gcc-12.2.0.tar.xz 2 | cd gcc-12.2.0 3 | tar -xf ../mpfr-4.2.0.tar.xz 4 | mv -v mpfr-4.2.0 mpfr 5 | tar -xf ../gmp-6.2.1.tar.xz 6 | mv -v gmp-6.2.1 gmp 7 | tar -xf ../mpc-1.3.1.tar.gz 8 | mv -v mpc-1.3.1 mpc 9 | sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 10 | mkdir build 11 | cd build 12 | ../configure --target=$LFS_TGT --prefix=$LFS/tools --with-glibc-version=2.37 --with-sysroot=$LFS --with-newlib --without-headers --enable-default-pie --enable-default-ssp --disable-nls --disable-shared --disable-multilib --disable-threads --disable-libatomic --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libstdcxx --enable-languages=c,c++ 13 | make -j`nproc` 14 | make install 15 | cd .. 16 | cat gcc/limitx.h gcc/glimits.h gcc/limity.h > `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h 17 | cd .. 18 | rm -rf gcc-12.2.0 19 | -------------------------------------------------------------------------------- /step3/ncurses.sh: -------------------------------------------------------------------------------- 1 | tar -xaf ncurses-6.4.tar.gz 2 | cd ncurses-6.4 3 | ./configure --prefix=/usr --mandir=/usr/share/man --with-shared --without-debug --without-normal --with-cxx-shared --enable-pc-files --enable-widec --with-pkg-config-libdir=/usr/lib/pkgconfig 4 | make -j`nproc` 5 | make DESTDIR=$PWD/dest install 6 | install -vm755 dest/usr/lib/libncursesw.so.6.4 /usr/lib 7 | rm -v dest/usr/lib/libncursesw.so.6.4 8 | cp -av dest/* / 9 | for lib in ncurses form panel menu ; do 10 | rm -vf /usr/lib/lib${lib}.so 11 | echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so 12 | ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc 13 | done 14 | rm -vf /usr/lib/libcursesw.so 15 | echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so 16 | ln -sfv libncurses.so /usr/lib/libcurses.so 17 | mkdir -pv /usr/share/doc/ncurses-6.4 18 | cp -v -R doc/* /usr/share/doc/ncurses-6.4 19 | cd .. 20 | rm -rf ncurses-6.4 21 | -------------------------------------------------------------------------------- /step3/shadow.sh: -------------------------------------------------------------------------------- 1 | tar -xaf shadow-4.13.tar.xz 2 | cd shadow-4.13 3 | sed -i 's/groups$(EXEEXT) //' src/Makefile.in 4 | find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; 5 | find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; 6 | find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; 7 | sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ 8 | -e 's@#\(SHA_CRYPT_..._ROUNDS 5000\)@\100@' \ 9 | -e 's:/var/spool/mail:/var/mail:' \ 10 | -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \ 11 | -i etc/login.defs 12 | touch /usr/bin/passwd 13 | ./configure --sysconfdir=/etc \ 14 | --disable-static \ 15 | --with-group-name-max-length=32 16 | make -j`nproc` 17 | make exec_prefix=/usr install 18 | make -C man install-man 19 | pwconv 20 | grpconv 21 | mkdir -p /etc/default 22 | useradd -D --gid 999 23 | sed -i '/MAIL/s/yes/no/' /etc/default/useradd 24 | cd .. 25 | rm -rf shadow-4.13 26 | -------------------------------------------------------------------------------- /step3/gcc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gcc-12.2.0.tar.xz 2 | cd gcc-12.2.0 3 | sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 4 | mkdir -v build 5 | cd build 6 | ../configure --prefix=/usr \ 7 | LD=ld \ 8 | --enable-languages=c,c++ \ 9 | --enable-default-pie \ 10 | --enable-default-ssp \ 11 | --disable-multilib \ 12 | --disable-bootstrap \ 13 | --with-system-zlib 14 | make -j`nproc` 15 | ulimit -s 32768 16 | chown -Rv tester . 17 | # su tester -c "PATH=$PATH make -j`nproc` -k check" 18 | # ../contrib/test_summary 19 | make install 20 | chown -v -R root:root /usr/lib/gcc/$(gcc -dumpmachine)/12.2.0/include{,-fixed} 21 | ln -svr /usr/bin/cpp /usr/lib 22 | ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so /usr/lib/bfd-plugins/ 23 | mkdir -pv /usr/share/gdb/auto-load/usr/lib 24 | mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib 25 | cd ../.. 26 | rm -rf gcc-12.2.0 27 | -------------------------------------------------------------------------------- /step3/tcl.sh: -------------------------------------------------------------------------------- 1 | tar -xaf tcl8.6.13-src.tar.gz 2 | cd tcl8.6.13 3 | SRCDIR=$(pwd) 4 | cd unix 5 | ./configure --prefix=/usr --mandir=/usr/share/man 6 | make -j`nproc` 7 | sed -e "s|$SRCDIR/unix|/usr/lib|" \ 8 | -e "s|$SRCDIR|/usr/include|" \ 9 | -i tclConfig.sh 10 | sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.5|/usr/lib/tdbc1.1.5|" \ 11 | -e "s|$SRCDIR/pkgs/tdbc1.1.5/generic|/usr/include|" \ 12 | -e "s|$SRCDIR/pkgs/tdbc1.1.5/library|/usr/lib/tcl8.6|" \ 13 | -e "s|$SRCDIR/pkgs/tdbc1.1.5|/usr/include|" \ 14 | -i pkgs/tdbc1.1.5/tdbcConfig.sh 15 | sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.3|/usr/lib/itcl4.2.3|" \ 16 | -e "s|$SRCDIR/pkgs/itcl4.2.3/generic|/usr/include|" \ 17 | -e "s|$SRCDIR/pkgs/itcl4.2.3|/usr/include|" \ 18 | -i pkgs/itcl4.2.3/itclConfig.sh 19 | unset SRCDIR 20 | make test 21 | make install 22 | chmod -v u+w /usr/lib/libtcl8.6.so 23 | make install-private-headers 24 | ln -sfv tclsh8.6 /usr/bin/tclsh 25 | mv /usr/share/man/man3/{Thread,Tcl_Thread}.3 26 | cd ../.. 27 | rm -rf tcl8.6.13 28 | -------------------------------------------------------------------------------- /step3/perl2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf perl-5.36.0.tar.xz 2 | cd perl-5.36.0 3 | export BUILD_ZLIB=False 4 | export BUILD_BZIP2=0 5 | sh Configure -des \ 6 | -Dprefix=/usr \ 7 | -Dvendorprefix=/usr \ 8 | -Dprivlib=/usr/lib/perl5/5.36/core_perl \ 9 | -Darchlib=/usr/lib/perl5/5.36/core_perl \ 10 | -Dsitelib=/usr/lib/perl5/5.36/site_perl \ 11 | -Dsitearch=/usr/lib/perl5/5.36/site_perl \ 12 | -Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \ 13 | -Dvendorarch=/usr/lib/perl5/5.36/vendor_perl \ 14 | -Dman1dir=/usr/share/man/man1 \ 15 | -Dman3dir=/usr/share/man/man3 \ 16 | -Dpager="/usr/bin/less -isR" \ 17 | -Duseshrplib \ 18 | -Dusethreads 19 | make -j`nproc` 20 | make test 21 | make install 22 | unset BUILD_ZLIB BUILD_BZIP2 23 | cd .. 24 | rm -rf perl-5.36.0 25 | -------------------------------------------------------------------------------- /step2/gcc2.sh: -------------------------------------------------------------------------------- 1 | tar -xaf gcc-12.2.0.tar.xz 2 | cd gcc-12.2.0 3 | tar -xf ../mpfr-4.2.0.tar.xz 4 | mv -v mpfr-4.2.0 mpfr 5 | tar -xf ../gmp-6.2.1.tar.xz 6 | mv -v gmp-6.2.1 gmp 7 | tar -xf ../mpc-1.3.1.tar.gz 8 | mv -v mpc-1.3.1 mpc 9 | sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 10 | sed '/thread_header =/s/@.*@/gthr-posix.h/' -i libgcc/Makefile.in libstdc++-v3/include/Makefile.in 11 | mkdir -v build 12 | cd build 13 | ../configure \ 14 | --build=$(../config.guess) \ 15 | --host=$LFS_TGT \ 16 | --target=$LFS_TGT \ 17 | LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ 18 | --prefix=/usr \ 19 | --with-build-sysroot=$LFS \ 20 | --enable-default-pie \ 21 | --enable-default-ssp \ 22 | --disable-nls \ 23 | --disable-multilib \ 24 | --disable-libatomic \ 25 | --disable-libgomp \ 26 | --disable-libquadmath \ 27 | --disable-libssp \ 28 | --disable-libvtv \ 29 | --enable-languages=c,c++ 30 | make -j`nproc` 31 | make DESTDIR=$LFS install 32 | ln -sv gcc $LFS/usr/bin/cc 33 | cd ../.. 34 | rm -rf gcc-12.2.0 35 | -------------------------------------------------------------------------------- /step3/prep.sh: -------------------------------------------------------------------------------- 1 | mkdir -pv /{boot,home,mnt,opt,srv} 2 | mkdir -pv /etc/{opt,sysconfig} 3 | mkdir -pv /lib/firmware 4 | mkdir -pv /media/{floppy,cdrom} 5 | mkdir -pv /usr/{,local/}{include,src} 6 | mkdir -pv /usr/local/{bin,lib,sbin} 7 | mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} 8 | mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} 9 | mkdir -pv /usr/{,local/}share/man/man{1..8} 10 | mkdir -pv /var/{cache,local,log,mail,opt,spool} 11 | mkdir -pv /var/lib/{color,misc,locate} 12 | ln -sfv /run /var/run 13 | ln -sfv /run/lock /var/lock 14 | install -dv -m 0750 /root 15 | install -dv -m 1777 /tmp /var/tmp 16 | 17 | ln -sv /proc/self/mounts /etc/mtab 18 | 19 | cat > /etc/hosts << EOF 20 | 127.0.0.1 localhost $(hostname) 21 | ::1 localhost 22 | EOF 23 | 24 | cat > /etc/passwd << "EOF" 25 | root:x:0:0:root:/root:/bin/bash 26 | bin:x:1:1:bin:/dev/null:/usr/bin/false 27 | daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false 28 | messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/usr/bin/false 29 | uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false 30 | nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false 31 | EOF 32 | 33 | cat > /etc/group << "EOF" 34 | root:x:0: 35 | bin:x:1:daemon 36 | sys:x:2: 37 | kmem:x:3: 38 | tape:x:4: 39 | tty:x:5: 40 | daemon:x:6: 41 | floppy:x:7: 42 | disk:x:8: 43 | lp:x:9: 44 | dialout:x:10: 45 | audio:x:11: 46 | video:x:12: 47 | utmp:x:13: 48 | usb:x:14: 49 | cdrom:x:15: 50 | adm:x:16: 51 | messagebus:x:18: 52 | input:x:24: 53 | mail:x:34: 54 | kvm:x:61: 55 | uuidd:x:80: 56 | wheel:x:97: 57 | users:x:999: 58 | nogroup:x:65534: 59 | EOF 60 | 61 | echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd 62 | echo "tester:x:101:" >> /etc/group 63 | install -o tester -d /home/tester 64 | 65 | touch /var/log/{btmp,lastlog,faillog,wtmp} 66 | chgrp -v utmp /var/log/lastlog 67 | chmod -v 664 /var/log/lastlog 68 | chmod -v 600 /var/log/btmp 69 | -------------------------------------------------------------------------------- /.github/workflows/run.yml: -------------------------------------------------------------------------------- 1 | name: Manual workflow 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | releaseName: 6 | description: 'The name of the release:' 7 | default: 'LFSBuildOutput' 8 | required: true 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: checkout 14 | uses: actions/checkout@v3 15 | - name: mountstuff 16 | run: | 17 | mkdir -p lfs/{dev,proc,sys,run} 18 | sudo mount --bind /dev lfs/dev 19 | sudo mount --bind /dev/pts lfs/dev/pts 20 | sudo mount --bind /proc lfs/proc 21 | sudo mount --bind /sys lfs/sys 22 | sudo mount --bind /run lfs/run 23 | git clone https://github.com/nakst/teak.git 24 | cd teak 25 | gcc -o teak teak.c -pthread -ldl 26 | ./teak build.teak 27 | cd .. 28 | - name: dockerbuild 29 | uses: ./docker 30 | - name: tarstuff 31 | run: | 32 | sudo umount lfs/dev/pts 33 | sudo umount lfs/dev 34 | sudo umount lfs/proc 35 | sudo umount lfs/sys 36 | sudo umount lfs/run 37 | sudo rm -rf lfs/sources 38 | sudo rm -rf lfs/step3 39 | sudo rm -rf sources 40 | sudo rm lfs/linux_config 41 | sudo tar -caf lfs.tar.xz lfs 42 | - name: release 43 | id: release 44 | uses: actions/create-release@v1 45 | env: 46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 47 | with: 48 | tag_name: ${{ inputs.releaseName }} 49 | release_name: ${{ inputs.releaseName }} 50 | body: Autobuild. 51 | - name: upload 52 | id: upload 53 | uses: actions/upload-release-asset@v1 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 | with: 57 | upload_url: ${{ steps.release.outputs.upload_url }} 58 | asset_path: lfs.tar.xz 59 | asset_name: lfs.tar.xz 60 | asset_content_type: application/x-compressed 61 | -------------------------------------------------------------------------------- /step3/glibc.sh: -------------------------------------------------------------------------------- 1 | tar -xaf glibc-2.37.tar.xz 2 | cd glibc-2.37 3 | patch -Np1 -i ../glibc-2.37-fhs-1.patch 4 | sed '/width -=/s/workend - string/number_length/' -i stdio-common/vfprintf-process-arg.c 5 | touch /etc/ld.so.conf 6 | mkdir -v build 7 | cd build 8 | echo "rootsbindir=/usr/sbin" > configparms 9 | ../configure --prefix=/usr \ 10 | --disable-werror \ 11 | --enable-kernel=3.2 \ 12 | --enable-stack-protector=strong \ 13 | --with-headers=/usr/include \ 14 | libc_cv_slibdir=/usr/lib 15 | sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile 16 | make 17 | make install 18 | sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd 19 | cp -v ../nscd/nscd.conf /etc/nscd.conf 20 | mkdir -pv /var/cache/nscd 21 | mkdir -pv /usr/lib/locale 22 | localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true 23 | localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 24 | localedef -i de_DE -f ISO-8859-1 de_DE 25 | localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro 26 | localedef -i de_DE -f UTF-8 de_DE.UTF-8 27 | localedef -i el_GR -f ISO-8859-7 el_GR 28 | localedef -i en_GB -f ISO-8859-1 en_GB 29 | localedef -i en_GB -f UTF-8 en_GB.UTF-8 30 | localedef -i en_HK -f ISO-8859-1 en_HK 31 | localedef -i en_PH -f ISO-8859-1 en_PH 32 | localedef -i en_US -f ISO-8859-1 en_US 33 | localedef -i en_US -f UTF-8 en_US.UTF-8 34 | localedef -i es_ES -f ISO-8859-15 es_ES@euro 35 | localedef -i es_MX -f ISO-8859-1 es_MX 36 | localedef -i fa_IR -f UTF-8 fa_IR 37 | localedef -i fr_FR -f ISO-8859-1 fr_FR 38 | localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro 39 | localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 40 | localedef -i is_IS -f ISO-8859-1 is_IS 41 | localedef -i is_IS -f UTF-8 is_IS.UTF-8 42 | localedef -i it_IT -f ISO-8859-1 it_IT 43 | localedef -i it_IT -f ISO-8859-15 it_IT@euro 44 | localedef -i it_IT -f UTF-8 it_IT.UTF-8 45 | localedef -i ja_JP -f EUC-JP ja_JP 46 | localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true 47 | localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 48 | localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro 49 | localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R 50 | localedef -i ru_RU -f UTF-8 ru_RU.UTF-8 51 | localedef -i se_NO -f UTF-8 se_NO.UTF-8 52 | localedef -i ta_IN -f UTF-8 ta_IN.UTF-8 53 | localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 54 | localedef -i zh_CN -f GB18030 zh_CN.GB18030 55 | localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS 56 | localedef -i zh_TW -f UTF-8 zh_TW.UTF-8 57 | cd ../.. 58 | rm -rf glibc-2.37 59 | 60 | cat > /etc/nsswitch.conf << "EOF" 61 | # Begin /etc/nsswitch.conf 62 | 63 | passwd: files 64 | group: files 65 | shadow: files 66 | 67 | hosts: files dns 68 | networks: files 69 | 70 | protocols: files 71 | services: files 72 | ethers: files 73 | rpc: files 74 | 75 | # End /etc/nsswitch.conf 76 | EOF 77 | -------------------------------------------------------------------------------- /step3/config-files.sh: -------------------------------------------------------------------------------- 1 | echo "mylfs" > /etc/hostname 2 | 3 | cat > /etc/inittab << "EOF" 4 | # Begin /etc/inittab 5 | 6 | id:3:initdefault: 7 | 8 | si::sysinit:/etc/rc.d/init.d/rc S 9 | 10 | l0:0:wait:/etc/rc.d/init.d/rc 0 11 | l1:S1:wait:/etc/rc.d/init.d/rc 1 12 | l2:2:wait:/etc/rc.d/init.d/rc 2 13 | l3:3:wait:/etc/rc.d/init.d/rc 3 14 | l4:4:wait:/etc/rc.d/init.d/rc 4 15 | l5:5:wait:/etc/rc.d/init.d/rc 5 16 | l6:6:wait:/etc/rc.d/init.d/rc 6 17 | 18 | ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now 19 | 20 | su:S06:once:/sbin/sulogin 21 | s1:1:respawn:/sbin/sulogin 22 | 23 | 1:2345:respawn:/sbin/agetty --noclear tty1 9600 24 | 2:2345:respawn:/sbin/agetty tty2 9600 25 | 3:2345:respawn:/sbin/agetty tty3 9600 26 | 4:2345:respawn:/sbin/agetty tty4 9600 27 | 5:2345:respawn:/sbin/agetty tty5 9600 28 | 6:2345:respawn:/sbin/agetty tty6 9600 29 | 30 | # End /etc/inittab 31 | EOF 32 | 33 | cat > /etc/sysconfig/clock << "EOF" 34 | # Begin /etc/sysconfig/clock 35 | 36 | UTC=1 37 | 38 | # Set this to any options you might need to give to hwclock, 39 | # such as machine hardware clock type for Alphas. 40 | CLOCKPARAMS= 41 | 42 | # End /etc/sysconfig/clock 43 | EOF 44 | 45 | cat > /etc/sysconfig/console << "EOF" 46 | # Begin /etc/sysconfig/console 47 | 48 | FONT="lat1-16 -m 8859-1" 49 | 50 | # End /etc/sysconfig/console 51 | EOF 52 | 53 | cat > /etc/profile << "EOF" 54 | # Begin /etc/profile 55 | 56 | export LANG=en_US.UTF-8 57 | 58 | # End /etc/profile 59 | EOF 60 | 61 | cat > /etc/inputrc << "EOF" 62 | # Begin /etc/inputrc 63 | # Modified by Chris Lynn 64 | 65 | # Allow the command prompt to wrap to the next line 66 | set horizontal-scroll-mode Off 67 | 68 | # Enable 8-bit input 69 | set meta-flag On 70 | set input-meta On 71 | 72 | # Turns off 8th bit stripping 73 | set convert-meta Off 74 | 75 | # Keep the 8th bit for display 76 | set output-meta On 77 | 78 | # none, visible or audible 79 | set bell-style none 80 | 81 | # All of the following map the escape sequence of the value 82 | # contained in the 1st argument to the readline specific functions 83 | "\eOd": backward-word 84 | "\eOc": forward-word 85 | 86 | # for linux console 87 | "\e[1~": beginning-of-line 88 | "\e[4~": end-of-line 89 | "\e[5~": beginning-of-history 90 | "\e[6~": end-of-history 91 | "\e[3~": delete-char 92 | "\e[2~": quoted-insert 93 | 94 | # for xterm 95 | "\eOH": beginning-of-line 96 | "\eOF": end-of-line 97 | 98 | # for Konsole 99 | "\e[H": beginning-of-line 100 | "\e[F": end-of-line 101 | 102 | # End /etc/inputrc 103 | EOF 104 | 105 | cat > /etc/shells << "EOF" 106 | # Begin /etc/shells 107 | 108 | /bin/sh 109 | /bin/bash 110 | 111 | # End /etc/shells 112 | EOF 113 | 114 | cat > /etc/fstab << "EOF" 115 | # Begin /etc/fstab 116 | 117 | # file system mount-point type options dump fsck 118 | # order 119 | 120 | UUID=ReplaceMeWithTheFileSystemUUID / ext4 defaults 1 1 121 | proc /proc proc nosuid,noexec,nodev 0 0 122 | sysfs /sys sysfs nosuid,noexec,nodev 0 0 123 | devpts /dev/pts devpts gid=5,mode=620 0 0 124 | tmpfs /run tmpfs defaults 0 0 125 | devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 126 | tmpfs /dev/shm tmpfs nosuid,nodev 0 0 127 | 128 | # End /etc/fstab 129 | EOF 130 | 131 | echo root:password | chpasswd 132 | -------------------------------------------------------------------------------- /main.teak: -------------------------------------------------------------------------------- 1 | // TODO Skipped a lot of 9.5 (networking) 2 | // TODO Updating the eudev database after install? 3 | // TODO Tracking what files are installed. 4 | // TODO umask 022? 5 | 6 | // TODO The following test suites are not run because they contains failures: 7 | // glibc, binutils, gcc, libtool, automake, elfutils, coreutils, tar, procps-ng, 8 | // util-linux, e2fsprogs, eudev, attr (needs extended attribute support), inetutils, vim 9 | // Make a log of which failures occur for inspection. 10 | 11 | str lfs #option; 12 | str lfsSources #option; 13 | 14 | void Start() { 15 | assert lfs != ""; 16 | assert lfsSources != ""; 17 | 18 | lfs = PathToAbsolute(lfs); 19 | lfsSources = PathToAbsolute(lfsSources); 20 | assert !StringContains(lfs, " "); 21 | SystemSetEnvironmentVariable("LFS", lfs); 22 | assert PathSetDefaultPrefixToScriptSourceDirectory(); 23 | 24 | str[] directoriesToCreate = [ "/etc", "/var", "/lib64", "/tools", "/usr/bin", "/usr/lib", "/usr/sbin", "/sources", "/step3", "/buildlog" ]; 25 | for str directory in directoriesToCreate { assert PathCreateLeadingDirectories(lfs + directory); } 26 | str[] userLinksToCreate = [ "/bin", "/lib", "/sbin" ]; 27 | for str userLink in userLinksToCreate { assert SystemShellExecute("ln -s usr%userLink% %lfs%%userLink%"); } 28 | assert FileCopy("linux_config", "%lfs%/linux_config"); 29 | for str file in DirectoryEnumerate(lfsSources):assert() { assert FileCopy("%lfsSources%/%file%", "%lfs%/sources/%file%"); } 30 | for str file in DirectoryEnumerate("step3"):assert() { assert FileCopy("step3/%file%", "%lfs%/step3/%file%"); } 31 | 32 | SystemSetEnvironmentVariable("LC_ALL", "POSIX"); 33 | SystemSetEnvironmentVariable("LFS_TGT", StringRemoveOptionalSuffix(SystemShellEvaluate("uname -m"), "\n") + "-lfs-linux-gnu"); 34 | SystemSetEnvironmentVariable("PATH", "%lfs%/tools/bin:/usr/bin"); 35 | SystemSetEnvironmentVariable("CONFIG_SITE", "%lfs%/usr/share/config.site"); 36 | 37 | str[] step2Scripts = [ "binutils.sh", "gcc.sh", "linux.sh", "glibc.sh", "libstdcpp.sh", "m4.sh", "ncurses.sh", 38 | "bash.sh", "coreutils.sh", "diffutils.sh", "file.sh", "findutils.sh", "gawk.sh", "grep.sh", "gzip.sh", 39 | "make.sh", "patch.sh", "sed.sh", "tar.sh", "xz.sh", "binutils2.sh", "gcc2.sh" ]; 40 | 41 | for str script in step2Scripts { 42 | assert SystemShellExecuteWithWorkingDirectory("%lfs%/sources", "/bin/bash -e " + PathToAbsolute("step2/%script%") 43 | + " 2> %lfs%/buildlog/step2_%script%_stderr.txt > %lfs%/buildlog/step2_%script%_stdout.txt"); 44 | } 45 | 46 | str[] directoriesToChownR = [ "/etc", "/var", "/lib64", "/tools", "/bin", "/lib", "/sbin", "/usr" ]; 47 | for str directory in directoriesToChownR { assert SystemShellExecute("chown -R root:root $LFS%directory%"); } 48 | str[] directoriesToChown = [ "/dev", "/proc", "/sys", "/run" ]; 49 | for str directory in directoriesToChown { assert SystemShellExecute("chown root:root $LFS%directory%"); } 50 | 51 | str[] step3Scripts = [ "prep.sh", "gettext.sh", "bison.sh", "perl.sh", "python.sh", "texinfo.sh", "util-linux.sh", "cleanup-tools.sh", 52 | "man-pages.sh", "iana.sh", "glibc.sh", "tzdata.sh", "ldconf.sh", "zlib.sh", "bzip2.sh", "xz.sh", "zstd.sh", "file.sh", "readline.sh", 53 | "m4.sh", "bc.sh", "flex.sh", "tcl.sh", "expect.sh", "dejagnu.sh", "binutils.sh", "gmp.sh", "mpfr.sh", "mpc.sh", "attr.sh", "acl.sh", 54 | "libcap.sh", "shadow.sh", "gcc.sh", "pkg-config.sh", "ncurses.sh", "sed.sh", "psmisc.sh", "gettext2.sh", "bison2.sh", "grep.sh", 55 | "bash.sh", "libtool.sh", "gdbm.sh", "gperf.sh", "expat.sh", "inetutils.sh", "less.sh", "perl2.sh", "xml-parser.sh", "intltool.sh", 56 | "autoconf.sh", "automake.sh", "openssl.sh", "kmod.sh", "elfutils.sh", "libffi.sh", "python2.sh", "wheel.sh", "ninja.sh", "meson.sh", 57 | "coreutils.sh", "check.sh", "diffutils.sh", "gawk.sh", "findutils.sh", "groff.sh", "grub.sh", "gzip.sh", "iproute.sh", "kbd.sh", 58 | "libpipeline.sh", "make.sh", "patch.sh", "tar.sh", "texinfo2.sh", "vim.sh", "eudev.sh", "mandb.sh", "procps.sh", "util-linux2.sh", 59 | "e2fsprogs.sh", "sysklogd.sh", "sysvinit.sh", "cleanup-tester.sh", "lfs-bootscripts.sh", "config-files.sh", "linux.sh" ]; 60 | 61 | for str script in step3Scripts { 62 | assert SystemShellExecute("chroot \"%lfs%\" /usr/bin/env --chdir=/sources --ignore-environment " 63 | + "HOME=/root TERM=\"$TERM\" PS1='(lfs chroot) ' PATH=/usr/bin:/usr/sbin /bin/bash --login -e /step3/%script%" 64 | + " 2> %lfs%/buildlog/step3_%script%_stderr.txt > %lfs%/buildlog/step3_%script%_stdout.txt"); 65 | } 66 | 67 | Log("-------------------------------------------------"); 68 | Log("You are now ready to install GRUB."); 69 | Log("You will need to update the fstab file with the partition used."); 70 | } 71 | -------------------------------------------------------------------------------- /wget-list-sysv: -------------------------------------------------------------------------------- 1 | https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz 2 | https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz 3 | https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz 4 | https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz 5 | https://ftp.gnu.org/gnu/bash/bash-5.2.15.tar.gz 6 | https://github.com/gavinhoward/bc/releases/download/6.2.4/bc-6.2.4.tar.xz 7 | https://sourceware.org/pub/binutils/releases/binutils-2.40.tar.xz 8 | https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz 9 | https://www.sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz 10 | https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz 11 | https://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.xz 12 | https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.3.tar.gz 13 | https://ftp.gnu.org/gnu/diffutils/diffutils-3.9.tar.xz 14 | https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.47.0/e2fsprogs-1.47.0.tar.gz 15 | https://sourceware.org/ftp/elfutils/0.188/elfutils-0.188.tar.bz2 16 | https://github.com/eudev-project/eudev/releases/download/v3.2.11/eudev-3.2.11.tar.gz 17 | https://prdownloads.sourceforge.net/expat/expat-2.5.0.tar.xz 18 | https://prdownloads.sourceforge.net/expect/expect5.45.4.tar.gz 19 | https://astron.com/pub/file/file-5.44.tar.gz 20 | https://ftp.gnu.org/gnu/findutils/findutils-4.9.0.tar.xz 21 | https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz 22 | https://ftp.gnu.org/gnu/gawk/gawk-5.2.1.tar.xz 23 | https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz 24 | https://ftp.gnu.org/gnu/gdbm/gdbm-1.23.tar.gz 25 | https://ftp.gnu.org/gnu/gettext/gettext-0.21.1.tar.xz 26 | https://ftp.gnu.org/gnu/glibc/glibc-2.37.tar.xz 27 | https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz 28 | https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz 29 | https://ftp.gnu.org/gnu/grep/grep-3.8.tar.xz 30 | https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz 31 | https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz 32 | https://ftp.gnu.org/gnu/gzip/gzip-1.12.tar.xz 33 | https://github.com/Mic92/iana-etc/releases/download/20230202/iana-etc-20230202.tar.gz 34 | https://ftp.gnu.org/gnu/inetutils/inetutils-2.4.tar.xz 35 | https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz 36 | https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.1.0.tar.xz 37 | https://www.kernel.org/pub/linux/utils/kbd/kbd-2.5.1.tar.xz 38 | https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-30.tar.xz 39 | https://www.greenwoodsoftware.com/less/less-608.tar.gz 40 | https://www.linuxfromscratch.org/lfs/downloads/11.3/lfs-bootscripts-20230101.tar.xz 41 | https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.67.tar.xz 42 | https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz 43 | https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.7.tar.gz 44 | https://ftp.gnu.org/gnu/libtool/libtool-2.4.7.tar.xz 45 | https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.11.tar.xz 46 | https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz 47 | https://ftp.gnu.org/gnu/make/make-4.4.tar.gz 48 | https://download.savannah.gnu.org/releases/man-db/man-db-2.11.2.tar.xz 49 | https://www.kernel.org/pub/linux/docs/man-pages/man-pages-6.03.tar.xz 50 | https://github.com/mesonbuild/meson/releases/download/1.0.0/meson-1.0.0.tar.gz 51 | https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz 52 | https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz 53 | https://invisible-mirror.net/archives/ncurses/ncurses-6.4.tar.gz 54 | https://github.com/ninja-build/ninja/archive/v1.11.1/ninja-1.11.1.tar.gz 55 | https://www.openssl.org/source/openssl-3.0.8.tar.gz 56 | https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz 57 | https://www.cpan.org/src/5.0/perl-5.36.0.tar.xz 58 | https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz 59 | https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.2.tar.xz 60 | https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.6.tar.xz 61 | https://www.python.org/ftp/python/3.11.2/Python-3.11.2.tar.xz 62 | https://www.python.org/ftp/python/doc/3.11.2/python-3.11.2-docs-html.tar.bz2 63 | https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz 64 | https://ftp.gnu.org/gnu/sed/sed-4.9.tar.xz 65 | https://github.com/shadow-maint/shadow/releases/download/4.13/shadow-4.13.tar.xz 66 | https://www.infodrom.org/projects/sysklogd/download/sysklogd-1.5.1.tar.gz 67 | https://github.com/slicer69/sysvinit/releases/download/3.06/sysvinit-3.06.tar.xz 68 | https://ftp.gnu.org/gnu/tar/tar-1.34.tar.xz 69 | https://downloads.sourceforge.net/tcl/tcl8.6.13-src.tar.gz 70 | https://downloads.sourceforge.net/tcl/tcl8.6.13-html.tar.gz 71 | https://ftp.gnu.org/gnu/texinfo/texinfo-7.0.2.tar.xz 72 | https://www.iana.org/time-zones/repository/releases/tzdata2022g.tar.gz 73 | https://anduin.linuxfromscratch.org/LFS/udev-lfs-20171102.tar.xz 74 | https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-2.38.1.tar.xz 75 | https://anduin.linuxfromscratch.org/LFS/vim-9.0.1273.tar.xz 76 | https://pypi.org/packages/source/w/wheel/wheel-0.38.4.tar.gz 77 | https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz 78 | https://tukaani.org/xz/xz-5.4.1.tar.xz 79 | https://zlib.net/zlib-1.2.13.tar.xz 80 | https://github.com/facebook/zstd/releases/download/v1.5.4/zstd-1.5.4.tar.gz 81 | https://www.linuxfromscratch.org/patches/lfs/11.3/bzip2-1.0.8-install_docs-1.patch 82 | https://www.linuxfromscratch.org/patches/lfs/11.3/coreutils-9.1-i18n-1.patch 83 | https://www.linuxfromscratch.org/patches/lfs/11.3/glibc-2.37-fhs-1.patch 84 | https://www.linuxfromscratch.org/patches/lfs/11.3/grub-2.06-upstream_fixes-1.patch 85 | https://www.linuxfromscratch.org/patches/lfs/11.3/kbd-2.5.1-backspace-1.patch 86 | https://www.linuxfromscratch.org/patches/lfs/11.3/readline-8.2-upstream_fix-1.patch 87 | https://www.linuxfromscratch.org/patches/lfs/11.3/sysvinit-3.06-consolidated-1.patch 88 | --------------------------------------------------------------------------------