]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - make.sh
New Addon: gptfdisk 1.0.8
[people/pmueller/ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 8998a2cf920796b399a4f25509694e9cad2c8490..cc80fcf6014e6e01ea29225d09545a634330c921 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -17,7 +17,7 @@
 # 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-2021 IPFire Team <info@ipfire.org>.                   #
+# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
@@ -26,7 +26,7 @@ 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.27"                                                 # Version number
-CORE="164"                                                     # Core Level (Filename)
+CORE="165"                                                     # Core Level (Filename)
 SLOGAN="www.ipfire.org"                                                # Software slogan
 CONFIG_ROOT=/var/ipfire                                                # Configuration rootdir
 MAX_RETRIES=1                                                  # prefetch/check loop
@@ -38,7 +38,7 @@ 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=20210701
+TOOLCHAINVER=20220203
 
 # use multicore and max compression
 ZSTD_OPT="-T0 --ultra -22"
@@ -145,35 +145,35 @@ configure_build() {
 
        case "${build_arch}" in
                x86_64)
-                       BUILDTARGET="${build_arch}-unknown-linux-gnu"
+                       BUILDTARGET="${build_arch}-pc-linux-gnu"
                        CROSSTARGET="${build_arch}-cross-linux-gnu"
                        BUILD_PLATFORM="x86"
                        CFLAGS_ARCH="-m64 -mtune=generic -fstack-clash-protection -fcf-protection"
                        ;;
 
                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"
                        ;;
 
                armv7hl)
-                       BUILDTARGET="${build_arch}-unknown-linux-gnueabi"
+                       BUILDTARGET="${build_arch}-pc-linux-gnueabi"
                        CROSSTARGET="${build_arch}-cross-linux-gnueabi"
                        BUILD_PLATFORM="arm"
                        CFLAGS_ARCH="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
                        ;;
 
                armv6l)
-                       BUILDTARGET="${build_arch}-unknown-linux-gnueabi"
+                       BUILDTARGET="${build_arch}-pc-linux-gnueabi"
                        CROSSTARGET="${build_arch}-cross-linux-gnueabi"
                        BUILD_PLATFORM="arm"
                        CFLAGS_ARCH="-march=armv6zk+fp -mfpu=vfp -mfloat-abi=softfp -fomit-frame-pointer"
                        ;;
 
                riscv64)
-                       BUILDTARGET="${build_arch}-unknown-linux-gnu"
+                       BUILDTARGET="${build_arch}-pc-linux-gnu"
                        CROSSTARGET="${build_arch}-cross-linux-gnu"
                        BUILD_PLATFORM="riscv"
                        CFLAGS_ARCH="-fstack-clash-protection"
@@ -554,7 +554,12 @@ 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" \
@@ -658,8 +663,15 @@ 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" \
+               PATH="${PATH}" \
                CCACHE_DIR="${CCACHE_DIR}"/${BUILD_ARCH}/${TOOLCHAINVER} \
                CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \
                CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
@@ -695,7 +707,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 &
@@ -1026,9 +1038,9 @@ buildtoolchain() {
        lfsmake1 libxcrypt
        lfsmake1 gcc                    PASS=L
        lfsmake1 zlib
-       lfsmake1 zstd
        lfsmake1 binutils                       PASS=2
        lfsmake1 gcc                    PASS=2
+       lfsmake1 zstd
        lfsmake1 ccache
        lfsmake1 tcl
        lfsmake1 expect
@@ -1057,7 +1069,7 @@ buildtoolchain() {
        lfsmake1 bison
        lfsmake1 flex
        lfsmake1 fake-environ
-       lfsmake1 strip
+       CUSTOM_PATH="${PATH}" lfsmake1 strip
        lfsmake1 cleanup-toolchain
 }
 
@@ -1184,10 +1196,8 @@ buildipfire() {
   lfsmake2 rtl8812au           KCFG=""
   lfsmake2 rtl8822bu           KCFG=""
   lfsmake2 xradio              KCFG=""
-  lfsmake2 xtables-addons      KCFG=""
   lfsmake2 linux-initrd                KCFG=""
 
-  lfsmake2 xtables-addons      USPACE="1"
   lfsmake2 libgpg-error
   lfsmake2 libgcrypt
   lfsmake2 libassuan
@@ -1298,6 +1308,7 @@ buildipfire() {
   lfsmake2 rust-pyo3-build-config
   lfsmake2 rust-pyo3-macros-backend
   lfsmake2 rust-pyo3-macros
+  lfsmake2 rust-pyo3
   lfsmake2 gdb
   lfsmake2 grub
   lfsmake2 efivar
@@ -1363,6 +1374,9 @@ buildipfire() {
   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
@@ -1387,6 +1401,8 @@ buildipfire() {
   lfsmake2 Digest-SHA1
   lfsmake2 Digest-HMAC
   lfsmake2 libwww-perl
+  lfsmake2 perl-LWP-Protocol-https
+  lfsmake2 perl-Net-HTTP
   lfsmake2 Net-DNS
   lfsmake2 Net-IPv4Addr
   lfsmake2 Net_SSLeay
@@ -1495,7 +1511,6 @@ buildipfire() {
   lfsmake2 rsync
   lfsmake2 rpcbind
   lfsmake2 keyutils
-  lfsmake2 libnfsidmap
   lfsmake2 nfs
   lfsmake2 gnu-netcat
   lfsmake2 ncat
@@ -1592,7 +1607,11 @@ buildipfire() {
   lfsmake2 wireless-regdb
   lfsmake2 libsolv
   lfsmake2 ddns
+  lfsmake2 python3-toml
+  lfsmake2 python3-pyproject2setuppy
+  lfsmake2 python3-tomli
   lfsmake2 python3-setuptools-scm
+  lfsmake2 python3-packaging
   lfsmake2 python3-six
   lfsmake2 python3-dateutil
   lfsmake2 python3-jmespath
@@ -1603,7 +1622,6 @@ buildipfire() {
   lfsmake2 python3-pyasn1
   lfsmake2 python3-urllib3
   lfsmake2 python3-botocore
-  lfsmake2 python3-msgpack
   lfsmake2 aws-cli
   lfsmake2 transmission
   lfsmake2 mtr
@@ -1684,6 +1702,7 @@ buildipfire() {
   lfsmake2 pmacct
   lfsmake2 squid-asnbl
   lfsmake2 qemu-ga
+       lfsmake2 gptfdisk
 }
 
 buildinstaller() {
@@ -1693,7 +1712,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() {
@@ -1701,7 +1720,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
@@ -1716,7 +1735,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
@@ -1788,7 +1807,7 @@ while [ $# -gt 0 ]; do
 done
 
 # See what we're supposed to do
-case "$1" in 
+case "$1" in
 build)
        START_TIME=$(now)
 
@@ -1827,7 +1846,7 @@ build)
 
        print_build_stage "Building packages"
        buildpackages
-       
+
        print_build_stage "Checking Logfiles for new Files"
 
        cd $BASEDIR
@@ -1892,7 +1911,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
@@ -2033,7 +2052,7 @@ find-dependencies)
        ;;
 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
@@ -2046,4 +2065,3 @@ check-manualpages)
        cat doc/make.sh-usage
        ;;
 esac
-