pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bob v0.99.x and wip package now available
* On 2026-04-10 at 23:13 BST, Stepan Ipatov wrote:
I recently switched my package builds over to bob, and I have to say
it works really well — thanks for such a great tool. I haven't run any
precise benchmarks, but subjectively it feels noticeably faster than
pbulk.
Yeh it's significantly faster than pbulk in a number of different
places, notably:
* Scans call bmake directly rather than exec'ing a shell, and the
support for cachevars (now builtin) mean improvements for many users
out of the box. I struggled to get pbulk scans under 10 minutes for
recent pkgsrc trees, whereas bob is done in around 2m 30s now for a
full tree scan on my systems.
* Limited build scans proceed at full speed during resolution runs,
rather than having to restart for every phase. I haven't measured
this yet but it feels significantly faster, on the order of seconds
vs minutes for a limited_list scan.
* The presolve step can be done standalone and is measurably faster
than pbulk, 70x faster in my tests (35s vs 0.5s).
* The pkg-up-to-date check is done once for all packages at the start
of a build in native Rust. This one is hard to measure but my best
guess is that it saves at least a second per package, which adds up when
you are building ~30,000 packages. If you have any pre-build setup
then this will be even greater as bob simply avoids starting these
builds entirely. The benefits aren't only performance, this unlocks
many incredibly useful features like 'bob status', as you now know
exactly what needs to be done in advance at the start of a build, and
exactly why a package needs rebuilding (so that you can potentially
do something about it prior to the build.)
* pkg_summary generation is again done in native Rust, and in parallel,
making it about 10x faster than pbulk in my runs.
Depending on the setup there may be other huge wins, e.g. not requiring
a separate /usr/pbulk or similar prefix might save a huge amount of time
bootstrapping or setting it up inside the sandboxes.
And of course there's the new dynamic scheduler which tunes MAKE_JOBS
and tmpfs WRKOBJDIR automatically, which can have massive performance
benefits.
The only issue I've run into so far is that, for some reason, the
sandbox isn't always cleaned up after building Rust applications.
After the build finishes, I get the following warning:
Destroying 4 sandboxes...
sandbox 1: Cannot remove sandbox: non-directory exists at
/mnt/bob/chroot/1/root/.cargo/.package-cache
Warning: failed to destroy 1 sandbox
The best fix for this would be to create and enable the build_user, as
not only does that give you unprivileged builds, the default config
already includes a section for removing the build_user home directory on
sandbox destroy:
{ action = "cmd", only = { set = "pkgsrc.build_user" }, create = [[
mkdir -p ${bob_sandbox_path}${bob_build_user_home}
chown ${bob_build_user} ${bob_sandbox_path}${bob_build_user_home}
]],
destroy = "rm -rf ${bob_sandbox_path}${bob_build_user_home}" },
If you wish to continue building as root then you could add something
similar, e.g.:
{ action = "cmd", destroy = "rm -rf ${bob_sandbox_path}/root" },
at the end of your setup actions which will remove /root from each sandbox
on destroy. Alternatively make /root a tmpfs mount:
{ action = "mount", fs = "tmp", dir = "/root" },
in which case it'll automatically be unmounted at the end.
A third option would be to add a similar cleanup action to the new
sandboxes.hooks section which is performed for each build rather than
only on sandbox creation/destruction. The benefit of cleanup here is
that it ensures that each build gets a perfectly clean environment, and
isn't potentially tainted by any leftovers in /root from a previous
build.
Either way the config is designed to be flexible for anyone's personal
preference to be accommodated.
Cheers,
--
Jonathan Perkin pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index