Sun Dec 4 21:55:01 2011 UTC ()
pkgtools/tinderbox-dragonfly: Minor fixes

1) Bulk Build: don't add ports where there's no makefile present (x2)
2) Make hook processing more robust (g option on regex, check for
   non-empty string value)
3) Make enterBuild function work with HOST_WKRDIRS option
4) Handle specific DEPENDS+= case for perl where the addition of the
   dependency port is conditional on the version of perl used.
   This addresses the infinite loop case seen on some perl packages


(marino)
diff -r1.4 -r1.5 pkgsrc/pkgtools/tinderbox-dragonfly/Makefile
diff -r1.4 -r1.5 pkgsrc/pkgtools/tinderbox-dragonfly/distinfo
diff -r1.1 -r1.2 pkgsrc/pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in
diff -r1.1 -r1.2 pkgsrc/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in
diff -r1.1 -r1.2 pkgsrc/pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in
diff -r1.4 -r1.5 pkgsrc/pkgtools/tinderbox-dragonfly/patches/patch-aa
diff -r1.3 -r1.4 pkgsrc/pkgtools/tinderbox-dragonfly/patches/patch-aw

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/tinderbox-dragonfly/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/Attic/Makefile 2011/11/23 00:54:33 1.4
+++ pkgsrc/pkgtools/tinderbox-dragonfly/Attic/Makefile 2011/12/04 21:55:01 1.5
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.4 2011/11/23 00:54:33 marino Exp $ 1# $NetBSD: Makefile,v 1.5 2011/12/04 21:55:01 marino Exp $
2# 2#
3 3
4DISTNAME= tinderbox-dragonfly-${TBOX_VERSION} 4DISTNAME= tinderbox-dragonfly-${TBOX_VERSION}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= pkgtools 6CATEGORIES= pkgtools
7MASTER_SITES= http://tinderbox.marcuscom.com/ 7MASTER_SITES= http://tinderbox.marcuscom.com/
8DISTFILES= tinderbox-${TBOX_VERSION}.tar.gz 8DISTFILES= tinderbox-${TBOX_VERSION}.tar.gz
9 9
10MAINTAINER= draco@marino.st 10MAINTAINER= draco@marino.st
11HOMEPAGE= http://tinderbox/marcuscom.com 11HOMEPAGE= http://tinderbox/marcuscom.com
12COMMENT= Tinderbox package building system (pkgsrc) 12COMMENT= Tinderbox package building system (pkgsrc)
13LICENSE= modified-bsd 13LICENSE= modified-bsd
14 14
15DEPENDS+= p5-Compress-Bzip2>=2:../../archivers/p5-Compress-Bzip2 15DEPENDS+= p5-Compress-Bzip2>=2:../../archivers/p5-Compress-Bzip2
16DEPENDS+= csup>=20100101:../../net/csup 16DEPENDS+= csup>=20100101:../../net/csup
17DEPENDS+= scmgit>1.6:../../devel/scmgit 17DEPENDS+= scmgit>1.6:../../devel/scmgit
18 18

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/tinderbox-dragonfly/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/Attic/distinfo 2011/11/23 00:54:33 1.4
+++ pkgsrc/pkgtools/tinderbox-dragonfly/Attic/distinfo 2011/12/04 21:55:01 1.5
@@ -1,30 +1,30 @@ @@ -1,30 +1,30 @@
1$NetBSD: distinfo,v 1.4 2011/11/23 00:54:33 marino Exp $ 1$NetBSD: distinfo,v 1.5 2011/12/04 21:55:01 marino Exp $
2 2
3SHA1 (tinderbox-3.4.1.tar.gz) = bfa81429749cb3045887d54a7d83d76632404870 3SHA1 (tinderbox-3.4.1.tar.gz) = bfa81429749cb3045887d54a7d83d76632404870
4RMD160 (tinderbox-3.4.1.tar.gz) = 00b74f300c202e45d224b1c6c1bde1d8c21f3e44 4RMD160 (tinderbox-3.4.1.tar.gz) = 00b74f300c202e45d224b1c6c1bde1d8c21f3e44
5Size (tinderbox-3.4.1.tar.gz) = 147755 bytes 5Size (tinderbox-3.4.1.tar.gz) = 147755 bytes
6SHA1 (patch-aa) = b31d674dc698f9b529799cd710f1534564152ff3 6SHA1 (patch-aa) = ba2366ab87a212a82f6cc2464286f02e104932b5
7SHA1 (patch-ab) = bead83362c0dbba1b71d11a076efb439fe3ac545 7SHA1 (patch-ab) = bead83362c0dbba1b71d11a076efb439fe3ac545
8SHA1 (patch-ac) = 7f62eacc4bea13a4fa36f6d84dab8750ca842366 8SHA1 (patch-ac) = 7f62eacc4bea13a4fa36f6d84dab8750ca842366
9SHA1 (patch-ad) = 12c92ac0aeaf04260151d2e9e305cb6594cc3107 9SHA1 (patch-ad) = 12c92ac0aeaf04260151d2e9e305cb6594cc3107
10SHA1 (patch-ae) = 57443a64d043d6549f19c99b431ea45ad29ba41e 10SHA1 (patch-ae) = 57443a64d043d6549f19c99b431ea45ad29ba41e
11SHA1 (patch-ai) = a11aa4ca959fe549027371a48d39d6bd88f6c767 11SHA1 (patch-ai) = a11aa4ca959fe549027371a48d39d6bd88f6c767
12SHA1 (patch-aj) = 5a6565b6844f6dbd7bb0dcd5aba74d722ae2e61b 12SHA1 (patch-aj) = 5a6565b6844f6dbd7bb0dcd5aba74d722ae2e61b
13SHA1 (patch-ak) = af511026851a0faa893d461c4de44895d0d04410 13SHA1 (patch-ak) = af511026851a0faa893d461c4de44895d0d04410
14SHA1 (patch-al) = 0418a6aacc1ce7071a859bf69e8a29e47b64e197 14SHA1 (patch-al) = 0418a6aacc1ce7071a859bf69e8a29e47b64e197
15SHA1 (patch-am) = 26c9b09e99254d6d12e907876e191822ec3354f2 15SHA1 (patch-am) = 26c9b09e99254d6d12e907876e191822ec3354f2
16SHA1 (patch-an) = f91e604e1487f99374fc3119475ab775cf8257de 16SHA1 (patch-an) = f91e604e1487f99374fc3119475ab775cf8257de
17SHA1 (patch-ao) = b8635fa0fb158855a1f20d29f9251e045e2b9357 17SHA1 (patch-ao) = b8635fa0fb158855a1f20d29f9251e045e2b9357
18SHA1 (patch-ap) = 6dc77ea10efb8bdf26f4fc2330f89b70cba8aaab 18SHA1 (patch-ap) = 6dc77ea10efb8bdf26f4fc2330f89b70cba8aaab
19SHA1 (patch-aq) = 7cc9e2f723d192038d196da94fdfd8c569559458 19SHA1 (patch-aq) = 7cc9e2f723d192038d196da94fdfd8c569559458
20SHA1 (patch-ar) = 7cdf8aa5c0e0b44c9a1b4e7b878d616c251e62d9 20SHA1 (patch-ar) = 7cdf8aa5c0e0b44c9a1b4e7b878d616c251e62d9
21SHA1 (patch-as) = 4406f887e23b31bc2e1f2e8a55476125ee1bce8a 21SHA1 (patch-as) = 4406f887e23b31bc2e1f2e8a55476125ee1bce8a
22SHA1 (patch-at) = f46d54fab4f94e0b6778d26ac84ce933f734c6d5 22SHA1 (patch-at) = f46d54fab4f94e0b6778d26ac84ce933f734c6d5
23SHA1 (patch-au) = 27e654af19184d3a5a9028442b80556417bd45c8 23SHA1 (patch-au) = 27e654af19184d3a5a9028442b80556417bd45c8
24SHA1 (patch-av) = 806b9d4538f13d54b023b9630b74f3b859a65f67 24SHA1 (patch-av) = 806b9d4538f13d54b023b9630b74f3b859a65f67
25SHA1 (patch-aw) = 73f14c8d3d8df6afd987e5c30dbb658565bf3568 25SHA1 (patch-aw) = 3a7b9bb52942ad99055b9ab914aac74622355872
26SHA1 (patch-az) = 91526a66f47d53357703b2739c1384d4012e7c6c 26SHA1 (patch-az) = 91526a66f47d53357703b2739c1384d4012e7c6c
27SHA1 (patch-ba) = 636adea0d3fb22132e2a6d81fd016a9560017aca 27SHA1 (patch-ba) = 636adea0d3fb22132e2a6d81fd016a9560017aca
28SHA1 (patch-bb) = 7a007428deeea2f243cebcc84a42e0c5fbebc9a7 28SHA1 (patch-bb) = 7a007428deeea2f243cebcc84a42e0c5fbebc9a7
29SHA1 (patch-bc) = 4d85687520e2c0d3bd6ab03c4ba9dc3f6ad6c98c 29SHA1 (patch-bc) = 4d85687520e2c0d3bd6ab03c4ba9dc3f6ad6c98c
30SHA1 (patch-be) = f5e0e9a00de8d1f8b16d36f7cbe23ecc3daee47d 30SHA1 (patch-be) = f5e0e9a00de8d1f8b16d36f7cbe23ecc3daee47d

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/add_all_packages.sh.in (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/add_all_packages.sh.in 2011/11/14 02:00:20 1.1
+++ pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/add_all_packages.sh.in 2011/12/04 21:55:01 1.2
@@ -34,17 +34,19 @@ buildNF() @@ -34,17 +34,19 @@ buildNF()
34[ ! -d ${PB}/portstrees/$2 ] && portstreeNF $2; 34[ ! -d ${PB}/portstrees/$2 ] && portstreeNF $2;
35 35
36BUILD=`${PB}/scripts/tc listBuilds | grep ^$1\$` 36BUILD=`${PB}/scripts/tc listBuilds | grep ^$1\$`
37[ -z "${BUILD}" ] && buildNF $1; 37[ -z "${BUILD}" ] && buildNF $1;
38 38
39PTREE=`${PB}/scripts/tc listPortsTrees | grep ^$2\$` 39PTREE=`${PB}/scripts/tc listPortsTrees | grep ^$2\$`
40[ -z "${PTREE}" ] && portstreedbNF $1; 40[ -z "${PTREE}" ] && portstreedbNF $1;
41 41
42cd ${PB}/portstrees/${2}/pkgsrc 42cd ${PB}/portstrees/${2}/pkgsrc
43PORTS=`/usr/bin/find -s * -type d -maxdepth 1 -depth 1` 43PORTS=`/usr/bin/find -s * -type d -maxdepth 1 -depth 1`
44 44
45COUNTER=0 45COUNTER=0
46for PORT in ${PORTS}; do 46for PORT in ${PORTS}; do
47 COUNTER=`expr ${COUNTER} + 1` 47 if [ -f ${PORT}/Makefile ]; then
48 printf "%05d ${BUILD} ${PORT}\n" ${COUNTER} 48 COUNTER=`expr ${COUNTER} + 1`
49 ${PB}/scripts/tc addPort -b ${BUILD} -d ${PORT} -R 49 printf "%05d ${BUILD} ${PORT}\n" ${COUNTER}
 50 ${PB}/scripts/tc addPort -b ${BUILD} -d ${PORT} -R
 51 fi
50done 52done

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/bulk_hook_1.sh.in (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/bulk_hook_1.sh.in 2011/11/23 00:54:33 1.1
+++ pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/bulk_hook_1.sh.in 2011/12/04 21:55:01 1.2
@@ -16,24 +16,26 @@ if [ -z "{BUILD}" ]; then @@ -16,24 +16,26 @@ if [ -z "{BUILD}" ]; then
16fi 16fi
17 17
18if [ -z "{PORTDIR}" ]; then 18if [ -z "{PORTDIR}" ]; then
19 echo "PORTDIR envvar not defined." 19 echo "PORTDIR envvar not defined."
20 exit 20 exit
21fi 21fi
22 22
23echo "${PORTDIR} (${PACKAGE_NAME}: ${STATUS})" >> ${BULKTMP}/bulk_${BUILD}.processed 23echo "${PORTDIR} (${PACKAGE_NAME}: ${STATUS})" >> ${BULKTMP}/bulk_${BUILD}.processed
24QLIST=`${PB}/scripts/tc listBuildPortsQueue -b ${BUILD} | grep " ${PORTDIR} "` 24QLIST=`${PB}/scripts/tc listBuildPortsQueue -b ${BUILD} | grep " ${PORTDIR} "`
25if [ -n "${QLIST}" ]; then 25if [ -n "${QLIST}" ]; then
26 ${PB}/scripts/tc rmBuildPortsQueueEntry -b ${BUILD} -d ${PORTDIR} 26 ${PB}/scripts/tc rmBuildPortsQueueEntry -b ${BUILD} -d ${PORTDIR}
27fi 27fi
28 28
29SPORTDIR=`echo ${PORTDIR} | sed "s|/|\\\\\\/|"` 29SPORTDIR=`echo ${PORTDIR} | sed "s|/|\\\\\\/|g"`
30sed "/^${SPORTDIR}\$/d" ${BULKTMP}/bulk_${BUILD}.queue > ${BULKTMP}/bulk_${BUILD}.queue.tmp 30if [ -n "${SPORTDIR}" ]; then
31mv ${BULKTMP}/bulk_${BUILD}.queue.tmp ${BULKTMP}/bulk_${BUILD}.queue 31 sed "/^${SPORTDIR}\$/d" ${BULKTMP}/bulk_${BUILD}.queue > ${BULKTMP}/bulk_${BUILD}.queue.tmp
 32 mv ${BULKTMP}/bulk_${BUILD}.queue.tmp ${BULKTMP}/bulk_${BUILD}.queue
 33fi
32 34
33if [ -f ${BULKTMP}/bulk_${BUILD}.active ]; then 35if [ -f ${BULKTMP}/bulk_${BUILD}.active ]; then
34 ACTIVEPORT=`cat ${BULKTMP}/bulk_${BUILD}.active` 36 ACTIVEPORT=`cat ${BULKTMP}/bulk_${BUILD}.active`
35 if [ "${ACTIVEPORT}" = "${PORTDIR}" ]; then 37 if [ "${ACTIVEPORT}" = "${PORTDIR}" ]; then
36 rm ${BULKTMP}/bulk_${BUILD}.active 38 rm ${BULKTMP}/bulk_${BUILD}.active
37 ${PB}/scripts/contrib/bulk/bulkbuild.sh nextport ${BUILD} 39 ${PB}/scripts/contrib/bulk/bulkbuild.sh nextport ${BUILD}
38 fi 40 fi
39fi 41fi

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/bulkbuild.sh.in (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/bulkbuild.sh.in 2011/11/23 00:54:34 1.1
+++ pkgsrc/pkgtools/tinderbox-dragonfly/files/Attic/bulkbuild.sh.in 2011/12/04 21:55:01 1.2
@@ -53,27 +53,32 @@ option_nextport() @@ -53,27 +53,32 @@ option_nextport()
53 NEXTPORT=`head -n 1 ${BULKTMP}/bulk_${1}.queue` 53 NEXTPORT=`head -n 1 ${BULKTMP}/bulk_${1}.queue`
54 echo ${NEXTPORT} > ${BULKTMP}/bulk_${1}.active 54 echo ${NEXTPORT} > ${BULKTMP}/bulk_${1}.active
55 echo ${NEXTPORT} >> ${BULKTMP}/bulk_${1}.requested 55 echo ${NEXTPORT} >> ${BULKTMP}/bulk_${1}.requested
56 ${PB}/scripts/tc addBuildPortsQueueEntry -b ${1} -d ${NEXTPORT} -p 9 56 ${PB}/scripts/tc addBuildPortsQueueEntry -b ${1} -d ${NEXTPORT} -p 9
57} 57}
58 58
59option_kickoff() 59option_kickoff()
60{ 60{
61 rm -f ${BULKTMP}/bulk_${1}.active 61 rm -f ${BULKTMP}/bulk_${1}.active
62 rm -f ${BULKTMP}/bulk_${1}.processed 62 rm -f ${BULKTMP}/bulk_${1}.processed
63 rm -f ${BULKTMP}/bulk_${1}.requested 63 rm -f ${BULKTMP}/bulk_${1}.requested
64 64
65 cd ${PB}/portstrees/${2}/pkgsrc 65 cd ${PB}/portstrees/${2}/pkgsrc
66 /usr/bin/find -s * -type d -maxdepth 1 -depth 1 > ${BULKTMP}/bulk_${1}.queue 66 RAW=`/usr/bin/find -s * -type d -maxdepth 1 -depth 1`
 67 for dossier in ${RAW}; do
 68 if [ -f ${dossier}/Makefile ]; then
 69 echo ${dossier} >> ${BULKTMP}/bulk_${1}.queue
 70 fi
 71 done
67 option_nextport ${1} 72 option_nextport ${1}
68} 73}
69 74
70[ $# -ne 2 ] && exitusage; 75[ $# -ne 2 ] && exitusage;
71 76
72BUILD=`${PB}/scripts/tc listBuilds | grep ^$2\$` 77BUILD=`${PB}/scripts/tc listBuilds | grep ^$2\$`
73[ -z "${BUILD}" ] && buildNF $2; 78[ -z "${BUILD}" ] && buildNF $2;
74 79
75PTREE=`${PB}/scripts/tc getPortsTreeForBuild -b $2` 80PTREE=`${PB}/scripts/tc getPortsTreeForBuild -b $2`
76[ ! -d ${PB}/portstrees/${PTREE} ] && portstreeNF ${PTREE}; 81[ ! -d ${PB}/portstrees/${PTREE} ] && portstreeNF ${PTREE};
77 82
78 83
79case "$1" in 84case "$1" in

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/tinderbox-dragonfly/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/patches/Attic/patch-aa 2011/11/23 00:54:34 1.4
+++ pkgsrc/pkgtools/tinderbox-dragonfly/patches/Attic/patch-aa 2011/12/04 21:55:01 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ 1$NetBSD: patch-aa,v 1.5 2011/12/04 21:55:01 marino Exp $
2 2
3--- ../FreeBSD/lib/tc_command.sh 2011-11-20 13:11:37.088510000 +0000 3--- ../FreeBSD/lib/tc_command.sh 2011-11-20 13:11:37.088510000 +0000
4+++ lib/tc_command.sh 4+++ lib/tc_command.sh
5@@ -27,21 +27,46 @@ 5@@ -27,21 +27,46 @@
6 # $MCom: portstools/tinderbox/lib/tc_command.sh,v 1.101.2.48 2011/11/15 07:04:35 marcus Exp $ 6 # $MCom: portstools/tinderbox/lib/tc_command.sh,v 1.101.2.48 2011/11/15 07:04:35 marcus Exp $
7 # 7 #
8  8
9-export _defaultUpdateHost="cvsup18.FreeBSD.org" 9-export _defaultUpdateHost="cvsup18.FreeBSD.org"
10+export _defaultUpdateHost="cvsup.netbsd.se" 10+export _defaultUpdateHost="cvsup.netbsd.se"
11 export _defaultUpdateType="CSUP" 11 export _defaultUpdateType="CSUP"
12+export _defaultDragonHost="http://mirror.physik-pool.tu-berlin.de/DragonFlyBSD/dflysnap" 12+export _defaultDragonHost="http://mirror.physik-pool.tu-berlin.de/DragonFlyBSD/dflysnap"
13+export _defaultDragonType="RELEASE" 13+export _defaultDragonType="RELEASE"
14+export _defaultGitSrcHost="koan.bondconsult.net" 14+export _defaultGitSrcHost="koan.bondconsult.net"
@@ -253,31 +253,31 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 @@ -253,31 +253,31 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54
253+ echo " cd ${treeDir}/src" 253+ echo " cd ${treeDir}/src"
254 echo "else" 254 echo "else"
255- echo "cd ${treeDir}/${treeSubDir}" 255- echo "cd ${treeDir}/${treeSubDir}"
256- echo "${updateCmd} up" 256- echo "${updateCmd} up"
257+ echo " echo 'Creating shallow source repository.'" 257+ echo " echo 'Creating shallow source repository.'"
258+ echo " mkdir ${treeDir}/src" 258+ echo " mkdir ${treeDir}/src"
259+ echo " cd ${treeDir}/src" 259+ echo " cd ${treeDir}/src"
260+ echo " mkdir ../tmp ../obj" 260+ echo " mkdir ../tmp ../obj"
261+ echo " ${updateCmd} init" 261+ echo " ${updateCmd} init"
262+ echo " ${updateCmd} remote add origin git://${4}/dragonfly.git" 262+ echo " ${updateCmd} remote add origin git://${4}/dragonfly.git"
263+ echo " ${updateCmd} fetch --depth=1 origin" 263+ echo " ${updateCmd} fetch --depth=1 origin"
264+ echo " ${updateCmd} branch master origin/master" 264+ echo " ${updateCmd} branch master origin/master"
265+ echo " echo 'Repository creation complete.'" 265+ echo " echo 'Repository creation complete.'"
266 echo "fi" 266+ echo "fi"
267+ echo "BRANCH=\`${updateCmd} branch | /usr/bin/grep -w ${5}\`" 267+ echo "BRANCH=\`${updateCmd} branch | /usr/bin/grep -w ${5}\`"
268+ echo "if [ \"\${BRANCH}\" = \"\" ]; then" 268+ echo "if [ \"\${BRANCH}\" = \"\" ]; then"
269+ echo " ${updateCmd} branch ${5} origin/${5}" 269+ echo " ${updateCmd} branch ${5} origin/${5}"
270+ echo "fi" 270 echo "fi"
271+ echo "echo 'Ready to pull updates from branch.'" 271+ echo "echo 'Ready to pull updates from branch.'"
272+ echo "${updateCmd} checkout ${5}" 272+ echo "${updateCmd} checkout ${5}"
273+ echo "${updateCmd} pull" 273+ echo "${updateCmd} pull"
274 ) > ${treeDir}/update.sh 274 ) > ${treeDir}/update.sh
275 chmod +x ${treeDir}/update.sh 275 chmod +x ${treeDir}/update.sh
276 ;; 276 ;;
277@@ -223,6 +246,15 @@ setupDefaults () { 277@@ -223,6 +246,15 @@ setupDefaults () {
278 if [ -z "${defaultUpdateType}" ]; then 278 if [ -z "${defaultUpdateType}" ]; then
279 export defaultUpdateType=${_defaultUpdateType} 279 export defaultUpdateType=${_defaultUpdateType}
280 fi 280 fi
281+ if [ -z "${defaultDragonHost}" ]; then 281+ if [ -z "${defaultDragonHost}" ]; then
282+ export defaultDragonHost=${_defaultDragonHost} 282+ export defaultDragonHost=${_defaultDragonHost}
283+ fi 283+ fi
@@ -387,35 +387,35 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 @@ -387,35 +387,35 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54
387- export DESTDIR=${J_TMPDIR} 387- export DESTDIR=${J_TMPDIR}
388- cd ${jailBase}/sets/base && yes | sh ./install.sh > ${jailBase}/world.tmp 2>&1 388- cd ${jailBase}/sets/base && yes | sh ./install.sh > ${jailBase}/world.tmp 2>&1
389+ if [ "${updateCmd}" = "RELEASE" -o "${updateCmd}" = "SNAPSHOT" ]; then 389+ if [ "${updateCmd}" = "RELEASE" -o "${updateCmd}" = "SNAPSHOT" ]; then
390+ iso_image=`ls ${jailBase}/sets` 390+ iso_image=`ls ${jailBase}/sets`
391+ /usr/bin/tar -xf ${jailBase}/sets/${iso_image} -C ${J_TMPDIR} > ${jailBase}/world.tmp 2>&1 391+ /usr/bin/tar -xf ${jailBase}/sets/${iso_image} -C ${J_TMPDIR} > ${jailBase}/world.tmp 2>&1
392 rc=$? 392 rc=$?
393- if [ ${rc} -eq 0 -a -d "${jailBase}/sets/lib32" ]; then 393- if [ ${rc} -eq 0 -a -d "${jailBase}/sets/lib32" ]; then
394- cd ${jailBase}/sets/lib32 && yes | sh ./install.sh >> ${jailBase}/world.tmp 2>&1 394- cd ${jailBase}/sets/lib32 && yes | sh ./install.sh >> ${jailBase}/world.tmp 2>&1
395- rc=$? 395- rc=$?
396+ if [ ${rc} -ne 0 ]; then 396+ if [ ${rc} -ne 0 ]; then
397+ echo "ERROR: extract world failed - see ${jailBase}/world.tmp" 397+ echo "ERROR: extract world failed - see ${jailBase}/world.tmp"
398+ buildJailCleanup 1 ${jailName} ${J_SRCDIR} 398+ buildJailCleanup 1 ${jailName} ${J_SRCDIR}
399+ return 1 399+ return 1
400+ fi 400 fi
401+ DFVERS=`awk '/^#define __DragonFly_version/ {print $3}' < ${J_TMPDIR}/usr/include/sys/param.h` 401+ DFVERS=`awk '/^#define __DragonFly_version/ {print $3}' < ${J_TMPDIR}/usr/include/sys/param.h`
402+ MAJOR=`echo $DFVERS | awk '{print substr($0,1,1)}'` 402+ MAJOR=`echo $DFVERS | awk '{print substr($0,1,1)}'`
403+ MINOR=`echo $DFVERS | awk '{print substr($0,2,3)}' | sed 's/0*//'` 403+ MINOR=`echo $DFVERS | awk '{print substr($0,2,3)}' | sed 's/0*//'`
404+ if [ `expr $MINOR % 2` -eq 0 ]; then 404+ if [ `expr $MINOR % 2` -eq 0 ]; then
405+ fakebranch="BRANCH=\"RELEASE_${MAJOR}_${MINOR}\"" 405+ fakebranch="BRANCH=\"RELEASE_${MAJOR}_${MINOR}\""
406+ else 406+ else
407+ fakebranch="BRANCH=\"DEVELOPMENT_${MAJOR}_${MINOR}\"" 407+ fakebranch="BRANCH=\"DEVELOPMENT_${MAJOR}_${MINOR}\""
408 fi 408+ fi
409+ mkdir -p ${jailBase}/src/sys/sys ${jailBase}/src/sys/conf 409+ mkdir -p ${jailBase}/src/sys/sys ${jailBase}/src/sys/conf
410+ echo ${fakebranch} > ${jailBase}/src/sys/conf/newvers.sh 410+ echo ${fakebranch} > ${jailBase}/src/sys/conf/newvers.sh
411+ cp ${J_TMPDIR}/usr/include/sys/param.h ${jailBase}/src/sys/sys 411+ cp ${J_TMPDIR}/usr/include/sys/param.h ${jailBase}/src/sys/sys
412+ rm -rf ${J_TMPDIR}/usr/src 412+ rm -rf ${J_TMPDIR}/usr/src
413+ cp -R ${jailBase}/src ${J_TMPDIR}/usr 413+ cp -R ${jailBase}/src ${J_TMPDIR}/usr
414+ mkdir ${J_TMPDIR}/usr/4bootstrap 414+ mkdir ${J_TMPDIR}/usr/4bootstrap
415+ mv ${J_TMPDIR}/usr/pkg/bin/bmake ${J_TMPDIR}/usr/4bootstrap 415+ mv ${J_TMPDIR}/usr/pkg/bin/bmake ${J_TMPDIR}/usr/4bootstrap
416+ mv ${J_TMPDIR}/usr/pkg/etc/mk.conf ${J_TMPDIR}/usr/4bootstrap 416+ mv ${J_TMPDIR}/usr/pkg/etc/mk.conf ${J_TMPDIR}/usr/4bootstrap
417+ mv ${J_TMPDIR}/usr/pkg/share/mk ${J_TMPDIR}/usr/4bootstrap 417+ mv ${J_TMPDIR}/usr/pkg/share/mk ${J_TMPDIR}/usr/4bootstrap
418+ mv ${J_TMPDIR}/usr/pkg/sbin/pkg_* ${J_TMPDIR}/usr/4bootstrap 418+ mv ${J_TMPDIR}/usr/pkg/sbin/pkg_* ${J_TMPDIR}/usr/4bootstrap
419+ rm -rf ${J_TMPDIR}/usr/pkg ${J_TMPDIR}/usr/src-sys.tar.bz2 419+ rm -rf ${J_TMPDIR}/usr/pkg ${J_TMPDIR}/usr/src-sys.tar.bz2
420+ rm -rf ${J_TMPDIR}/var/db/pkg 420+ rm -rf ${J_TMPDIR}/var/db/pkg
421 execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}" 421 execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}"
@@ -681,61 +681,71 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 @@ -681,61 +681,71 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54
681+ echo "createPortsTree: The defaultUpdateType variable in env was changed to ${updateType}" 681+ echo "createPortsTree: The defaultUpdateType variable in env was changed to ${updateType}"
682+ echo "Please change it back to 'CSUP', which is the only method supported to get pkgsrc" 682+ echo "Please change it back to 'CSUP', which is the only method supported to get pkgsrc"
683+ return 1 683+ return 1
684+ fi 684+ fi
685+ 685+
686 echo "${portsTreeName}: initializing tree" 686 echo "${portsTreeName}: initializing tree"
687 generateUpdateCode portstree ${portsTreeName} ${updateType} \ 687 generateUpdateCode portstree ${portsTreeName} ${updateType} \
688- ${updateHost} "." ${updateCompress} "" \ 688- ${updateHost} "." ${updateCompress} "" \
689- ${protocol} ${updateHostDirectory} 689- ${protocol} ${updateHostDirectory}
690+ ${updateHost} ${cvsTag} ${updateCompress} 690+ ${updateHost} ${cvsTag} ${updateCompress}
691  691
692 # add portstree to datastore 692 # add portstree to datastore
693 echo -n "${portsTreeName}: adding to datastore... " 693 echo -n "${portsTreeName}: adding to datastore... "
694@@ -1214,7 +1337,7 @@ enterBuild () { 694@@ -1192,6 +1315,9 @@ enterBuild () {
 695 esac
 696 done
 697
 698+ tc=$(tinderLoc scripts tc)
 699+ HOST_WORKDIR=$(${tc} configGet | awk -F= '/^HOST_WORKDIR/ {print $2}')
 700+
 701 if [ -z "${portDir}" ]; then
 702 echo "enterBuild: no port specified"
 703 return 1
 704@@ -1214,7 +1340,7 @@ enterBuild () {
695 fi 705 fi
696  706
697 sleepName=$(echo ${portDir} | sed -e 'y/\//_/') 707 sleepName=$(echo ${portDir} | sed -e 'y/\//_/')
698- portFullDir=${buildRoot}/usr/ports/${portDir} 708- portFullDir=${buildRoot}/usr/ports/${portDir}
699+ portFullDir=${buildRoot}/usr/pkgsrc/${portDir} 709+ portFullDir=${buildRoot}/usr/pkgsrc/${portDir}
700  710
701 if [ ! -d ${portFullDir} ]; then 711 if [ ! -d ${portFullDir} ]; then
702 echo "enterBuild: Build environment does not exist yet, sleeping." 712 echo "enterBuild: Build environment does not exist yet, sleeping."
703@@ -1238,7 +1361,7 @@ enterBuild () { 713@@ -1238,7 +1364,7 @@ enterBuild () {
704 sleep 15 714 sleep 15
705 done 715 done
706  716
707- echo  717- echo 
708+ echo 718+ echo
709 cp $(tinderLoc scripts lib/enterbuild) ${buildRoot}/root 719 cp $(tinderLoc scripts lib/enterbuild) ${buildRoot}/root
710 chroot ${buildRoot} /root/enterbuild ${portDir} 720 chroot ${buildRoot} /root/enterbuild ${portDir}
711 rm -f ${buildRoot}/tmp/.sleep_${sleepName} 721 rm -f ${buildRoot}/tmp/.sleep_${sleepName}
712@@ -1325,7 +1448,6 @@ makeBuild () { 722@@ -1325,7 +1451,6 @@ makeBuild () {
713 resetBuild () { 723 resetBuild () {
714 # set up defaults 724 # set up defaults
715 build="" 725 build=""
716- nullfs="" 726- nullfs=""
717 cleandistfiles="0" 727 cleandistfiles="0"
718  728
719 # argument handling 729 # argument handling
720@@ -1334,7 +1456,6 @@ resetBuild () { 730@@ -1334,7 +1459,6 @@ resetBuild () {
721 case "${arg}" in 731 case "${arg}" in
722  732
723 b) build="${OPTARG}";; 733 b) build="${OPTARG}";;
724- n) nullfs="-n";; 734- n) nullfs="-n";;
725 ?) exit 1;; 735 ?) exit 1;;
726  736
727 esac 737 esac
728@@ -1490,22 +1611,23 @@ tinderbuild_setup () { 738@@ -1490,22 +1614,23 @@ tinderbuild_setup () {
729 echo "tinderbuild: Finalizing chroot environment" 739 echo "tinderbuild: Finalizing chroot environment"
730  740
731 # Mount ports/ 741 # Mount ports/
732- if ! requestMount -t buildports -b ${build} -r ${nullfs}; then 742- if ! requestMount -t buildports -b ${build} -r ${nullfs}; then
733+ if ! requestMount -t buildports -b ${build} -r ; then 743+ if ! requestMount -t buildports -b ${build} -r ; then
734 echo "tinderbuild: cannot mount ports source" 744 echo "tinderbuild: cannot mount ports source"
735 tinderbuild_cleanup 1 745 tinderbuild_cleanup 1
736 fi 746 fi
737- ln -sf ../a/ports ${buildRoot}/usr/ports 747- ln -sf ../a/ports ${buildRoot}/usr/ports
738+ rm -rf ${buildRoot}/usr/pkgsrc 748+ rm -rf ${buildRoot}/usr/pkgsrc
739+ ln -s ../a/pkgsrc ${buildRoot}/usr/pkgsrc 749+ ln -s ../a/pkgsrc ${buildRoot}/usr/pkgsrc
740  750
741 # Mount src/ 751 # Mount src/
@@ -744,112 +754,112 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 @@ -744,112 +754,112 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54
744 echo "tinderbuild: cannot mount jail source" 754 echo "tinderbuild: cannot mount jail source"
745 tinderbuild_cleanup 1 755 tinderbuild_cleanup 1
746 fi 756 fi
747  757
748 # For use by pnohang 758 # For use by pnohang
749 # XXX: though killall may not work since it's a dynamic executable 759 # XXX: though killall may not work since it's a dynamic executable
750- cp -p /rescue/mount /rescue/umount ${buildRoot}/sbin 760- cp -p /rescue/mount /rescue/umount ${buildRoot}/sbin
751- cp -p /rescue/ps ${buildRoot}/bin 761- cp -p /rescue/ps ${buildRoot}/bin
752+ cp -p /sbin/mount /sbin/umount ${buildRoot}/sbin 762+ cp -p /sbin/mount /sbin/umount ${buildRoot}/sbin
753+ cp -p /bin/ps ${buildRoot}/bin 763+ cp -p /bin/ps ${buildRoot}/bin
754  764
755 # Mount /dev, since we're going to be chrooting shortly 765 # Mount /dev, since we're going to be chrooting shortly
756 mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1 766 mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1
757@@ -1522,12 +1644,6 @@ tinderbuild_setup () { 767@@ -1522,12 +1647,6 @@ tinderbuild_setup () {
758 tinderbuild_cleanup 1 768 tinderbuild_cleanup 1
759 fi 769 fi
760  770
761- # Hack to fix some recent pkg_add problems in some releases 771- # Hack to fix some recent pkg_add problems in some releases
762- pitar=$(tinderLoc jail ${jail})/pkg_install.tar 772- pitar=$(tinderLoc jail ${jail})/pkg_install.tar
763- if [ -f ${pitar} ]; then 773- if [ -f ${pitar} ]; then
764- tar -C ${buildRoot} -xf ${pitar} 774- tar -C ${buildRoot} -xf ${pitar}
765- fi 775- fi
766- 776-
767 # Handle the distfile cache 777 # Handle the distfile cache
768 if [ -n "${DISTFILE_CACHE}" ]; then 778 if [ -n "${DISTFILE_CACHE}" ]; then
769 if ! requestMount -t builddistcache -b ${build} \ 779 if ! requestMount -t builddistcache -b ${build} \
770@@ -1557,7 +1673,7 @@ tinderbuild_setup () { 780@@ -1557,7 +1676,7 @@ tinderbuild_setup () {
771 mkdir -p ${ccacheDir} $(tinderLoc buildccache ${build}) 781 mkdir -p ${ccacheDir} $(tinderLoc buildccache ${build})
772  782
773 if ! requestMount -t buildccache -b ${build} \ 783 if ! requestMount -t buildccache -b ${build} \
774- -s ${ccacheDir} ${nullfs}; then 784- -s ${ccacheDir} ${nullfs}; then
775+ -s ${ccacheDir} ; then 785+ -s ${ccacheDir} ; then
776 echo "tinderbuild: cannot mount ccache" 786 echo "tinderbuild: cannot mount ccache"
777 tinderbuild_cleanup 1 787 tinderbuild_cleanup 1
778 fi 788 fi
779@@ -1574,8 +1690,7 @@ tinderbuild_setup () { 789@@ -1574,8 +1693,7 @@ tinderbuild_setup () {
780  790
781 mkdir -p ${optionsDir} $(tinderLoc buildoptions ${build}) 791 mkdir -p ${optionsDir} $(tinderLoc buildoptions ${build})
782  792
783- if ! requestMount -t buildoptions -b ${build} \ 793- if ! requestMount -t buildoptions -b ${build} \
784- -s ${optionsDir} ${nullfs}; then 794- -s ${optionsDir} ${nullfs}; then
785+ if ! requestMount -t buildoptions -b ${build} -s ${optionsDir} ; then 795+ if ! requestMount -t buildoptions -b ${build} -s ${optionsDir} ; then
786 echo "tinderbuild: cannot mount options" 796 echo "tinderbuild: cannot mount options"
787 tinderbuild_cleanup 1 797 tinderbuild_cleanup 1
788 fi 798 fi
789@@ -1658,10 +1773,9 @@ tinderbuild () { 799@@ -1658,10 +1776,9 @@ tinderbuild () {
790 cleanpackages=0 800 cleanpackages=0
791 init=0 801 init=0
792 jobs=1 802 jobs=1
793- onceonly=0 803- onceonly=0
794+ twice=0 804+ twice=0
795 onlymake=0 805 onlymake=0
796 noduds="" 806 noduds=""
797- nullfs="" 807- nullfs=""
798 pbargs="" 808 pbargs=""
799 skipmake=0 809 skipmake=0
800 updateports=0 810 updateports=0
801@@ -1708,9 +1822,8 @@ tinderbuild () { 811@@ -1708,9 +1825,8 @@ tinderbuild () {
802 x-fetch-original) pbargs="${pbargs} -fetch-original";; 812 x-fetch-original) pbargs="${pbargs} -fetch-original";;
803 x-noclean) pbargs="${pbargs} -noclean";; 813 x-noclean) pbargs="${pbargs} -noclean";;
804 x-nolog) pbargs="${pbargs} -nolog";; 814 x-nolog) pbargs="${pbargs} -nolog";;
805- x-nullfs) pbargs="${pbargs} -nullfs"; nullfs="-n";; 815- x-nullfs) pbargs="${pbargs} -nullfs"; nullfs="-n";;
806 x-plistcheck) pbargs="${pbargs} -plistcheck";; 816 x-plistcheck) pbargs="${pbargs} -plistcheck";;
807- x-onceonly) onceonly=1;; 817- x-onceonly) onceonly=1;;
808+ x-twice) twice=1;; 818+ x-twice) twice=1;;
809  819
810 -*) return 1;; 820 -*) return 1;;
811 *) ports="${ports} $1";; 821 *) ports="${ports} $1";;
812@@ -1836,7 +1949,8 @@ tinderbuild () { 822@@ -1836,7 +1952,8 @@ tinderbuild () {
813 echo "tinderbuild: cannot mount portstree: ${portstree}" 823 echo "tinderbuild: cannot mount portstree: ${portstree}"
814 exit 1 824 exit 1
815 fi 825 fi
816- env PORTSDIR=$(tinderLoc portstree ${portstree})/ports \ 826- env PORTSDIR=$(tinderLoc portstree ${portstree})/ports \
817+ env PORTSDIR=$(tinderLoc portstree ${portstree})/pkgsrc \ 827+ env PORTSDIR=$(tinderLoc portstree ${portstree})/pkgsrc \
818+ OPTNFILE=$(tinderLoc options $build)/pkg_options \ 828+ OPTNFILE=$(tinderLoc options $build)/pkg_options \
819 $(tinderLoc scripts lib/makemake) ${noduds} ${build} ${ports} 829 $(tinderLoc scripts lib/makemake) ${noduds} ${build} ${ports}
820 ) 830 )
821 if [ $? -ne 0 ]; then 831 if [ $? -ne 0 ]; then
822@@ -1855,10 +1969,6 @@ tinderbuild () { 832@@ -1855,10 +1972,6 @@ tinderbuild () {
823  833
824 # Set up the chrooted environment 834 # Set up the chrooted environment
825 osmajor=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|') 835 osmajor=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|')
826- if [ ${osmajor} -lt 6 ]; then 836- if [ ${osmajor} -lt 6 ]; then
827- echo "tinderbuild: unhandled OS version: ${osmajor}" 837- echo "tinderbuild: unhandled OS version: ${osmajor}"
828- tinderbuild_cleanup 1 838- tinderbuild_cleanup 1
829- fi 839- fi
830  840
831 tinderbuild_setup 841 tinderbuild_setup
832  842
833@@ -1866,7 +1976,7 @@ tinderbuild () { 843@@ -1866,7 +1979,7 @@ tinderbuild () {
834 ${tc} updateBuildStatus -b ${build} -s PORTBUILD 844 ${tc} updateBuildStatus -b ${build} -s PORTBUILD
835 tinderbuild_phase 0 ${jobs} ${pkgDir} 845 tinderbuild_phase 0 ${jobs} ${pkgDir}
836 error=$? 846 error=$?
837- if [ ${onceonly} -ne 1 ]; then 847- if [ ${onceonly} -ne 1 ]; then
838+ if [ ${twice} -eq 1 ]; then 848+ if [ ${twice} -eq 1 ]; then
839 if [ ${error} -ne 0 ] ; then 849 if [ ${error} -ne 0 ] ; then
840 tinderbuild_setup 850 tinderbuild_setup
841 fi 851 fi
842@@ -1885,21 +1995,46 @@ init () { 852@@ -1885,21 +1998,46 @@ init () {
843 mkdir -p ${pb}/${dir} 853 mkdir -p ${pb}/${dir}
844 done 854 done
845  855
846- read -p "Enter a default cvsup host [${_defaultUpdateHost}]: " host 856- read -p "Enter a default cvsup host [${_defaultUpdateHost}]: " host
847+ read -p "Enter a default cvsup server for pkgsrc [${_defaultUpdateHost}]: " host 857+ read -p "Enter a default cvsup server for pkgsrc [${_defaultUpdateHost}]: " host
848 if [ -z "${host}" ]; then 858 if [ -z "${host}" ]; then
849 host=${_defaultUpdateHost} 859 host=${_defaultUpdateHost}
850 fi 860 fi
851  861
852- read -p "Enter a default update type or command [${_defaultUpdateType}]: " type 862- read -p "Enter a default update type or command [${_defaultUpdateType}]: " type
853- if [ -z "${type}" ]; then 863- if [ -z "${type}" ]; then
854- type=${_defaultUpdateType} 864- type=${_defaultUpdateType}
855+ # Update type is not optional, it's CSUP only, so we won't ask. 865+ # Update type is not optional, it's CSUP only, so we won't ask.
@@ -882,37 +892,37 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 @@ -882,37 +892,37 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54
882 globalenv=$(tinderLoc scripts etc/env)/GLOBAL 892 globalenv=$(tinderLoc scripts etc/env)/GLOBAL
883 echo "export defaultUpdateHost=${host}" >> ${globalenv} 893 echo "export defaultUpdateHost=${host}" >> ${globalenv}
884- echo "export defaultUpdateType=${type}" >> ${globalenv} 894- echo "export defaultUpdateType=${type}" >> ${globalenv}
885+ echo "export defaultUpdateType=${_defaultUpdateType}" >> ${globalenv} 895+ echo "export defaultUpdateType=${_defaultUpdateType}" >> ${globalenv}
886+ echo "export defaultDragonHost=${dragonhost}" >> ${globalenv} 896+ echo "export defaultDragonHost=${dragonhost}" >> ${globalenv}
887+ echo "export defaultDragonType=${_defaultDragonType}" >> ${globalenv} 897+ echo "export defaultDragonType=${_defaultDragonType}" >> ${globalenv}
888+ echo "export defaultGitSrcHost=${gitsrchost}" >> ${globalenv} 898+ echo "export defaultGitSrcHost=${gitsrchost}" >> ${globalenv}
889  899
890- tinderEcho "Default update host and type have been set. These can be changed later by modifying ${globalenv}." 900- tinderEcho "Default update host and type have been set. These can be changed later by modifying ${globalenv}."
891+ tinderEcho "The defaults have been set. These can be changed later by modifying ${globalenv}." 901+ tinderEcho "The defaults have been set. These can be changed later by modifying ${globalenv}."
892  902
893 return 0 903 return 0
894 } 904 }
895@@ -1948,7 +2083,8 @@ addPortToBuild () { 905@@ -1948,7 +2086,8 @@ addPortToBuild () {
896 buildenv ${jail} ${portsTree} ${build} 906 buildenv ${jail} ${portsTree} ${build}
897 buildenvNoHost ${build} 907 buildenvNoHost ${build}
898  908
899- export PORTSDIR=$(tinderLoc portstree ${portsTree})/ports 909- export PORTSDIR=$(tinderLoc portstree ${portsTree})/ports
900+ export PORTSDIR=$(tinderLoc portstree ${portsTree})/pkgsrc 910+ export PORTSDIR=$(tinderLoc portstree ${portsTree})/pkgsrc
901+ export OPTNFILE=$(tinderLoc options $build)/pkg_options 911+ export OPTNFILE=$(tinderLoc options $build)/pkg_options
902 if [ -z "${portDir}" ]; then 912 if [ -z "${portDir}" ]; then
903 ${tc} addPortToOneBuild -b ${build} ${norecurse} 913 ${tc} addPortToOneBuild -b ${build} ${norecurse}
904 else 914 else
905@@ -1958,36 +2094,7 @@ addPortToBuild () { 915@@ -1958,36 +2097,7 @@ addPortToBuild () {
906 fi 916 fi
907 ${tc} addPortToOneBuild -b ${build} -d ${portDir} ${norecurse} 917 ${tc} addPortToOneBuild -b ${build} -d ${portDir} ${norecurse}
908 fi 918 fi
909- if [ ${options} -eq 1 -a ${OPTIONS_ENABLED} -eq 1 ]; then 919- if [ ${options} -eq 1 -a ${OPTIONS_ENABLED} -eq 1 ]; then
910- pdirs="" 920- pdirs=""
911- if [ -z "${portDir}" ]; then 921- if [ -z "${portDir}" ]; then
912- pdirs=$(${tc} getPortsForBuild -b ${build} 2>/dev/null) 922- pdirs=$(${tc} getPortsForBuild -b ${build} 2>/dev/null)
913- else 923- else
914- pdirs="${PORTSDIR}/${portDir}" 924- pdirs="${PORTSDIR}/${portDir}"
915- fi 925- fi
916- rmconfig=true 926- rmconfig=true
917- if [ ${cleanOptions} -eq 1 ]; then 927- if [ ${cleanOptions} -eq 1 ]; then
918- if [ -z "${norecurse}" ]; then 928- if [ -z "${norecurse}" ]; then
@@ -930,51 +940,51 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54 @@ -930,51 +940,51 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54
930- ( cd ${pdir} && ${rmconfig} \ 940- ( cd ${pdir} && ${rmconfig} \
931- && make -k config-recursive ) 941- && make -k config-recursive )
932- else 942- else
933- ( cd ${pdir} && ${rmconfig} \ 943- ( cd ${pdir} && ${rmconfig} \
934- && make config ) 944- && make config )
935- fi 945- fi
936- fi 946- fi
937- done 947- done
938- fi 948- fi
939+ # FreeBSD-style interactive option entering not supported yet 949+ # FreeBSD-style interactive option entering not supported yet
940  950
941 if [ -n "${save_SRCBASE}" ]; then 951 if [ -n "${save_SRCBASE}" ]; then
942 export SRCBASE=${save_SRCBASE} 952 export SRCBASE=${save_SRCBASE}
943@@ -2174,10 +2281,7 @@ copyBuild () { 953@@ -2174,10 +2284,7 @@ copyBuild () {
944 if [ ! -d ${destOptionsDir} ]; then 954 if [ ! -d ${destOptionsDir} ]; then
945 mkdir -p ${destOptionsDir} 955 mkdir -p ${destOptionsDir}
946 fi 956 fi
947- ( 957- (
948- cd ${srcOptionsDir} 958- cd ${srcOptionsDir}
949- tar -cpf - . | tar -C ${destOptionsDir} -xpf - 959- tar -cpf - . | tar -C ${destOptionsDir} -xpf -
950- ) 960- )
951+ cp ${srcOptionsDir}/pkg_options ${destOptionsDir} 961+ cp ${srcOptionsDir}/pkg_options ${destOptionsDir}
952 else 962 else
953 echo "copyBuild: not copying OPTIONS to ${dest} since it has no OPTIONS directory" 963 echo "copyBuild: not copying OPTIONS to ${dest} since it has no OPTIONS directory"
954 fi 964 fi
955@@ -2293,13 +2397,13 @@ tbcleanup () { 965@@ -2293,13 +2400,13 @@ tbcleanup () {
956 pathFound=0 966 pathFound=0
957 for portstree in ${portstrees} ; do 967 for portstree in ${portstrees} ; do
958 path=$(tinderLoc portstree ${portstree}) 968 path=$(tinderLoc portstree ${portstree})
959- path="${path}/ports/${port}/Makefile" 969- path="${path}/ports/${port}/Makefile"
960+ path="${path}/pkgsrc/${port}/Makefile" 970+ path="${path}/pkgsrc/${port}/Makefile"
961 if [ -e ${path} ]; then 971 if [ -e ${path} ]; then
962 if [ ${cleanDistfiles} = 1 ]; then 972 if [ ${cleanDistfiles} = 1 ]; then
963 oldcwd=${PWD} 973 oldcwd=${PWD}
964 path=$(tinderLoc portstree ${portstree}) 974 path=$(tinderLoc portstree ${portstree})
965- cd "${path}/ports/${port}" 975- cd "${path}/ports/${port}"
966- distinfo=$(env PORTSDIR="${path}/ports" make -V MD5_FILE) 976- distinfo=$(env PORTSDIR="${path}/ports" make -V MD5_FILE)
967+ cd "${path}/pkgsrc/${port}" 977+ cd "${path}/pkgsrc/${port}"
968+ distinfo=$(env PORTSDIR="${path}/pkgsrc" bmake -V MD5_FILE) 978+ distinfo=$(env PORTSDIR="${path}/pkgsrc" bmake -V MD5_FILE)
969 if [ -f "${distinfo}" ]; then 979 if [ -f "${distinfo}" ]; then
970 for df in $(grep '^MD5' ${distinfo} | awk -F '[\(\)]' '{print $2}'); do 980 for df in $(grep '^MD5' ${distinfo} | awk -F '[\(\)]' '{print $2}'); do
971 if ! grep -q "^${df}\$" ${disttmp}; then 981 if ! grep -q "^${df}\$" ${disttmp}; then
972@@ -2383,7 +2487,7 @@ tbcleanup () { 982@@ -2383,7 +2490,7 @@ tbcleanup () {
973 fi 983 fi
974  984
975 path=$(tinderLoc portstree ${portstree}) 985 path=$(tinderLoc portstree ${portstree})
976- path="${path}/ports/${port}/Makefile" 986- path="${path}/ports/${port}/Makefile"
977+ path="${path}/pkgsrc/${port}/Makefile" 987+ path="${path}/pkgsrc/${port}/Makefile"
978  988
979 if [ ! -e ${path} ]; then 989 if [ ! -e ${path} ]; then
980 echo "Removing build port database entry for nonexistent port ${build}/${port}" 990 echo "Removing build port database entry for nonexistent port ${build}/${port}"

cvs diff -r1.3 -r1.4 pkgsrc/pkgtools/tinderbox-dragonfly/patches/Attic/patch-aw (expand / switch to unified diff)

--- pkgsrc/pkgtools/tinderbox-dragonfly/patches/Attic/patch-aw 2011/11/20 16:20:24 1.3
+++ pkgsrc/pkgtools/tinderbox-dragonfly/patches/Attic/patch-aw 2011/12/04 21:55:01 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ 1$NetBSD: patch-aw,v 1.4 2011/12/04 21:55:01 marino Exp $
2 2
3--- ../FreeBSD/lib/Tinderbox/MakeCache.pm 2011-10-16 00:52:55.000000000 +0000 3--- ../FreeBSD/lib/Tinderbox/MakeCache.pm 2011-10-16 00:52:55.000000000 +0000
4+++ lib/Tinderbox/MakeCache.pm 4+++ lib/Tinderbox/MakeCache.pm
5@@ -31,14 +31,14 @@ use strict; 5@@ -31,14 +31,14 @@ use strict;
6  6
7 # a list of variables that we pull from the port Makefile 7 # a list of variables that we pull from the port Makefile
8 our @makeTargets = ( 8 our @makeTargets = (
9- 'PKGNAME', 'IGNORE', 9- 'PKGNAME', 'IGNORE',
10- 'NO_PACKAGE', 'FORBIDDEN', 10- 'NO_PACKAGE', 'FORBIDDEN',
11+ 'PKGNAME', '_CBBH', 11+ 'PKGNAME', '_CBBH',
12 'EXTRACT_DEPENDS', 'PATCH_DEPENDS', 12 'EXTRACT_DEPENDS', 'PATCH_DEPENDS',
13 'FETCH_DEPENDS', 'BUILD_DEPENDS', 13 'FETCH_DEPENDS', 'BUILD_DEPENDS',
14 'LIB_DEPENDS', 'RUN_DEPENDS', 14 'LIB_DEPENDS', 'RUN_DEPENDS',
@@ -119,112 +119,116 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20 @@ -119,112 +119,116 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20
119+ $result .= 'PREFER_NATIVE="' . $self->_trim($worker[1]) . '" '; 119+ $result .= 'PREFER_NATIVE="' . $self->_trim($worker[1]) . '" ';
120+ } 120+ }
121+ } 121+ }
122+ if ($develop) { 122+ if ($develop) {
123+ $result .= 'PKG_DEVELOPER=yes '; 123+ $result .= 'PKG_DEVELOPER=yes ';
124+ } 124+ }
125+ $result .= 'SKIP_LICENSE_CHECK=yes '; 125+ $result .= 'SKIP_LICENSE_CHECK=yes ';
126+ return $result; 126+ return $result;
127+} 127+}
128+ 128+
129 # Internal function for returning a port variable 129 # Internal function for returning a port variable
130 sub _getVariable { 130 sub _getVariable {
131 my $self = shift; 131 my $self = shift;
132@@ -90,16 +166,28 @@ sub _getList { 132@@ -90,16 +166,30 @@ sub _getList {
133 my $port = shift; 133 my $port = shift;
134 my $item = shift; 134 my $item = shift;
135 my @deps; 135 my @deps;
136+ my $found; 136+ my $found;
137  137
138 $self->_execMake($port); 138 $self->_execMake($port);
139 foreach my $dep (split(/\s+/, $self->{CACHE}->{$port}{$item})) { 139 foreach my $dep (split(/\s+/, $self->{CACHE}->{$port}{$item})) {
140+ $dep =~ s/^\s+//; 140- my ($d, $ddir) = split(/:/, $dep);
141+ $dep =~ s/\s+$//; 
142 my ($d, $ddir) = split(/:/, $dep); 
143- if (!defined($ddir) || $item eq 'DEPENDS') { 141- if (!defined($ddir) || $item eq 'DEPENDS') {
 142+ my ($d, $ddir) = split(/:/, $self->_trim($dep));
144+ if (!defined($ddir)) { 143+ if (!defined($ddir)) {
145 $ddir = $d; 144 $ddir = $d;
146 } 145 }
147 $ddir =~ s|^$self->{BASEDIR}/||; 146- $ddir =~ s|^$self->{BASEDIR}/||;
148+ $ddir =~ s|^\.\.\/\.\.\/||; 147+ if ($d =~ /^{perl>=?5.+,.+}$/) {
 148+ $ddir = "lang/perl5"
 149+ } else {
 150+ $ddir =~ s|^$self->{BASEDIR}/||;
 151+ $ddir =~ s|^\.\.\/\.\.\/||;
 152+ }
149 if ($ddir) { 153 if ($ddir) {
150- push @deps, $ddir; 154- push @deps, $ddir;
151+ $found = 0; 155+ $found = 0;
152+ foreach my $storedep (@deps) { 156+ foreach my $storedep (@deps) {
153+ if ($storedep eq $ddir) { 157+ if ($storedep eq $ddir) {
154+ $found = 1; 158+ $found = 1;
155+ } 159+ }
156+ } 160+ }
157+ if (!$found) { 161+ if (!$found) {
158+ push @deps, $ddir; 162+ push @deps, $ddir;
159+ } 163+ }
160 } 164 }
161 } 165 }
162 return @deps; 166 return @deps;
163@@ -109,7 +197,7 @@ sub _getList { 167@@ -109,7 +199,7 @@ sub _getList {
164 sub Name { 168 sub Name {
165 my $self = shift; 169 my $self = shift;
166 my $port = shift; 170 my $port = shift;
167- return $self->_getVariable($port, 'PORTNAME'); 171- return $self->_getVariable($port, 'PORTNAME');
168+ return $self->_getVariable($port, 'PKGBASE'); 172+ return $self->_getVariable($port, 'PKGBASE');
169 } 173 }
170  174
171 # Package name 175 # Package name
172@@ -133,6 +221,13 @@ sub Maintainer { 176@@ -133,6 +223,13 @@ sub Maintainer {
173 return $self->_getVariable($port, 'MAINTAINER'); 177 return $self->_getVariable($port, 'MAINTAINER');
174 } 178 }
175  179
176+# Buildlink3 dependencies 180+# Buildlink3 dependencies
177+sub Buildlink3Depends { 181+sub Buildlink3Depends {
178+ my $self = shift; 182+ my $self = shift;
179+ my $port = shift; 183+ my $port = shift;
180+ return $self->_getList($port, 'DEPENDS'); 184+ return $self->_getList($port, 'DEPENDS');
181+} 185+}
182+ 186+
183 # Extract dependencies 187 # Extract dependencies
184 sub ExtractDepends { 188 sub ExtractDepends {
185 my $self = shift; 189 my $self = shift;
186@@ -189,8 +284,8 @@ sub IgnoreList { 190@@ -189,8 +286,8 @@ sub IgnoreList {
187  191
188 my $n = 0; 192 my $n = 0;
189 $self->_execMake($port); 193 $self->_execMake($port);
190- foreach my $var ('NO_PACKAGE', 'IGNORE', 'FORBIDDEN') { 194- foreach my $var ('NO_PACKAGE', 'IGNORE', 'FORBIDDEN') {
191- $n++ if ($self->{CACHE}->{$port}{$var} ne ""); 195- $n++ if ($self->{CACHE}->{$port}{$var} ne "");
192+ foreach my $var ('_CBBH') { 196+ foreach my $var ('_CBBH') {
193+ $n++ if ($self->{CACHE}->{$port}{$var} ne "yes"); 197+ $n++ if ($self->{CACHE}->{$port}{$var} ne "yes");
194 } 198 }
195 return $n eq 0 ? "" : $self->PkgName($port); 199 return $n eq 0 ? "" : $self->PkgName($port);
196 } 200 }
197@@ -206,6 +301,17 @@ sub FetchDependsList { 201@@ -206,6 +303,17 @@ sub FetchDependsList {
198 return grep { !$uniq{$_}++ } @deps; 202 return grep { !$uniq{$_}++ } @deps;
199 } 203 }
200  204
201+sub Buildlink3DependsList { 205+sub Buildlink3DependsList {
202+ my $self = shift; 206+ my $self = shift;
203+ my $port = shift; 207+ my $port = shift;
204+ 208+
205+ my @deps; 209+ my @deps;
206+ push(@deps, $self->Buildlink3Depends($port)); 210+ push(@deps, $self->Buildlink3Depends($port));
207+ 211+
208+ my %uniq; 212+ my %uniq;
209+ return grep { !$uniq{$_}++ } @deps; 213+ return grep { !$uniq{$_}++ } @deps;
210+} 214+}
211+ 215+
212 sub ExtractDependsList { 216 sub ExtractDependsList {
213 my $self = shift; 217 my $self = shift;
214 my $port = shift; 218 my $port = shift;
215@@ -250,6 +356,7 @@ sub BuildDependsList { 219@@ -250,6 +358,7 @@ sub BuildDependsList {
216 push(@deps, $self->FetchDepends($port)); 220 push(@deps, $self->FetchDepends($port));
217 push(@deps, $self->BuildDepends($port)); 221 push(@deps, $self->BuildDepends($port));
218 push(@deps, $self->LibDepends($port)); 222 push(@deps, $self->LibDepends($port));
219+ push(@deps, $self->Buildlink3Depends($port)); 223+ push(@deps, $self->Buildlink3Depends($port));
220  224
221 my %uniq; 225 my %uniq;
222 return grep { !$uniq{$_}++ } @deps; 226 return grep { !$uniq{$_}++ } @deps;
223@@ -263,6 +370,7 @@ sub RunDependsList { 227@@ -263,6 +372,7 @@ sub RunDependsList {
224 my @deps; 228 my @deps;
225 push(@deps, $self->LibDepends($port)); 229 push(@deps, $self->LibDepends($port));
226 push(@deps, $self->RunDepends($port)); 230 push(@deps, $self->RunDepends($port));
227+ push(@deps, $self->Buildlink3Depends($port)); 231+ push(@deps, $self->Buildlink3Depends($port));
228  232
229 my %uniq; 233 my %uniq;
230 return grep { !$uniq{$_}++ } @deps; 234 return grep { !$uniq{$_}++ } @deps;