mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Generalize the packge building scripts to be able to be run on more than
one 'head' node, rather than just pointyhat itself. Constants are factored out into installation-specific files known as portbuild/conf/server.conf and portbuild/conf/client.conf. There is only one server.conf file. Individual <arch> directories may have their own client.conf files, or may symlink to ../conf/client.conf. Several bugs are fixed and improvements are made: - parameterize everything. - switch to csup. (This necessitates pushing the repos down one directory level, e.g. ports-head/ports and src/src-8. However, this will give us the flexibility to have e.g. src/src-8.1 in the future.) - note that the misnomer filename 'cvsdone', which was created here, is now changed to '.updated'. Feature safe: yes
This commit is contained in:
parent
2fe59a537a
commit
90089c9f17
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=256999
2 changed files with 37 additions and 62 deletions
|
@ -3,14 +3,16 @@
|
|||
# Update the master source trees that are used by package builds
|
||||
# and other consumers
|
||||
|
||||
# head is handled specially
|
||||
HEAD_BRANCH="9"
|
||||
NON_HEAD_BRANCHES=""
|
||||
pb=/var/portbuild
|
||||
. ${pb}/conf/server.conf
|
||||
|
||||
base=/a/snap
|
||||
zbase=a/snap
|
||||
base=${ZFS_MOUNTPOINT}/${SNAP_SRC_DIRECTORY_PREFIX}
|
||||
zbase=${ZFS_VOLUME}/${SNAP_SRC_DIRECTORY_PREFIX}
|
||||
|
||||
srepo=/r/ncvs
|
||||
supstamp() {
|
||||
fulldate=$1
|
||||
date -j -f %+ "${fulldate}" +%Y.%m.%d.%H.%M.%S
|
||||
}
|
||||
|
||||
stamp() {
|
||||
fulldate=$1
|
||||
|
@ -33,50 +35,22 @@ echo "Started at $(date)"
|
|||
# We need to preserve group writability so portmgr group can write
|
||||
umask 002
|
||||
|
||||
#cvsup -g /root/cvs-supfile || finish 1
|
||||
|
||||
cd $base/src-${HEAD_BRANCH}
|
||||
fulldate=$(date)
|
||||
cvs -Rq -d ${srepo} update -PdA -D "${fulldate}"
|
||||
echo ${fulldate} > cvsdone
|
||||
snapdate=$(stamp ${fulldate})
|
||||
zfs snapshot ${zbase}/src-${HEAD_BRANCH}@${snapdate}
|
||||
|
||||
# XXX
|
||||
# Special casing for 6 and 8 to test building against .0 src ABI
|
||||
# This requires some remodelling after we're done with all branches
|
||||
# XXX
|
||||
|
||||
cd $base/src-6
|
||||
fulldate=$(date)
|
||||
cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_6_4
|
||||
echo ${fulldate} > cvsdone
|
||||
snapdate=$(stamp ${fulldate})
|
||||
zfs snapshot ${zbase}/src-6@${snapdate}
|
||||
|
||||
cd $base/src-7
|
||||
fulldate=$(date)
|
||||
cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_7_1
|
||||
echo ${fulldate} > cvsdone
|
||||
snapdate=$(stamp ${fulldate})
|
||||
zfs snapshot ${zbase}/src-7@${snapdate}
|
||||
|
||||
cd $base/src-8
|
||||
fulldate=$(date)
|
||||
cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_8_0
|
||||
echo ${fulldate} > cvsdone
|
||||
snapdate=$(stamp ${fulldate})
|
||||
zfs snapshot ${zbase}/src-8@${snapdate}
|
||||
|
||||
# EO XXX
|
||||
|
||||
#for branch in $NON_HEAD_BRANCHES; do
|
||||
# cd $base/src-${branch}
|
||||
# fulldate=$(date)
|
||||
# cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_${branch}
|
||||
# echo ${fulldate} > cvsdone
|
||||
# snapdate=$(stamp ${fulldate})
|
||||
# zfs snapshot ${zbase}/src-${branch}@${snapdate}
|
||||
#done
|
||||
# for branch in 8; do
|
||||
for branch in $SRC_BRANCHES; do
|
||||
cd ${base}${branch}
|
||||
fulldate=$(date)
|
||||
supdate=$(supstamp ${fulldate})
|
||||
eval tag=\$SRC_BRANCH_${branch}_TAG
|
||||
cat ${SRC_MASTER_SUPFILE} | \
|
||||
sed "s|%%DATE%%|${supdate}|;s|%%PREFIX%%|${base}${branch}|;s|%%TAG%%|${tag}|" \
|
||||
> ${SRC_SUPFILE}.${branch}.now
|
||||
# example destination directory: /a/snap/src-6/src/ (tricky!)
|
||||
csup -L 2 ${SRC_SUPFILE}.${branch}.now > src-csup.${branch}.log
|
||||
echo ${fulldate} > src/.updated
|
||||
# hack for zfs breakiness
|
||||
find . -group wheel|xargs chgrp portmgr
|
||||
snapdate=$(stamp ${fulldate})
|
||||
zfs snapshot ${zbase}${branch}/src@${snapdate}
|
||||
done
|
||||
|
||||
finish 0
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
# Update the master ports tree that is used by package builds
|
||||
# and other consumers
|
||||
|
||||
base=/a/snap
|
||||
zbase=a/snap
|
||||
pb=/var/portbuild
|
||||
. ${pb}/conf/server.conf
|
||||
|
||||
prepo=/r/pcvs
|
||||
base=${ZFS_MOUNTPOINT}/${SNAP_PORTS_DIRECTORY}
|
||||
zbase=${ZFS_VOLUME}/${SNAP_PORTS_DIRECTORY}
|
||||
|
||||
supstamp() {
|
||||
fulldate=$1
|
||||
|
@ -34,17 +35,17 @@ echo "Started at $(date)"
|
|||
# We need to preserve group writability so portmgr group can write
|
||||
umask 002
|
||||
|
||||
#cvsup -g /root/cvs-supfile || finish 1
|
||||
|
||||
cd ${base}
|
||||
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
|
||||
cat ${PORTS_MASTER_SUPFILE} | \
|
||||
sed "s|%%DATE%%|${supdate}|;s|%%PREFIX%%|${base}|" \
|
||||
> ${PORTS_SUPFILE}.now
|
||||
# example destination directory: /a/snap/ports-head/ports/
|
||||
csup -L 2 ${PORTS_SUPFILE}.now > ports-csup.log
|
||||
echo ${fulldate} > ports/.updated
|
||||
# hack for zfs breakiness
|
||||
find ${base}/ports -group wheel|xargs chgrp portmgr
|
||||
find . -group wheel|xargs chgrp portmgr
|
||||
snapdate=$(stamp ${fulldate})
|
||||
zfs snapshot ${zbase}/ports@${snapdate}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue