2 ############################################################################
4 # This file is part of the IPFire Firewall. #
6 # IPFire is free software; you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation; either version 2 of the License, or #
9 # (at your option) any later version. #
11 # IPFire is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with IPFire; if not, write to the Free Software #
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
20 # Copyright (C) 2007-2017 IPFire Team <info@ipfire.org>. #
22 ############################################################################
25 NAME
="IPFire" # Software name
26 SNAME
="ipfire" # Short name
27 VERSION
="2.19" # Version number
28 CORE
="117" # Core Level (Filename)
29 PAKFIRE_CORE
="116" # Core Level (PAKFIRE)
30 GIT_BRANCH
=`git rev-parse --abbrev-ref HEAD` # Git Branch
31 SLOGAN
="www.ipfire.org" # Software slogan
32 CONFIG_ROOT
=/var
/ipfire
# Configuration rootdir
34 MAX_RETRIES
=1 # prefetch/check loop
35 BUILD_IMAGES
=1 # Flash and Xen Downloader
36 KVER
=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
37 GIT_TAG
=$
(git tag |
tail -1) # Git Tag
38 GIT_LASTCOMMIT
=$
(git log |
head -n1 | cut
-d" " -f2 |
head -c8) # Last commit
42 ###############################################################################
44 # Beautifying variables & presentation & input output interface
46 ###############################################################################
49 # Find current screen size
50 if [ -z "${COLUMNS}" ]; then
52 COLUMNS
=${COLUMNS##* }
55 # When using remote connections, such as a serial port, stty size returns 0
56 if [ "${COLUMNS}" = "0" ]; then
60 ## Measurements for positioning result messages
65 RESULT_COL
=$
((${COLUMNS} - $RESULT_WIDTH - 4))
66 TIME_COL
=$
((${RESULT_COL} - $TIME_WIDTH - 5))
67 OPT_COL
=$
((${TIME_COL} - $OPT_WIDTH - 5))
68 VER_COL
=$
((${OPT_COL} - $VER_WIDTH - 5))
70 ## Set Cursur Position Commands, used via echo -e
71 SET_RESULT_COL
="\\033[${RESULT_COL}G"
72 SET_TIME_COL
="\\033[${TIME_COL}G"
73 SET_OPT_COL
="\\033[${OPT_COL}G"
74 SET_VER_COL
="\\033[${VER_COL}G"
76 # Define color for messages
84 # New architecture variables
85 HOST_ARCH
="$(uname -m)"
88 BASENAME
=$
(basename $0)
90 # Debian specific settings
91 if [ ! -e /etc
/debian_version
]; then
94 if [ -x /usr
/bin
/realpath
]; then
95 FULLPATH
=`/usr/bin/realpath $0`
97 echo "ERROR: Need to do apt-get install realpath"
102 # This is the directory where make.sh is in
103 BASEDIR
=$
(echo $FULLPATH |
sed "s/\/$BASENAME//g")
105 LOGFILE
=$BASEDIR/log
/_build.preparation.log
106 export BASEDIR LOGFILE
107 DIR_CHK
=$BASEDIR/cache
/check
108 mkdir
$BASEDIR/log
/ 2>/dev
/null
110 system_processors
() {
111 getconf _NPROCESSORS_ONLN
2>/dev
/null ||
echo "1"
117 while read -r key val unit
; do
121 echo "$(( ${val} / 1024 ))"
129 local build_arch
="${1}"
131 if [ "${build_arch}" = "default" ]; then
132 build_arch
="$(configure_build_guess)"
135 case "${build_arch}" in
137 BUILDTARGET
="${build_arch}-unknown-linux-gnu"
138 CROSSTARGET
="${build_arch}-cross-linux-gnu"
140 CFLAGS_ARCH
="-m64 -mtune=generic"
144 BUILDTARGET
="${build_arch}-pc-linux-gnu"
145 CROSSTARGET
="${build_arch}-cross-linux-gnu"
147 CFLAGS_ARCH
="-march=i586 -mtune=generic -fomit-frame-pointer"
151 BUILDTARGET
="${build_arch}-unknown-linux-gnu"
152 CROSSTARGET
="${build_arch}-cross-linux-gnu"
158 BUILDTARGET
="${build_arch}-unknown-linux-gnueabi"
159 CROSSTARGET
="${build_arch}-cross-linux-gnueabi"
161 CFLAGS_ARCH
="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
165 BUILDTARGET
="${build_arch}-unknown-linux-gnueabi"
166 CROSSTARGET
="${build_arch}-cross-linux-gnueabi"
168 CFLAGS_ARCH
="-march=armv5te -mfloat-abi=soft -fomit-frame-pointer"
172 exiterror
"Cannot build for architure ${build_arch}"
176 # Check if the QEMU helper is available if needed.
177 if qemu_is_required
"${build_arch}"; then
178 local qemu_build_helper
="$(qemu_find_build_helper_name "${build_arch}")"
180 if [ -n "${qemu_build_helper}" ]; then
181 QEMU_TARGET_HELPER
="${qemu_build_helper}"
183 exiterror
"Could not find a binfmt_misc helper entry for ${build_arch}"
187 BUILD_ARCH
="${build_arch}"
188 TOOLS_DIR
="/tools_${BUILD_ARCH}"
191 HARDENING_CFLAGS
="-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4"
193 CFLAGS
="-O2 -pipe -Wall -fexceptions -fPIC ${CFLAGS_ARCH}"
196 # Determine parallelism
197 if [ -z "${MAKETUNING}" ]; then
198 # We assume that each process consumes about
199 # 192MB of memory. Therefore we find out how
200 # many processes fit into memory.
201 local mem_max
=$
(( ${HOST_MEM} / 192 ))
203 local processors
="$(system_processors)"
204 local cpu_max
=$
(( ${processors} * 2 ))
207 if [ ${mem_max} -lt ${cpu_max} ]; then
208 parallelism
=${mem_max}
210 parallelism
=${cpu_max}
213 MAKETUNING
="-j${parallelism}"
217 configure_build_guess
() {
218 case "${HOST_ARCH}" in
227 armv7
*|armv6
*|armv5
*)
232 exiterror
"Cannot guess build architecture"
238 if [ "$?" -eq "0" ]; then
239 beautify message DONE
243 beautify message FAIL
245 if [ $EXITCODE -ne "0" ]; then
252 # ARG1=starting position on screen
253 # ARG2=string to be printed
254 # ARG3=offset, negative for left movement, positive for right movement, relative to ARG1
255 # For example if your starting position is column 50 and you want to print Hello three columns to the right
256 # of your starting position, your call will look like this:
257 # position_cursor 50 "Hello" 3 (you'll get the string Hello at position 53 (= 50 + 3)
258 # If on the other hand you want your string "Hello" to end three columns to the left of position 50,
259 # your call will look like this:
260 # position_cursor 50 "Hello" -3 (you'll get the string Hello at position 42 (= 50 - 5 -3)
261 # If you want to start printing at the exact starting location, use offset 0
267 STRING_LENGTH
=${#STRING}
269 if [ ${OFFSET} -lt 0 ]; then
270 COL
=$
((${START} + ${OFFSET} - ${STRING_LENGTH}))
272 COL
=$
((${START} + ${OFFSET}))
275 SET_COL
="\\033[${COL}G"
281 # Commands: build_stage, make_pkg, message, result
286 echo -ne "${SET_RESULT_COL}[${DONE} DONE ${NORMAL}]\n"
289 echo -ne "${WARN}${3}${NORMAL}${SET_RESULT_COL}[${WARN} WARN ${NORMAL}]\n"
292 echo -ne "${SET_RESULT_COL}[${FAIL} FAIL ${NORMAL}]\n"
295 echo -ne "${SET_RESULT_COL}[${SKIP} SKIP ${NORMAL}]\n"
301 if [ "$STAGE_TIME_START" ]; then
302 LAST_STAGE_TIME
=$
[ `date +%s` - $STAGE_TIME_START ]
304 STAGE_TIME_START
=`date +%s`
305 echo -ne "${BOLD}*** (${BUILD_ARCH}) ${MESSAGE}${NORMAL}"
306 if [ "$LAST_STAGE_TIME" ]; then
307 echo -ne "${DONE} (Last stage took $LAST_STAGE_TIME secs)${NORMAL}\n"
309 echo -ne "${BOLD}${SET_VER_COL} version${SET_OPT_COL} options${SET_TIME_COL} time (sec)${SET_RESULT_COL} status${NORMAL}\n"
312 BUILD_TIME_START
=`date +%s`
315 BUILD_TIME_END
=`date +%s`
316 seconds
=$
[ $BUILD_TIME_END - $BUILD_TIME_START ]
317 hours
=$
((seconds
/ 3600))
318 seconds
=$
((seconds
% 3600))
319 minutes
=$
((seconds
/ 60))
320 seconds
=$
((seconds
% 60))
322 echo -ne "${DONE}***Build is finished now and took $hours hour(s) $minutes minute(s) $seconds second(s)!${NORMAL}\n"
325 echo "$2" |
while read PKG_VER PROGRAM OPTIONS
327 SET_VER_COL_REAL
=`position_cursor $OPT_COL $PKG_VER -3`
329 if [ "$OPTIONS" == "" ]; then
330 echo -ne "${PROGRAM}${SET_VER_COL}[ ${BOLD}${SET_VER_COL_REAL}${PKG_VER}"
331 echo -ne "${NORMAL} ]${SET_RESULT_COL}"
333 echo -ne "${PROGRAM}${SET_VER_COL}[ ${BOLD}${SET_VER_COL_REAL}${PKG_VER}"
334 echo -ne "${NORMAL} ]${SET_OPT_COL}[ ${BOLD}${OPTIONS}"
335 echo -ne "${NORMAL} ]${SET_RESULT_COL}"
348 SET_TIME_COL_REAL
=`position_cursor $RESULT_COL $PKG_TIME -3`
351 echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
352 echo -ne "${SET_RESULT_COL}[${DONE} DONE ${NORMAL}]\n"
355 echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
356 echo -ne "${SET_RESULT_COL}[${FAIL} FAIL ${NORMAL}]\n"
359 echo -ne "${SET_RESULT_COL}[${SKIP} SKIP ${NORMAL}]\n"
367 PKG_VER
=`grep -E "^VER |^VER=|^VER " $1 | awk '{print $3}'`
369 if [ -z $PKG_VER ]; then
370 PKG_VER
=`grep "Exp " $1 | awk '{print $4}'`
372 if [ -z $PKG_VER ]; then
375 if [ ${#PKG_VER} -gt $VER_WIDTH ]; then
376 # If a package version number is greater than $VER_WIDTH, we keep the first 4 characters
377 # and replace enough characters to fit the resulting string on the screen. We'll replace
378 # the extra character with .. (two dots). That's why the "+ 2" in the formula below.
379 # Example: if we have a 21-long version number that we want to fit into a 10-long space,
380 # we have to remove 11 characters. But if we replace 11 characters with 2 characters, we'll
381 # end up with a 12-character long string. That's why we replace 12 characters with ..
382 REMOVE
=`expr substr "$PKG_VER" 4 $[ ${#PKG_VER} - $VER_WIDTH + 2 ]`
383 PKG_VER
=`echo ${PKG_VER/$REMOVE/..}`
390 umount
$BASEDIR/build
/sys
2>/dev
/null
;
391 umount
$BASEDIR/build
/dev
/shm
2>/dev
/null
;
392 umount
$BASEDIR/build
/dev
/pts
2>/dev
/null
;
393 umount
$BASEDIR/build
/dev
2>/dev
/null
;
394 umount
$BASEDIR/build
/proc
2>/dev
/null
;
395 umount
$BASEDIR/build
/install
/mnt
2>/dev
/null
;
396 umount
$BASEDIR/build
/usr
/src
/cache
2>/dev
/null
;
397 umount
$BASEDIR/build
/usr
/src
/ccache
2>/dev
/null
;
398 umount
$BASEDIR/build
/usr
/src
/config
2>/dev
/null
;
399 umount
$BASEDIR/build
/usr
/src
/doc
2>/dev
/null
;
400 umount
$BASEDIR/build
/usr
/src
/html
2>/dev
/null
;
401 umount
$BASEDIR/build
/usr
/src
/langs
2>/dev
/null
;
402 umount
$BASEDIR/build
/usr
/src
/lfs
2>/dev
/null
;
403 umount
$BASEDIR/build
/usr
/src
/log
2>/dev
/null
;
404 umount
$BASEDIR/build
/usr
/src
/src
2>/dev
/null
;
409 for i
in `seq 0 7`; do
410 if ( losetup
/dev
/loop
${i} 2>/dev
/null |
grep -q "/install/images" ); then
411 losetup
-d /dev
/loop
${i} 2>/dev
/null
415 if [ -n "${LOGFILE}" ]; then
419 while read -r line
; do
421 done <<< "$(tail -n30 ${LOGFILE})"
424 echo -e "\nERROR: $*"
425 echo " Check $LOGFILE for errors if applicable"
430 # Install QEMU helper, if needed
433 local PATH
="${TOOLS_DIR}/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:${TOOLS_DIR}/bin"
435 PATH
="${PATH}" chroot
${LFS} env
-i \
440 SYSTEM_RELEASE
="${SYSTEM_RELEASE}" \
441 PAKFIRE_CORE
="${PAKFIRE_CORE}" \
444 VERSION
="${VERSION}" \
447 TOOLS_DIR
="${TOOLS_DIR}" \
448 CONFIG_ROOT
="${CONFIG_ROOT}" \
449 CFLAGS
="${CFLAGS} ${HARDENING_CFLAGS}" \
450 CXXFLAGS
="${CXXFLAGS} ${HARDENING_CFLAGS}" \
451 BUILDTARGET
="${BUILDTARGET}" \
452 CROSSTARGET
="${CROSSTARGET}" \
453 BUILD_ARCH
="${BUILD_ARCH}" \
454 BUILD_PLATFORM
="${BUILD_PLATFORM}" \
455 CCACHE_DIR
=/usr
/src
/ccache \
456 CCACHE_COMPRESS
="${CCACHE_COMPRESS}" \
457 CCACHE_COMPILERCHECK
="${CCACHE_COMPILERCHECK}" \
465 if [ ! -e $BASEDIR/build
/usr
/src
/lfs
/ ]; then
466 exiterror
"No such file or directory: $BASEDIR/build/usr/src/lfs/"
469 echo "Entering to a shell inside LFS chroot, go out with exit"
470 local PS1
="ipfire build chroot ($(uname -m)) \u:\w\$ "
472 if enterchroot bash
-i; then
475 beautify message FAIL
476 exiterror
"chroot error"
480 lfsmakecommoncheck
() {
482 if [ ! -f $BASEDIR/lfs
/$1 ]; then
483 exiterror
"No such file or directory: $BASEDIR/$1"
486 local PKG_VER
=`get_pkg_ver $BASEDIR/lfs/$1`
487 beautify make_pkg
"$PKG_VER $*"
489 # Check if this package is supported by our architecture.
490 # If no SUP_ARCH is found, we assume the package can be built for all.
491 if grep "^SUP_ARCH" ${BASEDIR}/lfs
/${1} >/dev
/null
; then
492 # Check if package supports ${BUILD_ARCH} or all architectures.
493 if ! grep -E "^SUP_ARCH.*${BUILD_ARCH}|^SUP_ARCH.*all" ${BASEDIR}/lfs/${1} >/dev/null; then
501 for i in $SKIP_PACKAGE_LIST
503 if [ "$i" == "$1" ]; then
509 echo -ne "`date -u '+%b %e %T'`: Building $
* " >> $LOGFILE
511 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \
512 MESSAGE="$1\t " download >> $LOGFILE 2>&1
513 if [ $? -ne 0 ]; then
514 exiterror "Download error
in $1"
517 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \
518 MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
519 if [ $? -ne 0 ]; then
520 exiterror "md5sum error
in $1, check
file in cache or signature
"
527 lfsmakecommoncheck $*
528 [ $? == 1 ] && return 0
530 local PKG_TIME_START=`date +%s`
532 cd $BASEDIR/lfs && env -i \
533 PATH="${TOOLS_DIR}/ccache
/bin
:${TOOLS_DIR}/bin
:$PATH" \
534 CCACHE_DIR="${CCACHE_DIR}" \
535 CCACHE_COMPRESS="${CCACHE_COMPRESS}" \
536 CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
538 CXXFLAGS="${CXXFLAGS}" \
539 MAKETUNING="${MAKETUNING}" \
542 TOOLS_DIR="${TOOLS_DIR}" \
543 CROSSTARGET="${CROSSTARGET}" \
544 BUILDTARGET="${BUILDTARGET}" \
545 BUILD_ARCH="${BUILD_ARCH}" \
546 BUILD_PLATFORM="${BUILD_PLATFORM}" \
547 LFS_BASEDIR="${BASEDIR}" \
550 install >> $LOGFILE 2>&1
552 local COMPILE_SUCCESS=$?
553 local PKG_TIME_END=`date +%s`
555 if [ $COMPILE_SUCCESS -ne 0 ]; then
556 beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
557 exiterror "Building $
*";
559 beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
566 lfsmakecommoncheck $*
567 [ $? == 1 ] && return 0
569 local PKG_TIME_START=`date +%s`
573 bash -x -c "cd /usr
/src
/lfs
&& \
574 MAKETUNING
=${MAKETUNING} \
576 LFS_BASEDIR
=/usr
/src
install" \
579 local COMPILE_SUCCESS=$?
580 local PKG_TIME_END=`date +%s`
582 if [ $COMPILE_SUCCESS -ne 0 ]; then
583 beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
584 exiterror "Building $
*";
586 beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
593 lfsmakecommoncheck $*
594 [ $? == 1 ] && return 0
596 local PKG_TIME_START=`date +%s`
600 bash -x -c "cd /usr
/src
/lfs
&& make -f $
* LFS_BASEDIR
=/usr
/src dist
" \
603 local COMPILE_SUCCESS=$?
604 local PKG_TIME_END=`date +%s`
606 if [ $COMPILE_SUCCESS -ne 0 ]; then
607 beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
608 exiterror "Packaging $
*";
610 beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
616 [ -e "${BASEDIR}/build
${TOOLS_DIR}/lib
/libpakfire_preload.so
" ] || return
618 local env="LD_PRELOAD
=${TOOLS_DIR}/lib
/libpakfire_preload.so
"
620 # Fake kernel version, because some of the packages do not compile
621 # with kernel 3.0 and later.
622 env="${env} UTS_RELEASE
=${KVER}"
624 # Fake machine version.
625 env="${env} UTS_MACHINE
=${BUILD_ARCH}"
633 # Don't add anything if qemu is not used.
634 if ! qemu_is_required; then
638 # Set default qemu options
639 case "${BUILD_ARCH}" in
641 QEMU_CPU="${QEMU_CPU:-cortex-a9}"
643 env="${env} QEMU_CPU
=${QEMU_CPU}"
648 #env="${env} QEMU_STRACE
=1"
654 local build_arch="${1}"
656 if [ -z "${build_arch}" ]; then
657 build_arch="${BUILD_ARCH}"
660 case "${HOST_ARCH},${build_arch}" in
661 x86_64,arm*|i?86,arm*|i?86,x86_64)
670 qemu_install_helper() {
671 # Do nothing, if qemu is not required
672 if ! qemu_is_required; then
676 if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
677 exiterror "binfmt_misc not mounted. QEMU_TARGET_HELPER not useable.
"
680 if [ ! $(cat /proc/sys/fs/binfmt_misc/status) = 'enabled' ]; then
681 exiterror "binfmt_misc not enabled. QEMU_TARGET_HELPER not useable.
"
685 if [ -z "${QEMU_TARGET_HELPER}" ]; then
686 exiterror "QEMU_TARGET_HELPER not
set"
689 # Check if the helper is already installed.
690 if [ -x "${LFS}${QEMU_TARGET_HELPER}" ]; then
694 # Try to find a suitable binary that we can install
695 # to the build environment.
697 for file in "${QEMU_TARGET_HELPER}" "${QEMU_TARGET_HELPER}-static"; do
698 # file must exist and be executable.
699 [ -x "${file}" ] || continue
702 file_is_static "${file}" || continue
704 local dirname="${LFS}$
(dirname "${file}")"
705 mkdir -p "${dirname}"
707 install -m 755 "${file}" "${LFS}${QEMU_TARGET_HELPER}"
711 exiterror "Could not
find a statically-linked QEMU emulator
: ${QEMU_TARGET_HELPER}"
714 qemu_find_build_helper_name() {
715 local build_arch="${1}"
718 case "${build_arch}" in
720 magic="7f454c4601010100000000000000000002002800
"
723 magic="7f454c4602010100000000000000000002003e00
"
727 [ -z "${magic}" ] && return 1
730 for file in /proc/sys/fs/binfmt_misc/*; do
731 # skip write only register entry
732 [ $(basename "${file}") = "register
" ] && continue
733 # Search for the file with the correct magic value.
734 grep -qE "^magic
${magic}$
" "${file}" || continue
736 local interpreter="$
(grep "^interpreter" "${file}" |
awk '{ print $2 }')"
738 [ -n "${interpreter}" ] || continue
739 [ "${interpreter:0:1}" = "/" ] || continue
740 [ -x "${interpreter}" ] || continue
742 echo "${interpreter}"
752 file ${file} 2>/dev/null | grep -q "statically linked
"
755 update_language_list() {
759 for lang in ${path}/*.po; do
760 lang="$
(basename "${lang}")"
762 done | sort -u > "${path}/LINGUAS
"
765 # Load configuration file
766 if [ -f .config ]; then
770 # Get the amount of memory in this build system
771 HOST_MEM=$(system_memory)
773 if [ -n "${BUILD_ARCH}" ]; then
774 configure_build "${BUILD_ARCH}"
775 elif [ -n "${TARGET_ARCH}" ]; then
776 configure_build "${TARGET_ARCH}"
779 configure_build "default
"
783 ############################################################################
785 # Are we running the right shell? #
787 ############################################################################
788 if [ ! "$BASH" ]; then
789 exiterror "BASH environment variable is not
set. You
're probably running the wrong shell."
792 if [ -z "${BASH_VERSION}" ]; then
793 exiterror "Not running BASH shell."
797 ############################################################################
799 # Trap on emergency exit #
801 ############################################################################
802 trap "exiterror 'Build process interrupted
'" SIGINT SIGTERM SIGKILL SIGSTOP SIGQUIT
805 ############################################################################
807 # Resetting our nice level #
809 ############################################################################
810 echo -ne "Resetting our nice level to $NICE" | tee -a $LOGFILE
811 renice $NICE $$ > /dev/null
812 if [ `nice` != "$NICE" ]; then
813 beautify message FAIL
814 exiterror "Failed to set correct nice level"
816 beautify message DONE
820 ############################################################################
822 # Checking if running as root user #
824 ############################################################################
825 echo -ne "Checking if we're running as root user
" | tee -a $LOGFILE
826 if [ `id -u` != 0 ]; then
827 beautify message FAIL
828 exiterror "Not building as root
"
830 beautify message DONE
834 ############################################################################
836 # Checking for necessary temporary space #
838 ############################################################################
839 echo -ne "Checking
for necessary space on disk
$BASE_DEV" | tee -a $LOGFILE
840 BASE_DEV=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $1 }'`
841 BASE_ASPACE=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $4 }'`
842 if (( 2048000 > $BASE_ASPACE )); then
843 BASE_USPACE=`du -skx $BASEDIR | awk '{print $1}'`
844 if (( 2048000 - $BASE_USPACE > $BASE_ASPACE )); then
845 beautify message FAIL
846 exiterror "Not enough temporary space available
, need
at least
2GB on
$BASE_DEV"
849 beautify message DONE
852 ############################################################################
854 # Building Linux From Scratch system #
856 ############################################################################
863 # Check ${TOOLS_DIR} symlink
864 if [ -h "${TOOLS_DIR}" ]; then
868 if [ ! -e "${TOOLS_DIR}" ]; then
869 ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}"
872 if [ ! -h "${TOOLS_DIR}" ]; then
873 exiterror "Could not create
${TOOLS_DIR} symbolic link
"
879 export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
880 unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
882 # Make some extra directories
883 mkdir -p "${BASEDIR}/build
${TOOLS_DIR}" 2>/dev/null
884 mkdir -p $BASEDIR/build/{etc,usr/src} 2>/dev/null
885 mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys}
886 mkdir -p $BASEDIR/{cache,ccache} 2>/dev/null
887 mkdir -p $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache}
889 mknod -m 600 $BASEDIR/build/dev/console c 5 1 2>/dev/null
890 mknod -m 666 $BASEDIR/build/dev/null c 1 3 2>/dev/null
892 # Make all sources and proc available under lfs build
893 mount --bind /dev $BASEDIR/build/dev
894 mount --bind /dev/pts $BASEDIR/build/dev/pts
895 mount --bind /dev/shm $BASEDIR/build/dev/shm
896 mount --bind /proc $BASEDIR/build/proc
897 mount --bind /sys $BASEDIR/build/sys
898 mount --bind $BASEDIR/cache $BASEDIR/build/usr/src/cache
899 mount --bind $BASEDIR/ccache $BASEDIR/build/usr/src/ccache
900 mount --bind $BASEDIR/config $BASEDIR/build/usr/src/config
901 mount --bind $BASEDIR/doc $BASEDIR/build/usr/src/doc
902 mount --bind $BASEDIR/html $BASEDIR/build/usr/src/html
903 mount --bind $BASEDIR/langs $BASEDIR/build/usr/src/langs
904 mount --bind $BASEDIR/lfs $BASEDIR/build/usr/src/lfs
905 mount --bind $BASEDIR/log $BASEDIR/build/usr/src/log
906 mount --bind $BASEDIR/src $BASEDIR/build/usr/src/src
908 # Run LFS static binary creation scripts one by one
909 export CCACHE_DIR=$BASEDIR/ccache
910 export CCACHE_COMPRESS=1
911 export CCACHE_COMPILERCHECK="string
:toolchain-
${TOOLCHAINVER} ${BUILD_ARCH}"
913 # Remove pre-install list of installed files in case user erase some files before rebuild
914 rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null
916 # Prepare string for /etc/system-release.
917 SYSTEM_RELEASE="${NAME} ${VERSION} (${BUILD_ARCH})"
918 if [ "$
(git status
-s |
wc -l)" == "0" ]; then
923 case "$GIT_BRANCH" in
925 SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS"
928 SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build
: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS"
935 case "${BUILD_ARCH}:${HOST_ARCH}" in
942 i586:i586|i586:i686|i586:x86_64)
950 arvm7hl:armv7hl|armv7hl:armv7l)
954 armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv6l|armv5tel:armv7l|armv5tel:aarch64)
963 exiterror "Cannot build
${BUILD_ARCH} toolchain on $
(uname
-m). Please use the download
if any.
"
965 local gcc=$(type -p gcc)
966 if [ -z "${gcc}" ]; then
967 exiterror "Could not
find GCC. You will need a working build enviroment
in order to build the toolchain.
"
970 LOGFILE="$BASEDIR/log
/_build.toolchain.log
"
974 lfsmake1 ccache PASS=1
975 lfsmake1 binutils PASS=1
977 lfsmake1 linux KCFG="-headers"
980 lfsmake1 binutils PASS=2
982 lfsmake1 ccache PASS=2
1006 lfsmake1 fake-environ
1007 lfsmake1 cleanup-toolchain
1011 LOGFILE="$BASEDIR/log
/_build.base.log
"
1014 lfsmake2 linux KCFG="-headers"
1018 lfsmake2 cleanup-toolchain
1035 lfsmake2 ncurses-compat
1041 lfsmake2 readline-compat
1044 lfsmake2 pcre-compat
1081 LOGFILE="$BASEDIR/log
/_build.ipfire.log
"
1084 lfsmake2 initscripts
1088 lfsmake2 libusb-compat
1094 lfsmake2 linux-firmware
1095 lfsmake2 ath10k-firmware
1096 lfsmake2 dvb-firmwares
1097 lfsmake2 mt7601u-firmware
1098 lfsmake2 zd1211-firmware
1099 lfsmake2 rpi-firmware
1106 lfsmake2 multipath-tools
1110 lfsmake2 libnfnetlink
1111 lfsmake2 libnetfilter_queue
1112 lfsmake2 libnetfilter_conntrack
1113 lfsmake2 libnetfilter_cthelper
1114 lfsmake2 libnetfilter_cttimeout
1117 case "${BUILD_ARCH}" in
1119 lfsmake2 linux KCFG=""
1120 lfsmake2 backports KCFG=""
1121 lfsmake2 e1000e KCFG=""
1122 lfsmake2 igb KCFG=""
1123 lfsmake2 ixgbe KCFG=""
1124 lfsmake2 xtables-addons KCFG=""
1125 lfsmake2 linux-initrd KCFG=""
1128 # x86-pae (Native and new XEN) kernel build
1129 lfsmake2 linux KCFG="-pae"
1130 lfsmake2 backports KCFG="-pae"
1131 lfsmake2 e1000e KCFG="-pae"
1132 lfsmake2 igb KCFG="-pae"
1133 lfsmake2 ixgbe KCFG="-pae"
1134 lfsmake2 xtables-addons KCFG="-pae"
1135 lfsmake2 linux-initrd KCFG="-pae"
1138 lfsmake2 linux KCFG=""
1139 lfsmake2 backports KCFG=""
1140 lfsmake2 e1000e KCFG=""
1141 lfsmake2 igb KCFG=""
1142 lfsmake2 ixgbe KCFG=""
1143 lfsmake2 xtables-addons KCFG=""
1144 lfsmake2 linux-initrd KCFG=""
1148 # arm-rpi (Raspberry Pi) kernel build
1149 lfsmake2 linux KCFG="-rpi"
1150 lfsmake2 backports KCFG="-rpi"
1151 lfsmake2 xtables-addons KCFG="-rpi"
1152 lfsmake2 linux-initrd KCFG="-rpi"
1154 # arm multi platform (Panda, Wandboard ...) kernel build
1155 lfsmake2 linux KCFG="-multi"
1156 lfsmake2 backports KCFG="-multi"
1157 lfsmake2 e1000e KCFG="-multi"
1158 lfsmake2 igb KCFG="-multi"
1159 lfsmake2 ixgbe KCFG="-multi"
1160 lfsmake2 xtables-addons KCFG="-multi"
1161 lfsmake2 linux-initrd KCFG="-multi"
1163 # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build
1164 lfsmake2 linux KCFG="-kirkwood"
1165 lfsmake2 backports KCFG="-kirkwood"
1166 lfsmake2 e1000e KCFG="-kirkwood"
1167 lfsmake2 igb KCFG="-kirkwood"
1168 lfsmake2 ixgbe KCFG="-kirkwood"
1169 lfsmake2 xtables-addons KCFG="-kirkwood"
1170 lfsmake2 linux-initrd KCFG="-kirkwood"
1173 lfsmake2 xtables-addons USPACE="1"
1175 [ "${BUILD_ARCH}" = "i586
" ] && lfsmake2 openssl KCFG='-sse2'
1176 lfsmake2 libgpg-error
1182 lfsmake2 libevent2-compat
1201 lfsmake2 ca-certificates
1209 lfsmake2 libjpeg-compat
1232 lfsmake2 web-user-interface
1240 lfsmake2 reiserfsprogs
1246 lfsmake2 ez-ipupdate
1250 lfsmake2 GD-TextUtil
1251 lfsmake2 perl-Device-SerialPort
1252 lfsmake2 perl-Device-Modem
1253 lfsmake2 perl-Apache-Htpasswd
1259 lfsmake2 conntrack-tools
1263 lfsmake2 l7-protocols
1265 lfsmake2 capi4k-utils
1272 lfsmake2 HTML-Tagset
1273 lfsmake2 HTML-Parser
1274 lfsmake2 HTML-Template
1275 lfsmake2 Compress-Zlib
1277 lfsmake2 Digest-SHA1
1278 lfsmake2 Digest-HMAC
1279 lfsmake2 libwww-perl
1281 lfsmake2 Net-IPv4Addr
1284 lfsmake2 IO-Socket-SSL
1285 lfsmake2 Unix-Syslog
1289 lfsmake2 Convert-TNEF
1290 lfsmake2 Convert-UUlib
1291 lfsmake2 Archive-Tar
1292 lfsmake2 Archive-Zip
1293 lfsmake2 Text-Tabs+Wrap
1294 lfsmake2 Locale-Country
1296 lfsmake2 Crypt-PasswdMD5
1298 lfsmake2 python-setuptools
1299 lfsmake2 python-clientform
1300 lfsmake2 python-mechanize
1301 lfsmake2 python-feedparser
1302 lfsmake2 python-rssdler
1303 lfsmake2 python-inotify
1304 lfsmake2 python-docutils
1305 lfsmake2 python-daemon
1306 lfsmake2 python-ipaddress
1309 lfsmake2 noip_updater
1313 lfsmake2 dejavu-fonts-ttf
1314 lfsmake2 ubuntu-font-family
1344 lfsmake2 ghostscript
1347 lfsmake2 cups-filters
1348 lfsmake2 epson-inkjet-printer-escpr
1357 lfsmake2 bridge-utils
1359 lfsmake2 smartmontools
1364 lfsmake2 cyrus-imapd
1365 lfsmake2 openmailadmin
1367 lfsmake2 spamassassin
1403 lfsmake2 pcmciautils
1412 lfsmake2 python-pyparsing
1413 lfsmake2 spice-protocol
1416 lfsmake2 libusbredir
1424 lfsmake2 nagios_nrpe
1431 lfsmake2 vdr_streamdev
1432 lfsmake2 vdr_epgsearch
1437 lfsmake2 icegenerator
1439 lfsmake2 libmpdclient
1441 lfsmake2 perl-Net-SMTP-SSL
1442 lfsmake2 perl-MIME-Base64
1443 lfsmake2 perl-Authen-SASL
1444 lfsmake2 perl-MIME-Lite
1445 lfsmake2 perl-Email-Date-Format
1447 lfsmake2 squidclamav
1450 lfsmake2 wpa_supplicant
1456 lfsmake2 cpufrequtils
1464 lfsmake2 streamripper
1469 lfsmake2 perl-gettext
1470 lfsmake2 perl-Sort-Naturally
1474 lfsmake2 perl-DBD-mysql
1475 lfsmake2 perl-DBD-SQLite
1476 lfsmake2 perl-File-ReadBackwards
1478 lfsmake2 openvmtools
1489 lfsmake2 usb_modeswitch
1490 lfsmake2 usb_modeswitch_data
1500 lfsmake2 python-m2crypto
1501 lfsmake2 wireless-regdb
1504 lfsmake2 python-distutils-extra
1505 lfsmake2 python-lzma
1506 lfsmake2 python-progressbar
1507 lfsmake2 python-xattr
1509 lfsmake2 transmission
1522 lfsmake2 libstatgrab
1524 lfsmake2 check_mk_agent
1531 lfsmake2 ipfire-netboot
1537 lfsmake2 perl-Carp-Clan
1538 lfsmake2 perl-Date-Calc
1539 lfsmake2 perl-Date-Manip
1540 lfsmake2 perl-File-Tail
1541 lfsmake2 perl-TimeDate
1553 lfsmake2 perl-Font-TTF
1554 lfsmake2 perl-IO-String
1555 lfsmake2 perl-PDF-API2
1556 lfsmake2 squid-accounting
1559 lfsmake2 perl-Text-CSV_XS
1569 lfsmake2 util-macros
1570 lfsmake2 libpciaccess
1573 lfsmake2 python3-libvirt
1575 lfsmake2 perl-common-sense
1576 lfsmake2 perl-inotify2
1577 lfsmake2 perl-Net-IP
1583 # Run installer scripts one by one
1584 LOGFILE="$BASEDIR/log
/_build.installer.log
"
1592 LOGFILE="$BASEDIR/log
/_build.packages.log
"
1594 echo "... see detailed log
in _build.
*.log files
" >> $LOGFILE
1597 # Generating list of packages used
1598 echo -n "Generating packages list from logs
" | tee -a $LOGFILE
1599 rm -f $BASEDIR/doc/packages-list
1600 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
1601 if [ "$i" != "$BASEDIR/log
/FILES
" -a -n $i ]; then
1602 echo "* `basename $i`" >>$BASEDIR/doc/packages-list
1605 echo "== List of softwares used to build
$NAME Version
: $VERSION ==" > $BASEDIR/doc/packages-list.txt
1606 grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$\|.tgz$\|-config$\|_missing_rootfile$\|install1$\|install2$\|pass1$\|pass2$\|pass3$' \
1607 $BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
1608 rm -f $BASEDIR/doc/packages-list
1609 # packages-list.txt is ready to be displayed for wiki page
1610 beautify message DONE
1614 [ -z $GIT_TAG ] || LAST_TAG=$GIT_TAG
1615 [ -z $LAST_TAG ] || EXT="$LAST_TAG..HEAD
"
1616 git log -n 500 --no-merges --pretty=medium --shortstat $EXT > $BASEDIR/doc/ChangeLog
1618 # Create images for install
1621 # Check if there is a loop device for building in virtual environments
1622 modprobe loop 2>/dev/null
1623 if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ] || [ -e "/dev
/loop-control
" ]); then
1624 lfsmake2 flash-images
1625 lfsmake2 flash-images SCON=1
1628 mv $LFS/install/images/{*.iso,*.tgz,*.img.gz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
1633 mv $LFS/install/images/*.bz2 $BASEDIR >> $LOGFILE 2>&1
1637 # remove not useable iso on armv5tel (needed to build flash images)
1638 [ "${BUILD_ARCH}" = "armv5tel
" ] && rm -rf *.iso
1640 for i in `ls *.bz2 *.img.gz *.iso`; do
1647 rm -rf $BASEDIR/build/tmp/*
1649 # Generating total list of files
1650 echo -n "Generating files list from logs
" | tee -a $LOGFILE
1651 rm -f $BASEDIR/log/FILES
1652 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
1653 if [ "$i" != "$BASEDIR/log
/FILES
" -a -n $i ]; then
1654 echo "##" >>$BASEDIR/log/FILES
1655 echo "## `basename $i`" >>$BASEDIR/log
/FILES
1656 echo "##" >>$BASEDIR/log
/FILES
1657 cat $i |
sed "s%^\./%#%" |
sort >> $BASEDIR/log
/FILES
1660 beautify message DONE
1666 lfsmake2 core-updates
1669 for i
in $
(find $BASEDIR/config
/rootfiles
/packages
{/${BUILD_ARCH},} -maxdepth 1 -type f
); do
1671 if [ -e $BASEDIR/lfs
/$i ]; then
1675 beautify message SKIP
1678 test -d $BASEDIR/packages || mkdir
$BASEDIR/packages
1679 mv -f $LFS/install
/packages
/* $BASEDIR/packages
>> $LOGFILE 2>&1
1680 rm -rf $BASEDIR/build
/install
/packages
/*
1683 while [ $# -gt 0 ]; do
1686 configure_build
"${1#--target=}"
1689 exiterror
"Unknown configuration option: ${1}"
1692 # Found a command, so exit options parsing.
1699 # See what we're supposed to do
1703 PACKAGE
=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz 2> /dev/null | head -n 1`
1704 #only restore on a clean disk
1705 if [ ! -e "${BASEDIR}/build${TOOLS_DIR}/.toolchain-successful" ]; then
1706 if [ ! -n "$PACKAGE" ]; then
1707 beautify build_stage
"Full toolchain compilation"
1711 PACKAGENAME
=${PACKAGE%.tar.gz}
1712 beautify build_stage
"Packaged toolchain compilation"
1713 if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
1717 exiterror
"$PACKAGENAME md5 did not match, check downloaded package"
1721 echo -n "Using installed toolchain" |
tee -a $LOGFILE
1722 beautify message SKIP
1726 beautify build_start
1727 beautify build_stage
"Building LFS"
1730 beautify build_stage
"Building IPFire"
1733 beautify build_stage
"Building installer"
1736 beautify build_stage
"Building packages"
1739 beautify build_stage
"Checking Logfiles for new Files"
1742 tools
/checknewlog.pl
1743 tools
/checkrootfiles
1749 # enter a shell inside LFS chroot
1750 # may be used to changed kernel settings
1755 echo -en "${BOLD}Cleaning build directory...${NORMAL}"
1756 for i
in `mount | grep $BASEDIR | sed 's/^.*loop=\(.*\))/\1/'`; do
1757 $LOSETUP -d $i 2>/dev
/null
1759 for i
in `mount | grep $BASEDIR | cut -d " " -f 1`; do
1763 for i
in `seq 0 7`; do
1764 if ( losetup
/dev
/loop
${i} 2>/dev
/null |
grep -q "/install/images" ); then
1765 umount
/dev
/loop
${i} 2>/dev
/null
;
1766 losetup
-d /dev
/loop
${i} 2>/dev
/null
;
1769 rm -rf $BASEDIR/build
1770 rm -rf $BASEDIR/cdrom
1771 rm -rf $BASEDIR/packages
1773 if [ -h "${TOOLS_DIR}" ]; then
1774 rm -f "${TOOLS_DIR}"
1776 rm -f $BASEDIR/ipfire-
*
1777 beautify message DONE
1780 if [ ! -d $BASEDIR/cache
]; then
1781 mkdir
$BASEDIR/cache
1783 mkdir
-p $BASEDIR/log
1784 echo -e "${BOLD}Preload all source files${NORMAL}" |
tee -a $LOGFILE
1787 for c
in `seq $MAX_RETRIES`; do
1788 if (( FINISHED
==1 )); then
1794 if [ -f "$i" -a "$i" != "Config" ]; then
1795 lfsmakecommoncheck
${i} ||
continue
1797 make -s -f $i LFS_BASEDIR
=$BASEDIR BUILD_ARCH
="${BUILD_ARCH}" \
1798 MESSAGE
="$i\t ($c/$MAX_RETRIES)" download
>> $LOGFILE 2>&1
1799 if [ $?
-ne 0 ]; then
1800 beautify message FAIL
1803 if [ $c -eq 1 ]; then
1804 beautify message DONE
1810 echo -e "${BOLD}***Verifying md5sums${NORMAL}"
1813 if [ -f "$i" -a "$i" != "Config" ]; then
1814 lfsmakecommoncheck
${i} > /dev
/null ||
continue
1815 make -s -f $i LFS_BASEDIR
=$BASEDIR BUILD_ARCH
="${BUILD_ARCH}" \
1816 MESSAGE
="$i\t " md5
>> $LOGFILE 2>&1
1817 if [ $?
-ne 0 ]; then
1818 echo -ne "MD5 difference in lfs/$i"
1819 beautify message FAIL
1824 if [ $ERROR -eq 0 ]; then
1825 echo -ne "${BOLD}all files md5sum match${NORMAL}"
1826 beautify message DONE
1828 echo -ne "${BOLD}not all files were correctly download${NORMAL}"
1829 beautify message FAIL
1831 cd - >/dev
/null
2>&1
1836 beautify build_stage
"Toolchain compilation"
1838 echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for ${BUILD_ARCH}" |
tee -a $LOGFILE
1839 test -d $BASEDIR/cache
/toolchains || mkdir
-p $BASEDIR/cache
/toolchains
1840 cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache
/toolchains
/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.
tar.gz \
1841 build
/${TOOLS_DIR} build
/bin
/sh log
>> $LOGFILE
1842 md5sum cache
/toolchains
/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.
tar.gz \
1843 > cache
/toolchains
/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
1847 # arbitrary name to be updated in case of new toolchain package upload
1848 PACKAGE
=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}
1849 if [ ! -f $BASEDIR/cache
/toolchains
/$PACKAGE.
tar.gz
]; then
1850 URL_TOOLCHAIN
=`grep URL_TOOLCHAIN lfs/Config | awk '{ print $3 }'`
1851 test -d $BASEDIR/cache
/toolchains || mkdir
-p $BASEDIR/cache
/toolchains
1852 echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for ${BUILD_ARCH}" |
tee -a $LOGFILE
1853 cd $BASEDIR/cache
/toolchains
1854 wget
-U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.
tar.gz
$URL_TOOLCHAIN/$PACKAGE.md5
>& /dev
/null
1855 if [ $?
-ne 0 ]; then
1856 echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for ${BUILD_ARCH} machine" |
tee -a $LOGFILE
1858 if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
1859 echo "`date -u '+%b %e %T'`: toolchain md5 ok" |
tee -a $LOGFILE
1861 exiterror
"$PACKAGE.md5 did not match, check downloaded package"
1865 echo "Toolchain is already downloaded. Exiting..."
1870 if [ -z $IPFIRE_USER ]; then
1871 echo -n "You have to setup IPFIRE_USER first. See .config for details."
1872 beautify message FAIL
1876 URL_SOURCE
=$
(grep URL_SOURCE lfs
/Config |
awk '{ print $3 }')
1877 REMOTE_FILES
=$
(echo "ls -1" | sftp
-C ${IPFIRE_USER}@
${URL_SOURCE})
1879 for file in ${BASEDIR}/cache
/*; do
1880 [ -d "${file}" ] && continue
1881 grep -q "$(basename ${file})" <<<$REMOTE_FILES && continue
1882 NEW_FILES
="$NEW_FILES $file"
1884 [ -n "$NEW_FILES" ] && scp
-2 $NEW_FILES ${IPFIRE_USER}@
${URL_SOURCE}
1890 echo -ne "Checking the translations for missing or obsolete strings..."
1891 chmod 755 $BASEDIR/tools
/{check_strings.pl
,sort_strings.pl
,check_langs.sh
}
1892 $BASEDIR/tools
/sort_strings.pl en
1893 $BASEDIR/tools
/sort_strings.pl de
1894 $BASEDIR/tools
/sort_strings.pl fr
1895 $BASEDIR/tools
/sort_strings.pl es
1896 $BASEDIR/tools
/sort_strings.pl pl
1897 $BASEDIR/tools
/sort_strings.pl ru
1898 $BASEDIR/tools
/sort_strings.pl
nl
1899 $BASEDIR/tools
/sort_strings.pl
tr
1900 $BASEDIR/tools
/sort_strings.pl it
1901 $BASEDIR/tools
/check_strings.pl en
> $BASEDIR/doc
/language_issues.en
1902 $BASEDIR/tools
/check_strings.pl de
> $BASEDIR/doc
/language_issues.de
1903 $BASEDIR/tools
/check_strings.pl fr
> $BASEDIR/doc
/language_issues.fr
1904 $BASEDIR/tools
/check_strings.pl es
> $BASEDIR/doc
/language_issues.es
1905 $BASEDIR/tools
/check_strings.pl es
> $BASEDIR/doc
/language_issues.pl
1906 $BASEDIR/tools
/check_strings.pl ru
> $BASEDIR/doc
/language_issues.ru
1907 $BASEDIR/tools
/check_strings.pl
nl > $BASEDIR/doc
/language_issues.
nl
1908 $BASEDIR/tools
/check_strings.pl
tr > $BASEDIR/doc
/language_issues.
tr
1909 $BASEDIR/tools
/check_strings.pl it
> $BASEDIR/doc
/language_issues.it
1910 $BASEDIR/tools
/check_langs.sh
> $BASEDIR/doc
/language_missings
1911 beautify message DONE
1913 echo -ne "Updating language lists..."
1914 update_language_list
${BASEDIR}/src
/installer
/po
1915 update_language_list
${BASEDIR}/src
/setup
/po
1916 beautify message DONE
1919 echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}"
1920 cat doc
/make.sh-usage