pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/tinderbox-dragonfly pkgtools/tinderbox-dragon...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/47fc1634160c
branches:  trunk
changeset: 595647:47fc1634160c
user:      marino <marino%pkgsrc.org@localhost>
date:      Wed Nov 23 00:54:33 2011 +0000

description:
pkgtools/tinderbox-dragonFly: bulk build, jail fixes

1) postbuild hook sed was too greedy and deleted extra packages from
   the queue, fixed regex.
2) Hook checks if a queue entry exists before requesting that it be
   removed to avoid build aborts
3) The makeJail process was updated to include "make upgrade" which
   is required for certain device headers to appear.
4) Changed "dud" handling.  Previously requesting a build with a dud
   dependency would cause it never to move to the next package.
5) Add the two files that should have been committed with 3.4.1

diffstat:

 pkgtools/tinderbox-dragonfly/Makefile                |   3 +-
 pkgtools/tinderbox-dragonfly/distinfo                |   6 +-
 pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in |  39 ++++++++
 pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in   |  92 ++++++++++++++++++++
 pkgtools/tinderbox-dragonfly/patches/patch-aa        |  85 ++++++++++--------
 pkgtools/tinderbox-dragonfly/patches/patch-ai        |  72 ++++++++++++---
 6 files changed, 240 insertions(+), 57 deletions(-)

diffs (truncated from 680 to 300 lines):

diff -r d135186e9c6e -r 47fc1634160c pkgtools/tinderbox-dragonfly/Makefile
--- a/pkgtools/tinderbox-dragonfly/Makefile     Wed Nov 23 00:42:00 2011 +0000
+++ b/pkgtools/tinderbox-dragonfly/Makefile     Wed Nov 23 00:54:33 2011 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2011/11/20 16:20:24 marino Exp $
+# $NetBSD: Makefile,v 1.4 2011/11/23 00:54:33 marino Exp $
 #
 
 DISTNAME=      tinderbox-dragonfly-${TBOX_VERSION}
+PKGREVISION=   1
 CATEGORIES=    pkgtools
 MASTER_SITES=  http://tinderbox.marcuscom.com/
 DISTFILES=     tinderbox-${TBOX_VERSION}.tar.gz
diff -r d135186e9c6e -r 47fc1634160c pkgtools/tinderbox-dragonfly/distinfo
--- a/pkgtools/tinderbox-dragonfly/distinfo     Wed Nov 23 00:42:00 2011 +0000
+++ b/pkgtools/tinderbox-dragonfly/distinfo     Wed Nov 23 00:54:33 2011 +0000
@@ -1,14 +1,14 @@
-$NetBSD: distinfo,v 1.3 2011/11/20 16:20:24 marino Exp $
+$NetBSD: distinfo,v 1.4 2011/11/23 00:54:33 marino Exp $
 
 SHA1 (tinderbox-3.4.1.tar.gz) = bfa81429749cb3045887d54a7d83d76632404870
 RMD160 (tinderbox-3.4.1.tar.gz) = 00b74f300c202e45d224b1c6c1bde1d8c21f3e44
 Size (tinderbox-3.4.1.tar.gz) = 147755 bytes
-SHA1 (patch-aa) = dbc9dec65413065b2c492a15b70c0ea1928c8798
+SHA1 (patch-aa) = b31d674dc698f9b529799cd710f1534564152ff3
 SHA1 (patch-ab) = bead83362c0dbba1b71d11a076efb439fe3ac545
 SHA1 (patch-ac) = 7f62eacc4bea13a4fa36f6d84dab8750ca842366
 SHA1 (patch-ad) = 12c92ac0aeaf04260151d2e9e305cb6594cc3107
 SHA1 (patch-ae) = 57443a64d043d6549f19c99b431ea45ad29ba41e
-SHA1 (patch-ai) = b3ece9f6651a3ea2fc762a7818971fe69a18f6ef
+SHA1 (patch-ai) = a11aa4ca959fe549027371a48d39d6bd88f6c767
 SHA1 (patch-aj) = 5a6565b6844f6dbd7bb0dcd5aba74d722ae2e61b
 SHA1 (patch-ak) = af511026851a0faa893d461c4de44895d0d04410
 SHA1 (patch-al) = 0418a6aacc1ce7071a859bf69e8a29e47b64e197
diff -r d135186e9c6e -r 47fc1634160c pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in      Wed Nov 23 00:54:33 2011 +0000
@@ -0,0 +1,39 @@
+#/bin/sh
+#
+# Bulk Build, PostPortBuild Hook
+# When executed, this hook will remove the built port from the
+# ${BULKTMP}/bulk_${BUILD}.queue.  If the built port matches
+# the ${BULKTMP}/bulk_${BUILD}.active file, then the nextport
+# on the bulk build will be added to the queue.
+#
+
+PB=@TINROOT@
+BULKTMP=/tmp
+
+if [ -z "{BUILD}" ]; then
+   echo "BUILD envvar not defined."
+   exit
+fi
+
+if [ -z "{PORTDIR}" ]; then
+   echo "PORTDIR envvar not defined."
+   exit
+fi
+
+echo "${PORTDIR} (${PACKAGE_NAME}: ${STATUS})" >> ${BULKTMP}/bulk_${BUILD}.processed
+QLIST=`${PB}/scripts/tc listBuildPortsQueue -b ${BUILD} | grep " ${PORTDIR} "`
+if [ -n "${QLIST}" ]; then
+       ${PB}/scripts/tc rmBuildPortsQueueEntry -b ${BUILD} -d ${PORTDIR}
+fi
+
+SPORTDIR=`echo ${PORTDIR} | sed "s|/|\\\\\\/|"`
+sed "/^${SPORTDIR}\$/d" ${BULKTMP}/bulk_${BUILD}.queue > ${BULKTMP}/bulk_${BUILD}.queue.tmp
+mv ${BULKTMP}/bulk_${BUILD}.queue.tmp ${BULKTMP}/bulk_${BUILD}.queue
+
+if [ -f ${BULKTMP}/bulk_${BUILD}.active ]; then
+   ACTIVEPORT=`cat ${BULKTMP}/bulk_${BUILD}.active`
+   if [ "${ACTIVEPORT}" = "${PORTDIR}" ]; then
+      rm ${BULKTMP}/bulk_${BUILD}.active
+      ${PB}/scripts/contrib/bulk/bulkbuild.sh nextport ${BUILD}
+   fi
+fi
diff -r d135186e9c6e -r 47fc1634160c pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in        Wed Nov 23 00:54:33 2011 +0000
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# Accepts the command ($1) and the build ($2)
+# The command must be "kickoff", "nextport", or "stop"
+# The kickoff option will:
+#    - delete ${BULKTMP}/bulk_${BUILD}.active
+#    - delete ${BULKTMP}/bulk_${BUILD}.processed
+#    - delete ${BULKTMP}/bulk_${BUILD}.requested
+#    - create or recreate ${BULKTMP}/bulk_${BUILD}.queue
+#    - execute "nextport" option
+# The nextport option is called only if kickoff was stopped before.
+#   If there is no ${BULKTMP}/build_${BUILD}.active file, it will create one
+#   with the top line of the queue file, and add that port to tinderbox queue.
+# The stop option will delete the ${BULKTMP}/build_${BUILD}.active file which
+#   will prevent additional ports from being added to the queue.  The
+#   previously added port will continue to build along with all it's
+#   dependencies though.
+#
+
+PB=@TINROOT@
+BULKTMP=/tmp
+
+exitusage()
+{
+  echo "Usage: buildbuild.sh <kickoff|stop|nextport> <build>"
+  exit
+}
+
+buildNF()
+{
+  echo "The build '${1}' was not found in the database."
+  exit
+}
+
+portstreeNF()
+{
+  echo "The portstree was not found.  It was expected to be here:"
+  echo "${PB}/portstrees/${1}"
+  exit
+}
+
+option_stop()
+{
+  rm -f ${BULKTMP}/bulk_${1}.active
+}
+
+option_nextport()
+{
+  if [ -f ${BULKTMP}/bulk_${1}.active ]; then
+    echo "There is an active bulk build in work right now, command ignored."
+    exit
+  fi
+  NEXTPORT=`head -n 1 ${BULKTMP}/bulk_${1}.queue`
+  echo ${NEXTPORT}  > ${BULKTMP}/bulk_${1}.active
+  echo ${NEXTPORT} >> ${BULKTMP}/bulk_${1}.requested
+  ${PB}/scripts/tc addBuildPortsQueueEntry -b ${1} -d ${NEXTPORT} -p 9
+}
+
+option_kickoff()
+{
+  rm -f ${BULKTMP}/bulk_${1}.active
+  rm -f ${BULKTMP}/bulk_${1}.processed
+  rm -f ${BULKTMP}/bulk_${1}.requested
+
+  cd ${PB}/portstrees/${2}/pkgsrc
+  /usr/bin/find -s * -type d -maxdepth 1 -depth 1 > ${BULKTMP}/bulk_${1}.queue
+  option_nextport ${1}
+}
+
+[ $# -ne 2 ] && exitusage;
+
+BUILD=`${PB}/scripts/tc listBuilds | grep ^$2\$`
+[ -z "${BUILD}" ] && buildNF $2;
+
+PTREE=`${PB}/scripts/tc getPortsTreeForBuild -b $2`
+[ ! -d ${PB}/portstrees/${PTREE} ] && portstreeNF ${PTREE};
+
+
+case "$1" in
+'kickoff')
+        option_kickoff ${BUILD} ${PTREE}
+        ;;
+'stop')
+        option_stop ${BUILD}
+        ;;
+'nextport')
+        option_nextport ${BUILD}
+        ;;
+*)
+        exitusage
+        ;;
+esac
diff -r d135186e9c6e -r 47fc1634160c pkgtools/tinderbox-dragonfly/patches/patch-aa
--- a/pkgtools/tinderbox-dragonfly/patches/patch-aa     Wed Nov 23 00:42:00 2011 +0000
+++ b/pkgtools/tinderbox-dragonfly/patches/patch-aa     Wed Nov 23 00:54:33 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.3 2011/11/20 16:20:24 marino Exp $
+$NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $
 
 --- ../FreeBSD/lib/tc_command.sh       2011-11-20 13:11:37.088510000 +0000
 +++ lib/tc_command.sh
@@ -70,12 +70,12 @@
 -              if [ -z "${updateArch}" ]; then
 -                  updateArch=$(uname -p)
 -              fi
+-
+-              updateCmd="/usr/local/bin/lftp"
 +              updateCmd=/usr/bin/fetch
 +              iso_image="dfly-${updateArch}-${5}_REL.iso.bz2"
 +              iso_server=${4}
  
--              updateCmd="/usr/local/bin/lftp"
--
 -              if [ ! -x "${updateCmd}" ]; then
 -                  echo "ERROR: ${2} ${3}: ${updateCmd} missing"
 +              commandTreeChecks ${updateCmd} ${2} ${3}
@@ -397,7 +397,7 @@
 +          echo "ERROR: extract world failed - see ${jailBase}/world.tmp"
 +          buildJailCleanup 1 ${jailName} ${J_SRCDIR}
 +          return 1
-       fi
++      fi
 +      DFVERS=`awk '/^#define __DragonFly_version/ {print $3}' < ${J_TMPDIR}/usr/include/sys/param.h`
 +      MAJOR=`echo $DFVERS | awk '{print substr($0,1,1)}'`
 +      MINOR=`echo $DFVERS | awk '{print substr($0,2,3)}' | sed 's/0*//'`
@@ -405,7 +405,7 @@
 +          fakebranch="BRANCH=\"RELEASE_${MAJOR}_${MINOR}\""
 +      else
 +          fakebranch="BRANCH=\"DEVELOPMENT_${MAJOR}_${MINOR}\""
-+      fi
+       fi
 +      mkdir -p ${jailBase}/src/sys/sys ${jailBase}/src/sys/conf
 +      echo ${fakebranch} > ${jailBase}/src/sys/conf/newvers.sh
 +      cp ${J_TMPDIR}/usr/include/sys/param.h ${jailBase}/src/sys/sys
@@ -452,7 +452,7 @@
          rc=$?
          execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}"
          if [ ${rc} -ne 0 ]; then
-@@ -829,21 +877,80 @@ buildJail () {
+@@ -829,21 +877,91 @@ buildJail () {
          # Make a complete distribution
          echo "${jailName}: making distribution"
  
@@ -469,6 +469,17 @@
            echo "ERROR: distribution failed - see ${jailBase}/distribution.tmp"
            buildJailCleanup 1 ${jailName} ${J_SRCDIR}
 +          return 1
++      fi
++
++        # Make upgrade required to link device drivers (e.g. <dev/video/...)
++        echo "${jailName}: making world upgrade"
++
++        cd ${SRCBASE} && env DESTDIR=${J_TMPDIR} \
++            make upgrade > ${jailBase}/upgrade.tmp 2>&1
++        if [ $? -ne 0 ]; then
++          echo "ERROR: world upgrade failed - see ${jailBase}/upgrade.tmp"
++          buildJailCleanup 1 ${jailName} ${J_SRCDIR}
++          return 1
        fi
 +
 +        # Bootstrap pkgsrc tools using host machine's pkgsrc for source files
@@ -541,7 +552,7 @@
  
      MTREE_DIR=${SRCBASE}/etc/mtree
      mtree -deU -f ${MTREE_DIR}/BSD.root.dist \
-@@ -855,11 +962,8 @@ buildJail () {
+@@ -855,11 +973,8 @@ buildJail () {
      mtree -deU -f ${MTREE_DIR}/BSD.local.dist \
          -p ${J_TMPDIR}/usr/local >/dev/null 2>&1
  
@@ -553,16 +564,16 @@
      # Create the jail tarball
      echo "${jailName}: creating tarball"
      jailDir=$(tinderLoc jail ${jailName})
-@@ -873,7 +977,7 @@ buildJail () {
+@@ -873,7 +988,7 @@ buildJail () {
      fi
  
      # Move new logfiles into place
 -    for logfile in world distribution
-+    for logfile in world distribution pkgsrc
++    for logfile in world distribution pkgsrc upgrade
      do
        rm -f ${jailBase}/${logfile}.log
        mv -f ${jailBase}/${logfile}.tmp ${jailBase}/${logfile}.log 2>/dev/null
-@@ -927,29 +1031,25 @@ createJail () {
+@@ -927,29 +1042,25 @@ createJail () {
      jailArch=$(uname -m)
      mountSrc=""
      init=1
@@ -598,7 +609,7 @@
        ?)      return 1;;
  
        esac
-@@ -963,7 +1063,7 @@ createJail () {
+@@ -963,7 +1074,7 @@ createJail () {
  
      valid=$(echo ${jailName} | awk '{if (/^[[:digit:]]/) {print;}}')
      if [ -z "${valid}" ]; then
@@ -607,7 +618,7 @@
        return 1
      fi
  
-@@ -977,10 +1077,20 @@ createJail () {
+@@ -977,10 +1088,20 @@ createJail () {
        return 1
      fi
  
@@ -630,7 +641,7 @@
  
      echo -n "${jailName}: adding to datastore... "
  
-@@ -1091,28 +1201,25 @@ createPortsTree () {
+@@ -1091,28 +1212,25 @@ createPortsTree () {
      init=1
      mountSrc=""
      portsTreeName=""
@@ -662,7 +673,7 @@
        ?)      return 1;;



Home | Main Index | Thread Index | Old Index