Some questions about pkgbase

0 views
Skip to first unread message

Andrea Venturoli

unread,
Nov 26, 2025, 1:08:37 PM (9 days ago) Nov 26
to freebsd-...@freebsd.org
Hello.

I've got some questions on pkgbase that I was not able to find an answer
for.
I'm listing them here in no particular order...


Since I have some local modifications to the official sources, I'd like
to build my own base packages.
Can this be done with poudriere?

In that case, can poudriere, running on a certain OS version, build
packages for older versions, like it does for ports?

I guess I can still compile the kernel locally on a machine (in case it
has some options that differs from GENERIC), right?
(Of course I'll have to pay attention to avoid mixing different
kernel/userland versions).

Is it production ready for 14.3?
Ideally I'd like to use poudriere on 14.3 and setup up *new* 14.3 boxes
with pkgbase (for now I'm delaying conversion of existing, long standing
machines and the upgrade to 15).



bye & Thanks
av.


Matthew Seaman

unread,
Nov 26, 2025, 1:42:46 PM (9 days ago) Nov 26
to ques...@freebsd.org
On 26/11/2025 18:08, Andrea Venturoli wrote:
> Since I have some local modifications to the official sources, I'd like
> to build my own base packages.
> Can this be done with poudriere?

Yes.

> In that case, can poudriere, running on a certain OS version, build
> packages for older versions, like it does for ports?

Yes.

> I guess I can still compile the kernel locally on a machine (in case it
> has some options that differs from GENERIC), right?
> (Of course I'll have to pay attention to avoid mixing different kernel/
> userland versions).

You can build a range of different kernel packages with varying
configurations in a poudriere jail that's set up to use the same
FreeBSD-base packages as you install on your fleet, so the Kernel and
the base system should always match.

> Is it production ready for 14.3?
> Ideally I'd like to use poudriere on 14.3 and setup up *new* 14.3 boxes
> with pkgbase (for now I'm delaying conversion of existing, long standing
> machines and the upgrade to 15).

I run some 14-STABLE machines using base system and ports packages that
are all self-built in my own poudriere instance. Works absolutely fine.
There are quite a few enhancements to FreeBSD-base packaging that are
going into 15, which generally make it easier to use and cover
additional use cases, like building thin jails and so forth. However
base packages are perfectly useable in 14 as a slot-in replacement for
the traditional method of installing from sources.

Cheers,

Matthew
OpenPGP_signature.asc

Andrea Venturoli

unread,
Nov 26, 2025, 1:57:32 PM (9 days ago) Nov 26
to ques...@freebsd.org
On 11/26/25 19:42, Matthew Seaman wrote:

Hello and thanks for answering.




>> Can this be done with poudriere?
>
> Yes.
Perfect!
Is there a good how-to in order to start testing?





> I run some 14-STABLE machines using base system and ports packages that
> are all self-built in my own poudriere instance.  Works absolutely fine.
>  There are quite a few enhancements to FreeBSD-base packaging that are
> going into 15, which generally make it easier to use and cover
> additional use cases, like building thin jails and so forth.
Now that we are at it...

I use thin jails with ezjail, so, after upgrading base, I normally use
"ezjail-admin update -i" to upgrade the "basejail" that is shared among
all others.
Is this possible with pkgbase?
On 14.3?

Also, can we use pkgbase in order to upgrade Poudriere's own jails?


bye & Thanks again
av.

Matthew Seaman

unread,
Nov 27, 2025, 7:10:00 AM (8 days ago) Nov 27
to ques...@freebsd.org
On 26/11/2025 18:57, Andrea Venturoli wrote:
> On 11/26/25 19:42, Matthew Seaman wrote:

>>> Can this be done with poudriere?
>>
>> Yes.
> Perfect!
> Is there a good how-to in order to start testing?

I don't recall finding one. I just worked from the man pages. I've one
poudriere jail used solely for building base packages:

```
% poudriere jail -j stable14base -i
Jail name: stable14base
Jail version: 14.3-STABLE 1403506
Jail vcs version: c108844843
Jail arch: amd64
Jail method: git+https
Jail mount: /usr/local/poudriere/jails/stable14base
Jail fs: zroot/jail/pkg/poudriere/jails/stable14base
Jail kernel: GENERIC
Jail updated: 2025-10-23 13:01:10
Jail pkgbase: enabled
Exiting with status 0
```

To update packages in this jail I just run:
```
poudriere jail -u -j stable14base
```

The packages built by this jail are served to the rest of my systems and
to the jail where I build ports using nginx:

```
location /FreeBSD:14:amd64/base {
alias
/usr/local/poudriere/data/images/stable14base-repo/FreeBSD:14:amd64/latest;
}
```

(Plus all the usual boilerplate and letsencrypt certs required in
nginx.conf)

I could merge the base and package building jails but I like being able
to build base systems pkgs and ports pkgs more independently.

>> I run some 14-STABLE machines using base system and ports packages
>> that are all self-built in my own poudriere instance.  Works
>> absolutely fine.   There are quite a few enhancements to FreeBSD-base
>> packaging that are going into 15, which generally make it easier to
>> use and cover additional use cases, like building thin jails and so
>> forth.
> Now that we are at it...
>
> I use thin jails with ezjail, so, after upgrading base, I normally use
> "ezjail-admin update -i" to upgrade the "basejail" that is shared among
> all others.
> Is this possible with pkgbase?
> On 14.3?

I know nothing about how ezjail works I'm afraid. It might work with
base pkgs, if the ezjail authors have added support for it.

> Also, can we use pkgbase in order to upgrade Poudriere's own jails?

Yes. You can configure a jail to use pkgs from another jail:

```
# poudriere jail -j stable14amd64 -i
Jail name: stable14amd64
Jail version: 14.1-STABLE
Jail arch: amd64
Jail method: pkgbase
Jail mount: /usr/local/poudriere/jails/stable14amd64
Jail fs: zroot/jail/pkg/poudriere/jails/stable14amd64
Jail updated: 2025-10-25 10:53:58
Jail pkgbase: disabled
```

See poudriere-jail(8) and the description of the '-m' option where you
can specify the `pkgbase` method and the repository URL.

Cheers,

Matthew
OpenPGP_signature.asc
Reply all
Reply to author
Forward
0 new messages