Page MenuHomeFreeBSD

freebsd-base.7: Document adding a local repo
ClosedPublic

Authored by ziaee on Apr 23 2026, 8:25 PM.
Tags
None
Referenced Files
F160013978: D56608.diff
Sat, Jun 20, 2:00 PM
F159943418: D56608.diff
Fri, Jun 19, 7:21 PM
Unknown Object (File)
Mon, Jun 15, 12:53 AM
Unknown Object (File)
Sun, Jun 7, 11:17 AM
Unknown Object (File)
Thu, Jun 4, 8:12 PM
Unknown Object (File)
Thu, Jun 4, 7:27 PM
Unknown Object (File)
Tue, Jun 2, 4:44 PM
Unknown Object (File)
Sun, May 31, 9:40 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ziaee requested review of this revision.Apr 23 2026, 8:25 PM
kevans added inline comments.
share/man/man7/freebsd-base.7
227

So, here's another knob that we should document and use for this example: REPODIR. The pkgbase machinery installs the repo to ${REPODIR}/${PKG_ABI}/<VERSION>. My personal preference would be that we set the stage with a REPODIR of something like /usr/local/pkgbase/repo and then use file:///usr/local/pkgbase/repo/${ABI}/latest rather than advocating for maintaining pkgbase repositories inside OBJDIR.

share/man/man7/freebsd-base.7
227

What about /var/db/pkg/repos/FreeBSD-local/ ?

kevans added inline comments.
share/man/man7/freebsd-base.7
227

I'm probably net-neutral... I have kinda mixed feelings about commandeering paths in pkg's domain, in case @bapt tries to do something there that would conflict with our guidance.

ivy added inline comments.
share/man/man7/freebsd-base.7
221

maybe a nit, but (despite the name) /etc/pkg/FreeBSD.conf can be modified by downstream distributors; it seems a bit more neutral to describe it this way.

227

it shouldn't be in /var/db/pkg, because that path is owned by pkg(8), and also because this isn't a database. i would be okay with some other path in /var, but i don't think the path really matters other than to provide the example; the user can choose where to put it.

i do agree suggesting not putting it in /usr/obj is a good idea, though. many users won't realise you can change that unless they trawl through build(7).

share/man/man7/freebsd-base.7
227

I feel very strongly that a nice place is /usr/dist/. This is easily understandable from decades of /usr/freebsd-dist/, except we can do something even cleaner this time. Putting everything in /usr/local/ is awful. We have directories so long that cd'ing into them has to be a separate step in the manpage because it'll wrap around the screen.

/usr/local/ is for pkg to install things, lets keep it that way please?

/usr/obj is clearly meant to be typed. /usr/dist is understandable and clean and in line with that tradition.

One thing I dislike about linux is systemctl suspend. On freebsd, zzz. One is very clearly meant to actually be typed and used.

git blames me for 44% of hier, this is a topic that I have investigated and reflected on very thoroughly for many years.

the nit is good, thanks @ivy

I need to reflect more on how to write the ${REPODIR}/${PKG_ABI}/<VERSION>

the nit is good, thanks @ivy

I need to reflect more on how to write the ${REPODIR}/${PKG_ABI}/<VERSION>

I think you could get away with hand waving away the second and third component, referring to the new example for the structure (and explicitly commenting the REPODIR value used)

share/man/man7/freebsd-base.7
227

I wouldn't complain about /usr/dist, fwiw.

bcr added inline comments.
share/man/man7/freebsd-base.7
235

s/and/And/
Because you're starting a new sentence here or remove the sentence stop in the line above.

ziaee marked an inline comment as done.

tweak based on @kevans suggestion, thanks!

This revision is now accepted and ready to land.May 5 2026, 5:18 PM
share/man/man7/freebsd-base.7
227

shouldn't this be /usr/obj/usr/src/repo/...?

oh, right. i didnt notice because my pkgbase machine doesn't let me build out of /usr/src. thanks ivy!

This revision now requires review to proceed.May 6 2026, 1:28 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 6 2026, 9:29 PM
This revision was automatically updated to reflect the committed changes.