#
############################################################################
# #
-# This file is part of the IPCop Firewall. #
+# This file is part of the IPFire Firewall. #
# #
-# IPCop is free software; you can redistribute it and/or modify #
+# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
-# IPCop is distributed in the hope that it will be useful, #
+# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
-# along with IPCop; if not, write to the Free Software #
+# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
-# Copyright (C) 2001 Mark Wormgoor <mark@wormgoor.com>. #
-# #
-# (c) 2001 Eric S. Johansson <esj@harvee.billerica.ma.us> Check for Bash #
-# (c) 2002 Thorsten Fischer <frosch@cs.tu-berlin.de> MD5Sum checking #
+# Copyright (C) 2006 IPFire-Team <entwickler@ipfire.org>. #
# #
############################################################################
-#
-# $Id: make.sh,v 1.129.2.145 2006/02/01 07:04:09 gespinasse Exp $
#
- NAME="IPFire" # Software name
+ NAME="IPFire" # Software name
SNAME="ipfire" # Short name
- VERSION="1.4" # Version number
-# PREVIOUSTAG=IPCOP_v1_4_10_FINAL
+ VERSION="1.4" # Version number
SLOGAN="We secure your network" # Software slogan
CONFIG_ROOT=/var/ipfire # Configuration rootdir
NICE=10
- MAX_RETRIES=3 # prefetch/check loop
+ MAX_RETRIES=3 # prefetch/check loop
KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
MACHINE=`uname -m`
return 0
}
+ipfiredist() {
+ if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
+# if [ ! `ls -w1 $BASEDIR/packages/*.tar.gz | grep $1` ]; then
+ echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
+ cp -f $BASEDIR/src/scripts/make-packages.sh $BASEDIR/build/usr/local/bin
+ 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 \
+ CONFIG_ROOT=$CONFIG_ROOT \
+ NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
+ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
+ CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
+ KVER=$KVER \
+ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
+ /bin/bash -x -c "cd /usr/src/lfs && \
+ make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
+ if [ $? -ne 0 ]; then
+ exiterror "Packaging $1"
+ fi
+# else
+# echo "`date -u '+%b %e %T'`: Packaging: The package $1 already exists"
+# fi
+ else
+ exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
+ fi
+ return 0
+}
+
installmake() {
if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
}
buildipcop() {
- # Run IPCop make scripts one by one
- LOGFILE="$BASEDIR/log/_build.ipcop.log"
+ # Run IPFire make scripts one by one
+ LOGFILE="$BASEDIR/log/_build.ipfire.log"
export LOGFILE
echo -ne "`date -u '+%b %e %T'`: Stage3 $NAME build \n" | tee -a $LOGFILE
if [ 'i386' = $MACHINE ]; then
# abuse the SMP flag, and make an minimal installer kernel first
# so that the boot floppy always works.....
- ipcopmake linux LFS_PASS=ipcop SMP=installer
- ipcopmake linux LFS_PASS=ipcop SMP=1
+ ipcopmake linux LFS_PASS=ipfire SMP=installer
+ ipcopmake linux LFS_PASS=ipfire SMP=1
ipcopmake 3cp4218 SMP=1
ipcopmake amedyn SMP=1
ipcopmake cxacru SMP=1
ipcopmake fcdslsl SMP=1
ipcopmake fcdslusb SMP=1
ipcopmake fcdslslusb SMP=1
+ ipcopmake fcpci SMP=1
+ ipcopmake fcclassic SMP=1
ipcopmake pulsar SMP=1
ipcopmake unicorn SMP=1
fi
- ipcopmake linux LFS_PASS=ipcop
+ ipcopmake linux LFS_PASS=ipfire
ipcopmake 3cp4218
ipcopmake amedyn
ipcopmake cxacru
ipcopmake fcdsl2
ipcopmake fcdslsl
ipcopmake fcdslusb
- ipcopmake fcdslslusb
+ ipcopmake fcdslslusb
+ ipcopmake fcpci
+ ipcopmake fcclassic
ipcopmake pulsar
ipcopmake unicorn
fi
ipcopmake iproute2
ipcopmake iptstate
ipcopmake iputils
+ ipcopmake l7-protocols
ipcopmake isapnptools
ipcopmake isdn4k-utils
ipcopmake kudzu
ipcopmake Net-DNS
ipcopmake Net-IPv4Addr
ipcopmake Net_SSLeay
+ ipcopmake IO-Stringy
+ ipcopmake Unix-Syslog
+ ipcopmake Mail-Tools
+ ipcopmake MIME-Tools
+ ipcopmake Net-Server
+ ipcopmake Convert-TNEF
+ ipcopmake Convert-UUlib
+ ipcopmake Archive-Tar
+ ipcopmake Archive-Zip
+ ipcopmake Locale-Country
+ ipcopmake GeoIP
+ ipcopmake fwhits
+ ipcopmake berkeley
+ ipcopmake BerkeleyDB ## The Perl module
ipcopmake noip_updater
ipcopmake ntp
ipcopmake oinkmaster
ipcopmake setup
ipcopmake snort
#ipcopmake speedycgi
+ ipcopmake saslauthd PASS=1
+ ipcopmake openldap
+ ipcopmake saslauthd PASS=2
ipcopmake squid
ipcopmake squid-graph
+ ipcopmake squidguard
ipcopmake tcpdump
ipcopmake traceroute
ipcopmake vlan
- ipcopmake wireless
+ #ipcopmake wireless
ipcopmake libsafe
ipcopmake 3c5x9setup
- echo -ne "`date -u '+%b %e %T'`: Building IPFire modules \n" | tee -a $LOGFILE
- ipcopmake berkeley-DB
+ echo -ne "`date -u '+%b %e %T'`: Building ### IPFire modules ### \n" | tee -a $LOGFILE
+ ipcopmake pakfire
+ ipcopmake startscripts
+## Zuerst die Libs und dann die Programme. Ordnung muss sein!
+ ipcopmake java
+ ipcopmake libtiff
+ ipcopmake libjpeg
+ ipcopmake libxml2
+ ipcopmake spandsp
+ ipcopmake lzo
+ ipcopmake openvpn
+ ipcopmake pkg-config
+ ipcopmake glib
ipcopmake xampp
ipcopmake pam
ipcopmake pammysql
- ipcopmake saslauthd
- ipcopmake postfix
- ipcopmake stund
- ipcopmake lpd
+ ipcopmake xinetd
+ ipcopmake ghostscript
+ ipcopmake cups
+# ipcopmake lpd ## Im Moment aus, da CUPS vorhanden ist.
+ ipcopmake samba
+ ipcopmake sudo
+ ipcopmake mc
ipcopmake pwlib
ipcopmake openh323
-
+ ipcopmake wget
+ ipcopmake wput
+ ipcopmake bridge-utils
+ ipcopmake screen
+ ipcopmake hddtemp
+ ipcopmake htop
+ ipcopmake lynx
+ echo -ne "`date -u '+%b %e %T'`: Building ### Mailserver ### \n" | tee -a $LOGFILE
+ ipcopmake postfix
+ ipcopmake procmail
+ ipcopmake fetchmail
+ ipcopmake cyrusimap
+ ipcopmake mailx
+ ipcopmake clamav
+ ipcopmake razor
+ ipcopmake spamassassin
+ ipcopmake amavisd
+ echo -ne "`date -u '+%b %e %T'`: Building ### VoIP-Server ### \n" | tee -a $LOGFILE
+ ipcopmake stund
+ ipcopmake asterisk
+ echo -ne "`date -u '+%b %e %T'`: Building ### MP3-Server ### \n" | tee -a $LOGFILE
+ ipcopmake lame
+ ipcopmake gnump3d
+ echo -ne "`date -u '+%b %e %T'`: Building ### P2P-Clients ### \n" | tee -a $LOGFILE
+ ipcopmake applejuice
+ ipcopmake edonkeyclc
+ ipcopmake sane
+ echo -ne "`date -u '+%b %e %T'`: Building ### Net-Tools ### \n" | tee -a $LOGFILE
+ ipcopmake ntop
+ ipcopmake rsync
+ ipcopmake tcpwrapper
+ ipcopmake portmap
+ ipcopmake nmap
+ ipcopmake iftop
+ ipcopmake nfs
+ ipcopmake ncftp
+ ipcopmake cftp
+ ipcopmake etherwake
+ ipcopmake ethereal
+# ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen
}
buildinstaller() {
echo "`date -u '+%b %e %T'`: Stripping files" | tee -a $LOGFILE
find $LFS/lib $LFS/usr/lib $LFS/usr/share/rrdtool-* $LFS/install ! -type l \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
! -name 'libc.so' ! -name 'libpthread.so' ! -name 'libcrypto.so.0.9.7.sha1' \
- -ls -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
+ -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
# add -ls before -exec if you want to verify what files are stripped
find $LFS/{,s}bin $LFS/usr/{,s}bin $LFS/usr/local/{,s}bin ! -type l \
rm -f $LFS/license.txt >> $LOGFILE 2>&1
cd $BASEDIR
fi
-
-# Create update for this version
-# echo "`date -u '+%b %e %T'`: Building update $VERSION tgz" | tee -a $LOGFILE
-# tar -cz -C $BASEDIR/build --files-from=$BASEDIR/updates/$VERSION/ROOTFILES.$MACHINE-$VERSION -f $BASEDIR/updates/$VERSION/patch.tar.gz --exclude='#*';
-# chmod 755 $BASEDIR/updates/$VERSION/setup
-# tar -cz -C $BASEDIR/updates/$VERSION -f $LFS/install/images/$SNAME-update-$VERSION.$MACHINE.tgz patch.tar.gz setup information
-# rm -f $LFS/var/run/{need-depmod-$KVER,need-depmod-$KVER-smp}
# Generating list of packages used
echo "`date -u '+%b %e %T'`: Generating packages list from logs" | tee -a $LOGFILE
fi
done
echo "====== List of softwares used to build $NAME Version: $VERSION ======" > $BASEDIR/doc/packages-list.txt
- grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipcop$\|setup$\|stage2$\|smp$\|tools$\|tools1$\|tools2$' \
+ grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipcop$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$' \
$BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
rm -f $BASEDIR/doc/packages-list
- # packages-list.txt is ready to be displayed for wiki page IPCopSoftwares
+ # packages-list.txt is ready to be displayed for wiki page
# Create ISO for CDRom and USB-superfloppy
ipcopmake cdrom
+ rm -f $LFS/install/images/*usb*
cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
+ ipfirepackages
+
# Cleanup
stdumount
rm -rf $BASEDIR/build/tmp/*
}
+ipfirepackages() {
+ ipfiredist applejuice
+ ipfiredist asterisk
+ ipfiredist cyrusimap
+ ipfiredist fetchmail
+ ipfiredist gnump3d
+ ipfiredist java
+ ipfiredist lame
+ ipfiredist libtiff
+ ipfiredist libxml2
+ ipfiredist ntop
+ ipfiredist postfix
+ ipfiredist pwlib
+ ipfiredist samba
+ ipfiredist xampp
+ ipfiredist xinetd
+ test -d $BASEDIR/packages || mkdir $BASEDIR/packages
+ mv -f $LFS/paks/*.tar.gz $LFS/paks/*.md5 $BASEDIR/packages >> $LOGFILE 2>&1
+ rm -rf $LFS/paks
+ rm -rf $BASEDIR/build/tmp/*
+}
+
# See what we're supposed to do
case "$1" in
build)
BUILDMACHINE=`uname -m`
- PACKAGE=`ls -v -r $BASEDIR/cache/$SNAME-1.4.*-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
+ PACKAGE=`ls -v -r $BASEDIR/cache/$SNAME-1.4-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
#only restore on a clean disk
if [ ! -f log/perl-*-tools ]; then
if [ ! -n "$PACKAGE" ]; then
entershell
;;
changelog)
- echo "Building doc/Changelog from CVS"
- # cv2cl script come from http://www.red-bean.com/cvs2cl/
- if [ ! -s $BASEDIR/doc/CVS/Tag ]; then
- BRANCHOPTS=""
- else
- BRANCH=`cat $BASEDIR/doc/CVS/Tag`
- BRANCH=${BRANCH:1}
- BRANCHOPTS="--follow-only $BRANCH"
- fi
-
- $BASEDIR/tools/cvs2cl.pl --gmt --show-dead $BRANCHOPTS -f $BASEDIR/doc/ChangeLog
- rm -f $BASEDIR/doc/ChangeLog.bak
- echo
- echo "Commit the change now to update CVS"
+ echo -n "Loading new Changelog from SVN: "
+ svn log http://svn.ipfire.eu/svn/ipfire > doc/ChangeLog
+ echo "Finished!"
;;
check)
echo "Checking sources files availability on the web"
done
rm -rf $BASEDIR/build
rm -rf $BASEDIR/cdrom
+ rm -rf $BASEDIR/packages
rm -rf $BASEDIR/log
- rm -f $BASEDIR/updates/$VERSION/patch.tar.gz;
if [ -h /tools ]; then
rm -f /tools
fi
;;
dist)
- echo "Building source package from CVS, list of changed files, MD5 of release files"
- if [ ! -s $BASEDIR/doc/CVS/Tag ]; then
- BRANCH=""
- BRANCHOPTS="-D `date +'%Y-%m-%d'`"
- else
- BRANCH=`cat $BASEDIR/doc/CVS/Tag`
- BRANCH=${BRANCH:1}
- BRANCHOPTS="-r $BRANCH"
- fi
+ echo -ne "Updating & building source package from SVN: "
+ svn up > /dev/null
+ svn export http://svn.ipfire.eu/svn/ipfire ipfire-source/ --force > /dev/null
+ tar cfz ipfire-source-`date +'%Y-%m-%d'`-r`svn info | grep Revision | cut -c 11-`.tar.gz ipfire-source
+ rm ipfire-source/ -r
+ echo "Finished!"
+ ;;
+newpak)
+ # create structure for a new package
+ echo -e "Name of the new package: $2"
+ if [ ! -f "lfs/$2" ]; then
+ echo "`date -u '+%b %e %T'`: Creating directory src/paks/$2"
+ mkdir -p src/paks/$2
+ cd src/paks/$2
+ echo "`date -u '+%b %e %T'`: Creating files"
+ cp $BASEDIR/lfs/postfix $BASEDIR/lfs/$2
- rm -rf $BASEDIR/build/tmp/$SNAME-$VERSION $BASEDIR/doc/release.txt
- cd $BASEDIR/build/tmp
- # build sources tgz
- echo "Export tree $BRANCH $SNAME-$VERSION"
- cvs -z3 -d `cat $BASEDIR/CVS/Root` export $BRANCHOPTS ipcop
- if [ $? -eq 0 ]; then
- mv ipcop $SNAME-$VERSION
- tar cfz $BASEDIR/$SNAME-sources-$VERSION.tgz $SNAME-$VERSION
- cd $BASEDIR
+ touch ROOTFILES
+ touch CONFFILES
+ touch {,un}install.sh
+ ## install.sh
+ echo '#!/bin/bash' > install.sh
+ echo '#' >> install.sh
+ echo '#################################################################' >> install.sh
+ echo '# #' >> install.sh
+ echo '# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #' >> install.sh
+ echo '# #' >> install.sh
+ echo '#################################################################' >> install.sh
+ echo '#' >> install.sh
+ echo '# Extract the files' >> install.sh
+ echo 'tar xfz files.tgz -C /' >> install.sh
+ echo 'cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2' >> install.sh
+ ## uninstall.sh
+ echo '#!/bin/bash' > uninstall.sh
+ echo '#################################################################' >> uninstall.sh
+ echo '# #' >> uninstall.sh
+ echo '# This file belongs to IPFire Firewall - GPLv2 - www.ipfire.org #' >> uninstall.sh
+ echo '# #' >> uninstall.sh
+ echo '#################################################################' >> uninstall.sh
+ echo '#' >> uninstall.sh
+ echo '# Delete the files' >> uninstall.sh
+ echo '## Befehl fehlt noch' >> uninstall.sh
+ echo 'rm -f /opt/pakfire/installed/ROOTFILES.$2' >> uninstall.sh
+ echo "`date -u '+%b %e %T'`: Adding files to SVN"
+ cd - && svn add lfs/$2 && svn add src/paks/$2
- if [ ! -d $BASEDIR/build/tmp/$PREVIOUSTAG ]; then
- # export previous version to be compared with actual, this help to check wich files need to go in update
- cd $BASEDIR/build/tmp
- echo "Export tree $PREVIOUSTAG"
- cvs -z3 -d `cat $BASEDIR/CVS/Root` export -r $PREVIOUSTAG ipcop
- mv ipcop $PREVIOUSTAG
- fi
- if [ -d $BASEDIR/build/tmp/$PREVIOUSTAG -o -d $BASEDIR/build/tmp/$SNAME-$VERSION ]; then
- cd $BASEDIR/build/tmp
- echo "diff $PREVIOUSTAG <> $BRANCH $SNAME-$VERSION >doc/updated-sources.txt"
- diff -rq $PREVIOUSTAG $SNAME-$VERSION > $BASEDIR/doc/updated-sources.txt
- mv $BASEDIR/doc/updated-sources.txt $BASEDIR/doc/updated-sources.bak
- sed -e "s+Files $PREVIOUSTAG\/++" \
- -e "s+ and .*$++" \
- -e "s+src/rc.d+etc/rc.d+" \
- -e "s+^langs/+var/ipcop/langs/+" \
- -e "s+html/cgi-bin+home/httpd/cgi-bin+" $BASEDIR/doc/updated-sources.bak \
- > $BASEDIR/doc/updated-sources.txt
- rm -f $BASEDIR/doc/updated-sources.bak
+ echo -n "Do you want to remove the folders? [y/n]"
+ read REM
+ if [ "$REM" == "y" ]; then
+ echo "Removing the folders..."
+ svn del src/paks/$2 --force
+ else
+ echo "Folders are kept."
fi
- fi
- ;;
-newupdate)
- # create structure for $VERSION update
- if [ ! -f "updates/$VERSION" ]; then
- mkdir -p updates/$VERSION
- cd updates/$VERSION
- touch information
- echo 'etc/issue' > ROOTFILES.alpha-$VERSION
- echo 'etc/issue' > ROOTFILES.i386-$VERSION
- echo 'patch.tar.gz' > .cvsignore
- sed -e "s+^UPGRADEVERSION.*$+UPGRADEVERSION=$VERSION+" $BASEDIR/src/scripts/updatesetup > setup
- chmod 755 setup
- cd ..
- echo "Adding directory $VERSION to cvs"
- cvs add $VERSION
- echo "Adding files to cvs"
- cvs add $VERSION/ROOTFILES.alpha-$VERSION \
- $VERSION/ROOTFILES.i386-$VERSION \
- $VERSION/information \
- $VERSION/setup \
- $VERSION/.cvsignore
else
- echo "update/$VERSION already exist"
+ echo "$2 already exists"
fi
- cd -
exit 0
;;
prefetch)
fi
cd -
;;
-rootfiles)
- PREVIOUSVERSION=`echo $PREVIOUSTAG | sed -e 's/IPCOP_v//' -e 's/_FINAL//' -e 's/_/\./g'`
- # make md5 list of actual build
- # some packages include a timestamp (kernel/perl/python/vim and more), so md5 vary at each build
- # anyway, it is sometime usable after a patch or a minor upgrade to know wich files include in update
- if [ ! -f "$BASEDIR/build/install/cdrom/$SNAME-$VERSION.tgz" ]; then
- echo "need cdrom be build to read include files list, use ./make.sh build before."
- else
- tar tzf $BASEDIR/build/install/cdrom/$SNAME-$VERSION.tgz > $BASEDIR/updates/$VERSION/FILES.tmp
- cd $BASEDIR/build
- rm -f $BASEDIR/updates/$VERSION/FILES-$MACHINE-$VERSION.md5
- for line in `cat $BASEDIR/updates/$VERSION/FILES.tmp`; do
- if [ -f "$line" -a ! -L "$line" ]; then
- md5sum "$line" >> $BASEDIR/updates/$VERSION/FILES-$MACHINE-$VERSION.md5
- fi
- done
- diff $BASEDIR/updates/$PREVIOUSVERSION/FILES-$MACHINE-$PREVIOUSVERSION.md5 \
- $BASEDIR/updates/$VERSION/FILES-$MACHINE-$VERSION.md5 \
- > $BASEDIR/updates/$VERSION/FILES-$MACHINE.diff
- awk '$1==">" {print $3}' $BASEDIR/updates/$VERSION/FILES-$MACHINE.diff \
- > $BASEDIR/updates/$VERSION/ROOTFILES.add.$MACHINE
- awk '$1=="<" {print $3}' $BASEDIR/updates/$VERSION/FILES-$MACHINE.diff \
- > $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE.tmp
- rm -f $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE
- for line in `cat $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE.tmp`; do
- # a file is only removed when not in add file
- if ( ! grep -q "^$line$" $BASEDIR/updates/$VERSION/ROOTFILES.add.$MACHINE ); then
- echo $line >> $BASEDIR/updates/$VERSION/ROOTFILES.remove.$MACHINE
- fi
- done
- rm -f $BASEDIR/updates/$VERSION/{FILES.tmp,FILES-*.diff,ROOTFILES.remove.*.tmp}
- fi
- exit 0
- ;;
toolchain)
prepareenv
buildtoolchain
gettoolchain)
BUILDMACHINE=`uname -m`
# arbitrary name to be updated in case of new toolchain package upload
- PACKAGE=$SNAME-1.4.11-toolchain-$BUILDMACHINE
- URL_SFNET=`grep URL_SFNET lfs/Config | awk '{ print $3 }'`
+ PACKAGE=$SNAME-1.4-toolchain-$BUILDMACHINE
+ URL_IPFIRE=`grep URL_IPFIRE lfs/Config | awk '{ print $3 }'`
echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
cd $BASEDIR/cache
- wget -c $URL_SFNET/ipcop/$PACKAGE.tar.gz $URL_SFNET/ipcop/$PACKAGE.md5
+ wget $URL_IPFIRE/toolchains/$PACKAGE.tar.gz $URL_IPFIRE/toolchains/$PACKAGE.md5 >& /dev/null
if [ $? -ne 0 ]; then
echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
+# else
+# if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
+# echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
+# echo "`date -u '+%b %e %T'`: Uncompressing toolchain" | tee -a $LOGFILE
+# cd $BASEDIR && tar xfz cache/$PACKAGE.tar.gz -C .
+# rm -f $BASEDIR/cache/$PACKAGE.{tar.gz,md5}
+# else
+# exiterror "$PACKAGE.md5 did not match, check downloaded package"
+# fi
+ fi
+ ;;
+paks)
+ prepareenv
+ buildpackages
+ # ipfirepackages
+ ;;
+update)
+ echo "Load the latest source-files:"
+ svn update
+ ;;
+commit)
+ echo "Upload the changed files:"
+ svn commit
+ ./make.sh sync
+ svn up > /dev/null
+ ;;
+make)
+ echo "Do a complete compile:"
+ ./make.sh prefetch && ./make.sh gettoolchain && ./make.sh build
+ ;;
+diff)
+ echo -ne "Make a local diff to last SVN revision: "
+ svn diff > ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff
+ echo "Finished!"
+ echo "Diff was successfully saved to ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff"
+ ;;
+sync)
+ echo -e "Syncing Cache to FTP:"
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
else
- if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
- echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
- else
- exiterror "$PACKAGE.md5 did not match, check downloaded package"
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
+ rm -f doc/packages-to-remove-from-ftp
+ ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/source/ > ftplist
+ for i in `ls -w1 cache/`; do
+ grep $i ftplist
+ if [ "$?" -ne "0" ]; then
+ ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/source cache/$i
+ if [ "$?" -eq "0" ]; then
+ echo -e "$i was successfully uploaded to the ftp server."
+ else
+ echo -e "There was an error while uploading $i to the ftp server."
+ 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
+ rm -f ftplist
+ ;;
+pub-iso)
+ echo -e "Upload the ISO to the beta-mirror!"
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
+ ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/beta/ | grep `svn info | grep Revision | cut -c 11-`
+ if [ "$?" -eq "1" ]; then
+ cp $BASEDIR/ipfire-install-1.4.i386.iso $BASEDIR/ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
+ md5sum ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso > ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso.md5
+ ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/beta/ ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
+ ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/beta/ ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso.md5
+ if [ "$?" -eq "0" ]; then
+ echo -e "The ISO of Revision `svn info | grep Revision | cut -c 11-` was successfully uploaded to the ftp server."
+ else
+ echo -e "There was an error while uploading the ISO to the ftp server."
+ fi
+ else
+ echo -e "File with name ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso already exists on the ftp server!"
+ fi
+ rm -f ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso{,.md5}
+ ;;
+pub-paks)
+ echo -e "Upload the packages to the beta-mirror!"
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
+ ncftpput -z -u web3 -p $PASS mirror.ipfire.org /html/source-packages/packages/ packages/*
+ if [ "$?" -eq "0" ]; then
+ echo -e "The packages were successfully uploaded to the ftp server."
+ else
+ echo -e "There was an error while uploading the packages to the ftp server."
fi
;;
*)
- echo "Usage: $0 {build|changelog|check|checkclean|clean|dist|gettoolchain|newupdate|prefetch|rootfiles|shell|toolchain}"
+ echo "Usage: $0 {build|changelog|check|checkclean|clean|commit|diff|dist|gettoolchain|make|newpak|prefetch|pub-iso|pub-paks|shell|sync|toolchain|update}"
cat doc/make.sh-usage
exit 1
;;