diff --git a/etc/cron.hourly/65-openmamba-autobuild-autoport b/etc/cron.hourly/65-openmamba-autobuild-autoport index 40637e3..eb82789 100755 --- a/etc/cron.hourly/65-openmamba-autobuild-autoport +++ b/etc/cron.hourly/65-openmamba-autobuild-autoport @@ -1,7 +1,7 @@ #!/bin/bash # -# openmamba-autobuild-autodist daily cron script -# (c) 2008-2011 by Silvan Calarco +# openmamba-autobuild-autoport daily cron script +# (c) 2008-2012 by Silvan Calarco # #. /etc/sysconfig/openmamba-central . /etc/sysconfig/autoport @@ -10,7 +10,7 @@ ME=`basename $0` [ "$$" == "`pidof -x $ME`" ] || { - echo "Warning: $ME script already running; exiting." + [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Warning: $ME script already running; exiting." exit 0 } @@ -35,35 +35,39 @@ done for a in $CHROOT_ARCHS; do # sudo mount -o bind /proc /var/autoport/$a/proc - echo "Updating packages in $a emulation environment" - LANG=C /usr/sbin/chroot /var/autoport/$a smart update - LANG=C /usr/sbin/chroot /var/autoport/$a smart upgrade -y + [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a chroot environment" + echo "Updating packages in $a chroot environment..." >> /var/autodist/log/autoport-$r.log + LANG=C /usr/sbin/chroot /var/autoport/$a smart update --quiet > /dev/null + LANG=C /usr/sbin/chroot /var/autoport/$a smart upgrade -y >> /var/autodist/log/autoport-$r.log for r in $PORT_REPOSITORIES; do - echo "Working on $r($a) in emulation mode" >> $local_ftp/$r/autoport.log - /usr/sbin/chroot /var/autoport/$a su -l sdk -c "autoport -b -r $r" >> $local_ftp/$r/autoport.log - cat /var/autoport/arm/home/sdk/.autoport/$a/log >> $local_ftp/$r/autoport.log - echo >> $local_ftp/$r/autoport.log + echo "Working on $r($a) in chroot mode..." >> /var/autodist/log/autoport-$r.log + [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Working on $r($a) in chroot mode" > $local_ftp/$r/autoport-$a.log + /usr/sbin/chroot /var/autoport/$a su -l sdk -c "autoport -b -r $r" >> $local_ftp/$r/autoport-$a.log + cat /var/autoport/$a/home/sdk/.autoport/$a/log >> $local_ftp/$r/autoport-$a.log + echo >> $local_ftp/$r/autoport-$a.log done done for a in $NATIVE_ARCHS; do - echo "Updating packages in $a native environment" - LANG=C smart update - LANG=C smart upgrade -y + [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a native environment" + echo "Updating packages in $a native environment..." >> /var/autodist/log/autoport-$r.log + LANG=C smart update > /dev/null + LANG=C smart upgrade -y >> /var/log/autoupgrade for r in $PORT_REPOSITORIES; do echo "Working on $r($a) in native mode" >> /var/autodist/log/autoport-$r.log su -l autodist -c "autoport -b -r $r" >> /var/autodist/log/autoport-$r.log - cat /var/autoport/arm/home/sdk/.autoport/$a/log >> $local_ftp/$r/autoport.log + cat /var/autodist/.autoport/$a/log >> /var/autodist/log/autoport-$r.log echo >> /var/autodist/log/autoport-$r.log done done for r in $PORT_REPOSITORIES; do for a in $CROSS_ARCHS; do - echo "Working on $r($a) in cross-platform mode" >> $local_ftp/$r/autoport.log - su -l autodist -c "autoport -b -x $a -r $r" >> $local_ftp/$r/autoport.log - cat /var/autodist/.autoport/$a/log >> $local_ftp/$r/autoport.log - echo >> $local_ftp/$r/autoport.log + [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Working on $r($a) in cross-platform mode" + echo "Working on $r($a) in cross-platform mode" >> /var/autodist/log/autoport-$r.log + su -l autodist -c "autoport -b -x $a -r $r" > $local_ftp/$r/autoport-$a.log + cat /var/autodist/.autoport/$a/log >> $local_ftp/$r/autoport-$a.log + echo >> $local_ftp/$r/autoport-$a.log done done diff --git a/etc/sysconfig/autoport b/etc/sysconfig/autoport index 27c6ab7..fa0a89d 100644 --- a/etc/sysconfig/autoport +++ b/etc/sysconfig/autoport @@ -1,8 +1,10 @@ # # autoport global configuration # -AUTOPORT_ENABLE=0 -CHROOT_ARCHS= -CROSS_ARCHS= -NATIVE_ARCHS=arm -PORT_REPOSITORIES="devel-makedist" +#AUTOPORT_ENABLE=1 +#CHROOT_ARCHS=x86_64 +#CROSS_ARCHS= +#NATIVE_ARCHS= +#PORT_REPOSITORIES="devel-makedist" + +local_ftp=/var/ftp/pub/openmamba/