# 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-2017 IPFire Team <info@ipfire.org>. #
+# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org>. #
# #
############################################################################
#
NAME="IPFire" # Software name
SNAME="ipfire" # Short name
-VERSION="2.19" # Version number
-CORE="117" # Core Level (Filename)
-PAKFIRE_CORE="116" # Core Level (PAKFIRE)
+VERSION="2.21" # Version number
+CORE="127" # Core Level (Filename)
+PAKFIRE_CORE="126" # 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
GIT_TAG=$(git tag | tail -1) # Git Tag
GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit
-TOOLCHAINVER=20171121
+TOOLCHAINVER=20181030
###############################################################################
#
#
###############################################################################
-## Screen Dimentions
-# Find current screen size
-if [ -z "${COLUMNS}" ]; then
- COLUMNS=$(stty size)
- COLUMNS=${COLUMNS##* }
+# Remember if the shell is interactive or not
+if [ -t 0 ] && [ -t 1 ]; then
+ INTERACTIVE=true
+else
+ INTERACTIVE=false
fi
-# When using remote connections, such as a serial port, stty size returns 0
-if [ "${COLUMNS}" = "0" ]; then
- COLUMNS=80
-fi
+# Sets or adjusts pretty formatting variables
+resize_terminal() {
+ ## Screen Dimentions
+ # Find current screen size
+ COLUMNS=$(tput cols)
+
+ # When using remote connections, such as a serial port, stty size returns 0
+ if ! ${INTERACTIVE} || [ "${COLUMNS}" = "0" ]; then
+ COLUMNS=80
+ fi
+
+ # Measurements for positioning result messages
+ OPTIONS_WIDTH=20
+ TIME_WIDTH=12
+ STATUS_WIDTH=8
+ NAME_WIDTH=$(( COLUMNS - OPTIONS_WIDTH - TIME_WIDTH - STATUS_WIDTH ))
+ LINE_WIDTH=$(( COLUMNS - STATUS_WIDTH ))
+
+ TIME_COL=$(( NAME_WIDTH + OPTIONS_WIDTH ))
+ STATUS_COL=$(( TIME_COL + TIME_WIDTH ))
+}
-## Measurements for positioning result messages
-RESULT_WIDTH=4
-TIME_WIDTH=8
-OPT_WIDTH=6
-VER_WIDTH=10
-RESULT_COL=$((${COLUMNS} - $RESULT_WIDTH - 4))
-TIME_COL=$((${RESULT_COL} - $TIME_WIDTH - 5))
-OPT_COL=$((${TIME_COL} - $OPT_WIDTH - 5))
-VER_COL=$((${OPT_COL} - $VER_WIDTH - 5))
-
-## Set Cursur Position Commands, used via echo -e
-SET_RESULT_COL="\\033[${RESULT_COL}G"
-SET_TIME_COL="\\033[${TIME_COL}G"
-SET_OPT_COL="\\033[${OPT_COL}G"
-SET_VER_COL="\\033[${VER_COL}G"
+# Initially setup terminal
+resize_terminal
+
+# Call resize_terminal when terminal is being resized
+trap "resize_terminal" WINCH
# Define color for messages
BOLD="\\033[1;39m"
BUILDTARGET="${build_arch}-unknown-linux-gnu"
CROSSTARGET="${build_arch}-cross-linux-gnu"
BUILD_PLATFORM="x86"
- CFLAGS_ARCH="-m64 -mtune=generic"
+ CFLAGS_ARCH="-m64 -mindirect-branch=thunk -mfunction-return=thunk -mtune=generic"
;;
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="-march=i586 -mindirect-branch=thunk -mfunction-return=thunk -mtune=generic -fomit-frame-pointer"
;;
aarch64)
TOOLS_DIR="/tools_${BUILD_ARCH}"
# Enables hardening
- HARDENING_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4"
+ HARDENING_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong"
CFLAGS="-O2 -pipe -Wall -fexceptions -fPIC ${CFLAGS_ARCH}"
CXXFLAGS="${CFLAGS}"
local mem_max=$(( ${HOST_MEM} / 192 ))
local processors="$(system_processors)"
- local cpu_max=$(( ${processors} * 2 ))
+ local cpu_max=$(( ${processors} + 1 ))
local parallelism
if [ ${mem_max} -lt ${cpu_max} ]; then
parallelism=${cpu_max}
fi
+ # limit to -j23 because perl will not build
+ # more
+ if [ ${parallelism} -gt 23 ]; then
+ parallelism=23
+ fi
+
MAKETUNING="-j${parallelism}"
fi
+
+ # Compression parameters
+ # We use mode 8 for reasonable memory usage when decompressing
+ # but with overall good compression
+ XZ_OPT="-8"
+
+ # We try to use as many cores as possible
+ XZ_OPT="${XZ_OPT} -T0"
+
+ # We need to limit memory because XZ uses too much when running
+ # in parallel and it isn't very smart in limiting itself.
+ # We allow XZ to use up to 70% of all system memory.
+ local xz_memory=$(( HOST_MEM * 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"
}
configure_build_guess() {
case "${HOST_ARCH}" in
- x86_64|i686|i586)
+ x86_64)
+ echo "x86_64"
+ ;;
+ i?86)
echo "i586"
;;
esac
}
-evaluate() {
- if [ "$?" -eq "0" ]; then
- beautify message DONE
- else
- EXITCODE=$1
- shift 1
- beautify message FAIL
- $*
- if [ $EXITCODE -ne "0" ]; then
- exit $EXITCODE
- fi
- fi
+stdumount() {
+ umount $BASEDIR/build/sys 2>/dev/null;
+ umount $BASEDIR/build/dev/shm 2>/dev/null;
+ umount $BASEDIR/build/dev/pts 2>/dev/null;
+ umount $BASEDIR/build/dev 2>/dev/null;
+ umount $BASEDIR/build/proc 2>/dev/null;
+ umount $BASEDIR/build/install/mnt 2>/dev/null;
+ umount $BASEDIR/build/usr/src/cache 2>/dev/null;
+ umount $BASEDIR/build/usr/src/ccache 2>/dev/null;
+ umount $BASEDIR/build/usr/src/config 2>/dev/null;
+ umount $BASEDIR/build/usr/src/doc 2>/dev/null;
+ umount $BASEDIR/build/usr/src/html 2>/dev/null;
+ umount $BASEDIR/build/usr/src/langs 2>/dev/null;
+ umount $BASEDIR/build/usr/src/lfs 2>/dev/null;
+ umount $BASEDIR/build/usr/src/log 2>/dev/null;
+ umount $BASEDIR/build/usr/src/src 2>/dev/null;
}
-position_cursor() {
- # ARG1=starting position on screen
- # ARG2=string to be printed
- # ARG3=offset, negative for left movement, positive for right movement, relative to ARG1
- # For example if your starting position is column 50 and you want to print Hello three columns to the right
- # of your starting position, your call will look like this:
- # position_cursor 50 "Hello" 3 (you'll get the string Hello at position 53 (= 50 + 3)
- # If on the other hand you want your string "Hello" to end three columns to the left of position 50,
- # your call will look like this:
- # position_cursor 50 "Hello" -3 (you'll get the string Hello at position 42 (= 50 - 5 -3)
- # If you want to start printing at the exact starting location, use offset 0
-
- START=$1
- STRING=$2
- OFFSET=$3
-
- STRING_LENGTH=${#STRING}
-
- if [ ${OFFSET} -lt 0 ]; then
- COL=$((${START} + ${OFFSET} - ${STRING_LENGTH}))
+now() {
+ date -u "+%s"
+}
+
+format_runtime() {
+ local seconds=${1}
+
+ if [ ${seconds} -ge 3600 ]; then
+ printf "%d:%02d:%02d\n" \
+ "$(( seconds / 3600 ))" \
+ "$(( seconds % 3600 / 60 ))" \
+ "$(( seconds % 3600 % 60 ))"
+ elif [ ${seconds} -ge 60 ]; then
+ printf "%d:%02d\n" \
+ "$(( seconds / 60 ))" \
+ "$(( seconds % 60 ))"
else
- COL=$((${START} + ${OFFSET}))
+ printf "%d\n" "${seconds}"
fi
+}
- SET_COL="\\033[${COL}G"
+print_line() {
+ local line="$@"
- echo $SET_COL
+ printf "%-${LINE_WIDTH}s" "${line}"
}
-beautify() {
- # Commands: build_stage, make_pkg, message, result
- case "$1" in
- message)
- case "$2" in
- DONE)
- echo -ne "${SET_RESULT_COL}[${DONE} DONE ${NORMAL}]\n"
- ;;
- WARN)
- echo -ne "${WARN}${3}${NORMAL}${SET_RESULT_COL}[${WARN} WARN ${NORMAL}]\n"
- ;;
- FAIL)
- echo -ne "${SET_RESULT_COL}[${FAIL} FAIL ${NORMAL}]\n"
- ;;
- SKIP)
- echo -ne "${SET_RESULT_COL}[${SKIP} SKIP ${NORMAL}]\n"
- ;;
- esac
- ;;
- build_stage)
- MESSAGE=$2
- if [ "$STAGE_TIME_START" ]; then
- LAST_STAGE_TIME=$[ `date +%s` - $STAGE_TIME_START ]
- fi
- STAGE_TIME_START=`date +%s`
- echo -ne "${BOLD}*** (${BUILD_ARCH}) ${MESSAGE}${NORMAL}"
- if [ "$LAST_STAGE_TIME" ]; then
- echo -ne "${DONE} (Last stage took $LAST_STAGE_TIME secs)${NORMAL}\n"
- fi
- echo -ne "${BOLD}${SET_VER_COL} version${SET_OPT_COL} options${SET_TIME_COL} time (sec)${SET_RESULT_COL} status${NORMAL}\n"
- ;;
- build_start)
- BUILD_TIME_START=`date +%s`
- ;;
- build_end)
- BUILD_TIME_END=`date +%s`
- seconds=$[ $BUILD_TIME_END - $BUILD_TIME_START ]
- hours=$((seconds / 3600))
- seconds=$((seconds % 3600))
- minutes=$((seconds / 60))
- seconds=$((seconds % 60))
-
- echo -ne "${DONE}***Build is finished now and took $hours hour(s) $minutes minute(s) $seconds second(s)!${NORMAL}\n"
- ;;
- make_pkg)
- echo "$2" | while read PKG_VER PROGRAM OPTIONS
- do
- SET_VER_COL_REAL=`position_cursor $OPT_COL $PKG_VER -3`
-
- if [ "$OPTIONS" == "" ]; then
- echo -ne "${PROGRAM}${SET_VER_COL}[ ${BOLD}${SET_VER_COL_REAL}${PKG_VER}"
- echo -ne "${NORMAL} ]${SET_RESULT_COL}"
- else
- echo -ne "${PROGRAM}${SET_VER_COL}[ ${BOLD}${SET_VER_COL_REAL}${PKG_VER}"
- echo -ne "${NORMAL} ]${SET_OPT_COL}[ ${BOLD}${OPTIONS}"
- echo -ne "${NORMAL} ]${SET_RESULT_COL}"
- fi
- done
- ;;
- result)
- RESULT=$2
+_print_line() {
+ local status="${1}"
+ shift
- if [ ! $3 ]; then
- PKG_TIME=0
- else
- PKG_TIME=$3
- fi
+ if ${INTERACTIVE}; then
+ printf "${!status}"
+ fi
- SET_TIME_COL_REAL=`position_cursor $RESULT_COL $PKG_TIME -3`
- case "$RESULT" in
- DONE)
- echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
- echo -ne "${SET_RESULT_COL}[${DONE} DONE ${NORMAL}]\n"
- ;;
- FAIL)
- echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
- echo -ne "${SET_RESULT_COL}[${FAIL} FAIL ${NORMAL}]\n"
- ;;
- SKIP)
- echo -ne "${SET_RESULT_COL}[${SKIP} SKIP ${NORMAL}]\n"
- ;;
- esac
- ;;
- esac
+ print_line "$@"
+
+ if ${INTERACTIVE}; then
+ printf "${NORMAL}"
+ fi
+}
+
+print_headline() {
+ _print_line BOLD "$@"
+}
+
+print_error() {
+ _print_line FAIL "$@"
}
-get_pkg_ver() {
- PKG_VER=`grep -E "^VER |^VER=|^VER " $1 | awk '{print $3}'`
+print_package() {
+ local name="${1}"
+ shift
+
+ local version="$(grep -E "^VER |^VER=|^VER " $BASEDIR/lfs/${name} | awk '{ print $3 }')"
+ local options="$@"
- if [ -z $PKG_VER ]; then
- PKG_VER=`grep "Exp " $1 | awk '{print $4}'`
+ local string="${name}"
+ if [ -n "${version}" ] && [ "${version}" != "ipfire" ]; then
+ string="${string} (${version})"
fi
- if [ -z $PKG_VER ]; then
- PKG_VER="?"
+
+ printf "%-$(( ${NAME_WIDTH} - 1 ))s " "${string}"
+ printf "%$(( ${OPTIONS_WIDTH} - 1 ))s " "${options}"
+}
+
+print_runtime() {
+ local runtime=$(format_runtime $@)
+
+ if ${INTERACTIVE}; then
+ printf "\\033[${TIME_COL}G[ ${BOLD}%$(( ${TIME_WIDTH} - 4 ))s${NORMAL} ]" "${runtime}"
+ else
+ printf "[ %$(( ${TIME_WIDTH} - 4 ))s ]" "${runtime}"
fi
- if [ ${#PKG_VER} -gt $VER_WIDTH ]; then
- # If a package version number is greater than $VER_WIDTH, we keep the first 4 characters
- # and replace enough characters to fit the resulting string on the screen. We'll replace
- # the extra character with .. (two dots). That's why the "+ 2" in the formula below.
- # Example: if we have a 21-long version number that we want to fit into a 10-long space,
- # we have to remove 11 characters. But if we replace 11 characters with 2 characters, we'll
- # end up with a 12-character long string. That's why we replace 12 characters with ..
- REMOVE=`expr substr "$PKG_VER" 4 $[ ${#PKG_VER} - $VER_WIDTH + 2 ]`
- PKG_VER=`echo ${PKG_VER/$REMOVE/..}`
+}
+
+print_status() {
+ local status="${1}"
+
+ local color="${!status}"
+
+ if ${INTERACTIVE}; then
+ printf "\\033[${STATUS_COL}G[${color-${BOLD}} %-$(( ${STATUS_WIDTH} - 4 ))s ${NORMAL}]\n" "${status}"
+ else
+ printf "[ %-$(( ${STATUS_WIDTH} - 4 ))s ]\n" "${status}"
fi
+}
+
+print_build_stage() {
+ print_headline "$@"
- echo "$PKG_VER"
+ # end line
+ printf "\n"
}
-stdumount() {
- umount $BASEDIR/build/sys 2>/dev/null;
- umount $BASEDIR/build/dev/shm 2>/dev/null;
- umount $BASEDIR/build/dev/pts 2>/dev/null;
- umount $BASEDIR/build/dev 2>/dev/null;
- umount $BASEDIR/build/proc 2>/dev/null;
- umount $BASEDIR/build/install/mnt 2>/dev/null;
- umount $BASEDIR/build/usr/src/cache 2>/dev/null;
- umount $BASEDIR/build/usr/src/ccache 2>/dev/null;
- umount $BASEDIR/build/usr/src/config 2>/dev/null;
- umount $BASEDIR/build/usr/src/doc 2>/dev/null;
- umount $BASEDIR/build/usr/src/html 2>/dev/null;
- umount $BASEDIR/build/usr/src/langs 2>/dev/null;
- umount $BASEDIR/build/usr/src/lfs 2>/dev/null;
- umount $BASEDIR/build/usr/src/log 2>/dev/null;
- umount $BASEDIR/build/usr/src/src 2>/dev/null;
+print_build_summary() {
+ local runtime=$(format_runtime $@)
+
+ print_line "*** Build finished in ${runtime}"
+ print_status DONE
}
exiterror() {
fi;
done
- if [ -n "${LOGFILE}" ]; then
+ # Dump logfile
+ if [ -n "${LOGFILE}" ] && [ -e "${LOGFILE}" ]; then
echo # empty line
local line
done <<< "$(tail -n30 ${LOGFILE})"
fi
- echo -e "\nERROR: $*"
- echo " Check $LOGFILE for errors if applicable"
+ echo # empty line
+
+ local line
+ for line in "ERROR: $@" " Check ${LOGFILE} for errors if applicable"; do
+ print_error "${line}"
+ print_status FAIL
+ done
+
exit 1
}
prepareenv() {
# Are we running the right shell?
- if [ ! -z "${BASH}" ]; then
+ if [ -z "${BASH}" ]; then
exiterror "BASH environment variable is not set. You're probably running the wrong shell."
fi
trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGKILL SIGSTOP SIGQUIT
# Resetting our nice level
- echo -ne "Resetting our nice level to $NICE" | tee -a $LOGFILE
- renice $NICE $$ > /dev/null
- if [ `nice` != "$NICE" ]; then
- beautify message FAIL
- exiterror "Failed to set correct nice level"
- else
- beautify message DONE
+ if ! renice ${NICE} $$ >/dev/null; then
+ exiterror "Failed to set nice level to ${NICE}"
fi
# Checking if running as root user
- echo -ne "Checking if we're running as root user" | tee -a $LOGFILE
- if [ `id -u` != 0 ]; then
- beautify message FAIL
- exiterror "Not building as root"
- else
- beautify message DONE
+ if [ $(id -u) -ne 0 ]; then
+ exiterror "root privileges required for building"
fi
# Checking for necessary temporary space
- echo -ne "Checking for necessary space on disk $BASE_DEV" | tee -a $LOGFILE
+ print_line "Checking for necessary space on disk $BASE_DEV"
BASE_DEV=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $1 }'`
BASE_ASPACE=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $4 }'`
if (( 2048000 > $BASE_ASPACE )); then
BASE_USPACE=`du -skx $BASEDIR | awk '{print $1}'`
if (( 2048000 - $BASE_USPACE > $BASE_ASPACE )); then
- beautify message FAIL
+ print_status FAIL
exiterror "Not enough temporary space available, need at least 2GB on $BASE_DEV"
fi
else
- beautify message DONE
+ print_status DONE
fi
# Set umask
# Set LFS Directory
LFS=$BASEDIR/build
- # Check ${TOOLS_DIR} symlink
- if [ -h "${TOOLS_DIR}" ]; then
- rm -f "${TOOLS_DIR}"
- fi
-
- if [ ! -e "${TOOLS_DIR}" ]; then
- ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}"
- fi
-
- if [ ! -h "${TOOLS_DIR}" ]; then
- exiterror "Could not create ${TOOLS_DIR} symbolic link"
- fi
-
# Setup environment
set +h
LC_ALL=POSIX
CCACHE_COMPRESS="${CCACHE_COMPRESS}" \
CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
KVER="${KVER}" \
+ XZ_OPT="${XZ_OPT}" \
$(fake_environ) \
$(qemu_environ) \
"$@"
fi
echo "Entering to a shell inside LFS chroot, go out with exit"
- local PS1="ipfire build chroot ($(uname -m)) \u:\w\$ "
+ local PS1="ipfire build chroot (${BUILD_ARCH}) \u:\w\$ "
if enterchroot bash -i; then
stdumount
else
- beautify message FAIL
+ print_status FAIL
exiterror "chroot error"
fi
}
exiterror "No such file or directory: $BASEDIR/$1"
fi
- local PKG_VER=`get_pkg_ver $BASEDIR/lfs/$1`
- beautify make_pkg "$PKG_VER $*"
+ # Print package name and version
+ print_package $@
# Check if this package is supported by our architecture.
# If no SUP_ARCH is found, we assume the package can be built for all.
if grep "^SUP_ARCH" ${BASEDIR}/lfs/${1} >/dev/null; then
# Check if package supports ${BUILD_ARCH} or all architectures.
if ! grep -E "^SUP_ARCH.*${BUILD_ARCH}|^SUP_ARCH.*all" ${BASEDIR}/lfs/${1} >/dev/null; then
- beautify result SKIP
+ print_runtime 0
+ print_status SKIP
return 1
fi
fi
for i in $SKIP_PACKAGE_LIST
do
if [ "$i" == "$1" ]; then
- beautify result SKIP
+ print_status SKIP
return 1;
fi
done
lfsmakecommoncheck $*
[ $? == 1 ] && return 0
- local PKG_TIME_START=`date +%s`
-
cd $BASEDIR/lfs && env -i \
PATH="${TOOLS_DIR}/ccache/bin:${TOOLS_DIR}/bin:$PATH" \
CCACHE_DIR="${CCACHE_DIR}" \
LFS_BASEDIR="${BASEDIR}" \
ROOT="${LFS}" \
KVER="${KVER}" \
- install >> $LOGFILE 2>&1
-
- local COMPILE_SUCCESS=$?
- local PKG_TIME_END=`date +%s`
+ install >> $LOGFILE 2>&1 &
- if [ $COMPILE_SUCCESS -ne 0 ]; then
- beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
- exiterror "Building $*";
- else
- beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
+ if ! wait_until_finished $!; then
+ print_status FAIL
+ exiterror "Building $*"
fi
- return 0
+ print_status DONE
}
lfsmake2() {
lfsmakecommoncheck $*
[ $? == 1 ] && return 0
- local PKG_TIME_START=`date +%s`
local PS1='\u:\w$ '
enterchroot \
- bash -x -c "cd /usr/src/lfs && \
+ ${EXTRA_PATH}bash -x -c "cd /usr/src/lfs && \
MAKETUNING=${MAKETUNING} \
make -f $* \
LFS_BASEDIR=/usr/src install" \
- >> ${LOGFILE} 2>&1
-
- local COMPILE_SUCCESS=$?
- local PKG_TIME_END=`date +%s`
+ >> ${LOGFILE} 2>&1 &
- if [ $COMPILE_SUCCESS -ne 0 ]; then
- beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
- exiterror "Building $*";
- else
- beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
+ if ! wait_until_finished $!; then
+ print_status FAIL
+ exiterror "Building $*"
fi
- return 0
+ print_status DONE
}
ipfiredist() {
lfsmakecommoncheck $*
[ $? == 1 ] && return 0
- local PKG_TIME_START=`date +%s`
local PS1='\u:\w$ '
enterchroot \
bash -x -c "cd /usr/src/lfs && make -f $* LFS_BASEDIR=/usr/src dist" \
- >> ${LOGFILE} 2>&1
+ >> ${LOGFILE} 2>&1 &
+
+ if ! wait_until_finished $!; then
+ print_status FAIL
+ exiterror "Packaging $*"
+ fi
- local COMPILE_SUCCESS=$?
- local PKG_TIME_END=`date +%s`
+ print_status DONE
+}
- if [ $COMPILE_SUCCESS -ne 0 ]; then
- beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
- exiterror "Packaging $*";
- else
- beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
+wait_until_finished() {
+ local pid=${1}
+
+ local start_time=$(now)
+
+ # Show progress
+ if ${INTERACTIVE}; then
+ # Wait a little just in case the process
+ # has finished very quickly.
+ sleep 0.1
+
+ local runtime
+ while kill -0 ${pid} 2>/dev/null; do
+ print_runtime $(( $(now) - ${start_time} ))
+
+ # Wait a little
+ sleep 1
+ done
fi
- return 0
+
+ # Returns the exit code of the child process
+ wait ${pid}
+ local ret=$?
+
+ if ! ${INTERACTIVE}; then
+ print_runtime $(( $(now) - ${start_time} ))
+ fi
+
+ return ${ret}
}
fake_environ() {
done | sort -u > "${path}/LINGUAS"
}
+contributors() {
+ local commits name
+
+ git shortlog --summary --numbered | while read -r commits name; do
+ echo "${name}"
+ done | grep -vE -e "^(alpha197|morlix|root|ummeegge)$" -e "via Development$" -e "@" -e "#$"
+}
+
+update_contributors() {
+ echo -n "Updating list of contributors"
+
+ local contributors="$(contributors | paste -sd , - | sed -e "s/,/&\\\\n/g")"
+
+ # Edit contributors into credits.cgi
+ awk -i inplace \
+ "/<!-- CONTRIBUTORS -->/{ p=1; print; printf \"${contributors}\n\"}/<!-- END -->/{ p=0 } !p" \
+ "${BASEDIR}/html/cgi-bin/credits.cgi"
+
+ print_status DONE
+ return 0
+}
+
# Load configuration file
if [ -f .config ]; then
. .config
exiterror "Could not find GCC. You will need a working build enviroment in order to build the toolchain."
fi
+ # Check ${TOOLS_DIR} symlink
+ if [ -h "${TOOLS_DIR}" ]; then
+ rm -f "${TOOLS_DIR}"
+ fi
+
+ if [ ! -e "${TOOLS_DIR}" ]; then
+ ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}"
+ fi
+
+ if [ ! -h "${TOOLS_DIR}" ]; then
+ exiterror "Could not create ${TOOLS_DIR} symbolic link"
+ fi
+
LOGFILE="$BASEDIR/log/_build.toolchain.log"
export LOGFILE
lfsmake1 gcc PASS=L
lfsmake1 binutils PASS=2
lfsmake1 gcc PASS=2
+ lfsmake1 zlib
lfsmake1 ccache PASS=2
lfsmake1 tcl
lfsmake1 expect
lfsmake1 tar
lfsmake1 texinfo
lfsmake1 xz
+ lfsmake1 bison
+ lfsmake1 flex
lfsmake1 fake-environ
+ lfsmake1 strip
lfsmake1 cleanup-toolchain
}
lfsmake2 iana-etc
lfsmake2 m4
lfsmake2 bison
- lfsmake2 ncurses-compat
lfsmake2 ncurses
lfsmake2 procps
lfsmake2 libtool
lfsmake2 readline
lfsmake2 readline-compat
lfsmake2 bzip2
+ lfsmake2 xz
lfsmake2 pcre
lfsmake2 pcre-compat
lfsmake2 bash
lfsmake2 jwhois
lfsmake2 kbd
lfsmake2 less
+ lfsmake2 pkg-config
lfsmake2 make
lfsmake2 man
lfsmake2 kmod
lfsmake2 util-linux
lfsmake2 udev
lfsmake2 vim
- lfsmake2 xz
- lfsmake2 paxctl
}
buildipfire() {
lfsmake2 configroot
lfsmake2 initscripts
lfsmake2 backup
- lfsmake2 pkg-config
+ lfsmake2 openssl
+ [ "${BUILD_ARCH}" = "i586" ] && lfsmake2 openssl KCFG='-sse2'
+ lfsmake2 openssl-compat
+ lfsmake2 popt
lfsmake2 libusb
lfsmake2 libusb-compat
lfsmake2 libpcap
lfsmake2 unzip
lfsmake2 which
lfsmake2 linux-firmware
- lfsmake2 ath10k-firmware
lfsmake2 dvb-firmwares
- lfsmake2 mt7601u-firmware
+ lfsmake2 xr819-firmware
lfsmake2 zd1211-firmware
lfsmake2 rpi-firmware
lfsmake2 bc
- lfsmake2 u-boot
+ lfsmake2 u-boot MKIMAGE=1
lfsmake2 cpio
lfsmake2 mdadm
lfsmake2 dracut
+ lfsmake2 libaio
lfsmake2 lvm2
lfsmake2 multipath-tools
lfsmake2 freetype
lfsmake2 grub
+ lfsmake2 efivar
+ lfsmake2 efibootmgr
lfsmake2 libmnl
lfsmake2 libnfnetlink
lfsmake2 libnetfilter_queue
lfsmake2 libnetfilter_cthelper
lfsmake2 libnetfilter_cttimeout
lfsmake2 iptables
+ lfsmake2 screen
+ lfsmake2 elfutils
case "${BUILD_ARCH}" in
- x86_64)
+ x86_64|aarch64)
lfsmake2 linux KCFG=""
- lfsmake2 backports KCFG=""
- lfsmake2 e1000e KCFG=""
- lfsmake2 igb KCFG=""
- lfsmake2 ixgbe KCFG=""
+# lfsmake2 backports KCFG=""
+# lfsmake2 e1000e KCFG=""
+# lfsmake2 igb KCFG=""
+# lfsmake2 ixgbe KCFG=""
lfsmake2 xtables-addons KCFG=""
lfsmake2 linux-initrd KCFG=""
;;
i586)
# x86-pae (Native and new XEN) kernel build
lfsmake2 linux KCFG="-pae"
- lfsmake2 backports KCFG="-pae"
- lfsmake2 e1000e KCFG="-pae"
- lfsmake2 igb KCFG="-pae"
- lfsmake2 ixgbe KCFG="-pae"
+# lfsmake2 backports KCFG="-pae"
+# lfsmake2 e1000e KCFG="-pae"
+# lfsmake2 igb KCFG="-pae"
+# lfsmake2 ixgbe KCFG="-pae"
lfsmake2 xtables-addons KCFG="-pae"
lfsmake2 linux-initrd KCFG="-pae"
# x86 kernel build
lfsmake2 linux KCFG=""
- lfsmake2 backports KCFG=""
- lfsmake2 e1000e KCFG=""
- lfsmake2 igb KCFG=""
- lfsmake2 ixgbe KCFG=""
+# lfsmake2 backports KCFG=""
+# lfsmake2 e1000e KCFG=""
+# lfsmake2 igb KCFG=""
+# lfsmake2 ixgbe KCFG=""
lfsmake2 xtables-addons KCFG=""
lfsmake2 linux-initrd KCFG=""
;;
armv5tel)
- # arm-rpi (Raspberry Pi) kernel build
- lfsmake2 linux KCFG="-rpi"
- lfsmake2 backports KCFG="-rpi"
- lfsmake2 xtables-addons KCFG="-rpi"
- lfsmake2 linux-initrd KCFG="-rpi"
+ # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build
+ lfsmake2 linux KCFG="-kirkwood"
+# lfsmake2 backports KCFG="-kirkwood"
+# lfsmake2 e1000e KCFG="-kirkwood"
+# lfsmake2 igb KCFG="-kirkwood"
+# lfsmake2 ixgbe KCFG="-kirkwood"
+ lfsmake2 xtables-addons KCFG="-kirkwood"
+ lfsmake2 linux-initrd KCFG="-kirkwood"
# 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 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"
-
- # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build
- lfsmake2 linux KCFG="-kirkwood"
- lfsmake2 backports KCFG="-kirkwood"
- lfsmake2 e1000e KCFG="-kirkwood"
- lfsmake2 igb KCFG="-kirkwood"
- lfsmake2 ixgbe KCFG="-kirkwood"
- lfsmake2 xtables-addons KCFG="-kirkwood"
- lfsmake2 linux-initrd KCFG="-kirkwood"
;;
esac
+ lfsmake2 intel-microcode
lfsmake2 xtables-addons USPACE="1"
- lfsmake2 openssl
- [ "${BUILD_ARCH}" = "i586" ] && lfsmake2 openssl KCFG='-sse2'
lfsmake2 libgpg-error
lfsmake2 libgcrypt
lfsmake2 libassuan
lfsmake2 nettle
+ lfsmake2 json-c
+ lfsmake2 libconfig
lfsmake2 libevent
lfsmake2 libevent2
- lfsmake2 libevent2-compat
lfsmake2 expat
lfsmake2 apr
lfsmake2 aprutil
lfsmake2 libtiff
lfsmake2 libart
lfsmake2 gd
- lfsmake2 popt
lfsmake2 slang
lfsmake2 newt
lfsmake2 libsmooth
lfsmake2 libxml2
lfsmake2 libxslt
lfsmake2 BerkeleyDB
- lfsmake2 mysql
lfsmake2 cyrus-sasl
lfsmake2 openldap
lfsmake2 apache2
- lfsmake2 php
lfsmake2 web-user-interface
lfsmake2 flag-icons
lfsmake2 jquery
lfsmake2 bootstrap
lfsmake2 arping
lfsmake2 beep
- lfsmake2 dvdrtools
+ lfsmake2 libarchive
+ lfsmake2 cmake
+ lfsmake2 cdrkit
lfsmake2 dosfstools
lfsmake2 reiserfsprogs
lfsmake2 xfsprogs
lfsmake2 ipaddr
lfsmake2 iputils
lfsmake2 l7-protocols
- lfsmake2 mISDNuser
- lfsmake2 capi4k-utils
lfsmake2 hwdata
lfsmake2 logrotate
lfsmake2 logwatch
lfsmake2 python-ipaddress
lfsmake2 glib
lfsmake2 GeoIP
- lfsmake2 noip_updater
lfsmake2 ntp
lfsmake2 openssh
lfsmake2 fontconfig
lfsmake2 wireless
lfsmake2 pakfire
lfsmake2 spandsp
+ lfsmake2 lz4
lfsmake2 lzo
lfsmake2 openvpn
- lfsmake2 pammysql
lfsmake2 mpage
lfsmake2 dbus
lfsmake2 intltool
lfsmake2 libdaemon
+ lfsmake2 avahi
lfsmake2 cups
lfsmake2 lcms2
lfsmake2 ghostscript
lfsmake2 mc
lfsmake2 wget
lfsmake2 bridge-utils
- lfsmake2 screen
lfsmake2 smartmontools
lfsmake2 htop
lfsmake2 chkconfig
lfsmake2 postfix
lfsmake2 fetchmail
lfsmake2 cyrus-imapd
- lfsmake2 openmailadmin
lfsmake2 clamav
lfsmake2 spamassassin
lfsmake2 amavisd
lfsmake2 flac
lfsmake2 lame
lfsmake2 sox
+ lfsmake2 soxr
lfsmake2 libshout
lfsmake2 xvid
lfsmake2 libmpeg2
- lfsmake2 libarchive
- lfsmake2 cmake
lfsmake2 gnump3d
lfsmake2 rsync
- lfsmake2 tcpwrapper
lfsmake2 libtirpc
lfsmake2 rpcbind
+ lfsmake2 keyutils
lfsmake2 nfs
lfsmake2 gnu-netcat
lfsmake2 ncat
lfsmake2 etherwake
lfsmake2 bwm-ng
lfsmake2 sysstat
- lfsmake2 vsftpd
lfsmake2 strongswan
lfsmake2 rng-tools
lfsmake2 lsof
lfsmake2 qemu
lfsmake2 sane
lfsmake2 netpbm
- lfsmake2 phpSANE
- lfsmake2 tunctl
lfsmake2 netsnmpd
- lfsmake2 nagios
lfsmake2 nagios_nrpe
+ lfsmake2 nagios-plugins
lfsmake2 icinga
+ lfsmake2 observium-agent
lfsmake2 ebtables
lfsmake2 directfb
lfsmake2 faad2
+ lfsmake2 alac
lfsmake2 ffmpeg
lfsmake2 vdr
lfsmake2 vdr_streamdev
lfsmake2 streamripper
lfsmake2 sshfs
lfsmake2 taglib
- #lfsmake2 mediatomb
lfsmake2 sslh
lfsmake2 perl-gettext
lfsmake2 perl-Sort-Naturally
lfsmake2 vdradmin
lfsmake2 miau
lfsmake2 perl-DBI
- lfsmake2 perl-DBD-mysql
lfsmake2 perl-DBD-SQLite
lfsmake2 perl-File-ReadBackwards
- lfsmake2 cacti
lfsmake2 openvmtools
- lfsmake2 nagiosql
lfsmake2 motion
lfsmake2 joe
lfsmake2 monit
lfsmake2 watchdog
lfsmake2 libpri
lfsmake2 libsrtp
+ lfsmake2 jansson
lfsmake2 asterisk
- lfsmake2 lcr
lfsmake2 usb_modeswitch
lfsmake2 usb_modeswitch_data
lfsmake2 zerofree
- lfsmake2 pound
lfsmake2 minicom
lfsmake2 ddrescue
lfsmake2 miniupnpd
lfsmake2 powertop
lfsmake2 parted
lfsmake2 swig
+ lfsmake2 u-boot
+ lfsmake2 u-boot-kirkwood
+ lfsmake2 python-typing
lfsmake2 python-m2crypto
lfsmake2 wireless-regdb
lfsmake2 crda
lfsmake2 python-progressbar
lfsmake2 python-xattr
lfsmake2 ddns
+ 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-botocore
+ lfsmake2 aws-cli
lfsmake2 transmission
lfsmake2 dpfhack
lfsmake2 lcd4linux
lfsmake2 sendEmail
lfsmake2 sysbench
lfsmake2 strace
- lfsmake2 elfutils
lfsmake2 ltrace
lfsmake2 ipfire-netboot
lfsmake2 lcdproc
lfsmake2 iptraf-ng
lfsmake2 iotop
lfsmake2 stunnel
- lfsmake2 sslscan
- lfsmake2 owncloud
lfsmake2 bacula
lfsmake2 batctl
lfsmake2 perl-Font-TTF
lfsmake2 pigz
lfsmake2 tmux
lfsmake2 perl-Text-CSV_XS
- lfsmake2 swconfig
lfsmake2 haproxy
lfsmake2 ipset
lfsmake2 lua
lfsmake2 dnsdist
lfsmake2 bird
+ lfsmake2 frr
lfsmake2 dmidecode
lfsmake2 mcelog
lfsmake2 rtpproxy
lfsmake2 libpciaccess
lfsmake2 libyajl
lfsmake2 libvirt
- lfsmake2 python3-libvirt
lfsmake2 freeradius
lfsmake2 perl-common-sense
lfsmake2 perl-inotify2
lfsmake2 perl-Net-IP
lfsmake2 wio
lfsmake2 iftop
+ lfsmake2 mdns-repeater
+ lfsmake2 i2c-tools
+ lfsmake2 nss-myhostname
+ lfsmake2 dehydrated
+ lfsmake2 shairport-sync
}
buildinstaller() {
export LOGFILE
lfsmake2 memtest
lfsmake2 installer
- lfsmake1 strip
+ # use toolchain bash for chroot to strip
+ EXTRA_PATH=${TOOLS_DIR}/bin/ lfsmake2 strip
}
buildpackages() {
# Generating list of packages used
- echo -n "Generating packages list from logs" | tee -a $LOGFILE
+ print_line "Generating packages list from logs"
rm -f $BASEDIR/doc/packages-list
for i in `ls -1tr $BASEDIR/log/[^_]*`; do
if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
$BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
rm -f $BASEDIR/doc/packages-list
# packages-list.txt is ready to be displayed for wiki page
- beautify message DONE
+ print_status DONE
# Update changelog
cd $BASEDIR
modprobe loop 2>/dev/null
if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ] || [ -e "/dev/loop-control" ]); then
lfsmake2 flash-images
- lfsmake2 flash-images SCON=1
fi
- mv $LFS/install/images/{*.iso,*.tgz,*.img.gz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
+ mv $LFS/install/images/{*.iso,*.img.xz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
ipfirepackages
# remove not useable iso on armv5tel (needed to build flash images)
[ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso
- for i in `ls *.bz2 *.img.gz *.iso`; do
+ for i in `ls *.bz2 *.img.xz *.iso`; do
md5sum $i > $i.md5
done
cd $PWD
stdumount
rm -rf $BASEDIR/build/tmp/*
- # Generating total list of files
- echo -n "Generating files list from logs" | tee -a $LOGFILE
- rm -f $BASEDIR/log/FILES
- for i in `ls -1tr $BASEDIR/log/[^_]*`; do
- if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
- echo "##" >>$BASEDIR/log/FILES
- echo "## `basename $i`" >>$BASEDIR/log/FILES
- echo "##" >>$BASEDIR/log/FILES
- cat $i | sed "s%^\./%#%" | sort >> $BASEDIR/log/FILES
- fi
- done
- beautify message DONE
-
cd $PWD
}
ipfiredist $i
else
echo -n $i
- beautify message SKIP
+ print_status SKIP
fi
done
test -d $BASEDIR/packages || mkdir $BASEDIR/packages
# See what we're supposed to do
case "$1" in
build)
- clear
- PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz 2> /dev/null | head -n 1`
+ START_TIME=$(now)
+
+ # 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`
#only restore on a clean disk
if [ ! -e "${BASEDIR}/build${TOOLS_DIR}/.toolchain-successful" ]; then
if [ ! -n "$PACKAGE" ]; then
- beautify build_stage "Full toolchain compilation"
+ print_build_stage "Full toolchain compilation"
prepareenv
buildtoolchain
else
- PACKAGENAME=${PACKAGE%.tar.gz}
- beautify build_stage "Packaged toolchain compilation"
+ PACKAGENAME=${PACKAGE%.tar.xz}
+ print_build_stage "Packaged toolchain compilation"
if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
- tar zxf $PACKAGE
+ tar axf $PACKAGE
prepareenv
else
exiterror "$PACKAGENAME md5 did not match, check downloaded package"
fi
fi
else
- echo -n "Using installed toolchain" | tee -a $LOGFILE
- beautify message SKIP
prepareenv
fi
- beautify build_start
- beautify build_stage "Building LFS"
+ print_build_stage "Building LFS"
buildbase
- beautify build_stage "Building IPFire"
+ print_build_stage "Building IPFire"
buildipfire
- beautify build_stage "Building installer"
+ print_build_stage "Building installer"
buildinstaller
- beautify build_stage "Building packages"
+ print_build_stage "Building packages"
buildpackages
- beautify build_stage "Checking Logfiles for new Files"
+ print_build_stage "Checking Logfiles for new Files"
cd $BASEDIR
tools/checknewlog.pl
tools/checkrootfiles
cd $PWD
- beautify build_end
+ print_build_summary $(( $(now) - ${START_TIME} ))
;;
shell)
# enter a shell inside LFS chroot
entershell
;;
clean)
- echo -en "${BOLD}Cleaning build directory...${NORMAL}"
+ print_line "Cleaning build directory..."
+
for i in `mount | grep $BASEDIR | sed 's/^.*loop=\(.*\))/\1/'`; do
$LOSETUP -d $i 2>/dev/null
done
rm -f "${TOOLS_DIR}"
fi
rm -f $BASEDIR/ipfire-*
- beautify message DONE
+ print_status DONE
+ ;;
+docker)
+ # Build the docker image if it does not exist, yet
+ if ! docker images -a | grep -q ^ipfire-builder; then
+ if docker build -t ipfire-builder ${BASEDIR}/tools/docker; then
+ print_status DONE
+ else
+ print_status FAIL
+ exit 1
+ fi
+ fi
+
+ # Run the container and enter a shell
+ docker run -it --privileged -v "${BASEDIR}:/build" -w "/build" ipfire-builder bash -l
;;
downloadsrc)
if [ ! -d $BASEDIR/cache ]; then
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
+ print_status FAIL
FINISHED=0
else
if [ $c -eq 1 ]; then
- beautify message DONE
+ print_status DONE
fi
fi
fi
MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
echo -ne "MD5 difference in lfs/$i"
- beautify message FAIL
+ print_status FAIL
ERROR=1
fi
fi
done
if [ $ERROR -eq 0 ]; then
echo -ne "${BOLD}all files md5sum match${NORMAL}"
- beautify message DONE
+ print_status DONE
else
echo -ne "${BOLD}not all files were correctly download${NORMAL}"
- beautify message FAIL
+ print_status FAIL
fi
cd - >/dev/null 2>&1
;;
toolchain)
- clear
+ # Clear screen
+ ${INTERACTIVE} && clear
+
prepareenv
- beautify build_stage "Toolchain compilation"
+ print_build_stage "Toolchain compilation (${BUILD_ARCH})"
buildtoolchain
- echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for ${BUILD_ARCH}" | tee -a $LOGFILE
+ 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 -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz \
- build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE
- md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz \
+ 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
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.gz ]; then
+ if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.xz ]; 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 ${BUILD_ARCH}" | tee -a $LOGFILE
+ 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.gz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null
+ wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.xz $URL_TOOLCHAIN/$PACKAGE.md5 >& /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.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
+ 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
else
exiterror "$PACKAGE.md5 did not match, check downloaded package"
PWD=`pwd`
if [ -z $IPFIRE_USER ]; then
echo -n "You have to setup IPFIRE_USER first. See .config for details."
- beautify message FAIL
+ print_status FAIL
exit 1
fi
$BASEDIR/tools/check_strings.pl tr > $BASEDIR/doc/language_issues.tr
$BASEDIR/tools/check_strings.pl it > $BASEDIR/doc/language_issues.it
$BASEDIR/tools/check_langs.sh > $BASEDIR/doc/language_missings
- beautify message DONE
+ print_status DONE
echo -ne "Updating language lists..."
update_language_list ${BASEDIR}/src/installer/po
update_language_list ${BASEDIR}/src/setup/po
- beautify message DONE
+ print_status DONE
+ ;;
+update-contributors)
+ update_contributors
;;
*)
- echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}"
+ echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors}"
cat doc/make.sh-usage
;;
esac