diff --git a/Einrichter-CLI.sh b/Einrichter-CLI.sh index dd4cc61..75932b9 100755 --- a/Einrichter-CLI.sh +++ b/Einrichter-CLI.sh @@ -5,12 +5,14 @@ exit fi SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -EINRICHTER_VER=0.1.0 +EINRICHTER_VER=0.3.0 function booter() { einrichter.colours echo "Einrichter - TylkoLinux Installer Shell $EINRICHTER_VER The script is located at $SCRIPT_DIR +The LFS installation is located at $LFS +The specified command line arguments are $* Run einrichter.help for commands" main } @@ -113,12 +115,14 @@ function einrichter.colours() { } function einrichter.installer.pkgs() { + echo "args: w\$$*" echo -e "[i] Preparing TylkoLinux for installation..." mkdir $LFS/sources - echo -e "${BPurple}[1/6] Downloading package list..." - wget https://www.linuxfromscratch.org/lfs/view/stable-systemd/wget-list-systemd --continue --directory-prefix=$LFS/sources + echo -e "${BPurple}[1/6] Downloading package list... (already downloaded)" + # wget https://www.linuxfromscratch.org/lfs/view/stable-systemd/wget-list-systemd --continue --directory-prefix=$LFS/sources echo -e "[2/6] Copying md5sums to $LFS/sources/ (It's already been downloaded)" - cp $SCRIPT_DIR/md5sums $LFS/sources/ + cp -v $SCRIPT_DIR/md5sums $LFS/sources/ + cp -v $SCRIPT_DIR/lfs-patch-list-checksum $LFS/sources # wget $SCRIPT_DIR/md5sums --continue --directory-prefix=$LFS/sources echo -e "[3/6] Download packages..." wget --input-file=$SCRIPT_DIR/wget-list-systemd --continue --directory-prefix=$LFS/sources @@ -127,17 +131,31 @@ function einrichter.installer.pkgs() { function einrichter.installer.pkgs.verify() { md5sum -c $LFS/sources/md5sums || einrichter.error PKG_VER_ERR } - einrichter.installer.pkgs.verify + case $* in + *"--skip-verify"*) + echo -e "${BYellow}[!]${Yellow} You ran this command with --skip-verify, meaning that any verification will be skipped. Make sure you only enable this if you know what you're doing.${Color_Off}" + ;; + *) + einrichter.installer.pkgs.verify || einrichter.installer.fail + ;; + esac popd echo -e "[5/6] Downloading patches..." mkdir $LFS/sources/patches - wget --input-file=lfs-patch-list --continue --directory-prefix=$LFS/sources/patches + wget --input-file=$SCRIPT_DIR/lfs-patch-list --continue --directory-prefix=$LFS/sources/patches echo -e "[6/6] Verifying patches..." pushd $LFS/sources/patches function einrichter.installer.pkgs.verify.patches() { - md5sum -c $SCRIPT_DIR/lfs-patch-list-checksum || FAILURE_CODE=ec12737 + md5sum -c $LFS/sources/lfs-patch-list-checksum || FAILURE_CODE=ec12737 } - einrichter.installer.pkgs.verify.patches || einrichter.installer.fail + case $* in + *"--skip-verify"*) + echo -e "${BYellow}[!]${Yellow} You ran this command with --skip-verify, meaning that any verification will be skipped. Make sure you only enable this if you know what you're doing.${Color_Off}" + ;; + *) + einrichter.installer.pkgs.verify.patches || einrichter.installer.fail + ;; + esac popd echo -e "[i] Finished section installer.pkgs" } @@ -201,14 +219,21 @@ function einrichter.installer.SafeUser.End() { } function einrichter.installer.chroot() { - chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} - case $(uname -m) in - x86_64) chown --from lfs -R root:root $LFS/lib64 ;; + case $@ in + *"--noperm"*) + echo -e "${BBlue}[i] ${Blue}Not changing permissions." + ;; + *) + chown --from lfs -Rv root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} || einrichter.error TEST_FAIL + case $(uname -m) in + x86_64) chown --from lfs -Rv root:root $LFS/lib64 || einrichter.error TEST_FAIL ;; + esac + echo -e "${BBlue}[i] ${Blue}Copying third installer to the root of ${LFS}...${Color_Off}" + cp $SCRIPT_DIR/Einrichter-in-chroot.sh $LFS/ + echo -e "${BBlue}[i] ${Blue}Making the installer executable...${Color_Off}" + chmod +x $LFS/Einrichter-in-chroot.sh + ;; esac - echo -e "${BBlue}[i] ${Blue}Copying third installer to the root of ${LFS}...${Color_Off}" - cp $SCRIPT_DIR/Einrichter-in-chroot.sh $LFS/ - echo -e "${BBlue}[i] ${Blue}Making the installer executable...${Color_Off}" - chmod +x $LFS/Einrichter-in-chroot.sh echo -e "${BBlue}[i] ${Blue}Preparing the Virtual Kernel File Systems...${Color_Off}" mkdir -pv $LFS/{dev,proc,sys,run} mount -v --bind /dev $LFS/dev @@ -388,8 +413,8 @@ function einrichter.xr() { mv gdbm-1.24 gdbm tar -xvf gperf-3.1.tar.gz; mv gperf-3.1 gperf - tar -xvf expat-2.6.2.tar.xz; - mv expat-2.6.2 expat + tar -xvf expat-2.6.4.tar.xz; + mv expat-2.6.4 expat tar -xvf inetutils-2.5.tar.xz mv inetutils-2.5 inetutils tar -xvf less-661.tar.gz; @@ -485,8 +510,12 @@ function einrichter.error() { "PKG_DWD_FAIL") echo -e "${BRed}[!] ${Red}Downloading packages, patches and/or the package list . This could be an issue on either your side of the Installer's. Please report this error to the github.com/kevadesu/TylkoLinux repository.${Color_Off}" ;; - D404_SRC) - echo "[!] Directory /sources/ does NOT exist!" + "D404_SRC") + echo "${BRed}[!] ${Red}Directory /sources/ does NOT exist!" + ;; + "TEST_FAIL") + echo "${BRed}[x] ${Red}KILLSWITCH INITIATING +${BRed}[!] ${Red}Reason: Specified manually in code for testing purposes. This is not supposed to be used in the final edition of this installer." ;; *) echo -e "${BRed}[!] ${Red}The installation failed due to an unknown error.${Color_Off}" @@ -495,4 +524,4 @@ function einrichter.error() { exit 1 } -booter +booter "$@" diff --git a/Einrichter-as-LFS.sh b/Einrichter-as-LFS.sh index 1c6f20f..c7bd2b6 100755 --- a/Einrichter-as-LFS.sh +++ b/Einrichter-as-LFS.sh @@ -205,7 +205,7 @@ function eal.install.cross-toolchain() { --prefix=/usr \ --host=$LFS_TGT \ --build=$(../scripts/config.guess) \ - --enable-kernel=4.19 \ + --enable-kernel=5.4 \ --with-headers=$LFS/usr/include \ --disable-nscd \ libc_cv_slibdir=/usr/lib @@ -232,6 +232,7 @@ function eal.install.cross-toolchain() { echo "OK" ;; esac + rm -v a.out popd pushd $LFS/sources/gcc/ mkdir -v build-libstdcpp @@ -478,24 +479,24 @@ function eal.install.cross-toolchain() { } function eal.install.verify() { - ver_check Binutils $LFS/bin/ld 2.43.1 - ver_check GCC $LGS/bin/gcc 14.2.0 - ver_check Glibc $LFS/bin/ldd 2.40 - ver_check M4 $LFS/bin/m4 1.4.19 - ver_check Ncurses $LFS/bin/ncurses 6.5 - ver_check Bash $LFS/bin/bash 5.2.32 - ver_check Coreutils $LFS/bin/touch 9.5 - ver_check Diffutils $LFS/bin/cmp 3.10 - ver_check File $LFS/bin/file 5.45 - ver_check Findutils $LFS/bin/find 4.10.0 - ver_check Gawk $LFS/bin/gawk 5.3.0 - ver_check Grep $LFS/bin/grep 3.11 - ver_check Gzip $LFS/bin/gzip 1.13 - ver_check Make $LFS/bin/make 4.4.1 - ver_check Patch $LFS/bin/patch 2.7.6 - ver_check Sed $LFS/bin/sed 4.9 - ver_check Tar $LFS/bin/tar 1.35 - ver_check Xz $LFS/bin/xz 5.6.2 + ver_check Binutils $LFS/bin/ld 2.43.1 + ver_check GCC $LGS/bin/gcc 14.2.0 + ver_check Glibc $LFS/bin/ldd 2.40 + ver_check M4 $LFS/bin/m4 1.4.19 + ver_check Ncurses $LFS/bin/ncursesw6-config 6.5 + ver_check Bash $LFS/bin/bash 5.2.32 + ver_check Coreutils $LFS/bin/touch 9.5 + ver_check Diffutils $LFS/bin/cmp 3.10 + ver_check File $LFS/bin/file 5.45 + ver_check Findutils $LFS/bin/find 4.10.0 + ver_check Gawk $LFS/bin/gawk 5.3.0 + ver_check Grep $LFS/bin/grep 3.11 + ver_check Gzip $LFS/bin/gzip 1.13 + ver_check Make $LFS/bin/make 4.4.1 + ver_check Patch $LFS/bin/patch 2.7.6 + ver_check Sed $LFS/bin/sed 4.9 + ver_check Tar $LFS/bin/tar 1.35 + ver_check Xz $LFS/bin/xz 5.6.2 } ver_check() diff --git a/Einrichter-in-chroot.sh b/Einrichter-in-chroot.sh index 4b55559..04a4de0 100755 --- a/Einrichter-in-chroot.sh +++ b/Einrichter-in-chroot.sh @@ -926,11 +926,11 @@ EOF pushd expat/ ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/expat-2.6.2 + --docdir=/usr/share/doc/expat-2.6.4 make make check make install - install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.6.2 + install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.6.4 popd pushd inetutils/ sed -i 's/def HAVE_TERMCAP_TGETENT/ 1/' telnet/telnet.c diff --git a/lfs-patch-list b/lfs-patch-list index 5841ed0..bf60bc8 100644 --- a/lfs-patch-list +++ b/lfs-patch-list @@ -1,6 +1,6 @@ https://www.linuxfromscratch.org/patches/lfs/12.2/bzip2-1.0.8-install_docs-1.patch https://www.linuxfromscratch.org/patches/lfs/12.2/coreutils-9.5-i18n-2.patch https://www.linuxfromscratch.org/patches/lfs/12.2/expect-5.45.4-gcc14-1.patch -https://www.linuxfromscratch.org/patches/lfs/12.2/glibc-2.40-fhs-1.patch +https://www.linuxfromscratch.org/patches/lfs/development/glibc-2.40-fhs-1.patch https://www.linuxfromscratch.org/patches/lfs/12.2/kbd-2.6.4-backspace-1.patch https://www.linuxfromscratch.org/patches/downloads/m4/m4-1.4-gcc33-1.patch \ No newline at end of file diff --git a/md5sums b/md5sums index 505b979..d844391 100644 --- a/md5sums +++ b/md5sums @@ -14,7 +14,7 @@ e99adfa059a63db3503cc71f3d151e31 coreutils-9.5.tar.xz 2745c50f6f4e395e7b7d52f902d075bf diffutils-3.10.tar.xz 75e6d1353cbe6d5728a98fb0267206cb e2fsprogs-1.47.1.tar.gz 636547248fb3fae58ec48030298d3ef7 elfutils-0.191.tar.bz2 -0cb75c8feb842c0794ba89666b762a2d expat-2.6.2.tar.xz +101fe3e320a2800f36af8cf4045b45c7 expat-2.6.4.tar.xz 00fce8de158422f5ccd2666512329bd2 expect5.45.4.tar.gz 26b2a96d4e3a8938827a1e572afd527a file-5.45.tar.gz 870cfd71c07d37ebe56f9f4aaf4ad872 findutils-4.10.0.tar.xz @@ -24,7 +24,7 @@ e99adfa059a63db3503cc71f3d151e31 coreutils-9.5.tar.xz 2268420ba02dc01821960e274711bde0 gcc-14.2.0.tar.xz c780815649e52317be48331c1773e987 gdbm-1.24.tar.gz 3ae5580599d84be93e6213930facb2db gettext-0.22.5.tar.xz -b390feef233022114950317f10c4fa97 glibc-2.40.tar.xz +19862601af60f73ac69e067d3e9267d4 glibc-2.40.tar.xz 956dc04e864001a9c22429f761f2c283 gmp-6.3.0.tar.xz 9e251c0a618ad0824b51117d5d9db87e gperf-3.1.tar.gz 7c9bbd74492131245f7cdb291fa142c0 grep-3.11.tar.xz @@ -76,7 +76,6 @@ c30b57c6051be28fa928d09aca82841e tcl8.6.14-src.tar.gz edd9928b4a3f82674bcc3551616eef3b texinfo-7.1.tar.xz 2349edd8335245525cc082f2755d5bf4 tzdata2024a.tar.gz 88faefc8fefced097e58142077a3d14e util-linux-2.40.2.tar.xz -c512a99b3704f193be1a181cc644b2b2 vim-9.1.0660.tar.gz 440ff4fe51579b7ed16f02af8f8d9494 wheel-0.44.0.tar.gz 89a8e82cfd2ad948b349c0a69c494463 XML-Parser-2.47.tar.gz bbf73fb28425cebb854328599f85c4cf xz-5.6.2.tar.xz diff --git a/version-check.sh b/version-check.sh index 98bd83d..b3b316f 100755 --- a/version-check.sh +++ b/version-check.sh @@ -61,7 +61,7 @@ ver_check Sed sed 4.1.5 ver_check Tar tar 1.22 ver_check Texinfo texi2any 5.0 ver_check Xz xz 5.0.0 -ver_kernel 4.19 +ver_kernel 5.4 if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ] then echo "OK: Linux Kernel supports UNIX 98 PTY"; diff --git a/wget-list-systemd b/wget-list-systemd index 12f43cb..876fc97 100644 --- a/wget-list-systemd +++ b/wget-list-systemd @@ -14,7 +14,7 @@ https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.3.tar.gz https://ftp.gnu.org/gnu/diffutils/diffutils-3.10.tar.xz https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.47.1/e2fsprogs-1.47.1.tar.gz https://sourceware.org/ftp/elfutils/0.191/elfutils-0.191.tar.bz2 -https://prdownloads.sourceforge.net/expat/expat-2.6.2.tar.xz +https://prdownloads.sourceforge.net/expat/expat-2.6.4.tar.xz https://prdownloads.sourceforge.net/expect/expect5.45.4.tar.gz https://astron.com/pub/file/file-5.45.tar.gz https://ftp.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz @@ -76,7 +76,6 @@ https://downloads.sourceforge.net/tcl/tcl8.6.14-html.tar.gz https://ftp.gnu.org/gnu/texinfo/texinfo-7.1.tar.xz https://www.iana.org/time-zones/repository/releases/tzdata2024a.tar.gz https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.2.tar.xz -# https://github.com/vim/vim/archive/v9.1.0660/vim-9.1.0660.tar.gz https://pypi.org/packages/source/w/wheel/wheel-0.44.0.tar.gz https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz https://github.com//tukaani-project/xz/releases/download/v5.6.2/xz-5.6.2.tar.xz