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 export BASEDIR
=$
(echo $FULLPATH |
sed "s/\/$BASENAME//g")
105 LOGFILE
=$BASEDIR/log
/_build.preparation.log
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 # Are we running the right shell?
431 if [ ! -z "${BASH}" ]; then
432 exiterror
"BASH environment variable is not set. You're probably running the wrong shell."
435 if [ -z "${BASH_VERSION}" ]; then
436 exiterror
"Not running BASH shell."
439 # Trap on emergency exit
440 trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGKILL SIGSTOP SIGQUIT
442 # Resetting our nice level
443 echo -ne "Resetting our nice level to $NICE" |
tee -a $LOGFILE
444 renice
$NICE $$
> /dev
/null
445 if [ `nice` != "$NICE" ]; then
446 beautify message FAIL
447 exiterror
"Failed to set correct nice level"
449 beautify message DONE
452 # Checking if running as root user
453 echo -ne "Checking if we're running as root user" |
tee -a $LOGFILE
454 if [ `id -u` != 0 ]; then
455 beautify message FAIL
456 exiterror
"Not building as root"
458 beautify message DONE
461 # Checking for necessary temporary space
462 echo -ne "Checking for necessary space on disk $BASE_DEV" |
tee -a $LOGFILE
463 BASE_DEV
=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $1 }'`
464 BASE_ASPACE
=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $4 }'`
465 if (( 2048000 > $BASE_ASPACE )); then
466 BASE_USPACE
=`du -skx $BASEDIR | awk '{print $1}'`
467 if (( 2048000 - $BASE_USPACE > $BASE_ASPACE )); then
468 beautify message FAIL
469 exiterror
"Not enough temporary space available, need at least 2GB on $BASE_DEV"
472 beautify message DONE
481 # Check ${TOOLS_DIR} symlink
482 if [ -h "${TOOLS_DIR}" ]; then
486 if [ ! -e "${TOOLS_DIR}" ]; then
487 ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}"
490 if [ ! -h "${TOOLS_DIR}" ]; then
491 exiterror
"Could not create ${TOOLS_DIR} symbolic link"
497 export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
498 unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
500 # Make some extra directories
501 mkdir
-p "${BASEDIR}/build${TOOLS_DIR}" 2>/dev
/null
502 mkdir
-p $BASEDIR/build
/{etc
,usr
/src
} 2>/dev
/null
503 mkdir
-p $BASEDIR/build
/{dev
/{shm
,pts
},proc
,sys
}
504 mkdir
-p $BASEDIR/{cache
,ccache
} 2>/dev
/null
505 mkdir
-p $BASEDIR/build
/usr
/src
/{cache
,config
,doc
,html
,langs
,lfs
,log
,src
,ccache
}
507 mknod
-m 600 $BASEDIR/build
/dev
/console c
5 1 2>/dev
/null
508 mknod
-m 666 $BASEDIR/build
/dev
/null c
1 3 2>/dev
/null
510 # Make all sources and proc available under lfs build
511 mount
--bind /dev
$BASEDIR/build
/dev
512 mount
--bind /dev
/pts
$BASEDIR/build
/dev
/pts
513 mount
--bind /dev
/shm
$BASEDIR/build
/dev
/shm
514 mount
--bind /proc
$BASEDIR/build
/proc
515 mount
--bind /sys
$BASEDIR/build
/sys
516 mount
--bind $BASEDIR/cache
$BASEDIR/build
/usr
/src
/cache
517 mount
--bind $BASEDIR/ccache
$BASEDIR/build
/usr
/src
/ccache
518 mount
--bind $BASEDIR/config
$BASEDIR/build
/usr
/src
/config
519 mount
--bind $BASEDIR/doc
$BASEDIR/build
/usr
/src
/doc
520 mount
--bind $BASEDIR/html
$BASEDIR/build
/usr
/src
/html
521 mount
--bind $BASEDIR/langs
$BASEDIR/build
/usr
/src
/langs
522 mount
--bind $BASEDIR/lfs
$BASEDIR/build
/usr
/src
/lfs
523 mount
--bind $BASEDIR/log
$BASEDIR/build
/usr
/src
/log
524 mount
--bind $BASEDIR/src
$BASEDIR/build
/usr
/src
/src
526 # Run LFS static binary creation scripts one by one
527 export CCACHE_DIR
=$BASEDIR/ccache
528 export CCACHE_COMPRESS
=1
529 export CCACHE_COMPILERCHECK
="string:toolchain-${TOOLCHAINVER} ${BUILD_ARCH}"
531 # Remove pre-install list of installed files in case user erase some files before rebuild
532 rm -f $BASEDIR/build
/usr
/src
/lsalr
2>/dev
/null
534 # Prepare string for /etc/system-release.
535 SYSTEM_RELEASE
="${NAME} ${VERSION} (${BUILD_ARCH})"
536 if [ "$(git status -s | wc -l)" == "0" ]; then
541 case "$GIT_BRANCH" in
543 SYSTEM_RELEASE
="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS"
546 SYSTEM_RELEASE
="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS"
552 # Install QEMU helper, if needed
555 local PATH
="${TOOLS_DIR}/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:${TOOLS_DIR}/bin"
557 PATH
="${PATH}" chroot
${LFS} env
-i \
562 SYSTEM_RELEASE
="${SYSTEM_RELEASE}" \
563 PAKFIRE_CORE
="${PAKFIRE_CORE}" \
566 VERSION
="${VERSION}" \
569 TOOLS_DIR
="${TOOLS_DIR}" \
570 CONFIG_ROOT
="${CONFIG_ROOT}" \
571 CFLAGS
="${CFLAGS} ${HARDENING_CFLAGS}" \
572 CXXFLAGS
="${CXXFLAGS} ${HARDENING_CFLAGS}" \
573 BUILDTARGET
="${BUILDTARGET}" \
574 CROSSTARGET
="${CROSSTARGET}" \
575 BUILD_ARCH
="${BUILD_ARCH}" \
576 BUILD_PLATFORM
="${BUILD_PLATFORM}" \
577 CCACHE_DIR
=/usr
/src
/ccache \
578 CCACHE_COMPRESS
="${CCACHE_COMPRESS}" \
579 CCACHE_COMPILERCHECK
="${CCACHE_COMPILERCHECK}" \
587 if [ ! -e $BASEDIR/build
/usr
/src
/lfs
/ ]; then
588 exiterror
"No such file or directory: $BASEDIR/build/usr/src/lfs/"
591 echo "Entering to a shell inside LFS chroot, go out with exit"
592 local PS1
="ipfire build chroot ($(uname -m)) \u:\w\$ "
594 if enterchroot bash
-i; then
597 beautify message FAIL
598 exiterror
"chroot error"
602 lfsmakecommoncheck
() {
604 if [ ! -f $BASEDIR/lfs
/$1 ]; then
605 exiterror
"No such file or directory: $BASEDIR/$1"
608 local PKG_VER
=`get_pkg_ver $BASEDIR/lfs/$1`
609 beautify make_pkg
"$PKG_VER $*"
611 # Check if this package is supported by our architecture.
612 # If no SUP_ARCH is found, we assume the package can be built for all.
613 if grep "^SUP_ARCH" ${BASEDIR}/lfs
/${1} >/dev
/null
; then
614 # Check if package supports ${BUILD_ARCH} or all architectures.
615 if ! grep -E "^SUP_ARCH.*${BUILD_ARCH}|^SUP_ARCH.*all" ${BASEDIR}/lfs/${1} >/dev/null; then
623 for i in $SKIP_PACKAGE_LIST
625 if [ "$i" == "$1" ]; then
631 echo -ne "`date -u '+%b %e %T'`: Building $
* " >> $LOGFILE
633 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \
634 MESSAGE="$1\t " download >> $LOGFILE 2>&1
635 if [ $? -ne 0 ]; then
636 exiterror "Download error
in $1"
639 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR BUILD_ARCH="${BUILD_ARCH}" \
640 MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
641 if [ $? -ne 0 ]; then
642 exiterror "md5sum error
in $1, check
file in cache or signature
"
649 lfsmakecommoncheck $*
650 [ $? == 1 ] && return 0
652 local PKG_TIME_START=`date +%s`
654 cd $BASEDIR/lfs && env -i \
655 PATH="${TOOLS_DIR}/ccache
/bin
:${TOOLS_DIR}/bin
:$PATH" \
656 CCACHE_DIR="${CCACHE_DIR}" \
657 CCACHE_COMPRESS="${CCACHE_COMPRESS}" \
658 CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
660 CXXFLAGS="${CXXFLAGS}" \
661 MAKETUNING="${MAKETUNING}" \
664 TOOLS_DIR="${TOOLS_DIR}" \
665 CROSSTARGET="${CROSSTARGET}" \
666 BUILDTARGET="${BUILDTARGET}" \
667 BUILD_ARCH="${BUILD_ARCH}" \
668 BUILD_PLATFORM="${BUILD_PLATFORM}" \
669 LFS_BASEDIR="${BASEDIR}" \
672 install >> $LOGFILE 2>&1
674 local COMPILE_SUCCESS=$?
675 local PKG_TIME_END=`date +%s`
677 if [ $COMPILE_SUCCESS -ne 0 ]; then
678 beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
679 exiterror "Building $
*";
681 beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
688 lfsmakecommoncheck $*
689 [ $? == 1 ] && return 0
691 local PKG_TIME_START=`date +%s`
695 bash -x -c "cd /usr
/src
/lfs
&& \
696 MAKETUNING
=${MAKETUNING} \
698 LFS_BASEDIR
=/usr
/src
install" \
701 local COMPILE_SUCCESS=$?
702 local PKG_TIME_END=`date +%s`
704 if [ $COMPILE_SUCCESS -ne 0 ]; then
705 beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
706 exiterror "Building $
*";
708 beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
715 lfsmakecommoncheck $*
716 [ $? == 1 ] && return 0
718 local PKG_TIME_START=`date +%s`
722 bash -x -c "cd /usr
/src
/lfs
&& make -f $
* LFS_BASEDIR
=/usr
/src dist
" \
725 local COMPILE_SUCCESS=$?
726 local PKG_TIME_END=`date +%s`
728 if [ $COMPILE_SUCCESS -ne 0 ]; then
729 beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ]
730 exiterror "Packaging $
*";
732 beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ]
738 [ -e "${BASEDIR}/build
${TOOLS_DIR}/lib
/libpakfire_preload.so
" ] || return
740 local env="LD_PRELOAD
=${TOOLS_DIR}/lib
/libpakfire_preload.so
"
742 # Fake kernel version, because some of the packages do not compile
743 # with kernel 3.0 and later.
744 env="${env} UTS_RELEASE
=${KVER}"
746 # Fake machine version.
747 env="${env} UTS_MACHINE
=${BUILD_ARCH}"
755 # Don't add anything if qemu is not used.
756 if ! qemu_is_required; then
760 # Set default qemu options
761 case "${BUILD_ARCH}" in
763 QEMU_CPU="${QEMU_CPU:-cortex-a9}"
765 env="${env} QEMU_CPU
=${QEMU_CPU}"
770 #env="${env} QEMU_STRACE
=1"
776 local build_arch="${1}"
778 if [ -z "${build_arch}" ]; then
779 build_arch="${BUILD_ARCH}"
782 case "${HOST_ARCH},${build_arch}" in
783 x86_64,arm*|i?86,arm*|i?86,x86_64)
792 qemu_install_helper() {
793 # Do nothing, if qemu is not required
794 if ! qemu_is_required; then
798 if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
799 exiterror "binfmt_misc not mounted. QEMU_TARGET_HELPER not useable.
"
802 if [ ! $(cat /proc/sys/fs/binfmt_misc/status) = 'enabled' ]; then
803 exiterror "binfmt_misc not enabled. QEMU_TARGET_HELPER not useable.
"
807 if [ -z "${QEMU_TARGET_HELPER}" ]; then
808 exiterror "QEMU_TARGET_HELPER not
set"
811 # Check if the helper is already installed.
812 if [ -x "${LFS}${QEMU_TARGET_HELPER}" ]; then
816 # Try to find a suitable binary that we can install
817 # to the build environment.
819 for file in "${QEMU_TARGET_HELPER}" "${QEMU_TARGET_HELPER}-static"; do
820 # file must exist and be executable.
821 [ -x "${file}" ] || continue
824 file_is_static "${file}" || continue
826 local dirname="${LFS}$
(dirname "${file}")"
827 mkdir -p "${dirname}"
829 install -m 755 "${file}" "${LFS}${QEMU_TARGET_HELPER}"
833 exiterror "Could not
find a statically-linked QEMU emulator
: ${QEMU_TARGET_HELPER}"
836 qemu_find_build_helper_name() {
837 local build_arch="${1}"
840 case "${build_arch}" in
842 magic="7f454c4601010100000000000000000002002800
"
845 magic="7f454c4602010100000000000000000002003e00
"
849 [ -z "${magic}" ] && return 1
852 for file in /proc/sys/fs/binfmt_misc/*; do
853 # skip write only register entry
854 [ $(basename "${file}") = "register
" ] && continue
855 # Search for the file with the correct magic value.
856 grep -qE "^magic
${magic}$
" "${file}" || continue
858 local interpreter="$
(grep "^interpreter" "${file}" |
awk '{ print $2 }')"
860 [ -n "${interpreter}" ] || continue
861 [ "${interpreter:0:1}" = "/" ] || continue
862 [ -x "${interpreter}" ] || continue
864 echo "${interpreter}"
874 file ${file} 2>/dev/null | grep -q "statically linked
"
877 update_language_list() {
881 for lang in ${path}/*.po; do
882 lang="$
(basename "${lang}")"
884 done | sort -u > "${path}/LINGUAS
"
887 # Load configuration file
888 if [ -f .config ]; then
892 # TARGET_ARCH is BUILD_ARCH now
893 if [ -n "${TARGET_ARCH}" ]; then
894 BUILD_ARCH="${TARGET_ARCH}"
898 # Get the amount of memory in this build system
899 HOST_MEM=$(system_memory)
901 if [ -n "${BUILD_ARCH}" ]; then
902 configure_build "${BUILD_ARCH}"
904 configure_build "default
"
909 case "${BUILD_ARCH}:${HOST_ARCH}" in
916 i586:i586|i586:i686|i586:x86_64)
924 arvm7hl:armv7hl|armv7hl:armv7l)
928 armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv6l|armv5tel:armv7l|armv5tel:aarch64)
937 exiterror "Cannot build
${BUILD_ARCH} toolchain on $
(uname
-m). Please use the download
if any.
"
939 local gcc=$(type -p gcc)
940 if [ -z "${gcc}" ]; then
941 exiterror "Could not
find GCC. You will need a working build enviroment
in order to build the toolchain.
"
944 LOGFILE="$BASEDIR/log
/_build.toolchain.log
"
948 lfsmake1 ccache PASS=1
949 lfsmake1 binutils PASS=1
951 lfsmake1 linux KCFG="-headers"
954 lfsmake1 binutils PASS=2
956 lfsmake1 ccache PASS=2
980 lfsmake1 fake-environ
981 lfsmake1 cleanup-toolchain
985 LOGFILE="$BASEDIR/log
/_build.base.log
"
988 lfsmake2 linux KCFG="-headers"
992 lfsmake2 cleanup-toolchain
1009 lfsmake2 ncurses-compat
1015 lfsmake2 readline-compat
1018 lfsmake2 pcre-compat
1055 LOGFILE="$BASEDIR/log
/_build.ipfire.log
"
1058 lfsmake2 initscripts
1062 lfsmake2 libusb-compat
1068 lfsmake2 linux-firmware
1069 lfsmake2 ath10k-firmware
1070 lfsmake2 dvb-firmwares
1071 lfsmake2 mt7601u-firmware
1072 lfsmake2 zd1211-firmware
1073 lfsmake2 rpi-firmware
1080 lfsmake2 multipath-tools
1084 lfsmake2 libnfnetlink
1085 lfsmake2 libnetfilter_queue
1086 lfsmake2 libnetfilter_conntrack
1087 lfsmake2 libnetfilter_cthelper
1088 lfsmake2 libnetfilter_cttimeout
1091 case "${BUILD_ARCH}" in
1093 lfsmake2 linux KCFG=""
1094 lfsmake2 backports KCFG=""
1095 lfsmake2 e1000e KCFG=""
1096 lfsmake2 igb KCFG=""
1097 lfsmake2 ixgbe KCFG=""
1098 lfsmake2 xtables-addons KCFG=""
1099 lfsmake2 linux-initrd KCFG=""
1102 # x86-pae (Native and new XEN) kernel build
1103 lfsmake2 linux KCFG="-pae"
1104 lfsmake2 backports KCFG="-pae"
1105 lfsmake2 e1000e KCFG="-pae"
1106 lfsmake2 igb KCFG="-pae"
1107 lfsmake2 ixgbe KCFG="-pae"
1108 lfsmake2 xtables-addons KCFG="-pae"
1109 lfsmake2 linux-initrd KCFG="-pae"
1112 lfsmake2 linux KCFG=""
1113 lfsmake2 backports KCFG=""
1114 lfsmake2 e1000e KCFG=""
1115 lfsmake2 igb KCFG=""
1116 lfsmake2 ixgbe KCFG=""
1117 lfsmake2 xtables-addons KCFG=""
1118 lfsmake2 linux-initrd KCFG=""
1122 # arm-rpi (Raspberry Pi) kernel build
1123 lfsmake2 linux KCFG="-rpi"
1124 lfsmake2 backports KCFG="-rpi"
1125 lfsmake2 xtables-addons KCFG="-rpi"
1126 lfsmake2 linux-initrd KCFG="-rpi"
1128 # arm multi platform (Panda, Wandboard ...) kernel build
1129 lfsmake2 linux KCFG="-multi"
1130 lfsmake2 backports KCFG="-multi"
1131 lfsmake2 e1000e KCFG="-multi"
1132 lfsmake2 igb KCFG="-multi"
1133 lfsmake2 ixgbe KCFG="-multi"
1134 lfsmake2 xtables-addons KCFG="-multi"
1135 lfsmake2 linux-initrd KCFG="-multi"
1137 # arm-kirkwood (Dreamplug, ICY-Box ...) kernel build
1138 lfsmake2 linux KCFG="-kirkwood"
1139 lfsmake2 backports KCFG="-kirkwood"
1140 lfsmake2 e1000e KCFG="-kirkwood"
1141 lfsmake2 igb KCFG="-kirkwood"
1142 lfsmake2 ixgbe KCFG="-kirkwood"
1143 lfsmake2 xtables-addons KCFG="-kirkwood"
1144 lfsmake2 linux-initrd KCFG="-kirkwood"
1147 lfsmake2 xtables-addons USPACE="1"
1149 [ "${BUILD_ARCH}" = "i586
" ] && lfsmake2 openssl KCFG='-sse2'
1150 lfsmake2 libgpg-error
1156 lfsmake2 libevent2-compat
1175 lfsmake2 ca-certificates
1183 lfsmake2 libjpeg-compat
1206 lfsmake2 web-user-interface
1214 lfsmake2 reiserfsprogs
1220 lfsmake2 ez-ipupdate
1224 lfsmake2 GD-TextUtil
1225 lfsmake2 perl-Device-SerialPort
1226 lfsmake2 perl-Device-Modem
1227 lfsmake2 perl-Apache-Htpasswd
1233 lfsmake2 conntrack-tools
1237 lfsmake2 l7-protocols
1239 lfsmake2 capi4k-utils
1246 lfsmake2 HTML-Tagset
1247 lfsmake2 HTML-Parser
1248 lfsmake2 HTML-Template
1249 lfsmake2 Compress-Zlib
1251 lfsmake2 Digest-SHA1
1252 lfsmake2 Digest-HMAC
1253 lfsmake2 libwww-perl
1255 lfsmake2 Net-IPv4Addr
1258 lfsmake2 IO-Socket-SSL
1259 lfsmake2 Unix-Syslog
1263 lfsmake2 Convert-TNEF
1264 lfsmake2 Convert-UUlib
1265 lfsmake2 Archive-Tar
1266 lfsmake2 Archive-Zip
1267 lfsmake2 Text-Tabs+Wrap
1268 lfsmake2 Locale-Country
1270 lfsmake2 Crypt-PasswdMD5
1272 lfsmake2 python-setuptools
1273 lfsmake2 python-clientform
1274 lfsmake2 python-mechanize
1275 lfsmake2 python-feedparser
1276 lfsmake2 python-rssdler
1277 lfsmake2 python-inotify
1278 lfsmake2 python-docutils
1279 lfsmake2 python-daemon
1280 lfsmake2 python-ipaddress
1283 lfsmake2 noip_updater
1287 lfsmake2 dejavu-fonts-ttf
1288 lfsmake2 ubuntu-font-family
1318 lfsmake2 ghostscript
1321 lfsmake2 cups-filters
1322 lfsmake2 epson-inkjet-printer-escpr
1331 lfsmake2 bridge-utils
1333 lfsmake2 smartmontools
1338 lfsmake2 cyrus-imapd
1339 lfsmake2 openmailadmin
1341 lfsmake2 spamassassin
1377 lfsmake2 pcmciautils
1386 lfsmake2 python-pyparsing
1387 lfsmake2 spice-protocol
1390 lfsmake2 libusbredir
1398 lfsmake2 nagios_nrpe
1405 lfsmake2 vdr_streamdev
1406 lfsmake2 vdr_epgsearch
1411 lfsmake2 icegenerator
1413 lfsmake2 libmpdclient
1415 lfsmake2 perl-Net-SMTP-SSL
1416 lfsmake2 perl-MIME-Base64
1417 lfsmake2 perl-Authen-SASL
1418 lfsmake2 perl-MIME-Lite
1419 lfsmake2 perl-Email-Date-Format
1421 lfsmake2 squidclamav
1424 lfsmake2 wpa_supplicant
1430 lfsmake2 cpufrequtils
1438 lfsmake2 streamripper
1443 lfsmake2 perl-gettext
1444 lfsmake2 perl-Sort-Naturally
1448 lfsmake2 perl-DBD-mysql
1449 lfsmake2 perl-DBD-SQLite
1450 lfsmake2 perl-File-ReadBackwards
1452 lfsmake2 openvmtools
1463 lfsmake2 usb_modeswitch
1464 lfsmake2 usb_modeswitch_data
1474 lfsmake2 python-m2crypto
1475 lfsmake2 wireless-regdb
1478 lfsmake2 python-distutils-extra
1479 lfsmake2 python-lzma
1480 lfsmake2 python-progressbar
1481 lfsmake2 python-xattr
1483 lfsmake2 transmission
1496 lfsmake2 libstatgrab
1498 lfsmake2 check_mk_agent
1505 lfsmake2 ipfire-netboot
1511 lfsmake2 perl-Carp-Clan
1512 lfsmake2 perl-Date-Calc
1513 lfsmake2 perl-Date-Manip
1514 lfsmake2 perl-File-Tail
1515 lfsmake2 perl-TimeDate
1527 lfsmake2 perl-Font-TTF
1528 lfsmake2 perl-IO-String
1529 lfsmake2 perl-PDF-API2
1530 lfsmake2 squid-accounting
1533 lfsmake2 perl-Text-CSV_XS
1543 lfsmake2 util-macros
1544 lfsmake2 libpciaccess
1547 lfsmake2 python3-libvirt
1549 lfsmake2 perl-common-sense
1550 lfsmake2 perl-inotify2
1551 lfsmake2 perl-Net-IP
1557 # Run installer scripts one by one
1558 LOGFILE="$BASEDIR/log
/_build.installer.log
"
1566 LOGFILE="$BASEDIR/log
/_build.packages.log
"
1568 echo "... see detailed log
in _build.
*.log files
" >> $LOGFILE
1571 # Generating list of packages used
1572 echo -n "Generating packages list from logs
" | tee -a $LOGFILE
1573 rm -f $BASEDIR/doc/packages-list
1574 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
1575 if [ "$i" != "$BASEDIR/log
/FILES
" -a -n $i ]; then
1576 echo "* `basename $i`" >>$BASEDIR/doc/packages-list
1579 echo "== List of softwares used to build
$NAME Version
: $VERSION ==" > $BASEDIR/doc/packages-list.txt
1580 grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$\|.tgz$\|-config$\|_missing_rootfile$\|install1$\|install2$\|pass1$\|pass2$\|pass3$' \
1581 $BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
1582 rm -f $BASEDIR/doc/packages-list
1583 # packages-list.txt is ready to be displayed for wiki page
1584 beautify message DONE
1588 [ -z $GIT_TAG ] || LAST_TAG=$GIT_TAG
1589 [ -z $LAST_TAG ] || EXT="$LAST_TAG..HEAD
"
1590 git log -n 500 --no-merges --pretty=medium --shortstat $EXT > $BASEDIR/doc/ChangeLog
1592 # Create images for install
1595 # Check if there is a loop device for building in virtual environments
1596 modprobe loop 2>/dev/null
1597 if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ] || [ -e "/dev
/loop-control
" ]); then
1598 lfsmake2 flash-images
1599 lfsmake2 flash-images SCON=1
1602 mv $LFS/install/images/{*.iso,*.tgz,*.img.gz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
1607 mv $LFS/install/images/*.bz2 $BASEDIR >> $LOGFILE 2>&1
1611 # remove not useable iso on armv5tel (needed to build flash images)
1612 [ "${BUILD_ARCH}" = "armv5tel
" ] && rm -rf *.iso
1614 for i in `ls *.bz2 *.img.gz *.iso`; do
1621 rm -rf $BASEDIR/build/tmp/*
1623 # Generating total list of files
1624 echo -n "Generating files list from logs
" | tee -a $LOGFILE
1625 rm -f $BASEDIR/log/FILES
1626 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
1627 if [ "$i" != "$BASEDIR/log
/FILES
" -a -n $i ]; then
1628 echo "##" >>$BASEDIR/log/FILES
1629 echo "## `basename $i`" >>$BASEDIR/log
/FILES
1630 echo "##" >>$BASEDIR/log
/FILES
1631 cat $i |
sed "s%^\./%#%" |
sort >> $BASEDIR/log
/FILES
1634 beautify message DONE
1640 lfsmake2 core-updates
1643 for i
in $
(find $BASEDIR/config
/rootfiles
/packages
{/${BUILD_ARCH},} -maxdepth 1 -type f
); do
1645 if [ -e $BASEDIR/lfs
/$i ]; then
1649 beautify message SKIP
1652 test -d $BASEDIR/packages || mkdir
$BASEDIR/packages
1653 mv -f $LFS/install
/packages
/* $BASEDIR/packages
>> $LOGFILE 2>&1
1654 rm -rf $BASEDIR/build
/install
/packages
/*
1657 while [ $# -gt 0 ]; do
1660 configure_build
"${1#--target=}"
1663 exiterror
"Unknown configuration option: ${1}"
1666 # Found a command, so exit options parsing.
1673 # See what we're supposed to do
1677 PACKAGE
=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz 2> /dev/null | head -n 1`
1678 #only restore on a clean disk
1679 if [ ! -e "${BASEDIR}/build${TOOLS_DIR}/.toolchain-successful" ]; then
1680 if [ ! -n "$PACKAGE" ]; then
1681 beautify build_stage
"Full toolchain compilation"
1685 PACKAGENAME
=${PACKAGE%.tar.gz}
1686 beautify build_stage
"Packaged toolchain compilation"
1687 if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
1691 exiterror
"$PACKAGENAME md5 did not match, check downloaded package"
1695 echo -n "Using installed toolchain" |
tee -a $LOGFILE
1696 beautify message SKIP
1700 beautify build_start
1701 beautify build_stage
"Building LFS"
1704 beautify build_stage
"Building IPFire"
1707 beautify build_stage
"Building installer"
1710 beautify build_stage
"Building packages"
1713 beautify build_stage
"Checking Logfiles for new Files"
1716 tools
/checknewlog.pl
1717 tools
/checkrootfiles
1723 # enter a shell inside LFS chroot
1724 # may be used to changed kernel settings
1729 echo -en "${BOLD}Cleaning build directory...${NORMAL}"
1730 for i
in `mount | grep $BASEDIR | sed 's/^.*loop=\(.*\))/\1/'`; do
1731 $LOSETUP -d $i 2>/dev
/null
1733 for i
in `mount | grep $BASEDIR | cut -d " " -f 1`; do
1737 for i
in `seq 0 7`; do
1738 if ( losetup
/dev
/loop
${i} 2>/dev
/null |
grep -q "/install/images" ); then
1739 umount
/dev
/loop
${i} 2>/dev
/null
;
1740 losetup
-d /dev
/loop
${i} 2>/dev
/null
;
1743 rm -rf $BASEDIR/build
1744 rm -rf $BASEDIR/cdrom
1745 rm -rf $BASEDIR/packages
1747 if [ -h "${TOOLS_DIR}" ]; then
1748 rm -f "${TOOLS_DIR}"
1750 rm -f $BASEDIR/ipfire-
*
1751 beautify message DONE
1754 if [ ! -d $BASEDIR/cache
]; then
1755 mkdir
$BASEDIR/cache
1757 mkdir
-p $BASEDIR/log
1758 echo -e "${BOLD}Preload all source files${NORMAL}" |
tee -a $LOGFILE
1761 for c
in `seq $MAX_RETRIES`; do
1762 if (( FINISHED
==1 )); then
1768 if [ -f "$i" -a "$i" != "Config" ]; then
1769 lfsmakecommoncheck
${i} ||
continue
1771 make -s -f $i LFS_BASEDIR
=$BASEDIR BUILD_ARCH
="${BUILD_ARCH}" \
1772 MESSAGE
="$i\t ($c/$MAX_RETRIES)" download
>> $LOGFILE 2>&1
1773 if [ $?
-ne 0 ]; then
1774 beautify message FAIL
1777 if [ $c -eq 1 ]; then
1778 beautify message DONE
1784 echo -e "${BOLD}***Verifying md5sums${NORMAL}"
1787 if [ -f "$i" -a "$i" != "Config" ]; then
1788 lfsmakecommoncheck
${i} > /dev
/null ||
continue
1789 make -s -f $i LFS_BASEDIR
=$BASEDIR BUILD_ARCH
="${BUILD_ARCH}" \
1790 MESSAGE
="$i\t " md5
>> $LOGFILE 2>&1
1791 if [ $?
-ne 0 ]; then
1792 echo -ne "MD5 difference in lfs/$i"
1793 beautify message FAIL
1798 if [ $ERROR -eq 0 ]; then
1799 echo -ne "${BOLD}all files md5sum match${NORMAL}"
1800 beautify message DONE
1802 echo -ne "${BOLD}not all files were correctly download${NORMAL}"
1803 beautify message FAIL
1805 cd - >/dev
/null
2>&1
1810 beautify build_stage
"Toolchain compilation"
1812 echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for ${BUILD_ARCH}" |
tee -a $LOGFILE
1813 test -d $BASEDIR/cache
/toolchains || mkdir
-p $BASEDIR/cache
/toolchains
1814 cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache
/toolchains
/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.
tar.gz \
1815 build
/${TOOLS_DIR} build
/bin
/sh log
>> $LOGFILE
1816 md5sum cache
/toolchains
/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.
tar.gz \
1817 > cache
/toolchains
/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
1821 # arbitrary name to be updated in case of new toolchain package upload
1822 PACKAGE
=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}
1823 if [ ! -f $BASEDIR/cache
/toolchains
/$PACKAGE.
tar.gz
]; then
1824 URL_TOOLCHAIN
=`grep URL_TOOLCHAIN lfs/Config | awk '{ print $3 }'`
1825 test -d $BASEDIR/cache
/toolchains || mkdir
-p $BASEDIR/cache
/toolchains
1826 echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for ${BUILD_ARCH}" |
tee -a $LOGFILE
1827 cd $BASEDIR/cache
/toolchains
1828 wget
-U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.
tar.gz
$URL_TOOLCHAIN/$PACKAGE.md5
>& /dev
/null
1829 if [ $?
-ne 0 ]; then
1830 echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for ${BUILD_ARCH} machine" |
tee -a $LOGFILE
1832 if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
1833 echo "`date -u '+%b %e %T'`: toolchain md5 ok" |
tee -a $LOGFILE
1835 exiterror
"$PACKAGE.md5 did not match, check downloaded package"
1839 echo "Toolchain is already downloaded. Exiting..."
1844 if [ -z $IPFIRE_USER ]; then
1845 echo -n "You have to setup IPFIRE_USER first. See .config for details."
1846 beautify message FAIL
1850 URL_SOURCE
=$
(grep URL_SOURCE lfs
/Config |
awk '{ print $3 }')
1851 REMOTE_FILES
=$
(echo "ls -1" | sftp
-C ${IPFIRE_USER}@
${URL_SOURCE})
1853 for file in ${BASEDIR}/cache
/*; do
1854 [ -d "${file}" ] && continue
1855 grep -q "$(basename ${file})" <<<$REMOTE_FILES && continue
1856 NEW_FILES
="$NEW_FILES $file"
1858 [ -n "$NEW_FILES" ] && scp
-2 $NEW_FILES ${IPFIRE_USER}@
${URL_SOURCE}
1864 echo -ne "Checking the translations for missing or obsolete strings..."
1865 chmod 755 $BASEDIR/tools
/{check_strings.pl
,sort_strings.pl
,check_langs.sh
}
1866 $BASEDIR/tools
/sort_strings.pl en
1867 $BASEDIR/tools
/sort_strings.pl de
1868 $BASEDIR/tools
/sort_strings.pl fr
1869 $BASEDIR/tools
/sort_strings.pl es
1870 $BASEDIR/tools
/sort_strings.pl pl
1871 $BASEDIR/tools
/sort_strings.pl ru
1872 $BASEDIR/tools
/sort_strings.pl
nl
1873 $BASEDIR/tools
/sort_strings.pl
tr
1874 $BASEDIR/tools
/sort_strings.pl it
1875 $BASEDIR/tools
/check_strings.pl en
> $BASEDIR/doc
/language_issues.en
1876 $BASEDIR/tools
/check_strings.pl de
> $BASEDIR/doc
/language_issues.de
1877 $BASEDIR/tools
/check_strings.pl fr
> $BASEDIR/doc
/language_issues.fr
1878 $BASEDIR/tools
/check_strings.pl es
> $BASEDIR/doc
/language_issues.es
1879 $BASEDIR/tools
/check_strings.pl es
> $BASEDIR/doc
/language_issues.pl
1880 $BASEDIR/tools
/check_strings.pl ru
> $BASEDIR/doc
/language_issues.ru
1881 $BASEDIR/tools
/check_strings.pl
nl > $BASEDIR/doc
/language_issues.
nl
1882 $BASEDIR/tools
/check_strings.pl
tr > $BASEDIR/doc
/language_issues.
tr
1883 $BASEDIR/tools
/check_strings.pl it
> $BASEDIR/doc
/language_issues.it
1884 $BASEDIR/tools
/check_langs.sh
> $BASEDIR/doc
/language_missings
1885 beautify message DONE
1887 echo -ne "Updating language lists..."
1888 update_language_list
${BASEDIR}/src
/installer
/po
1889 update_language_list
${BASEDIR}/src
/setup
/po
1890 beautify message DONE
1893 echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}"
1894 cat doc
/make.sh-usage