- Separate ports tree updating to use cvsup from cvsup-master instead of cvs

update from NFS mount, which is just way too slow
This commit is contained in:
Pav Lucistnik 2009-05-21 16:15:56 +00:00
parent 2e9b06c517
commit 46e2ac6a6f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=234344
2 changed files with 56 additions and 6 deletions

View file

@ -32,12 +32,12 @@ umask 002
#cvsup -g /root/cvs-supfile || finish 1 #cvsup -g /root/cvs-supfile || finish 1
cd $base/ports #cd $base/ports
fulldate=$(date) #fulldate=$(date)
cvs -Rq -d ${prepo} update -PdA -D "${fulldate}" #cvs -Rq -d ${prepo} update -PdA -D "${fulldate}"
echo ${fulldate} > cvsdone #echo ${fulldate} > cvsdone
snapdate=$(stamp ${fulldate}) #snapdate=$(stamp ${fulldate})
zfs snapshot ${zbase}/ports@${snapdate} #zfs snapshot ${zbase}/ports@${snapdate}
cd $base/src-HEAD cd $base/src-HEAD
fulldate=$(date) fulldate=$(date)

View file

@ -0,0 +1,50 @@
#!/bin/sh
#
# Update the master ports and source trees that are used by package builds
# and other consumers
base=/a/snap
zbase=a/snap
srepo=/r/ncvs
prepo=/r/pcvs
supstamp() {
fulldate=$1
date -j -f %+ "${fulldate}" +%Y.%m.%d.%H.%M.%S
}
stamp() {
fulldate=$1
date -j -f %+ "${fulldate}" +%Y%m%d%H%M%S
}
finish() {
err=$1
end=$(date +%s)
echo "Finished at $(date)"
len=$((end-begin))
echo "Duration = $(date -j -f %s +%H:%M:%S ${len})"
exit 1
}
begin=$(date +%s)
echo "Started at $(date)"
# We need to preserve group writability so portmgr group can write
umask 002
#cvsup -g /root/cvs-supfile || finish 1
fulldate=$(date)
supdate=$(supstamp ${fulldate})
cat /root/ports-cvsup-master-supfile | sed "s|%%DATE%%|${supdate}|" > /root/ports-cvsup-master-supfile.now
cvsup -L 2 /root/ports-cvsup-master-supfile.now > ${base}/ports/cvsup.log
echo ${fulldate} > /a/snap/ports/cvsdone
snapdate=$(stamp ${fulldate})
zfs snapshot ${zbase}/ports@${snapdate}
finish 0