pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bob v0.1.0 ready for beta testing



* On 2025-12-29 at 21:29 GMT, David Brownlee wrote:

- Is it recommended to "cargo install pkgbob" and all other steps as
root (docs imply but do not state)

Not necessarily. cargo defaults to installing to your home directory, but as long as you have PATH set correctly the installed binary can be owned by any user, or install as non-root and run everything as 'sudo bob', etc.

- The setup notes for "bob init <path>" do not mention that <path>
must not already be present - might it be possible to for it also
accept an empty dir?

Ok, I'll add this.

- Would it be possible to clarify how "ensure that their home
directory is created inside the sandbox" might best be managed - I set
the build user but did not do anything specific to create a home
directory inside the sandbox and all seems to work?

Yeh I need better wording. Basically if you enable unpriv builds then you need to make sure you also create anything it might need in each sandbox, but you're right that it doesn't necessarily need a home directory, it's just that mine do, and often require additional setup work, e.g.:

  https://github.com/TritonDataCenter/pkgbuild/blob/master/scripts/mksandbox-macos#L123-L132

- I have a reasonably large (~57G) tmpfs which I had been using via
WRKOBJDIR?=/var/obj/pkg - would it make sense to just set basedir
under the tmpfs

You could do. The design is meant to be flexible so you can configure it exactly to suit your preferred layout, but also I really want a default config that works out of the box with ideally zero changes to make it as easy as possible to get up and running.

At this stage the initdir is almost certainly going to change until we reach version 1 as there are more things I need to add to config and scripts, but once it's reasonably stable then it could be held under revision control, and you could have multiple directories for different builds, e.g. netbsd-10, netbsd-11, netbsd-10-2025Q4, etc.

- While it is obvious from the config.lua, it might be nice to note in
the docs which config values (such WRKOBJDIR and MAKE_JOBS) are
overridden by bob, and under which circumstances (presumably if the
config sets with ?= they will be overridden, but not with =)

Yeh this one is tricky as some can be overridden, some can't, and some can only be set in the environment (hence scanenv for NATIVE_OPSYS etc).

I don't think we can reasonably come up with a comprehensive list here, but in my mind the general rule here is that you should set things in mk.conf that are permanent decisions that you have made for that particular package set (i.e. things that if you change you would need to rebuild lots of packages), and the environment is for ephemeral things like MAKE_JOBS that could be set in mk.conf, but having lua and access to the ScanIndex variables means you have a lot more power and flexibility in setting them. As with many things in bob this comes from my extensive experience with pbulk, and in this case having to manage hundreds of lines of mk.conf. It's going to be so nice to have this reduce down to a few lines of lua.

--
Jonathan Perkin                    pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index