diff options
author | marino <marino@pkgsrc.org> | 2011-11-14 02:00:19 +0000 |
---|---|---|
committer | marino <marino@pkgsrc.org> | 2011-11-14 02:00:19 +0000 |
commit | 2f1a0a864ad1ee7f7c3d59443c1728b2013d18d2 (patch) | |
tree | 98758ef3a905a05ea89c275f674056fce7d40eba | |
parent | f11ca17d44bc1d4d9b8dad6bd128633c60beb1e2 (diff) | |
download | pkgsrc-2f1a0a864ad1ee7f7c3d59443c1728b2013d18d2.tar.gz |
pkgtools/tinderbox-dragonfly: Several bug fixes
This update of tinderbox addresses several issues:
1) Updates obsolete failure message on options.mk
2) Adds support for PKG_DEVELOPER=yes
3) Switches build failure default to build only once, twice is the option.
4) Merge BOOTSTRAP_DEPENDS with FETCH_DEPENDS in order to maintain the
same database structure as Tinderbox. Removes two patches.
5) Change behavior where leftover files immediately after package deinstall
is no longer considered an error, but still list the files that do this.
6) Add a way out of an infinite recursion loop as seen when the package
name changed between portbuild and buildscript (considered a safeguard).
7) Push the package name from portbuild to buildscript to avoid issue with
php5 packages getting renamed to php53 (for example), which was the
cause for the infinite loop on lang/pear.
8) Fix enterbuild by allowing it to properly detected when the port has
entered the sleep state.
9) Fix php/pgsql bug on row limiting, should be fixed upstream for next
released. Requires old patch to be reincarnated.
10) Fix PLIST, several files were missing
11) Add utility script to add all 10K packages to database (this takes
several hours to do)
-rw-r--r-- | pkgtools/tinderbox-dragonfly/Makefile | 14 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/PLIST | 24 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/distinfo | 19 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in | 50 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/options.mk | 5 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-aa | 26 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-ah | 22 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-ai | 55 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-aj | 116 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-ar | 13 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-as | 20 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-av | 59 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-aw | 50 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-ax | 13 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-ay | 13 |
15 files changed, 287 insertions, 212 deletions
diff --git a/pkgtools/tinderbox-dragonfly/Makefile b/pkgtools/tinderbox-dragonfly/Makefile index 2cf54214c37..927506f2d38 100644 --- a/pkgtools/tinderbox-dragonfly/Makefile +++ b/pkgtools/tinderbox-dragonfly/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2011/11/02 21:13:12 marino Exp $ +# $NetBSD: Makefile,v 1.2 2011/11/14 02:00:19 marino Exp $ # DISTNAME= tinderbox-dragonfly-${TBOX_VERSION} +PKGREVISION= 1 CATEGORIES= pkgtools MASTER_SITES= http://tinderbox.marcuscom.com/ DISTFILES= tinderbox-${TBOX_VERSION}.tar.gz @@ -31,6 +32,11 @@ MAN_FILES= ${MAN_FILES_cmd:sh} INSTALLATION_DIRS+= tinderbox/scripts INSTALLATION_DIRS+= ${PKGMANDIR}/man1 +SUBST_CLASSES+= paths +SUBST_FILES.paths+= contrib/bulk/add_all_packages.sh +SUBST_SED.paths+= -e 's,@TINROOT@,${PREFIX}/tinderbox,g' +SUBST_STAGE.paths= post-patch + .include "options.mk" post-extract: @@ -39,6 +45,10 @@ post-extract: mv ${WRKSRC}/webui ${TRASH} .endif mv ${WRKSRC}/etc/rc.d ${TRASH} + ${MKDIR} ${WRKSRC}/contrib/bulk + ${CP} ${FILESDIR}/add_all_packages.sh.in \ + ${WRKSRC}/contrib/bulk/add_all_packages.sh + chmod 755 ${WRKSRC}/contrib/bulk/* post-patch: .if !empty(PKG_OPTIONS:Manybody) @@ -54,7 +64,7 @@ do-install: mv ${WRKSRC}/man ${TRASH} cd ${WRKSRC}; for dossier in .version *; do \ ${TEST} ! -f "$$dossier" || \ - ${INSTALL} "$$dossier" ${DESTDIR}${PREFIX}/tinderbox/scripts; \ + ${CP} "$$dossier" ${DESTDIR}${PREFIX}/tinderbox/scripts; \ ${TEST} ! -d "$$dossier" || \ ${CP} -R "$$dossier" ${DESTDIR}${PREFIX}/tinderbox/scripts; \ done diff --git a/pkgtools/tinderbox-dragonfly/PLIST b/pkgtools/tinderbox-dragonfly/PLIST index 1c24237adfa..cc7d49d91b1 100644 --- a/pkgtools/tinderbox-dragonfly/PLIST +++ b/pkgtools/tinderbox-dragonfly/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1 2011/11/02 21:13:16 marino Exp $ +@comment $NetBSD: PLIST,v 1.2 2011/11/14 02:00:19 marino Exp $ man/man1/tc-configCcache.1 man/man1/tc-configDistfile.1 man/man1/tc-configGet.1 @@ -9,11 +9,16 @@ share/examples/rc.d/tinderd tinderbox/scripts/.version tinderbox/scripts/README tinderbox/scripts/ds.ph.dist -tinderbox/scripts/contrib/hooks/make-jobs-safe/README.txt -tinderbox/scripts/contrib/hooks/make-jobs-safe/make-jobs-safe.sh +tinderbox/scripts/contrib/hooks/compress_wrkdir/README.txt +tinderbox/scripts/contrib/hooks/compress_wrkdir/compress_wrkdir.sh tinderbox/scripts/contrib/hooks/kse-fix/libmap.conf tinderbox/scripts/contrib/hooks/kse-fix/README.txt tinderbox/scripts/contrib/hooks/kse-fix/kse-fix.sh +tinderbox/scripts/contrib/hooks/make-jobs-safe/README.txt +tinderbox/scripts/contrib/hooks/make-jobs-safe/make-jobs-safe.sh +tinderbox/scripts/contrib/hooks/mass-build-pgsql/README.txt +tinderbox/scripts/contrib/hooks/mass-build-pgsql/mass-build-pgsql.sh +tinderbox/scripts/contrib/bulk/add_all_packages.sh tinderbox/scripts/etc/env/.keep_me tinderbox/scripts/lib/Tinderbox/Build.pm tinderbox/scripts/lib/Tinderbox/BuildPortsQueue.pm @@ -28,6 +33,7 @@ tinderbox/scripts/lib/Tinderbox/PortsTree.pm tinderbox/scripts/lib/Tinderbox/TinderObject.pm tinderbox/scripts/lib/Tinderbox/TinderboxDS.pm tinderbox/scripts/lib/Tinderbox/User.pm +tinderbox/scripts/lib/boilerplate_mk.conf tinderbox/scripts/lib/buildscript tinderbox/scripts/lib/db-mysql.sh tinderbox/scripts/lib/db-pgsql.sh @@ -61,10 +67,20 @@ tinderbox/scripts/upgrade/hooks.map tinderbox/scripts/upgrade/jails.map tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.0_to_3.1.sql tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.1_to_3.2.sql +tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2_to_3.2.1.sql +tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2.1_to_3.2.2.sql +tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2.2_to_3.2.3.sql +tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2.3_to_3.2.4.sql +tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2.4_to_3.2.5.sql +tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2.5_to_3.2.6.sql tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.0_to_3.1.sql tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.1_to_3.2.sql tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.2_to_3.2.1.sql -tinderbox/scripts/upgrade/mig_mysql_tinderbox-3.2_to_3.2.1.sql +tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.2.1_to_3.2.2.sql +tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.2.2_to_3.2.3.sql +tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.2.3_to_3.2.4.sql +tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.2.4_to_3.2.5.sql +tinderbox/scripts/upgrade/mig_pgsql_tinderbox-3.2.5_to_3.2.6.sql tinderbox/scripts/upgrade/order.lst tinderbox/scripts/upgrade/user_permissions.map ${PLIST.WEBUI}tinderbox/scripts/webui/core/Build.php diff --git a/pkgtools/tinderbox-dragonfly/distinfo b/pkgtools/tinderbox-dragonfly/distinfo index 935277a158b..968d3edac2f 100644 --- a/pkgtools/tinderbox-dragonfly/distinfo +++ b/pkgtools/tinderbox-dragonfly/distinfo @@ -1,16 +1,17 @@ -$NetBSD: distinfo,v 1.1 2011/11/02 21:13:17 marino Exp $ +$NetBSD: distinfo,v 1.2 2011/11/14 02:00:19 marino Exp $ SHA1 (tinderbox-3.4.tar.gz) = bcabfc7544945b9e832fa573fd13a48005e2a598 RMD160 (tinderbox-3.4.tar.gz) = 4783292e3d89f9ded643d57c1f0055b5fc53e3a9 Size (tinderbox-3.4.tar.gz) = 147218 bytes -SHA1 (patch-aa) = 2366cdbe2d7348100d667d2ae931b18691b7adb1 +SHA1 (patch-aa) = 13f228c8f4b1e1df590f7e0a9687dd219d6b08a5 SHA1 (patch-ab) = bead83362c0dbba1b71d11a076efb439fe3ac545 SHA1 (patch-ac) = 7f62eacc4bea13a4fa36f6d84dab8750ca842366 SHA1 (patch-ad) = 12c92ac0aeaf04260151d2e9e305cb6594cc3107 SHA1 (patch-ae) = 57443a64d043d6549f19c99b431ea45ad29ba41e SHA1 (patch-ag) = 9f83f30fab9efe424c197d3f9fe8d7b3c3b924bc -SHA1 (patch-ai) = 471bdd94cba0596e641b24d8804c398e11b5cfae -SHA1 (patch-aj) = 32700b042db1de7b383cf63cae104079189f7168 +SHA1 (patch-ah) = ddfdb143e7eee5e838b8ab9affbf6992016f05f1 +SHA1 (patch-ai) = 19ec42335fbc37eed602222b20e8e21a20434baf +SHA1 (patch-aj) = 5a6565b6844f6dbd7bb0dcd5aba74d722ae2e61b SHA1 (patch-ak) = af511026851a0faa893d461c4de44895d0d04410 SHA1 (patch-al) = 0418a6aacc1ce7071a859bf69e8a29e47b64e197 SHA1 (patch-am) = 26c9b09e99254d6d12e907876e191822ec3354f2 @@ -18,14 +19,12 @@ SHA1 (patch-an) = f91e604e1487f99374fc3119475ab775cf8257de SHA1 (patch-ao) = b8635fa0fb158855a1f20d29f9251e045e2b9357 SHA1 (patch-ap) = 6dc77ea10efb8bdf26f4fc2330f89b70cba8aaab SHA1 (patch-aq) = 7cc9e2f723d192038d196da94fdfd8c569559458 -SHA1 (patch-ar) = 180883fba82d0b63e8d14b8922a67b1c09fa77f9 -SHA1 (patch-as) = 4a00ba9699ba47ec664fcadc3876ae7b8c75f05f +SHA1 (patch-ar) = c57b04957c9ba3a140a623972d5e18e130f8dbc8 +SHA1 (patch-as) = 3cbee34e564ce7b46e17e04422770acee877e0dd SHA1 (patch-at) = f46d54fab4f94e0b6778d26ac84ce933f734c6d5 SHA1 (patch-au) = 27e654af19184d3a5a9028442b80556417bd45c8 -SHA1 (patch-av) = d7ea402be9159a2763a15a05cbcd5789332e0a81 -SHA1 (patch-aw) = a7b10a8e9587469dfd21169c1bc37096a5424e35 -SHA1 (patch-ax) = 72b88ffe0d48e39d04ef5fc7e0adc3b00bc12446 -SHA1 (patch-ay) = cf3d2bb09746f9d88e243d488411a394534d85d1 +SHA1 (patch-av) = 806b9d4538f13d54b023b9630b74f3b859a65f67 +SHA1 (patch-aw) = 77446405f7c969d2b7b43e234bd7bcde533ed4a2 SHA1 (patch-az) = 91526a66f47d53357703b2739c1384d4012e7c6c SHA1 (patch-ba) = 636adea0d3fb22132e2a6d81fd016a9560017aca SHA1 (patch-bb) = 7a007428deeea2f243cebcc84a42e0c5fbebc9a7 diff --git a/pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in b/pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in new file mode 100644 index 00000000000..6f0277f3c2d --- /dev/null +++ b/pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Accepts the build ($1) and portstree ($2) and proceeds to add +# the entire portstree to the build database + +PB=@TINROOT@ + +exitusage() +{ + echo "Usage: add_all_packages.sh <build> <portstree>" + exit +} + +portstreeNF() +{ + echo "The portstree was not found. It was expected to be here:" + echo "${PB}/portstrees/${1}" + exit +} + +portstreedbNF() +{ + echo "The portstree '${1}' was not found in the database." + exit +} + +buildNF() +{ + echo "The build '${1}' was not found in the database." + exit +} + +[ $# -ne 2 ] && exitusage; +[ ! -d ${PB}/portstrees/$2 ] && portstreeNF $2; + +BUILD=`${PB}/scripts/tc listBuilds | grep ^$1\$` +[ -z "${BUILD}" ] && buildNF $1; + +PTREE=`${PB}/scripts/tc listPortsTrees | grep ^$2\$` +[ -z "${PTREE}" ] && portstreedbNF $1; + +cd ${PB}/portstrees/${2}/pkgsrc +PORTS=`/usr/bin/find -s * -type d -maxdepth 1 -depth 1` + +COUNTER=0 +for PORT in ${PORTS}; do + COUNTER=`expr ${COUNTER} + 1` + printf "%05d ${BUILD} ${PORT}\n" ${COUNTER} + ${PB}/scripts/tc addPort -b ${BUILD} -d ${PORT} -R +done diff --git a/pkgtools/tinderbox-dragonfly/options.mk b/pkgtools/tinderbox-dragonfly/options.mk index e599a1d3a4f..d57e81f488b 100644 --- a/pkgtools/tinderbox-dragonfly/options.mk +++ b/pkgtools/tinderbox-dragonfly/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.2 2011/11/06 19:51:13 joerg Exp $ +# $NetBSD: options.mk,v 1.3 2011/11/14 02:00:20 marino Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.tbox-dfly PKG_SUPPORTED_OPTIONS= pgsql mysql webui anybody lsof emailer @@ -12,8 +12,7 @@ PLIST_VARS+= WEBUI ######################################## .if empty(PKG_OPTIONS:Mpgsql) && empty(PKG_OPTIONS:Mmysql) -PKG_FAIL_REASON+= "Tinderbox requires a database or confirmation you have already installed on." -PKG_FAIL_REASON+= "Please select either pgsql or mysql" +PKG_FAIL_REASON+= "Tinderbox requires a database, so select pgsql or mysql option." .endif .if !empty(PKG_OPTIONS:Mpgsql) diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-aa b/pkgtools/tinderbox-dragonfly/patches/patch-aa index 48ee47201ba..e79a4b0d54b 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-aa +++ b/pkgtools/tinderbox-dragonfly/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.1 2011/11/02 21:13:20 marino Exp $ +$NetBSD: patch-aa,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/lib/tc_command.sh 2011-10-16 00:52:55.000000000 +0000 +++ lib/tc_command.sh @@ -723,22 +723,29 @@ $NetBSD: patch-aa,v 1.1 2011/11/02 21:13:20 marino Exp $ echo "tinderbuild: cannot mount options" tinderbuild_cleanup 1 fi -@@ -1605,7 +1765,6 @@ tinderbuild () { - onceonly=0 +@@ -1602,10 +1762,9 @@ tinderbuild () { + cleanpackages=0 + init=0 + jobs=1 +- onceonly=0 ++ twice=0 onlymake=0 noduds="" - nullfs="" pbargs="" skipmake=0 updateports=0 -@@ -1652,7 +1811,6 @@ tinderbuild () { +@@ -1652,9 +1811,8 @@ tinderbuild () { x-fetch-original) pbargs="${pbargs} -fetch-original";; x-noclean) pbargs="${pbargs} -noclean";; x-nolog) pbargs="${pbargs} -nolog";; - x-nullfs) pbargs="${pbargs} -nullfs"; nullfs="-n";; x-plistcheck) pbargs="${pbargs} -plistcheck";; - x-onceonly) onceonly=1;; +- x-onceonly) onceonly=1;; ++ x-twice) twice=1;; + -*) return 1;; + *) ports="${ports} $1";; @@ -1780,7 +1938,8 @@ tinderbuild () { echo "tinderbuild: cannot mount portstree: ${portstree}" exit 1 @@ -760,6 +767,15 @@ $NetBSD: patch-aa,v 1.1 2011/11/02 21:13:20 marino Exp $ tinderbuild_setup +@@ -1810,7 +1965,7 @@ tinderbuild () { + ${tc} updateBuildStatus -b ${build} -s PORTBUILD + tinderbuild_phase 0 ${jobs} ${pkgDir} + error=$? +- if [ ${onceonly} -ne 1 ]; then ++ if [ ${twice} -eq 1 ]; then + if [ ${error} -ne 0 ] ; then + tinderbuild_setup + fi @@ -1829,21 +1984,46 @@ init () { mkdir -p ${pb}/${dir} done diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-ah b/pkgtools/tinderbox-dragonfly/patches/patch-ah new file mode 100644 index 00000000000..a35ae0f17b2 --- /dev/null +++ b/pkgtools/tinderbox-dragonfly/patches/patch-ah @@ -0,0 +1,22 @@ +$NetBSD: patch-ah,v 1.1 2011/11/14 02:00:20 marino Exp $ + +--- ../FreeBSD/webui/core/TinderboxDS.php 2011-10-16 00:52:55.000000000 +0000 ++++ webui/core/TinderboxDS.php +@@ -420,7 +420,7 @@ + $query .= " AND p.port_name LIKE '%" . $this->db->escape( $port_name, TRUE ) . "%'"; + $query .= " ORDER BY " . $this->db->escape( $sortbytable ) . "." . $this->db->escape( $sortby ); + if( $limit != 0 ) +- $query .= " LIMIT " . $this->db->escape( $limit_offset, TRUE ) . "," . $this->db->escape( $limit, TRUE ); ++ $query .= " LIMIT " . $this->db->escape( $limit, TRUE ) . " OFFSET " . $this->db->escape( $limit_offset, TRUE ); + + $rc = $this->_doQueryHashRef($query, $results, $build->getId()); + +@@ -533,7 +533,7 @@ + $query .= "AND p.port_maintainer='" . $this->db->escape( $maintainer, TRUE ) . "' "; + $query .= " ORDER BY " . $this->db->escape( $sortbytable ) . "." . $this->db->escape( $sortby ); + if( $limit != 0 ) +- $query .= " LIMIT " . $this->db->escape( $limit_offset ) . "," . $limit; ++ $query .= " LIMIT " . $this->db->escape( $limit, TRUE ) . " OFFSET " . $this->db->escape( $limit_offset, TRUE ); + + $rc = $this->_doQueryHashRef($query, $results, array()); + diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-ai b/pkgtools/tinderbox-dragonfly/patches/patch-ai index 106ef603789..719a6d37434 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-ai +++ b/pkgtools/tinderbox-dragonfly/patches/patch-ai @@ -1,4 +1,4 @@ -$NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ +$NetBSD: patch-ai,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/lib/portbuild 2011-10-16 00:52:55.000000000 +0000 +++ lib/portbuild @@ -7,7 +7,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ usage () { - echo "usage: $0 <build name> <jail name> <portstree name> [-noclean] [-plistcheck] [-nullfs] [-fetch-original] [-nolog] ED PD FD BD RD TD pkgname dirname" -+ echo "usage: $0 <build name> <jail name> <portstree name> [-noclean] [-plistcheck] [-fetch-original] [-nolog] ED PD FD BD RD TD SD pkgname dirname" ++ echo "usage: $0 <build name> <jail name> <portstree name> [-noclean] [-plistcheck] [-fetch-original] [-nolog] ED PD FD BD RD TD pkgname dirname" exit 1 } @@ -69,19 +69,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ x-fetch-original) fetchorig=1 shift;; -@@ -142,8 +141,9 @@ FD=$3 - BD=$4 - RD=$5 - TD=$6 --pkgname=$(basename $7 ${PKGSUFFIX}) --dirname=$8 -+SD=$7 -+pkgname=$(basename $8 ${PKGSUFFIX}) -+dirname=$9 - - echo ${pkgname} - echo ${dirname} -@@ -151,7 +151,7 @@ echo ${dirname} +@@ -151,7 +150,7 @@ echo ${dirname} tc=$(tinderLoc scripts tc) chroot=$(tinderLoc buildroot ${build}) echo "chroot is: ${chroot}" @@ -90,7 +78,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ total_size=$(${tc} getPortTotalSize -d ${portdir} -b ${build}) execute_hook "prePortBuild" "PACKAGE_NAME=${pkgname} BUILD=${build} JAIL=${jail} PORTSTREE=${portstree} CHROOT=${chroot} PORTDIR=${portdir} PB=${pb} TOTAL_SIZE=${total_size}" -@@ -167,7 +167,7 @@ if [ -f ${dudsfile} ]; then +@@ -167,7 +166,7 @@ if [ -f ${dudsfile} ]; then if grep -qxF ${pkgname} ${dudsfile}; then echo "skipping ${pkgname} (found in duds)" ${tc} updatePortStatus -d ${portdir} -b ${build} \ @@ -99,7 +87,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ mark_failed ${tc} ${build} ${pkgname} ${portdir} execute_hook "postPortBuild" "PACKAGE_NAME=${pkgname} BUILD=${build} JAIL=${jail} PORTSTREE=${portstree} CHROOT=${chroot} STATUS=DUD PORTDIR=${portdir} PB=${pb} FAIL_REASON=dud TOTAL_SIZE=0" exit 1 -@@ -175,12 +175,12 @@ if [ -f ${dudsfile} ]; then +@@ -175,12 +174,12 @@ if [ -f ${dudsfile} ]; then fi # directories to clean @@ -113,7 +101,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ # reset mtrees for plist checking mtree -deU -f ${chroot}/etc/mtree/BSD.root.dist \ -@@ -190,17 +190,48 @@ mtree -deU -f ${chroot}/etc/mtree/BSD.va +@@ -190,17 +189,48 @@ mtree -deU -f ${chroot}/etc/mtree/BSD.va mtree -deU -f ${chroot}/etc/mtree/BSD.usr.dist \ -p ${chroot}/usr >/dev/null 2>&1 @@ -167,7 +155,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ mkdir -p ${chroot}/compat/linux/proc mount -t linprocfs linprocfs ${chroot}/compat/linux/proc fi -@@ -251,8 +282,10 @@ if [ x"${CCACHE_ENABLED}" = x"1" ]; then +@@ -251,8 +281,10 @@ if [ x"${CCACHE_ENABLED}" = x"1" ]; then export PATH=/opt:${PATH} fi @@ -180,7 +168,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ fi echo "building $pkgname in $chroot" -@@ -264,11 +297,7 @@ packages=$(tinderLoc packages ${build}) +@@ -264,11 +296,7 @@ packages=$(tinderLoc packages ${build}) major_version=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|') if [ -n "${DISTFILE_CACHE}" ]; then @@ -193,7 +181,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ fi if [ -n "${DISTFILE_URI}" ]; then -@@ -282,7 +311,7 @@ mkdir -p ${chroot}/tmp/depends ${chroot} +@@ -282,7 +310,7 @@ mkdir -p ${chroot}/tmp/depends ${chroot} echo "building ${pkgname} in directory ${chroot}" | \ tee ${chroot}/tmp/${pkgname}.log @@ -202,7 +190,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ # Don't build in a world-writable standard directory because some ports # hardcode this path and try to load things from it at runtime, which is -@@ -294,7 +323,7 @@ if [ x"${CCACHE_ENABLED}" ]; then +@@ -294,7 +322,7 @@ if [ x"${CCACHE_ENABLED}" ]; then unset CCACHE_DISABLE fi @@ -211,7 +199,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ ldconfig_dirs="" for i in ${_ldconfig_dirs}; do if [ -d ${chroot}/${i} ]; then -@@ -302,11 +331,8 @@ for i in ${_ldconfig_dirs}; do +@@ -302,9 +330,6 @@ for i in ${_ldconfig_dirs}; do fi done chroot ${chroot} /sbin/ldconfig ${ldconfig_dirs} @@ -219,21 +207,18 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ - chroot ${chroot} /sbin/ldconfig -aout /usr/lib/aout /usr/lib/compat/aout -fi --set x $ED $FD $PD $BD $RD $TD -+set x $ED $FD $PD $BD $RD $TD $SD + set x $ED $FD $PD $BD $RD $TD shift 1 - - cd ${chroot}/tmp/depends -@@ -337,7 +363,7 @@ if [ $? -ne 0 ]; then +@@ -337,7 +362,7 @@ if [ $? -ne 0 ]; then exit 1 fi -chroot ${chroot} /buildscript ${dirname} 1 "$ED" "$PD" "$FD" "$BD" "$RD" "$TD" "${plistcheck}" 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log -+chroot ${chroot} /buildscript ${dirname} 1 "$ED" "$PD" "$FD" "$BD" "$RD" "$TD" "$SD" "${plistcheck}" 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log ++chroot ${chroot} /buildscript ${dirname} 1 "$ED" "$PD" "$FD" "$BD" "$RD" "$TD" "${pkgname}" "${plistcheck}" 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log if [ -f ${chroot}/tmp/status ]; then error=$(cat ${chroot}/tmp/status) else -@@ -351,14 +377,7 @@ errorsDir=$(tinderLoc builderrors ${buil +@@ -351,14 +376,7 @@ errorsDir=$(tinderLoc builderrors ${buil if [ "${error}" = "0" ]; then ln -sf ${pkgname}.log2 ${chroot}/tmp/make.log @@ -245,11 +230,11 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ - fi - - chroot ${chroot} /usr/bin/nice -n $nice /buildscript ${dirname} 2 "$ED" "$PD" "$FD" "$BD" "$RD" "$TD" "${plistcheck}" > ${chroot}/tmp/${pkgname}.log2 2>&1 -+ chroot ${chroot} /usr/bin/nice -n $nice /buildscript ${dirname} 2 "$ED" "$PD" "$FD" "$BD" "$RD" "$TD" "$SD" "${plistcheck}" > ${chroot}/tmp/${pkgname}.log2 2>&1 ++ chroot ${chroot} /usr/bin/nice -n $nice /buildscript ${dirname} 2 "$ED" "$PD" "$FD" "$BD" "$RD" "$TD" "${pkgname}" "${plistcheck}" > ${chroot}/tmp/${pkgname}.log2 2>&1 grep pnohang ${chroot}/tmp/${pkgname}.log2 cat ${chroot}/tmp/${pkgname}.log2 >> ${chroot}/tmp/${pkgname}.log -@@ -372,6 +391,7 @@ if [ "${error}" = "0" ]; then +@@ -372,6 +390,7 @@ if [ "${error}" = "0" ]; then cp ${chroot}/tmp/${pkgname}.log ${logsDir}/${pkgname}.log fi if [ -n "${logdir}" ]; then @@ -257,7 +242,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ if [ ${docopy} -eq 1 ]; then cp ${logsDir}/${pkgname}.log${lext} ${logdir}/${pkgname}.log${lext} else -@@ -388,6 +408,7 @@ if [ "${error}" = "0" ]; then +@@ -388,6 +407,7 @@ if [ "${error}" = "0" ]; then cp ${chroot}/tmp/work.tbz ${workDir}/${pkgname}.tbz fi @@ -265,7 +250,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ if [ "${error}" = "0" ]; then if [ ! -z "${last_version}" ]; then oldpkgs=$(find ${packages} -name "${last_version}${PKGSUFFIX}") -@@ -400,8 +421,8 @@ if [ "${error}" = "0" ]; then +@@ -400,8 +420,8 @@ if [ "${error}" = "0" ]; then tar --unlink -C ${packages} -xvf - [ -f ${packages}/All/${pkgname}${PKGSUFFIX} ] && \ touch ${packages}/All/${pkgname}${PKGSUFFIX} @@ -276,7 +261,7 @@ $NetBSD: patch-ai,v 1.1 2011/11/02 21:13:23 marino Exp $ status="BROKEN" elif [ -f ${chroot}/tmp/leftovers ]; then status="LEFTOVERS" -@@ -476,5 +497,5 @@ else +@@ -476,5 +496,5 @@ else execute_hook "postPortBuild" "PACKAGE_NAME=${pkgname} BUILD=${build} JAIL=${jail} PORTSTREE=${portstree} CHROOT=${chroot} STATUS=FAIL PORTDIR=${portdir} PB=${pb} ${reasonenv} TOTAL_SIZE=${total_size}" fi diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-aj b/pkgtools/tinderbox-dragonfly/patches/patch-aj index fd3e4de6987..c392918bfeb 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-aj +++ b/pkgtools/tinderbox-dragonfly/patches/patch-aj @@ -1,15 +1,7 @@ -$NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ +$NetBSD: patch-aj,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/lib/buildscript 2011-10-16 00:52:55.000000000 +0000 +++ lib/buildscript -@@ -1,6 +1,6 @@ - #!/bin/sh - --# usage: $0 DIRNAME PHASE ED PD FD BD RD TD [PLISTCHECK] -+# usage: $0 DIRNAME PHASE ED PD FD BD RD TD SD [PLISTCHECK] - # PHASE is 1 (checksum) or 2 (package) - - cleanup() { @@ -8,7 +8,7 @@ cleanup() { if [ -e ${dir}/.keep ]; then @@ -36,7 +28,44 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ } del_pkg() { -@@ -91,6 +92,37 @@ del_pkg() { +@@ -58,6 +59,8 @@ del_pkg() { + if [ ! -z "${pkgs}" ]; then + recursion=1 + dellist="" ++ locklist="" ++ recursion_virgin=1 + while [ $recursion -eq 1 ]; do + unset delpkg nextpkg + recursion=0 +@@ -72,6 +75,27 @@ del_pkg() { + fi + done + pkgs="${nextpkg}" ++ # Apparently pkgsrc packages can remain installed and in the /var ++ # database even after pkg_delete -f command. This could send the ++ # script into an infinite recursion loop because Tinderbox doesn't ++ # think that can happen. To recover from this, if we find a repeating ++ # recursion pattern with an empty delete pattern, bail out. ++ if [ -z "${delpkg}" ]; then ++ if [ "${recursion}" -eq 1 ]; then ++ if [ "${recursion_virgin}" -eq 1 ]; then ++ locklist="${pkgs}" ++ recursion_virgin=0 ++ else ++ if [ "${pkgs}" = "${locklist}" ]; then ++ delpkg="${pkgs}" ++ pkgs="" ++ recursion=0 ++ fi ++ fi ++ fi ++ else ++ recursion_virgin=1 ++ fi + if [ "$dellist" != "" -a "$dellist" = "$delpkg" ]; then + echo "deleted list =\""$dellist"\", packages to delete ="\"$delpkg\" #" + echo "The following packages were left behind (perhaps your dependency list is incomplete):" +@@ -91,6 +115,37 @@ del_pkg() { done fi find /var/db/pkg -type f -empty -delete @@ -74,12 +103,12 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ } dir=$1 -@@ -102,37 +134,46 @@ FD=$5 +@@ -102,35 +157,42 @@ FD=$5 BD=$6 RD=$7 TD=$8 -PLISTCHECK=$9 -+SD=$9 ++pkgname=$9 +PLISTCHECK=${10} L=$(echo ${LOCALBASE} | sed 's,^/,,') @@ -89,7 +118,6 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ + +cd $dir || exit 1 + -+pkgname=`bmake -V '\${PKGNAME}'` +INFO_OPTVAR=`bmake -V '\${PKG_OPTIONS_VAR}'` +get_package_options `bmake -V '\${DISTNAME}'` + @@ -131,11 +159,8 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ - fi echo "End Configuration." -+ echo "BOOTSTRAP_DEPENDS=${SD}" echo "FETCH_DEPENDS=${FD}" - echo "PATCH_DEPENDS=${PD}" - echo "EXTRACT_DEPENDS=${ED}" -@@ -165,19 +206,20 @@ if [ $phase = 1 ]; then +@@ -165,6 +227,7 @@ if [ $phase = 1 ]; then ./${L}/share/xml ./${L}/etc/gconf ./var/db/fontconfig @@ -143,10 +168,8 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ EOF # Record a "pristine" mtree. - mtree -X /tmp/mtree.preexclude -xcn -k uid,gid,mode -p / > /tmp/mtree.pristine - -- add_pkg $FD -+ add_pkg $SD $FD +@@ -173,11 +236,11 @@ EOF + add_pkg $FD cd $dir || exit 1 - pkgname=$(make package-name) @@ -159,7 +182,7 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ cat /tmp/make.log1 echo "0" > /tmp/status else -@@ -186,15 +228,27 @@ EOF +@@ -186,36 +249,41 @@ EOF else @@ -191,7 +214,12 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ cat /tmp/make.log2 del_pkg ${ED} -@@ -207,15 +261,13 @@ else +- # Fetch depends still need to be here for 'make extract' since that target +- # always reruns 'make fetch' due to the lack of fetch cookie (and no place +- # to put it since WRKDIR isn't created by 'make fetch') +- del_pkg $FD +- + echo "================================================================" echo "====================<phase 3: make patch>====================" add_pkg ${PD} cd $dir @@ -208,16 +236,16 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ # Files we do not care about changing between pre-build and post-cleanup cat > /tmp/mtree.buildexclude <<EOF ./var/log/* -@@ -247,7 +299,7 @@ EOF +@@ -247,7 +315,7 @@ EOF fi cd $dir - portdir=$(echo ${dir} | sed -e 's|^/usr/ports/||' -e 'y/\//_/') -+ portdir=$(echo ${dir} | sed -e 's|^/usr/pkg/||' -e 'y/\//_/') ++ portdir=$(echo ${dir} | sed -e 's|^/usr/pkgsrc/||' -e 'y/\//_/') if [ -f .sleepme ]; then set > /tmp/.set_${portdir} -@@ -259,32 +311,32 @@ EOF +@@ -259,32 +327,32 @@ EOF rm -f /tmp/.set_${portdir} fi @@ -271,7 +299,7 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ echo "================================================================" echo "====================<phase 6: make install>====================" -@@ -306,7 +358,7 @@ EOF +@@ -306,7 +374,7 @@ EOF mtree -X /tmp/mtree.exclude -xcn -k uid,gid,mode -p / > /tmp/mtree cd $dir @@ -280,11 +308,12 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ cat /tmp/make.log6 echo "0" > /tmp/status else -@@ -316,14 +368,14 @@ EOF +@@ -316,14 +384,15 @@ EOF echo "================================================================" echo "====================<phase 7: make package>====================" cd $dir - if /pnohang $TIMEOUT /tmp/make.log7 ${pkgname} make package; then ++ echo "Starting make process for ${pkgname}" + if /pnohang $TIMEOUT /tmp/make.log7 ${pkgname} bmake package; then echo "0" > /tmp/status else @@ -297,7 +326,7 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ du -skx / | awk '{print $1}' > /tmp/size del_pkg ${pkgname} -@@ -349,8 +401,10 @@ EOF +@@ -349,14 +418,18 @@ EOF echo "================================================================" fi @@ -309,18 +338,39 @@ $NetBSD: patch-aj,v 1.1 2011/11/02 21:13:23 marino Exp $ echo "=== Checking filesystem state" if [ -s /tmp/list4 ]; then -@@ -374,8 +428,8 @@ EOF + echo "list of extra files and directories in / (not present before this port was installed but present after it was deinstalled)" + cat /tmp/list4 +- touch /tmp/leftovers ++ # Files left over here are okay as long as they are gone by list 6 ++ # Just list them for informational purposes, but don't act on it. ++ # touch /tmp/leftovers + fi + if [ -s /tmp/list5 ]; then + echo "list of files present before this port was installed but missing after it was deinstalled)" +@@ -373,9 +446,10 @@ EOF + fi # BUILD_DEPENDS need to be present at install-time, e.g. gmake ++ # FETCH_DEPENDS contains the digests which is needed throught the process # Concatenate and remove duplicates - BRD=$(echo $BD $RD | tr ' ' '\n' | sort -u | tr '\n' ' ') - del_pkg ${BRD} -+ BRSD=$(echo $BD $RD $SD | tr ' ' '\n' | sort -u | tr '\n' ' ') -+ del_pkg ${BRSD} ++ BRFD=$(echo $BD $RD $FD | tr ' ' '\n' | sort -u | tr '\n' ' ') ++ del_pkg ${BRFD} cd /var/db/pkg if [ $(echo $(echo * | wc -c)) != 2 ]; then echo "leftover packages:" * -@@ -430,7 +484,7 @@ EOF +@@ -395,9 +469,6 @@ EOF + grep ' missing$' /tmp/list3 > /tmp/list5 + grep -vE ' (extra|missing)$' /tmp/list3 > /tmp/list6 + if [ -n "${PLISTCHECK}" ]; then +- if grep -vqE "(${L})/etc/" /tmp/list4; then +- #echo "1" > /tmp/status +- fi + if [ -s /tmp/list5 ]; then + #echo "1" > /tmp/status + fi +@@ -430,7 +501,7 @@ EOF if [ -e ${dir}/.keep ]; then cd ${dir} diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-ar b/pkgtools/tinderbox-dragonfly/patches/patch-ar index b3a44cc8523..35dec91c39b 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-ar +++ b/pkgtools/tinderbox-dragonfly/patches/patch-ar @@ -1,4 +1,4 @@ -$NetBSD: patch-ar,v 1.1 2011/11/02 21:13:25 marino Exp $ +$NetBSD: patch-ar,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/README 2011-10-30 17:11:08.876006000 +0000 +++ README @@ -300,6 +300,17 @@ $NetBSD: patch-ar,v 1.1 2011/11/02 21:13:25 marino Exp $ -cleanpackages removes all packages already built fors the specified Build -updateports updates the Build's PortsTree (NOTE: dangerous if +@@ -452,8 +444,8 @@ + -fetch-original ignores the distfile cache, and fetches all + distfiles from their respective sources + -nolog disables log analysis code +- -onceonly only performs one build pass (i.e. tinderbuild +- Phase 1) ++ -twice Performs a second build pass (tinderbuild Phase 1) ++ after a build failure. + -norebuild do not force a rebuild of packages specified on + the command line + @@ -472,23 +464,23 @@ To update existing Jails: diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-as b/pkgtools/tinderbox-dragonfly/patches/patch-as index 4a38578f788..5fdb2023b5d 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-as +++ b/pkgtools/tinderbox-dragonfly/patches/patch-as @@ -1,4 +1,4 @@ -$NetBSD: patch-as,v 1.1 2011/11/02 21:13:27 marino Exp $ +$NetBSD: patch-as,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/lib/tc_command.pl 2011-10-16 00:52:55.000000000 +0000 +++ lib/tc_command.pl @@ -32,7 +32,7 @@ $NetBSD: patch-as,v 1.1 2011/11/02 21:13:27 marino Exp $ help => "Get stored dependencies for a given port and build", usage => - "-b <build name> -d <port directory> [-t EXTRACT_DEPENDS|PATCH_DEPENDS|FETCH_DEPENDS|BUILD_DEPENDS|LIB_DEPENDS|RUN_DEPENDS|TEST_DEPENDS]", -+ "-b <build name> -d <port directory> [-t BOOTSTRAP_DEPENDS|EXTRACT_DEPENDS|PATCH_DEPENDS|FETCH_DEPENDS|BUILD_DEPENDS|LIB_DEPENDS|RUN_DEPENDS|TEST_DEPENDS|DEPENDS]", ++ "-b <build name> -d <port directory> [-t EXTRACT_DEPENDS|PATCH_DEPENDS|FETCH_DEPENDS|BUILD_DEPENDS|LIB_DEPENDS|RUN_DEPENDS|TEST_DEPENDS|DEPENDS]", optstr => 'b:d:t:', }, + "getDependencyCascades" => { @@ -100,16 +100,15 @@ $NetBSD: patch-as,v 1.1 2011/11/02 21:13:27 marino Exp $ my @bports = (); if (!$opts->{'d'}) { -@@ -1524,6 +1531,8 @@ sub addPortToOneBuild { +@@ -1524,6 +1531,7 @@ sub addPortToOneBuild { LIB_DEPENDS => 'LibDepends', RUN_DEPENDS => 'RunDepends', TEST_DEPENDS => 'TestDepends', -+ BOOTSTRAP_DEPENDS => 'BootstrapDepends', -+ DEPENDS => 'Buildlink3Depends', ++ DEPENDS => 'Buildlink3Depends', ); $ds->clearDependenciesForPort($pCls, $build, undef); -@@ -1548,7 +1557,6 @@ sub addPortToOneBuild { +@@ -1548,7 +1556,6 @@ sub addPortToOneBuild { } } } @@ -117,7 +116,7 @@ $NetBSD: patch-as,v 1.1 2011/11/02 21:13:27 marino Exp $ } } -@@ -1600,7 +1608,7 @@ sub addBuildPortsQueueEntry { +@@ -1600,7 +1607,7 @@ sub addBuildPortsQueueEntry { $ds->addBuildPortsQueueEntry($build, $portdir, $priority, $user_id); if (!$rc) { @@ -126,16 +125,15 @@ $NetBSD: patch-as,v 1.1 2011/11/02 21:13:27 marino Exp $ . $portdir . " to the datastore: " . $ds->getError() -@@ -1720,6 +1728,8 @@ sub getDependenciesForPort { +@@ -1720,6 +1727,7 @@ sub getDependenciesForPort { LIB_DEPENDS => 4, RUN_DEPENDS => 5, TEST_DEPEND => 6, -+ BOOTSTRAP_DEPENDS => 7, -+ DEPENDS => 8, ++ DEPENDS => 7, ); if (!$opts->{'b'} || !$opts->{'d'}) { -@@ -1773,6 +1783,50 @@ sub getDependenciesForPort { +@@ -1773,6 +1781,50 @@ sub getDependenciesForPort { ); } } diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-av b/pkgtools/tinderbox-dragonfly/patches/patch-av index ee24d09cf54..ec44452a99e 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-av +++ b/pkgtools/tinderbox-dragonfly/patches/patch-av @@ -1,4 +1,4 @@ -$NetBSD: patch-av,v 1.1 2011/11/02 21:13:28 marino Exp $ +$NetBSD: patch-av,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/lib/makemake 2011-10-16 00:52:55.000000000 +0000 +++ lib/makemake @@ -8,12 +8,7 @@ $NetBSD: patch-av,v 1.1 2011/11/02 21:13:28 marino Exp $ #- # Copyright (c) 2004-2005 FreeBSD GNOME Team <freebsd-gnome@FreeBSD.org> # All rights reserved. -@@ -135,11 +135,11 @@ if (!scalar(@ARGV)) { - my ( - %pkgdir, %pkgdeps, %pkgedeps, %pkgpdeps, %pkgfdeps, - %pkgbdeps, %pkgrdeps, @duds, $portbase, $makecache, -- %pkgtdeps, -+ %pkgtdeps, %pkgsdeps, +@@ -139,7 +139,7 @@ my ( ); $portbase = $ENV{'PORTSDIR'}; @@ -22,7 +17,7 @@ $NetBSD: patch-av,v 1.1 2011/11/02 21:13:28 marino Exp $ while (scalar(@PORTS)) { my $port = shift @PORTS; -@@ -162,14 +162,15 @@ while (scalar(@PORTS)) { +@@ -162,7 +162,7 @@ while (scalar(@PORTS)) { $pkgname = $makecache->PkgName($portdir); # Create a list of duds (ports that will not be attempted because they @@ -31,57 +26,15 @@ $NetBSD: patch-av,v 1.1 2011/11/02 21:13:28 marino Exp $ if (!$noduds) { my $dudpkg = $makecache->IgnoreList($portdir); push @duds, $dudpkg if ($dudpkg); - } - -- my (@edeps, @pdeps, @fdeps, @bdeps, @rdeps, @tdeps) = (); -+ my (@sdeps, @edeps, @pdeps, @fdeps, @bdeps, @rdeps, @tdeps) = (); - $pkgdeps{$portdir} = []; -+ $pkgsdeps{$portdir} = []; - $pkgedeps{$portdir} = []; - $pkgpdeps{$portdir} = []; - $pkgfdeps{$portdir} = []; -@@ -177,6 +178,7 @@ while (scalar(@PORTS)) { - $pkgrdeps{$portdir} = []; - $pkgtdeps{$portdir} = []; - $pkgdir{$portdir} = $pkgname; -+ push @sdeps, $makecache->BootstrapDependsList($portdir); - push @edeps, $makecache->ExtractDependsList($portdir); - push @pdeps, $makecache->PatchDependsList($portdir); - push @fdeps, $makecache->FetchDependsList($portdir); -@@ -184,6 +186,7 @@ while (scalar(@PORTS)) { - push @rdeps, $makecache->RunDependsList($portdir); - push @tdeps, $makecache->TestDependsList($portdir); - -+ findRunDepends(\@sdeps, \%pkgsdeps, $portdir, $makecache, \@PORTS); - findRunDepends(\@edeps, \%pkgedeps, $portdir, $makecache, \@PORTS); - findRunDepends(\@pdeps, \%pkgpdeps, $portdir, $makecache, \@PORTS); - findRunDepends(\@fdeps, \%pkgfdeps, $portdir, $makecache, \@PORTS); -@@ -192,6 +195,7 @@ while (scalar(@PORTS)) { - findRunDepends(\@tdeps, \%pkgtdeps, $portdir, $makecache, \@PORTS); - - foreach my $depport ( -+ @{$pkgsdeps{$portdir}}, - @{$pkgedeps{$portdir}}, @{$pkgpdeps{$portdir}}, - @{$pkgfdeps{$portdir}}, @{$pkgbdeps{$portdir}}, - @{$pkgrdeps{$portdir}}, @{$pkgtdeps{$portdir}}, -@@ -216,6 +220,7 @@ cleanup($ds, 1, "Failed to open $builddi - foreach my $key (keys %pkgdir) { - my $pname = $pkgdir{$key} . $ENV{'PKGSUFFIX'}; - my $pkgnames = makeList(\%pkgdir, 1, $makecache, @{$pkgdeps{$key}}); -+ my $sdeplst = makeList(\%pkgdir, 1, $makecache, @{$pkgsdeps{$key}}); - my $edeplst = makeList(\%pkgdir, 1, $makecache, @{$pkgedeps{$key}}); - my $pdeplst = makeList(\%pkgdir, 1, $makecache, @{$pkgpdeps{$key}}); - my $fdeplst = makeList(\%pkgdir, 1, $makecache, @{$pkgfdeps{$key}}); -@@ -229,9 +234,10 @@ foreach my $key (keys %pkgdir) { +@@ -229,9 +229,9 @@ foreach my $key (keys %pkgdir) { printf MK "\t@%s %s %s %s %s %s ", tinderLoc($pb, 'scripts', 'lib/portbuild'), $BUILD_NAME, $JAIL_NAME, $PORTSTREE_NAME, $ENV{'PORTBUILD_ARGS'}; - printf MK "\"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" ", $edeplst, $pdeplst, - $fdeplst, $bdeplst, $rdeplst, $tdeplst; - printf MK "%s /usr/ports/%s\n", $pname, $key; -+ printf MK "\"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" ", -+ $edeplst, $pdeplst, $fdeplst, $bdeplst, $rdeplst, $tdeplst, -+ $sdeplst; ++ printf MK "\"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" ", ++ $edeplst, $pdeplst, $fdeplst, $bdeplst, $rdeplst, $tdeplst; + printf MK "%s /usr/pkgsrc/%s\n", $pname, $key; } diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-aw b/pkgtools/tinderbox-dragonfly/patches/patch-aw index c842c32795c..7e4f7e040f8 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-aw +++ b/pkgtools/tinderbox-dragonfly/patches/patch-aw @@ -1,4 +1,4 @@ -$NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ +$NetBSD: patch-aw,v 1.2 2011/11/14 02:00:20 marino Exp $ --- ../FreeBSD/lib/Tinderbox/MakeCache.pm 2011-10-16 00:52:55.000000000 +0000 +++ lib/Tinderbox/MakeCache.pm @@ -29,12 +29,13 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ }, $name; $self; -@@ -60,13 +61,18 @@ sub _execMake { +@@ -60,20 +61,94 @@ sub _execMake { my $self = shift; my $port = shift; my @ret; - my $tmp; + my $target; ++ my $deptype; + my $tmp = ''; return if ($self->{SEEN}->{$port} eq 1); @@ -50,8 +51,13 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ + @ret = split("\n", `cd $dir && bmake $customOptions $nativeOptions $tmp`); foreach $tmp (@makeTargets) { - $self->{CACHE}->{$port}{$tmp} = shift @ret; -@@ -74,6 +80,66 @@ sub _execMake { +- $self->{CACHE}->{$port}{$tmp} = shift @ret; ++ $deptype = $tmp; ++ if (${tmp} eq "BOOTSTRAP_DEPENDS") { ++ $deptype = "FETCH_DEPENDS"; ++ } ++ $self->{CACHE}->{$port}{$deptype} = shift @ret; + } $self->{SEEN}->{$port} = 1; } @@ -100,6 +106,7 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ + my $result = ""; + my $ppkgsrc=`grep PREFER_PKGSRC $moremk`; + my $pnative=`grep PREFER_NATIVE $moremk`; ++ my $develop=`grep PKG_DEVELOPER $moremk`; + if ($ppkgsrc) { + @worker = split(/=/, $ppkgsrc); + if (scalar (@worker) >= 2) { @@ -112,13 +119,16 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ + $result .= 'PREFER_NATIVE="' . $self->_trim($worker[1]) . '"'; + } + } ++ if ($develop) { ++ $result .= 'PKG_DEVELOPER=yes'; ++ } + return $result; +} + # Internal function for returning a port variable sub _getVariable { my $self = shift; -@@ -90,16 +156,28 @@ sub _getList { +@@ -90,16 +165,28 @@ sub _getList { my $port = shift; my $item = shift; my @deps; @@ -149,7 +159,7 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ } } return @deps; -@@ -109,7 +187,7 @@ sub _getList { +@@ -109,7 +196,7 @@ sub _getList { sub Name { my $self = shift; my $port = shift; @@ -158,17 +168,10 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ } # Package name -@@ -133,6 +211,20 @@ sub Maintainer { +@@ -133,6 +220,13 @@ sub Maintainer { return $self->_getVariable($port, 'MAINTAINER'); } -+# Bootstrap dependencies -+sub BootstrapDepends { -+ my $self = shift; -+ my $port = shift; -+ return $self->_getList($port, 'BOOTSTRAP_DEPENDS'); -+} -+ +# Buildlink3 dependencies +sub Buildlink3Depends { + my $self = shift; @@ -179,7 +182,7 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ # Extract dependencies sub ExtractDepends { my $self = shift; -@@ -189,8 +281,8 @@ sub IgnoreList { +@@ -189,8 +283,8 @@ sub IgnoreList { my $n = 0; $self->_execMake($port); @@ -190,21 +193,10 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ } return $n eq 0 ? "" : $self->PkgName($port); } -@@ -206,6 +298,28 @@ sub FetchDependsList { +@@ -206,6 +300,17 @@ sub FetchDependsList { return grep { !$uniq{$_}++ } @deps; } -+sub BootstrapDependsList { -+ my $self = shift; -+ my $port = shift; -+ -+ my @deps; -+ push(@deps, $self->BootstrapDepends($port)); -+ -+ my %uniq; -+ return grep { !$uniq{$_}++ } @deps; -+} -+ +sub Buildlink3DependsList { + my $self = shift; + my $port = shift; @@ -219,7 +211,7 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ sub ExtractDependsList { my $self = shift; my $port = shift; -@@ -250,6 +364,7 @@ sub BuildDependsList { +@@ -250,6 +355,7 @@ sub BuildDependsList { push(@deps, $self->FetchDepends($port)); push(@deps, $self->BuildDepends($port)); push(@deps, $self->LibDepends($port)); @@ -227,7 +219,7 @@ $NetBSD: patch-aw,v 1.1 2011/11/02 21:13:29 marino Exp $ my %uniq; return grep { !$uniq{$_}++ } @deps; -@@ -263,6 +378,7 @@ sub RunDependsList { +@@ -263,6 +369,7 @@ sub RunDependsList { my @deps; push(@deps, $self->LibDepends($port)); push(@deps, $self->RunDepends($port)); diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-ax b/pkgtools/tinderbox-dragonfly/patches/patch-ax deleted file mode 100644 index a1d7a5b70d5..00000000000 --- a/pkgtools/tinderbox-dragonfly/patches/patch-ax +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ax,v 1.1 2011/11/02 21:13:29 marino Exp $ - ---- ../FreeBSD/sql/schema.pgsql.pre 2011-10-16 00:52:55.000000000 +0000 -+++ sql/schema.pgsql.pre -@@ -101,7 +101,7 @@ CREATE TABLE port_dependencies ( - port_dependency_id SERIAL PRIMARY KEY, - build_port_id INTEGER REFERENCES build_ports(build_port_id) ON UPDATE CASCADE ON DELETE CASCADE, - port_id INTEGER REFERENCES ports(port_id) ON UPDATE CASCADE ON DELETE CASCADE, -- dependency_type VARCHAR(16) CHECK (dependency_type IN ('UNKNOWN', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS', 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'DEPENDS', 'RUN_DEPENDS')) DEFAULT 'UNKNOWN' -+ dependency_type VARCHAR(18) CHECK (dependency_type IN ('UNKNOWN', 'BOOTSTRAP_DEPENDS', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS', 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'DEPENDS', 'RUN_DEPENDS')) DEFAULT 'UNKNOWN' - ); - CREATE INDEX port_dependencies_build_port_id_idx ON port_dependencies(build_port_id); - CREATE INDEX port_dependencies_port_id_idx ON port_dependencies(port_id); diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-ay b/pkgtools/tinderbox-dragonfly/patches/patch-ay deleted file mode 100644 index f92bac6f8eb..00000000000 --- a/pkgtools/tinderbox-dragonfly/patches/patch-ay +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ay,v 1.1 2011/11/02 21:13:29 marino Exp $ - ---- ../FreeBSD/sql/schema.mysql.pre 2011-10-16 00:52:55.000000000 +0000 -+++ sql/schema.mysql.pre -@@ -104,7 +104,7 @@ CREATE TABLE port_dependencies ( - port_dependency_id SERIAL PRIMARY KEY, - build_port_id INTEGER REFERENCES build_port(build_port_id) ON UPDATE CASCADE ON DELETE CASCADE, - port_id INTEGER REFERENCES ports(port_id) ON UPDATE CASCADE ON DELETE CASCADE, -- dependency_type ENUM('UNKNOWN', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS', 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'DEPENDS', 'RUN_DEPENDS') DEFAULT 'UNKNOWN' -+ dependency_type ENUM('UNKNOWN', 'BOOTSTRAP_DEPENDS', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS', 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'DEPENDS', 'RUN_DEPENDS') DEFAULT 'UNKNOWN' - ); - CREATE INDEX port_dependencies_build_port_id_idx ON port_dependencies(build_port_id); - CREATE INDEX port_dependencies_port_id_idx ON port_dependencies(port_id); |