RBULK-BUILD(1)

NAME
rbulk-build - run a bulk build of robotpkg

SYNOPSIS
rbulk-build [-f file] [-k] [arg...]

DESCRIPTION
rbulk-build runs a bulk build of robotpkg or a subdirectory of robotpkg. It produces an HTML summary report as well as a set of ready to use binary packages. It is basically a wrapper shell script on top of other tools and performs the following tasks:
•   Mark the HTML report as 'running' for the corresponding architecture.
•   Update robotpkg source tree (or the configured subdirectory).
•   Update pkgtools/rbulkit package.
•   Run the robotpkg bulk target for the configured package set.
•   After each package build, update the HTML report to reflect the current status.
•   Generate the final HTML report.

A running instance of rbulk-build can be interrupted by invoking rbulk-build with the -k flag. The configuration file is still read in this case, for instance for the definition of bulk_logdir (see CONFIGURATION FILE). Interruption uses the robotpkg bulk STOP file, so that each build is properly terminated.

rbulk-build is also NFS safe, in the sense that all access to shared files are locked with rbulk-locked(1) ( q.v.)

rbulk-build read its configuration from /opt/openrobots/etc/rbulk.conf by default, or from the file specified with the -f option. If the configuration file is a relative path, it is interpreted to be relative to /opt/openrobots/etc.

CONFIGURATION FILE
rbulk-build configuration file is an sh(1) script that must define the following variables, with the regular var=value form:

git, make, rsync, sendmail
    Configures the absolute invocation path for the corresponding programs.

robotpkg_conf
    The absolute path to the robotpkg.conf file for doing the builds.

robotpkg_src
    The absolute path to the robotpkg source tree. It must be properly bootstraped before rbulk-build is run.

robotpkg_subdir
    If not empty, only this subdirectory of robotpkg is updated before building. This variable also sets which packages are included in the HTML report (only packages located below robotpkg_subdir are included). However, depending on the configured bulk target (see bulk_target below), more packages can actually be built. If empty, the base robotpkg tree is used.

robotpkg_pull
    Arguments that are passed as-is to git-pull(1) for updating the robotpkg tree. Empty means to pull from origin master.

bulk_base
    The absolute path where to temporary install the packages. This is also the prefix of the produced binary packages. This is typically set to /opt/openrobots.

bulk_localbase
    The absolute path to the installation prefix of the robotpkg tree in $robotpkg_src. In other words, this is the path used to bootstrap the robotpkg tree, and it must be different from $bulk_base.

bulk_logdir
    A directory where to temporarily put all the log files from the robotpkg bulk target. $bulk_localbase/var/log/bulk is a good choice.

bulk_email
    A valid e-mail address where to send reports. A message is sent only when a fatal, unexpected failure in encountered during the rbulk-build execution. A message is not sent if a package merely fails to build (this is mentionned in the HTML report instead).

bulk_target
    The target to invoke for building. If the target involves a set of packages, this set must be defined in $robotpkg_conf by a corresponding PKGSET.<set> variable.

bulk_db
    The absolute path to a sqlite3(1) database where the status of each package is stored. The database is created if it does not exist. See rbulk-report(1) for details.

bulk_tag
    A name for the build. If empty, the architecture name is used, e.g. NetBSD-6.99.16-i386. Leave this empty if unsure.

report_url
    An rsync(1) compatible URL where to upload the final HTML report. This can also be an absolute local path.

report_email
    Optional e-mail address to which to send the status updates e-mail report. If empty or not defined, no e-mail will be sent.

See /opt/openrobots/share/examples/rbulkit/rbulk.conf for an example configuration file.

NOTES
The robotpkg.conf file must contain the following code to be able to update the summary HTML after each package build:

    post-bulk:
    	@${PHASE_MSG} "Running post bulk hooks for ${PKGNAME}"
    	@$(or ${POST_BULK_HOOK},:)

FILES
/opt/openrobots/
etc/rbulk.conf
share/examples/rbulkit/rbulk.conf

SEE ALSO
rbulk-dispatch(1), rbulk-locked(1), rbulk-notify(1), rbulk-report(1), rbulk-watchd(1).