Date: Tue, 26 Apr 2011 22:38:43 +0000 (UTC) From: Florent Thoumie <flz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r221097 - in projects/portbuild: scripts tools Message-ID: <201104262238.p3QMchuC041934@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: flz Date: Tue Apr 26 22:38:43 2011 New Revision: 221097 URL: http://svn.freebsd.org/changeset/base/221097 Log: portbuild: build ptimeout/pnohang when needed. This removes the need to manually compile pnohang on every single arch when setting up a new pointyhat instance. Added bonus is less clutter in scripts/. Modified: projects/portbuild/scripts/dopackages projects/portbuild/scripts/dosetupnode projects/portbuild/scripts/pdispatch projects/portbuild/scripts/portbuild projects/portbuild/tools/showrunning.py Modified: projects/portbuild/scripts/dopackages ============================================================================== --- projects/portbuild/scripts/dopackages Tue Apr 26 22:18:53 2011 (r221096) +++ projects/portbuild/scripts/dopackages Tue Apr 26 22:38:43 2011 (r221097) @@ -676,6 +676,9 @@ if [ "$nobuild" = 0 ]; then else cp duds.orig duds fi + + # Compile ptimeout. + /usr/bin/gcc -o ${builddir}/ptimeout -Wall ${pbc}/sources/ptimeout.c dobuild ${pb} ${arch} ${branch} ${builddir} Modified: projects/portbuild/scripts/dosetupnode ============================================================================== --- projects/portbuild/scripts/dosetupnode Tue Apr 26 22:18:53 2011 (r221096) +++ projects/portbuild/scripts/dosetupnode Tue Apr 26 22:38:43 2011 (r221097) @@ -67,7 +67,7 @@ setup() { if [ "${norsync}" -eq 0 ]; then - rsync ${rsync_gzip} -e "${ssh_cmd}" -r -l -p --delete ${pb}/scripts \ + rsync ${rsync_gzip} -e "${ssh_cmd}" -r -l -p --delete ${pb}/scripts ${pb}/sources \ ${client_user}@${node}:${pb}/ checkerror $? || (echo "Copying scripts to ${node} failed"; return 1) Modified: projects/portbuild/scripts/pdispatch ============================================================================== --- projects/portbuild/scripts/pdispatch Tue Apr 26 22:18:53 2011 (r221096) +++ projects/portbuild/scripts/pdispatch Tue Apr 26 22:38:43 2011 (r221097) @@ -134,7 +134,7 @@ test -f ${pb}/${arch}/portbuild.${host} rm -f ${builddir}/logs/${pkgname}.log ${builddir}/logs/${pkgname}.log.bz2 rm -f ${builddir}/errors/${pkgname}.log ${builddir}/errors/${pkgname}.log.bz2 -${pb}/scripts/ptimeout.host $timeout ${ssh_cmd} -a -n ${client_user}@${host} ${sudo_cmd} ${command} ${arch} ${branch} ${buildid} ${chroot} ${flags} \"$ED\" \"$PD\" \"$FD\" \"$BD\" \"$RD\" ${args} 2>&1 +${builddir}/ptimeout $timeout ${ssh_cmd} -a -n ${client_user}@${host} ${sudo_cmd} ${command} ${arch} ${branch} ${buildid} ${chroot} ${flags} \"$ED\" \"$PD\" \"$FD\" \"$BD\" \"$RD\" ${args} 2>&1 error=$? # Pull in the results of the build from the client Modified: projects/portbuild/scripts/portbuild ============================================================================== --- projects/portbuild/scripts/portbuild Tue Apr 26 22:18:53 2011 (r221096) +++ projects/portbuild/scripts/portbuild Tue Apr 26 22:38:43 2011 (r221097) @@ -299,15 +299,23 @@ while [ $# -gt 0 ]; do done cp -p ${pb}/scripts/buildscript ${chroot} -cp -p ${pb}/scripts/pnohang.${arch} ${chroot}/pnohang +cp -p ${pb}/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 +if [ $? -ne 0 ]; then + error=255 +fi + +if [ "${error}" = 0 ]; then # phase 1, make checksum # Needs to be chroot not jail so that port can be fetched -chroot ${chroot} /buildscript ${dirname} 1 "$ED" "$PD" "$FD" "$BD" "$RD" 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log -if [ -f ${chroot}/tmp/status ]; then - error=$(cat ${chroot}/tmp/status) -else - error=255 + chroot ${chroot} /buildscript ${dirname} 1 "$ED" "$PD" "$FD" "$BD" "$RD" 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log + if [ -f ${chroot}/tmp/status ]; then + error=$(cat ${chroot}/tmp/status) + else + error=255 + fi fi if [ "${error}" = 0 ]; then Modified: projects/portbuild/tools/showrunning.py ============================================================================== --- projects/portbuild/tools/showrunning.py Tue Apr 26 22:18:53 2011 (r221096) +++ projects/portbuild/tools/showrunning.py Tue Apr 26 22:38:43 2011 (r221097) @@ -61,7 +61,7 @@ def getallsubprocs(pids): return ppids def dosubprocs(data): - """ recursively get list of subprocesses (ptimeout.host, sleep 15, ...) and fill in data """ + """ recursively get list of subprocesses (ptimeout, sleep 15, ...) and fill in data """ ppid_map = { } idlers = { } @@ -74,7 +74,7 @@ def dosubprocs(data): ppid = fields.pop(0) time = fields.pop(0) command = ' '.join(fields) - if command.count('ptimeout.host'): + if command.count('ptimeout'): command = "building" elif command == 'sleep 15': command = "waiting for idle node"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104262238.p3QMchuC041934>