diff options
author | kris <kris@FreeBSD.org> | 2004-09-27 06:09:09 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2004-09-27 06:09:09 +0800 |
commit | 2a34b8c4ff5a2606e0314b7a3851671c123c5f6b (patch) | |
tree | 2294522803879f6b6f2d36582e958fefe84c00a6 /Tools | |
parent | 83b6aea97c7f14f215f3527ebe9cf94608e40424 (diff) | |
download | freebsd-ports-gnome-2a34b8c4ff5a2606e0314b7a3851671c123c5f6b.tar.gz freebsd-ports-gnome-2a34b8c4ff5a2606e0314b7a3851671c123c5f6b.tar.zst freebsd-ports-gnome-2a34b8c4ff5a2606e0314b7a3851671c123c5f6b.zip |
Break out the setupnode function of dopackages into a separate script so
that it may be called by hand.
Support new portbuild.conf variables
client_user = user to connect to on the client (not necessarily
root). This user must have write permission to the
/var/portbuild tree if disconnected=1 (i.e. we're
going to run rsync).
rsync_gzip = set to "-z" to enable compression on low-bandwidth
disconnected clients.
Approved by: portmgr (self)
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/dosetupnode | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/dosetupnode b/Tools/portbuild/scripts/dosetupnode new file mode 100755 index 000000000000..48d8790777ac --- /dev/null +++ b/Tools/portbuild/scripts/dosetupnode @@ -0,0 +1,47 @@ +#!/bin/sh + +# configurable variables +pb=/var/portbuild +arch=$1 +branch=$2 +mach=$3 +shift + +. ${pb}/${arch}/portbuild.conf + +. ${pb}/scripts/buildenv + +# usage: setupnode pb arch scripts branch me node md5 tmpdir +setupnode () { + pb=$1 + arch=$2 + scripts=$3 + branch=$4 + me=$5 + node=$6 + md5=$7 + tmpdir=$8 + + echo "setting up of $node started at $(date)" + + # Read in client config and decide if the node is disconnected or not (i.e. mounts via NFS) + disconnected=0 + . ${pb}/${arch}/portbuild.${node} + + scp -p ${scripts}/setupnode ${client_user}@${node}:/tmp + ssh -n ${client_user}@${node} sh /tmp/setupnode ${me} ${pb} ${arch} ${branch} ${tmpdir} ${md5} ${disconnected} + + if [ "${disconnected}" = 1 ]; then + rsync ${rsync_gzip} -r -l -p --delete ${pb}/scripts ${client_user}@${node}:${pb}/ + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/portbuild* ${client_user}@${node}:${pb}/${arch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/ports ${client_user}@${node}:${pb}/${arch}/${branch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/src ${client_user}@${node}:${pb}/${arch}/${branch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/doc ${client_user}@${node}:${pb}/${arch}/${branch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/tarballs/bindist* ${client_user}@${node}:${pb}/${arch}/${branch}/tarballs + fi + + echo "setting up of $node ended at $(date)" +} + +md5=$(/sbin/md5 ${pb}/${arch}/${branch}/tarballs/bindist.tar | awk '{print $4}') +setupnode ${pb} ${arch} ${pb}/scripts ${branch} $(hostname) ${mach} ${md5} ${scratchdir} |