diff options
author | marino <marino@pkgsrc.org> | 2011-12-04 21:55:01 +0000 |
---|---|---|
committer | marino <marino@pkgsrc.org> | 2011-12-04 21:55:01 +0000 |
commit | 3e3d636abfd0f9fb2d80fb069db9f64fd728c5dd (patch) | |
tree | 0f4c78464096f5e3d8f73f820ee4045b228ad5ad /pkgtools | |
parent | d8540a44746819c130d1fbb56bd886d7f5bcbd78 (diff) | |
download | pkgsrc-3e3d636abfd0f9fb2d80fb069db9f64fd728c5dd.tar.gz |
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
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/tinderbox-dragonfly/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/distinfo | 6 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in | 8 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in | 8 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in | 7 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-aa | 58 | ||||
-rw-r--r-- | pkgtools/tinderbox-dragonfly/patches/patch-aw | 30 |
7 files changed, 72 insertions, 49 deletions
diff --git a/pkgtools/tinderbox-dragonfly/Makefile b/pkgtools/tinderbox-dragonfly/Makefile index 25ea3b930fe..7c0a9065af0 100644 --- a/pkgtools/tinderbox-dragonfly/Makefile +++ b/pkgtools/tinderbox-dragonfly/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.4 2011/11/23 00:54:33 marino Exp $ +# $NetBSD: Makefile,v 1.5 2011/12/04 21:55:01 marino Exp $ # DISTNAME= tinderbox-dragonfly-${TBOX_VERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= pkgtools MASTER_SITES= http://tinderbox.marcuscom.com/ DISTFILES= tinderbox-${TBOX_VERSION}.tar.gz diff --git a/pkgtools/tinderbox-dragonfly/distinfo b/pkgtools/tinderbox-dragonfly/distinfo index 38eb3cb7772..1beadc4898f 100644 --- a/pkgtools/tinderbox-dragonfly/distinfo +++ b/pkgtools/tinderbox-dragonfly/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.4 2011/11/23 00:54:33 marino Exp $ +$NetBSD: distinfo,v 1.5 2011/12/04 21:55:01 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) = b31d674dc698f9b529799cd710f1534564152ff3 +SHA1 (patch-aa) = ba2366ab87a212a82f6cc2464286f02e104932b5 SHA1 (patch-ab) = bead83362c0dbba1b71d11a076efb439fe3ac545 SHA1 (patch-ac) = 7f62eacc4bea13a4fa36f6d84dab8750ca842366 SHA1 (patch-ad) = 12c92ac0aeaf04260151d2e9e305cb6594cc3107 @@ -22,7 +22,7 @@ SHA1 (patch-as) = 4406f887e23b31bc2e1f2e8a55476125ee1bce8a SHA1 (patch-at) = f46d54fab4f94e0b6778d26ac84ce933f734c6d5 SHA1 (patch-au) = 27e654af19184d3a5a9028442b80556417bd45c8 SHA1 (patch-av) = 806b9d4538f13d54b023b9630b74f3b859a65f67 -SHA1 (patch-aw) = 73f14c8d3d8df6afd987e5c30dbb658565bf3568 +SHA1 (patch-aw) = 3a7b9bb52942ad99055b9ab914aac74622355872 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 index 6f0277f3c2d..a15a1f1703e 100644 --- a/pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in +++ b/pkgtools/tinderbox-dragonfly/files/add_all_packages.sh.in @@ -44,7 +44,9 @@ 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 + if [ -f ${PORT}/Makefile ]; then + COUNTER=`expr ${COUNTER} + 1` + printf "%05d ${BUILD} ${PORT}\n" ${COUNTER} + ${PB}/scripts/tc addPort -b ${BUILD} -d ${PORT} -R + fi done diff --git a/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in b/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in index b2e132797ad..d5881356b43 100644 --- a/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in +++ b/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in @@ -26,9 +26,11 @@ 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 +SPORTDIR=`echo ${PORTDIR} | sed "s|/|\\\\\\/|g"` +if [ -n "${SPORTDIR}" ]; then + sed "/^${SPORTDIR}\$/d" ${BULKTMP}/bulk_${BUILD}.queue > ${BULKTMP}/bulk_${BUILD}.queue.tmp + mv ${BULKTMP}/bulk_${BUILD}.queue.tmp ${BULKTMP}/bulk_${BUILD}.queue +fi if [ -f ${BULKTMP}/bulk_${BUILD}.active ]; then ACTIVEPORT=`cat ${BULKTMP}/bulk_${BUILD}.active` diff --git a/pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in b/pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in index 43444cb58f7..72b79d9ec74 100644 --- a/pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in +++ b/pkgtools/tinderbox-dragonfly/files/bulkbuild.sh.in @@ -63,7 +63,12 @@ option_kickoff() 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 + RAW=`/usr/bin/find -s * -type d -maxdepth 1 -depth 1` + for dossier in ${RAW}; do + if [ -f ${dossier}/Makefile ]; then + echo ${dossier} >> ${BULKTMP}/bulk_${1}.queue + fi + done option_nextport ${1} } diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-aa b/pkgtools/tinderbox-dragonfly/patches/patch-aa index 75097239912..e0b582ecffe 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-aa +++ b/pkgtools/tinderbox-dragonfly/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ +$NetBSD: patch-aa,v 1.5 2011/12/04 21:55:01 marino Exp $ --- ../FreeBSD/lib/tc_command.sh 2011-11-20 13:11:37.088510000 +0000 +++ lib/tc_command.sh @@ -263,11 +263,11 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ + echo " ${updateCmd} fetch --depth=1 origin" + echo " ${updateCmd} branch master origin/master" + echo " echo 'Repository creation complete.'" - echo "fi" ++ echo "fi" + echo "BRANCH=\`${updateCmd} branch | /usr/bin/grep -w ${5}\`" + echo "if [ \"\${BRANCH}\" = \"\" ]; then" + echo " ${updateCmd} branch ${5} origin/${5}" -+ echo "fi" + echo "fi" + echo "echo 'Ready to pull updates from branch.'" + echo "${updateCmd} checkout ${5}" + echo "${updateCmd} pull" @@ -397,7 +397,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ + 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 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ + 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 @@ -691,7 +691,17 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ # add portstree to datastore echo -n "${portsTreeName}: adding to datastore... " -@@ -1214,7 +1337,7 @@ enterBuild () { +@@ -1192,6 +1315,9 @@ enterBuild () { + esac + done + ++ tc=$(tinderLoc scripts tc) ++ HOST_WORKDIR=$(${tc} configGet | awk -F= '/^HOST_WORKDIR/ {print $2}') ++ + if [ -z "${portDir}" ]; then + echo "enterBuild: no port specified" + return 1 +@@ -1214,7 +1340,7 @@ enterBuild () { fi sleepName=$(echo ${portDir} | sed -e 'y/\//_/') @@ -700,7 +710,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ if [ ! -d ${portFullDir} ]; then echo "enterBuild: Build environment does not exist yet, sleeping." -@@ -1238,7 +1361,7 @@ enterBuild () { +@@ -1238,7 +1364,7 @@ enterBuild () { sleep 15 done @@ -709,7 +719,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ cp $(tinderLoc scripts lib/enterbuild) ${buildRoot}/root chroot ${buildRoot} /root/enterbuild ${portDir} rm -f ${buildRoot}/tmp/.sleep_${sleepName} -@@ -1325,7 +1448,6 @@ makeBuild () { +@@ -1325,7 +1451,6 @@ makeBuild () { resetBuild () { # set up defaults build="" @@ -717,7 +727,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ cleandistfiles="0" # argument handling -@@ -1334,7 +1456,6 @@ resetBuild () { +@@ -1334,7 +1459,6 @@ resetBuild () { case "${arg}" in b) build="${OPTARG}";; @@ -725,7 +735,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ ?) exit 1;; esac -@@ -1490,22 +1611,23 @@ tinderbuild_setup () { +@@ -1490,22 +1614,23 @@ tinderbuild_setup () { echo "tinderbuild: Finalizing chroot environment" # Mount ports/ @@ -754,7 +764,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ # Mount /dev, since we're going to be chrooting shortly mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1 -@@ -1522,12 +1644,6 @@ tinderbuild_setup () { +@@ -1522,12 +1647,6 @@ tinderbuild_setup () { tinderbuild_cleanup 1 fi @@ -767,7 +777,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ # Handle the distfile cache if [ -n "${DISTFILE_CACHE}" ]; then if ! requestMount -t builddistcache -b ${build} \ -@@ -1557,7 +1673,7 @@ tinderbuild_setup () { +@@ -1557,7 +1676,7 @@ tinderbuild_setup () { mkdir -p ${ccacheDir} $(tinderLoc buildccache ${build}) if ! requestMount -t buildccache -b ${build} \ @@ -776,7 +786,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ echo "tinderbuild: cannot mount ccache" tinderbuild_cleanup 1 fi -@@ -1574,8 +1690,7 @@ tinderbuild_setup () { +@@ -1574,8 +1693,7 @@ tinderbuild_setup () { mkdir -p ${optionsDir} $(tinderLoc buildoptions ${build}) @@ -786,7 +796,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ echo "tinderbuild: cannot mount options" tinderbuild_cleanup 1 fi -@@ -1658,10 +1773,9 @@ tinderbuild () { +@@ -1658,10 +1776,9 @@ tinderbuild () { cleanpackages=0 init=0 jobs=1 @@ -798,7 +808,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ pbargs="" skipmake=0 updateports=0 -@@ -1708,9 +1822,8 @@ tinderbuild () { +@@ -1708,9 +1825,8 @@ tinderbuild () { x-fetch-original) pbargs="${pbargs} -fetch-original";; x-noclean) pbargs="${pbargs} -noclean";; x-nolog) pbargs="${pbargs} -nolog";; @@ -809,7 +819,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ -*) return 1;; *) ports="${ports} $1";; -@@ -1836,7 +1949,8 @@ tinderbuild () { +@@ -1836,7 +1952,8 @@ tinderbuild () { echo "tinderbuild: cannot mount portstree: ${portstree}" exit 1 fi @@ -819,7 +829,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ $(tinderLoc scripts lib/makemake) ${noduds} ${build} ${ports} ) if [ $? -ne 0 ]; then -@@ -1855,10 +1969,6 @@ tinderbuild () { +@@ -1855,10 +1972,6 @@ tinderbuild () { # Set up the chrooted environment osmajor=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|') @@ -830,7 +840,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ tinderbuild_setup -@@ -1866,7 +1976,7 @@ tinderbuild () { +@@ -1866,7 +1979,7 @@ tinderbuild () { ${tc} updateBuildStatus -b ${build} -s PORTBUILD tinderbuild_phase 0 ${jobs} ${pkgDir} error=$? @@ -839,7 +849,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ if [ ${error} -ne 0 ] ; then tinderbuild_setup fi -@@ -1885,21 +1995,46 @@ init () { +@@ -1885,21 +1998,46 @@ init () { mkdir -p ${pb}/${dir} done @@ -892,7 +902,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ return 0 } -@@ -1948,7 +2083,8 @@ addPortToBuild () { +@@ -1948,7 +2086,8 @@ addPortToBuild () { buildenv ${jail} ${portsTree} ${build} buildenvNoHost ${build} @@ -902,7 +912,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ if [ -z "${portDir}" ]; then ${tc} addPortToOneBuild -b ${build} ${norecurse} else -@@ -1958,36 +2094,7 @@ addPortToBuild () { +@@ -1958,36 +2097,7 @@ addPortToBuild () { fi ${tc} addPortToOneBuild -b ${build} -d ${portDir} ${norecurse} fi @@ -940,7 +950,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ if [ -n "${save_SRCBASE}" ]; then export SRCBASE=${save_SRCBASE} -@@ -2174,10 +2281,7 @@ copyBuild () { +@@ -2174,10 +2284,7 @@ copyBuild () { if [ ! -d ${destOptionsDir} ]; then mkdir -p ${destOptionsDir} fi @@ -952,7 +962,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ else echo "copyBuild: not copying OPTIONS to ${dest} since it has no OPTIONS directory" fi -@@ -2293,13 +2397,13 @@ tbcleanup () { +@@ -2293,13 +2400,13 @@ tbcleanup () { pathFound=0 for portstree in ${portstrees} ; do path=$(tinderLoc portstree ${portstree}) @@ -969,7 +979,7 @@ $NetBSD: patch-aa,v 1.4 2011/11/23 00:54:34 marino Exp $ if [ -f "${distinfo}" ]; then for df in $(grep '^MD5' ${distinfo} | awk -F '[\(\)]' '{print $2}'); do if ! grep -q "^${df}\$" ${disttmp}; then -@@ -2383,7 +2487,7 @@ tbcleanup () { +@@ -2383,7 +2490,7 @@ tbcleanup () { fi path=$(tinderLoc portstree ${portstree}) diff --git a/pkgtools/tinderbox-dragonfly/patches/patch-aw b/pkgtools/tinderbox-dragonfly/patches/patch-aw index f253be0180b..139c748b424 100644 --- a/pkgtools/tinderbox-dragonfly/patches/patch-aw +++ b/pkgtools/tinderbox-dragonfly/patches/patch-aw @@ -1,4 +1,4 @@ -$NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ +$NetBSD: patch-aw,v 1.4 2011/12/04 21:55:01 marino Exp $ --- ../FreeBSD/lib/Tinderbox/MakeCache.pm 2011-10-16 00:52:55.000000000 +0000 +++ lib/Tinderbox/MakeCache.pm @@ -129,7 +129,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ # Internal function for returning a port variable sub _getVariable { my $self = shift; -@@ -90,16 +166,28 @@ sub _getList { +@@ -90,16 +166,30 @@ sub _getList { my $port = shift; my $item = shift; my @deps; @@ -137,15 +137,19 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ $self->_execMake($port); foreach my $dep (split(/\s+/, $self->{CACHE}->{$port}{$item})) { -+ $dep =~ s/^\s+//; -+ $dep =~ s/\s+$//; - my ($d, $ddir) = split(/:/, $dep); +- my ($d, $ddir) = split(/:/, $dep); - if (!defined($ddir) || $item eq 'DEPENDS') { ++ my ($d, $ddir) = split(/:/, $self->_trim($dep)); + if (!defined($ddir)) { $ddir = $d; } - $ddir =~ s|^$self->{BASEDIR}/||; -+ $ddir =~ s|^\.\.\/\.\.\/||; +- $ddir =~ s|^$self->{BASEDIR}/||; ++ if ($d =~ /^{perl>=?5.+,.+}$/) { ++ $ddir = "lang/perl5" ++ } else { ++ $ddir =~ s|^$self->{BASEDIR}/||; ++ $ddir =~ s|^\.\.\/\.\.\/||; ++ } if ($ddir) { - push @deps, $ddir; + $found = 0; @@ -160,7 +164,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ } } return @deps; -@@ -109,7 +197,7 @@ sub _getList { +@@ -109,7 +199,7 @@ sub _getList { sub Name { my $self = shift; my $port = shift; @@ -169,7 +173,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ } # Package name -@@ -133,6 +221,13 @@ sub Maintainer { +@@ -133,6 +223,13 @@ sub Maintainer { return $self->_getVariable($port, 'MAINTAINER'); } @@ -183,7 +187,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ # Extract dependencies sub ExtractDepends { my $self = shift; -@@ -189,8 +284,8 @@ sub IgnoreList { +@@ -189,8 +286,8 @@ sub IgnoreList { my $n = 0; $self->_execMake($port); @@ -194,7 +198,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ } return $n eq 0 ? "" : $self->PkgName($port); } -@@ -206,6 +301,17 @@ sub FetchDependsList { +@@ -206,6 +303,17 @@ sub FetchDependsList { return grep { !$uniq{$_}++ } @deps; } @@ -212,7 +216,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ sub ExtractDependsList { my $self = shift; my $port = shift; -@@ -250,6 +356,7 @@ sub BuildDependsList { +@@ -250,6 +358,7 @@ sub BuildDependsList { push(@deps, $self->FetchDepends($port)); push(@deps, $self->BuildDepends($port)); push(@deps, $self->LibDepends($port)); @@ -220,7 +224,7 @@ $NetBSD: patch-aw,v 1.3 2011/11/20 16:20:24 marino Exp $ my %uniq; return grep { !$uniq{$_}++ } @deps; -@@ -263,6 +370,7 @@ sub RunDependsList { +@@ -263,6 +372,7 @@ sub RunDependsList { my @deps; push(@deps, $self->LibDepends($port)); push(@deps, $self->RunDepends($port)); |