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_symlinks
A 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_mount
unpopulate
snapshot
locate
resolv
copy_ports
copy_sys
unpopulate_light
ldconfig
devs
checkout_ports
portscvs
location.ports_subdirs
chown_all
is set to 1,
chown(2) any content within
to the appropriate users.stragglers
write_mk
check_symlinks
By 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_USER
BUILD_USER
FETCH_USER
LOG_USER
BUILD_USER
)PORTSDIR
DISTDIR
PACKAGE_REPOSITORY
PLIST_REPOSITORY
LOCKDIR
WRKOBJDIR
chown_all
ports_subdirs
change
owners of every content.extra
mkconf_lines
mkconf_tail
preserve
unpopulate
.sets
snapshot
snapshot
action.portscvs
checkout_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.
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>
December 19, 2019 | OpenBSD-6.8 |