Re: PKGBASE Removes FreeBSD Base System Feature

From: Mariusz Zaborski <oshogbo_at_freebsd.org>
Date: Mon, 04 Aug 2025 08:03:33 UTC
> Also - nothing stands in the way that pkg(8) will check pkgbase(8) what
PKGBASE packages are installed and then install needed Base System packages
with pkgbase(8) to satisfy its pkg(8) dependencies.

But this adds additional complexity, as you have to manage two separate
databases almost as if they were one.
Where do you define this dependancy? Can other independent repose also use
this feature? How to tell which repo depends on which?
Can other repos introduce new databases?

I think the correct solution is to have a single tool.
Then you introduce packages like FreeBSD-full, FreeBSD-lite, or
FreeBSD-jail (or flavours, whatever works). These packages are marked as
vital and depend on different base system packages.

For example, FreeBSD-full might depend on FreeBSD-rescue, while
FreeBSD-jail does not.

And that’s all there is to it.

If you try to remove FreeBSD-rescue, you can’t - because it would require
removing FreeBSD-full as well, which is vital and can't be removed.
In the case of a jail installation or a minimal FreeBSD setup, if you
install something like FreeIPA and it requires FreeBSD-krb in your jail, it
will be installed automatically.
When you later remove FreeIPA, and no other package depends on FreeBSD-krb,
it can be removed as well.

I think something similar was mentioned by bapt@ on gh:
https://github.com/freebsd/pkg/issues/2485#issuecomment-3135130067

On Mon, 4 Aug 2025 at 09:19, vermaden <vermaden@interia.pl> wrote:

> Hi.
>
> That is a good point - but if I have too choose between a feature You just
> mentioned and really separated and safe Base System from the third party
> pkg(8) packages operations - then I choose Base System safety.
>
> Also - nothing stands in the way that pkg(8) will check pkgbase(8) what
> PKGBASE packages are installed and then install needed Base System packages
> with pkgbase(8) to satisfy its pkg(8) dependencies.
>
> Regards,
> vermaden
>
>
>
>
>
> Temat: Re: PKGBASE Removes FreeBSD Base System Feature
> Data: 2025-08-04 8:58
> Nadawca: "Mariusz Zaborski" &lt;oshogbo@freebsd.org>
> Adresat: "Don Lewis" &lt;truckman@freebsd.org>;
> DW: "Daniel Morante" &lt;daniel@morante.net>; stable@freebsd.org;
>
>
>
>
> >
> >>(1)
> >> Keep pkg(8) for third party packages with /etc/pkg and
> /usr/local/etc/pkg and /var/db/pkg dirs for configuration.
> >>
> >> Use separate pkgbase(8) with /etc/pkgbase and /usr/local/etc/pkgbase
> and /var/db/pkgbase dirs for managing PKGBASE packages. By pkgbase(8) I
> have the same pkg(8) project in mind - just renamed as pkgbase(8) and with
> */pkgbase dirs instead of */pkg.
> >
> > I can imagine a situation where a third-party package depends on a
> package from the base system.
> > When you bootstrap a jail or your machine, you might start with a
> minimal installation, but I would expect pkg&nbsp;to automatically figure
> out what needs to be installed when it's required.
> >
> > On Mon, 4 Aug 2025 at 08:37, Don Lewis &lt;truckman@freebsd.org> wrote:
> >
> >> On&nbsp; 3 Aug, Daniel Morante wrote:
> >>> I just took a look at
> >>> https://pkg.freebsd.org/FreeBSD:15:amd64/base_latest/
> >>> &lt;https://pkg.freebsd.org/FreeBSD:15:amd64/base_latest/> and I am
> >>> instantly disappointed. I was a fan of the idea, but seeing how they
> >>> decided to make one package for each item is a massive bummer. Why
> would
> >>> you split it up this way? When when you install the Mozilla Firefox
> via
> >>> package, you don't install every file individually as a separate
> package.
> >>>
> >>> It's the same concept for FreeBSD. All these files make up a single
> >>> entity "FreeBSD" the operating system. Why on earth would you install
> >>> each item that's required to run FreeBSD as a separate package? All
> this
> >>> will do is create increased overhead when installing the system (as
> each
> >>> package must go through it's verification and transaction process),
> and
> >>> all sorts of trouble down the line when dependency hell sets in.
> >>>
> >>> This is not the FreeBSD way.&nbsp; Very sad, concerned, and
> disappointed at
> >>> this design choice.
> >>
> >> What benefit is there to installing setuid program lpr on an
> >> appliance-like system without a printer other than enlarging the attack
> >> surface?&nbsp; If I remove it, do I have to build my own freebsd-update
> >> system to keep things up to date?
> >>
> >> I frequently want to build small systems without a compiler if I know
> >> that I will never build software on them.
> >>
> >
>