2008-02-15 08:37:11 +01:00
|
|
|
Step One: Suggested File System Layout
|
2007-07-25 19:26:59 +02:00
|
|
|
|
|
|
|
For the DragonFly builds I'm using:
|
|
|
|
- /bulklog for the bulk meta data and log files of each package
|
|
|
|
- /scratch as WRKOBJDIR
|
|
|
|
- /distfiles as DISTDIR
|
|
|
|
- /packages as PACKAGES
|
2008-02-15 08:37:11 +01:00
|
|
|
- separate physical file systems for /var and /usr/pkg
|
|
|
|
All file systems but those are read-only, /tmp and /dev need platform
|
2007-07-25 19:26:59 +02:00
|
|
|
specific handling either as tmpfs or link. ptyfs helps for /dev.
|
|
|
|
|
|
|
|
For parallel builds, /bulklog, /packages and /usr/pkgsrc are supposed to
|
|
|
|
be shared (null mounts, NFS). /usr/pkg and /var/db/pkg needs to be
|
|
|
|
per-node and /scratch should be per-node.
|
|
|
|
|
2008-04-04 20:31:25 +02:00
|
|
|
The defaults scripts will remove /usr/pkg and /var/db/pkg on the master
|
|
|
|
node as well. When using chroot sandboxes for the build, the master can
|
|
|
|
share a sandbox with one of the build instances.
|
|
|
|
|
2007-07-25 19:26:59 +02:00
|
|
|
Step Two: Preparing pbulk prefix
|
|
|
|
|
|
|
|
Install pkgtools/pbulk and possibly helper programs like screen into
|
|
|
|
LOCALBASE=/usr/pkg_bulk, PKG_DBDIR=/usr/pkg_bulk/.pkgdb. A full
|
2008-02-15 08:37:11 +01:00
|
|
|
bootstrap is the recommended approach. Copy /usr/pkg_bulk to the client
|
2007-07-25 19:26:59 +02:00
|
|
|
nodes for parallel builds.
|
|
|
|
|
2008-04-15 23:47:17 +02:00
|
|
|
The initial bootstrap and install may be performed with the following commands:
|
|
|
|
|
|
|
|
cd /usr/pkgsrc/bootstrap
|
|
|
|
./bootstrap --prefix=/usr/pkg_bulk --pkgdbdir=/usr/pkg_bulk/.pkgdb
|
|
|
|
|
|
|
|
If you have already performed a bootstrap into /usr/pkg_bulk then you may need
|
|
|
|
to remove that directory (rm -fr /usr/pkg_bulk) prior to starting the new
|
|
|
|
bootstrap.
|
|
|
|
|
|
|
|
pbulk may be installed into /usr/pkg_bulk with the following:
|
|
|
|
|
|
|
|
cd /usr/pkgsrc/pkgtools/pbulk
|
2014-04-17 10:22:11 +02:00
|
|
|
env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} bmake install
|
2008-04-15 23:47:17 +02:00
|
|
|
|
|
|
|
The mk.conf file in /usr/pkg_bulk/etc/mk.conf should already have the
|
|
|
|
correct LOCALBASE and PKG_DBDIR settings.
|
|
|
|
|
2007-07-25 19:26:59 +02:00
|
|
|
Step Three: Configure pbulk
|
|
|
|
|
|
|
|
(a)
|
|
|
|
Setup general build parameters in mk.conf. Below is an example
|
2008-04-15 23:47:17 +02:00
|
|
|
fragment to add. On NetBSD this is typically /etc/mk.conf. For
|
|
|
|
non-NetBSD systems we will create a mk.conf in a temporary location,
|
|
|
|
/tmp/mk.conf for example, and include it in the bootstrap that will
|
|
|
|
be built in step (b).
|
2007-07-25 19:26:59 +02:00
|
|
|
|
2008-02-15 08:37:11 +01:00
|
|
|
(b) [not for NetBSD]
|
2007-07-25 19:26:59 +02:00
|
|
|
Build a binary bootstrap kit and override the included mk.conf with the
|
2008-04-15 23:47:17 +02:00
|
|
|
file created in (a). Compress the tarball with gzip. This is a new
|
|
|
|
bootstrap that is different from the one created in Step Two above.
|
|
|
|
|
|
|
|
This bootstrap kit is created by the following:
|
|
|
|
|
|
|
|
|
|
|
|
cd /usr/pkgsrc/bootstrap
|
|
|
|
./bootstrap --mk-fragment /tmp/mk.conf \
|
2008-05-15 14:13:00 +02:00
|
|
|
--gzip-binary-kit bootstrap_kit.tar.gz
|
2008-04-15 23:47:17 +02:00
|
|
|
|
|
|
|
Note that we have specified the make file fragment, /tmp/mk.conf, created
|
|
|
|
in step (a) above.
|
2007-07-25 19:26:59 +02:00
|
|
|
|
|
|
|
(c)
|
|
|
|
Edit /usr/pkg_bulk/etc/pbulk.conf:
|
|
|
|
- For NetBSD:
|
|
|
|
- bootstrapkit should be empty.
|
2008-04-15 23:47:17 +02:00
|
|
|
- make must be changed to /usr/bin/make.
|
|
|
|
|
2007-07-25 19:26:59 +02:00
|
|
|
- For non-NetBSD:
|
|
|
|
- bootstrapkit should be changed to the tarball in (b). Both master
|
|
|
|
and client nodes access this, so keep it in a shared location.
|
|
|
|
|
|
|
|
- master_mode=yes needs a proper list of client nodes.
|
|
|
|
- base_url goes into the report mail, the rsync targets are used
|
|
|
|
for uploads.
|
|
|
|
- for limited bulk builds, set limited_list to a file with one
|
2008-04-15 23:47:17 +02:00
|
|
|
location per line ("x11/gtk2" for example). Packages that are required
|
|
|
|
as dependencies will be added automatically.
|
2007-07-25 19:26:59 +02:00
|
|
|
|
|
|
|
Step Four: Running pbulk
|
|
|
|
|
2008-04-15 23:47:17 +02:00
|
|
|
/usr/pkg_bulk/bin/bulkbuild runs the full build. You may wish to run
|
|
|
|
this inside of screen (misc/screen) since a full bulk build may take
|
|
|
|
a very long time.
|
2007-07-25 19:26:59 +02:00
|
|
|
|
|
|
|
/usr/pkg_bulk/libexec/pbulk/{pre-build,scan,build,report,upload} are the
|
|
|
|
individual build phases. They depend on the execution of the phase
|
|
|
|
before. Exceptions are report and upload which both depend on build.
|
|
|
|
|
2008-04-04 20:31:25 +02:00
|
|
|
/usr/pkg_bulk/bin/bulkbuild-restart can be used to resume an aborted
|
|
|
|
build. If it failed after the actual build phase, report and upload should
|
|
|
|
be called individually though.
|
|
|
|
|
2007-07-25 19:26:59 +02:00
|
|
|
--- sample mk.conf fragment ---
|
|
|
|
|
|
|
|
WRKOBJDIR = /scratch
|
|
|
|
PKGSRCDIR = /usr/pkgsrc
|
|
|
|
DISTDIR = /distfiles
|
|
|
|
PACKAGES = /packages
|
|
|
|
|
|
|
|
FAILOVER_FETCH= yes
|
|
|
|
|
|
|
|
X11_TYPE= modular
|
|
|
|
|
2009-06-14 17:17:10 +02:00
|
|
|
SKIP_LICENSE_CHECK= yes
|
2007-07-25 19:26:59 +02:00
|
|
|
ALLOW_VULNERABLE_PACKAGES= yes
|
|
|
|
|
|
|
|
PKG_DEVELOPER?= yes
|