]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - make.sh
fuse: Update to 2.9.7
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 9289d810fcb49f9bb34f7d33677a6b1e56774c51..5ed4faa537d9b62757c977037e7865137c68a408 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-2016 IPFire Team <info@ipfire.org>.                   #
+# Copyright (C) 2007-2017 IPFire Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
@@ -25,8 +25,8 @@
 NAME="IPFire"                                                  # Software name
 SNAME="ipfire"                                                 # Short name
 VERSION="2.19"                                                 # Version number
-CORE="106"                                                     # Core Level (Filename)
-PAKFIRE_CORE="105"                                             # Core Level (PAKFIRE)
+CORE="110"                                                     # Core Level (Filename)
+PAKFIRE_CORE="110"                                             # Core Level (PAKFIRE)
 GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`                   # Git Branch
 SLOGAN="www.ipfire.org"                                                # Software slogan
 CONFIG_ROOT=/var/ipfire                                                # Configuration rootdir
@@ -39,8 +39,7 @@ GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8)        # Last commit
 TOOLCHAINVER=12
 
 # New architecture variables
-BUILD_ARCH="$(uname -m)"
-BUILDMACHINE="${BUILD_ARCH}"
+HOST_ARCH="$(uname -m)"
 
 # Debian specific settings
 if [ ! -e /etc/debian_version ]; then
@@ -69,10 +68,13 @@ if [ -f .config ]; then
        . .config
 fi
 
-if [ -n "${TARGET_ARCH}" ]; then
-       configure_target "${TARGET_ARCH}"
+if [ -n "${BUILD_ARCH}" ]; then
+       configure_build "${BUILD_ARCH}"
+elif [ -n "${TARGET_ARCH}" ]; then
+       configure_build "${TARGET_ARCH}"
+       unset TARGET_ARCH
 else
-       configure_target "default"
+       configure_build "default"
 fi
 
 if [ -z $EDITOR ]; then
@@ -221,13 +223,13 @@ prepareenv() {
     # Run LFS static binary creation scripts one by one
     export CCACHE_DIR=$BASEDIR/ccache
     export CCACHE_COMPRESS=1
-    export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER} ${TARGET_ARCH}"
+    export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER} ${BUILD_ARCH}"
 
     # Remove pre-install list of installed files in case user erase some files before rebuild
     rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null
 
     # Prepare string for /etc/system-release.
-    SYSTEM_RELEASE="${NAME} ${VERSION} (${MACHINE})"
+    SYSTEM_RELEASE="${NAME} ${VERSION} (${BUILD_ARCH})"
     if [ "$(git status -s | wc -l)" == "0" ]; then
        GIT_STATUS=""
     else
@@ -245,7 +247,7 @@ prepareenv() {
 
 buildtoolchain() {
     local error=false
-    case "${TARGET_ARCH}:${BUILD_ARCH}" in
+    case "${BUILD_ARCH}:${HOST_ARCH}" in
         # x86_64
         x86_64:x86_64)
              # This is working.
@@ -260,6 +262,10 @@ buildtoolchain() {
             ;;
 
         # ARM
+        arvm7hl:armv7hl|armv7hl:armv7l)
+            # These are working.
+            ;;
+
         armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv6l|armv5tel:armv7l|armv5tel:aarch64)
             # These are working.
             ;;
@@ -269,7 +275,7 @@ buildtoolchain() {
     esac
 
     ${error} && \
-        exiterror "Cannot build ${MACHINE} toolchain on $(uname -m). Please use the download if any."
+        exiterror "Cannot build ${BUILD_ARCH} toolchain on $(uname -m). Please use the download if any."
 
     local gcc=$(type -p gcc)
     if [ -z "${gcc}" ]; then
@@ -279,14 +285,12 @@ buildtoolchain() {
     LOGFILE="$BASEDIR/log/_build.toolchain.log"
     export LOGFILE
 
-    local ORG_PATH=$PATH
-    export PATH="/tools/ccache/bin:/tools/bin:$PATH"
+    lfsmake1 stage1
     lfsmake1 ccache                    PASS=1
     lfsmake1 binutils                  PASS=1
     lfsmake1 gcc                       PASS=1
-    lfsmake1 linux                     TOOLS=1 KCFG="-headers"
+    lfsmake1 linux                     KCFG="-headers"
     lfsmake1 glibc
-    lfsmake1 cleanup-toolchain         PASS=1
     lfsmake1 gcc                       PASS=L
     lfsmake1 binutils                  PASS=2
     lfsmake1 gcc                       PASS=2
@@ -315,8 +319,7 @@ buildtoolchain() {
     lfsmake1 texinfo
     lfsmake1 xz
     lfsmake1 fake-environ
-    lfsmake1 cleanup-toolchain         PASS=2
-    export PATH=$ORG_PATH
+    lfsmake1 cleanup-toolchain
 }
 
 buildbase() {
@@ -327,7 +330,7 @@ buildbase() {
     lfsmake2 man-pages
     lfsmake2 glibc
     lfsmake2 tzdata
-    lfsmake2 cleanup-toolchain         PASS=3
+    lfsmake2 cleanup-toolchain
     lfsmake2 zlib
     lfsmake2 binutils
     lfsmake2 gmp
@@ -386,13 +389,13 @@ buildbase() {
     lfsmake2 udev
     lfsmake2 vim
     lfsmake2 xz
-    lfsmake2 paxctl
 }
 
 buildipfire() {
   LOGFILE="$BASEDIR/log/_build.ipfire.log"
   export LOGFILE
   ipfiremake configroot
+  ipfiremake initscripts
   ipfiremake backup
   ipfiremake pkg-config
   ipfiremake libusb
@@ -425,7 +428,7 @@ buildipfire() {
   ipfiremake libnetfilter_cttimeout
   ipfiremake iptables
 
-  case "${TARGET_ARCH}" in
+  case "${BUILD_ARCH}" in
        x86_64)
                ipfiremake linux                        KCFG=""
                ipfiremake backports                    KCFG=""
@@ -483,16 +486,22 @@ buildipfire() {
   esac
   ipfiremake xtables-addons                    USPACE="1"
   ipfiremake openssl
-  [ "${TARGET_ARCH}" = "i586" ] && ipfiremake openssl KCFG='-sse2'
+  [ "${BUILD_ARCH}" = "i586" ] && ipfiremake openssl KCFG='-sse2'
   ipfiremake libgpg-error
   ipfiremake libgcrypt
   ipfiremake libassuan
+  ipfiremake nettle
+  ipfiremake libevent
+  ipfiremake libevent2
+  ipfiremake libevent2-compat
+  ipfiremake expat
+  ipfiremake unbound
+  ipfiremake gnutls
   ipfiremake bind
   ipfiremake dhcp
   ipfiremake dhcpcd
   ipfiremake boost
   ipfiremake linux-atm
-  ipfiremake expat
   ipfiremake gdbm
   ipfiremake pam
   ipfiremake curl
@@ -500,6 +509,7 @@ buildipfire() {
   ipfiremake sqlite
   ipfiremake libffi
   ipfiremake python
+  ipfiremake python3
   ipfiremake ca-certificates
   ipfiremake fireinfo
   ipfiremake libnet
@@ -508,6 +518,7 @@ buildipfire() {
   ipfiremake libidn
   ipfiremake nasm
   ipfiremake libjpeg
+  ipfiremake libjpeg-compat
   ipfiremake libexif
   ipfiremake libpng
   ipfiremake libtiff
@@ -537,10 +548,6 @@ buildipfire() {
   ipfiremake arping
   ipfiremake beep
   ipfiremake dvdrtools
-  ipfiremake nettle
-  ipfiremake libevent
-  ipfiremake libevent2
-  ipfiremake unbound
   ipfiremake dosfstools
   ipfiremake reiserfsprogs
   ipfiremake xfsprogs
@@ -560,7 +567,6 @@ buildipfire() {
   ipfiremake hdparm
   ipfiremake sdparm
   ipfiremake mtools
-  ipfiremake initscripts
   ipfiremake whatmask
   ipfiremake conntrack-tools
   ipfiremake libupnp
@@ -643,8 +649,15 @@ buildipfire() {
   ipfiremake pammysql
   ipfiremake mpage
   ipfiremake dbus
+  ipfiremake intltool
+  ipfiremake libdaemon
   ipfiremake cups
   ipfiremake ghostscript
+  ipfiremake lcms2
+  ipfiremake qpdf
+  ipfiremake poppler
+  ipfiremake cups-filters
+  ipfiremake epson-inkjet-printer-escpr
   ipfiremake foomatic
   ipfiremake hplip
   ipfiremake cifs-utils
@@ -809,7 +822,6 @@ buildipfire() {
   ipfiremake python-lzma
   ipfiremake python-progressbar
   ipfiremake python-xattr
-  ipfiremake intltool
   ipfiremake ddns
   ipfiremake transmission
   ipfiremake dpfhack
@@ -828,12 +840,12 @@ buildipfire() {
   ipfiremake libstatgrab
   ipfiremake sarg
   ipfiremake check_mk_agent
-  ipfiremake libdaemon
-  ipfiremake avahi
   ipfiremake nginx
   ipfiremake sendEmail
   ipfiremake sysbench
   ipfiremake strace
+  ipfiremake elfutils
+  ipfiremake ltrace
   ipfiremake ipfire-netboot
   ipfiremake lcdproc
   ipfiremake bitstream
@@ -874,6 +886,7 @@ buildipfire() {
   ipfiremake libpciaccess
   ipfiremake libyajl
   ipfiremake libvirt
+  ipfiremake python3-libvirt
   ipfiremake freeradius
   ipfiremake perl-common-sense
   ipfiremake perl-inotify2
@@ -936,7 +949,7 @@ buildpackages() {
   cd $BASEDIR
 
   # remove not useable iso on armv5tel (needed to build flash images)
-  [ "${TARGET_ARCH}" = "armv5tel" ] && rm -rf *.iso
+  [ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso
 
   for i in `ls *.bz2 *.img.gz *.iso`; do
        md5sum $i > $i.md5
@@ -967,7 +980,7 @@ ipfirepackages() {
        ipfiremake core-updates
 
        local i
-       for i in $(find $BASEDIR/config/rootfiles/packages{/${MACHINE},} -maxdepth 1 -type f); do
+       for i in $(find $BASEDIR/config/rootfiles/packages{/${BUILD_ARCH},} -maxdepth 1 -type f); do
                i=$(basename ${i})
                if [ -e $BASEDIR/lfs/$i ]; then
                        ipfiredist $i
@@ -1001,9 +1014,9 @@ done
 case "$1" in 
 build)
        clear
-       PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$MACHINE.tar.gz 2> /dev/null | head -n 1`
+       PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz 2> /dev/null | head -n 1`
        #only restore on a clean disk
-       if [ ! -f log/cleanup-toolchain-2-tools ]; then
+       if [ ! -e "${BASEDIR}/build/tools/.toolchain-successful" ]; then
                if [ ! -n "$PACKAGE" ]; then
                        beautify build_stage "Full toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
                        prepareenv
@@ -1095,7 +1108,7 @@ downloadsrc)
                        if [ -f "$i" -a "$i" != "Config" ]; then
                                lfsmakecommoncheck ${i} || continue
 
-                               make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+                               make -s -f $i LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \
                                        MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
                                if [ $? -ne 0 ]; then
                                        beautify message FAIL
@@ -1113,7 +1126,7 @@ downloadsrc)
        for i in *; do
                if [ -f "$i" -a "$i" != "Config" ]; then
                        lfsmakecommoncheck ${i} > /dev/null || continue
-                       make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+                       make -s -f $i LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \
                                MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
                        if [ $? -ne 0 ]; then
                                echo -ne "MD5 difference in lfs/$i"
@@ -1136,25 +1149,25 @@ toolchain)
        prepareenv
        beautify build_stage "Toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
        buildtoolchain
-       echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for $MACHINE" | tee -a $LOGFILE
+       echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for ${BUILD_ARCH}" | tee -a $LOGFILE
        test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
-       cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$MACHINE.tar.gz \
+       cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz \
                build/tools build/bin/sh log >> $LOGFILE
-       md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$MACHINE.tar.gz \
-               > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$MACHINE.md5
+       md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz \
+               > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
        stdumount
        ;;
 gettoolchain)
        # arbitrary name to be updated in case of new toolchain package upload
-       PACKAGE=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$MACHINE
+       PACKAGE=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}
        if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.gz ]; 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 tar.gz for $MACHINE" | tee -a $LOGFILE
+               echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for ${BUILD_ARCH}" | tee -a $LOGFILE
                cd $BASEDIR/cache/toolchains
                wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.gz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null
                if [ $? -ne 0 ]; then
-                       echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for $MACHINE machine" | tee -a $LOGFILE
+                       echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for ${BUILD_ARCH} machine" | tee -a $LOGFILE
                else
                        if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
                                echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
@@ -1168,11 +1181,11 @@ gettoolchain)
        ;;
 othersrc)
        prepareenv
-       echo -ne "`date -u '+%b %e %T'`: Build sources iso for $MACHINE" | tee -a $LOGFILE
+       echo -ne "`date -u '+%b %e %T'`: Build sources iso for ${BUILD_ARCH}" | tee -a $LOGFILE
        chroot $LFS /tools/bin/env -i   HOME=/root \
        TERM=$TERM PS1='\u:\w\$ ' \
        PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
-       VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" MACHINE=$MACHINE \
+       VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" BUILD_ARCH="${BUILD_ARCH}" \
        /bin/bash -x -c "cd /usr/src/lfs && make -f sources-iso LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
        mv $LFS/install/images/ipfire-* $BASEDIR >> $LOGFILE 2>&1
        if [ $? -eq "0" ]; then