X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=make.sh;h=b46686942294b89c927137db03adb698e0d11ca6;hp=d7effc78d96691f2281024517adf117a0e6faee3;hb=913668bad54335982e951c3e27246deb55a7ca47;hpb=712d859c80a658ca7acc82d5aa5930e763bd442d diff --git a/make.sh b/make.sh index d7effc78d9..b466869422 100644 --- a/make.sh +++ b/make.sh @@ -344,7 +344,7 @@ ipcopmake() { ipfiredist() { if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then -# if [ ! `ls -w1 $BASEDIR/packages/*.tar.gz | grep $1` ]; then +# if [ ! `ls -w1 $BASEDIR/packages/*.ipfire | grep $1` ]; then echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE chroot $LFS /tools/bin/env -i HOME=/root \ TERM=$TERM PS1='\u:\w\$ ' \ @@ -587,6 +587,11 @@ buildipcop() { ipcopmake python ipcopmake libnet ipcopmake libpng + ipcopmake libtiff + ipcopmake libjpeg + ipcopmake lcms + ipcopmake libmng + ipcopmake freetype ipcopmake gd ipcopmake popt ipcopmake slang @@ -681,11 +686,6 @@ buildipcop() { ipcopmake startscripts ## Zuerst die Libs und dann die Programme. Ordnung muss sein! ipcopmake java - ipcopmake libtiff - ipcopmake libjpeg - ipcopmake lcms - ipcopmake libmng - ipcopmake freetype ipcopmake bootsplash ipcopmake libxml2 ipcopmake spandsp @@ -732,9 +732,17 @@ buildipcop() { ipcopmake bristuff ipcopmake asterisk ipcopmake mpg123 - echo -ne "`date -u '+%b %e %T'`: Building ### MP3-Server ### \n" | tee -a $LOGFILE + echo -ne "`date -u '+%b %e %T'`: Building ### Multimedia-Server ### \n" | tee -a $LOGFILE + ipcopmake libmad + ipcopmake libogg + ipcopmake libvorbis ipcopmake lame + ipcopmake xvid + ipcopmake mpeg2dec + ipcopmake ffmpeg + ipcopmake sox ipcopmake gnump3d + ipcopmake videolan echo -ne "`date -u '+%b %e %T'`: Building ### P2P-Clients ### \n" | tee -a $LOGFILE ipcopmake applejuice ipcopmake ocaml @@ -755,6 +763,9 @@ buildipcop() { ipcopmake etherwake ipcopmake ethereal ipcopmake tftp-hpa + ipcopmake subversion + ipcopmake iptraf + ipcopmake nagios # ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen } @@ -855,6 +866,8 @@ buildpackages() { cat $i | sed "s%^\./%#%" | sort >> $BASEDIR/log/FILES fi done + cd $BASEDIR/packages; ls -w1 *.ipfire | awk -F ".ipfire" '{ print $1 }' > $BASEDIR/packages/packages_list.txt + echo "###EOF###" >> $BASEDIR/packages/packages_list.txt cd $PWD @@ -868,30 +881,42 @@ ipfirepackages() { fi ipfiredist amavisd ipfiredist applejuice - # ipfiredist asterisk + ipfiredist asterisk ipfiredist clamav ipfiredist cups ipfiredist cyrusimap ipfiredist fetchmail + ipfiredist ffmpeg ipfiredist gnump3d + ipfiredist iptraf ipfiredist java ipfiredist lame + ipfiredist libmad + ipfiredist libogg ipfiredist libtiff + ipfiredist libvorbis ipfiredist libxml2 ipfiredist mailx ipfiredist mldonkey + ipfiredist mpeg2dec + ipfiredist nagios ipfiredist nfs ipfiredist nmap ipfiredist ntop + ipfiredist portmap ipfiredist postfix ipfiredist procmail ipfiredist samba + ipfiredist sox ipfiredist spamassassin + ipfiredist subversion + ipfiredist videolan ipfiredist web-cyradm ipfiredist xampp - ipfiredist xinetd +# ipfiredist xinetd + ipfiredist xvid test -d $BASEDIR/packages || mkdir $BASEDIR/packages - mv -f $LFS/install/packages/*.{tar.gz,md5} $BASEDIR/packages >> $LOGFILE 2>&1 + mv -f $LFS/install/packages/*.{ipfire,md5} $BASEDIR/packages >> $LOGFILE 2>&1 rm -rf $BASEDIR/build/install/packages/* } @@ -1134,6 +1159,17 @@ gettoolchain) echo "Toolchain is already downloaded. Exiting..." fi ;; +sources-iso) + prepareenv + echo "`date -u '+%b %e %T'`: Build sources iso for $MACHINE" | tee -a $LOGFILE + chroot $LFS /tools/bin/env -i HOME=/root \ + TERM=$TERM PS1='\u:\w\$ ' \ + PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \ + VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" MACHINE=$MACHINE \ + /bin/bash -x -c "cd /usr/src/lfs && make -f sources-iso LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1 + mv $LFS/install/images/ipfire-* $BASEDIR >> $LOGFILE 2>&1 + stdumount + ;; svn) case "$2" in update|up) @@ -1155,18 +1191,25 @@ svn) exit 1 fi chmod 755 $0 + tail log/_build.svn.update.log exit 0 ;; commit|ci) clear - $0 changelog + if [ -e /sbin/yast ]; then + $0 changelog + fi echo "Upload the changed files..." sleep 1 - svn commit + IPFIRE_SVN_MESSAGE=/tmp/ipfire-svn-co-message.txt + rm -f $IPFIRE_SVN_MESSAGE + mcedit $IPFIRE_SVN_MESSAGE + svn commit -F $IPFIRE_SVN_MESSAGE + rm -f $IPFIRE_SVN_MESSAGE $0 svn up ;; dist) - $0 svn up + #$0 svn up echo -ne "Download source package from svn..." svn export http://svn.ipfire.eu/svn/ipfire ipfire-source/ --force > /dev/null if [ "$?" -eq "0" ]; then @@ -1176,7 +1219,7 @@ svn) exit 1 fi echo -n "Compress files..." - tar cfz ipfire-source-`date +'%Y-%m-%d'`-r`svn info | grep Revision | cut -c 11-`.tar.gz ipfire-source + tar cfz ipfire-source-r$SVN_REVISION.tar.gz ipfire-source if [ "$?" -eq "0" ]; then echo ".Done!" else @@ -1296,7 +1339,7 @@ END ;; sync) echo -e "Syncing cache to ftp:" - rm -f doc/packages-to-remove-from-ftp +# rm -f doc/packages-to-remove-from-ftp ncftpls -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT ftp://$IPFIRE_FTP_URL_INT$IPFIRE_FTP_PATH_INT/ > ftplist for i in `ls -w1 cache/`; do grep $i ftplist @@ -1309,40 +1352,51 @@ sync) fi fi done - for i in `cat ftplist`; do - ls -w1 cache/ | grep $i - if [ "$?" -eq "1" ]; then - echo $i | grep -v toolchain >> doc/packages-to-remove-from-ftp - fi - done +# for i in `cat ftplist`; do +# ls -w1 cache/ | grep $i +# if [ "$?" -eq "1" ]; then +# echo $i | grep -v toolchain >> doc/packages-to-remove-from-ftp +# fi +# done rm -f ftplist ;; upload) case "$2" in iso) echo -e "Uploading the iso to $IPFIRE_FTP_URL_EXT." - ncftpls -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT ftp://$IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/ | grep $SVN_REVISION - if [ "$?" -eq "1" ]; then - cp $BASEDIR/ipfire-install-$VERSION.i386.iso $BASEDIR/ipfire-install-$VERSION.i386-r`svn info | grep Revision | cut -c 11-`.iso - md5sum ipfire-install-$VERSION.i386-r$SVN_REVISION.iso > ipfire-install-$VERSION.i386-r$SVN_REVISION.iso.md5 - ncftpput -V -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386-r$SVN_REVISION.iso - ncftpput -V -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386-r$SVN_REVISION.iso.md5 - ncftpput -V -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 - if [ "$?" -eq "0" ]; then - echo -e "The ISO of Revision $SVN_REVISION was successfully uploaded to the ftp server." - else - echo -e "There was an error while uploading the iso to the ftp server." - exit 1 - fi + cat < .ftp-commands +mkdir $IPFIRE_FTP_PATH_EXT +ls -lah +quit +EOF + ncftp -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT < .ftp-commands + rm -f .ftp-commands + md5sum ipfire-install-$VERSION.i386.iso > ipfire-install-$VERSION.i386.iso.md5 + ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso + 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 + 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 + ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ svn_status + if [ "$?" -eq "0" ]; then + echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/." else - echo -e "File with name ipfire-install-$VERSION.i386-r$SVN_REVISION.iso already exists on the ftp server!" + echo -e "There was an error while uploading the iso to the ftp server." + exit 1 + fi + if [ "$3" = "--with-sources-cd" ]; then + 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 fi - rm -f ipfire-install-$VERSION.i386-r$SVN_REVISION.iso{,.md5} ;; paks) + cat < .ftp-commands +mkdir $IPFIRE_FTP_PATH_PAK +ls -lah +quit +EOF + ncftp -u $IPFIRE_FTP_USER_PAK -p $IPFIRE_FTP_PASS_PAK $IPFIRE_FTP_URL_PAK < .ftp-commands + rm -f .ftp-commands ncftpput -z -u $IPFIRE_FTP_USER_PAK -p $IPFIRE_FTP_PASS_PAK $IPFIRE_FTP_URL_PAK $IPFIRE_FTP_PATH_PAK/ packages/* if [ "$?" -eq "0" ]; then - echo -e "The packages were successfully uploaded to the ftp server." + echo -e "The packages were successfully uploaded to $IPFIRE_FTP_URL_PAK$IPFIRE_FTP_PATH_PAK/." else echo -e "There was an error while uploading the packages to the ftp server." exit 1 @@ -1481,28 +1535,34 @@ unattended) ### This is our procedure that will compile the IPFire by herself... echo "### UPDATE LOGS" update_logs - echo "### SAVING TIME" - export IPFIRE_START_TIME=`date` - echo "### RUNNING SVN-UPDATE" - $0 svn update - if [ $? -ne 0 ]; then - $0 mail SVNUPDATE - exit 1 - fi + if [ "$IPFIRE_REBUILD" -eq "0" ]; then + echo "### SAVING TIME" + export IPFIRE_START_TIME=`date` + + echo "### GETTING TOOLCHAIN" + $0 gettoolchain + + echo "### RUNNING SVN-UPDATE" + $0 svn update + if [ $? -ne 0 ]; then + $0 mail SVNUPDATE + exit 1 + fi - echo "### EXPORT SOURCES" - $0 svn dist - if [ $? -ne 0 ]; then - $0 mail SVNDIST - exit 1 - fi + echo "### EXPORT SOURCES" + $0 svn dist + if [ $? -ne 0 ]; then + $0 mail SVNDIST + exit 1 + fi - echo "### RUNNING PREFETCH" - $0 prefetch | grep -q "md5 difference" - if [ $? -eq 0 ]; then - $0 mail PREFETCH - exit 1 + echo "### RUNNING PREFETCH" + $0 prefetch | grep -q "md5 difference" + if [ $? -eq 0 ]; then + $0 mail PREFETCH + exit 1 + fi fi echo "### RUNNING BUILD" @@ -1512,6 +1572,10 @@ unattended) exit 1 fi + echo "### MAKING SOURCES-ISO" + echo "DISABLED by Delaco!" + #$0 sources-iso + echo "### UPLOADING ISO" $0 upload iso if [ $? -ne 0 ]; then @@ -1531,10 +1595,16 @@ unattended) exit 0 ;; batch) - if [ `screen -ls | grep batch` ]; then + if [ `screen -ls | grep -q ipfire` ]; then echo "Build is already running, sorry!" exit 1 else + if [ "$2" = "--rebuild" ]; then + export IPFIRE_REBUILD=1 + echo "REBUILD!" + else + export IPFIRE_REBUILD=0 + fi echo -n "IPFire-Batch-Build is starting..." screen -dmS ipfire $0 unattended if [ "$?" -eq "0" ]; then @@ -1543,11 +1613,6 @@ batch) echo ".ERROR!" exit 1 fi - #if [ "$2" -eq "-v" ]; then - # screen -x ipfire - #else - # echo "You may attach you with '-v'." - #fi exit 0 fi ;; @@ -1580,7 +1645,11 @@ batch) $0 clean ;; "SVN: Commit") - $0 svn commit + echo "Are your sure to Update all Files to the Server (write: yes)?"; read input + if [ "$input" == "yes" ]; then + $0 svn commit + fi + $0 sync ;; "SVN: Update") $0 svn update