Page MenuHomeFreeBSD

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

Authored by ifreund_freebsdfoundation.org on Aug 15 2025, 8:59 AM.
Tags
None
Referenced Files
F146525821: D51916.id160394.diff
Tue, Mar 3, 9:35 AM
Unknown Object (File)
Mon, Mar 2, 2:07 PM
Unknown Object (File)
Sun, Mar 1, 12:14 AM
Unknown Object (File)
Fri, Feb 20, 2:24 AM
Unknown Object (File)
Fri, Feb 20, 2:24 AM
Unknown Object (File)
Thu, Feb 19, 8:17 AM
Unknown Object (File)
Wed, Feb 18, 6:08 PM
Unknown Object (File)
Tue, Feb 17, 12:11 PM
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.