IURT="perl -I/home/pterjan/git/iurt/lib /home/pterjan/git/iurt/iurt" if [ -f /distrib/logs/IN-PROGRESS ]; then date=`cat /distrib/logs/IN-PROGRESS`; logger -s "Resuming ${date}" else date=$1 [ -z "$date" ] && date=$(date +%Y-%m-%d) logger -s "Starting new build ${date}" echo $date > /distrib/logs/IN-PROGRESS fi # Rebuild chroot tarball, needed on resume too as we lose it when rebooting $IURT --repository /distrib --discard-packages --chrooted-urpmi /distrib -r cauldron x86_64 /distrib/cauldron/SRPMS/core/release/iurt-*.src.rpm || exit 1 dir="/distrib/logs/$date" mkdir -p "$dir/log" cat /distrib/cauldron/*/VERSION | sort > "$dir/log/VERSION" if [ "$IURT_NUM_SHARDS" != "" -a "$IURT_SHARD_ID" != "" ]; then shardopts="--num_shards $IURT_NUM_SHARDS --shard_id $IURT_SHARD_ID" fi $IURT --discard-packages --config local_spool "$dir" --repository /distrib --chrooted-urpmi /distrib --parallel 8 --rpmmacros '%_smp_mflags -j8' --distro cauldron -a aarch64 --build-all --fixed_media --resume $shardopts -m core >> "$dir/iurt.log" 2>&1 # Retry failures once, in case it's transient #sed -i '/failure$/d' "$dir/log/status.core.log" #$IURT --discard-packages --config local_spool "$dir" --repository /distrib --chrooted-urpmi http://127.0.0.1/ --parallel 8 --rpmmacros '%_smp_mflags -j16' --distro cauldron -a x86_64 --build-all --resume -m core >> "$dir/iurt.log" 2>&1 mv -f /distrib/logs/{IN-PROGRESS,LAST} #sleep 900 #sudo shutdown -h