autoport: update cron and sysconfig configuration for chroot environment porting

This commit is contained in:
Silvan Calarco 2012-04-26 15:21:34 +02:00
parent 39689f7e7d
commit f18629b9cc
2 changed files with 29 additions and 23 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# openmamba-autobuild-autodist daily cron script # openmamba-autobuild-autoport daily cron script
# (c) 2008-2011 by Silvan Calarco <silvan.calarco@mambasoft.it> # (c) 2008-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
# #
#. /etc/sysconfig/openmamba-central #. /etc/sysconfig/openmamba-central
. /etc/sysconfig/autoport . /etc/sysconfig/autoport
@ -10,7 +10,7 @@
ME=`basename $0` ME=`basename $0`
[ "$$" == "`pidof -x $ME`" ] || { [ "$$" == "`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 exit 0
} }
@ -35,35 +35,39 @@ done
for a in $CHROOT_ARCHS; do for a in $CHROOT_ARCHS; do
# sudo mount -o bind /proc /var/autoport/$a/proc # sudo mount -o bind /proc /var/autoport/$a/proc
echo "Updating packages in $a emulation environment" [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a chroot environment"
LANG=C /usr/sbin/chroot /var/autoport/$a smart update echo "Updating packages in $a chroot environment..." >> /var/autodist/log/autoport-$r.log
LANG=C /usr/sbin/chroot /var/autoport/$a smart upgrade -y 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 for r in $PORT_REPOSITORIES; do
echo "Working on $r($a) in emulation mode" >> $local_ftp/$r/autoport.log echo "Working on $r($a) in chroot mode..." >> /var/autodist/log/autoport-$r.log
/usr/sbin/chroot /var/autoport/$a su -l sdk -c "autoport -b -r $r" >> $local_ftp/$r/autoport.log [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Working on $r($a) in chroot mode" > $local_ftp/$r/autoport-$a.log
cat /var/autoport/arm/home/sdk/.autoport/$a/log >> $local_ftp/$r/autoport.log /usr/sbin/chroot /var/autoport/$a su -l sdk -c "autoport -b -r $r" >> $local_ftp/$r/autoport-$a.log
echo >> $local_ftp/$r/autoport.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
done done
for a in $NATIVE_ARCHS; do for a in $NATIVE_ARCHS; do
echo "Updating packages in $a native environment" [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a native environment"
LANG=C smart update echo "Updating packages in $a native environment..." >> /var/autodist/log/autoport-$r.log
LANG=C smart upgrade -y LANG=C smart update > /dev/null
LANG=C smart upgrade -y >> /var/log/autoupgrade
for r in $PORT_REPOSITORIES; do for r in $PORT_REPOSITORIES; do
echo "Working on $r($a) in native mode" >> /var/autodist/log/autoport-$r.log 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 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 echo >> /var/autodist/log/autoport-$r.log
done done
done done
for r in $PORT_REPOSITORIES; do for r in $PORT_REPOSITORIES; do
for a in $CROSS_ARCHS; do for a in $CROSS_ARCHS; do
echo "Working on $r($a) in cross-platform mode" >> $local_ftp/$r/autoport.log [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Working on $r($a) in cross-platform mode"
su -l autodist -c "autoport -b -x $a -r $r" >> $local_ftp/$r/autoport.log echo "Working on $r($a) in cross-platform mode" >> /var/autodist/log/autoport-$r.log
cat /var/autodist/.autoport/$a/log >> $local_ftp/$r/autoport.log su -l autodist -c "autoport -b -x $a -r $r" > $local_ftp/$r/autoport-$a.log
echo >> $local_ftp/$r/autoport.log cat /var/autodist/.autoport/$a/log >> $local_ftp/$r/autoport-$a.log
echo >> $local_ftp/$r/autoport-$a.log
done done
done done

View File

@ -1,8 +1,10 @@
# #
# autoport global configuration # autoport global configuration
# #
AUTOPORT_ENABLE=0 #AUTOPORT_ENABLE=1
CHROOT_ARCHS= #CHROOT_ARCHS=x86_64
CROSS_ARCHS= #CROSS_ARCHS=
NATIVE_ARCHS=arm #NATIVE_ARCHS=
PORT_REPOSITORIES="devel-makedist" #PORT_REPOSITORIES="devel-makedist"
local_ftp=/var/ftp/pub/openmamba/