svn commit: r221184 - projects/portbuild/scripts
Florent Thoumie
flz at FreeBSD.org
Thu Apr 28 21:25:59 UTC 2011
Author: flz
Date: Thu Apr 28 21:25:58 2011
New Revision: 221184
URL: http://svn.freebsd.org/changeset/base/221184
Log:
portbuild: rsync per-build scripts into /tmp.
We don't always have ${builddir}, so use /tmp/${buildid} instead.
Modified:
projects/portbuild/scripts/claim-chroot
projects/portbuild/scripts/dosetupnode
projects/portbuild/scripts/pdispatch
projects/portbuild/scripts/portbuild
projects/portbuild/scripts/setupnode
Modified: projects/portbuild/scripts/claim-chroot
==============================================================================
--- projects/portbuild/scripts/claim-chroot Thu Apr 28 20:25:15 2011 (r221183)
+++ projects/portbuild/scripts/claim-chroot Thu Apr 28 21:25:58 2011 (r221184)
@@ -109,7 +109,7 @@ for dir in ${chrootdir}/*; do
mkdir ${dir}/used 2>/dev/null || continue
touch ${dir}/used/${pkgname}
if [ -f ${dir}/.dirty ]; then
- ${builddir}/scripts/clean-chroot ${arch} ${branch} ${buildid} ${dir} 2 >/dev/null 2>/dev/null &
+ /tmp/${buildid}/scripts/clean-chroot ${arch} ${branch} ${buildid} ${dir} 2 >/dev/null 2>/dev/null &
continue
fi
found=1
Modified: projects/portbuild/scripts/dosetupnode
==============================================================================
--- projects/portbuild/scripts/dosetupnode Thu Apr 28 20:25:15 2011 (r221183)
+++ projects/portbuild/scripts/dosetupnode Thu Apr 28 21:25:58 2011 (r221184)
@@ -60,6 +60,12 @@ setup() {
. ${pbd}/${arch}/portbuild.conf
. ${pbd}/${arch}/portbuild.${node}
+ if [ "${buildid}" != "-" ]; then
+ rsync ${rsync_gzip} -e "${ssh_cmd}" -r -l -p --delete ${pbc}/scripts ${pbc}/sources \
+ ${client_user}@${node}:/tmp/${buildid}/
+ checkerror $? || (echo "Copying scripts to ${node} failed"; return 1)
+ fi
+
cmdpath=$(cat ${pbc}/scripts/setupnode | ssh -a ${client_user}@${node} 't=$(mktemp -t setupnode); cat >$t; echo $t; chmod 755 $t')
case ${cmdpath} in /tmp/*) ;; *) echo "Failed to scp claim-chroot to ${host}."; return 1;; esac
Modified: projects/portbuild/scripts/pdispatch
==============================================================================
--- projects/portbuild/scripts/pdispatch Thu Apr 28 20:25:15 2011 (r221183)
+++ projects/portbuild/scripts/pdispatch Thu Apr 28 21:25:58 2011 (r221184)
@@ -199,7 +199,7 @@ else
fi
fi
-${ssh_cmd} -a -n ${client_user}@${host} ${sudo_cmd} ${builddir}/scripts/clean-chroot ${arch} ${branch} ${buildid} ${chroot} ${clean}
+${ssh_cmd} -a -n ${client_user}@${host} ${sudo_cmd} /tmp/${buildid}/scripts/clean-chroot ${arch} ${branch} ${buildid} ${chroot} ${clean}
# XXX Set a dirty variable earlier and check here
if grep -q "^build of .*ended at" ${builddir}/logs/${pkgname}.log; then
Modified: projects/portbuild/scripts/portbuild
==============================================================================
--- projects/portbuild/scripts/portbuild Thu Apr 28 20:25:15 2011 (r221183)
+++ projects/portbuild/scripts/portbuild Thu Apr 28 21:25:58 2011 (r221184)
@@ -298,8 +298,8 @@ while [ $# -gt 0 ]; do
shift
done
-cp -p ${builddir}/scripts/buildscript ${chroot}
-cp -p ${builddir}/sources/pnohang.c ${chroot}
+cp -p /tmp/${buildid}/scripts/buildscript ${chroot}
+cp -p /tmp/${buildid}/sources/pnohang.c ${chroot}
# phase 0, compile pnohang
chroot ${chroot} /usr/bin/gcc -o /pnohang -Wall /pnohang.c 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log
Modified: projects/portbuild/scripts/setupnode
==============================================================================
--- projects/portbuild/scripts/setupnode Thu Apr 28 20:25:15 2011 (r221183)
+++ projects/portbuild/scripts/setupnode Thu Apr 28 21:25:58 2011 (r221184)
@@ -124,7 +124,7 @@ postcopy() {
fi
for i in ${wrkdir}/chroot/*; do
- ${sudo_cmd} ${builddir}/scripts/clean-chroot ${arch} ${branch} ${buildid} ${i} 2
+ ${sudo_cmd} /tmp/${buildid}/scripts/clean-chroot ${arch} ${branch} ${buildid} ${i} 2
done
wait
else
More information about the svn-src-projects
mailing list