Page MenuHomeFreeBSD

bsdinstall: put FreeBSD-base.conf in /etc/pkg
Needs ReviewPublic

Authored by ifreund_freebsdfoundation.org on Aug 15 2025, 8:59 AM.
Tags
None
Referenced Files
F132133188: D51916.id160394.diff
Tue, Oct 14, 1:25 AM
Unknown Object (File)
Mon, Oct 13, 7:26 AM
Unknown Object (File)
Sun, Oct 12, 12:21 PM
Unknown Object (File)
Sun, Oct 12, 1:23 AM
Unknown Object (File)
Sun, Oct 12, 1:23 AM
Unknown Object (File)
Sat, Oct 11, 3:53 PM
Unknown Object (File)
Thu, Oct 9, 5:32 PM
Unknown Object (File)
Thu, Oct 2, 1:53 AM
Subscribers

Details

Reviewers
emaste
jrtc27
cperciva
grahamperrin
Group Reviewers
pkgbase
Summary

Currently bsdinstall puts FreeBSD-base.conf in /usr/local/etc/pkg.
This is however strange, since this config is for fetching the base
system.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66636
Build 63519: arc lint + arc unit

Event Timeline

Currently pkgbasify puts this config in /usr/local/etc/pkg as well. I'll update pkgbasify for consistency as soon as this patch is landed (assuming it is accepted).

Compare with a single FreeBSD.conf for multiple FreeBSD repos, e.g. https://reviews.freebsd.org/D50583.

This is a step in the right direction, but I still think that we want to end up with this being part of the pkg-bootstrap package.

This is a step in the right direction, but I still think that we want to end up with this being part of the pkg-bootstrap package.

I agree that in a pkgbase-only world that would be better, but I think at least building the system from source and installing with installworld will continue to be supported for the near future? I don't think there's a good way to include a file in a pkgbase package that is not installed by installworld.

grahamperrin added inline comments.
usr.sbin/bsdinstall/scripts/pkgbase.in
242

File /etc/pkg/FreeBSD.conf exists.

Directory /etc/pkg/repos/ does not.

This revision now requires changes to proceed.Aug 26 2025, 2:44 PM

On the other hand, /etc/pkg/repos/ (if created) might be valid.

https://github.com/freebsd/pkg/commit/06cd326e85ece0ebf43090d9b739e5b408f28910 in 2013 was Attempt to load repository files from /etc/pkg/repos.

https://github.com/freebsd/pkg/blob/main/libpkg/pkg_config.c

Re: pkg.conf(5) REPOSITORY_CONFIGURATION, the REPOS_DIR array defaults to /etc/pkg/ and /usr/local/etc/pkg/repos/.


(Unsubscribing myself, to de-duplicate emails. I watch as a member of the pkgbase project.)

usr.sbin/bsdinstall/scripts/pkgbase.in
242

Thanks for the catch!

While /usr/local/etc/pkg/repos/ exists, /etc/pkg/repos/ does not.

Switch to the correct directory.