diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-16 00:01:28 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-16 00:01:28 -0500 |
commit | 2704a1c0ce34d81fdde6d2c365df0b9a77545fc3 (patch) | |
tree | be16050026c3b0b2d821d8abf315408156c2fedf | |
parent | 36bdd88a911512bf029d15a362a4de1da3d288fd (diff) |
Was forgotten.
-rwxr-xr-x | download.sh | 21 | ||||
-rwxr-xr-x | lfs.sh | 2 | ||||
-rw-r--r-- | packages.csv | 79 | ||||
-rwxr-xr-x | versioncheck.sh | 58 |
4 files changed, 160 insertions, 0 deletions
diff --git a/download.sh b/download.sh new file mode 100755 index 0000000..a034cb6 --- /dev/null +++ b/download.sh @@ -0,0 +1,21 @@ +#!/bin/bash +source lfs.sh +cat packages.csv | while read line; do + NAME="$(echo $line | cut -d\, -f1)" + VERSION="$(echo $line | cut -d\, -f2)" + URL="$(echo $line | cut -d\, -f3 | sed "s/@/${VERSION}/g")" + MD5SUM="$(echo $line | cut -d\, -f4)" + CACHEFILE="$(basename "$URL")" + + if [ ! -f "${CACHEFILE}" ]; then + + + echo "Downloading ${URL}" + wget -nc -O "${LFS_SRC}/${CACHEFILE}" "${URL}" + if ! echo "${MD5SUM} ${LFS_SRC}/${CACHEFILE}" | md5sum -c >/dev/null; then + rm -f "${LFS_SRC}/${CACHEFILE}" + echo "Verification of ${CACHEFILE} failed! MD5 mismatch!" + exit 1 + fi + fi +done
\ No newline at end of file @@ -6,6 +6,7 @@ export LFS_TGT=x86_64-lfs-linux-gnu export LFS_DISK=/dev/sdb export LFS_ROOT=1 export LFS_PWD=lfs +export LFS_SRC=${LFS}/sources [[ -d /mnt/lfs ]] || sudo mkdir ${LFS} @@ -15,6 +16,7 @@ if ! grep -q "${LFS}" /proc/mounts; then sudo chown -v $USER "$LFS" fi +mkdir -pv ${LFS_SRC} mkdir -pv ${LFS}/tools mkdir -pv ${LFS}/bin mkdir -pv ${LFS}/etc diff --git a/packages.csv b/packages.csv new file mode 100644 index 0000000..214ddba --- /dev/null +++ b/packages.csv @@ -0,0 +1,79 @@ +Acl,2.2.53,http://download.savannah.gnu.org/releases/acl/acl-@.tar.gz,007aabf1dbb550bcddde52a244cd1070 +Attr,2.4.48,http://download.savannah.gnu.org/releases/attr/attr-@.tar.gz,bc1e5cb5c96d99b24886f1f527d3bb3d +Autoconf,2.71,http://ftp.gnu.org/gnu/autoconf/autoconf-@.tar.xz,12cfa1687ffa2606337efe1a64416106 +Automake,1.16.3,http://ftp.gnu.org/gnu/automake/automake-@.tar.xz,c27f608a4e1f302ec7ce42f1251c184e +Bash,5.1,http://ftp.gnu.org/gnu/bash/bash-@.tar.gz,bb91a17fd6c9032c26d0b2b78b50aff5 +Bc,3.3.0,https://github.com/gavinhoward/bc/releases/download/@/bc-@.tar.xz,452ae2d467b1d7212bb7896c0c689825 +Binutils,2.36.1,http://ftp.gnu.org/gnu/binutils/binutils-@.tar.xz,628d490d976d8957279bbbff06cf29d4 +Bison,3.7.5,http://ftp.gnu.org/gnu/bison/bison-@.tar.xz,9b762dc24a6723f86d14d957d3deeb90 +Bzip2,1.0.8,https://www.sourceware.org/pub/bzip2/bzip2-@.tar.gz,67e051268d0c475ea773822f7500d0e5 +Check,0.15.2,https://github.com/libcheck/check/releases/download/@/check-@.tar.gz,50fcafcecde5a380415b12e9c574e0b2 +Coreutils,8.32,http://ftp.gnu.org/gnu/coreutils/coreutils-@.tar.xz,022042695b7d5bcf1a93559a9735e668 +DejaGNU,1.6.2,http://ftp.gnu.org/gnu/dejagnu/dejagnu-@.tar.gz,e1b07516533f351b3aba3423fafeffd6 +Diffutils,3.7,http://ftp.gnu.org/gnu/diffutils/diffutils-@.tar.xz,4824adc0e95dbbf11dfbdfaad6a1e461 +E2fsprogs,1.46.1,https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v@/e2fsprogs-@.tar.gz,8c52585522b7ca6bdae2bdecba27b3a4 +Elfutils,0.183,https://sourceware.org/ftp/elfutils/@/elfutils-@.tar.bz2,6f58aa1b9af1a5681b1cbf63e0da2d67 +Eudev,3.2.10,https://dev.gentoo.org/~blueness/eudev/eudev-@.tar.gz,60b135a189523f333cea5f71a3345c8d +Expat,2.2.10,https://prdownloads.sourceforge.net/expat/expat-@.tar.xz,e0fe49a6b3480827c9455e4cfc799133 +Expect,5.45.4,https://prdownloads.sourceforge.net/expect/expect@.tar.gz,00fce8de158422f5ccd2666512329bd2 +File,5.39,http://ftp.astron.com/pub/file/file-@.tar.gz,1c450306053622803a25647d88f80f25 +Findutils,4.8.0,http://ftp.gnu.org/gnu/findutils/findutils-@.tar.xz,eeefe2e6380931a77dfa6d9350b43186 +Flex,2.6.4,https://github.com/westes/flex/releases/download/v@/flex-@.tar.gz,2882e3179748cc9f9c23ec593d6adc8d +Gawk,5.1.0,http://ftp.gnu.org/gnu/gawk/gawk-@.tar.xz,8470c34eeecc41c1aa0c5d89e630df50 +GCC,10.2.0,http://ftp.gnu.org/gnu/gcc/gcc-@/gcc-@.tar.xz,e9fd9b1789155ad09bcf3ae747596b50 +GDBM,1.19,http://ftp.gnu.org/gnu/gdbm/gdbm-@.tar.gz,aeb29c6a90350a4c959cd1df38cd0a7e +Gettext,0.21,http://ftp.gnu.org/gnu/gettext/gettext-@.tar.xz,40996bbaf7d1356d3c22e33a8b255b31 +Glibc,2.33,http://ftp.gnu.org/gnu/glibc/glibc-@.tar.xz,390bbd889c7e8e8a7041564cb6b27cca +GMP,6.2.1,http://ftp.gnu.org/gnu/gmp/gmp-@.tar.xz,0b82665c4a92fd2ade7440c13fcaa42b +Gperf,3.1,http://ftp.gnu.org/gnu/gperf/gperf-@.tar.gz,9e251c0a618ad0824b51117d5d9db87e +Grep,3.6,http://ftp.gnu.org/gnu/grep/grep-@.tar.xz,f47fe27049510b2249dba7f862ac1b51 +Groff,1.22.4,http://ftp.gnu.org/gnu/groff/groff-@.tar.gz,08fb04335e2f5e73f23ea4c3adbf0c5f +GRUB,2.04,https://ftp.gnu.org/gnu/grub/grub-@.tar.xz,5aaca6713b47ca2456d8324a58755ac7 +Gzip,1.10,http://ftp.gnu.org/gnu/gzip/gzip-@.tar.xz,691b1221694c3394f1c537df4eee39d3 +Iana-Etc,20210202,https://github.com/Mic92/iana-etc/releases/download/@/iana-etc-@.tar.gz,1c193a4d6ca36274570d1505140a7bee +Inetutils,2.0,http://ftp.gnu.org/gnu/inetutils/inetutils-@.tar.xz,5e1018502cd131ed8e42339f6b5c98aa +Intltool,0.51.0,https://launchpad.net/intltool/trunk/@/+download/intltool-@.tar.gz,12e517cac2b57a0121cda351570f1e63 +IPRoute2,5.10.0,https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-@.tar.xz,19ffea480a21e600453776b7225f3319 +Kbd,2.4.0,https://www.kernel.org/pub/linux/utils/kbd/kbd-@.tar.xz,3cac5be0096fcf7b32dcbd3c53831380 +Kmod,28,https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-@.tar.xz,0a2b887b1b3dfb8c0b3f41f598203e56 +Less,563,http://www.greenwoodsoftware.com/less/less-@.tar.gz,1ee44fa71447a845f6eef5b3f38d2781 +LFS-Bootscripts,20210201,http://www.linuxfromscratch.org/lfs/downloads/10.1/lfs-bootscripts-@.tar.xz,1fc441ef96c522974f7267dec8b40a47 +Libcap,2.48,https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-@.tar.xz,ca71693a9abe4e0ad9cc33a755ee47e0 +Libffi,3.3,https://sourceware.org/pub/libffi/libffi-@.tar.gz,6313289e32f1d38a9df4770b014a2ca7 +Libpipeline,1.5.3,http://download.savannah.gnu.org/releases/libpipeline/libpipeline-@.tar.gz,dad443d0911cf9f0f1bd90a334bc9004 +Libtool,2.4.6,http://ftp.gnu.org/gnu/libtool/libtool-@.tar.xz,1bfb9b923f2c1339b4d2ce1807064aa5 +Linux,5.10.17,https://www.kernel.org/pub/linux/kernel/v5.x/linux-@.tar.xz,4908707ed841923d8d1814130d5c380f +M4,1.4.18,http://ftp.gnu.org/gnu/m4/m4-@.tar.xz,730bb15d96fffe47e148d1e09235af82 +Make,4.3,http://ftp.gnu.org/gnu/make/make-@.tar.gz,fc7a67ea86ace13195b0bce683fd4469 +Man-DB,2.9.4,http://download.savannah.gnu.org/releases/man-db/man-db-@.tar.xz,6e233a555f7b9ae91ce7cd0faa322bce +Man-pages,5.10,https://www.kernel.org/pub/linux/docs/man-pages/man-pages-@.tar.xz,4ae3f74a1beddd919936e1058642644c +Meson,0.57.1,https://github.com/mesonbuild/meson/releases/download/@/meson-@.tar.gz,fbd744560351491892478a36a1586815 +MPC,1.2.1,https://ftp.gnu.org/gnu/mpc/mpc-@.tar.gz,9f16c976c25bb0f76b50be749cd7a3a8 +MPFR,4.1.0,http://www.mpfr.org/mpfr-@/mpfr-@.tar.xz,bdd3d5efba9c17da8d83a35ec552baef +Ncurses,6.2,http://ftp.gnu.org/gnu/ncurses/ncurses-@.tar.gz,e812da327b1c2214ac1aed440ea3ae8d +Ninja,1.10.2,https://github.com/ninja-build/ninja/archive/v@/ninja-@.tar.gz,639f75bc2e3b19ab893eaf2c810d4eb4 +OpenSSL,1.1.1j,https://www.openssl.org/source/openssl-@.tar.gz,cccaa064ed860a2b4d1303811bf5c682 +Patch,2.7.6,http://ftp.gnu.org/gnu/patch/patch-@.tar.xz,78ad9937e4caadcba1526ef1853730d5 +Perl,5.32.1,https://www.cpan.org/src/5.0/perl-@.tar.xz,7f104064b906ad8c7329ca5e409a32d7 +Pkg-config,0.29.2,https://pkg-config.freedesktop.org/releases/pkg-config-@.tar.gz,f6e931e319531b736fadc017f470e68a +Procps,3.3.17,https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-@.tar.xz,d60613e88c2f442ebd462b5a75313d56 +Psmisc,23.4,https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-@.tar.xz,8114cd4489b95308efe2509c3a406bbf +Python,3.9.2,https://www.python.org/ftp/python/@/Python-@.tar.xz,f0dc9000312abeb16de4eccce9a870ab +Python Documentation,3.9.2,https://www.python.org/ftp/python/doc/@/python-@-docs-html.tar.bz2,719cd64a4c5768b646b716df20229400 +Readline,8.1,http://ftp.gnu.org/gnu/readline/readline-@.tar.gz,e9557dd5b1409f5d7b37ef717c64518e +Sed,4.8,http://ftp.gnu.org/gnu/sed/sed-@.tar.xz,6d906edfdb3202304059233f51f9a71d +Shadow,4.8.1,https://github.com/shadow-maint/shadow/releases/download/@/shadow-@.tar.xz,4b05eff8a427cf50e615bda324b5bc45 +Sysklogd,1.5.1,http://www.infodrom.org/projects/sysklogd/download/sysklogd-@.tar.gz,c70599ab0d037fde724f7210c2c8d7f8 +Sysvinit,2.98,http://download.savannah.gnu.org/releases/sysvinit/sysvinit-@.tar.xz,e3254f7622ea5cf2322b1b386a98ba59 +Tar,1.34,http://ftp.gnu.org/gnu/tar/tar-@.tar.xz,9a08d29a9ac4727130b5708347c0f5cf +Tcl,8.6.11,https://downloads.sourceforge.net/tcl/tcl@-src.tar.gz,8a4c004f48984a03a7747e9ba06e4da4 +Tcl Documentation,8.6.11,https://downloads.sourceforge.net/tcl/tcl@-html.tar.gz,e358a9140c3a171e42f18c8a7f6a36ea +Texinfo,6.7,http://ftp.gnu.org/gnu/texinfo/texinfo-@.tar.xz,d4c5d8cc84438c5993ec5163a59522a6 +Time Zone Data,2021a,https://www.iana.org/time-zones/repository/releases/tzdata@.tar.gz,20eae7d1da671c6eac56339c8df85bbd +Udev-lfs Tarball,udev-lfs-20171102,http://anduin.linuxfromscratch.org/LFS/@.tar.xz,27cd82f9a61422e186b9d6759ddf1634 +Util-linux,2.36.2,https://www.kernel.org/pub/linux/utils/util-linux/v2.36/util-linux-@.tar.xz,f78419af679ac9678190ad961eb3cf27 +Vim,8.2.2433,http://anduin.linuxfromscratch.org/LFS/vim-@.tar.gz,a26555c8919cf40938d2428d834bf913 +XML::Parser,2.46,https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-@.tar.gz,80bb18a8e6240fcf7ec2f7b57601c170 +Xz Utils,5.2.5,https://tukaani.org/xz/xz-@.tar.xz,aa1621ec7013a19abab52a8aff04fe5b +Zlib,1.2.11,https://zlib.net/zlib-@.tar.xz,85adef240c5f370b308da8c938951a68 +Zstd,1.4.8,https://github.com/facebook/zstd/releases/download/v@/zstd-@.tar.gz,e873db7cfa5ef05832e6d55a5a572840 diff --git a/versioncheck.sh b/versioncheck.sh new file mode 100755 index 0000000..ed1caa7 --- /dev/null +++ b/versioncheck.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Simple script to list version numbers of critical development tools + +export LC_ALL=C +bash --version | head -n1 | cut -d" " -f2-4 +MYSH=$(readlink -f /bin/sh) +echo "/bin/sh -> $MYSH" +echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash" +unset MYSH + +echo -n "Binutils: " +ld --version | head -n1 | cut -d" " -f3- +bison --version | head -n1 + +if [ -h /usr/bin/yacc ]; then + echo "/usr/bin/yacc -> $(readlink -f /usr/bin/yacc)" +elif [ -x /usr/bin/yacc ]; then + echo yacc is $(/usr/bin/yacc --version | head -n1) +else + echo "yacc not found" +fi + +bzip2 --version 2>&1 </dev/null | head -n1 | cut -d" " -f1,6- +echo -n "Coreutils: " +chown --version | head -n1 | cut -d")" -f2 +diff --version | head -n1 +find --version | head -n1 +gawk --version | head -n1 + +if [ -h /usr/bin/awk ]; then + echo "/usr/bin/awk -> $(readlink -f /usr/bin/awk)" +elif [ -x /usr/bin/awk ]; then + echo awk is $(/usr/bin/awk --version | head -n1) +else + echo "awk not found" +fi + +gcc --version | head -n1 +g++ --version | head -n1 +ldd --version | head -n1 | cut -d" " -f2- # glibc version +grep --version | head -n1 +gzip --version | head -n1 +cat /proc/version +m4 --version | head -n1 +make --version | head -n1 +patch --version | head -n1 +echo Perl $(perl -V:version) +python3 --version +sed --version | head -n1 +tar --version | head -n1 +makeinfo --version | head -n1 # texinfo version +xz --version | head -n1 + +echo 'int main(){}' >dummy.c && g++ -o dummy dummy.c +if [ -x dummy ]; then + echo "g++ compilation OK" +else echo "g++ compilation failed"; fi +rm -f dummy.c dummy
\ No newline at end of file |