Remove pkgtools/tinderbox-dragonfly

This package is no longer in use, and is far behind upstream now.
It is heavily customized so maintenance is far from trivial.  There were
no objections to the announcement of my intentions to remove this package
which I made on package-users@ a month ago.

I feel it is better to retire this package than allow it to bitrot further.
This commit is contained in:
marino 2013-08-15 11:12:05 +00:00
parent 03fa801d06
commit df3b508a34
37 changed files with 1 additions and 4123 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.104 2012/08/26 10:31:39 wiz Exp $
# $NetBSD: Makefile,v 1.105 2013/08/15 11:12:05 marino Exp $
#
COMMENT= Tools for use in the packages collection
@ -62,7 +62,6 @@ SUBDIR+= rdigest
SUBDIR+= revbump
SUBDIR+= rpm2pkg
SUBDIR+= shlock
SUBDIR+= tinderbox-dragonfly
SUBDIR+= url2pkg
SUBDIR+= verifypc
SUBDIR+= x11-links

View file

@ -1,18 +0,0 @@
Tinderbox is a package building system for FreeBSD that has been modified
for use on pkgsrc on DragonFly BSD. Joe Marcus Clarke is the author.
One can define multiple jails (base system versions) and multiple portstrees
(portstree = pkgsrc tree). The combination of jail and portstree is called
a build. A Tinderbox jail is not what is understood as a jail in *BSD, it
is in fact a given world in a chroot. Tinderbox supports automatic tracking
of dependencies and only rebuilds packages that changed since last run.
Tinderbox has support for email notification of failed builds.
Tinderbox is designed to easily provide package sets of needed ports for
specific platforms and architectures. Tinderbox is an excellent tool for
testing new packages and package upgrades, especially for testing
dependencies and packing lists. It is also useful for testing packages on
previous releases of *BSD since it's possible to run a previous release
world inside a jail on a current release host.
Tinderbox/pkgsrc site: http://github.com/jrmarino/pkgsrc-tinderbox

View file

@ -1,59 +0,0 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2011/11/02 21:13:11 marino Exp $
pkgtools/tinderbox is installed, but it requires some additional setup.
If tinderbox just installed a database, you'll have to create a
configuration file for it, and move its startup script from
${PREFIX}/share/examples/rc.d to /etc/rc.d
As mentioned in the README file, this package did not install any web
server even though it may have installed a web interface. Below
describes how to configure some common webservers.
Finally, tinderbox itself has to be configured now, and don't forget
to install tinderd as mentioned above.
****************************************************
Please do read: ${PREFIX}/tinderbox/scripts/README
****************************************************
The following walkthrough is the webserver setup:
- In your Apache configuration add the following lines:
Alias /tb/logs/ "${PREFIX}/tinderbox/logs/"
Alias /tb/packages/ "${PREFIX}/tinderbox/packages/"
Alias /tb/errors/ "${PREFIX}/tinderbox/errors/"
Alias /tb/wrkdirs/ "${PREFIX}/tinderbox/wrkdirs/"
Alias /tb/ "${PREFIX}/tinderbox/scripts/webui/"
<Directory "${PREFIX}/tinderbox/">
Order allow,deny
Allow from all
</Directory>
- In your Lighttpd configuration:
Turn on "mod_alias" and add the following lines:
alias.url = ( "/tb/logs/" => "${PREFIX}/tinderbox/logs/",
"/tb/packages/" => "${PREFIX}/tinderbox/packages/",
"/tb/errors/" => "${PREFIX}/tinderbox/errors/",
"/tb/wrkdirs/" => "${PREFIX}/tinderbox/wrkdirs/",
"/tb/" => "${PREFIX}/tinderbox/scripts/webui/" )
dir-listing.activate = "enable"
- In your Hiawatha configuration:
Alias is a built in command, no need to load any special mod
Alias = /tb/logs:${PREFIX}/tinderbox/logs
Alias = /tb/packages:${PREFIX}/tinderbox/packages
Alias = /tb/errors:${PREFIX}/tinderbox/errors
Alias = /tb/wrkdirs:${PREFIX}/tinderbox/wrkdirs
Alias = /tb/:${PREFIX}/tinderbox/scripts/webui
Check your system by going to http://localhost/tb/
===========================================================================

View file

@ -1,75 +0,0 @@
# $NetBSD: Makefile,v 1.12 2013/05/31 12:41:47 wiz Exp $
#
DISTNAME= tinderbox-dragonfly-${TBOX_VERSION}
PKGREVISION= 7
CATEGORIES= pkgtools
MASTER_SITES= http://tinderbox.marcuscom.com/
DISTFILES= tinderbox-${TBOX_VERSION}.tar.gz
MAINTAINER= draco@marino.st
HOMEPAGE= http://tinderbox.marcuscom.com/
COMMENT= Tinderbox package building system (pkgsrc)
LICENSE= modified-bsd
DEPENDS+= p5-Compress-Bzip2>=2:../../archivers/p5-Compress-Bzip2
DEPENDS+= csup>=20100101:../../net/csup
DEPENDS+= scmgit>1.6:../../devel/scmgit
TBOX_VERSION= 3.4.1
ONLY_FOR_PLATFORM= DragonFly-*-*
USE_TOOLS+= perl perl:run
NO_CONFIGURE= yes
NO_BUILD= yes
RCD_SCRIPTS= tinderd
WRKSRC= ${WRKDIR}/tinderbox-${TBOX_VERSION}
TRASH= ${WRKDIR}/trash
MAN_FILES_cmd= ${SED} -ne "s,^man/man1/,,p" PLIST
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_FILES.paths+= contrib/bulk/bulk_hook_1.sh
SUBST_FILES.paths+= contrib/bulk/bulkbuild.sh
SUBST_SED.paths+= -e 's,@TINROOT@,${PREFIX}/tinderbox,g'
SUBST_STAGE.paths= post-patch
.include "options.mk"
post-extract:
${MKDIR} ${TRASH}
.if empty(PKG_OPTIONS:Mwebui)
mv ${WRKSRC}/webui ${TRASH}
.endif
mv ${WRKSRC}/etc/rc.d ${TRASH}
${MKDIR} ${WRKSRC}/contrib/bulk
for dossier in add_all_packages bulk_hook_1 bulkbuild; do \
${CP} ${FILESDIR}/$${dossier}.sh.in \
${WRKSRC}/contrib/bulk/$${dossier}.sh; \
done
chmod 755 ${WRKSRC}/contrib/bulk/*
post-patch:
.if !empty(PKG_OPTIONS:Manybody)
perl -i -pe 's/^if \[ `id -u` != 0 \]; then/if false; then/' \
${WRKSRC}/tc
.endif
cd ${WRKSRC} && ${FIND} -E . -regex '.*(orig|bak)' -exec ${RM} {} \;
do-install:
for manual in ${MAN_FILES}; do \
${INSTALL_MAN} ${WRKSRC}/man/man1/$${manual} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; \
done
mv ${WRKSRC}/man ${TRASH}
cd ${WRKSRC}; for dossier in .version *; do \
${TEST} ! -f "$$dossier" || \
${CP} "$$dossier" ${DESTDIR}${PREFIX}/tinderbox/scripts; \
${TEST} ! -d "$$dossier" || \
${CP} -R "$$dossier" ${DESTDIR}${PREFIX}/tinderbox/scripts; \
done
.include "../../mk/bsd.pkg.mk"

View file

@ -1,163 +0,0 @@
@comment $NetBSD: PLIST,v 1.3 2011/11/20 16:20:24 marino Exp $
man/man1/tc-configCcache.1
man/man1/tc-configDistfile.1
man/man1/tc-configGet.1
man/man1/tc-configJail.1
man/man1/tc-configTinderd.1
man/man1/tc-init.1
share/examples/rc.d/tinderd
tinderbox/scripts/.version
tinderbox/scripts/README
tinderbox/scripts/ds.ph.dist
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/contrib/bulk/bulkbuild.sh
tinderbox/scripts/contrib/bulk/bulk_hook_1.sh
tinderbox/scripts/etc/env/.keep_me
tinderbox/scripts/lib/Tinderbox/Build.pm
tinderbox/scripts/lib/Tinderbox/BuildPortsQueue.pm
tinderbox/scripts/lib/Tinderbox/Config.pm
tinderbox/scripts/lib/Tinderbox/Hook.pm
tinderbox/scripts/lib/Tinderbox/Jail.pm
tinderbox/scripts/lib/Tinderbox/MakeCache.pm
tinderbox/scripts/lib/Tinderbox/Port.pm
tinderbox/scripts/lib/Tinderbox/PortFailPattern.pm
tinderbox/scripts/lib/Tinderbox/PortFailReason.pm
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
tinderbox/scripts/lib/enterbuild
tinderbox/scripts/lib/makemake
tinderbox/scripts/lib/pnohang.c
tinderbox/scripts/lib/portbuild
tinderbox/scripts/lib/tc_command.pl
tinderbox/scripts/lib/tc_command.sh
tinderbox/scripts/lib/tinderbox.env
tinderbox/scripts/lib/tinderlib.pl
tinderbox/scripts/lib/tinderlib.sh
tinderbox/scripts/sql/genschema
tinderbox/scripts/sql/schema.mysql.post
tinderbox/scripts/sql/schema.mysql.pre
tinderbox/scripts/sql/schema.pgsql.post
tinderbox/scripts/sql/schema.pgsql.pre
tinderbox/scripts/sql/values.config
tinderbox/scripts/sql/values.hooks
tinderbox/scripts/sql/values.lp
tinderbox/scripts/sql/values.pfp
tinderbox/scripts/sql/values.pfr
tinderbox/scripts/tc
tinderbox/scripts/tinderbox.ph.dist
tinderbox/scripts/tinderd
tinderbox/scripts/upgrade/build_ports.map
tinderbox/scripts/upgrade/build_ports_queue.map
tinderbox/scripts/upgrade/builds.map
tinderbox/scripts/upgrade/config.map
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_mysql_tinderbox-3.2.6_to_3.3.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_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/mig_pgsql_tinderbox-3.2.6_to_3.3.sql
tinderbox/scripts/upgrade/order.lst
tinderbox/scripts/upgrade/user_permissions.map
${PLIST.WEBUI}tinderbox/scripts/webui/core/Build.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/BuildGroups.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/BuildPortsQueue.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/Config.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/Hooks.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/Jail.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/LogfilePattern.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/Port.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/PortFailPattern.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/PortFailReason.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/PortsTree.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/TinderObject.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/TinderboxDS.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/User.php
${PLIST.WEBUI}tinderbox/scripts/webui/core/functions.php
${PLIST.WEBUI}tinderbox/scripts/webui/inc_ds.php.dist
${PLIST.WEBUI}tinderbox/scripts/webui/inc_tinderbox.php.dist
${PLIST.WEBUI}tinderbox/scripts/webui/index.php
${PLIST.WEBUI}tinderbox/scripts/webui/favicon.ico
${PLIST.WEBUI}tinderbox/scripts/webui/module/module.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleBuildGroups.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleBuildPorts.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleBuilds.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleConfig.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleLogs.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/modulePortFailureReasons.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/modulePorts.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleRss.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleSession.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleTinderd.php
${PLIST.WEBUI}tinderbox/scripts/webui/module/moduleUsers.php
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/config.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/current_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/describe_port.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/display_login.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/display_build_groups.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/display_markup_log.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/failed_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/latest_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/list_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/list_builds.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/list_failure_reasons.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/list_tinderd_queue.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/messages.inc
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/please_login.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/rss.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/tinderstyle.css
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/tinderstyle.js
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/user_admin.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/user_permissions.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/default/user_properties.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/config.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/current_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/describe_port.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/display_login.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/display_build_groups.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/display_markup_log.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/failed_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/footer.inc.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/header.inc.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/images/hdr_fill.png
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/latest_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/list_buildports.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/list_builds.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/list_failure_reasons.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/list_tinderd_queue.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/messages.inc
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/please_login.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/rss.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/tinderstyle.css
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/tinderstyle.js
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/user_admin.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/user_permissions.tpl
${PLIST.WEBUI}tinderbox/scripts/webui/templates/paefchen/user_properties.tpl

View file

@ -1,29 +0,0 @@
=====================
DRAGONFLY TINDERBOX
=====================
Tinderbox requires a database backend. You must choose either PostgreSQL
and MySQL. Selecting the option will only cause the database to be
installed on the system if it's not already. The actual schema creation
must be done manually per the Tinderbox guide.
The FreeBSD version of Tinderbox allows one to choose between CSUP
(preferred) and CVSUP. The DragonFly version doesn't give you a choice,
CSUP is used automatically.
The Web Interface makes Tinderbox a whole lot more user-friendly. The
option causes PHP to be installed. The user is expected to install the web
server of his choice as a separate exercise and configure it to serve the
directory ${PREFIX}/tinderbox/scripts/webui (usually
/usr/pkg/tinderbox/scripts/webui).
The default configuration of Tinderbox limits execution to the root user.
Setting the "anybody" option to true will remove this restriction.
Setting the "lsof" option will install the "LiSt Open Files" package
(sysutils/lsof) to gain access to the killMountProcesses functionality when
nullfs is used. Nullfs is the default; the user will have to configure NFS
manually if that is preferred for chroots.
NOTE: The lsof package is currently broken on DragonFly, so this option has
been removed from the default list until further notice.

View file

@ -1,30 +0,0 @@
$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) = ba2366ab87a212a82f6cc2464286f02e104932b5
SHA1 (patch-ab) = bead83362c0dbba1b71d11a076efb439fe3ac545
SHA1 (patch-ac) = 7f62eacc4bea13a4fa36f6d84dab8750ca842366
SHA1 (patch-ad) = 12c92ac0aeaf04260151d2e9e305cb6594cc3107
SHA1 (patch-ae) = 57443a64d043d6549f19c99b431ea45ad29ba41e
SHA1 (patch-ai) = a11aa4ca959fe549027371a48d39d6bd88f6c767
SHA1 (patch-aj) = 5a6565b6844f6dbd7bb0dcd5aba74d722ae2e61b
SHA1 (patch-ak) = af511026851a0faa893d461c4de44895d0d04410
SHA1 (patch-al) = 0418a6aacc1ce7071a859bf69e8a29e47b64e197
SHA1 (patch-am) = 26c9b09e99254d6d12e907876e191822ec3354f2
SHA1 (patch-an) = f91e604e1487f99374fc3119475ab775cf8257de
SHA1 (patch-ao) = b8635fa0fb158855a1f20d29f9251e045e2b9357
SHA1 (patch-ap) = 6dc77ea10efb8bdf26f4fc2330f89b70cba8aaab
SHA1 (patch-aq) = 7cc9e2f723d192038d196da94fdfd8c569559458
SHA1 (patch-ar) = 7cdf8aa5c0e0b44c9a1b4e7b878d616c251e62d9
SHA1 (patch-as) = 4406f887e23b31bc2e1f2e8a55476125ee1bce8a
SHA1 (patch-at) = f46d54fab4f94e0b6778d26ac84ce933f734c6d5
SHA1 (patch-au) = 27e654af19184d3a5a9028442b80556417bd45c8
SHA1 (patch-av) = 806b9d4538f13d54b023b9630b74f3b859a65f67
SHA1 (patch-aw) = 3a7b9bb52942ad99055b9ab914aac74622355872
SHA1 (patch-az) = 91526a66f47d53357703b2739c1384d4012e7c6c
SHA1 (patch-ba) = 636adea0d3fb22132e2a6d81fd016a9560017aca
SHA1 (patch-bb) = 7a007428deeea2f243cebcc84a42e0c5fbebc9a7
SHA1 (patch-bc) = 4d85687520e2c0d3bd6ab03c4ba9dc3f6ad6c98c
SHA1 (patch-be) = f5e0e9a00de8d1f8b16d36f7cbe23ecc3daee47d

View file

@ -1,52 +0,0 @@
#!/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
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

View file

@ -1,41 +0,0 @@
#/bin/sh
#
# Bulk Build, PostPortBuild Hook
# When executed, this hook will remove the built port from the
# ${BULKTMP}/bulk_${BUILD}.queue. If the built port matches
# the ${BULKTMP}/bulk_${BUILD}.active file, then the nextport
# on the bulk build will be added to the queue.
#
PB=@TINROOT@
BULKTMP=/tmp
if [ -z "{BUILD}" ]; then
echo "BUILD envvar not defined."
exit
fi
if [ -z "{PORTDIR}" ]; then
echo "PORTDIR envvar not defined."
exit
fi
echo "${PORTDIR} (${PACKAGE_NAME}: ${STATUS})" >> ${BULKTMP}/bulk_${BUILD}.processed
QLIST=`${PB}/scripts/tc listBuildPortsQueue -b ${BUILD} | grep " ${PORTDIR} "`
if [ -n "${QLIST}" ]; then
${PB}/scripts/tc rmBuildPortsQueueEntry -b ${BUILD} -d ${PORTDIR}
fi
SPORTDIR=`echo ${PORTDIR} | sed "s|/|\\\\\\/|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`
if [ "${ACTIVEPORT}" = "${PORTDIR}" ]; then
rm ${BULKTMP}/bulk_${BUILD}.active
${PB}/scripts/contrib/bulk/bulkbuild.sh nextport ${BUILD}
fi
fi

View file

@ -1,97 +0,0 @@
#!/bin/sh
#
# Accepts the command ($1) and the build ($2)
# The command must be "kickoff", "nextport", or "stop"
# The kickoff option will:
# - delete ${BULKTMP}/bulk_${BUILD}.active
# - delete ${BULKTMP}/bulk_${BUILD}.processed
# - delete ${BULKTMP}/bulk_${BUILD}.requested
# - create or recreate ${BULKTMP}/bulk_${BUILD}.queue
# - execute "nextport" option
# The nextport option is called only if kickoff was stopped before.
# If there is no ${BULKTMP}/build_${BUILD}.active file, it will create one
# with the top line of the queue file, and add that port to tinderbox queue.
# The stop option will delete the ${BULKTMP}/build_${BUILD}.active file which
# will prevent additional ports from being added to the queue. The
# previously added port will continue to build along with all it's
# dependencies though.
#
PB=@TINROOT@
BULKTMP=/tmp
exitusage()
{
echo "Usage: buildbuild.sh <kickoff|stop|nextport> <build>"
exit
}
buildNF()
{
echo "The build '${1}' was not found in the database."
exit
}
portstreeNF()
{
echo "The portstree was not found. It was expected to be here:"
echo "${PB}/portstrees/${1}"
exit
}
option_stop()
{
rm -f ${BULKTMP}/bulk_${1}.active
}
option_nextport()
{
if [ -f ${BULKTMP}/bulk_${1}.active ]; then
echo "There is an active bulk build in work right now, command ignored."
exit
fi
NEXTPORT=`head -n 1 ${BULKTMP}/bulk_${1}.queue`
echo ${NEXTPORT} > ${BULKTMP}/bulk_${1}.active
echo ${NEXTPORT} >> ${BULKTMP}/bulk_${1}.requested
${PB}/scripts/tc addBuildPortsQueueEntry -b ${1} -d ${NEXTPORT} -p 9
}
option_kickoff()
{
rm -f ${BULKTMP}/bulk_${1}.active
rm -f ${BULKTMP}/bulk_${1}.processed
rm -f ${BULKTMP}/bulk_${1}.requested
cd ${PB}/portstrees/${2}/pkgsrc
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}
}
[ $# -ne 2 ] && exitusage;
BUILD=`${PB}/scripts/tc listBuilds | grep ^$2\$`
[ -z "${BUILD}" ] && buildNF $2;
PTREE=`${PB}/scripts/tc getPortsTreeForBuild -b $2`
[ ! -d ${PB}/portstrees/${PTREE} ] && portstreeNF ${PTREE};
case "$1" in
'kickoff')
option_kickoff ${BUILD} ${PTREE}
;;
'stop')
option_stop ${BUILD}
;;
'nextport')
option_nextport ${BUILD}
;;
*)
exitusage
;;
esac

View file

@ -1,41 +0,0 @@
#!/bin/sh
#
# $MCom: portstools/tinderbox/etc/rc.d/tinderd,v 1.7.2.2 2011/05/23 15:05:31 marcus Exp $
#
# PROVIDE: tinderd
# REQUIRE: LOGIN mysqld pgsql
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable `tinderd':
#
#tinderd_enable="YES"
#
. /etc/rc.subr
name="tinderd"
rcvar=`set_rcvar`
# read settings, set default values
load_rc_config "${name}"
: ${tinderd_enable="NO"}
: ${tinderd_directory="/usr/pkg/tinderbox/scripts"}
: ${tinderd_flags=""}
: ${tinderd_debug="NO"}
# path to your executable, might be libexec, bin, sbin, ...
command="${tinderd_directory}/tinderd"
# needed when your daemon is a shell script
command_interpreter="/bin/sh"
# extra required arguments
if checkyesno tinderd_debug
then
command_args=" &"
else
command_args=">/dev/null 2>&1 &"
fi
run_rc_command "$1"

View file

@ -1,62 +0,0 @@
# $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
PKG_SUGGESTED_OPTIONS= pgsql webui
PLIST_VARS+= WEBUI
.include "../../mk/bsd.options.mk"
########################################
# WEB INTERFACE AND DATABASE OPTIONS #
########################################
.if empty(PKG_OPTIONS:Mpgsql) && empty(PKG_OPTIONS:Mmysql)
PKG_FAIL_REASON+= "Tinderbox requires a database, so select pgsql or mysql option."
.endif
.if !empty(PKG_OPTIONS:Mpgsql)
.include "../../mk/pgsql.buildlink3.mk"
.endif
.if !empty(PKG_OPTIONS:Mmysql)
.include "../../mk/mysql.buildlink3.mk"
.endif
.if !empty(PKG_OPTIONS:Mwebui)
PLIST.WEBUI= yes
.include "../../lang/php/phpversion.mk"
.endif
.if !empty(PKG_OPTIONS:Mpgsql)
DEPENDS+= p5-DBD-postgresql>=2.12:../../databases/p5-DBD-postgresql
.if !empty(PKG_OPTIONS:Mwebui)
DEPENDS+= ${PHP_PKG_PREFIX}-pear-MDB2_Driver_pgsql-[0-9]*:../../databases/pear-MDB2_Driver_pgsql
DEPENDS+= ${PHP_PKG_PREFIX}-pgsql>=5.1:../../databases/php-pgsql
.endif
.endif
.if !empty(PKG_OPTIONS:Mmysql)
DEPENDS+= p5-DBD-mysql>=4:../../databases/p5-DBD-mysql
.if !empty(PKG_OPTIONS:Mwebui)
DEPENDS+= ${PHP_PKG_PREFIX}-pear-MDB2_Driver_mysql>1.5:../../databases/pear-MDB2_Driver_mysql
DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=5.1:../../databases/php-mysql
.endif
.endif
#####################
# LIST OPEN FILES #
#####################
.if !empty(PKG_OPTIONS:Mlsof)
DEPENDS+= lsof>=4.83:../../sysutils/lsof
PKG_FAIL_REASON+= "LSOF package is broken for DragonFly, remove the option for now."
.endif
#########################
# EMAIL NOTIFICATIONS #
#########################
.if !empty(PKG_OPTIONS:Memailer)
DEPENDS+= p5-Net>=1.21:../../net/p5-Net
.endif

View file

@ -1,990 +0,0 @@
$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
@@ -27,21 +27,46 @@
# $MCom: portstools/tinderbox/lib/tc_command.sh,v 1.101.2.48 2011/11/15 07:04:35 marcus Exp $
#
-export _defaultUpdateHost="cvsup18.FreeBSD.org"
+export _defaultUpdateHost="cvsup.netbsd.se"
export _defaultUpdateType="CSUP"
+export _defaultDragonHost="http://mirror.physik-pool.tu-berlin.de/DragonFlyBSD/dflysnap"
+export _defaultDragonType="RELEASE"
+export _defaultGitSrcHost="koan.bondconsult.net"
#---------------------------------------------------------------------------
# Generic routines
#---------------------------------------------------------------------------
+commandTreeChecks () {
+ JT_updateCmd=${1}
+ JT_name=${2}
+ JT_mechanism=${3}
+
+ if [ ! -x "${JT_updateCmd}" ]; then
+ echo "ERROR: ${JT_name} ${JT_mechanism}: ${JT_updateCmd} missing"
+ return 1
+ fi
+
+ if [ -d ${treeDir} ]; then
+ echo "${JT_name}: cleaning out old directories"
+ cleanDirs ${JT_name} ${treeDir}
+ fi
+
+ if [ ! -d ${treeDir} ]; then
+ echo "${JT_name}: creating top-level directory"
+ mkdir -p ${treeDir} >/dev/null 2>&1
+ fi
+ return 0
+}
+
generateUpdateCode () {
case ${1} in
"jail") treeDir=$(tinderLoc jail ${2})
- updateCollection="src-all"
+ updateCollection="not-applicable"
;;
"portstree") treeDir=$(tinderLoc portstree ${2})
- updateCollection="ports-all"
+ updateCollection="netbsd-pkgsrc"
;;
*) echo "ERROR: ${1} ${2}: unknown tree type"
@@ -64,84 +89,89 @@ generateUpdateCode () {
fi
;;
- "LFTP")
- if [ -z "${5}" -o "${5}" = "UNUSED" ]; then
- echo "ERROR: ${1} ${2}: no tag specified for ${3}"
+ "RELEASE") # ONLY USED FOR DRAGONFLY ISO RETRIEVAL (JAILS)
+ updateArch=$(uname -p)
+ if [ -z "${5}" -o "${5}" = "UNUSED" ]; then
+ echo "ERROR: ${1} ${2}: no release number specified for ${3} (e.g. 2.10.1)"
exit 1
fi
- updateArch="${7}"
- if [ -z "${updateArch}" ]; then
- updateArch=$(uname -p)
- fi
-
- updateCmd="/usr/local/bin/lftp"
+ updateCmd=/usr/bin/fetch
+ iso_image="dfly-${updateArch}-${5}_REL.iso.bz2"
+ iso_server=${4}
- if [ ! -x "${updateCmd}" ]; then
- echo "ERROR: ${2} ${3}: ${updateCmd} missing"
+ commandTreeChecks ${updateCmd} ${2} ${3}
+ if [ "$?" -eq "1" ]; then
exit 1
fi
- if [ -d ${treeDir} ]; then
- echo "${2}: cleaning out old directories"
- cleanDirs ${2} ${treeDir}
- fi
- if [ ! -d ${treeDir} ]; then
- echo "${2}: creating top-level directory"
- mkdir -p ${treeDir} >/dev/null 2>&1
- fi
-
( echo "#!/bin/sh"
+ echo "if [ -d ${treeDir}/obj ]; then"
+ echo " echo Jail ${2} cannot be updated!"
+ echo " echo It was created from an official release ISO"
+ echo " exit 1"
+ echo "fi"
echo "mkdir -p ${treeDir}/sets"
echo "cd ${treeDir}/sets"
- echo "${updateCmd} -c \"open ftp://${4}/pub/FreeBSD/releases/${updateArch}/${5}/; mirror base\""
- echo "${updateCmd} -c \"open ftp://${4}/pub/FreeBSD/releases/${updateArch}/${5}/; mirror dict\""
- if [ "${updateArch}" = "amd64" ]; then
- echo "${updateCmd} -c \"open ftp://${4}/pub/FreeBSD/releases/${updateArch}/${5}/; mirror lib32\""
- fi
- echo "${updateCmd} -c \"open ftp://${4}/pub/FreeBSD/releases/${updateArch}/${5}/; mirror proflibs\""
- echo "${updateCmd} -c \"open ftp://${4}/pub/FreeBSD/releases/${updateArch}/${5}/; mirror src\""
- echo "cd src"
- echo "sed -i \"\" 's|usr/src|src|' install.sh"
- echo "export DESTDIR=${treeDir}"
- echo "mkdir ${treeDir}/src"
- echo "yes | sh ./install.sh all"
+ echo "echo \"SERVER: ${iso_server}/iso-images\""
+ echo "echo \" IMAGE: ${iso_image}\""
+ echo "${updateCmd} ${iso_server}/iso-images/${iso_image}"
+ echo "mkdir -p ../tmp ../obj"
+ echo "echo \"Initial physical jail setup complete.\""
) > ${treeDir}/update.sh
chmod +x ${treeDir}/update.sh
;;
- "CVSUP"|"CSUP")
- if [ -z "${5}" -o "${5}" = "UNUSED" ]; then
- echo "ERROR: ${1} ${2}: no tag specified for ${3}"
- exit 1
- fi
-
- updateCmd=""
- if [ "${3}" = "CVSUP" ]; then
- updateCmd="/usr/local/bin/cvsup"
- elif [ "${3}" = "CSUP" ]; then
- if [ -x /usr/bin/csup ]; then
- updateCmd="/usr/bin/csup"
+ "SNAPSHOT") # ONLY USED FOR DRAGONFLY SNAPSHOT RETRIEVAL (JAILS)
+ updateArch=$(uname -p)
+ if [ "${5}" = "LATEST" ]; then
+ iso_image="DragonFly-${updateArch}-LATEST-ISO.iso.bz2"
+ else
+ namechk=`echo ${5} | awk '/^20[12][0-9][01][0-9][0-3][0-9]-DEV-v[2-9]\.[0-9][0-9]?\.[0-9]\.[0-9][0-9]?[0-9]?[0-9]?\.g[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?$/'`
+ if [ -n "${namechk}" ]; then
+ iso_image="images/DragonFly-${updateArch}-${5}.iso.bz2"
else
- updateCmd="/usr/local/bin/csup"
+ echo "ERROR: ${1} ${2}: tag for ${3} must either equal 'LATEST' or "
+ echo "it must be in the format YYYYMMDD-DEV-va.b.c.d.gxxxxxx"
+ exit 1
fi
fi
- if [ -z "${updateCmd}" ]; then
- echo "ERROR: ${2}: unable to determine updateCmd for ${3}"
+
+ updateCmd=/usr/bin/fetch
+ iso_server=${4}
+
+ commandTreeChecks ${updateCmd} ${2} ${3}
+ if [ "$?" -eq "1" ]; then
exit 1
fi
- if [ ! -x "${updateCmd}" ]; then
- echo "ERROR: ${2} ${3}: ${updateCmd} missing"
+
+ ( echo "#!/bin/sh"
+ echo "if [ -d ${treeDir}/obj ]; then"
+ echo " echo Jail ${2} cannot be updated!"
+ echo " echo It was created from a daily snapshot ISO"
+ echo " exit 1"
+ echo "fi"
+ echo "mkdir -p ${treeDir}/sets"
+ echo "cd ${treeDir}/sets"
+ echo "echo \"SERVER: ${iso_server}/snapshots/${updateArch}\""
+ echo "echo \" IMAGE: ${iso_image}\""
+ echo "${updateCmd} ${iso_server}/snapshots/${updateArch}/${iso_image}"
+ echo "mkdir -p ../tmp ../obj"
+ echo "echo \"Initial physical jail setup complete.\""
+ ) > ${treeDir}/update.sh
+ chmod +x ${treeDir}/update.sh
+ ;;
+
+ "CSUP") # ONLY USED FOR PKGSRC UPDATES FROM NETBSD (PORTSTREES)
+ if [ -z "${5}" -o "${5}" = "UNUSED" ]; then
+ echo "ERROR: ${1} ${2}: no tag specified for ${3}"
exit 1
fi
- if [ -d ${treeDir} ]; then
- echo "${2}: cleaning out old directories"
- cleanDirs ${2} ${treeDir}
- fi
- if [ ! -d ${treeDir} ]; then
- echo "${2}: creating top-level directory"
- mkdir -p ${treeDir} >/dev/null 2>&1
+ updateCmd=/usr/pkg/bin/csup
+ commandTreeChecks ${updateCmd} ${2} ${3}
+ if [ "$?" -eq "1" ]; then
+ exit 1
fi
( echo "*default host=${4}"
@@ -159,49 +189,42 @@ generateUpdateCode () {
) > ${treeDir}/update.sh
chmod +x ${treeDir}/update.sh
;;
- "SVN")
- if [ -z "${8}" ]; then
- echo "ERROR: ${1} ${2}: no protocol specified for ${3}"
- exit 1
- fi
- if [ -z "${9}" ]; then
- echo "ERROR: ${1} ${2}: no host directory specified for ${3}"
+ "GIT") # ONLY USED FOR RETREIVING DRAGONFLY SOURCE FOR BUILDING JAIL
+ if [ -z "${5}" -o "${5}" = "UNUSED" ]; then
+ echo "ERROR: ${1} ${2}: no git branch specified for ${3}"
exit 1
fi
- updateCmd="/usr/local/bin/svn"
-
- if [ ! -x "${updateCmd}" ]; then
- echo "ERROR: ${2} ${3}: ${updateCmd} missing"
+ updateCmd=/usr/pkg/bin/git
+ commandTreeChecks ${updateCmd} ${2} ${3}
+ if [ "$?" -eq "1" ]; then
exit 1
fi
- if [ -d ${treeDir} ]; then
- echo "${2}: cleaning out old directories"
- cleanDirs ${2} ${treeDir}
- fi
-
- if [ ! -d ${treeDir} ]; then
- echo "${2}: creating top-level directory"
- mkdir -p ${treeDir} >/dev/null 2>&1
- fi
-
- case ${1} in
- "jail") treeSubDir="src"
- ;;
- "portstree") treeSubDir="ports"
- ;;
- esac
-
( echo "#!/bin/sh"
- echo "cd ${treeDir}"
- echo "if [ ! -d ${treeDir}/${treeSubDir} ]; then"
- echo "${updateCmd} co ${8}://${4}/${9} ${treeSubDir}"
+ echo "echo 'SERVER: ${4}'"
+ echo "echo 'BRANCH: ${5}'"
+ echo "if [ -d ${treeDir}/src ]; then"
+ echo " cd ${treeDir}/src"
echo "else"
- echo "cd ${treeDir}/${treeSubDir}"
- echo "${updateCmd} up"
+ echo " echo 'Creating shallow source repository.'"
+ echo " mkdir ${treeDir}/src"
+ echo " cd ${treeDir}/src"
+ echo " mkdir ../tmp ../obj"
+ echo " ${updateCmd} init"
+ echo " ${updateCmd} remote add origin git://${4}/dragonfly.git"
+ echo " ${updateCmd} fetch --depth=1 origin"
+ echo " ${updateCmd} branch master origin/master"
+ echo " echo 'Repository creation complete.'"
+ echo "fi"
+ echo "BRANCH=\`${updateCmd} branch | /usr/bin/grep -w ${5}\`"
+ echo "if [ \"\${BRANCH}\" = \"\" ]; then"
+ echo " ${updateCmd} branch ${5} origin/${5}"
echo "fi"
+ echo "echo 'Ready to pull updates from branch.'"
+ echo "${updateCmd} checkout ${5}"
+ echo "${updateCmd} pull"
) > ${treeDir}/update.sh
chmod +x ${treeDir}/update.sh
;;
@@ -223,6 +246,15 @@ setupDefaults () {
if [ -z "${defaultUpdateType}" ]; then
export defaultUpdateType=${_defaultUpdateType}
fi
+ if [ -z "${defaultDragonHost}" ]; then
+ export defaultDragonHost=${_defaultDragonHost}
+ fi
+ if [ -z "${defaultDragonfType}" ]; then
+ export defaultDragonType=${_defaultDragonType}
+ fi
+ if [ -z "${defaultGitSrcHost}" ]; then
+ export defaultGitSrcHost=${_defaultGitSrcHost}
+ fi
}
tcExists () {
@@ -257,16 +289,21 @@ updateTree () {
echo "${name}: updating ${what} with ${updateCmd}"
+ logpipe=/tmp/tbox_logpipe
+ mkfifo ${logpipe}
+ tee ${dir}/update.log < ${logpipe} &
if [ "${updateCmd}" = "USER" ]; then
- eval ${dir}/update.sh ${name} > ${dir}/update.log 2>&1
+ ${dir}/update.sh ${name} > ${logpipe}
else
- eval ${dir}/update.sh > ${dir}/update.log 2>&1
+ ${dir}/update.sh > ${logpipe}
fi
if [ $? -ne 0 ]; then
+ rm ${logpipe}
echo "updateTree: ${what} ${name}: update failed"
echo " see ${dir}/update.log for more details"
return 1
fi
+ rm ${logpipe}
}
#---------------------------------------------------------------------------
@@ -274,8 +311,8 @@ updateTree () {
#---------------------------------------------------------------------------
Setup () {
- MAN_PREREQS="lang/perl5.[81]*"
- OPT_PREREQS="lang/php[45] databases/pear-MDB2 www/php[45]-session archivers/p5-Compress-Bzip2"
+ MAN_PREREQS="perl"
+ OPT_PREREQS="php php*-pear-MDB2 p5-Compress-Bzip2"
PREF_FILES="tinderbox.ph"
README="$(tinderLoc scripts README)"
TINDERBOX_URL="http://tinderbox.marcuscom.com/"
@@ -555,7 +592,7 @@ Upgrade () {
for jail in ${jails}; do
f=$(tinderLoc jail ${jail})
ucmd=$(${tc} getUpdateCmd -j ${jail} 2>/dev/null)
- if [ x"${ucmd}" != x"CVSUP" -a x"${ucmd}" != x"CSUP" -a x"${ucmd}" != x"NONE" ]; then
+ if [ x"${ucmd}" != x"CSUP" -a x"${ucmd}" != x"NONE" ]; then
if [ -f "${ucmd}" ]; then
mv -f "${ucmd}" "${f}/update.sh"
chmod +x "${f}/update.sh"
@@ -570,11 +607,8 @@ Upgrade () {
tinderEcho "WARN: You must manually set the update command for ${jail} to \"USER\" using the query ${query}."
fi
fi
- elif [ x"${ucmd}" = x"CVSUP" -o x"${ucmd}" = x"CSUP" ]; then
- updateCmd="/usr/bin/csup"
- if [ x"${ucmd}" = x"CVSUP" ]; then
- updateCmd="/usr/local/bin/cvsup"
- fi
+ elif [ x"${ucmd}" = x"CSUP" ]; then
+ updateCmd="/usr/pkg/bin/csup"
( echo "#!/bin/sh"
echo "${updateCmd} ${f}/supfile"
) > ${f}/update.sh
@@ -588,7 +622,7 @@ Upgrade () {
for portstree in ${portstrees}; do
f=$(tinderLoc portstree ${portstree})
ucmd=$(${tc} getUpdateCmd -p ${portstree} 2>/dev/null)
- if [ x"${ucmd}" != x"CVSUP" -a x"${ucmd}" != x"CSUP" -a x"${ucmd}" != x"NONE" ]; then
+ if [ x"${ucmd}" != x"CSUP" -a x"${ucmd}" != x"NONE" ]; then
if [ -f "${ucmd}" ]; then
mv -f "${ucmd}" "${f}/update.sh"
chmod +x "${f}/update.sh"
@@ -603,17 +637,14 @@ Upgrade () {
tinderEcho "WARN: You must manually set the update command for ${portstree} to \"USER\" using the query ${query}."
fi
fi
- elif [ x"${ucmd}" = x"CVSUP" -o x"${ucmd}" = "CSUP" ]; then
- updateCmd="/usr/bin/csup"
- if [ x"${ucmd}" = x"CVSUP" ]; then
- updateCmd="/usr/local/bin/cvsup"
- fi
+ elif [ x"${ucmd}" = "CSUP" ]; then
+ updateCmd="/usr/pkg/bin/csup"
( echo "#!/bin/sh"
echo "${updateCmd} ${f}/supfile"
) > ${f}/update.sh
chmod +x ${f}/update.sh
- if [ -f "${f}/ports-supfile" ]; then
- mv -f "${f}/ports-supfile" "${f}/supfile"
+ if [ -f "${f}/pkgsrc-supfile" ]; then
+ mv -f "${f}/pkgsrc-supfile" "${f}/supfile"
fi
fi
done
@@ -787,38 +818,55 @@ buildJail () {
return 1
fi
- if [ "${updateCmd}" = "LFTP" ]; then
- export DESTDIR=${J_TMPDIR}
- cd ${jailBase}/sets/base && yes | sh ./install.sh > ${jailBase}/world.tmp 2>&1
+ if [ "${updateCmd}" = "RELEASE" -o "${updateCmd}" = "SNAPSHOT" ]; then
+ iso_image=`ls ${jailBase}/sets`
+ /usr/bin/tar -xf ${jailBase}/sets/${iso_image} -C ${J_TMPDIR} > ${jailBase}/world.tmp 2>&1
rc=$?
- if [ ${rc} -eq 0 -a -d "${jailBase}/sets/lib32" ]; then
- cd ${jailBase}/sets/lib32 && yes | sh ./install.sh >> ${jailBase}/world.tmp 2>&1
- rc=$?
+ if [ ${rc} -ne 0 ]; then
+ echo "ERROR: extract world failed - see ${jailBase}/world.tmp"
+ buildJailCleanup 1 ${jailName} ${J_SRCDIR}
+ return 1
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*//'`
+ if [ `expr $MINOR % 2` -eq 0 ]; then
+ fakebranch="BRANCH=\"RELEASE_${MAJOR}_${MINOR}\""
+ else
+ fakebranch="BRANCH=\"DEVELOPMENT_${MAJOR}_${MINOR}\""
+ 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
+ rm -rf ${J_TMPDIR}/usr/src
+ cp -R ${jailBase}/src ${J_TMPDIR}/usr
+ mkdir ${J_TMPDIR}/usr/4bootstrap
+ mv ${J_TMPDIR}/usr/pkg/bin/bmake ${J_TMPDIR}/usr/4bootstrap
+ mv ${J_TMPDIR}/usr/pkg/etc/mk.conf ${J_TMPDIR}/usr/4bootstrap
+ mv ${J_TMPDIR}/usr/pkg/share/mk ${J_TMPDIR}/usr/4bootstrap
+ mv ${J_TMPDIR}/usr/pkg/sbin/pkg_* ${J_TMPDIR}/usr/4bootstrap
+ rm -rf ${J_TMPDIR}/usr/pkg ${J_TMPDIR}/usr/src-sys.tar.bz2
+ rm -rf ${J_TMPDIR}/var/db/pkg
execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}"
- if [ ${rc} -ne 0 ]; then
- echo "ERROR: world failed - see ${jailBase}/world.tmp"
+ if [ $? -ne 0 ]; then
+ echo "buildJail: Terminating Jail build since hook postJailBuild failed."
buildJailCleanup 1 ${jailName} ${J_SRCDIR}
+ return 1
fi
else
# Make world
echo "${jailName}: making world"
- # determine if we're cross-building world
- crossEnv=""
- if [ "${jailArch}" != "${myArch}" ]; then
- crossEnv="TARGET_ARCH=${jailArch}"
- fi
-
ncpus=$(/sbin/sysctl hw.ncpu | awk '{print $2}')
- factor=$(echo "$ncpus*2+1" | /usr/bin/bc -q)
+ factor=$(echo "$ncpus*2+1" | /usr/bin/bc)
if [ -n "${NO_JAIL_JOBS}" ]; then
factor=1
fi
- cd ${SRCBASE} && env DESTDIR=${J_TMPDIR} ${crossEnv} \
- make -j${factor} -DNO_CLEAN world > ${jailBase}/world.tmp 2>&1
+ cd ${SRCBASE} && env DESTDIR=${J_TMPDIR} \
+ make -DNO_GCC41 -DNO_GAMES -DNOPROFILE -j${factor} world \
+ > ${jailBase}/world.tmp 2>&1
rc=$?
execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}"
if [ ${rc} -ne 0 ]; then
@@ -829,21 +877,91 @@ buildJail () {
# Make a complete distribution
echo "${jailName}: making distribution"
- # determine if we're cross-building world
- crossEnv=""
- if [ "${jailArch}" != "${myArch}" ]; then
- crossEnv="TARGET_ARCH=${jailArch}"
- fi
- cd ${SRCBASE} && env DESTDIR=${J_TMPDIR} ${crossEnv} \
- make distribution > ${jailBase}/distribution.tmp 2>&1
+ cd ${SRCBASE}/etc && env DESTDIR=${J_TMPDIR} \
+ make -m ${J_TMPDIR}/usr/share/mk distribution > ${jailBase}/distribution.tmp 2>&1
if [ $? -ne 0 ]; then
echo "ERROR: distribution failed - see ${jailBase}/distribution.tmp"
buildJailCleanup 1 ${jailName} ${J_SRCDIR}
+ return 1
+ fi
+
+ # Make upgrade required to link device drivers (e.g. <dev/video/...)
+ echo "${jailName}: making world upgrade"
+
+ cd ${SRCBASE} && env DESTDIR=${J_TMPDIR} \
+ make upgrade > ${jailBase}/upgrade.tmp 2>&1
+ if [ $? -ne 0 ]; then
+ echo "ERROR: world upgrade failed - see ${jailBase}/upgrade.tmp"
+ buildJailCleanup 1 ${jailName} ${J_SRCDIR}
+ return 1
fi
+
+ # Bootstrap pkgsrc tools using host machine's pkgsrc for source files
+ echo "${jailName}: bootstrapping pkgsrc basic tools"
+
+ CYCLE="devel/bmake \
+ sysutils/install-sh \
+ pkgtools/bootstrap-mk-files \
+ pkgtools/libnbcompat \
+ pkgtools/pkg_install \
+ archivers/bzip2 \
+ archivers/libarchive \
+ security/openssl \
+ net/libfetch \
+ devel/zlib \
+ bootstrap \
+ mk"
+
+ PBS=/usr/pkgsrcbs
+ WKZONE=${J_TMPDIR}${PBS}
+ mkdir ${WKZONE}
+ for component in ${CYCLE}; do
+ mkdir -p ${WKZONE}/${component}
+ dossiers=`ls -A /usr/pkgsrc/${component} | grep -vE '^(README|work$)'`
+ for dossier in ${dossiers}; do
+ cp -R /usr/pkgsrc/${component}/${dossier} ${WKZONE}/${component}
+ done
+ done
+
+ mount_devfs ${J_TMPDIR}/dev
+ chroot ${J_TMPDIR} ${PBS}/bootstrap/bootstrap --prefix=/usr/pkg \
+ --workdir=${PBS}/work > ${jailBase}/pkgsrc.tmp 2>&1
+
+ if [ $? -ne 0 ]; then
+ umount ${J_TMPDIR}/dev
+ echo "ERROR: pkgsrc bootstrap failed - see ${jailBase}/pkgsrc.tmp"
+ buildJailCleanup 1 ${jailName} ${J_SRCDIR}
+ return 1
+ fi
+ umount ${J_TMPDIR}/dev
+
+ mkdir ${J_TMPDIR}/usr/4bootstrap
+
+ # Create appropriate mk.conf, same as ISO version
+ ( echo ".ifdef BSD_PKG_MK # begin pkgsrc settings"
+ echo "PKG_DBDIR= /var/db/pkg"
+ echo "LOCALBASE= /usr/pkg"
+ echo "VARBASE= /var"
+ echo "PKG_TOOLS_BIN= /usr/pkg/sbin"
+ echo "PKGMANDIR= man"
+ echo "FETCH_CMD= /usr/bin/ftp"
+ echo ".endif # end pkgsrc settings"
+ ) > ${J_TMPDIR}/usr/4bootstrap/mk.conf
+
+ mv ${J_TMPDIR}/usr/pkg/bin/bmake ${J_TMPDIR}/usr/4bootstrap
+ mv ${J_TMPDIR}/usr/pkg/share/mk ${J_TMPDIR}/usr/4bootstrap
+ mv ${J_TMPDIR}/usr/pkg/sbin/pkg_* ${J_TMPDIR}/usr/4bootstrap
+ rm -rf ${J_TMPDIR}/usr/pkg ${J_TMPDIR}/var/db/pkg ${WKZONE}
+
+ execute_hook "postJailBuild" "JAIL=${jailName} DESTDIR=${J_TMPDIR} JAIL_ARCH=${jailArch} MY_ARCH=${myArch} JAIL_OBJDIR=${JAIL_OBJDIR} SRCBASE=${SRCBASE} PB=${pb} RC=${rc}"
+ if [ $? -ne 0 ]; then
+ echo "buildJail: Terminating Jail build since hook postJailBuild failed."
+ buildJailCleanup 1 ${jailName} ${J_SRCDIR}
+ return 1
+ fi
fi
# Various hacks to keep the ports building environment happy
- touch -f ${J_TMPDIR}/etc/fstab
MTREE_DIR=${SRCBASE}/etc/mtree
mtree -deU -f ${MTREE_DIR}/BSD.root.dist \
@@ -855,11 +973,8 @@ buildJail () {
mtree -deU -f ${MTREE_DIR}/BSD.local.dist \
-p ${J_TMPDIR}/usr/local >/dev/null 2>&1
- date '+%Y%m%d' > ${J_TMPDIR}/var/db/port.mkversion
mkdir -p ${J_TMPDIR}/var/run
- rm -f ${J_TMPDIR}/usr/lib/aout/lib*_p.a
-
# Create the jail tarball
echo "${jailName}: creating tarball"
jailDir=$(tinderLoc jail ${jailName})
@@ -873,7 +988,7 @@ buildJail () {
fi
# Move new logfiles into place
- for logfile in world distribution
+ for logfile in world distribution pkgsrc upgrade
do
rm -f ${jailBase}/${logfile}.log
mv -f ${jailBase}/${logfile}.tmp ${jailBase}/${logfile}.log 2>/dev/null
@@ -927,29 +1042,25 @@ createJail () {
jailArch=$(uname -m)
mountSrc=""
init=1
- protocol=""
- updateHostDirectory=""
setupDefaults
- updateHost=${defaultUpdateHost}
- updateType=${defaultUpdateType}
+ updateHostISO=${defaultDragonHost}
+ updateHostSRC=${defaultGitSrcHost}
+ updateType=${defaultDragonType}
# argument handling
- while getopts a:d:j:m:t:u:CD:H:IP: arg >/dev/null 2>&1
+ while getopts d:j:m:t:u:H:I arg >/dev/null 2>&1
do
case "${arg}" in
- a) jailArch="${OPTARG}";;
d) descr="${OPTARG}";;
j) jailName="${OPTARG}";;
m) mountSrc="${OPTARG}";;
t) updateTag="${OPTARG}";;
u) updateType="${OPTARG}";;
- C) updateCompress=1;;
- D) updateHostDirectory="${OPTARG}";;
- H) updateHost="${OPTARG}";;
+ H) updateHostISO="${OPTARG}"
+ updateHostSRC="${OPTTAG}";;
I) init=0;;
- P) protocol="${OPTARG}";;
?) return 1;;
esac
@@ -963,7 +1074,7 @@ createJail () {
valid=$(echo ${jailName} | awk '{if (/^[[:digit:]]/) {print;}}')
if [ -z "${valid}" ]; then
- echo "createJail: jail name must begin with a FreeBSD major version"
+ echo "createJail: jail name must begin with a DragonFly BSD major version"
return 1
fi
@@ -977,10 +1088,20 @@ createJail () {
return 1
fi
+ if [ "${updateType}" = "CSUP" ]; then
+ echo "createJail: CSUP type cannot be used for DragonFly sources"
+ return 1
+ fi
+
+ updateHost=${updateHostISO}
+ if [ "${updateType}" = "GIT" ]; then
+ updateHost=${updateHostSRC}
+ fi
+
+
echo "${jailName}: initializing tree"
generateUpdateCode jail ${jailName} ${updateType} ${updateHost} \
- ${updateTag} ${updateCompress} ${jailArch} \
- ${protocol} ${updateHostDirectory}
+ ${updateTag} ${updateCompress} ${jailArch}
echo -n "${jailName}: adding to datastore... "
@@ -1091,28 +1212,25 @@ createPortsTree () {
init=1
mountSrc=""
portsTreeName=""
- protocol=""
- updateHostDirectory=""
+ cvsTag="."
setupDefaults
updateHost=${defaultUpdateHost}
updateType=${defaultUpdateType}
# argument handling
- while getopts d:m:p:u:w:CD:H:IP: arg >/dev/null 2>&1
+ while getopts d:m:t:p:w:CH:I arg >/dev/null 2>&1
do
case "${arg}" in
d) descr="${OPTARG}";;
m) mountSrc="${OPTARG}";;
p) portsTreeName="${OPTARG}";;
- u) updateType="${OPTARG}";;
+ t) cvsTag="${OPTARG}";;
w) cvswebUrl="${OPTARG}";;
C) updateCompress=1;;
- D) updateHostDirectory="${OPTARG}";;
H) updateHost="${OPTARG}";;
I) init=0;;
- P) protocol="${OPTARG}";;
?) return 1;;
esac
@@ -1134,10 +1252,15 @@ createPortsTree () {
return 1
fi
+ if [ "${updateType}" != "CSUP" ]; then
+ echo "createPortsTree: The defaultUpdateType variable in env was changed to ${updateType}"
+ echo "Please change it back to 'CSUP', which is the only method supported to get pkgsrc"
+ return 1
+ fi
+
echo "${portsTreeName}: initializing tree"
generateUpdateCode portstree ${portsTreeName} ${updateType} \
- ${updateHost} "." ${updateCompress} "" \
- ${protocol} ${updateHostDirectory}
+ ${updateHost} ${cvsTag} ${updateCompress}
# add portstree to datastore
echo -n "${portsTreeName}: adding to datastore... "
@@ -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/\//_/')
- portFullDir=${buildRoot}/usr/ports/${portDir}
+ portFullDir=${buildRoot}/usr/pkgsrc/${portDir}
if [ ! -d ${portFullDir} ]; then
echo "enterBuild: Build environment does not exist yet, sleeping."
@@ -1238,7 +1364,7 @@ enterBuild () {
sleep 15
done
- echo 
+ echo
cp $(tinderLoc scripts lib/enterbuild) ${buildRoot}/root
chroot ${buildRoot} /root/enterbuild ${portDir}
rm -f ${buildRoot}/tmp/.sleep_${sleepName}
@@ -1325,7 +1451,6 @@ makeBuild () {
resetBuild () {
# set up defaults
build=""
- nullfs=""
cleandistfiles="0"
# argument handling
@@ -1334,7 +1459,6 @@ resetBuild () {
case "${arg}" in
b) build="${OPTARG}";;
- n) nullfs="-n";;
?) exit 1;;
esac
@@ -1490,22 +1614,23 @@ tinderbuild_setup () {
echo "tinderbuild: Finalizing chroot environment"
# Mount ports/
- if ! requestMount -t buildports -b ${build} -r ${nullfs}; then
+ if ! requestMount -t buildports -b ${build} -r ; then
echo "tinderbuild: cannot mount ports source"
tinderbuild_cleanup 1
fi
- ln -sf ../a/ports ${buildRoot}/usr/ports
+ rm -rf ${buildRoot}/usr/pkgsrc
+ ln -s ../a/pkgsrc ${buildRoot}/usr/pkgsrc
# Mount src/
- if ! requestMount -t buildsrc -b ${build} -r ${nullfs}; then
+ if ! requestMount -t buildsrc -b ${build} -r ; then
echo "tinderbuild: cannot mount jail source"
tinderbuild_cleanup 1
fi
# For use by pnohang
# XXX: though killall may not work since it's a dynamic executable
- cp -p /rescue/mount /rescue/umount ${buildRoot}/sbin
- cp -p /rescue/ps ${buildRoot}/bin
+ cp -p /sbin/mount /sbin/umount ${buildRoot}/sbin
+ cp -p /bin/ps ${buildRoot}/bin
# Mount /dev, since we're going to be chrooting shortly
mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1
@@ -1522,12 +1647,6 @@ tinderbuild_setup () {
tinderbuild_cleanup 1
fi
- # Hack to fix some recent pkg_add problems in some releases
- pitar=$(tinderLoc jail ${jail})/pkg_install.tar
- if [ -f ${pitar} ]; then
- tar -C ${buildRoot} -xf ${pitar}
- fi
-
# Handle the distfile cache
if [ -n "${DISTFILE_CACHE}" ]; then
if ! requestMount -t builddistcache -b ${build} \
@@ -1557,7 +1676,7 @@ tinderbuild_setup () {
mkdir -p ${ccacheDir} $(tinderLoc buildccache ${build})
if ! requestMount -t buildccache -b ${build} \
- -s ${ccacheDir} ${nullfs}; then
+ -s ${ccacheDir} ; then
echo "tinderbuild: cannot mount ccache"
tinderbuild_cleanup 1
fi
@@ -1574,8 +1693,7 @@ tinderbuild_setup () {
mkdir -p ${optionsDir} $(tinderLoc buildoptions ${build})
- if ! requestMount -t buildoptions -b ${build} \
- -s ${optionsDir} ${nullfs}; then
+ if ! requestMount -t buildoptions -b ${build} -s ${optionsDir} ; then
echo "tinderbuild: cannot mount options"
tinderbuild_cleanup 1
fi
@@ -1658,10 +1776,9 @@ tinderbuild () {
cleanpackages=0
init=0
jobs=1
- onceonly=0
+ twice=0
onlymake=0
noduds=""
- nullfs=""
pbargs=""
skipmake=0
updateports=0
@@ -1708,9 +1825,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-twice) twice=1;;
-*) return 1;;
*) ports="${ports} $1";;
@@ -1836,7 +1952,8 @@ tinderbuild () {
echo "tinderbuild: cannot mount portstree: ${portstree}"
exit 1
fi
- env PORTSDIR=$(tinderLoc portstree ${portstree})/ports \
+ env PORTSDIR=$(tinderLoc portstree ${portstree})/pkgsrc \
+ OPTNFILE=$(tinderLoc options $build)/pkg_options \
$(tinderLoc scripts lib/makemake) ${noduds} ${build} ${ports}
)
if [ $? -ne 0 ]; then
@@ -1855,10 +1972,6 @@ tinderbuild () {
# Set up the chrooted environment
osmajor=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|')
- if [ ${osmajor} -lt 6 ]; then
- echo "tinderbuild: unhandled OS version: ${osmajor}"
- tinderbuild_cleanup 1
- fi
tinderbuild_setup
@@ -1866,7 +1979,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
@@ -1885,21 +1998,46 @@ init () {
mkdir -p ${pb}/${dir}
done
- read -p "Enter a default cvsup host [${_defaultUpdateHost}]: " host
+ read -p "Enter a default cvsup server for pkgsrc [${_defaultUpdateHost}]: " host
if [ -z "${host}" ]; then
host=${_defaultUpdateHost}
fi
- read -p "Enter a default update type or command [${_defaultUpdateType}]: " type
- if [ -z "${type}" ]; then
- type=${_defaultUpdateType}
+ # Update type is not optional, it's CSUP only, so we won't ask.
+
+ defaultDragonType="n"
+ while [ "${defaultDragonType}" != "RELEASE" -a "${defaultDragonType}" != "SNAPSHOT" ]; do
+ read -p "Enter a DragonFly branch type [${_defaultDragonType}]: " defaultDragonType
+ if [ -z "${defaultDragonType}" ]; then
+ defaultDragonType=${_defaultDragonType}
+ fi
+ done
+
+ if [ "${defaultDragonType}" = "RELEASE" ]; then
+ echo "Server format: (http|ftp)://(host)/path_to_iso-images_directory"
+ else
+ echo "Server format: (http|ftp)://(host)/path_to_snapshots_directory"
fi
+ read -p "Enter a default ISO server for DragonFly [${_defaultDragonHost}]: " dragonhost
+ if [ -z "${dragonhost}" ]; then
+ dragonhost=${_defaultDragonHost}
+ fi
+
+ read -p "Enter a default Git server for DragonFly [${_defaultGitSrcHost}]: " gitsrchost
+ if [ -z "${gitsrchost}" ]; then
+ gitsrchost=${_defaultGitSrcHost}
+ fi
+
+ # Git Update type for Git is limited to git://, so we won't ask
globalenv=$(tinderLoc scripts etc/env)/GLOBAL
echo "export defaultUpdateHost=${host}" >> ${globalenv}
- echo "export defaultUpdateType=${type}" >> ${globalenv}
+ echo "export defaultUpdateType=${_defaultUpdateType}" >> ${globalenv}
+ echo "export defaultDragonHost=${dragonhost}" >> ${globalenv}
+ echo "export defaultDragonType=${_defaultDragonType}" >> ${globalenv}
+ echo "export defaultGitSrcHost=${gitsrchost}" >> ${globalenv}
- tinderEcho "Default update host and type have been set. These can be changed later by modifying ${globalenv}."
+ tinderEcho "The defaults have been set. These can be changed later by modifying ${globalenv}."
return 0
}
@@ -1948,7 +2086,8 @@ addPortToBuild () {
buildenv ${jail} ${portsTree} ${build}
buildenvNoHost ${build}
- export PORTSDIR=$(tinderLoc portstree ${portsTree})/ports
+ export PORTSDIR=$(tinderLoc portstree ${portsTree})/pkgsrc
+ export OPTNFILE=$(tinderLoc options $build)/pkg_options
if [ -z "${portDir}" ]; then
${tc} addPortToOneBuild -b ${build} ${norecurse}
else
@@ -1958,36 +2097,7 @@ addPortToBuild () {
fi
${tc} addPortToOneBuild -b ${build} -d ${portDir} ${norecurse}
fi
- if [ ${options} -eq 1 -a ${OPTIONS_ENABLED} -eq 1 ]; then
- pdirs=""
- if [ -z "${portDir}" ]; then
- pdirs=$(${tc} getPortsForBuild -b ${build} 2>/dev/null)
- else
- pdirs="${PORTSDIR}/${portDir}"
- fi
- rmconfig=true
- if [ ${cleanOptions} -eq 1 ]; then
- if [ -z "${norecurse}" ]; then
- rmconfig="make rmconfig-recursive"
- else
- rmconfig="make rmconfig"
- fi
- fi
- for pdir in ${pdirs}; do
- if [ -d ${pdir} ]; then
- export TERM=${save_TERM}
- read -p "Generating options for ${build}; hit Enter to continue..." key
- echo ""
- if [ -z "${norecurse}" ]; then
- ( cd ${pdir} && ${rmconfig} \
- && make -k config-recursive )
- else
- ( cd ${pdir} && ${rmconfig} \
- && make config )
- fi
- fi
- done
- fi
+ # FreeBSD-style interactive option entering not supported yet
if [ -n "${save_SRCBASE}" ]; then
export SRCBASE=${save_SRCBASE}
@@ -2174,10 +2284,7 @@ copyBuild () {
if [ ! -d ${destOptionsDir} ]; then
mkdir -p ${destOptionsDir}
fi
- (
- cd ${srcOptionsDir}
- tar -cpf - . | tar -C ${destOptionsDir} -xpf -
- )
+ cp ${srcOptionsDir}/pkg_options ${destOptionsDir}
else
echo "copyBuild: not copying OPTIONS to ${dest} since it has no OPTIONS directory"
fi
@@ -2293,13 +2400,13 @@ tbcleanup () {
pathFound=0
for portstree in ${portstrees} ; do
path=$(tinderLoc portstree ${portstree})
- path="${path}/ports/${port}/Makefile"
+ path="${path}/pkgsrc/${port}/Makefile"
if [ -e ${path} ]; then
if [ ${cleanDistfiles} = 1 ]; then
oldcwd=${PWD}
path=$(tinderLoc portstree ${portstree})
- cd "${path}/ports/${port}"
- distinfo=$(env PORTSDIR="${path}/ports" make -V MD5_FILE)
+ cd "${path}/pkgsrc/${port}"
+ distinfo=$(env PORTSDIR="${path}/pkgsrc" bmake -V MD5_FILE)
if [ -f "${distinfo}" ]; then
for df in $(grep '^MD5' ${distinfo} | awk -F '[\(\)]' '{print $2}'); do
if ! grep -q "^${df}\$" ${disttmp}; then
@@ -2383,7 +2490,7 @@ tbcleanup () {
fi
path=$(tinderLoc portstree ${portstree})
- path="${path}/ports/${port}/Makefile"
+ path="${path}/pkgsrc/${port}/Makefile"
if [ ! -e ${path} ]; then
echo "Removing build port database entry for nonexistent port ${build}/${port}"

View file

@ -1,56 +0,0 @@
$NetBSD: patch-ab,v 1.1 2011/11/02 21:13:20 marino Exp $
--- ../FreeBSD/lib/tinderbox.env 2011-10-16 00:52:55.000000000 +0000
+++ lib/tinderbox.env
@@ -5,36 +5,24 @@
#
# There are no longer any user-servicable parts in this file
-#6PKGSUFFIX=.tbz
-#6PKGZIPCMD=bzip2
-#6INDEXFILE=INDEX-6
-#6X_WINDOW_SYSTEM=xorg
-#7PKGSUFFIX=.tbz
-#7PKGZIPCMD=bzip2
-#7INDEXFILE=INDEX-7
-#7X_WINDOW_SYSTEM=xorg
-#8PKGSUFFIX=.tbz
-#8PKGZIPCMD=bzip2
-#8INDEXFILE=INDEX-8
-#8X_WINDOW_SYSTEM=xorg
-#9PKGSUFFIX=.tbz
-#9PKGZIPCMD=bzip2
-#9INDEXFILE=INDEX-9
-#9X_WINDOW_SYSTEM=xorg
-#10PKGSUFFIX=.tbz
-#10PKGZIPCMD=bzip2
-#10INDEXFILE=INDEX-10
-#10X_WINDOW_SYSTEM=xorg
-#
-LOCALBASE=/usr/local
-OSVERSION=`awk '/^#define __FreeBSD_version/ {print $3}' < ^^SRCBASE^^/sys/sys/param.h`
-OSREL=`awk 'BEGIN {FS="\""}; /^REVISION/ {print $2}' < ^^SRCBASE^^/sys/conf/newvers.sh`
-BRANCH=`awk 'BEGIN {FS="\""}; /^BRANCH/ {print $2}' < ^^SRCBASE^^/sys/conf/newvers.sh`
+#2PKGSUFFIX=.tgz
+#2PKGZIPCMD=gzip
+#2INDEXFILE=INDEX-2
+#2X_WINDOW_SYSTEM=xorg
+#3PKGSUFFIX=.tgz
+#3PKGZIPCMD=gzip
+#3INDEXFILE=INDEX-3
+#3X_WINDOW_SYSTEM=xorg
+
+LOCALBASE=/usr/pkg
+OSVERSION=`awk '/^#define __DragonFly_version/ {print $3}' < ^^SRCBASE^^/sys/sys/param.h`
+OSREL=`awk 'BEGIN {FS="\""}; /^BRANCH=\"/ {split($2,array,"_"); printf ("%s.%s\n", array[2],array[3])}' < ^^SRCBASE^^/sys/conf/newvers.sh`
+BRANCH=`awk 'BEGIN {FS="\""}; /^BRANCH=\"/ {split($2,array,"_"); print array[1]}' < ^^SRCBASE^^/sys/conf/newvers.sh`
ARCH=`uname -p`
UNAME_n=tinderbox.host
UNAME_r=^^OSREL^^-^^BRANCH^^
-UNAME_s=FreeBSD
-UNAME_v="FreeBSD ^^OSREL^^-^^BRANCH^^ #0: `date` root@tinderbox.host:/usr/src/sys/magic/kernel/path"
+UNAME_s=DragonFly
+UNAME_v="DragonFly ^^OSREL^^-^^BRANCH^^ #0: `date` root@tinderbox.host:/usr/src/sys/magic/kernel/path"
#
BATCH=1
PACKAGE_BUILDING=1

View file

@ -1,186 +0,0 @@
$NetBSD: patch-ac,v 1.1 2011/11/02 21:13:21 marino Exp $
--- ../FreeBSD/lib/tinderlib.sh 2011-10-16 00:52:55.000000000 +0000
+++ lib/tinderlib.sh
@@ -50,10 +50,10 @@ tinderLoc () {
fi
;;
"builddata") echo "${pb}/builds/${what}";;
- "buildports") echo "$(tinderLoc buildroot ${what})/a/ports";;
+ "buildports") echo "$(tinderLoc buildroot ${what})/a/pkgsrc";;
"buildsrc") echo "$(tinderLoc buildroot ${what})/usr/src";;
"buildccache") echo "$(tinderLoc buildroot ${what})/ccache";;
- "buildoptions") echo "$(tinderLoc buildroot ${what})/var/db/ports";;
+ "buildoptions") echo "$(tinderLoc buildroot ${what})/var/db/options";;
"builddistcache") echo "$(tinderLoc buildroot ${what})/distcache";;
"builderrors") echo "${pb}/errors/${what}";;
"buildlogs") echo "${pb}/logs/${what}";;
@@ -197,7 +197,7 @@ cleanupMounts () {
echo "cleanupMounts: ${_type}: missing portstree"
return 1
fi
- _dstloc=${_dstloc:-$(tinderLoc portstree ${_portstree})/ports}
+ _dstloc=${_dstloc:-$(tinderLoc portstree ${_portstree})/pkgsrc}
;;
*)
@@ -227,7 +227,6 @@ requestMount () {
_type=""
_srcloc=""
_dstloc=""
- _nullfs=0
_readonly=0
_build=""
_jail=""
@@ -242,7 +241,6 @@ requestMount () {
b) _build=${OPTARG};;
d) _dstloc=${OPTARG};;
j) _jail=${OPTARG};;
- n) _nullfs=1;;
p) _portstree=${OPTARG};;
r) _readonly=1;;
s) _srcloc=${OPTARG};;
@@ -267,7 +265,7 @@ requestMount () {
if [ -z "${_srcloc}" ] ; then
_srcloc=$(${tc} getPortsMount -p ${_portstree})
if [ -z "${_srcloc}" ] ; then
- _srcloc=${_srcloc:=$(tinderLoc portstree ${_portstree})/ports}
+ _srcloc=${_srcloc:=$(tinderLoc portstree ${_portstree})/pkgsrc}
else
_fqsrcloc=1
fi
@@ -332,7 +330,7 @@ requestMount () {
echo "requestMount: ${_type}: missing portstree"
return 1
fi
- _dstloc=${_dstloc:-$(tinderLoc portstree ${_portstree})/ports}
+ _dstloc=${_dstloc:-$(tinderLoc portstree ${_portstree})/pkgsrc}
_srcloc=${_srcloc:-$(${tc} getPortsMount -p ${_portstree})}
_fqsrcloc=1
;;
@@ -355,64 +353,31 @@ requestMount () {
fi
# is the filesystem already mounted?
- fsys=$(df ${_dstloc} 2>/dev/null | awk '{a=$1} END {print a}')
- mtpt=$(df ${_dstloc} 2>/dev/null | awk '{a=$NF} END {print a}')
+ # We can't use df $_dstloc directly because HAMMER returns the
+ # PFS address rather than the source location like UFS does
+ fsys=$(df | grep '^${_dstloc}' | awk '{a=$1} END {print a}')
+ mtpt=$(df | grep '^${_dstloc}' | awk '{a=$NF} END {print a}')
if [ "${fsys}" = "${_srcloc}" -a "${mtpt}" = "${_dstloc}" ]; then
return 0
fi
- # is _nullfs mount specified?
- if [ ${_nullfs} -eq 1 -a ${_fqsrcloc} -ne 1 ] ; then
- _options="-t nullfs"
- else
- # it probably has to be a nfs mount then
- # lets check what kind of _srcloc we have. If it is allready in
- # a nfs format, we don't need to adjust anything
- case ${_srcloc} in
-
- [a-zA-Z0-9\.-_]*:/*)
- _options="-o nfsv3,intr,tcp"
- ;;
-
- *)
- if [ ${_fqsrcloc} -eq 1 ] ; then
- # some _srcloc's are full qualified sources, means
- # don't try to detect sth. or fallback to localhost.
- # The user wants exactly what he specified as _srcloc
- # don't modify anything. If it's not a nfs mount, it has
- # to be a nullfs mount.
- _options="-t nullfs"
- else
- _options="-o nfsv3,intr,tcp"
-
- # find out the filesystem the requested source is in
- fsys=$(df ${_srcloc} | awk '{a=$1} END {print a}')
- mtpt=$(df ${_srcloc} | awk '{a=$NF} END {print a}')
- # determine if the filesystem the requested source
- # is a nfs mount, or a local filesystem
-
- case ${fsys} in
-
- [a-zA-Z0-9\.-_]*:/*)
- # maybe our destination is a subdirectory of the
- # mountpoint and not the mountpoint itself.
- # if that is the case, add the subdir to the mountpoint
- _srcloc="${fsys}/$(echo $_srcloc | \
- sed 's|'${mtpt}'||')"
- ;;
-
- *)
- # not a nfs mount, nullfs not specified, so
- # mount it as nfs from localhost
- _srcloc="localhost:/${_srcloc}"
- ;;
-
- esac
-
- fi
- ;;
- esac
+ # The default mounting option is nullfs for DragonFly. This is required
+ # for HAMMER filesystems as it's not possible to have NFS mounts directly
+ # there. For UFS, it's still the preferred option for performance
+ # reasons. Therefore the only attempt to use NFS is if the mount point
+ # is defined in the database and it's in the NFS server:directory format.
+
+ _options="-t null"
+ if [ ${_fqsrcloc} -eq 1 ]; then
+ case ${_srcloc} in
+
+ [a-zA-Z0-9\.-_]*:/*)
+ _options="-o nfsv3,intr,tcp"
+ ;;
+ *)
+ ;;
+ esac
fi
if [ ${_readonly} -eq 1 ] ; then
@@ -424,6 +389,7 @@ requestMount () {
mkdir -p ${_dstloc}
fi
+ echo "mount ${_options} ${_srcloc} ${_dstloc}"
mount ${_options} ${_srcloc} ${_dstloc}
return ${?}
}
@@ -506,15 +472,16 @@ buildenvNoHost () {
eval "export __MAKE_CONF=${jailBase}/make.conf" >/dev/null 2>&1
eval "export LOCALBASE=/nonexistentlocal" >/dev/null 2>&1
eval "export PKG_DBDIR=/nonexistentdb" >/dev/null 2>&1
- if [ x"${OPTIONS_ENABLED}" != x"1" ]; then
- eval "export PORT_DBDIR=/nonexistentportdb" >/dev/null 2>&1
- else
- optionsDir=$(tinderLoc options ${build})
-
- eval "export PORT_DBDIR=${optionsDir}" >/dev/null 2>&1
- fi
eval "export LINUXBASE=/nonexistentlinux" >/dev/null 2>&1
eval "unset DISPLAY" >/dev/null 2>&1
+
+ # When the tinderd is launched by the rc system at boot time (normal)
+ # it doesn't have the /usr/pkg/bin path set. FreeBSD has their make
+ # in the path that rc scripts can access, but this is not true for
+ # pkgsrc bmake on any system other than NetBSD. Let's add it to
+ # path while we're in the subshell.
+
+ eval "export PATH=${PATH}:/usr/pkg/bin" >/dev/null 2>&1
}
getDbDriver () {
@@ -629,7 +596,7 @@ checkPreReqs () {
missing=""
for r in ${reqs} ; do
- if [ -z $(pkg_info -Q -O ${r}) ]; then
+ if [ -z $(pkg_info -e ${r}) ]; then
missing="${missing} ${r}"
error=1
fi

View file

@ -1,51 +0,0 @@
$NetBSD: patch-ad,v 1.1 2011/11/02 21:13:21 marino Exp $
--- ../FreeBSD/lib/db-pgsql.sh 2011-10-16 00:52:55.000000000 +0000
+++ lib/db-pgsql.sh
@@ -24,30 +24,30 @@
#
# $MCom: portstools/tinderbox/lib/db-pgsql.sh,v 1.2.2.5 2009/02/07 20:15:49 marcus Exp $
#
-export DB_MAN_PREREQS="databases/p5-DBD-Pg databases/postgresql*-client"
-export DB_OPT_PREREQS="databases/php5-pgsql"
+export DB_MAN_PREREQS="p5-DBD-postgresql postgresql*-client"
+export DB_OPT_PREREQS="php5*-pgsql"
if [ -n "${db_admin_pass}" ]; then
export PGPASSWORD=${db_admin_pass}
export DB_PROMPT='true'
- export DB_SCHEMA_LOAD='/usr/local/bin/psql -U ${db_user} -h ${db_host} -d ${db_name} < "${schema_file}"'
- export DB_DUMP='/usr/local/bin/pg_dump -U ${db_admin} -h ${db_host} --data-only --inserts --table=%%TABLE%% ${db_name} >> ${tmpfile}'
- export DB_DROP='/usr/local/bin/dropdb -U ${db_admin} -h ${db_host} ${db_name}'
- export DB_CHECK='/usr/local/bin/psql -U ${db_admin} -h ${db_host} -c "SELECT 0" ${db_name}'
- export DB_CREATE='/usr/local/bin/createdb -O ${db_user} -U ${db_admin} -h ${db_host} ${db_name}'
+ export DB_SCHEMA_LOAD='/usr/pkg/bin/psql -U ${db_user} -h ${db_host} -d ${db_name} < "${schema_file}"'
+ export DB_DUMP='/usr/pkg/bin/pg_dump -U ${db_admin} -h ${db_host} --data-only --inserts --table=%%TABLE%% ${db_name} >> ${tmpfile}'
+ export DB_DROP='/usr/pkg/bin/dropdb -U ${db_admin} -h ${db_host} ${db_name}'
+ export DB_CHECK='/usr/pkg/bin/psql -U ${db_admin} -h ${db_host} -c "SELECT 0" ${db_name}'
+ export DB_CREATE='/usr/pkg/bin/createdb -O ${db_user} -U ${db_admin} -h ${db_host} ${db_name}'
export DB_GRANT='echo "Make sure ${db_user} owns the database ${db_name} as well as all of its tables."'
- export DB_QUERY='/usr/local/bin/psql -U ${db_admin} -h ${db_host} -t -q -A -F "`printf \"\t\"`" -c "${query}" ${db_name}'
+ export DB_QUERY='/usr/pkg/bin/psql -U ${db_admin} -h ${db_host} -t -q -A -F "`printf \"\t\"`" -c "${query}" ${db_name}'
export DB_USER_PROMPT='echo "The next prompt will be for the new user'"'"'s (${db_user}) password on the database server ${db_host}."'
- export DB_CREATE_USER='/usr/local/bin/createuser -E -S -d -R -h ${db_host} -U ${db_admin} -P ${db_user}'
+ export DB_CREATE_USER='/usr/pkg/bin/createuser -E -S -d -R -h ${db_host} -U ${db_admin} -P ${db_user}'
else
export DB_PROMPT='echo "The next prompt will be for ${db_admin}'"'"'s password to the ${db_name} database." | /usr/bin/fmt 75 79'
- export DB_SCHEMA_LOAD='/usr/local/bin/psql -U ${db_user} -W -h ${db_host} -d ${db_name} < "${schema_file}"'
- export DB_DUMP='/usr/local/bin/pg_dump -U ${db_admin} -W -h ${db_host} --data-only --inserts --table=%%TABLE%% ${db_name} >> ${tmpfile}'
- export DB_DROP='/usr/local/bin/dropdb -U ${db_admin} -h ${db_host} -W ${db_name}'
- export DB_CHECK='/usr/local/bin/psql -U ${db_admin} -h ${db_host} -W -c "SELECT 0" ${db_name}'
- export DB_CREATE='/usr/local/bin/createdb -O ${db_user} -U ${db_admin} -h ${db_host} -W ${db_name}'
+ export DB_SCHEMA_LOAD='/usr/pkg/bin/psql -U ${db_user} -W -h ${db_host} -d ${db_name} < "${schema_file}"'
+ export DB_DUMP='/usr/pkg/bin/pg_dump -U ${db_admin} -W -h ${db_host} --data-only --inserts --table=%%TABLE%% ${db_name} >> ${tmpfile}'
+ export DB_DROP='/usr/pkg/bin/dropdb -U ${db_admin} -h ${db_host} -W ${db_name}'
+ export DB_CHECK='/usr/pkg/bin/psql -U ${db_admin} -h ${db_host} -W -c "SELECT 0" ${db_name}'
+ export DB_CREATE='/usr/pkg/bin/createdb -O ${db_user} -U ${db_admin} -h ${db_host} -W ${db_name}'
export DB_GRANT='echo "Make sure ${db_user} owns the database ${db_name} as well as all of its tables."'
- export DB_QUERY='/usr/local/bin/psql -U ${db_admin} -W -h ${db_host} -t -q -A -F "`printf \"\t\"`" -c "${query}" ${db_name}'
+ export DB_QUERY='/usr/pkg/bin/psql -U ${db_admin} -W -h ${db_host} -t -q -A -F "`printf \"\t\"`" -c "${query}" ${db_name}'
export DB_USER_PROMPT='echo "The next prompt will be for the new user'"'"'s (${db_user}) password on the database server ${db_host}. The prompt after that will be for ${db_admin}'"'"'s password."'
- export DB_CREATE_USER='/usr/local/bin/createuser -E -S -d -R -h ${db_host} -U ${db_admin} -W -P ${db_user}'
+ export DB_CREATE_USER='/usr/pkg/bin/createuser -E -S -d -R -h ${db_host} -U ${db_admin} -W -P ${db_user}'
fi

View file

@ -1,51 +0,0 @@
$NetBSD: patch-ae,v 1.1 2011/11/02 21:13:22 marino Exp $
--- ../FreeBSD/lib/db-mysql.sh 2011-10-16 00:52:55.000000000 +0000
+++ lib/db-mysql.sh
@@ -24,30 +24,30 @@
#
# $MCom: portstools/tinderbox/lib/db-mysql.sh,v 1.3.2.3 2010/01/02 20:04:29 marcus Exp $
#
-export DB_MAN_PREREQS="databases/p5-DBD-mysql[456][0145] databases/mysql[456][0145]-client"
-export DB_OPT_PREREQS="databases/php5-mysql"
+export DB_MAN_PREREQS="p5-DBD-mysql mysql-client"
+export DB_OPT_PREREQS="php5*-mysql"
if [ -n "${db_admin_pass}" ]; then
export DB_PROMPT='true'
export db_admin_pass
- export DB_SCHEMA_LOAD='/usr/local/bin/mysql -u${db_admin} --password="${db_admin_pass}" -h ${db_host} ${db_name} < "${schema_file}"'
- export DB_DUMP='/usr/local/bin/mysqldump --no-create-info --skip-opt -u${db_admin} --password="${db_admin_pass}" -h ${db_host} ${db_name} %%TABLE%% >> ${tmpfile}'
- export DB_DROP='/usr/local/bin/mysqladmin -u${db_admin} --password=${db_admin_pass} -h ${db_host} drop ${db_name}'
- export DB_CHECK='/usr/local/bin/mysql -u${db_admin} -B -s --password="${db_admin_pass}" -h ${db_host} -e "SELECT 0" ${db_name}'
- export DB_CREATE='/usr/local/bin/mysqladmin -u${db_admin} --password="${db_admin_pass}" -h ${db_host} create ${db_name}'
- export DB_GRANT='/usr/local/bin/mysql -u${db_admin} --password="${db_admin_pass}" -h ${db_host} -e "GRANT SELECT, INSERT, UPDATE, DELETE ON ${db_name}.* TO '"'"'${db_user}'"'"'@'"'"'${grant_host}'"'"' IDENTIFIED BY '"'"'${db_pass}'"'"' ; FLUSH PRIVILEGES" mysql'
- export DB_QUERY='/usr/local/bin/mysql --batch --skip-column-names -u${db_admin} --password="${db_admin_pass}" -h ${db_host} -e "${query}" ${db_name}'
+ export DB_SCHEMA_LOAD='/usr/pkg/bin/mysql -u${db_admin} --password="${db_admin_pass}" -h ${db_host} ${db_name} < "${schema_file}"'
+ export DB_DUMP='/usr/pkg/bin/mysqldump --no-create-info --skip-opt -u${db_admin} --password="${db_admin_pass}" -h ${db_host} ${db_name} %%TABLE%% >> ${tmpfile}'
+ export DB_DROP='/usr/pkg/bin/mysqladmin -u${db_admin} --password=${db_admin_pass} -h ${db_host} drop ${db_name}'
+ export DB_CHECK='/usr/pkg/bin/mysql -u${db_admin} -B -s --password="${db_admin_pass}" -h ${db_host} -e "SELECT 0" ${db_name}'
+ export DB_CREATE='/usr/pkg/bin/mysqladmin -u${db_admin} --password="${db_admin_pass}" -h ${db_host} create ${db_name}'
+ export DB_GRANT='/usr/pkg/bin/mysql -u${db_admin} --password="${db_admin_pass}" -h ${db_host} -e "GRANT SELECT, INSERT, UPDATE, DELETE ON ${db_name}.* TO '"'"'${db_user}'"'"'@'"'"'${grant_host}'"'"' IDENTIFIED BY '"'"'${db_pass}'"'"' ; FLUSH PRIVILEGES" mysql'
+ export DB_QUERY='/usr/pkg/bin/mysql --batch --skip-column-names -u${db_admin} --password="${db_admin_pass}" -h ${db_host} -e "${query}" ${db_name}'
export DB_USER_PROMPT='true'
export DB_CREATE_USER='true'
else
export DB_PROMPT='echo "The next prompt will be for ${db_admin}'"'"'s password to the ${db_name} database." | /usr/bin/fmt 75 79'
- export DB_SCHEMA_LOAD='/usr/local/bin/mysql -u${db_admin} -p -h ${db_host} ${db_name} < "${schema_file}"'
- export DB_DUMP='/usr/local/bin/mysqldump --no-create-info --skip-opt -u${db_admin} -p -h ${db_host} ${db_name} %%TABLE%% >> ${tmpfile}'
- export DB_DROP='/usr/local/bin/mysqladmin -u${db_admin} -p -h ${db_host} drop ${db_name}'
- export DB_CHECK='/usr/local/bin/mysql -u${db_admin} -B -s -p -h ${db_host} -e "SELECT 0" ${db_name}'
- export DB_CREATE='/usr/local/bin/mysqladmin -u${db_admin} -p -h ${db_host} create ${db_name}'
- export DB_GRANT='/usr/local/bin/mysql -u${db_admin} -p -h ${db_host} -e "GRANT SELECT, INSERT, UPDATE, DELETE ON ${db_name}.* TO '"'"'${db_user}'"'"'@'"'"'${grant_host}'"'"' IDENTIFIED BY '"'"'${db_pass}'"'"' ; FLUSH PRIVILEGES" mysql'
- export DB_QUERY='/usr/local/bin/mysql --batch --skip-column-names -u${db_admin} -p -h ${db_host} -e "${query}" ${db_name}'
+ export DB_SCHEMA_LOAD='/usr/pkg/bin/mysql -u${db_admin} -p -h ${db_host} ${db_name} < "${schema_file}"'
+ export DB_DUMP='/usr/pkg/bin/mysqldump --no-create-info --skip-opt -u${db_admin} -p -h ${db_host} ${db_name} %%TABLE%% >> ${tmpfile}'
+ export DB_DROP='/usr/pkg/bin/mysqladmin -u${db_admin} -p -h ${db_host} drop ${db_name}'
+ export DB_CHECK='/usr/pkg/bin/mysql -u${db_admin} -B -s -p -h ${db_host} -e "SELECT 0" ${db_name}'
+ export DB_CREATE='/usr/pkg/bin/mysqladmin -u${db_admin} -p -h ${db_host} create ${db_name}'
+ export DB_GRANT='/usr/pkg/bin/mysql -u${db_admin} -p -h ${db_host} -e "GRANT SELECT, INSERT, UPDATE, DELETE ON ${db_name}.* TO '"'"'${db_user}'"'"'@'"'"'${grant_host}'"'"' IDENTIFIED BY '"'"'${db_pass}'"'"' ; FLUSH PRIVILEGES" mysql'
+ export DB_QUERY='/usr/pkg/bin/mysql --batch --skip-column-names -u${db_admin} -p -h ${db_host} -e "${query}" ${db_name}'
export DB_USER_PROMPT='true'
export DB_CREATE_USER='true'
fi

View file

@ -1,317 +0,0 @@
$NetBSD: patch-ai,v 1.4 2011/11/23 00:54:34 marino Exp $
--- ../FreeBSD/lib/portbuild 2011-10-16 00:52:55.000000000 +0000
+++ lib/portbuild
@@ -5,7 +5,7 @@
. ${pb}/scripts/lib/tinderlib.sh
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 pkgname dirname"
exit 1
}
@@ -17,9 +17,10 @@ cleanup()
cleandirs=$4
pkgname=$5
build=$6
- nullfs=$7
- umount ${chroot}/compat/linux/proc >/dev/null
+ if [ ${ARCH} = "i386" ]; then
+ umount ${chroot}/compat/linux/proc >/dev/null
+ fi
umount ${chroot}/proc >/dev/null
if [ $noclean -eq 0 ]; then
@@ -31,11 +32,8 @@ cleanup()
rm -rf ${chroot}/tmp/*
chroot ${chroot} /sbin/ldconfig -R
- if [ ${ARCH} = "i386" ]; then
- chroot ${chroot} /sbin/ldconfig -aout -R
- fi
else
- ${tc} resetBuild -b ${build} ${nullfs}
+ ${tc} resetBuild -b ${build}
fi
fi
@@ -56,13 +54,19 @@ mark_failed() {
return
fi
- dependents=$(grep ${pkgname} ${mf} | grep '^[[:space:]]\{1,\}@' | awk '{print $NF}' | sed -e 's|^/usr/ports/||' | grep -v ${portdir})
+ dependents=$(grep ${pkgname} ${mf} | \
+ grep '^[[:space:]]\{1,\}@' | \
+ awk '{print $NF}' | \
+ sed -e 's|^/usr/pkgsrc/||' | \
+ sed -e 's|^../../||' | \
+ grep -v ${portdir})
if [ $? -ne 0 ]; then
return
fi
for dep in ${dependents}; do
${tc} updatePortStatus -d ${dep} -b ${branch} -L -s DEPEND -p ${portdir}
+ execute_hook "postPortBuild" "PACKAGE_NAME=${pkgname} BUILD=${branch} JAIL=${jail} PORTSTREE=${portstree} CHROOT=${chroot} PORTDIR=${dep} PB=${pb} STATUS=DEPEND FAIL_REASON=DEPEND TOTAL_SIZE=0"
done
}
@@ -71,7 +75,6 @@ mark_failed() {
error=0
init=0
noclean=0
-nullfs=""
fetchorig=0
nolog=0
plistcheck=""
@@ -107,9 +110,6 @@ while [ $# -gt 0 -a ${doneargs} -eq 0 ];
x-plistcheck) plistcheck="plistcheck"
shift;;
- x-nullfs) nullfs="-n"
- shift;;
-
x-fetch-original) fetchorig=1
shift;;
@@ -151,7 +151,7 @@ echo ${dirname}
tc=$(tinderLoc scripts tc)
chroot=$(tinderLoc buildroot ${build})
echo "chroot is: ${chroot}"
-portdir=$(echo ${dirname} | sed -e 's|^/usr/ports/||')
+portdir=$(echo ${dirname} | sed -e 's|^/usr/pkgsrc/||')
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,20 +167,21 @@ if [ -f ${dudsfile} ]; then
if grep -qxF ${pkgname} ${dudsfile}; then
echo "skipping ${pkgname} (found in duds)"
${tc} updatePortStatus -d ${portdir} -b ${build} \
- -L -s DUD -v ${pkgname}
+ -L -s DUD -v ${pkgname} -r arch
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
+ # exit with success, we need all the ports to fire on the above hook
+ exit 0
fi
fi
# directories to clean
+# These are created/recreated after blowing the directories away
cleandirs="${LOCALBASE} /compat /var/db/pkg"
for dir in ${cleandirs}; do
cleanDirs ${build} ${chroot}${dir}
done
-rm -rf ${chroot}/var/db/pkg/*
# reset mtrees for plist checking
mtree -deU -f ${chroot}/etc/mtree/BSD.root.dist \
@@ -190,17 +191,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
-mkdir -p ${chroot}${LOCALBASE}
-if [ -f ${chroot}/a/ports/Templates/BSD.local.dist ]; then
- mtree -deU -f ${chroot}/a/ports/Templates/BSD.local.dist -p ${chroot}${LOCALBASE} \
+if [ -f ${chroot}/a/pkgsrc/Templates/BSD.local.dist ]; then
+ mtree -deU -f ${chroot}/a/pkgsrc/Templates/BSD.local.dist -p ${chroot}${LOCALBASE} \
>/dev/null 2>&1
else
mtree -deU -f ${chroot}/etc/mtree/BSD.local.dist -p ${chroot}${LOCALBASE} \
>/dev/null 2>&1
fi
-# mount linprocfs if required
-if [ "${ARCH}" = "i386" -o "${ARCH}" = "amd64" ]; then
+# pkgsrc is "helpful" that it removes directories that result empty after
+# as the plist removes files of a package. This includes standard mtree
+# directories such as man/man1, so we need to touch a file in every directory
+# of pkgsrc to prevent this side-effect which often fails the fs state check.
+
+find ${chroot}${LOCALBASE}/ -type d -exec touch {}/.keep \;
+
+# copy over pkgsrc bootstrap tools, ${LOCALBASE}/bin & /etc exist now
+cp ${chroot}/usr/4bootstrap/bmake ${chroot}${LOCALBASE}/bin/
+cp ${chroot}/usr/4bootstrap/pkg_* ${chroot}${LOCALBASE}/sbin/
+cp ${chroot}/usr/4bootstrap/mk.conf ${chroot}${LOCALBASE}/etc/
+cp -R ${chroot}/usr/4bootstrap/mk ${chroot}${LOCALBASE}/share/
+
+# By default, Tinderbox/pkgsrc will build all vulnerable software and
+# accept all licenses. The next file will add these directives to the mk.conf.
+# If this is unwanted on a per-build bases, use the more_make.conf file
+# to override it.
+
+cat ${pb}/scripts/lib/boilerplate_mk.conf >> ${chroot}${LOCALBASE}/etc/mk.conf
+
+# Add per-build custom make options to etc/mk.conf
+# Intended to default versions e.g. PYTHON_VERSION_DEFAULT
+# During catenation, comments, blank lines, MAKE_JOBS= and PKG_OPTIONS.xxxx
+# variables are stripped out. The latter is handled by pkg_options, and it's
+# better not to have two sources.
+
+more_mkconf=$(tinderLoc options ${build})/more_mk.conf
+if [ -f ${more_mkconf} ]; then
+ cat ${more_mkconf} | awk "!/^[ \t]*($|#|PKG_OPTIONS\.|MAKE_JOBS=)/" \
+ >> ${chroot}${LOCALBASE}/etc/mk.conf
+fi
+
+# mount linprocfs if available
+if [ ${ARCH} = "i386" ]; then
mkdir -p ${chroot}/compat/linux/proc
mount -t linprocfs linprocfs ${chroot}/compat/linux/proc
fi
@@ -251,8 +283,10 @@ if [ x"${CCACHE_ENABLED}" = x"1" ]; then
export PATH=/opt:${PATH}
fi
-if [ x"${OPTIONS_ENABLED}" = x"1" ]; then
- export PORT_DBDIR=/var/db/ports
+export PKG_OPTIONS_FILE=
+original_options=$(tinderLoc options ${build})/pkg_options
+if [ x"${OPTIONS_ENABLED}" = x"1" -a -f ${original_options} ]; then
+ export PKG_OPTIONS_FILE=/var/db/options/pkg_options
fi
echo "building $pkgname in $chroot"
@@ -264,11 +298,7 @@ packages=$(tinderLoc packages ${build})
major_version=$(echo ${jail} | sed -E -e 's|(^[[:digit:]]+).*$|\1|')
if [ -n "${DISTFILE_CACHE}" ]; then
- export DISTCACHE=/distcache
- if [ ${fetchorig} -eq 0 ]; then
- _MSO='file:///distcache/${DIST_SUBDIR}/'
- export MASTER_SITE_OVERRIDE="${_MSO} ${MASTER_SITE_OVERRIDE}"
- fi
+ export DISTDIR=/distcache
fi
if [ -n "${DISTFILE_URI}" ]; then
@@ -282,7 +312,7 @@ mkdir -p ${chroot}/tmp/depends ${chroot}
echo "building ${pkgname} in directory ${chroot}" | \
tee ${chroot}/tmp/${pkgname}.log
-trap "cleanup ${chroot} ${noclean} ${error} \"${cleandirs}\" ${pkgname} ${build} ${nullfs}" 1 2 3 9 10 11 15
+trap "cleanup ${chroot} ${noclean} ${error} \"${cleandirs}\" ${pkgname} ${build}" 1 2 3 9 10 11 15
# 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 +324,7 @@ if [ x"${CCACHE_ENABLED}" ]; then
unset CCACHE_DISABLE
fi
-_ldconfig_dirs="/lib /usr/lib /usr/lib/compat"
+_ldconfig_dirs="/usr/lib"
ldconfig_dirs=""
for i in ${_ldconfig_dirs}; do
if [ -d ${chroot}/${i} ]; then
@@ -302,13 +332,11 @@ for i in ${_ldconfig_dirs}; do
fi
done
chroot ${chroot} /sbin/ldconfig ${ldconfig_dirs}
-if [ ${ARCH} = "i386" ]; then
- chroot ${chroot} /sbin/ldconfig -aout /usr/lib/aout /usr/lib/compat/aout
-fi
set x $ED $FD $PD $BD $RD $TD
shift 1
+MISSINGDEP=
cd ${chroot}/tmp/depends
while [ $# -gt 0 ]; do
@@ -324,6 +352,7 @@ while [ $# -gt 0 ]; do
if [ ! -f $1 ]; then
echo "skipping package $1 for ${pkgname} since it is missing"
+ MISSINGDEP=$1
fi
shift
@@ -337,13 +366,17 @@ 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
+if [ -z "${MISSINGDEP}" ]; then
+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
error=255
fi
execute_hook "postPortChecksum" "PACKAGE_NAME=${pkgname} BUILD=${build} JAIL=${jail} PORTSTREE=${portstree} CHROOT=${chroot} PORTDIR=${portdir} ERROR=${error} PB=${pb} TOTAL_SIZE=${total_size}"
+else
+ error=200
+fi
last_version=$(${tc} getPortLastBuiltVersion -d ${portdir} -b ${build})
logsDir=$(tinderLoc buildlogs ${build})
@@ -351,14 +384,7 @@ errorsDir=$(tinderLoc builderrors ${buil
if [ "${error}" = "0" ]; then
ln -sf ${pkgname}.log2 ${chroot}/tmp/make.log
- # Cache the distfiles if requested. We will wait a maximum of
- # ten minutes before giving up on the lock.
- if [ -n "${DISTFILE_CACHE}" ]; then
- lockf -t 600 ${chroot}${DISTCACHE}/.lock tar -C ${chroot}/${DISTDIR} \
- -cf - . | tar --unlink -C ${chroot}${DISTCACHE} -xvf -
- 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" "${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 +398,7 @@ if [ "${error}" = "0" ]; then
cp ${chroot}/tmp/${pkgname}.log ${logsDir}/${pkgname}.log
fi
if [ -n "${logdir}" ]; then
+ rm -f ${logdir}/${pkgname}.log${lext}
if [ ${docopy} -eq 1 ]; then
cp ${logsDir}/${pkgname}.log${lext} ${logdir}/${pkgname}.log${lext}
else
@@ -388,6 +415,7 @@ if [ "${error}" = "0" ]; then
cp ${chroot}/tmp/work.tbz ${workDir}/${pkgname}.tbz
fi
+ rm -f ${errorsDir}/${pkgname}.log*
if [ "${error}" = "0" ]; then
if [ ! -z "${last_version}" ]; then
oldpkgs=$(find ${packages} -name "${last_version}${PKGSUFFIX}")
@@ -400,8 +428,8 @@ if [ "${error}" = "0" ]; then
tar --unlink -C ${packages} -xvf -
[ -f ${packages}/All/${pkgname}${PKGSUFFIX} ] && \
touch ${packages}/All/${pkgname}${PKGSUFFIX}
- rm -f ${errorsDir}/${pkgname}.log*
- if bzgrep -q "${pkgname} is marked as broken: " ${logsDir}/${pkgname}.log${lext} ; then
+ BROKE=`zgrep -q "${pkgname} is marked as broken: " ${logsDir}/${pkgname}.log${lext}`
+ if [ "${BROKE}" != "" ] ; then
status="BROKEN"
elif [ -f ${chroot}/tmp/leftovers ]; then
status="LEFTOVERS"
@@ -469,12 +497,19 @@ else
if [ ${old_size} -gt ${total_size} ]; then
total_size=${old_size}
fi
+
+ PORTSTATUS=FAIL
+ if [ "${error}" = "200" ]; then
+ PORTSTATUS=DEPEND
+ reason="-r depend_package -p ${MISSINGDEP}"
+ reasonenv="FAIL_REASON=depend"
+ fi
${tc} updatePortStatus -d ${portdir} -b ${build} \
- -L -s FAIL -v ${pkgname} ${reason} -t ${total_size}
+ -L -s ${PORTSTATUS} -v ${pkgname} ${reason} -t ${total_size}
mark_failed ${tc} ${build} ${pkgname} ${portdir}
${tc} sendBuildErrorMail -d ${portdir} -b ${build} -p ${pkgname} -x ${lext}
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
-cleanup ${chroot} ${noclean} ${error} "${cleandirs}" ${pkgname} ${build} ${nullfs}
+cleanup ${chroot} ${noclean} ${error} "${cleandirs}" ${pkgname} ${build}
exit ${error}

View file

@ -1,381 +0,0 @@
$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
@@ -8,7 +8,7 @@ cleanup() {
if [ -e ${dir}/.keep ]; then
cd ${dir}
- objdir=$(make -V WRKDIR)
+ objdir=`bmake -V '\${WRKDIR}'`
tar cfjC /tmp/work.tbz ${objdir}/.. work
fi
@@ -36,7 +36,6 @@ add_pkg() {
for i in $pkgs; do
echo "pkg_add $i"
base=$(basename $i .tgz)
- base=$(basename $base .tbz)
if pkg_info -q -e $base; then
echo "skipping $base, already added"
else
@@ -48,6 +47,8 @@ add_pkg() {
fi
done
fi
+ # pkgsrc requires PKG_PATH variable be unset
+ unset PKG_PATH
}
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
+ # pkgsrc requires PKG_PATH variable be unset
+ unset PKG_PATH
+}
+
+get_package_options() {
+ # If the option file exists, it's stored in PKG_OPTIONS_FILE env var.
+ # The format is ${DISTNAME}:jobs override:options list
+ # example: gcc-4.6.1::-gcc-fortran
+ # In this example, there is no makejob override, fortran removed
+ # example: gawk-3.1.8:1:portals
+ # In the above example, MAKE_JOBS=1, portals option added
+ # Don't include any "nbX" suffixes, that is ${PKGNAME}.
+ # Use the "DISTNAME" definition in the makefile.
+
+ INFO_DISTNAME=$1
+ MAKEJOBS_OVERRIDE=
+ SPECIFIC_OPTIONS=
+ if [ -z "${PKG_OPTIONS_FILE}" ]; then
+ return
+ fi
+
+ instructions=`grep ${INFO_DISTNAME}: ${PKG_OPTIONS_FILE}`
+ if [ -z "${instructions}" ]; then
+ return
+ fi
+
+ test_override=`echo ${instructions} | awk 'BEGIN {FS=":"}; /^.+:[0-9]+:/ {print $2}'`
+ if [ -n "{test_override}" ]; then
+ MAKEJOBS_OVERRIDE="${test_override}"
+ fi
+ SPECIFIC_OPTIONS="`echo ${instructions} | awk 'BEGIN {FS=":"}; /^.+:[0-9]*:/ {print $3}'`"
}
dir=$1
@@ -102,35 +157,42 @@ FD=$5
BD=$6
RD=$7
TD=$8
-PLISTCHECK=$9
+pkgname=$9
+PLISTCHECK=${10}
L=$(echo ${LOCALBASE} | sed 's,^/,,')
+export NO_PKGTOOLS_REQD_CHECK=1
+export WRKOBJDIR=/work
+
+cd $dir || exit 1
+
+INFO_OPTVAR=`bmake -V '\${PKG_OPTIONS_VAR}'`
+get_package_options `bmake -V '\${DISTNAME}'`
+
if [ $phase = 1 ]; then
- cd $dir || exit 1
+ INFO_MAINTAINER=`bmake -V '\${MAINTAINER}'`
+ INFO_PREFIX=`bmake -V '\${PREFIX}'`
echo "build started at $(date)"
echo "port directory: ${dir}"
echo "building for: $(uname -rm)"
- echo "maintained by: $(make maintainer)"
- echo "Makefile ident: $(ident ${dir}/Makefile | grep 'FreeBSD:' | sed 's/^[ \t]*//')"
- echo "prefixes: LOCALBASE=${L} PREFIX=$(make -V PREFIX)"
+ echo "maintained by: ${INFO_MAINTAINER}"
+ echo "Makefile ident: $(ident ${dir}/Makefile | grep 'NetBSD:' | sed 's/^[ \t]*//')"
+ echo "prefixes: LOCALBASE=${L} PREFIX=${INFO_PREFIX}"
echo "Begin Configuration:"
echo "---Begin Environment---"
- printenv
+ printenv | sort
echo "---End Environment---"
echo ""
echo "---Begin OPTIONS List---"
- make showconfig
+ if [ -n "${INFO_OPTVAR}" -a -n "${SPECIFIC_OPTIONS}" ]; then
+ bmake show-options ${INFO_OPTVAR}="${SPECIFIC_OPTIONS}"
+ else
+ bmake show-options
+ fi
echo "---End OPTIONS List---"
echo ""
- optionsfile=$(make -V OPTIONSFILE)
- if [ -f "${optionsfile}" ]; then
- echo "---Begin OPTIONS configuration---"
- cat ${optionsfile}
- echo "---End OPTIONS configuration---"
- echo ""
- fi
echo "End Configuration."
echo "FETCH_DEPENDS=${FD}"
@@ -165,6 +227,7 @@ if [ $phase = 1 ]; then
./${L}/share/xml
./${L}/etc/gconf
./var/db/fontconfig
+./distcache
EOF
# Record a "pristine" mtree.
@@ -173,11 +236,11 @@ EOF
add_pkg $FD
cd $dir || exit 1
- pkgname=$(make package-name)
+
echo "================================================================"
echo "====================<phase 1: make checksum>===================="
- if /pnohang $TIMEOUT /tmp/make.log1 ${pkgname} make checksum; then
+ if /pnohang $TIMEOUT /tmp/make.log1 ${pkgname} bmake checksum; then
cat /tmp/make.log1
echo "0" > /tmp/status
else
@@ -186,36 +249,41 @@ EOF
else
- cd $dir || exit 1
- pkgname=$(make package-name)
-
echo "================================================================"
echo "====================<phase 2: make extract>===================="
add_pkg ${ED}
+
+ # For an unfathomable reason, pkgsrc insists on bringing in build
+ # dependencies in order to extract the files. Not only is this
+ # annoying if you want to check the contents of the tarball and you
+ # have to build all the dependencies first, it means this script
+ # has to be reordered where build dependencies come in very early.
+
+ add_pkg ${BD}
+
cd $dir
- /pnohang $TIMEOUT /tmp/make.log2 ${pkgname} make extract || cleanup 2
+ # The config options need to come here because make extract pulls in
+ # make configure first, which is where this input is needed.
+ if [ -n "${INFO_OPTVAR}" -a -n "${SPECIFIC_OPTIONS}" ]; then
+ /pnohang $TIMEOUT /tmp/make.log2 ${pkgname} bmake extract ${INFO_OPTVAR}="${SPECIFIC_OPTIONS}" || cleanup 2
+ else
+ /pnohang $TIMEOUT /tmp/make.log2 ${pkgname} bmake extract || cleanup 2
+ fi
cat /tmp/make.log2
del_pkg ${ED}
- # 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
- /pnohang $TIMEOUT /tmp/make.log3 ${pkgname} make patch || cleanup 3
+ /pnohang $TIMEOUT /tmp/make.log3 ${pkgname} bmake patch || cleanup 3
cat /tmp/make.log3
del_pkg ${PD}
echo "================================================================"
echo "====================<phase 4: make build>===================="
- add_pkg ${BD}
-
# Files we do not care about changing between pre-build and post-cleanup
cat > /tmp/mtree.buildexclude <<EOF
./var/log/*
@@ -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/pkgsrc/||' -e 'y/\//_/')
if [ -f .sleepme ]; then
set > /tmp/.set_${portdir}
@@ -259,32 +327,32 @@ EOF
rm -f /tmp/.set_${portdir}
fi
- /pnohang $TIMEOUT /tmp/make.log4 ${pkgname} make build || cleanup 4
+ # MAKE_JOBS normally defined in $LOCALBASE/etc/mk.conf, but it's
+ # inside the tarball. By default it's not set, so we override it here.
+ # We can use the options file to specify exactly the number of jobs we want
+
+ if [ -n "${MAKEJOBS_OVERRIDE}" ]; then
+ echo "=> Number jobs set to ${MAKEJOBS_OVERRIDE} in options file"
+ PORT_JOBS="MAKE_JOBS=${MAKEJOBS_OVERRIDE}"
+ else
+ ncpus=$(/sbin/sysctl hw.ncpu | awk '{print $2}')
+ if [ "${npcus}" = "1" ]; then
+ echo "=> Single job, only 1 CPU"
+ PORT_JOBS="MAKE_JOBS=1"
+ else
+ factor=$(echo "$ncpus*2+1" | /usr/bin/bc)
+ echo "=> Multiple CPUs: ${factor} jobs set"
+ PORT_JOBS="MAKE_JOBS=${factor}"
+ fi
+ fi
+
+ /pnohang $TIMEOUT /tmp/make.log4 ${pkgname} bmake build ${PORT_JOBS} || cleanup 4
cat /tmp/make.log4
echo "================================================================"
echo "====================<phase 5: make test>===================="
- pkg_info | awk '{print $1}' | sort > /tmp/pkgs_pre_test
- add_pkg ${TD}
- pkg_info | awk '{print $1}' | sort > /tmp/pkgs_post_test
- cd $dir
- /pnohang $TIMEOUT /tmp/make.log5 ${pkgname} make -k regression-test
- cat /tmp/make.log5
-
- RTD=`comm -3 /tmp/pkgs_pre_test /tmp/pkgs_post_test | tr -d '\t'`
- del_pkg ${RTD}
- rm /tmp/pkgs_pre_test /tmp/pkgs_post_test
-
- mtree -X /tmp/mtree.buildexclude -x -f /tmp/mtree.prebuild -p / | egrep -v "^(${L}/var|${L}/lib/X11/xserver/SecurityPolicy|${L}/share/nls/POSIX|${L}/share/nls/en_US.US-ASCII|etc/services|compat |${L} |etc/manpath.config|etc/.*.bak|${L}/info/dir|${L}/lib/X11/fonts/.*/fonts\.|${L}/man/..( |/man. )|${L}/lib/X11/fonts/TrueType|${L}/etc/gconf/gconf.xml.defaults/%gconf-tree.*.xml|usr/X11R6 )" > /tmp/list.preinstall
-
- if [ -s /tmp/list.preinstall ]; then
- echo "================================================================"
- echo "Fatal error: filesystem was touched prior to 'make install' phase"
- cat /tmp/list.preinstall
- echo "================================================================"
- cleanup 0
- fi
+ echo "Pkgsrc does not have per-package regression test capability, skipped."
echo "================================================================"
echo "====================<phase 6: make install>===================="
@@ -306,7 +374,7 @@ EOF
mtree -X /tmp/mtree.exclude -xcn -k uid,gid,mode -p / > /tmp/mtree
cd $dir
- if /pnohang $TIMEOUT /tmp/make.log6 ${pkgname} make install; then
+ if /pnohang $TIMEOUT /tmp/make.log6 ${pkgname} bmake install; then
cat /tmp/make.log6
echo "0" > /tmp/status
else
@@ -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
echo "1" > /tmp/status
fi
cat /tmp/make.log7
- prefix=$(make -V PREFIX)
+ prefix=`bmake -V '\${PREFIX}'`
du -skx / | awk '{print $1}' > /tmp/size
del_pkg ${pkgname}
@@ -349,14 +418,18 @@ EOF
echo "================================================================"
fi
-
echo
+ echo "=== Deleting /var/db/pkg/pkgdb.byfile.db"
+ rm -f /var/db/pkg/pkgdb.byfile.db
+
echo "=== Checking filesystem state"
if [ -s /tmp/list4 ]; then
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}
+ 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:" *
@@ -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}
- objdir=$(make -V WRKDIR)
+ objdir=`bmake -V '\${WRKDIR}'`
tar cfjC /tmp/work.tbz ${objdir}/.. work
fi

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ak,v 1.1 2011/11/02 21:13:23 marino Exp $
--- ../FreeBSD/contrib/hooks/mass-build-pgsql/mass-build-pgsql.sh 2011-05-27 23:54:22.000000000 +0000
+++ contrib/hooks/mass-build-pgsql/mass-build-pgsql.sh
@@ -2,7 +2,7 @@
# postPortBuild
# If PGSQL needs authentication use ~/.pgpass !
-PSQL=/usr/local/bin/psql
+PSQL=/usr/pkg/bin/psql
USR=tinderbox_user
DB=tinderbox_database

View file

@ -1,13 +0,0 @@
$NetBSD: patch-al,v 1.1 2011/11/02 21:13:23 marino Exp $
--- ../FreeBSD/man/man1/tc-configCcache.1 2011-10-16 00:52:55.000000000 +0000
+++ man/man1/tc-configCcache.1
@@ -24,7 +24,7 @@
.\" $MCom: portstools/tinderbox/man/man1/tc-configCcache.1,v 1.3 2007/10/13 02:28:46 ade Exp $
.\"
.Dd July 21, 2005
-.Os FreeBSD
+.Os DragonFly
.Dt TC-CONFIGCCACHE 1
.Sh NAME
.Nm "tc configCcache"

View file

@ -1,13 +0,0 @@
$NetBSD: patch-am,v 1.1 2011/11/02 21:13:24 marino Exp $
--- ../FreeBSD/man/man1/tc-configDistfile.1 2011-10-16 00:52:55.000000000 +0000
+++ man/man1/tc-configDistfile.1
@@ -24,7 +24,7 @@
.\" $MCom: portstools/tinderbox/man/man1/tc-configDistfile.1,v 1.2 2007/10/13 02:28:46 ade Exp $
.\"
.Dd July 21, 2005
-.Os FreeBSD
+.Os DragonFly
.Dt TC-CONFIGDISTFILE 1
.Sh NAME
.Nm "tc configDistfile"

View file

@ -1,13 +0,0 @@
$NetBSD: patch-an,v 1.1 2011/11/02 21:13:24 marino Exp $
--- ../FreeBSD/man/man1/tc-configGet.1 2011-10-16 00:52:55.000000000 +0000
+++ man/man1/tc-configGet.1
@@ -24,7 +24,7 @@
.\" $MCom: portstools/tinderbox/man/man1/tc-configGet.1,v 1.2 2007/10/13 02:28:46 ade Exp $
.\"
.Dd July 21, 2005
-.Os FreeBSD
+.Os DragonFly
.Dt TC-CONFIGGET 1
.Sh NAME
.Nm "tc configGet"

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ao,v 1.1 2011/11/02 21:13:24 marino Exp $
--- ../FreeBSD/man/man1/tc-configJail.1 2011-10-16 00:52:55.000000000 +0000
+++ man/man1/tc-configJail.1
@@ -24,7 +24,7 @@
.\" $MCom: portstools/tinderbox/man/man1/tc-configJail.1,v 1.2 2007/10/13 02:28:46 ade Exp $
.\"
.Dd July 21, 2005
-.Os FreeBSD
+.Os DragonFly
.Dt TC-CONFIGJAIL 1
.Sh NAME
.Nm "tc configJail"

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ap,v 1.1 2011/11/02 21:13:25 marino Exp $
--- ../FreeBSD/man/man1/tc-configTinderd.1 2011-10-16 00:52:55.000000000 +0000
+++ man/man1/tc-configTinderd.1
@@ -24,7 +24,7 @@
.\" $MCom: portstools/tinderbox/man/man1/tc-configTinderd.1,v 1.2 2007/10/13 02:28:47 ade Exp $
.\"
.Dd July 21, 2005
-.Os FreeBSD
+.Os DragonFly
.Dt TC-CONFIGTINDERD 1
.Sh NAME
.Nm "tc configTinderd"

View file

@ -1,13 +0,0 @@
$NetBSD: patch-aq,v 1.1 2011/11/02 21:13:25 marino Exp $
--- ../FreeBSD/man/man1/tc-init.1 2011-10-16 00:52:55.000000000 +0000
+++ man/man1/tc-init.1
@@ -24,7 +24,7 @@
.\" $MCom: portstools/tinderbox/man/man1/tc-init.1,v 1.1 2005/07/27 03:59:49 marcus Exp $
.\"
.Dd July 21, 2005
-.Os FreeBSD
+.Os DragonFly
.Dt TC-INIT 1
.Sh NAME
.Nm "tc init"

View file

@ -1,556 +0,0 @@
$NetBSD: patch-ar,v 1.3 2011/11/20 16:20:24 marino Exp $
--- ../FreeBSD/README 2011-11-20 13:18:28.333065000 +0000
+++ README
@@ -2,23 +2,30 @@
Tinderbox is a package building system for FreeBSD ports, based on
official Portbuild scripts used on pointyhat building cluster.
- Tinderbox was written by Joe Marcus Clarke.
+ Tinderbox was written by Joe Marcus Clarke, and has
+ been ported to DragonFly BSD by John Marino.
You can define multiple jails (base system versions) and multiple
portstrees. The combination of jail and portstree is called a
build. A Tinderbox jail is not what is understood as a jail in
- FreeBSD, it is in fact a given world in a chroot. Tinderbox
- supports automatic tracking of dependencies and only rebuilds
- packages that changed since last run. Tinderbox has support for
- email notification of failed builds. Tinderbox also integrates
- well with ccache.
+ FreeBSD and DragonFly, it is in fact a given world in a
+ chroot. DragonFly uses NetBSD's pkgsrc to build software which
+ is known as "packages" rather than "ports". Rather than update
+ DragonFly Tinderbox to change numerous references to "ports" and
+ "portstrees", the users of pkgsrc are asked to equate the term
+ "port" with "package" whenever they encounter it.
+
+ Tinderbox supports automatic tracking of dependencies and only
+ rebuilds packages that changed since last run. Tinderbox has
+ support for email notification of failed builds. Tinderbox also
+ integrates well with ccache.
Tinderbox is designed to easily provide package sets of ports you
need, for platforms and architectures you need. Tinderbox is also
excellent tool for testing new ports and port upgrades, especially
for testing dependencies and packing lists. It's also useful for
- testing ports on various releases of FreeBSD, since you can run
- FreeBSD 7.X/8.X world as a jail on a FreeBSD 9.X host.
+ testing ports on various releases of DragonFly, since you can run
+ earlier releases as a jail on the DragonFly-current.
--------------------------------------------------------------
@@ -96,34 +103,28 @@
* ports-mgmt/tinderbox which tracks the latest stable release
(plus sometimes back-ported fixes from the STABLE branch)
- * ports-mgmt/tinderbox-devel which tracks HEAD and might contain
- additional experimental patches not (yet) present in the CVS.
+ The pkgsrc/DragonFly version of Tinderbox repository is
+ located at https://github.com/jrmarino/pkgsrc-tinderbox
--------------------------------------------------------------
Chapter 2 Requirements
- Recent FreeBSD (development happens on 9-CURRENT only, but
- Tinderbox is known to work on RELENG_7 and RELENG_8 too), Perl 5.8
- or later (lang/perl5.8), and either MySQL 4.1 or later
- (databases/mysql41-server) or PostgreSQL 8.2 or later
- (databases/postgresql82-server).
+ Recent DragonFly, Perl 5.8 or later (lang/perl5), and either
+ MySQL 5.0 or later (databases/mysql51-server) or
+ PostgreSQL 8.4 or later (databases/postgres84-server).
If MySQL is used, the MySQL Perl module must also be installed
- (databases/p5-DBD-mysql41). If PostgreSQL is used, the Pg Perl
- module must also be installed (databases/p5-DBD-Pg).
+ (databases/p5-DBD-mysql). If PostgreSQL is used, the Pg Perl
+ module must also be installed (databases/p5-DBD-postgresql).
- Note: Please note, however, that is is recommended that for
- MySQL version 5.0 or later be used. There are currently no plans
- to make this a requirement, but it may happen in the future.
-
- PHP 4.x is now EOL, so the web front-end (found in the webui/
- subdirectory) requires PHP 5 (lang/php5), PEAR::MDB2_Driver_mysql
- (databases/pear-MDB2_Driver_mysql) or PEAR::MDB2_Driver_pgsql
- (databases/pear-MDB2_Driver_pgsql), PHP Session
- (www/php5-session), and one of the PHP MySQL
- (databases/php5-mysql) or PHP Pgsql (databases/php5-pgsql)
- depending on your choice of backend database above.
+ The web front-end (found in the webui/ subdirectory)
+ requires PHP 5 (lang/php5),
+ PEAR::MDB2_Driver_mysql (databases/pear-MDB2_Driver_mysql) or
+ PEAR::MDB2_Driver_pgsql (databases/pear-MDB2_Driver_pgsql),
+ and one of the PHP MySQL (databases/php-mysql) or
+ PHP Pgsql (databases/php-pgsql) depending on your choice of
+ backend database above.
If you will be sending emails from Tinderbox (e.g. build failure
or build completion emails) you must install net/p5-Net to get the
@@ -218,12 +219,12 @@
9. Tinderbox can use either NFS or nullfs to mount the required
file systems within the build chroots (called Builds in
- Tinderbox). If you wish to use nullfs, skip to step 12.
+ Tinderbox). If you wish to use nullfs (default), skip to step 12.
10. Setup the Tinderbox server as an NFS server by adding the
following to /etc/exports:
- ${pb} -alldirs -maproot=0:0 localhost
+ ${pb} -alldirs -maproot=root localhost
Important: ${pb} CANNOT be a symlink. It should be a real,
fully qualified path (hint: use realpath on your desired
@@ -238,84 +239,78 @@
nfs_server_enable="YES"
nfs_reserved_port_only="YES"
+ NullFS will still be used unless the mount point is defined, and
+ it's defined in the format server:directory.
+
12. Create the required Jails using the tc command. A Jail is
- nothing more than a version of FreeBSD. For example, to create
- a Jail for FreeBSD 8.2-RELEASE:
+ nothing more than a version of DragonFly. For example, to create
+ a Jail for DragonFly 2.12-RELEASE:
- # cd ${pb}/scripts && ./tc createJail -j 8.2 -d "FreeBSD 8.2-RELEASE" \
- -t RELENG_8_2_0_RELEASE -u CVSUP
+ # cd ${pb}/scripts && ./tc createJail -j 2.12 -d "DragonFly 2.12-RELEASE" \
+ -t DragonFly_RELEASE_2_12 -u GIT
or
- # cd ${pb}/scripts && ./tc createJail -j 8.2 -d "FreeBSD 8.2-RELEASE" \
- -t 8.2-RELEASE -u LFTP -H ftp.freebsd.org
-
- The first method will download source via cvsup and use make
- world to compile a complete FreeBSD installation.
+# cd ${pb}/scripts && ./tc createJail -j 2.12 -d "DragonFly 2.12-RELEASE" \
+ -t 2.12.1 -u RELEASE -H http://ftp.dragonflybsd.org/dragonflybsd
- The second method will instead download binary release sets
- (used on CDs) and install them, making the process much
- shorter. As the command suggests, the second method requires
- lftp (ftp/lftp) to be installed. You need to specify what
- release (not the CVS tag, as opposed to the first method) you
- want to download with the -t option. Also note that you need
- to provide an FTP server to download the sets from (with the
- -H option).
-
- Important: All Jail names MUST begin with their FreeBSD
- major version number. That is, the following is an illegal
- jail name: "FreeBSD-8.2".
-
- Tip: It is recommended that the Jail begin with the FreeBSD
- major.minor version (i.e. "8.2-FreeBSD" instead of just
- "8-FreeBSD") as this may prove useful when using things such
+ Note:The protocol for DragonFly host servers can be either
+ http or ftp. The protocol and the path up but not including the
+ repository directory must be provided. For the RELEASE type, the
+ directory is called "iso-images" and for the SNAPSHOT type the
+ directory is called "snapshots". For the RELEASE type, the <tag>
+ must be the release represented by three numbers in
+ <major.minor.point> format, and for the SNAPSHOT type, the <tag>
+ must either be the value "LATEST" for the latest snapshot or
+ in the pattern "YYYYMMDD-DEV-va.b.c.d.gxxxxxx" (YYYYMMDD is the
+ calendar date, a.b.c is major.minor.point release, d is an
+ index, and xxxxxx is the first 5 characters of the git commit hash.
+
+ The first method will download source via git and use
+ make world to compile a complete DragonFly installation.
+ The next method will download binary release and snapshot ISO
+ images and install them, making the process much shorter. You
+ can provide an alternative to the default FTP server to download
+ the sets from (with the -H option).
+
+ Important: All Jail names MUST begin with their DragonFly
+ major version number. That is, the following is an illegal
+ jail name: "DragonFly-2.12".
+
+ Tip: It is recommended that the Jail begin with the DragonFly
+ major.minor version (i.e. "2.12-DragonFly" instead of just
+ "2-DragonFly") as this may prove useful when using things such
as Hooks (Section 8.8).
13. Create the required PortsTrees using the tc command. A
PortsTree is a set of ports you wish to build. A PortsTree
- does not have to be a complete FreeBSD ports tree. However,
+ does not have to be a complete pkgsrc tree. However,
all ports within a tree must have all of their dependencies
within the same tree.
- For example, to create a portstree that tracks the full
- FreeBSD ports tree:
+ For example, to create a portstree based on 2011Q3 quarterly
+ branch that tracks the full pkgsrc tree:
+
+# cd ${pb}/scripts && ./tc createPortsTree -p pkgsrc \
+ -d "pkgsrc tree" \
+ -t "pkgsrc-2011Q3" \
+ -w http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/
- # cd ${pb}/scripts && ./tc createPortsTree -p FreeBSD \
- -d "FreeBSD ports tree" \
- -w http://www.freebsd.org/cgi/cvsweb.cgi/ports/
+ Omit the "-t" option if you want the HEAD, or alternatively,
+ use -t "." instead.
14. Create the required Builds using the tc command. A Build is a
combination of a Jail and a PortsTree. The build is the object
in which packages are created. To create a build that combines
- a 8.2 Jail with the FreeBSD ports tree:
+ a 2.12 Jail with the DragonFly pkgsrc tree:
- # cd ${pb}/scripts && ./tc createBuild -b 8.2-FreeBSD -j 8.2 \
- -p FreeBSD -d "8.2-RELEASE with FreeBSD ports tree"
+# cd ${pb}/scripts && ./tc createBuild -b 2.12-DragonFly -j 2.12 \
+ -p pkgsrc -d "2.12-RELEASE with DragonFly pkgsrc tree"
Note: the recommended way to name Builds is "Jail-PortsTree".
- All builds must also begin with their FreeBSD major version
+ All builds must also begin with their DragonFly major version
number.
- Note: tc uses cvsup12 as its default cvsup mirror. If you would
- like to use another server or enable cvsup compression use the
- -H and -C line arguments to the tc script respectively. For
- example, to use cvsup2.freebsd.org and enable cvsup compression
- for all Jail updates, use the following command:
-
- # cd ${pb}/scripts && ./tc createJail -j 8-STABLE \
- -d "FreeBSD 8-STABLE" -t RELENG_8 -u CVSUP -C \
- -H cvsup2.freebsd.org
-
- Tip: It is possible to suppress spurious setuid warnings from
- periodic if ${pb} is on a dedicated partition. Simply add the
- nosuid flag to the partition; for UFS in /etc/fstab:
-
- /dev/ad5s1f /usr/local/tinderbox ufs rw,nosuid 1 1
-
- and for ZFS:
-
- # zfs set setuid=off $(zfs list ${pb} | tail -n 1 | cut -d ' ' -f 1)
-
--------------------------------------------------------------
Chapter 4 Upgrading
@@ -359,9 +354,9 @@
Where {BUILD} is the name of the Build for which this port should
be built and {PORT DIRECTORY} is the directory within the
PortsTree where this port can be found. For example, to build the
- GNOME 2 Desktop port for the Build "8.2-FreeBSD":
+ Joe editor port for the Build "2.12-DragonFly":
- # cd ${pb}/scripts && ./tc addPort -b 8.2-FreeBSD -d x11/gnome2
+ # cd ${pb}/scripts && ./tc addPort -b 2.12-DragonFly -d editors/joe
Note: A port does not have to be added to the database for
Tinderbox to build it. If you just want to do a quick ad hoc
@@ -376,10 +371,9 @@
# cd ${pb}/scripts && ./tc tinderbuild -b {BUILD} {PORT DIRECTORY}
- For example, to build the GNOME 2 Desktop for the Build
- 8.2-FreeBSD:
+ For example, to build the Joe editor for the Build 2.12-DragonFly:
- # cd ${pb}/scripts && ./tc tinderbuild -b 8.2-FreeBSD x11/gnome2
+# cd ${pb}/scripts && ./tc tinderbuild -b 2.12-DragonFly editors/joe
Tip: The example above will run the build in the foreground with
all messages and errors echoing to the terminal. To capture all
@@ -388,13 +382,13 @@
* Bourne shell equivalents:
- # cd ${pb}/scripts && ./tc tinderbuild -b 8.2-FreeBSD \
- x11/gnome2 > ${pb}/builds/8.2-FreeBSD/build.log 2>&1 &
+# cd ${pb}/scripts && ./tc tinderbuild -b 2.12-DragonFly \
+ editors/joe > ${pb}/builds/2.12-DragonFly/build.log 2>&1 &
* C shell equivalents:
- # cd ${pb}/scripts && ./tc tinderbuild -b 8.2-FreeBSD \
- x11/gnome2 >& ${pb}/builds/8.2-FreeBSD/build.log &
+# cd ${pb}/scripts && ./tc tinderbuild -b 2.12-DragonFly \
+ editors/joe >& ${pb}/builds/2.12-DragonFly/build.log &
More advanced logging options are also available. All log files
including tinderbuild output, make logs, and individual port
@@ -404,7 +398,7 @@
If set to a directory, a subdirectory will be created in the
format of {BUILD}-{DATE} where {BUILD} is the Build name, and
{DATE} is the date in the format YYYYMMDDHHMMSS (e.g.
- 8.2-FreeBSD-20091012112105). Within this subdirectory will be
+ 2.6-DragonFly-20091012112105). Within this subdirectory will be
the tinderbuild log, and symlinks to the make logs and
individual port build logs. If you would rather have the log
files copied to this location (instead of using symlinks), set
@@ -432,8 +426,6 @@
Table 5-2. tinderbuild Commands
-init updates the Jail then updates the Build
- -nullfs uses nullfs instead of NFS to mount Jail and
- PortsTree file systems
-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:
- # cd ${pb}/scripts && ./tc makeJail -j 8.2
+ # cd ${pb}/scripts && ./tc makeJail -j 2.12
The output of the Jail build will go to stdout. The output of
- update (e.g cvsup) will go to ${pb}/jails/{JAIL}/update.log (where
+ update (e.g git) will go to ${pb}/jails/{JAIL}/update.log (where
{JAIL} is the name of the Jail in question).
To update existing PortsTrees, use tc with the updatePortsTree
command. For example:
- # cd ${pb}/scripts && ./tc updatePortsTree -p FreeBSD
+# cd ${pb}/scripts && ./tc updatePortsTree -p DragonFly
If you want to clone various aspects of an existing Build, use the
tc application with the copyBuild command. For example:
- # cd ${pb}/scripts && ./tc copyBuild -s 8.2-FreeBSD -d 9-FreeBSD
+# cd ${pb}/scripts && ./tc copyBuild -s 2.12-DragonFly -d 2.13-DragonFly
- The source and destination Builds (i.e. 8.2-FreeBSD and 9-FreeBSD
+ The source and destination Builds (i.e. 2.12-DFly and 2.13-DFly
respectively in this example) must already exist. By default,
copyBuild will copy the environment file, OPTIONS, and ports from
the source Build to the destination Build. It can also optionally
@@ -597,47 +589,48 @@
8.1 Alternative Means of Creating Jail Sources and PortsTrees
- By default, Jails and PortsTrees are updated using csup
- (/usr/bin/csup). Every time a new Jail or PortsTree is created,
- they will inherit the default update type. This update type is
- stored in ${pb}/scripts/etc/env/GLOBAL as defaultUpdateType. The
- allowed values are CVSUP, CSUP, LFTP, USER, and NONE. For CVSUP
- and CSUP there is also a defaultUpdateHost. This can also be
- changed in ${pb}/scripts/etc/env/GLOBAL.
+ PortsTrees are updated using csup (/usr/pkg/bin/csup) and Jails
+ are updated by fetch or git. Variables controlling how these
+ are updated are stored at ${pb}/scripts/etc/env/GLOBAL:
+
+ defaultUpdateHost: The host name of the cvsup server that
+ creates and updates the NetBSD pkgsrc tree
+ defaultUpdateType: CSUP. Don't modify.
+ defaultDragonHost: The protocol + host + path-to-iso-images
+ directory that contains DragonFly release ISO
+ images. The protocol can be http:// or ftp://
+ and the path-to-iso-images (which does not
+ include "/iso-images") can be omitted if the
+ it's a top level directory.
+ defaultDragonType: RELEASE (for Release ISO)
+ SNAPSHOT (for daily build ISOs)
+ GIT (to build world from source)
+ defaultGitSrcHost: The host name of the DragonFly Git mirror
A Jail or PortsTree's update type can also be set when creating
the Jail or PortsTree. To do this, specify the -u option to the
- appropriate create command. If the value of the update type is
- CVSUP, then /usr/local/bin/cvsup will be used to update the Jail
- or PortsTree. If the value is NONE, then no updates can be
+ appropriate create command. If the value is NONE, then no updates can be
performed once the Jail or PortsTree is created. Instead, it is
assumed these trees already exist in the appropriate format.
If the value is USER, then an update.sh script must be created
under the Jail or PortsTree's root directory. This script will be
called when an update is required. For example, if you have a Jail
- called "8.2", an executable update.sh script must be placed under
- ${pb}/jails/8.2. If you have a PortsTree called "FreeBSD", an
+ called "2.2", an executable update.sh script must be placed under
+ ${pb}/jails/2.2. If you have a PortsTree called "DragonFly", an
executable update.sh script must be placed under
- ${pb}/portstrees/FreeBSD.
+ ${pb}/portstrees/DragonFly.
--------------------------------------------------------------
8.2 Alternative Mounting
If you want to mount /ports inside your PortsTree or /src inside
- your Jail via nullfs or NFS from another location, use -m switch
- to create.
+ your Jail via NFS from another location, use -m switch to create.
Examples for NFS:
-
- # ./tc createPortsTree -p FreeBSD -m server:/directory
- # ./tc createJail -j 8-FreeBSD -m server:/directory
-
- Examples for nullfs:
-
- # ./tc createPortsTree -p FreeBSD -m /directory
- # ./tc createJail -j 8-FreeBSD -m /directory
+# ./tc createPortsTree -p DragonFly -m server:/directory
+# ./tc createJail -j 2.8-DragonFly -m server:/directory
Tinderbuild will ensure that these file systems are correctly
mounted so you do not need to mount them by your own before
@@ -662,7 +655,7 @@
# ./tc configDistfile -c localhost:${distfiles}
- * nullfs:
+ * nullfs (default):
# ./tc configDistfile -c ${distfiles}
@@ -719,8 +712,8 @@
PERL_VERSION=5.6.2
Likewise, if you want to enable debugging for a particular
- PortsTree (e.g. "FreeBSD-debug"), create the following
- portstree.FreeBSD-debug in ${pb}/scripts/etc/env/:
+ PortsTree (e.g. "DragonFly-debug"), create the following
+ portstree.DragonFly-debug in ${pb}/scripts/etc/env/:
CFLAGS="-O -g -pipe"
STRIP=
@@ -740,27 +733,14 @@
8.7 Configuring port OPTIONS
- It is possible to manipulate port OPTIONS on a per-Build basis. To
- do this, create a directory under which all build OPTIONS
- sub-directories will go (e.g. ${pb}/options/). For each Build that
- you wish to use to use OPTIONS, create a subdirectory named for
- that build (e.g. 8-STABLE-FreeBSD/). This directory should look
- like /var/db/ports/ in that it contains sub-directories for each
- OPTIONS-supporting port.
-
- For example, if you wanted to build net/wireshark with RTP support
- for the Build 8-STABLE-FreeBSD, you would have the following
- directory structure:
-
- ${pb}/options/8-STABLE-FreeBSD/wireshark/options
-
- The contents of the wireshark/options file would be:
-
- _OPTIONS_READ=wireshark-0.99.4
- WITH_RTP=true
- WITH_SNMP=true
- WITH_ADNS=true
- WITH_PCRE=true
+ It is possible to manipulate port OPTIONS on a per-Build basis.
+ To do this, create a directory under which all build OPTIONS
+ sub-directories will go (e.g. ${pb}/options/). For each Build
+ that you wish to use to use OPTIONS, create a subdirectory
+ named for that build (e.g. 2.12-DragonFly/), and place a single
+ text file named "pkg_options" in that directory. This file will
+ contain the customized options for every port in the build on a
+ per-distname basis.
Once this structure is setup, then enable OPTIONS support in
Tinderbox, and specify the path to the OPTIONS directory
@@ -776,15 +756,52 @@
-e enable OPTIONS support
-d disable OPTIONS support
- -o set an OPTIONS source directory tree
+ -o set an OPTIONS source directory tree
- If you would like to interactively choose OPTIONS for your ports,
- specify the -o option to "./tc addPort". This will perform a make
- config on all ports, displaying the ncurses OPTIONS dialog. All
- OPTIONS settings will be automatically saved to the correct
- location. Each time addPort or rescanPorts is run with the -o
- flag, all existing OPTIONS settings will be purged. If you want to
- retain existing OPTIONS, use the -O flag instead.
+ As an example of a per-distname basis, net/wget-1.12 and
+ net/wget-1.13.4 are considered two separate ports. If you had set
+ the options for version 1.12, then you would have to create a new
+ entry for net/wget-1.13.4 when it's time to upgrade that port.
+
+ Each line reports a port, and the line format is as follows:
+ <PKGNAME>:<JOB OVERRIDE>:<PKGSRC OPTIONS>
+
+ The <PKGNAME> would be wget-1.13.4 in this example, not
+ wget-1.13.4nb2. Leave off the nbX suffixes, otherwise the entry
+ will be ignored.
+
+ The <JOB OVERRIDE> is normally empty. For single CPU systems,
+ there is no point to set this. SMP systems will assume a job
+ number of 2 * number of CPUs + 1. If the port crashes and it's
+ suspect that it's an jobs-unsafe issue, set <JOB OVERRIDE> to 1
+ and try the port again.
+
+ The <PKGSRC OPTIONS> is the same as you'd see in the
+ $LOCALBASE/etc/mk.conf file.
+
+ sample pkg_options file:
+ gawk-3.1.8::portals
+ gcc-4.6.1:5:-gcc-fortran -gcc-objc nls
+ heirloom-070715:1:
+
+ Note that heirloom doesn't use the options framework, but we
+ still need to have an entry for it to override the MAKE_JOBS.
+
+ Unique to Tinderbox/pkgsrc is a file named
+ ${pb}/scripts/lib/boilerplate_mk.conf, and it contains settings
+ for mk.conf that aren't found in the standard ISO/snapshot make.conf
+ files. For example, it sets all licenses to be skipped and to
+ build vulnerable ports. It should not be modified since the digest
+ hash won't match when it's time to deinstall tinderbox-dragonfly.
+
+ There is another way to add settings, but on a per-build basis. In the
+ same directory as the pkg_options file (${optionsDir}/${build}),
+ one may add a file named "more_mk.conf". This file gets appended
+ to the standard + boilerplate make.conf. It actively filters out
+ MAKE_JOBS and PKG_OPTIONS* settings. Remember, pkg_options takes care
+ of those. The file more_mk.conf should contain settings like:
+ PYTHON_VERSION_DEFAULT= 27
+ PGSQL_VERSION_DEFAULT= 90
--------------------------------------------------------------
@@ -904,14 +921,14 @@
8.11 Running Tinderbox in a Jail
- Tinderbox can be run in a FreeBSD jail with some concessions.
+ Tinderbox can be run in a DragonFly jail with some concessions.
Since neither NFS nor nullfs (at the time of writing) are usable
in a jail, we cannot simply install and use as normal. Instead, we
simply use a chroot.
1. Create a jail for your Tinderbox using the instructions in the
- FreeBSD Handbook.
+ DragonFly Handbook.
2. Install dependencies into the jail (Chapter 2).
@@ -938,7 +955,6 @@
tinderd_enable="YES"
tinderd_chroot="${jail_dir}"
tinderd_directory="${pb}"
- tinderd_flags="-nullfs"
7. Install a web server of your choice in the jail, and follow
the webserver setup.

View file

@ -1,232 +0,0 @@
$NetBSD: patch-as,v 1.3 2011/11/20 16:20:24 marino Exp $
--- ../FreeBSD/lib/tc_command.pl 2011-11-20 13:05:28.355724000 +0000
+++ lib/tc_command.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/pkg/bin/perl
#-
# Copyright (c) 2004-2008 FreeBSD GNOME Team <freebsd-gnome@FreeBSD.org>
# All rights reserved.
@@ -188,15 +188,15 @@ my $ds = new Tinderbox::TinderboxDS();
help =>
"Add a jail to the datastore (do NOT call this directly; use createJail instead)",
usage =>
- "-j <jail name> -u CSUP|CVSUP|LFTP|SVN|USER|NONE -t <jail tag> [-d <jail description>] [-m <src mount source>] [-a <arch>]",
+ "-j <jail name> -u GIT|RELEASE|SNAPSHOT|USER|NONE -t <jail tag> [-d <jail description>] [-m <src mount source>] [-a <arch>]",
optstr => 'm:j:t:u:d:a:',
},
"addPortsTree" => {
func => \&addPortsTree,
help => "Add a portstree to the datastore",
usage =>
- "-p <portstree name> -u CSUP|CVSUP|SVN|USER|NONE [-d <portstree description>] [-m <ports mount source>] [-w <CVSweb URL>]",
- optstr => 'm:p:u:d:w:',
+ "-p <portstree name> [-t <cvs tag>] [-d <portstree description>] [-m <ports mount source>] [-w <CVSweb URL>]",
+ optstr => 'm:p:u:t:d:w:',
},
"addPort" => {
help => "Add a port to the datastore",
@@ -240,9 +240,16 @@ my $ds = new Tinderbox::TinderboxDS();
func => \&getDependenciesForPort,
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 EXTRACT_DEPENDS|PATCH_DEPENDS|FETCH_DEPENDS|BUILD_DEPENDS|LIB_DEPENDS|RUN_DEPENDS|TEST_DEPENDS|DEPENDS]",
optstr => 'b:d:t:',
},
+ "getDependencyCascades" => {
+ func => \&getDependencyCascades,
+ help => "Get unique dependencies of port's dependencies, recursively",
+ usage =>
+ "-b <build name> -d <port directory>",
+ optstr => 'b:d:',
+ },
"listHooks" => {
func => \&listHooks,
help =>
@@ -560,15 +567,15 @@ my $ds = new Tinderbox::TinderboxDS();
"createJail" => {
help => "Create a new jail",
usage =>
- "-j <jailname> -u CSUP|CVSUP|LFTP|SVN|USER|NONE [-t <tag>] [-d <description>] [-C] [-P <protocol>] [-H <updatehost>] [-D <updatehostdirectory>] [-m <mountsrc>] [-I] [-a <arch>]",
- optstr => 'j:t:d:CP:H:D:m:u:Ia:',
+ "-j <jailname> -u GIT|RELEASE|SNAPSHOT|USER|NONE -t <tag> [-d <description>] [-H <updatehost>] [-m <mountsrc>] [-I]",
+ optstr => 'j:t:d:H:m:u:I:',
},
"createPortsTree" => {
help => "Create a new portstree",
usage =>
- "-p <portstreename> -u CSUP|CVSUP|SVN|USER|NONE [-d <description>] [-C] [-P <protocol>] [-H <updatehost>] [-D <updatehostdirectory>] [-m <mountsrc>] [-w <cvsweburl>] [-I]",
- optstr => 'p:d:CP:H:Im:u:w:',
+ "-p <portstreename> [-t <cvs tag>] [-d <description>] [-C] [-H <updatehost>] [-m <mountsrc>] [-w <cvsweburl>] [-I]",
+ optstr => 'p:t:d:CH:Im:u:w:',
},
"createBuild" => {
@@ -592,21 +599,21 @@ my $ds = new Tinderbox::TinderboxDS();
"resetBuild" => {
help => "Cleanup and reset a Build environment",
- usage => "-b <buildname> [-n]",
- optstr => 'b:n',
+ usage => "-b <buildname>",
+ optstr => 'b:',
},
"tinderbuild" => {
help => "Generate packages from an installed Build",
usage =>
- "-b <build name> [-init] [-cleanpackages] [-updateports] [-skipmake] [-noclean] [-noduds] [-plistcheck] [-nullfs] [-cleandistfiles] [-fetch-original] [-onceonly] [portdir/portname [...]]",
+ "-b <build name> [-init] [-cleanpackages] [-updateports] [-skipmake] [-noclean] [-noduds] [-plistcheck] [-cleandistfiles] [-fetch-original] [-onceonly] [portdir/portname [...]]",
optstr => 'b:',
},
"updatePortsTree" => {
help => "Update an existing ports tree",
usage => "-p <portstreename>",
- optstr => 'p',
+ optstr => 'p:',
},
"copyBuild" => {
@@ -1489,8 +1496,18 @@ sub addPortsTree {
sub addPortToOneBuild {
my $build = $ds->getBuildByName($opts->{'b'});
my $makecache =
- new Tinderbox::MakeCache($ENV{'PORTSDIR'}, $ENV{'PKGSUFFIX'});
+ new Tinderbox::MakeCache($ENV{'PORTSDIR'}, $ENV{'OPTNFILE'});
my @bports = ();
+ my %oper_hash = (
+ EXTRACT_DEPENDS => 'ExtractDepends',
+ PATCH_DEPENDS => 'PatchDepends',
+ FETCH_DEPENDS => 'FetchDepends',
+ BUILD_DEPENDS => 'BuildDepends',
+ LIB_DEPENDS => 'LibDepends',
+ RUN_DEPENDS => 'RunDepends',
+ TEST_DEPENDS => 'TestDepends',
+ DEPENDS => 'Buildlink3Depends',
+ );
if (!$opts->{'d'}) {
foreach my $port ($ds->getPortsForBuild($build)) {
@@ -1502,7 +1519,25 @@ sub addPortToOneBuild {
if ($opts->{'R'}) {
foreach my $pdir (@bports) {
- addPorts($pdir, $build, $makecache, undef);
+ my $pCls = addPorts($pdir, $build, $makecache, undef);
+ $ds->clearDependenciesForPort($pCls, $build, undef);
+ foreach my $deptype (keys %oper_hash) {
+ my $oper = $oper_hash{$deptype};
+ foreach my $dn ($makecache->$oper($pdir)) {
+ my $dep = $ds->getPortByDirectory($dn);
+ next if (!defined($dep));
+ if (
+ !$ds->addDependencyForPort(
+ $pCls, $build,
+ $deptype, $dep
+ )
+ )
+ {
+ warn "WARN: Failed to add $deptype entry for $pdir: "
+ . $ds->getError() . "\n";
+ }
+ }
+ }
}
} else {
my @deps = @bports;
@@ -1516,15 +1551,6 @@ sub addPortToOneBuild {
}
foreach my $port (keys %seen) {
my $pCls = $seen{$port};
- my %oper_hash = (
- EXTRACT_DEPENDS => 'ExtractDepends',
- PATCH_DEPENDS => 'PatchDepends',
- FETCH_DEPENDS => 'FetchDepends',
- BUILD_DEPENDS => 'BuildDepends',
- LIB_DEPENDS => 'LibDepends',
- RUN_DEPENDS => 'RunDepends',
- TEST_DEPENDS => 'TestDepends',
- );
$ds->clearDependenciesForPort($pCls, $build, undef);
@@ -1548,7 +1574,6 @@ sub addPortToOneBuild {
}
}
}
-
}
}
@@ -1600,7 +1625,7 @@ sub addBuildPortsQueueEntry {
$ds->addBuildPortsQueueEntry($build, $portdir, $priority,
$user_id);
if (!$rc) {
- warn( "Failed to add port "
+ warn( "Failed to add port "
. $portdir
. " to the datastore: "
. $ds->getError()
@@ -1720,6 +1745,7 @@ sub getDependenciesForPort {
LIB_DEPENDS => 4,
RUN_DEPENDS => 5,
TEST_DEPEND => 6,
+ DEPENDS => 7,
);
if (!$opts->{'b'} || !$opts->{'d'}) {
@@ -1773,6 +1799,50 @@ sub getDependenciesForPort {
);
}
}
+
+sub getDependencyCascades {
+ if (!$opts->{'b'} || !$opts->{'d'}) {
+ usage("getDependencyCascades");
+ }
+
+ my $port = $ds->getPortByDirectory($opts->{'d'});
+ if (!defined($port)) {
+ cleanup($ds, 1,
+ "Port, "
+ . $opts->{'d'}
+ . " is not in the datastore.\n");
+ }
+
+ if (!$ds->isValidBuild($opts->{'b'})) {
+ cleanup($ds, 1, "Unknown build, " . $opts->{'b'} . "\n");
+ }
+
+ my $build = $ds->getBuildByName($opts->{'b'});
+
+ if (!$ds->isPortForBuild($port, $build)) {
+ cleanup($ds, 1,
+ "Port, "
+ . $opts->{'d'}
+ . " is not a valid port for build, "
+ . $opts->{'b'}
+ . "\n");
+ }
+
+ my @deps = $ds->getDependencyCascades($port, $build);
+
+ if (@deps) {
+ map { print $_->getDirectory() . "\n" } @deps;
+ } elsif (defined($ds->getError())) {
+ cleanup($ds, 1,
+ "Failed to get cascading dependencies for this port from the datastore: "
+ . $ds->getError()
+ . "\n");
+ } else {
+ cleanup($ds, 0,
+ "There are no cascading dependencies for this port in the datastore.\n"
+ );
+ }
+}
sub listBuildPortsQueue {
my $build_filter;

View file

@ -1,13 +0,0 @@
$NetBSD: patch-at,v 1.1 2011/11/02 21:13:28 marino Exp $
--- ../FreeBSD/webui/templates/paefchen/list_buildports.tpl 2011-10-29 23:52:39.000000000 +0000
+++ webui/templates/paefchen/list_buildports.tpl
@@ -19,7 +19,7 @@ include 'header.inc.tpl';
</tr>
<tr>
<th>System</th>
- <td>FreeBSD <?php echo $jail_name?> (<?php echo $jail_tag?>)</td>
+ <td>DragonFly <?php echo $jail_name?> (<?php echo $jail_tag?>)</td>
<td><?php echo $jail_lastbuilt?></td>
</tr>
<tr>

View file

@ -1,21 +0,0 @@
$NetBSD: patch-au,v 1.1 2011/11/02 21:13:28 marino Exp $
--- ../FreeBSD/lib/enterbuild 2011-10-16 00:52:55.000000000 +0000
+++ lib/enterbuild
@@ -30,14 +30,14 @@
portDir=$1
sleepName=$(echo ${portDir} | sed -e 'y/\//_/')
-cd /usr/ports/${portDir}
+cd /usr/pkgsrc/${portDir}
. /tmp/.set_${sleepName}
for i in $(set | grep = | awk -F= '{ print $1 }') ; do
export ${i}
done
echo "Current directory is now $(pwd)."
-echo "Workdir is set to ${WRKDIRPREFIX}/ports/${portDir}."
+echo "Workdir is set to ${WRKDIRPREFIX}/pkgsrc/${portDir}."
echo "Exit to continue the port build."
/bin/sh

View file

@ -1,41 +0,0 @@
$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
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/pkg/bin/perl
#-
# Copyright (c) 2004-2005 FreeBSD GNOME Team <freebsd-gnome@FreeBSD.org>
# All rights reserved.
@@ -139,7 +139,7 @@ my (
);
$portbase = $ENV{'PORTSDIR'};
-$makecache = new Tinderbox::MakeCache($portbase, $ENV{'PKGSUFFIX'});
+$makecache = new Tinderbox::MakeCache($portbase, $ENV{'OPTNFILE'});
while (scalar(@PORTS)) {
my $port = shift @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
- # are marked IGNORE or FORBIDDEN).
+ # are marked _CBBH (aka not for this platform) ).
if (!$noduds) {
my $dudpkg = $makecache->IgnoreList($portdir);
push @duds, $dudpkg if ($dudpkg);
@@ -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\" ",
+ $edeplst, $pdeplst, $fdeplst, $bdeplst, $rdeplst, $tdeplst;
+ printf MK "%s /usr/pkgsrc/%s\n", $pname, $key;
}
close(MK);

View file

@ -1,234 +0,0 @@
$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
@@ -31,14 +31,14 @@ use strict;
# a list of variables that we pull from the port Makefile
our @makeTargets = (
- 'PKGNAME', 'IGNORE',
- 'NO_PACKAGE', 'FORBIDDEN',
+ 'PKGNAME', '_CBBH',
'EXTRACT_DEPENDS', 'PATCH_DEPENDS',
'FETCH_DEPENDS', 'BUILD_DEPENDS',
'LIB_DEPENDS', 'RUN_DEPENDS',
'TEST_DEPENDS', 'MAINTAINER',
- 'COMMENT', 'PORTNAME',
- 'DISTFILES',
+ 'COMMENT', 'PKGBASE',
+ 'DISTFILES', 'BOOTSTRAP_DEPENDS',
+ 'DEPENDS'
);
# Create a new cache object
@@ -48,6 +48,7 @@ sub new {
CACHE => undef,
SEEN => undef,
BASEDIR => shift,
+ OPTFILE => shift,
}, $name;
$self;
@@ -60,20 +61,95 @@ 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);
- $tmp = '-V ' . join(' -V ', @makeTargets);
+ foreach $target (@makeTargets) {
+ $tmp .= "-V '\${" . $target . "}' ";
+ }
my $dir = $self->{BASEDIR} . '/' . $port;
- @ret = split("\n", `cd $dir && make $tmp`);
+ my $customOptions = $self->_package_options ($dir);
+ my $nativeOptions = $self->_native_preferences ();
+ @ret = split("\n", `cd $dir && bmake $customOptions $nativeOptions $tmp`);
foreach $tmp (@makeTargets) {
- $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;
}
+# Get option variable name and requested options
+sub _package_options {
+ my $self = shift;
+ my $dir = shift;
+ unless (-e $self->{OPTFILE}) {
+ return "";
+ }
+ my @data = split("\n",
+ `cd $dir && bmake -V '\${PKGNAME}' -V '\${PKG_OPTIONS_VAR}'`);
+ my $pkname = $data[0];
+ my $optvar = $data[1];
+ $pkname =~ s/nb[0-9]+$//;
+ my $instruction = `grep ^$pkname: $self->{OPTFILE}`;
+ unless ($instruction) {
+ return "";
+ }
+ my @customSet = split(/:/, $instruction);
+ unless (scalar (@customSet) >= 3) {
+ return "";
+ }
+ return $optvar . '="' . $customSet[2] . '"';
+}
+
+# Recreate a trim function
+sub _trim {
+ my $self = shift;
+ my $string = shift;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ return $string;
+}
+
+# Figure out if we want to avoid built-in dependencies or not
+sub _native_preferences {
+ my $self = shift;
+ my $moremk = $self->{OPTFILE};
+ $moremk =~ s!/?[^/]*/*$!!;
+ $moremk .= '/more_mk.conf';
+ unless (-e $moremk) {
+ return "";
+ }
+ my @worker;
+ 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) {
+ $result = 'PREFER_PKGSRC="' . $self->_trim($worker[1]) . '" ';
+ }
+ }
+ if ($pnative) {
+ @worker = split(/=/, $pnative);
+ if (scalar (@worker) >= 2) {
+ $result .= 'PREFER_NATIVE="' . $self->_trim($worker[1]) . '" ';
+ }
+ }
+ if ($develop) {
+ $result .= 'PKG_DEVELOPER=yes ';
+ }
+ $result .= 'SKIP_LICENSE_CHECK=yes ';
+ return $result;
+}
+
# Internal function for returning a port variable
sub _getVariable {
my $self = shift;
@@ -90,16 +166,30 @@ sub _getList {
my $port = shift;
my $item = shift;
my @deps;
+ my $found;
$self->_execMake($port);
foreach my $dep (split(/\s+/, $self->{CACHE}->{$port}{$item})) {
- 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}/||;
+ if ($d =~ /^{perl>=?5.+,.+}$/) {
+ $ddir = "lang/perl5"
+ } else {
+ $ddir =~ s|^$self->{BASEDIR}/||;
+ $ddir =~ s|^\.\.\/\.\.\/||;
+ }
if ($ddir) {
- push @deps, $ddir;
+ $found = 0;
+ foreach my $storedep (@deps) {
+ if ($storedep eq $ddir) {
+ $found = 1;
+ }
+ }
+ if (!$found) {
+ push @deps, $ddir;
+ }
}
}
return @deps;
@@ -109,7 +199,7 @@ sub _getList {
sub Name {
my $self = shift;
my $port = shift;
- return $self->_getVariable($port, 'PORTNAME');
+ return $self->_getVariable($port, 'PKGBASE');
}
# Package name
@@ -133,6 +223,13 @@ sub Maintainer {
return $self->_getVariable($port, 'MAINTAINER');
}
+# Buildlink3 dependencies
+sub Buildlink3Depends {
+ my $self = shift;
+ my $port = shift;
+ return $self->_getList($port, 'DEPENDS');
+}
+
# Extract dependencies
sub ExtractDepends {
my $self = shift;
@@ -189,8 +286,8 @@ sub IgnoreList {
my $n = 0;
$self->_execMake($port);
- foreach my $var ('NO_PACKAGE', 'IGNORE', 'FORBIDDEN') {
- $n++ if ($self->{CACHE}->{$port}{$var} ne "");
+ foreach my $var ('_CBBH') {
+ $n++ if ($self->{CACHE}->{$port}{$var} ne "yes");
}
return $n eq 0 ? "" : $self->PkgName($port);
}
@@ -206,6 +303,17 @@ sub FetchDependsList {
return grep { !$uniq{$_}++ } @deps;
}
+sub Buildlink3DependsList {
+ my $self = shift;
+ my $port = shift;
+
+ my @deps;
+ push(@deps, $self->Buildlink3Depends($port));
+
+ my %uniq;
+ return grep { !$uniq{$_}++ } @deps;
+}
+
sub ExtractDependsList {
my $self = shift;
my $port = shift;
@@ -250,6 +358,7 @@ sub BuildDependsList {
push(@deps, $self->FetchDepends($port));
push(@deps, $self->BuildDepends($port));
push(@deps, $self->LibDepends($port));
+ push(@deps, $self->Buildlink3Depends($port));
my %uniq;
return grep { !$uniq{$_}++ } @deps;
@@ -263,6 +372,7 @@ sub RunDependsList {
my @deps;
push(@deps, $self->LibDepends($port));
push(@deps, $self->RunDepends($port));
+ push(@deps, $self->Buildlink3Depends($port));
my %uniq;
return grep { !$uniq{$_}++ } @deps;

View file

@ -1,101 +0,0 @@
$NetBSD: patch-az,v 1.1 2011/11/02 21:13:30 marino Exp $
--- ../FreeBSD/lib/Tinderbox/TinderboxDS.pm 2011-10-16 00:52:55.000000000 +0000
+++ lib/Tinderbox/TinderboxDS.pm
@@ -753,6 +753,96 @@ sub clearDependenciesForPort {
return $rc;
}
+sub getDependencyCascades_search {
+ my $self = shift;
+ my $build_id = shift;
+ my $port_id = shift;
+ my $typelimit = shift;
+
+ my @results = ();
+ my @params = ($build_id, $port_id);
+ my $query = "SELECT build_port_id " .
+ "FROM build_ports " .
+ "WHERE build_id=? AND port_id=?";
+ my $rc = $self->_doQueryHashRef($query, \@results, @params);
+ if (!$rc) {
+ return undef;
+ }
+ my $build_port_id = $results[0]->{'build_port_id'};
+
+ @results = ();
+ @params = ($build_port_id);
+ $query = "SELECT port_id " .
+ "FROM port_dependencies " .
+ "WHERE build_port_id=? ";
+
+ if ($typelimit) {
+ $query .= "AND dependency_type IN " .
+ "('DEPENDS','RUN_DEPENDS','LIB_DEPENDS')";
+ }
+
+ $rc = $self->_doQueryHashRef($query, \@results, @params);
+ if (!$rc) {
+ return undef;
+ }
+
+ my @deps = ();
+ foreach my $result (@results) {
+ push @deps, $result->{'port_id'};
+ }
+ return @deps;
+}
+
+sub getDependencyCascades {
+ my $self = shift;
+ my $port = shift;
+ my $build = shift;
+
+ $self->verifyType(1, $port, 'Port');
+ $self->verifyType(2, $build, 'Build');
+
+ my $pkg;
+ my @CascadeSet = ();
+ my %CheckList = ($port->getId(), 1);
+ my @FirstList = $self->getDependencyCascades_search (
+ $build->getId(), $port->getId(), 0);
+ foreach $pkg(@FirstList) {
+ $CheckList{$pkg} = 0;
+ }
+ my $cascadePkg;
+ my @NextList;
+ my @mandate = @FirstList;
+ my $advance = (scalar keys %CheckList > 0);
+ while ($advance) {
+ foreach $pkg (@mandate) {
+ $CheckList{$pkg} = 1;
+ @NextList = $self->getDependencyCascades_search (
+ $build->getId(), $pkg, 1);
+ foreach $cascadePkg (@NextList) {
+ if (!exists $CheckList{$cascadePkg}) {
+ $CheckList{$cascadePkg} = 0;
+ push @CascadeSet, $cascadePkg;
+ }
+ }
+ }
+ @mandate = ();
+ $advance = 0;
+ foreach $pkg (keys %CheckList) {
+ if ($CheckList{$pkg} == 0) {
+ push @mandate, $pkg;
+ $advance = 1;
+ }
+ }
+ }
+
+ my @deps = ();
+ foreach $pkg (@CascadeSet) {
+ my $pCls = $self->getPortById($pkg);
+ push @deps, $pCls if (defined($pCls));
+ }
+ return @deps;
+}
+
sub getDependenciesForPort {
my $self = shift;
my $port = shift;

View file

@ -1,19 +0,0 @@
$NetBSD: patch-ba,v 1.1 2011/11/02 21:13:30 marino Exp $
--- ../FreeBSD/tc 2011-10-16 00:52:55.000000000 +0000
+++ tc
@@ -87,12 +87,12 @@ copyBuild|\
tbversion|\
updatePortsTree)
${command} ${1+"$@"} || \
- perl ${pb}/scripts/lib/tc_command.pl ${command} ${1+"$@"}
+ /usr/pkg/bin/perl ${pb}/scripts/lib/tc_command.pl ${command} ${1+"$@"}
rc=$?
;;
# Otherwise we punt over to the perl dispatcher
-*) perl ${pb}/scripts/lib/tc_command.pl ${command} ${1+"$@"}
+*) /usr/pkg/bin/perl ${pb}/scripts/lib/tc_command.pl ${command} ${1+"$@"}
rc=$?
;;

View file

@ -1,78 +0,0 @@
$NetBSD: patch-bb,v 1.1 2011/11/02 21:13:31 marino Exp $
--- ../FreeBSD/webui/templates/paefchen/tinderstyle.css 2011-10-16 00:52:55.000000000 +0000
+++ webui/templates/paefchen/tinderstyle.css
@@ -17,14 +17,18 @@ body, td, li, input, select, label, #con
a:link, a:visited {
color : #900;
+ text-decoration : none;
+ margin : 2px 4px;
}
+
a:hover {
- color : #000;
+ color : #C30;
+ text-decoration : underline;
}
table {
- background-color : #EEE;
+ background-color : #F7F7F7;
border-collapse : collapse;
border-color : #CACACA;
border-spacing : 0;
@@ -69,6 +73,12 @@ input[type="submit"] {
border-width : 1px 2px 2px 1px;
}
+#member {
+ margin-left : 10px;
+ color : #666;
+ font-weight : bold;
+}
+
input:focus, input:hover, select:focus, select:hover {
background-color : #FFF;
}
@@ -237,7 +247,7 @@ label {
}
td.port_success {
- background-color : #E8FFE8;
+ background-color : #BEFEEB;
}
td.port_dud {
background-color : yellow;
@@ -263,11 +273,11 @@ td.port_depend {
background-color : #FFA500;
}
td.port_default {
- background-color : #808080;
+ background-color : #C0C0C0;
}
td.build_portbuild {
- background-color : green;
+ background-color : #3C9;
}
td.build_prepare {
background-color : #ADD8E6;
@@ -276,13 +286,13 @@ td.build_default {
}
td.queue_entry_enqueued {
- background-color : #808080;
+ background-color : #C0C0C0;
}
td.queue_entry_processing {
- background-color : green;
+ background-color : #3C9;
}
td.queue_entry_success {
- background-color : #E8FFE8;
+ background-color : #BEFEEB;
}
td.queue_entry_fail {
background-color : red;

View file

@ -1,25 +0,0 @@
$NetBSD: patch-bc,v 1.1 2011/11/02 21:13:31 marino Exp $
--- ../FreeBSD/webui/templates/paefchen/header.inc.tpl 2011-10-16 00:52:55.000000000 +0000
+++ webui/templates/paefchen/header.inc.tpl
@@ -19,11 +19,6 @@ if (preg_match('@<!-- (\w+):(\w+);(\w+):
<div class="left">
<h1><a href="index.php"><?php echo $tinderbox_title?></a><?php if (! empty($header_title)) print " - ".$header_title; ?></h1>
</div>
- <div class="right">
- <?php if (! empty($user_name)) { ?>
- <h1>Welcome <?php echo $user_name?>!</h1>
- <?php } ?>
- </div>
</div>
<div id="topmenu">
<a id="top"></a>
@@ -46,7 +41,7 @@ if (preg_match('@<!-- (\w+):(\w+);(\w+):
<li><a href="index.php?action=display_add_user">Add User</a></li>
<?php } ?>
<li><a href="index.php?action=display_modify_user&amp;modify_user_id=<?php echo $user_id?>">Modify Me</a></li>
- <li><input type="submit" name="do_logout" value="Logout" /></li>
+ <li><input type="submit" name="do_logout" value="Logout" id="logout_ctrl"/><span id="member"><?php echo $user_name ?></span></li>
<?php } ?>
</ul>
</form>

View file

@ -1,11 +0,0 @@
$NetBSD: patch-be,v 1.1 2011/11/02 21:13:32 marino Exp $
--- /dev/null
+++ lib/boilerplate_mk.conf
@@ -0,0 +1,6 @@
+### HEAD: BOILERPLATE MK.CONF SETTINGS ###
+
+SKIP_LICENSE_CHECK= yes
+ALLOW_VULNERABLE_PACKAGES= yes
+
+### TAIL: BOILERPLATE MK.CONF SETTINGS ###