pkgsrc-Users archive

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

Re: Bob woes



On Tue 01 Sep 2026 at 21:05:55 +0100, Jonathan Perkin wrote:

(a lot of useful stuff, I have cut most of it for this reaction)


> > => Tool dependency checkperms>=1.1: NOT found
> > => Verifying /nonexistent for ../../sysutils/checkperms
> > make[1]: don't know how to make /nonexistent. Stop
[...]
> My guess is that you have a difference when running the scan phase which
> means that PKG_DEVELOPER is set to no, or similar, such that checkperms is
> no longer listed in ALL_DEPENDS.  checkperms is only added as a dependency
> to builds when CHECK_PERMS is enabled, which is usually only when
> PKG_DEVELOPER=yes.  So:

There was indeed an issue with my PKG_DEVELOPER setting, although
different than expected. I had this in my mk.conf:

PKG_DEVELOPER ?= no
... further down ...
PKG_DEVELOPER=	yes

and I can imagine that this causes confusion if Bob parses it to find
the value.

When I straightened this out, I did have success, and packages were
built! The only thing was that they ended up in a strange place...

I have my pkgsrc directory in a place similar to /vol1/cvs/pkgsrc, and I
null-mount that to /usr/pkgsrc in the sandbox. Outside, I have a symlink
/usr/pkgsrc -> /vol1/cvs/pkgsrc.

The created binary packages should go to something like
/scratch/packages-11.0, which I then mounted on top /usr/pkgsrc/packages
(as inside the sandbox).  That's because I don't want to mix everything
together in /vol1/cvs/pkgsrc/packages, which is too small anyway to
contain all packages.

However, somehow bob managed to put the built packages in
/vol1/cvs/pkgsrc/packages *anyway*, even though that directory isn't (or
shouldn't be) visible from the sandbox. (Well in theory you could reach
it if you save a directory fd for the packages directory before
something is mounted on top of it, but that seems far-fetched)

So I puzzeled on that for a while, and then (in line with the idea to
avoid overriding settings where possible) decided to put this directory
in the same place as pkg_comp uses: /pkg_comp/packages. (Same for the
distfiles) mk.conf inside the sandbox points there: PACKAGES =
/pkg_comp/packages.

Now I could still build packages, but they disappeared into a void...
I cranked the logging up to debug level and it did properly mention that
it created /pkg_comp/packages/All/pkg_summary.zst for example. But there
was no sign of it in /scratch/packages-11.0...

But if I used "bob sanbox exec" to set up a sandbox, and build the same
package with "make package", it did end up in the expected place.

Only after a lot of hair-pulling, I discovered that bob had created a
new(!) directory /pkg_comp in the *real* root! That's where my packages
went...

I think we have here some fundamentally different ideas of how things
should work... I was already mentally complaining to myself that Bob
thinks much too much that the inside of the sandbox looks the same as
the outside.  The mounting examples in the default configuration file
all assume this, for example.

But to me it seemed obvious that settings in mk.conf inside the sandbox
*obviously* refer to the path *inside* the sandbox, not outside. Hence,
PACKAGES = /pkg_comp/packages. It had never come up in my mind that Bob
would interpret that as some path outside the sandbox. The make process
inside the sandbox certainly wouldn't! I found it totally unexpected
that Bob would do something different than "make package" would.
That Bob copies packages around (and to my very small / partition too) is
a total surprise to me (if only because it is unneeded work; it also
isn't in the debug log).

Phrased differently: For me, I don't want my sandboxes to be a clone of
the "outside", but they need to be an idealized version, and hide all
the mess ^W customisations I've made.

So now I see three options:

- put ugly overrides for $PACKAGES back into config.lua, and hope Bob
  uses the correct value when moving the files around. This probably
  needs some annoying fiddling to work.

- put ugly conditionals in mk.conf to set PACKAGES to one value or the
  other, depending on bob or pkg_comp. Given the confusion with finding
  the value of PKG_DEVELOPER (above) this may not work.

- tell Bob it should just let "make package" put the file where it
  wants, and not meddle with it afterwards. I don't know if this is
  currently possible, but it seems the only reasonable solution.

(I realise it's also possible that Bob doesn't copy the packages to
/pkg_comp but instead there is some weird chroot escape bug that doesn't
show up when I try things manually, but that seems less likely for now)

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert                            <rhialto/at/falu.nl>
\X/ There is no AI. There is just someone else's work.           --I. Rose

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index