Hi.

> As Vermaden replied to different thread of
> this topic, his issue seems to be "in jail".

Its not limited to Jail - I just tested it in a PKGBASE 15-CURRENT Bhyve VM and 
result is exactly the same - FreeBSD Base System destroyed and rendered 
unbootable after the `# pkg delete -af` command.



> You don’t *upgrade* a container, you create container images
> from a description, you create container instances from images.
> The issue of uninstalling things in a container never arises,
> because you simply destroy the container and create a new one
> and import persistent data as volumes.

If you want to recreate each Jail or VM everytime instead of upgrading its Base 
System and/or packages - then PKGBASE does not change anything here. You just 
wipe everything and extract `base.txz` there and add needed packages with 
pkg(8) the old way everytime you want to recreate it.

Its 'Pets vs Cattle' discussion now ... there are environments where everything 
is generated/deployed with infra as code (stored in some git repo for example) 
and there are places where everything is still more or less managed and 
upgraded by hands - with 'some' automation and templates for example. Maybe my 
approach seem too much 'Pet' oriented - as all the places where I work(ed) this 
was 'the way' to do things - my job experiences are more 'on-premise' then 
'cloud-like'.

I do not have anything against PKGBASE - as freebsd-update(8) is far from 
perfect - and it does not have to be separate command - it can be a `--base` 
switch for example - which will change nothing for OCI containers or automation 
as that argument will be just included there in the commands - but will change 
a lot for people who use it by hand.

Is this OCI containers work of dck@ and dfr@ linked somewhere on FreeBSD Wiki 
or somewhere else?

Thanks,
vermaden





Temat: Re: PKGBASE Removes FreeBSD Base System Feature
Data: 2025-08-10 11:33
Nadawca: "David Chisnall" <[email protected]>
Adresat: "Tomoaki AOKI" <[email protected]>; 
DW: "David G Lawrence" <[email protected]>; "Warner Losh" 
<[email protected]>; "Michal Meloun" <[email protected]>; "FreeBSD Current" 
<[email protected]>; 

> 
> > On 9 Aug 2025, at 14:48, Tomoaki AOKI
 wrote:
>> 
>> As Vermaden replied to different thread of this topic, his issue
>> seems to be "in jail". IIUC, he attempted to deinstall everything
>> installed PkgPkg (in contrast with PkgBase) keeping PkgBase world
>> in the jail intact, but result was everything including PkgBase
>> in the jail was deinstalled and made the jail unkillable.
>> And stating there should be kinda "safety net" for such a case.
> 
> It’s worth noting that this is precisely the kind of thing that the
OCI model avoids entirely.  You don’t *upgrade* a container, you create
container images from a description, you create container instances from
images.  The issue of uninstalling things in a container never arises,
because you simply destroy the container and create a new one and import
persistent data as volumes.
> 
> dch@, dfr@, and others have done phenomenal work to enable jails as
the isolation mechanism for OCI containers and pkgbase is a key part of
making this useful.
> 
> David

> 

Reply via email to