]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - make.sh
Nicht alle Versionen von Subversion koennen den vollen Befehlsumfang :(
[people/pmueller/ipfire-2.x.git] / make.sh
1 #!/bin/bash
2 #
3 ############################################################################
4 # #
5 # This file is part of the IPFire Firewall. #
6 # #
7 # IPFire is free software; you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation; either version 2 of the License, or #
10 # (at your option) any later version. #
11 # #
12 # IPFire is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
16 # #
17 # You should have received a copy of the GNU General Public License #
18 # along with IPFire; if not, write to the Free Software #
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
20 # #
21 # Copyright (C) 2006 IPFire-Team <entwickler@ipfire.org>. #
22 # #
23 ############################################################################
24 #
25
26 NAME="IPFire" # Software name
27 SNAME="ipfire" # Short name
28 VERSION="2.0" # Version number
29 SLOGAN="www.ipfire.eu" # Software slogan
30 CONFIG_ROOT=/var/ipfire # Configuration rootdir
31 NICE=10
32 MAX_RETRIES=3 # prefetch/check loop
33 KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
34 MACHINE=`uname -m`
35 SVN_REVISION=`svn info | grep Revision | cut -c 11-`
36
37 # Setzen des IPFire Builds
38 if [ -e ./.svn ]; then
39 FIREBUILD=`cat .svn/entries |sed -n 's/^[ \t]*revision=\"// p' | sed -n 's/\".*$// p'`
40 fi
41
42 # Debian specific settings
43 if [ ! -e /etc/debian_version ]; then
44 FULLPATH=`which $0`
45 else
46 if [ -x /usr/bin/realpath ]; then
47 FULLPATH=`/usr/bin/realpath $0`
48 else
49 echo "ERROR: Need to do apt-get install realpath"
50 exit 1
51 fi
52 fi
53
54 PWD=`pwd`
55 BASENAME=`basename $0`
56 BASEDIR=`echo $FULLPATH | sed "s/\/$BASENAME//g"`
57 LOGFILE=$BASEDIR/log/_build.preparation.log
58 export BASEDIR LOGFILE
59 DIR_CHK=$BASEDIR/cache/check
60 mkdir $BASEDIR/log/ 2>/dev/null
61
62 if [ -f .config ]; then
63 . .config
64 fi
65
66 if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE -o 'i486' = $MACHINE -o 'i386' = $MACHINE ]; then
67 echo "`date -u '+%b %e %T'`: Machine is ix86 (or equivalent)" >> $LOGFILE
68 MACHINE=i386
69 BUILDTARGET=i386-pc-linux-gnu
70 CFLAGS="-O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer"
71 CXXFLAGS="-O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer"
72 elif [ 'alpha' = $MACHINE ]; then
73 echo "`date -u '+%b %e %T'`: Machine is Alpha AXP" >> $LOGFILE
74 BUILDTARGET=alpha-unknown-linux-gnu
75 CFLAGS="-O2 -mcpu=ev4 -mieee -pipe"
76 CXXFLAGS="-O2 -mcpu=ev4 -mieee -pipe"
77 else
78 echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
79 exit 1
80 fi
81
82 # Define immediately
83 stdumount() {
84 umount $BASEDIR/build/dev/pts 2>/dev/null;
85 umount $BASEDIR/build/proc 2>/dev/null;
86 umount $BASEDIR/build/install/mnt 2>/dev/null;
87 umount $BASEDIR/build/usr/src/cache 2>/dev/null;
88 umount $BASEDIR/build/usr/src/ccache 2>/dev/null;
89 umount $BASEDIR/build/usr/src/config 2>/dev/null;
90 umount $BASEDIR/build/usr/src/doc 2>/dev/null;
91 umount $BASEDIR/build/usr/src/html 2>/dev/null;
92 umount $BASEDIR/build/usr/src/langs 2>/dev/null;
93 umount $BASEDIR/build/usr/src/lfs 2>/dev/null;
94 umount $BASEDIR/build/usr/src/log 2>/dev/null;
95 umount $BASEDIR/build/usr/src/src 2>/dev/null;
96 }
97
98 exiterror() {
99 stdumount
100 for i in `seq 0 7`; do
101 if ( losetup /dev/loop${i} 2>/dev/null | grep -q "/install/images" ); then
102 losetup -d /dev/loop${i} 2>/dev/null
103 fi;
104 done
105 echo "ERROR: $*"
106 echo " Check $LOGFILE for errors if applicable"
107 exit 1
108 }
109
110 entershell() {
111 if [ ! -e $BASEDIR/build/usr/src/lfs/ ]; then
112 exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/"
113 fi
114 echo "Entering to a shell inside LFS chroot, go out with exit"
115 chroot $LFS /tools/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
116 PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
117 VERSION=$VERSION CONFIG_ROOT=$CONFIG_ROOT \
118 NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
119 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
120 CCACHE_DIR=/usr/src/ccache \
121 CCACHE_HASHDIR=1 \
122 KVER=$KVER \
123 BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
124 KGCC="ccache /usr/bin/gcc" \
125 /tools/bin/bash
126 if [ $? -ne 0 ]; then
127 exiterror "chroot error"
128 else
129 stdumount
130 fi
131 }
132
133 prepareenv() {
134 ############################################################################
135 # #
136 # Are we running the right shell? #
137 # #
138 ############################################################################
139 if [ ! "$BASH" ]; then
140 exiterror "BASH environment variable is not set. You're probably running the wrong shell."
141 fi
142
143 if [ -z "${BASH_VERSION}" ]; then
144 exiterror "Not running BASH shell."
145 fi
146
147
148 ############################################################################
149 # #
150 # Trap on emergency exit #
151 # #
152 ############################################################################
153 trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGKILL SIGSTOP SIGQUIT
154
155
156 ############################################################################
157 # #
158 # Resetting our nice level #
159 # #
160 ############################################################################
161 echo "`date -u '+%b %e %T'`: Resetting our nice level to $NICE" | tee -a $LOGFILE
162 renice $NICE $$ > /dev/null
163 if [ `nice` != "$NICE" ]; then
164 exiterror "Failed to set correct nice level"
165 fi
166
167 ############################################################################
168 # #
169 # Checking if running as root user #
170 # #
171 ############################################################################
172 echo "`date -u '+%b %e %T'`: Checking if we're running as root user" | tee -a $LOGFILE
173 if [ `id -u` != 0 ]; then
174 exiterror "Not building as root"
175 fi
176
177
178 ############################################################################
179 # #
180 # Checking for necessary temporary space #
181 # #
182 ############################################################################
183 echo "`date -u '+%b %e %T'`: Checking for necessary space on disk $BASE_DEV" | tee -a $LOGFILE
184 BASE_DEV=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $1 }'`
185 BASE_ASPACE=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $4 }'`
186 if (( 2202000 > $BASE_ASPACE )); then
187 BASE_USPACE=`du -skx $BASEDIR | awk '{print $1}'`
188 if (( 2202000 - $BASE_USPACE > $BASE_ASPACE )); then
189 exiterror "Not enough temporary space available, need at least 2.1GB on $BASE_DEV"
190 fi
191 fi
192
193 ############################################################################
194 # #
195 # Building Linux From Scratch system #
196 # #
197 ############################################################################
198 echo "`date -u '+%b %e %T'`: Building Linux From Scratch system" | tee -a $LOGFILE
199
200 # Set umask
201 umask 022
202
203 # Set LFS Directory
204 LFS=$BASEDIR/build
205
206 # Check /tools symlink
207 if [ -h /tools ]; then
208 rm -f /tools
209 fi
210 if [ ! -a /tools ]; then
211 ln -s $BASEDIR/build/tools /
212 fi
213 if [ ! -h /tools ]; then
214 exiterror "Could not create /tools symbolic link."
215 fi
216
217 # Setup environment
218 set +h
219 LC_ALL=POSIX
220 export LFS LC_ALL CFLAGS CXXFLAGS
221 unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
222
223 # Make some extra directories
224 mkdir -p $BASEDIR/build/{tools,etc,usr/src} 2>/dev/null
225 mkdir -p $BASEDIR/{cache,ccache} 2>/dev/null
226 mkdir -p $BASEDIR/build/dev/pts $BASEDIR/build/proc $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache}
227
228 # Make all sources and proc available under lfs build
229 mount --bind /dev/pts $BASEDIR/build/dev/pts
230 mount --bind /proc $BASEDIR/build/proc
231 mount --bind $BASEDIR/cache $BASEDIR/build/usr/src/cache
232 mount --bind $BASEDIR/ccache $BASEDIR/build/usr/src/ccache
233 mount --bind $BASEDIR/config $BASEDIR/build/usr/src/config
234 mount --bind $BASEDIR/doc $BASEDIR/build/usr/src/doc
235 mount --bind $BASEDIR/html $BASEDIR/build/usr/src/html
236 mount --bind $BASEDIR/langs $BASEDIR/build/usr/src/langs
237 mount --bind $BASEDIR/lfs $BASEDIR/build/usr/src/lfs
238 mount --bind $BASEDIR/log $BASEDIR/build/usr/src/log
239 mount --bind $BASEDIR/src $BASEDIR/build/usr/src/src
240
241 # Run LFS static binary creation scripts one by one
242 export CCACHE_DIR=$BASEDIR/ccache
243 export CCACHE_HASHDIR=1
244
245 # Remove pre-install list of installed files in case user erase some files before rebuild
246 rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null
247 }
248
249
250 ############################################################################
251 # #
252 # Necessary shell functions #
253 # #
254 ############################################################################
255 lfsmake1() {
256 if [ -f $BASEDIR/lfs/$1 ]; then
257 echo "`date -u '+%b %e %T'`: Building $*" | tee -a $LOGFILE
258 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download >> $LOGFILE 2>&1
259 if [ $? -ne 0 ]; then
260 exiterror "Download error in $1"
261 fi
262 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
263 if [ $? -ne 0 ]; then
264 exiterror "md5sum error in $1, check file in cache or signature"
265 fi
266 cd $BASEDIR/lfs && make -f $* BUILDTARGET=$BUILDTARGET \
267 MACHINE=$MACHINE \
268 LFS_BASEDIR=$BASEDIR \
269 ROOT=$LFS \
270 KVER=$KVER \
271 install >> $LOGFILE 2>&1
272 if [ $? -ne 0 ]; then
273 exiterror "Building $*";
274 fi
275 else
276 exiterror "No such file or directory: $BASEDIR/$1"
277 fi
278 return 0
279 }
280
281 lfsmake2() {
282 if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
283 echo "`date -u '+%b %e %T'`: Building $*" | tee -a $LOGFILE
284 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download >> $LOGFILE 2>&1
285 if [ $? -ne 0 ]; then
286 exiterror "Download error in $1"
287 fi
288 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
289 if [ $? -ne 0 ]; then
290 exiterror "md5sum error in $1, check file in cache or signature"
291 fi
292 chroot $LFS /tools/bin/env -i HOME=/root \
293 TERM=$TERM PS1='\u:\w\$ ' \
294 PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
295 VERSION=$VERSION \
296 CONFIG_ROOT=$CONFIG_ROOT \
297 NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
298 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
299 CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
300 KVER=$KVER \
301 BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
302 /tools/bin/bash -x -c "cd /usr/src/lfs && \
303 make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
304 if [ $? -ne 0 ]; then
305 exiterror "Building $*"
306 fi
307 else
308 exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
309 fi
310 return 0
311 }
312
313 ipcopmake() {
314 if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
315 echo "`date -u '+%b %e %T'`: Building $*" | tee -a $LOGFILE
316 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download >> $LOGFILE 2>&1
317 if [ $? -ne 0 ]; then
318 exiterror "Download error in $1"
319 fi
320 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
321 if [ $? -ne 0 ]; then
322 exiterror "md5sum error in $1, check file in cache or signature"
323 fi
324 chroot $LFS /tools/bin/env -i HOME=/root \
325 TERM=$TERM PS1='\u:\w\$ ' \
326 PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
327 VERSION=$VERSION \
328 CONFIG_ROOT=$CONFIG_ROOT \
329 NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
330 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
331 CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
332 KVER=$KVER \
333 BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
334 /bin/bash -x -c "cd /usr/src/lfs && \
335 make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
336 if [ $? -ne 0 ]; then
337 exiterror "Building $*"
338 fi
339 else
340 exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
341 fi
342 return 0
343 }
344
345 ipfiredist() {
346 if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
347 # if [ ! `ls -w1 $BASEDIR/packages/*.ipfire | grep $1` ]; then
348 echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
349 chroot $LFS /tools/bin/env -i HOME=/root \
350 TERM=$TERM PS1='\u:\w\$ ' \
351 PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
352 VERSION=$VERSION \
353 CONFIG_ROOT=$CONFIG_ROOT \
354 NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
355 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
356 CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
357 KVER=$KVER \
358 BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
359 /bin/bash -x -c "cd /usr/src/lfs && \
360 make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
361 if [ $? -ne 0 ]; then
362 exiterror "Packaging $1"
363 fi
364 # else
365 # echo "`date -u '+%b %e %T'`: Packaging: The package $1 already exists"
366 # fi
367 else
368 exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
369 fi
370 return 0
371 }
372
373
374 installmake() {
375 if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
376 echo "`date -u '+%b %e %T'`: Building $*" | tee -a $LOGFILE
377 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download >> $LOGFILE 2>&1
378 if [ $? -ne 0 ]; then
379 exiterror "Download error in $1"
380 fi
381 cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
382 if [ $? -ne 0 ]; then
383 exiterror "md5sum error in $1, check file in cache or signature"
384 fi
385 chroot $LFS /tools/bin/env -i HOME=/root \
386 TERM=$TERM PS1='\u:\w\$ ' \
387 PATH=/usr/local/bin:/opt/$MACHINE-uClibc/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin \
388 VERSION=$VERSION \
389 CONFIG_ROOT=$CONFIG_ROOT \
390 LFS_PASS="install" \
391 NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
392 CFLAGS="-Os" CXXFLAGS="-Os" \
393 CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
394 KVER=$KVER \
395 BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
396 /bin/bash -x -c "cd /usr/src/lfs && \
397 make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
398 if [ $? -ne 0 ]; then
399 exiterror "Building $*"
400 fi
401 else
402 exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
403 fi
404 return 0
405 }
406
407 buildtoolchain() {
408 LOGFILE="$BASEDIR/log/_build.toolchain.log"
409 export LOGFILE
410 echo -ne "`date -u '+%b %e %T'`: Stage1 toolchain build \n" | tee -a $LOGFILE
411 # Build sed now, as we use some extensions
412 ORG_PATH=$PATH
413 NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
414 export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1}
415 lfsmake1 ccache
416 lfsmake1 sed LFS_PASS=1
417 lfsmake1 m4 LFS_PASS=1
418 lfsmake1 bison LFS_PASS=1
419 lfsmake1 flex LFS_PASS=1
420 lfsmake1 binutils LFS_PASS=1
421 lfsmake1 gcc LFS_PASS=1
422 export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
423
424 lfsmake1 linux
425 lfsmake1 tcl
426 lfsmake1 expect
427 lfsmake1 glibc
428 lfsmake1 dejagnu
429 lfsmake1 gcc LFS_PASS=2
430 lfsmake1 binutils LFS_PASS=2
431 lfsmake1 gawk
432 lfsmake1 coreutils
433 lfsmake1 bzip2
434 lfsmake1 gzip
435 lfsmake1 diffutils
436 lfsmake1 findutils
437 lfsmake1 make
438 lfsmake1 grep
439 lfsmake1 sed LFS_PASS=2
440 lfsmake1 m4 LFS_PASS=2
441 lfsmake1 bison LFS_PASS=2
442 lfsmake1 flex LFS_PASS=2
443 lfsmake1 gettext
444 lfsmake1 ncurses
445 lfsmake1 patch
446 lfsmake1 tar
447 lfsmake1 texinfo
448 lfsmake1 bash
449 lfsmake1 util-linux
450 lfsmake1 perl
451 export PATH=$ORG_PATH
452 }
453
454 buildbase() {
455 LOGFILE="$BASEDIR/log/_build.base.log"
456 export LOGFILE
457 echo -ne "`date -u '+%b %e %T'`: Stage2 linux base build \n" | tee -a $LOGFILE
458 # Run LFS dynamic binary creation scripts one by one
459 lfsmake2 stage2
460 lfsmake2 makedev
461 lfsmake2 linux
462 lfsmake2 man-pages
463 lfsmake2 glibc
464 lfsmake2 binutils
465 lfsmake2 gcc
466 lfsmake2 coreutils
467 lfsmake2 zlib
468 lfsmake2 mktemp
469 lfsmake2 iana-etc
470 lfsmake2 findutils
471 lfsmake2 gawk
472 lfsmake2 ncurses
473 lfsmake2 vim
474 lfsmake2 m4
475 lfsmake2 bison
476 lfsmake2 less
477 lfsmake2 groff
478 lfsmake2 sed
479 lfsmake2 flex
480 lfsmake2 gettext
481 lfsmake2 net-tools
482 lfsmake2 inetutils
483 lfsmake2 perl
484 lfsmake2 texinfo
485 lfsmake2 autoconf
486 lfsmake2 automake
487 lfsmake2 bash
488 lfsmake2 file
489 lfsmake2 libtool
490 lfsmake2 bzip2
491 lfsmake2 diffutils
492 lfsmake2 ed
493 lfsmake2 kbd
494 lfsmake2 e2fsprogs
495 lfsmake2 grep
496 if [ 'i386' = $MACHINE ]; then
497 lfsmake2 grub
498 elif [ 'alpha' = $MACHINE ]; then
499 lfsmake2 aboot
500 fi
501 lfsmake2 gzip
502 lfsmake2 man
503 lfsmake2 make
504 lfsmake2 modutils
505 lfsmake2 patch
506 lfsmake2 procinfo
507 lfsmake2 procps
508 lfsmake2 psmisc
509 lfsmake2 shadow
510 lfsmake2 sysklogd
511 lfsmake2 sysvinit
512 lfsmake2 tar
513 lfsmake2 util-linux
514 }
515
516 buildipcop() {
517 # Run IPFire make scripts one by one
518 LOGFILE="$BASEDIR/log/_build.ipfire.log"
519 export LOGFILE
520 echo -ne "`date -u '+%b %e %T'`: Stage3 $NAME build \n" | tee -a $LOGFILE
521
522 # Build these first as some of the kernel packages below rely on
523 # these for some of their client program functionality
524 ipcopmake configroot
525 ipcopmake dhcp
526 ipcopmake dhcpcd
527 ipcopmake libusb
528 ipcopmake libpcap
529 ipcopmake linux-atm
530 ipcopmake ppp
531 ipcopmake rp-pppoe
532 ipcopmake unzip
533 # Do SMP now
534 if [ 'i386' = $MACHINE ]; then
535 # abuse the SMP flag, and make an minimal installer kernel first
536 # so that the boot floppy always works.....
537 ipcopmake linux LFS_PASS=ipfire SMP=installer
538 ipcopmake linux LFS_PASS=ipfire SMP=1
539 ipcopmake 3cp4218 SMP=1
540 ipcopmake amedyn SMP=1
541 ipcopmake cxacru SMP=1
542 ipcopmake eagle SMP=1
543
544 # These are here because they have i386 only binary libraries
545 # included in the package.
546 ipcopmake cnx_pci SMP=1
547 ipcopmake fcdsl SMP=1
548 ipcopmake fcdsl2 SMP=1
549 ipcopmake fcdslsl SMP=1
550 ipcopmake fcdslusb SMP=1
551 ipcopmake fcdslslusb SMP=1
552 ipcopmake fcpci SMP=1
553 ipcopmake fcclassic SMP=1
554 ipcopmake pulsar SMP=1
555 ipcopmake unicorn SMP=1
556 ipcopmake promise-sata-300-tx SMP=1
557 fi
558
559 ipcopmake linux LFS_PASS=ipfire
560 ipcopmake 3cp4218
561 ipcopmake amedyn
562 ipcopmake cxacru
563 ipcopmake eciadsl
564 ipcopmake eagle
565 ipcopmake speedtouch
566 if [ 'i386' = $MACHINE ]; then
567 # These are here because they have i386 only binary libraries
568 # included in the package.
569 ipcopmake cnx_pci
570 ipcopmake fcdsl
571 ipcopmake fcdsl2
572 ipcopmake fcdslsl
573 ipcopmake fcdslusb
574 ipcopmake fcdslslusb
575 ipcopmake fcpci
576 ipcopmake fcclassic
577 ipcopmake pulsar
578 ipcopmake unicorn
579 ipcopmake promise-sata-300-tx
580 fi
581
582 ipcopmake pcmcia-cs
583 ipcopmake expat
584 ipcopmake gdbm
585 ipcopmake gmp
586 ipcopmake openssl
587 ipcopmake python
588 ipcopmake libnet
589 ipcopmake libpng
590 ipcopmake libtiff
591 ipcopmake libjpeg
592 ipcopmake lcms
593 ipcopmake libmng
594 ipcopmake freetype
595 ipcopmake gd
596 ipcopmake popt
597 ipcopmake slang
598 ipcopmake newt
599 ipcopmake libcap
600 ipcopmake pciutils
601 ipcopmake pcre
602 ipcopmake readline
603 ipcopmake libxml2
604 ipcopmake berkeley
605 ipcopmake BerkeleyDB ## The Perl module
606 ipcopmake mysql
607 ipcopmake saslauthd PASS=1
608 ipcopmake openldap
609 #ipcopmake apache
610 ipcopmake apache2
611 ipcopmake php
612 ipcopmake arping
613 ipcopmake beep
614 ipcopmake bind
615 ipcopmake capi4k-utils
616 ipcopmake cdrtools
617 ipcopmake dnsmasq
618 ipcopmake dosfstools
619 ipcopmake ethtool
620 ipcopmake ez-ipupdate
621 ipcopmake fcron
622 ipcopmake perl-GD
623 ipcopmake gnupg
624 ipcopmake hdparm
625 ipcopmake ibod
626 ipcopmake initscripts
627 ipcopmake iptables
628 ipcopmake ipac-ng
629 ipcopmake ipaddr
630 ipcopmake iproute2
631 ipcopmake iptstate
632 ipcopmake iputils
633 ipcopmake l7-protocols
634 ipcopmake isapnptools
635 ipcopmake isdn4k-utils
636 ipcopmake kudzu
637 ipcopmake logrotate
638 ipcopmake logwatch
639 ipcopmake mingetty
640 ipcopmake misc-progs
641 ipcopmake mtools
642 ipcopmake nano
643 ipcopmake nash
644 ipcopmake nasm
645 ipcopmake URI
646 ipcopmake HTML-Tagset
647 ipcopmake HTML-Parser
648 ipcopmake Compress-Zlib
649 ipcopmake Digest
650 ipcopmake Digest-SHA1
651 ipcopmake Digest-HMAC
652 ipcopmake libwww-perl
653 ipcopmake Net-DNS
654 ipcopmake Net-IPv4Addr
655 ipcopmake Net_SSLeay
656 ipcopmake IO-Stringy
657 ipcopmake Unix-Syslog
658 ipcopmake Mail-Tools
659 ipcopmake MIME-Tools
660 ipcopmake Net-Server
661 ipcopmake Convert-TNEF
662 ipcopmake Convert-UUlib
663 ipcopmake Archive-Tar
664 ipcopmake Archive-Zip
665 ipcopmake Text-Tabs+Wrap
666 ipcopmake Locale-Country
667 ipcopmake GeoIP
668 ipcopmake fwhits
669 ipcopmake noip_updater
670 ipcopmake ntp
671 ipcopmake oinkmaster
672 ipcopmake openssh
673 ipcopmake openswan
674 ipcopmake pptpclient
675 ipcopmake rrdtool
676 ipcopmake setserial
677 ipcopmake setup
678 ipcopmake snort
679 #ipcopmake speedycgi
680 ipcopmake squid
681 ipcopmake squid-graph
682 ipcopmake squidguard
683 ipcopmake tcpdump
684 ipcopmake traceroute
685 ipcopmake vlan
686 ipcopmake wireless
687 ipcopmake libsafe
688 ipcopmake 3c5x9setup
689 # echo -ne "`date -u '+%b %e %T'`: Building ### IPFire modules ### \n" | tee -a $LOGFILE
690 ipcopmake pakfire
691 ipcopmake startscripts
692 ## Zuerst die Libs und dann die Programme. Ordnung muss sein!
693 ipcopmake java
694 ipcopmake bootsplash
695 ipcopmake spandsp
696 ipcopmake lzo
697 ipcopmake openvpn
698 ipcopmake pkg-config
699 ipcopmake glib
700 ipcopmake xampp
701 ipcopmake pam
702 ipcopmake pammysql
703 ipcopmake saslauthd PASS=2
704 ipcopmake xinetd
705 ipcopmake ghostscript
706 ipcopmake cups
707 # ipcopmake lpd ## Im Moment aus, da CUPS vorhanden ist.
708 ipcopmake samba
709 ipcopmake sudo
710 ipcopmake mc
711 # ipcopmake pwlib
712 # ipcopmake openh323
713 ipcopmake wget
714 ipcopmake wput
715 ipcopmake bridge-utils
716 ipcopmake screen
717 ipcopmake hddtemp
718 ipcopmake smartmontools
719 ipcopmake htop
720 ipcopmake lynx
721 echo -ne "`date -u '+%b %e %T'`: Building ### Mailserver ### \n" | tee -a $LOGFILE
722 ipcopmake postfix
723 ipcopmake procmail
724 ipcopmake fetchmail
725 ipcopmake cyrusimap
726 ipcopmake web-cyradm
727 ipcopmake mailx
728 ipcopmake clamav
729 ipcopmake razor
730 ipcopmake spamassassin
731 # ipcopmake amavisd
732 echo -ne "`date -u '+%b %e %T'`: Building ### VoIP-Server ### \n" | tee -a $LOGFILE
733 ipcopmake stund
734 ipcopmake zaptel
735 ipcopmake libpri
736 ipcopmake bristuff
737 ipcopmake asterisk
738 ipcopmake mpg123
739 echo -ne "`date -u '+%b %e %T'`: Building ### Multimedia-Server ### \n" | tee -a $LOGFILE
740 ipcopmake libmad
741 ipcopmake libogg
742 ipcopmake libvorbis
743 ipcopmake lame
744 ipcopmake xvid
745 ipcopmake mpeg2dec
746 ipcopmake ffmpeg
747 ipcopmake sox
748 ipcopmake gnump3d
749 ipcopmake videolan
750 echo -ne "`date -u '+%b %e %T'`: Building ### P2P-Clients ### \n" | tee -a $LOGFILE
751 ipcopmake applejuice
752 ipcopmake ocaml
753 ipcopmake mldonkey
754 # ipcopmake edonkeyclc
755 # ipcopmake sane
756 echo -ne "`date -u '+%b %e %T'`: Building ### Net-Tools ### \n" | tee -a $LOGFILE
757 ipcopmake ntop
758 # ipcopmake rsync
759 ipcopmake tcpwrapper
760 ipcopmake portmap
761 ipcopmake nfs
762 ipcopmake nmap
763 ipcopmake mbmon
764 ipcopmake iftop
765 ipcopmake ncftp
766 ipcopmake cftp
767 ipcopmake etherwake
768 ipcopmake ethereal
769 ipcopmake tftp-hpa
770 #ipcopmake subversion
771 ipcopmake iptraf
772 ipcopmake nagios
773 ipcopmake yasuc
774 # ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen
775 }
776
777 buildinstaller() {
778 # Run installer scripts one by one
779 LOGFILE="$BASEDIR/log/_build.installer.log"
780 export LOGFILE
781 echo -ne "`date -u '+%b %e %T'`: Stage4 installer build \n" | tee -a $LOGFILE
782 if [ 'i386' = $MACHINE ]; then
783 ipcopmake syslinux
784 ipcopmake as86
785 ipcopmake mbr
786 ipcopmake uClibc
787 fi
788 installmake busybox
789 installmake sysvinit
790 installmake e2fsprogs
791 installmake misc-progs
792 installmake slang
793 installmake util-linux
794 installmake newt
795 installmake pciutils
796 installmake pcmcia-cs
797 installmake kbd
798 installmake installer
799 installmake scsi.img
800 installmake driver.img
801 installmake initrd
802 installmake boot.img
803 }
804
805 buildpackages() {
806 LOGFILE="$BASEDIR/log/_build.packages.log"
807 export LOGFILE
808 echo "... see detailed log in _build.*.log files" >> $LOGFILE
809 echo -ne "`date -u '+%b %e %T'`: Stage5 packages build \n" | tee -a $LOGFILE
810 # Strip files
811 echo "`date -u '+%b %e %T'`: Stripping files" | tee -a $LOGFILE
812 find $LFS/lib $LFS/usr/lib $LFS/usr/share/rrdtool-* $LFS/install ! -type l \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
813 ! -name 'libc.so' ! -name 'libpthread.so' ! -name 'libcrypto.so.0.9.7.sha1' \
814 -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
815 # add -ls before -exec if you want to verify what files are stripped
816
817 find $LFS/{,s}bin $LFS/usr/{,s}bin $LFS/usr/local/{,s}bin ! -type l \
818 -exec file {} \; | grep " ELF " | cut -f1 -d ':' | xargs $LFS/tools/bin/strip --strip-all >> $LOGFILE 2>&1
819 # there add -v to strip to verify
820
821 if [ 'i386' = $MACHINE ]; then
822 # Create fcdsl packages
823 echo "`date -u '+%b %e %T'`: Building fcdsl tgz" | tee -a $LOGFILE
824 cp $LFS/install/images/fcdsl/license.txt $LFS >> $LOGFILE 2>&1
825 touch $LFS/var/run/{need-depmod-$KVER,need-depmod-$KVER-smp}
826 cd $LFS && tar cvfz $LFS/install/images/$SNAME-fcdsl-$VERSION.$MACHINE.tgz \
827 lib/modules/$KVER/misc/fcdsl*.o.gz \
828 lib/modules/$KVER-smp/misc/fcdsl*.o.gz \
829 usr/lib/isdn/{fds?base.bin,fd?ubase.frm} \
830 etc/fcdsl/fcdsl*.conf \
831 etc/drdsl/{drdsl,drdsl.ini} \
832 license.txt \
833 var/run/{need-depmod-$KVER,need-depmod-$KVER-smp} >> $LOGFILE 2>&1
834 rm -f $LFS/license.txt >> $LOGFILE 2>&1
835 cd $BASEDIR
836 fi
837
838 # Generating list of packages used
839 echo "`date -u '+%b %e %T'`: Generating packages list from logs" | tee -a $LOGFILE
840 rm -f $BASEDIR/doc/packages-list
841 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
842 if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
843 echo "* `basename $i`" >>$BASEDIR/doc/packages-list
844 fi
845 done
846 echo "== List of softwares used to build $NAME Version: $VERSION ==" > $BASEDIR/doc/packages-list.txt
847 grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipfire$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$\|.tgz$' \
848 $BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
849 rm -f $BASEDIR/doc/packages-list
850 # packages-list.txt is ready to be displayed for wiki page
851
852 # Create ISO for CDRom and USB-superfloppy
853 ipcopmake cdrom
854 rm -f $LFS/install/images/*usb*
855 cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
856
857 ipfirepackages
858
859 # Cleanup
860 stdumount
861 rm -rf $BASEDIR/build/tmp/*
862
863 # Generating total list of files
864 echo "`date -u '+%b %e %T'`: Generating files list from logs" | tee -a $LOGFILE
865 rm -f $BASEDIR/log/FILES
866 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
867 if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
868 echo "##" >>$BASEDIR/log/FILES
869 echo "## `basename $i`" >>$BASEDIR/log/FILES
870 echo "##" >>$BASEDIR/log/FILES
871 cat $i | sed "s%^\./%#%" | sort >> $BASEDIR/log/FILES
872 fi
873 done
874 cd $BASEDIR/packages; ls -w1 *.ipfire | awk -F ".ipfire" '{ print $1 }' > $BASEDIR/packages/packages_list.txt
875 echo -n "###EOF###" >> $BASEDIR/packages/packages_list.txt
876
877 cd $PWD
878
879 }
880
881 ipfirepackages() {
882 if [ -d "$BASEDIR/packages" ]; then
883 for i in `ls $BASEDIR/packages`; do
884 touch $BASEDIR/build/install/packages/$i.empty
885 done
886 fi
887 ipfiredist amavisd
888 ipfiredist applejuice
889 ipfiredist asterisk
890 ipfiredist clamav
891 ipfiredist cups
892 ipfiredist cyrusimap
893 ipfiredist fetchmail
894 ipfiredist ffmpeg
895 ipfiredist gnump3d
896 ipfiredist iptraf
897 ipfiredist java
898 ipfiredist lame
899 ipfiredist libmad
900 ipfiredist libogg
901 ipfiredist libtiff
902 ipfiredist libvorbis
903 ipfiredist libxml2
904 ipfiredist mailx
905 ipfiredist mldonkey
906 ipfiredist mpeg2dec
907 ipfiredist nagios
908 ipfiredist nfs
909 ipfiredist nmap
910 ipfiredist ntop
911 ipfiredist portmap
912 ipfiredist postfix
913 ipfiredist procmail
914 ipfiredist samba
915 ipfiredist sox
916 ipfiredist spamassassin
917 ipfiredist subversion
918 ipfiredist videolan
919 ipfiredist web-cyradm
920 ipfiredist xampp
921 # ipfiredist xinetd
922 ipfiredist xvid
923 ipfiredist yasuc
924 test -d $BASEDIR/packages || mkdir $BASEDIR/packages
925 mv -f $LFS/install/packages/*.{ipfire,md5} $BASEDIR/packages >> $LOGFILE 2>&1
926 rm -rf $BASEDIR/build/install/packages/*
927 }
928
929 update_logs() {
930 tar cfz log/ipfire-logs-`date +'%Y-%m-%d-%H:%M'`.tgz log/_build.*
931 rm -f log/_build.*
932 }
933
934 # See what we're supposed to do
935 case "$1" in
936 build)
937 BUILDMACHINE=`uname -m`
938 PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
939 #only restore on a clean disk
940 if [ ! -f log/perl-*-tools ]; then
941 if [ ! -n "$PACKAGE" ]; then
942 echo "`date -u '+%b %e %T'`: Full toolchain compilation" | tee -a $LOGFILE
943 prepareenv
944 buildtoolchain
945 else
946 PACKAGENAME=${PACKAGE%.tar.gz}
947 echo "`date -u '+%b %e %T'`: Restore from $PACKAGE" | tee -a $LOGFILE
948 if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
949 tar zxf $PACKAGE
950 prepareenv
951 else
952 exiterror "$PACKAGENAME md5 did not match, check downloaded package"
953 fi
954 fi
955 else
956 echo "`date -u '+%b %e %T'`: Using installed toolchain" | tee -a $LOGFILE
957 prepareenv
958 fi
959
960 buildbase
961 buildipcop
962
963 # Setzen des IPFire Builds
964 if [ "$FIREBUILD" ]; then
965 echo "$FIREBUILD" > $BASEDIR/build/var/ipfire/firebuild
966 else
967 echo "_(OvO)_" > $BASEDIR/build/var/ipfire/firebuild
968 fi
969
970 buildinstaller
971 buildpackages
972 ;;
973 shell)
974 # enter a shell inside LFS chroot
975 # may be used to changed kernel settings
976 prepareenv
977 entershell
978 ;;
979 changelog)
980 echo -n "Loading new Changelog from SVN: "
981 svn log http://svn.ipfire.eu/svn/ipfire > doc/ChangeLog
982 echo "Finished!"
983 ;;
984 check)
985 echo "Checking sources files availability on the web"
986 if [ ! -d $DIR_CHK ]; then
987 mkdir -p $DIR_CHK
988 fi
989 FINISHED=0
990 cd $BASEDIR/lfs
991 for c in `seq $MAX_RETRIES`; do
992 if (( FINISHED==1 )); then
993 break
994 fi
995 FINISHED=1
996 cd $BASEDIR/lfs
997 for i in *; do
998 if [ -f "$i" -a "$i" != "Config" ]; then
999 make -s -f $i MACHINE=$MACHINE LFS_BASEDIR=$BASEDIR ROOT=$BASEDIR/build \
1000 MESSAGE="$i\t ($c/$MAX_RETRIES)" check
1001 if [ $? -ne 0 ]; then
1002 echo "Check : wget error in lfs/$i"
1003 FINISHED=0
1004 fi
1005 fi
1006 done
1007 done
1008 cd -
1009 ;;
1010 checkclean)
1011 echo "Erasing sources files availability tags"
1012 rm -rf $DIR_CHK/*
1013 ;;
1014 clean)
1015 for i in `mount | grep $BASEDIR | sed 's/^.*loop=\(.*\))/\1/'`; do
1016 $LOSETUP -d $i 2>/dev/null
1017 done
1018 for i in `mount | grep $BASEDIR | cut -d " " -f 1`; do
1019 umount $i
1020 done
1021 stdumount
1022 for i in `seq 0 7`; do
1023 if ( losetup /dev/loop${i} 2>/dev/null | grep -q "/install/images" ); then
1024 umount /dev/loop${i} 2>/dev/null;
1025 losetup -d /dev/loop${i} 2>/dev/null;
1026 fi;
1027 done
1028 rm -rf $BASEDIR/build
1029 rm -rf $BASEDIR/cdrom
1030 rm -rf $BASEDIR/packages
1031 rm -rf $BASEDIR/log
1032 if [ -h /tools ]; then
1033 rm -f /tools
1034 fi
1035 ;;
1036 newpak)
1037 # create structure for a new package
1038 echo -e "Name of the new package: $2"
1039 if [ ! -f "lfs/$2" ]; then
1040 echo "`date -u '+%b %e %T'`: Creating directory src/paks/$2"
1041 mkdir -p src/paks/$2
1042 cd src/paks/$2
1043 echo "`date -u '+%b %e %T'`: Creating files"
1044 cp $BASEDIR/lfs/postfix $BASEDIR/lfs/$2
1045
1046 touch ROOTFILES
1047 touch {,un}install.sh
1048 ## install.sh
1049 echo '#!/bin/bash' > install.sh
1050 echo '#' >> install.sh
1051 echo '#################################################################' >> install.sh
1052 echo '# #' >> install.sh
1053 echo '# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #' >> install.sh
1054 echo '# #' >> install.sh
1055 echo '#################################################################' >> install.sh
1056 echo '#' >> install.sh
1057 echo '# Extract the files' >> install.sh
1058 echo 'tar xfz files.tgz -C /' >> install.sh
1059 echo 'cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2' >> install.sh
1060 ## uninstall.sh
1061 echo '#!/bin/bash' > uninstall.sh
1062 echo '#################################################################' >> uninstall.sh
1063 echo '# #' >> uninstall.sh
1064 echo '# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #' >> uninstall.sh
1065 echo '# #' >> uninstall.sh
1066 echo '#################################################################' >> uninstall.sh
1067 echo '#' >> uninstall.sh
1068 echo '# Delete the files' >> uninstall.sh
1069 echo '## Befehl fehlt noch' >> uninstall.sh
1070 echo 'rm -f /opt/pakfire/installed/ROOTFILES.$2' >> uninstall.sh
1071 echo "`date -u '+%b %e %T'`: Adding files to SVN"
1072 cd - && svn add lfs/$2 && svn add src/paks/$2
1073
1074 echo -n "Do you want to remove the folders? [y/n]"
1075 read REM
1076 if [ "$REM" == "y" ]; then
1077 echo "Removing the folders..."
1078 svn del src/paks/$2 --force
1079 else
1080 echo "Folders are kept."
1081 fi
1082 else
1083 echo "$2 already exists"
1084 fi
1085 exit 0
1086 ;;
1087 prefetch)
1088 if [ ! -d $BASEDIR/cache ]; then
1089 mkdir $BASEDIR/cache
1090 fi
1091 mkdir -p $BASEDIR/log
1092 echo "`date -u '+%b %e %T'`:Preload all source files" | tee -a $LOGFILE
1093 FINISHED=0
1094 cd $BASEDIR/lfs
1095 for c in `seq $MAX_RETRIES`; do
1096 if (( FINISHED==1 )); then
1097 break
1098 fi
1099 FINISHED=1
1100 cd $BASEDIR/lfs
1101 for i in *; do
1102 if [ -f "$i" -a "$i" != "Config" ]; then
1103 make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
1104 if [ $? -ne 0 ]; then
1105 echo "Prefetch : wget error in lfs/$i"
1106 FINISHED=0
1107 else
1108 if [ $c -eq 1 ]; then
1109 echo "Prefetch : lfs/$i files loaded"
1110 fi
1111 fi
1112 fi
1113 done
1114 done
1115 echo "Prefetch : verifying md5sum"
1116 ERROR=0
1117 for i in *; do
1118 if [ -f "$i" -a "$i" != "Config" ]; then
1119 make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
1120 if [ $? -ne 0 ]; then
1121 echo "md5 difference in lfs/$i"
1122 ERROR=1
1123 fi
1124 fi
1125 done
1126 if [ $ERROR -eq 0 ]; then
1127 echo "Prefetch : all files md5sum match"
1128 fi
1129 cd -
1130 ;;
1131 toolchain)
1132 prepareenv
1133 buildtoolchain
1134 BUILDMACHINE=`uname -m`
1135 echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
1136 test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
1137 cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
1138 build/{bin,etc,usr/bin,usr/local} \
1139 build/tools/{bin,etc,*-linux-gnu,include,lib,libexec,sbin,share,var} \
1140 log >> $LOGFILE
1141 md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
1142 > cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.md5
1143 stdumount
1144 ;;
1145 gettoolchain)
1146 BUILDMACHINE=`uname -m`
1147 # arbitrary name to be updated in case of new toolchain package upload
1148 PACKAGE=$SNAME-$VERSION-toolchain-$BUILDMACHINE
1149 if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.gz ]; then
1150 URL_IPFIRE=`grep URL_IPFIRE lfs/Config | awk '{ print $3 }'`
1151 test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
1152 echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
1153 cd $BASEDIR/cache/toolchains
1154 wget $URL_IPFIRE/toolchains/$PACKAGE.tar.gz $URL_IPFIRE/toolchains/$PACKAGE.md5 >& /dev/null
1155 if [ $? -ne 0 ]; then
1156 echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
1157 else
1158 if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
1159 echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
1160 else
1161 exiterror "$PACKAGE.md5 did not match, check downloaded package"
1162 fi
1163 fi
1164 else
1165 echo "Toolchain is already downloaded. Exiting..."
1166 fi
1167 ;;
1168 sources-iso)
1169 prepareenv
1170 echo "`date -u '+%b %e %T'`: Build sources iso for $MACHINE" | tee -a $LOGFILE
1171 chroot $LFS /tools/bin/env -i HOME=/root \
1172 TERM=$TERM PS1='\u:\w\$ ' \
1173 PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
1174 VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" MACHINE=$MACHINE \
1175 /bin/bash -x -c "cd /usr/src/lfs && make -f sources-iso LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
1176 mv $LFS/install/images/ipfire-* $BASEDIR >> $LOGFILE 2>&1
1177 stdumount
1178 ;;
1179 svn)
1180 case "$2" in
1181 update|up)
1182 # clear
1183 echo "Loading the latest source files..."
1184 if [ $3 ]; then
1185 svn update -r $3 | tee -a $PWD/log/_build.svn.update.log
1186 else
1187 svn update | tee -a $PWD/log/_build.svn.update.log
1188 fi
1189 if [ $? -eq 0 ]; then
1190 echo "Finished!"
1191 else
1192 echo "Failure!"
1193 exit 1
1194 fi
1195 echo -n "Writing the svn-info to a file..."
1196 svn info > $PWD/svn_status
1197 if [ "$?" -eq "0" ]; then
1198 echo ".Finished!"
1199 else
1200 echo ".Failure!"
1201 exit 1
1202 fi
1203 chmod 755 $0
1204 exit 0
1205 ;;
1206 commit|ci)
1207 clear
1208 if [ -e /sbin/yast ]; then
1209 if [ "`echo $SVN_REVISION | cut -c 3`" -eq "0" ]; then
1210 $0 changelog
1211 fi
1212 fi
1213 echo "Upload the changed files..."
1214 sleep 1
1215 IPFIRE_SVN_MESSAGE=/tmp/ipfire-svn-co-message.txt
1216 rm -f $IPFIRE_SVN_MESSAGE
1217 mcedit $IPFIRE_SVN_MESSAGE
1218 svn commit -F $IPFIRE_SVN_MESSAGE
1219 rm -f $IPFIRE_SVN_MESSAGE
1220 $0 svn up
1221 ;;
1222 dist)
1223 if [ $3 ]; then
1224 SVN_REVISION=$3
1225 fi
1226 if [ -f ipfire-source-r$SVN_REVISION.tar.gz ]; then
1227 echo -ne "REV $SVN_REVISION: SKIPPED!\n"
1228 exit 0
1229 fi
1230 echo -en "REV $SVN_REVISION: Downloading..."
1231 svn export http://svn.ipfire.eu/svn/ipfire ipfire-source/ --force > /dev/null
1232 svn log http://svn.ipfire.eu/svn/ipfire -r 1:$SVN_REVISION > ipfire-source/Changelog
1233 #svn info http://svn.ipfire.eu/svn/ipfire -r $SVN_REVISION > ipfire-source/svn_status
1234 if [ "$?" -eq "0" ]; then
1235 echo -en "\r"
1236 else
1237 echo -en "\n"
1238 exit 1
1239 fi
1240 echo -en "REV $SVN_REVISION: Compressing files..."
1241 if [ -e ipfire-source/trunk/make.sh ]; then
1242 chmod 755 ipfire-source/trunk/make.sh
1243 fi
1244 tar cfz ipfire-source-r$SVN_REVISION.tar.gz ipfire-source
1245 if [ "$?" -eq "0" ]; then
1246 echo -ne "\r"
1247 else
1248 echo -ne "\n"
1249 exit 1
1250 fi
1251 echo -en "REV $SVN_REVISION: Cleaning up..."
1252 rm ipfire-source/ -r
1253 if [ "$?" -eq "0" ]; then
1254 echo -ne "\rREV $SVN_REVISION: ##### FINISHED! #####\n"
1255 else
1256 echo -ne "\n"
1257 exit 1
1258 fi
1259 ;;
1260 alldist|ad)
1261 echo -e "### THIS WILL TAKE A LONG TIME!\nDOING A FETCH FROM REV 1 TO REV $SVN_REVISION!\n"
1262 for i in `seq 1 $SVN_REVISION`; do
1263 $0 svn dist $i
1264 done
1265 ;;
1266 diff|di)
1267 echo -ne "Make a local diff to last svn revision..."
1268 svn diff > ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff
1269 if [ "$?" -eq "0" ]; then
1270 echo ".Done!"
1271 else
1272 echo ".Fail!"
1273 exit 1
1274 fi
1275 echo "Diff was successfully saved to ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff"
1276 ;;
1277 esac
1278 ;;
1279 make-config)
1280 echo -e "This is for creating your configuration..."
1281 echo -e "We will need some input:"
1282 echo -e ""
1283 echo -n "FTP-DOMAIN FOR THE ISO: "
1284 read IPFIRE_FTP_URL_EXT
1285 echo -n "PATH FOR $IPFIRE_FTP_URL_EXT: "
1286 read IPFIRE_FTP_PATH_EXT
1287 echo -n "USERNAME FOR $IPFIRE_FTP_URL_EXT: "
1288 read IPFIRE_FTP_USER_EXT
1289 echo -n "PASSWORD FOR $IPFIRE_FTP_URL_EXT: "
1290 read -s IPFIRE_FTP_PASS_EXT
1291 echo ""
1292 echo "(You can leave this empty if the cache-server is the same as your iso-server.)"
1293 echo -n "FTP-DOMAIN FOR THE CACHE: "
1294 read IPFIRE_FTP_URL_INT
1295 echo -n "PATH FOR $IPFIRE_FTP_URL_INT: "
1296 read IPFIRE_FTP_PATH_INT
1297 if [ $IPFIRE_FTP_URL_INT ]; then
1298 echo -n "USERNAME FOR $IPFIRE_FTP_URL_INT: "
1299 read IPFIRE_FTP_USER_INT
1300 echo -n "PASSWORD FOR $IPFIRE_FTP_URL_INT: "
1301 read -s IPFIRE_FTP_PASS_INT
1302 else
1303 IPFIRE_FTP_URL_INT=$IPFIRE_FTP_URL_EXT
1304 IPFIRE_FTP_USER_INT=$IPFIRE_FTP_USER_EXT
1305 IPFIRE_FTP_PASS_INT=$IPFIRE_FTP_PASS_EXT
1306 echo "USERNAME FOR $IPFIRE_FTP_URL_INT: $IPFIRE_FTP_USER_INT"
1307 echo "PASSWORD FOR $IPFIRE_FTP_URL_INT: !HIDDEN!"
1308 fi
1309 echo ""
1310 echo "(You can leave this empty if the pak-server is the same as your iso-server.)"
1311 echo -n "FTP-DOMAIN FOR THE PAKS: "
1312 read IPFIRE_FTP_URL_PAK
1313 echo -n "PATH FOR $IPFIRE_FTP_URL_PAK: "
1314 read IPFIRE_FTP_PATH_PAK
1315 if [ $IPFIRE_FTP_URL_PAK ]; then
1316 echo -n "USERNAME FOR $IPFIRE_FTP_URL_PAK: "
1317 read IPFIRE_FTP_USER_PAK
1318 echo -n "PASSWORD FOR $IPFIRE_FTP_URL_PAK: "
1319 read -s IPFIRE_FTP_PASS_PAK
1320 else
1321 IPFIRE_FTP_URL_PAK=$IPFIRE_FTP_URL_EXT
1322 IPFIRE_FTP_USER_PAK=$IPFIRE_FTP_USER_EXT
1323 IPFIRE_FTP_PASS_PAK=$IPFIRE_FTP_PASS_EXT
1324 echo "USERNAME FOR $IPFIRE_FTP_URL_PAK: $IPFIRE_FTP_USER_PAK"
1325 echo "PASSWORD FOR $IPFIRE_FTP_URL_PAK: !HIDDEN!"
1326 fi
1327 echo ""
1328 echo -e "ONE OR MORE EMAIL ADDRESS(ES) TO WHICH THE REPORTS WILL BE SENT"
1329 echo -e "(seperated by comma)"
1330 read IPFIRE_MAIL_REPORT
1331 echo -n "EMAIL FROM: "
1332 read IPFIRE_MAIL_FROM
1333 echo -n "EMAIL SERVER: "
1334 read IPFIRE_MAIL_SERVER
1335 echo -n "LOGIN TO MAIL SERVER: "
1336 read IPFIRE_MAIL_USER
1337 echo -n "MAIL PASSWORD: "
1338 read -s IPFIRE_MAIL_PASS
1339 echo -n "Saving..."
1340 for i in `seq 20`; do
1341 sleep 0.1; echo -n "."
1342 done
1343 echo ".Finished!"
1344 cat <<END > .config
1345 ### ISO server
1346 IPFIRE_FTP_URL_EXT=$IPFIRE_FTP_URL_EXT
1347 IPFIRE_FTP_PATH_EXT=$IPFIRE_FTP_PATH_EXT
1348 IPFIRE_FTP_USER_EXT=$IPFIRE_FTP_USER_EXT
1349 IPFIRE_FTP_PASS_EXT=$IPFIRE_FTP_PASS_EXT
1350 ### cache server
1351 IPFIRE_FTP_URL_INT=$IPFIRE_FTP_URL_INT
1352 IPFIRE_FTP_PATH_INT=$IPFIRE_FTP_PATH_INT
1353 IPFIRE_FTP_USER_INT=$IPFIRE_FTP_USER_INT
1354 IPFIRE_FTP_PASS_INT=$IPFIRE_FTP_PASS_INT
1355 ### paks server
1356 IPFIRE_FTP_URL_PAK=$IPFIRE_FTP_URL_PAK
1357 IPFIRE_FTP_PATH_PAK=$IPFIRE_FTP_PATH_PAK
1358 IPFIRE_FTP_USER_PAK=$IPFIRE_FTP_USER_PAK
1359 IPFIRE_FTP_PASS_PAK=$IPFIRE_FTP_PASS_PAK
1360 ### mail reports
1361 IPFIRE_MAIL_REPORT=$IPFIRE_MAIL_REPORT
1362 IPFIRE_MAIL_FROM=$IPFIRE_MAIL_FROM
1363 IPFIRE_MAIL_SERVER=$IPFIRE_MAIL_SERVER
1364 IPFIRE_MAIL_USER=$IPFIRE_MAIL_USER
1365 IPFIRE_MAIL_PASS=$IPFIRE_MAIL_PASS
1366 END
1367 ;;
1368 sync)
1369 echo -e "Syncing cache to ftp:"
1370 # rm -f doc/packages-to-remove-from-ftp
1371 ncftpls -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT ftp://$IPFIRE_FTP_URL_INT$IPFIRE_FTP_PATH_INT/ > ftplist
1372 for i in `ls -w1 cache/`; do
1373 grep $i ftplist
1374 if [ "$?" -ne "0" ]; then
1375 ncftpput -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT $IPFIRE_FTP_URL_INT $IPFIRE_FTP_PATH_INT/ cache/$i
1376 if [ "$?" -eq "0" ]; then
1377 echo -e "$i was successfully uploaded to the ftp server."
1378 else
1379 echo -e "There was an error while uploading $i to the ftp server."
1380 fi
1381 fi
1382 done
1383 rm -f ftplist
1384 ;;
1385 upload)
1386 case "$2" in
1387 iso)
1388 echo -e "Uploading the iso to $IPFIRE_FTP_URL_EXT."
1389 cat <<EOF > .ftp-commands
1390 mkdir $IPFIRE_FTP_PATH_EXT
1391 ls -lah
1392 quit
1393 EOF
1394 ncftp -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT < .ftp-commands
1395 rm -f .ftp-commands
1396 md5sum ipfire-install-$VERSION.i386.iso > ipfire-install-$VERSION.i386.iso.md5
1397 ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso
1398 ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso.md5
1399 ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-source-r$SVN_REVISION.tar.gz
1400 ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ svn_status
1401 if [ "$?" -eq "0" ]; then
1402 echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/."
1403 else
1404 echo -e "There was an error while uploading the iso to the ftp server."
1405 exit 1
1406 fi
1407 if [ "$3" = "--with-sources-cd" ]; then
1408 ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-sources-cd-$VERSION.$MACHINE.iso
1409 fi
1410 ;;
1411 paks)
1412 cat <<EOF > .ftp-commands
1413 mkdir $IPFIRE_FTP_PATH_PAK
1414 ls -lah
1415 quit
1416 EOF
1417 ncftp -u $IPFIRE_FTP_USER_PAK -p $IPFIRE_FTP_PASS_PAK $IPFIRE_FTP_URL_PAK < .ftp-commands
1418 rm -f .ftp-commands
1419 ncftpput -z -u $IPFIRE_FTP_USER_PAK -p $IPFIRE_FTP_PASS_PAK $IPFIRE_FTP_URL_PAK $IPFIRE_FTP_PATH_PAK/ packages/*
1420 if [ "$?" -eq "0" ]; then
1421 echo -e "The packages were successfully uploaded to $IPFIRE_FTP_URL_PAK$IPFIRE_FTP_PATH_PAK/."
1422 else
1423 echo -e "There was an error while uploading the packages to the ftp server."
1424 exit 1
1425 fi
1426 ;;
1427 esac
1428 ;;
1429 build-only)
1430 rm -f $BASEDIR/log/$2*
1431 BUILDMACHINE=`uname -m`
1432 prepareenv
1433 ipcopmake $2
1434 ;;
1435 build-silent)
1436 screen -dmS ipfire $0 build
1437 echo "Build started... This will take a while!"
1438 echo "You can see the status with 'screen -x ipfire'."
1439 ;;
1440 mail)
1441 chmod 755 tools/sendEmail
1442 ATTACHMENT=/tmp/ipfire-build-logs-R$SVN_REVISION.tar.gz
1443 if [ "$2" = "ERROR" ]; then
1444 SUBJECT="ERROR: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1445 echo "ERROR: $0 build!"
1446 cat <<END > /tmp/ipfire_mail_body
1447 When I was building IPFire on `hostname`, I have found an ERROR!
1448 Here you can see the logs and detect the reason for this error.
1449
1450 Best Regards
1451 Your IPFire-Build-Script
1452 END
1453 fi
1454 if [ "$2" = "SUCCESS" ]; then
1455 SUBJECT="SUCCESS: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1456 cat <<END > /tmp/ipfire_mail_body
1457 Building IPFire on `hostname` in Revision $SVN_REVISION was successfull!
1458 You can find the ISO on your ftp server.
1459
1460 Statistics:
1461 -----------
1462 Started: $IPFIRE_START_TIME
1463 Finished: `date`
1464
1465 Best Regards
1466 Your IPFire-Build-Script
1467 END
1468 fi
1469 if [ "$2" = "SVNUPDATE" ]; then
1470 SUBJECT="SVNUPDATE: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1471 echo "ERROR: $0 svn up!"
1472 cat <<END > /tmp/ipfire_mail_body
1473 When I was downloading the latest svn source,
1474 I have found an ERROR!
1475 Here you can see the logs and detect the reason for this error.
1476
1477 Best Regards
1478 Your IPFire-Build-Script
1479 END
1480 fi
1481
1482 if [ "$2" = "SVNDIST" ]; then
1483 SUBJECT="SVNDIST: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1484 echo "ERROR: $0 svn dist!"
1485 cat <<END > /tmp/ipfire_mail_body
1486 When I was exporting the latest svn source,
1487 I have found an ERROR!
1488 Here you can see the logs and detect the reason for this error.
1489
1490 Best Regards
1491 Your IPFire-Build-Script
1492 END
1493 fi
1494
1495 if [ "$2" = "PREFETCH" ]; then
1496 SUBJECT="PREFETCH: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1497 echo "ERROR: $0 prefetch!"
1498 cat <<END > /tmp/ipfire_mail_body
1499 When I was downloading the source packages,
1500 I have found an ERROR!
1501 Here you can see the logs and detect the reason for this error.
1502
1503 Best Regards
1504 Your IPFire-Build-Script
1505 END
1506 fi
1507
1508 if [ "$2" = "ISO" ]; then
1509 SUBJECT="ISO: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1510 echo "ERROR: $0 upload iso!"
1511 cat <<END > /tmp/ipfire_mail_body
1512 When I was uploading the iso image,
1513 I have found an ERROR!
1514 Here you can see the logs and detect the reason for this error.
1515
1516 Best Regards
1517 Your IPFire-Build-Script
1518 END
1519 fi
1520
1521 if [ "$2" = "PAKS" ]; then
1522 SUBJECT="PAKS: IPFIRE-BUILD R$SVN_REVISION on `hostname`"
1523 echo "ERROR: $0 upload paks!"
1524 cat <<END > /tmp/ipfire_mail_body
1525 When I was uploading the packages,
1526 I have found an ERROR!
1527 Here you can see the logs and detect the reason for this error.
1528
1529 Best Regards
1530 Your IPFire-Build-Script
1531 END
1532 fi
1533
1534 tar cfz $ATTACHMENT log/_build*
1535 cat <<END >> /tmp/ipfire_mail_body
1536
1537 Here is a summary... The full logs are in the attachment.
1538 ---------------------------------------------------------
1539
1540 `tail log/_*`
1541 END
1542 cat /tmp/ipfire_mail_body | tools/sendEmail -q \
1543 -f $IPFIRE_MAIL_FROM \
1544 -t $IPFIRE_MAIL_REPORT \
1545 -u $SUBJECT \
1546 -s $IPFIRE_MAIL_SERVER:25 \
1547 -xu $IPFIRE_MAIL_USER \
1548 -xp $IPFIRE_MAIL_PASS \
1549 -l log/_build.mail.log \
1550 -a $ATTACHMENT # -v
1551 rm -f /tmp/ipfire_mail_body $ATTACHMENT
1552 ;;
1553 unattended)
1554 if [ ! -f .config ]; then
1555 echo "No configuration found. Try ./make.sh make-config."
1556 fi
1557 ### This is our procedure that will compile the IPFire by herself...
1558 echo "### UPDATE LOGS"
1559 update_logs
1560
1561 if [ "$IPFIRE_REBUILD" -eq "0" ]; then
1562 echo "### SAVING TIME"
1563 export IPFIRE_START_TIME=`date`
1564
1565 echo "### GETTING TOOLCHAIN"
1566 $0 gettoolchain
1567
1568 echo "### RUNNING SVN-UPDATE"
1569 $0 svn update
1570 if [ $? -ne 0 ]; then
1571 $0 mail SVNUPDATE
1572 exit 1
1573 fi
1574
1575 echo "### EXPORT SOURCES"
1576 $0 svn dist
1577 if [ $? -ne 0 ]; then
1578 $0 mail SVNDIST
1579 exit 1
1580 fi
1581
1582 echo "### RUNNING PREFETCH"
1583 $0 prefetch | grep -q "md5 difference"
1584 if [ $? -eq 0 ]; then
1585 $0 mail PREFETCH
1586 exit 1
1587 fi
1588 fi
1589
1590 echo "### RUNNING BUILD"
1591 $0 build
1592 if [ $? -ne 0 ]; then
1593 $0 mail ERROR
1594 exit 1
1595 fi
1596
1597 echo "### MAKING SOURCES-ISO"
1598 echo "DISABLED by Delaco!"
1599 #$0 sources-iso
1600
1601 echo "### UPLOADING ISO"
1602 $0 upload iso
1603 if [ $? -ne 0 ]; then
1604 $0 mail ISO
1605 exit 1
1606 fi
1607
1608 echo "### UPLOADING PAKS"
1609 $0 upload paks
1610 if [ $? -ne 0 ]; then
1611 $0 mail PAKS
1612 exit 1
1613 fi
1614
1615 echo "### SUCCESS!"
1616 $0 mail SUCCESS
1617 exit 0
1618 ;;
1619 batch)
1620 if [ `screen -ls | grep -q ipfire` ]; then
1621 echo "Build is already running, sorry!"
1622 exit 1
1623 else
1624 if [ "$2" = "--rebuild" ]; then
1625 export IPFIRE_REBUILD=1
1626 echo "REBUILD!"
1627 else
1628 export IPFIRE_REBUILD=0
1629 fi
1630 echo -n "IPFire-Batch-Build is starting..."
1631 screen -dmS ipfire $0 unattended
1632 if [ "$?" -eq "0" ]; then
1633 echo ".Done!"
1634 else
1635 echo ".ERROR!"
1636 exit 1
1637 fi
1638 exit 0
1639 fi
1640 ;;
1641 watch)
1642 echo "Exit with Ctrl+A, Ctrl+D."
1643 echo -n "Preparing..."
1644 for i in `seq 5`; do
1645 sleep 0.1; echo -n "."
1646 done
1647 echo ".Ready!"
1648 sleep 0.3
1649 screen -x ipfire
1650 ;;
1651 *)
1652 clear
1653 svn info
1654 select name in "Exit" "IPFIRE: Prefetch" "IPFIRE: Build (silent)" "IPFIRE: Watch Build" "IPFIRE: Batch" "IPFIRE: Clean" "SVN: Commit" "SVN: Update" "SVN: Status" "SVN: Diff" "LOG: Tail" "Help"
1655 do
1656 case $name in
1657 "IPFIRE: Prefetch")
1658 $0 prefetch
1659 ;;
1660 "IPFIRE: Build (silent)")
1661 $0 build-silent
1662 ;;
1663 "IPFIRE: Watch Build")
1664 $0 watch
1665 ;;
1666 "IPFIRE: Batch")
1667 $0 batch
1668 ;;
1669 "IPFIRE: Clean")
1670 $0 clean
1671 ;;
1672 "SVN: Commit")
1673 echo "Are your sure to Update all Files to the Server (write: yes)?"; read input
1674 if [ "$input" == "yes" ]; then
1675 $0 svn commit
1676 fi
1677 $0 sync
1678 ;;
1679 "SVN: Update")
1680 $0 svn update
1681 ;;
1682 "SVN: Status")
1683 svn status # | grep -v ^?
1684 ;;
1685 "SVN: Diff")
1686 $0 svn diff
1687 ;;
1688 "Help")
1689 echo "Usage: $0 {build|changelog|check|checkclean|clean|gettoolchain|newpak|prefetch|shell|sync|toolchain}"
1690 cat doc/make.sh-usage
1691 ;;
1692 "LOG: Tail")
1693 tail -f log/_*
1694 ;;
1695 "Exit")
1696 break
1697 ;;
1698 esac
1699 done
1700 ;;
1701 esac