X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=make.sh;h=83bd9faeb673896b5514964af718c97a8fde69b5;hp=a0c71ce73763130022901002f9b40494e9bc2bc6;hb=HEAD;hpb=cdb7afe6de1d3dab78c73ea4a6ae4f7bd3ed877e diff --git a/make.sh b/make.sh index a0c71ce737..6055826720 100755 --- a/make.sh +++ b/make.sh @@ -1,32 +1,29 @@ #!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007-2020 IPFire Team . # -# # -############################################################################ -# +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2023 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### NAME="IPFire" # Software name SNAME="ipfire" # Short name # If you update the version don't forget to update backupiso and add it to core update -VERSION="2.25" # Version number -CORE="155" # Core Level (Filename) +VERSION="2.29" # Version number +CORE="185" # Core Level (Filename) SLOGAN="www.ipfire.org" # Software slogan CONFIG_ROOT=/var/ipfire # Configuration rootdir MAX_RETRIES=1 # prefetch/check loop @@ -38,7 +35,10 @@ GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" # Git Branch GIT_TAG="$(git tag | tail -1)" # Git Tag GIT_LASTCOMMIT="$(git rev-parse --verify HEAD)" # Last commit -TOOLCHAINVER=20200924 +TOOLCHAINVER=20240210 + +# use multicore and max compression +ZSTD_OPT="-T0 --ultra -22" ############################################################################### # @@ -142,39 +142,24 @@ configure_build() { case "${build_arch}" in x86_64) - BUILDTARGET="${build_arch}-unknown-linux-gnu" - CROSSTARGET="${build_arch}-cross-linux-gnu" - BUILD_PLATFORM="x86" - CFLAGS_ARCH="-m64 -mtune=generic -fstack-clash-protection -fcf-protection" - ;; - - i586) BUILDTARGET="${build_arch}-pc-linux-gnu" CROSSTARGET="${build_arch}-cross-linux-gnu" BUILD_PLATFORM="x86" - CFLAGS_ARCH="-march=i586 -mtune=generic -fomit-frame-pointer" + CFLAGS_ARCH="-m64 -mtune=generic -fcf-protection=full" ;; aarch64) - BUILDTARGET="${build_arch}-unknown-linux-gnu" + BUILDTARGET="${build_arch}-pc-linux-gnu" CROSSTARGET="${build_arch}-cross-linux-gnu" BUILD_PLATFORM="arm" - CFLAGS_ARCH="-fstack-clash-protection" + CFLAGS_ARCH="-mbranch-protection=standard" ;; - armv7hl) - BUILDTARGET="${build_arch}-unknown-linux-gnueabi" - CROSSTARGET="${build_arch}-cross-linux-gnueabi" - BUILD_PLATFORM="arm" - CFLAGS_ARCH="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard" - ;; - - armv5tel) - BUILDTARGET="${build_arch}-unknown-linux-gnueabi" - CROSSTARGET="${build_arch}-cross-linux-gnueabi" - BUILD_PLATFORM="arm" - CFLAGS_ARCH="-march=armv5te -mfloat-abi=soft -fomit-frame-pointer" - RUSTFLAGS="-Ccodegen-units=1" + riscv64) + BUILDTARGET="${build_arch}-pc-linux-gnu" + CROSSTARGET="${build_arch}-cross-linux-gnu" + BUILD_PLATFORM="riscv" + CFLAGS_ARCH="" ;; *) @@ -197,17 +182,19 @@ configure_build() { TOOLS_DIR="/tools_${BUILD_ARCH}" # Enables hardening - HARDENING_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong" + HARDENING_CFLAGS="-Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection" - CFLAGS="-O2 -pipe -Wall -fexceptions -fPIC ${CFLAGS_ARCH}" + CFLAGS="-O2 -g0 -pipe -Wall -fexceptions -fPIC ${CFLAGS_ARCH}" CXXFLAGS="${CFLAGS}" + RUSTFLAGS="-Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn ${RUSTFLAGS_ARCH}" + # Determine parallelism # We assume that each process consumes about # 128MB of memory. Therefore we find out how # many processes fit into memory. local mem_max=$(( ${SYSTEM_MEMORY} / 128 )) - local cpu_max=$(( ${SYSTEM_PROCESSORS} + 1 )) + local cpu_max=$(( ${SYSTEM_PROCESSORS} )) local parallelism if [ ${mem_max} -lt ${cpu_max} ]; then @@ -235,15 +222,6 @@ configure_build() { # We allow XZ to use up to 70% of all system memory. local xz_memory=$(( SYSTEM_MEMORY * 7 / 10 )) - # XZ memory cannot be larger than 2GB on 32 bit systems - case "${build_arch}" in - i*86|armv*) - if [ ${xz_memory} -gt 2048 ]; then - xz_memory=2048 - fi - ;; - esac - XZ_OPT="${XZ_OPT} --memory=${xz_memory}MiB" } @@ -252,16 +230,13 @@ configure_build_guess() { x86_64) echo "x86_64" ;; - i?86) - echo "i586" - ;; aarch64) echo "aarch64" ;; - armv7*|armv6*|armv5*) - echo "armv5tel" + riscv64) + echo "riscv64" ;; *) @@ -290,10 +265,6 @@ stdumount() { umount $BASEDIR/build/tmp 2>/dev/null; } -now() { - date -u "+%s" -} - format_runtime() { local seconds=${1} @@ -432,7 +403,7 @@ prepareenv() { fi # Trap on emergency exit - trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGKILL SIGSTOP SIGQUIT + trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGQUIT # Checking if running as root user if [ $(id -u) -ne 0 ]; then @@ -469,7 +440,7 @@ prepareenv() { mkdir -p "${BASEDIR}/build${TOOLS_DIR}" 2>/dev/null mkdir -p $BASEDIR/build/{etc,usr/src} 2>/dev/null mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys} - mkdir -p $BASEDIR/{cache,ccache/${BUILD_ARCH}} 2>/dev/null + mkdir -p $BASEDIR/{cache,ccache/${BUILD_ARCH}/${TOOLCHAINVER}} 2>/dev/null if [ "${ENABLE_RAMDISK}" = "on" ]; then mkdir -p $BASEDIR/build/usr/src @@ -491,7 +462,7 @@ prepareenv() { mount --bind /proc $BASEDIR/build/proc mount --bind /sys $BASEDIR/build/sys mount --bind $BASEDIR/cache $BASEDIR/build/usr/src/cache - mount --bind $BASEDIR/ccache/${BUILD_ARCH} $BASEDIR/build/usr/src/ccache + mount --bind $BASEDIR/ccache/${BUILD_ARCH}/${TOOLCHAINVER} $BASEDIR/build/usr/src/ccache mount --bind $BASEDIR/config $BASEDIR/build/usr/src/config mount --bind $BASEDIR/doc $BASEDIR/build/usr/src/doc mount --bind $BASEDIR/html $BASEDIR/build/usr/src/html @@ -503,7 +474,6 @@ prepareenv() { # Run LFS static binary creation scripts one by one export CCACHE_DIR=$BASEDIR/ccache export CCACHE_TEMPDIR="/tmp" - export CCACHE_COMPRESS=1 export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER} ${BUILD_ARCH}" # Remove pre-install list of installed files in case user erase some files before rebuild @@ -543,14 +513,19 @@ prepareenv() { esac # Setup ccache cache size - enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" >/dev/null + enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" } enterchroot() { # Install QEMU helper, if needed qemu_install_helper - local PATH="${TOOLS_DIR}/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:${TOOLS_DIR}/bin" + local PATH="${TOOLS_DIR}/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin" + + # Prepend any custom changes to PATH + if [ -n "${CUSTOM_PATH}" ]; then + PATH="${CUSTOM_PATH}:${PATH}" + fi PATH="${PATH}" chroot ${LFS} env -i \ HOME="/root" \ @@ -575,7 +550,6 @@ enterchroot() { BUILD_PLATFORM="${BUILD_PLATFORM}" \ CCACHE_DIR=/usr/src/ccache \ CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \ - CCACHE_COMPRESS="${CCACHE_COMPRESS}" \ CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \ GOCACHE="/usr/src/ccache/go" \ KVER="${KVER}" \ @@ -643,9 +617,9 @@ lfsmakecommoncheck() { fi cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \ - MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1 + MESSAGE="$1\t b2sum" b2 >> $LOGFILE 2>&1 if [ $? -ne 0 ]; then - exiterror "md5sum error in $1, check file in cache or signature" + exiterror "BLAKE2 checksum error in $1, check file in cache or signature" fi return 0 # pass all! @@ -655,11 +629,17 @@ lfsmake1() { lfsmakecommoncheck $* [ $? == 1 ] && return 0 + # Set PATH to use the toolchain tools first and then whatever the host has set + local PATH="${TOOLS_DIR}/ccache/bin:${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin:${PATH}" + + if [ -n "${CUSTOM_PATH}" ]; then + PATH="${CUSTOM_PATH}:${PATH}" + fi + cd $BASEDIR/lfs && env -i \ - PATH="${TOOLS_DIR}/ccache/bin:${TOOLS_DIR}/bin:$PATH" \ - CCACHE_DIR="${CCACHE_DIR}" \ + PATH="${PATH}" \ + CCACHE_DIR="${CCACHE_DIR}"/${BUILD_ARCH}/${TOOLCHAINVER} \ CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \ - CCACHE_COMPRESS="${CCACHE_COMPRESS}" \ CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \ CFLAGS="${CFLAGS}" \ CXXFLAGS="${CXXFLAGS}" \ @@ -693,7 +673,7 @@ lfsmake2() { local PS1='\u:\w$ ' enterchroot \ - ${EXTRA_PATH}bash -x -c "cd /usr/src/lfs && \ + bash -x -c "cd /usr/src/lfs && \ make -f $* \ LFS_BASEDIR=/usr/src install" \ >> ${LOGFILE} 2>&1 & @@ -727,7 +707,7 @@ ipfiredist() { wait_until_finished() { local pid=${1} - local start_time=$(now) + local start_time="${SECONDS}" # Show progress if ${INTERACTIVE}; then @@ -737,7 +717,7 @@ wait_until_finished() { local runtime while kill -0 ${pid} 2>/dev/null; do - print_runtime $(( $(now) - ${start_time} )) + print_runtime $(( SECONDS - start_time )) # Wait a little sleep 1 @@ -749,7 +729,7 @@ wait_until_finished() { local ret=$? if ! ${INTERACTIVE}; then - print_runtime $(( $(now) - ${start_time} )) + print_runtime $(( SECONDS - start_time )) fi return ${ret} @@ -771,7 +751,7 @@ fake_environ() { } qemu_environ() { - local env + local env="QEMU_TARGET_HELPER=${QEMU_TARGET_HELPER}" # Don't add anything if qemu is not used. if ! qemu_is_required; then @@ -785,6 +765,11 @@ qemu_environ() { env="${env} QEMU_CPU=${QEMU_CPU}" ;; + riscv64) + QEMU_CPU="${QEMU_CPU:-sifive-u54}" + G_SLICE="always-malloc" + env="${env} QEMU_CPU=${QEMU_CPU} G_SLICE=${G_SLICE}" + ;; esac # Enable QEMU strace @@ -801,7 +786,7 @@ qemu_is_required() { fi case "${HOST_ARCH},${build_arch}" in - x86_64,arm*|x86_64,aarch64|i?86,arm*|i?86,aarch64|i?86,x86_64) + x86_64,arm*|x86_64,aarch64|x86_64,riscv64|i?86,arm*|i?86,aarch64|i?86,x86_64) return 0 ;; *) @@ -865,6 +850,9 @@ qemu_find_build_helper_name() { arm*) magic="7f454c4601010100000000000000000002002800" ;; + riscv64) + magic="7f454c460201010000000000000000000200f300" + ;; x86_64) magic="7f454c4602010100000000000000000002003e00" ;; @@ -895,7 +883,7 @@ qemu_find_build_helper_name() { file_is_static() { local file="${1}" - file ${file} 2>/dev/null | grep -q "statically linked" + file -L "${file}" 2>/dev/null | grep -q -e "statically linked" -e "static-pie linked" } update_language_list() { @@ -969,37 +957,6 @@ if [ "${ENABLE_RAMDISK}" = "auto" ]; then fi buildtoolchain() { - local error=false - case "${BUILD_ARCH}:${HOST_ARCH}" in - # x86_64 - x86_64:x86_64) - # This is working. - ;; - - # x86 - i586:i586|i586:i686|i586:x86_64) - # These are working. - ;; - i586:*) - error=true - ;; - - # ARM - arvm7hl:armv7hl|armv7hl:armv7l) - # These are working. - ;; - - armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv6l|armv5tel:armv7l|armv5tel:aarch64) - # These are working. - ;; - armv5tel:*) - error=true - ;; - esac - - ${error} && \ - exiterror "Cannot build ${BUILD_ARCH} toolchain on $(uname -m). Please use the download if any." - local gcc=$(type -p gcc) if [ -z "${gcc}" ]; then exiterror "Could not find GCC. You will need a working build enviroment in order to build the toolchain." @@ -1022,17 +979,17 @@ buildtoolchain() { export LOGFILE lfsmake1 stage1 - lfsmake1 ccache PASS=1 lfsmake1 binutils PASS=1 lfsmake1 gcc PASS=1 lfsmake1 linux KCFG="-headers" lfsmake1 glibc lfsmake1 libxcrypt lfsmake1 gcc PASS=L + lfsmake1 zlib lfsmake1 binutils PASS=2 lfsmake1 gcc PASS=2 - lfsmake1 zlib - lfsmake1 ccache PASS=2 + lfsmake1 zstd + lfsmake1 ccache lfsmake1 tcl lfsmake1 expect lfsmake1 dejagnu @@ -1060,7 +1017,7 @@ buildtoolchain() { lfsmake1 bison lfsmake1 flex lfsmake1 fake-environ - lfsmake1 strip + CUSTOM_PATH="${PATH}" lfsmake1 strip lfsmake1 cleanup-toolchain } @@ -1074,21 +1031,23 @@ buildbase() { lfsmake2 tzdata lfsmake2 cleanup-toolchain lfsmake2 zlib + [ "${BUILD_ARCH}" = "riscv64" ] && lfsmake2 gcc PASS=A lfsmake2 zstd lfsmake2 autoconf lfsmake2 automake + lfsmake2 help2man lfsmake2 libtool lfsmake2 binutils lfsmake2 gmp - lfsmake2 gmp-compat lfsmake2 mpfr lfsmake2 libmpc lfsmake2 libxcrypt lfsmake2 file lfsmake2 gcc + lfsmake2 attr + lfsmake2 acl lfsmake2 sed lfsmake2 berkeley - lfsmake2 berkeley-compat lfsmake2 coreutils lfsmake2 iana-etc lfsmake2 m4 @@ -1096,18 +1055,14 @@ buildbase() { lfsmake2 ncurses lfsmake2 perl lfsmake2 readline - lfsmake2 readline-compat lfsmake2 bzip2 lfsmake2 xz lfsmake2 lzip lfsmake2 pcre lfsmake2 pcre2 lfsmake2 gettext - lfsmake2 attr - lfsmake2 acl lfsmake2 bash lfsmake2 diffutils - lfsmake2 e2fsprogs lfsmake2 ed lfsmake2 findutils lfsmake2 flex @@ -1118,13 +1073,13 @@ buildbase() { lfsmake2 gperf lfsmake2 gzip lfsmake2 hostname - lfsmake2 iproute2 - lfsmake2 jwhois + lfsmake2 whois lfsmake2 kbd lfsmake2 less lfsmake2 pkg-config lfsmake2 procps lfsmake2 make + lfsmake2 libpipeline lfsmake2 man lfsmake2 net-tools lfsmake2 patch @@ -1136,6 +1091,8 @@ buildbase() { lfsmake2 texinfo lfsmake2 util-linux lfsmake2 vim + lfsmake2 e2fsprogs + lfsmake2 jq } buildipfire() { @@ -1144,34 +1101,21 @@ buildipfire() { lfsmake2 configroot lfsmake2 initscripts lfsmake2 backup + lfsmake2 rust lfsmake2 openssl - [ "${BUILD_ARCH}" = "i586" ] && lfsmake2 openssl KCFG='-sse2' - lfsmake2 kmod - lfsmake2 udev lfsmake2 popt lfsmake2 libedit - lfsmake2 libusb - lfsmake2 libusb-compat + lfsmake2 pam + lfsmake2 libcap + lfsmake2 libcap-ng lfsmake2 libpcap lfsmake2 ppp lfsmake2 pptp lfsmake2 unzip lfsmake2 which - lfsmake2 linux-firmware - lfsmake2 dvb-firmwares - lfsmake2 xr819-firmware - lfsmake2 zd1211-firmware - lfsmake2 rpi-firmware - lfsmake2 intel-microcode - lfsmake2 pcengines-apu-firmware lfsmake2 bc - lfsmake2 u-boot MKIMAGE=1 lfsmake2 cpio - lfsmake2 mdadm - lfsmake2 dracut lfsmake2 libaio - lfsmake2 lvm2 - lfsmake2 multipath-tools lfsmake2 freetype lfsmake2 libmnl lfsmake2 libnfnetlink @@ -1180,102 +1124,181 @@ buildipfire() { lfsmake2 libnetfilter_cthelper lfsmake2 libnetfilter_cttimeout lfsmake2 iptables + lfsmake2 iproute2 lfsmake2 screen lfsmake2 elfutils - - case "${BUILD_ARCH}" in - x86_64|aarch64) - lfsmake2 linux KCFG="" -# lfsmake2 backports KCFG="" -# lfsmake2 e1000e KCFG="" -# lfsmake2 igb KCFG="" -# lfsmake2 ixgbe KCFG="" - lfsmake2 xtables-addons KCFG="" - lfsmake2 linux-initrd KCFG="" - ;; - i586) - # x86 kernel build - lfsmake2 linux KCFG="" -# lfsmake2 backports KCFG="" -# lfsmake2 e1000e KCFG="" -# lfsmake2 igb KCFG="" -# lfsmake2 ixgbe KCFG="" - lfsmake2 xtables-addons KCFG="" - lfsmake2 linux-initrd KCFG="" - ;; - - armv5tel) - # arm multi platform (Panda, Wandboard ...) kernel build - lfsmake2 linux KCFG="-multi" -# lfsmake2 backports KCFG="-multi" -# lfsmake2 e1000e KCFG="-multi" -# lfsmake2 igb KCFG="-multi" -# lfsmake2 ixgbe KCFG="-multi" - lfsmake2 xtables-addons KCFG="-multi" - lfsmake2 linux-initrd KCFG="-multi" - ;; - esac - lfsmake2 xtables-addons USPACE="1" + lfsmake2 expat + lfsmake2 libconfig + lfsmake2 curl + lfsmake2 libarchive + lfsmake2 cmake + lfsmake2 json-c + lfsmake2 tcl + lfsmake2 libffi + lfsmake2 gdbm + lfsmake2 sqlite + lfsmake2 python3 + lfsmake2 python3-setuptools + lfsmake2 python3-MarkupSafe + lfsmake2 python3-Jinja2 + lfsmake2 ninja + lfsmake2 meson + lfsmake2 kmod + lfsmake2 udev + lfsmake2 libusb + lfsmake2 mdadm + lfsmake2 dracut + lfsmake2 lvm2 + lfsmake2 multipath-tools + lfsmake2 glib + lfsmake2 libgudev lfsmake2 libgpg-error lfsmake2 libgcrypt lfsmake2 libassuan lfsmake2 nettle - lfsmake2 json-c - lfsmake2 libconfig - lfsmake2 libevent + lfsmake2 libsodium lfsmake2 libevent2 - lfsmake2 expat lfsmake2 apr lfsmake2 aprutil lfsmake2 unbound lfsmake2 gnutls + lfsmake2 libuv lfsmake2 bind lfsmake2 dhcp lfsmake2 dhcpcd lfsmake2 boost lfsmake2 linux-atm - lfsmake2 gdbm - lfsmake2 pam + lfsmake2 libqmi lfsmake2 c-ares - lfsmake2 curl - lfsmake2 tcl - lfsmake2 sqlite - lfsmake2 libffi - lfsmake2 python - lfsmake2 python3 + lfsmake2 rust-dissimilar + lfsmake2 rust-cfg-if + lfsmake2 rust-libc + lfsmake2 rust-getrandom + lfsmake2 rust-typenum + lfsmake2 rust-version-check + lfsmake2 rust-generic-array + lfsmake2 rust-crypto-common + lfsmake2 rust-cipher + lfsmake2 rust-hex + lfsmake2 rust-unicode-xid + lfsmake2 rust-proc-macro2 + lfsmake2 rust-quote + lfsmake2 rust-syn + lfsmake2 rust-home + lfsmake2 rust-lazy-static + lfsmake2 rust-memchr + lfsmake2 rust-aho-corasick + lfsmake2 rust-regex-syntax + lfsmake2 rust-regex + lfsmake2 rust-ucd-trie + lfsmake2 rust-pest + lfsmake2 rust-semver-parser + lfsmake2 rust-semver + lfsmake2 rust-same-file + lfsmake2 rust-walkdir + lfsmake2 rust-dirs + lfsmake2 rust-toolchain_find + lfsmake2 rust-serde + lfsmake2 rust-itoa + lfsmake2 rust-ryu + lfsmake2 rust-serde_json + lfsmake2 rust-synstructure + lfsmake2 rust-block-buffer + lfsmake2 rust-digest + lfsmake2 rust-ppv-lite86 + lfsmake2 rust-rand_core + lfsmake2 rust-rand_core-0.4.2 + lfsmake2 rust-rand_core-0.3.1 + lfsmake2 rust-rand_chacha + lfsmake2 rust-rand_hc + lfsmake2 rust-rand + lfsmake2 rust-rdrand + lfsmake2 rust-rand-0.4 + lfsmake2 rust-log + lfsmake2 rust-num_cpus + lfsmake2 rust-crossbeam-utils + lfsmake2 rust-autocfg + lfsmake2 rust-memoffset + lfsmake2 rust-scopeguard + lfsmake2 rust-crossbeam-epoch + lfsmake2 rust-crossbeam-deque + lfsmake2 rust-either + lfsmake2 rust-crossbeam-channel + lfsmake2 rust-rayon-core + lfsmake2 rust-rayon + lfsmake2 rust-remove_dir_all + lfsmake2 rust-tempdir + lfsmake2 rust-glob + lfsmake2 rust-once_cell + lfsmake2 rust-termcolor + lfsmake2 rust-toml + lfsmake2 rust-serde_derive + lfsmake2 rust-trybuild + lfsmake2 rust-unindent + lfsmake2 rust-proc-macro-hack + lfsmake2 rust-indoc-impl + lfsmake2 rust-indoc + lfsmake2 rust-indoc-0.3.6 + lfsmake2 rust-instant + lfsmake2 rust-lock_api + lfsmake2 rust-smallvec + lfsmake2 rust-parking_lot_core + lfsmake2 rust-parking_lot + lfsmake2 rust-paste-impl + lfsmake2 rust-paste + lfsmake2 rust-paste-0.1.18 + lfsmake2 rust-ctor + lfsmake2 rust-ghost + lfsmake2 rust-inventory-impl + lfsmake2 rust-inventory + lfsmake2 rust-pyo3-build-config + lfsmake2 rust-pyo3-macros-backend + lfsmake2 rust-pyo3-macros + lfsmake2 rust-pyo3 + lfsmake2 rust-num-traits + lfsmake2 rust-num-integer + lfsmake2 rust-num_threads + lfsmake2 rust-time + lfsmake2 rust-iana-time-zone + lfsmake2 rust-chrono + lfsmake2 rust-asn1_derive + lfsmake2 rust-asn1 + lfsmake2 rust-proc-macro-error-attr + lfsmake2 rust-proc-macro-error + lfsmake2 rust-Inflector + lfsmake2 rust-ouroboros_macro + lfsmake2 rust-aliasable + lfsmake2 rust-stable_deref_trait + lfsmake2 rust-ouroboros + lfsmake2 rust-base64 + lfsmake2 rust-pem lfsmake2 gdb lfsmake2 grub + lfsmake2 mandoc lfsmake2 efivar lfsmake2 efibootmgr + lfsmake2 libtasn1 + lfsmake2 p11-kit lfsmake2 ca-certificates lfsmake2 fireinfo lfsmake2 libnet - lfsmake2 libnl lfsmake2 libnl-3 lfsmake2 libidn lfsmake2 nasm - lfsmake2 libarchive - lfsmake2 cmake - lfsmake2 ninja - lfsmake2 meson lfsmake2 libjpeg - lfsmake2 libjpeg-compat lfsmake2 openjpeg lfsmake2 libexif lfsmake2 libpng lfsmake2 libtiff - lfsmake2 libart lfsmake2 gd lfsmake2 slang lfsmake2 newt lfsmake2 libsmooth - lfsmake2 libcap - lfsmake2 libcap-ng lfsmake2 pciutils lfsmake2 usbutils lfsmake2 libxml2 lfsmake2 libxslt - lfsmake2 BerkeleyDB + lfsmake2 perl-BerkeleyDB lfsmake2 cyrus-sasl lfsmake2 openldap lfsmake2 apache2 @@ -1286,31 +1309,35 @@ buildipfire() { lfsmake2 arping lfsmake2 beep lfsmake2 libssh + lfsmake2 libinih lfsmake2 cdrkit lfsmake2 dosfstools + lfsmake2 exfatprogs lfsmake2 reiserfsprogs + lfsmake2 liburcu lfsmake2 xfsprogs lfsmake2 sysfsutils lfsmake2 fuse lfsmake2 ntfs-3g lfsmake2 ethtool lfsmake2 fcron + lfsmake2 perl-ExtUtils-PkgConfig lfsmake2 perl-GD - lfsmake2 GD-Graph - lfsmake2 GD-TextUtil + lfsmake2 perl-GD-Graph + lfsmake2 perl-GD-TextUtil lfsmake2 perl-Device-SerialPort lfsmake2 perl-Device-Modem lfsmake2 perl-Apache-Htpasswd lfsmake2 perl-Parse-Yapp + lfsmake2 perl-Data-UUID + lfsmake2 perl-Try-Tiny + lfsmake2 perl-HTTP-Message + lfsmake2 perl-HTTP-Date lfsmake2 gnupg lfsmake2 hdparm - lfsmake2 sdparm - lfsmake2 mtools lfsmake2 whatmask lfsmake2 libtirpc lfsmake2 conntrack-tools - lfsmake2 libupnp - lfsmake2 ipaddr lfsmake2 iputils lfsmake2 l7-protocols lfsmake2 hwdata @@ -1318,44 +1345,45 @@ buildipfire() { lfsmake2 logwatch lfsmake2 misc-progs lfsmake2 nano - lfsmake2 URI + lfsmake2 perl-URI lfsmake2 perl-CGI lfsmake2 perl-Switch - lfsmake2 HTML-Tagset - lfsmake2 HTML-Parser - lfsmake2 HTML-Template - lfsmake2 Compress-Zlib - lfsmake2 Digest - lfsmake2 Digest-SHA1 - lfsmake2 Digest-HMAC - lfsmake2 libwww-perl - lfsmake2 Net-DNS - lfsmake2 Net-IPv4Addr - lfsmake2 Net_SSLeay - lfsmake2 IO-Stringy - lfsmake2 IO-Socket-SSL - lfsmake2 Unix-Syslog - lfsmake2 Mail-Tools - lfsmake2 MIME-Tools - lfsmake2 Net-Server - lfsmake2 Convert-TNEF - lfsmake2 Convert-UUlib - lfsmake2 Archive-Tar - lfsmake2 Archive-Zip - lfsmake2 Text-Tabs+Wrap - lfsmake2 XML-Parser - lfsmake2 Crypt-PasswdMD5 - lfsmake2 Net-Telnet - lfsmake2 python-setuptools - lfsmake2 python-clientform - lfsmake2 python-mechanize - lfsmake2 python-feedparser - lfsmake2 python-rssdler - lfsmake2 python-inotify - lfsmake2 python-docutils - lfsmake2 python-daemon - lfsmake2 python-ipaddress - lfsmake2 glib + lfsmake2 perl-HTML-Tagset + lfsmake2 perl-HTML-Parser + lfsmake2 perl-HTML-Template + lfsmake2 perl-Compress-Zlib + lfsmake2 perl-Digest + lfsmake2 perl-Digest-SHA1 + lfsmake2 perl-Digest-HMAC + lfsmake2 perl-libwww + lfsmake2 perl-LWP-Protocol-https + lfsmake2 perl-Net-HTTP + lfsmake2 perl-Net-DNS + lfsmake2 perl-Net-IPv4Addr + lfsmake2 perl-Net_SSLeay + lfsmake2 perl-IO-Stringy + lfsmake2 perl-IO-Socket-SSL + lfsmake2 perl-Unix-Syslog + lfsmake2 perl-Mail-Tools + lfsmake2 perl-MIME-Tools + lfsmake2 perl-Net-Server + lfsmake2 perl-Canary-Stability + lfsmake2 perl-Convert-TNEF + lfsmake2 perl-Convert-UUlib + lfsmake2 perl-Archive-Tar + lfsmake2 perl-Archive-Zip + lfsmake2 perl-Text-Tabs+Wrap + lfsmake2 perl-XML-Parser + lfsmake2 perl-Crypt-PasswdMD5 + lfsmake2 perl-Net-Telnet + lfsmake2 perl-JSON + lfsmake2 perl-Capture-Tiny + lfsmake2 perl-Config-AutoConf + lfsmake2 perl-Object-Tiny + lfsmake2 perl-Archive-Peek-Libarchive + lfsmake2 python3-inotify + lfsmake2 python3-docutils + lfsmake2 python3-daemon lfsmake2 ntp lfsmake2 openssh lfsmake2 fontconfig @@ -1364,11 +1392,11 @@ buildipfire() { lfsmake2 freefont lfsmake2 pixman lfsmake2 cairo + lfsmake2 harfbuzz + lfsmake2 fribidi lfsmake2 pango lfsmake2 rrdtool lfsmake2 setup - lfsmake2 libdnet - lfsmake2 rust lfsmake2 jansson lfsmake2 yaml lfsmake2 libhtp @@ -1376,8 +1404,8 @@ buildipfire() { lfsmake2 ragel lfsmake2 hyperscan lfsmake2 suricata - lfsmake2 oinkmaster lfsmake2 ids-ruleset-sources + lfsmake2 ipblocklist-sources lfsmake2 squid lfsmake2 squidguard lfsmake2 calamaris @@ -1386,7 +1414,6 @@ buildipfire() { lfsmake2 vlan lfsmake2 wireless lfsmake2 pakfire - lfsmake2 spandsp lfsmake2 lz4 lfsmake2 lzo lfsmake2 openvpn @@ -1403,6 +1430,7 @@ buildipfire() { lfsmake2 poppler-data lfsmake2 cups-filters lfsmake2 epson-inkjet-printer-escpr + lfsmake2 cups-pdf lfsmake2 foomatic lfsmake2 hplip lfsmake2 cifs-utils @@ -1429,10 +1457,8 @@ buildipfire() { lfsmake2 libmad lfsmake2 libogg lfsmake2 libvorbis - lfsmake2 libdvbpsi lfsmake2 flac lfsmake2 lame - lfsmake2 sox lfsmake2 soxr lfsmake2 libshout lfsmake2 xvid @@ -1441,9 +1467,7 @@ buildipfire() { lfsmake2 rsync lfsmake2 rpcbind lfsmake2 keyutils - lfsmake2 libnfsidmap lfsmake2 nfs - lfsmake2 gnu-netcat lfsmake2 ncat lfsmake2 nmap lfsmake2 etherwake @@ -1453,24 +1477,30 @@ buildipfire() { lfsmake2 rng-tools lfsmake2 lsof lfsmake2 br2684ctl - lfsmake2 pcmciautils lfsmake2 lm_sensors + lfsmake2 libstatgrab lfsmake2 liboping lfsmake2 collectd + lfsmake2 git + lfsmake2 linux-firmware + lfsmake2 dvb-firmwares + lfsmake2 zd1211-firmware + lfsmake2 rpi-firmware + lfsmake2 intel-microcode + lfsmake2 pcengines-apu-firmware lfsmake2 elinks lfsmake2 igmpproxy - lfsmake2 fbset lfsmake2 opus - lfsmake2 python-six - lfsmake2 python-pyparsing + lfsmake2 python3-toml + lfsmake2 python3-pyproject2setuppy + lfsmake2 python3-pyparsing lfsmake2 spice-protocol lfsmake2 spice - lfsmake2 sdl + lfsmake2 sdl2 lfsmake2 libusbredir lfsmake2 libseccomp + lfsmake2 libslirp lfsmake2 qemu - lfsmake2 sane - lfsmake2 netpbm lfsmake2 netsnmpd lfsmake2 nagios_nrpe lfsmake2 nagios-plugins @@ -1486,6 +1516,7 @@ buildipfire() { lfsmake2 vdr_dvbapi lfsmake2 vdr_eepg lfsmake2 w_scan + lfsmake2 fmt lfsmake2 mpd lfsmake2 libmpdclient lfsmake2 mpc @@ -1495,14 +1526,10 @@ buildipfire() { lfsmake2 perl-Authen-SASL lfsmake2 perl-MIME-Lite lfsmake2 perl-Email-Date-Format - lfsmake2 git - lfsmake2 squidclamav lfsmake2 vnstat lfsmake2 iw lfsmake2 wpa_supplicant lfsmake2 hostapd - lfsmake2 pycurl - lfsmake2 urlgrabber lfsmake2 syslinux lfsmake2 tftpd lfsmake2 cpufrequtils @@ -1523,69 +1550,85 @@ buildipfire() { lfsmake2 perl-DBD-SQLite lfsmake2 perl-File-ReadBackwards lfsmake2 openvmtools - lfsmake2 libmicrohttpd - lfsmake2 motion lfsmake2 joe lfsmake2 monit lfsmake2 nut lfsmake2 watchdog - lfsmake2 libpri - lfsmake2 libsrtp - lfsmake2 asterisk lfsmake2 usb_modeswitch lfsmake2 usb_modeswitch_data lfsmake2 zerofree lfsmake2 minicom lfsmake2 ddrescue - lfsmake2 miniupnpd - lfsmake2 client175 - lfsmake2 powertop lfsmake2 parted lfsmake2 swig + lfsmake2 dtc lfsmake2 u-boot - lfsmake2 u-boot-friendlyarm - lfsmake2 python-typing - lfsmake2 python-m2crypto lfsmake2 wireless-regdb - lfsmake2 crda - lfsmake2 libsolv - lfsmake2 python-distutils-extra - lfsmake2 python-lzma - lfsmake2 python-progressbar lfsmake2 ddns - lfsmake2 python3-setuptools + lfsmake2 python3-pycparser + lfsmake2 python3-charset-normalizer + lfsmake2 python3-certifi + lfsmake2 python3-idna + lfsmake2 python3-requests + lfsmake2 python3-tomli + lfsmake2 python3-pep517 + lfsmake2 python3-build + lfsmake2 python3-install + lfsmake2 python3-urllib3 + lfsmake2 python3-flit + lfsmake2 python3-packaging + lfsmake2 python3-typing-extensions + lfsmake2 python3-semantic-version lfsmake2 python3-setuptools-scm + lfsmake2 python3-setuptools-rust lfsmake2 python3-six lfsmake2 python3-dateutil lfsmake2 python3-jmespath lfsmake2 python3-colorama - lfsmake2 python3-docutils lfsmake2 python3-yaml lfsmake2 python3-s3transfer lfsmake2 python3-rsa lfsmake2 python3-pyasn1 - lfsmake2 python3-urllib3 lfsmake2 python3-botocore - lfsmake2 python3-llfuse + lfsmake2 python3-cffi + lfsmake2 python3-cryptography + lfsmake2 python3-circuitbreaker + lfsmake2 python3-pytz + lfsmake2 python3-click + lfsmake2 python3-arrow + lfsmake2 python3-terminaltables + lfsmake2 python3-pkgconfig lfsmake2 python3-msgpack + lfsmake2 python3-editables + lfsmake2 python3-pathspec + lfsmake2 python3-pluggy + lfsmake2 python3-calver + lfsmake2 python3-trove-classifiers + lfsmake2 python3-hatchling + lfsmake2 python3-hatch-vcs + lfsmake2 python3-hatch-fancy-pypi-readme + lfsmake2 python3-attrs + lfsmake2 python3-sniffio + lfsmake2 python3-sortedcontainers + lfsmake2 python3-outcome + lfsmake2 python3-async_generator + lfsmake2 python3-flit_scm + lfsmake2 python3-exceptiongroup + lfsmake2 python3-trio + lfsmake2 python3-pyfuse3 lfsmake2 aws-cli + lfsmake2 oci-python-sdk + lfsmake2 oci-cli lfsmake2 transmission - lfsmake2 dpfhack - lfsmake2 lcd4linux lfsmake2 mtr lfsmake2 minidlna lfsmake2 acpid lfsmake2 fping lfsmake2 telnet lfsmake2 xinetd - lfsmake2 gpgme - lfsmake2 pygpgme - lfsmake2 pakfire3 lfsmake2 stress - lfsmake2 libstatgrab lfsmake2 sarg lfsmake2 nginx - lfsmake2 sendEmail lfsmake2 sysbench lfsmake2 strace lfsmake2 ltrace @@ -1608,8 +1651,7 @@ buildipfire() { lfsmake2 perl-Font-TTF lfsmake2 perl-IO-String lfsmake2 perl-PDF-API2 - lfsmake2 squid-accounting - lfsmake2 pigz + lfsmake2 proxy-accounting lfsmake2 tmux lfsmake2 perl-Text-CSV_XS lfsmake2 lua @@ -1617,10 +1659,13 @@ buildipfire() { lfsmake2 ipset lfsmake2 dnsdist lfsmake2 bird + lfsmake2 libyang + lfsmake2 abseil-cpp + lfsmake2 protobuf + lfsmake2 protobuf-c lfsmake2 frr lfsmake2 dmidecode lfsmake2 mcelog - lfsmake2 util-macros lfsmake2 libpciaccess lfsmake2 libyajl lfsmake2 libvirt @@ -1635,6 +1680,8 @@ buildipfire() { lfsmake2 i2c-tools lfsmake2 nss-myhostname lfsmake2 dehydrated + lfsmake2 libplist + lfsmake2 nqptp lfsmake2 shairport-sync lfsmake2 borgbackup lfsmake2 lmdb @@ -1645,12 +1692,36 @@ buildipfire() { lfsmake2 firmware-update lfsmake2 tshark lfsmake2 speedtest-cli - lfsmake2 rfkill lfsmake2 amazon-ssm-agent lfsmake2 libloc lfsmake2 ncdu lfsmake2 lshw lfsmake2 socat + lfsmake2 libcdada + lfsmake2 pmacct + lfsmake2 squid-asnbl + lfsmake2 qemu-ga + lfsmake2 gptfdisk + lfsmake2 oath-toolkit + lfsmake2 qrencode + lfsmake2 perl-File-Remove + lfsmake2 perl-Module-Build + lfsmake2 perl-Module-ScanDeps + lfsmake2 perl-YAML-Tiny + lfsmake2 perl-Module-Install + lfsmake2 perl-Imager + lfsmake2 perl-Imager-QRCode + lfsmake2 perl-MIME-Base32 + lfsmake2 perl-URI-Encode + lfsmake2 rsnapshot + lfsmake2 mympd + lfsmake2 wsdd + + # Kernelbuild ... current we have no platform that need + # multi kernel builds so KCFG is empty + lfsmake2 linux KCFG="" + lfsmake2 rtl8812au KCFG="" + lfsmake2 linux-initrd KCFG="" } buildinstaller() { @@ -1660,7 +1731,7 @@ buildinstaller() { lfsmake2 memtest lfsmake2 installer # use toolchain bash for chroot to strip - EXTRA_PATH=${TOOLS_DIR}/bin/ lfsmake2 strip + CUSTOM_PATH="${TOOLS_DIR}/bin" lfsmake2 strip } buildpackages() { @@ -1668,7 +1739,7 @@ buildpackages() { export LOGFILE echo "... see detailed log in _build.*.log files" >> $LOGFILE - + # Generating list of packages used print_line "Generating packages list from logs" rm -f $BASEDIR/doc/packages-list @@ -1683,7 +1754,7 @@ buildpackages() { rm -f $BASEDIR/doc/packages-list # packages-list.txt is ready to be displayed for wiki page print_status DONE - + # Update changelog cd $BASEDIR [ -z $GIT_TAG ] || LAST_TAG=$GIT_TAG @@ -1705,11 +1776,8 @@ buildpackages() { cd $BASEDIR - # remove not useable iso on armv5tel (needed to build flash images) - [ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso - for i in $(ls *.bz2 *.img.xz *.iso 2>/dev/null); do - md5sum $i > $i.md5 + b2sum $i > $i.b2 done cd $PWD @@ -1755,14 +1823,11 @@ while [ $# -gt 0 ]; do done # See what we're supposed to do -case "$1" in +case "$1" in build) - START_TIME=$(now) + START_TIME="${SECONDS}" - # Clear screen - ${INTERACTIVE} && clear - - PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz 2> /dev/null | head -n 1` + PACKAGE="$BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.zst" #only restore on a clean disk if [ ! -e "${BASEDIR}/build${TOOLS_DIR}/.toolchain-successful" ]; then if [ ! -n "$PACKAGE" ]; then @@ -1770,13 +1835,13 @@ build) prepareenv buildtoolchain else - PACKAGENAME=${PACKAGE%.tar.xz} + PACKAGENAME=${PACKAGE%.tar.zst} print_build_stage "Packaged toolchain compilation" - if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then - tar axf $PACKAGE + if [ `b2sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.b2 | awk '{print $1}'` ]; then + zstd -d < "${PACKAGE}" | tar x prepareenv else - exiterror "$PACKAGENAME md5 did not match, check downloaded package" + exiterror "$PACKAGENAME BLAKE2 checksum did not match, check downloaded package" fi fi else @@ -1794,7 +1859,7 @@ build) print_build_stage "Building packages" buildpackages - + print_build_stage "Checking Logfiles for new Files" cd $BASEDIR @@ -1802,7 +1867,7 @@ build) tools/checkrootfiles cd $PWD - print_build_summary $(( $(now) - ${START_TIME} )) + print_build_summary $(( SECONDS - START_TIME )) ;; shell) # enter a shell inside LFS chroot @@ -1859,7 +1924,7 @@ downloadsrc) FINISHED=0 cd $BASEDIR/lfs for c in `seq $MAX_RETRIES`; do - if (( FINISHED==1 )); then + if (( FINISHED==1 )); then break fi FINISHED=1 @@ -1881,22 +1946,22 @@ downloadsrc) fi done done - echo -e "${BOLD}***Verifying md5sums${NORMAL}" + echo -e "${BOLD}***Verifying BLAKE2 checksum${NORMAL}" ERROR=0 for i in *; do if [ -f "$i" -a "$i" != "Config" ]; then lfsmakecommoncheck ${i} > /dev/null || continue make -s -f $i LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \ - MESSAGE="$i\t " md5 >> $LOGFILE 2>&1 + MESSAGE="$i\t " b2 >> $LOGFILE 2>&1 if [ $? -ne 0 ]; then - echo -ne "MD5 difference in lfs/$i" + echo -ne "BLAKE2 checksum difference in lfs/$i" print_status FAIL ERROR=1 fi fi done if [ $ERROR -eq 0 ]; then - echo -ne "${BOLD}all files md5sum match${NORMAL}" + echo -ne "${BOLD}all files BLAKE2 checksum match${NORMAL}" print_status DONE else echo -ne "${BOLD}not all files were correctly download${NORMAL}" @@ -1905,36 +1970,33 @@ downloadsrc) cd - >/dev/null 2>&1 ;; toolchain) - # Clear screen - ${INTERACTIVE} && clear - prepareenv print_build_stage "Toolchain compilation (${BUILD_ARCH})" buildtoolchain echo "`date -u '+%b %e %T'`: Create toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains - cd $BASEDIR && tar -cf- --exclude='log/_build.*.log' build/${TOOLS_DIR} build/bin/sh log | xz ${XZ_OPT} \ - > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz - md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \ - > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5 + cd $BASEDIR && tar -cf- --exclude='log/_build.*.log' build/${TOOLS_DIR} build/bin/sh log \ + | zstd ${ZSTD_OPT} > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.zst + b2sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.zst \ + > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.b2 stdumount ;; gettoolchain) # arbitrary name to be updated in case of new toolchain package upload PACKAGE=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH} - if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.xz ]; then + if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.zst ]; then URL_TOOLCHAIN=`grep URL_TOOLCHAIN lfs/Config | awk '{ print $3 }'` test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains echo "`date -u '+%b %e %T'`: Load toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE cd $BASEDIR/cache/toolchains - wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.xz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null + wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.zst $URL_TOOLCHAIN/$PACKAGE.b2 >& /dev/null if [ $? -ne 0 ]; then echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for ${BUILD_ARCH} machine" | tee -a $LOGFILE else - if [ "`md5sum $PACKAGE.tar.xz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then - echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE + if [ "`b2sum $PACKAGE.tar.zst | awk '{print $1}'`" = "`cat $PACKAGE.b2 | awk '{print $1}'`" ]; then + echo "`date -u '+%b %e %T'`: toolchain BLAKE2 checksum ok" | tee -a $LOGFILE else - exiterror "$PACKAGE.md5 did not match, check downloaded package" + exiterror "$PACKAGE BLAKE2 checksum did not match, check downloaded package" fi fi else @@ -1942,24 +2004,24 @@ gettoolchain) fi ;; uploadsrc) - PWD=`pwd` if [ -z $IPFIRE_USER ]; then echo -n "You have to setup IPFIRE_USER first. See .config for details." print_status FAIL exit 1 fi - URL_SOURCE=$(grep URL_SOURCE lfs/Config | awk '{ print $3 }') - REMOTE_FILES=$(echo "ls -1" | sftp -C ${IPFIRE_USER}@${URL_SOURCE}) + URL_SOURCE="$(awk '/^URL_SOURCE/ { print $3 }' lfs/Config)" + + rsync \ + --recursive \ + --update \ + --ignore-existing \ + --progress \ + --human-readable \ + --exclude="toolchains/" \ + "${BASEDIR}/cache/" \ + "${IPFIRE_USER}@${URL_SOURCE}" - for file in ${BASEDIR}/cache/*; do - [ -d "${file}" ] && continue - grep -q "$(basename ${file})" <<<$REMOTE_FILES && continue - NEW_FILES="$NEW_FILES $file" - done - [ -n "$NEW_FILES" ] && scp -2 $NEW_FILES ${IPFIRE_USER}@${URL_SOURCE} - cd $BASEDIR - cd $PWD exit 0 ;; lang) @@ -1978,7 +2040,7 @@ lang) $BASEDIR/tools/check_strings.pl de > $BASEDIR/doc/language_issues.de $BASEDIR/tools/check_strings.pl fr > $BASEDIR/doc/language_issues.fr $BASEDIR/tools/check_strings.pl es > $BASEDIR/doc/language_issues.es - $BASEDIR/tools/check_strings.pl es > $BASEDIR/doc/language_issues.pl + $BASEDIR/tools/check_strings.pl pl > $BASEDIR/doc/language_issues.pl $BASEDIR/tools/check_strings.pl ru > $BASEDIR/doc/language_issues.ru $BASEDIR/tools/check_strings.pl nl > $BASEDIR/doc/language_issues.nl $BASEDIR/tools/check_strings.pl tr > $BASEDIR/doc/language_issues.tr @@ -1998,9 +2060,18 @@ find-dependencies) shift exec "${BASEDIR}/tools/find-dependencies" "${BASEDIR}/build" "$@" ;; +check-manualpages) + echo "Checking the manual pages for broken links..." + + chmod 755 $BASEDIR/tools/check_manualpages.pl + if $BASEDIR/tools/check_manualpages.pl; then + print_status DONE + else + print_status FAIL + fi + ;; *) - echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies}" + echo "Usage: $0 [OPTIONS] {build|check-manualpages|clean|docker|downloadsrc|find-dependencies|gettoolchain|lang|shell|toolchain|update-contributors|uploadsrc}" cat doc/make.sh-usage ;; esac -