| PROOT(1) | General Commands Manual | PROOT(1) |
proot — ports
chroot builder
proot |
[-B chroot]
[-c configfile]
[-S srcroot]
[attribute=value ...] |
proot can fill up a chroot directory for
ports building usage. It will perform a set of
actions that should fill up a destination
chroot directory from the base system (or an optional
srcroot).
As far as possible, proot will create
hardlinks instead of copying files, so that cloning an existing chroot will
often only consume i-nodes.
Some attributes can take multiple values. As a shorthand, several values can be specified in a row without having to repeat the attribute name, for instance:
proot -B /build
actions=unpopulate_light check_symlinksA configfile mostly contains one attribute=value assignment per line, with comments starting with a ‘#’ character.
Possible actions (in the order of
execution) are as follows:
check_mountunpopulatesnapshottrusted_snapshotsnapshot, but without signature checking. Use
with caution, usually with snapshots you've built yourself.locateresolvcopy_portscopy_sysunpopulate_lightldconfigdevscheckout_portsportscvs location.ports_subdirschown_all is set to 1,
chown(2) any content within to
the appropriate users.stragglerswrite_mkcheck_symlinksBy default, proot will run
check_mount,
unpopulate_light, devs,
ldconfig, ports_subdirs,
resolv, write_mk. If
unpopulate is used,
unpopulate_light won't be run. It will also run
snapshot if a snapshot location is provided, or
locate otherwise.
Add actions with
actions=value, remove them
with actions=-value.
Other attributes are:
chroot-B chrootsrcroot-S srcrootPORT_USERBUILD_USERFETCH_USERLOG_USERBUILD_USER)LOGDIRPORTSDIRDISTDIRPACKAGE_REPOSITORYPLIST_REPOSITORYLOCKDIRWRKOBJDIRchown_allports_subdirs change
owners of every content.extramkconf_linesmkconf_tailpreserveunpopulate.setssnapshotsnapshot action.portscvscheckout_ports action.The following entries won't be erased during a
locate or unpopulate*
action:
preserve
attribute.snapshot directory containing the base
sets.DISTDIR, WRKOBJDIR,
LOGDIR,
PACKAGE_REPOSITORY,
PLIST_REPOSITORY,
LOCKDIR.PORTSDIR itself, unless
copy_ports is used.extra files, key files...The following configfile sets things up for an initial build on a dpb(1) cluster (refer to bulk(8) for typical setups of such build clusters).
chroot=/build PORT_USER=espie extra=/home/espie/startup WRKOBJDIR=/tmp/pobj LOCKDIR=/tmp/locks PLIST_REPOSITORY=/data/plist DISTDIR=/data/distfiles PACKAGE_REPOSITORY=/data/packages actions=unpopulate_light copy_ports
It assumes /build/data is a separate
partition that won't be cleaned up by
unpopulate_light, and that can be mounted on slaves.
Note also that /tmp should be a fast local directory
on every machine of the cluster.
/home/espie/startup is a startup script for dpb(1).
Initial invocation on the master could be
proot
-c configfile
chown_all=1to ensure correct permissions for existing data under various ports directories.
Slaves should not need the extra arguments, as the directories will already have correct owners.
Marc Espie <espie@openbsd.org>
| April 11, 2023 | openbsd |