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.

Add the copying over of client.conf to the clients, and take care
to force the file copy regardless of whether it is a symlink.

Feature safe:	yes
This commit is contained in:
Mark Linimon 2010-06-25 23:21:46 +00:00
parent 6cbd9ecd57
commit f1c9dc80e7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=256987

View file

@ -1,5 +1,8 @@
#!/bin/sh
#
# $FreeBSD$
# server-side script to set up an individual client
# XXX Use a worker pool that only runs N setups at once to avoid
# raping the server. Hard to do in shell?
@ -19,6 +22,7 @@ buildid=$3
nodelist=$4
shift 4
. ${pb}/conf/server.conf
if [ -f ${pb}/${arch}/portbuild.conf ]; then
. ${pb}/${arch}/portbuild.conf
else
@ -67,6 +71,11 @@ setup() {
${client_user}@${node}:${pb}/
checkerror $? || (echo "Copying scripts to ${node} failed"; return 1)
# client.conf can be a symlink; copy the actual file
rsync ${rsync_gzip} -e "${ssh_cmd}" -r -L -p --delete ${pb}/${arch}/client.conf \
${client_user}@${node}:${pb}/${arch}
checkerror $? || (echo "copying client.conf to ${node} failed"; return 1)
rsync ${rsync_gzip} -e "${ssh_cmd}" -r -l -p --delete ${pb}/${arch}/portbuild* \
${client_user}@${node}:${pb}/${arch}
checkerror $? || (echo "copying portbuild.conf files to ${node} failed"; return 1)