Page MenuHomeFreeBSD

freebsd-base.7: Document adding a local repo
Needs ReviewPublic

Authored by ziaee on Thu, Apr 23, 8:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 26, 7:24 AM
Unknown Object (File)
Sat, Apr 25, 6:35 AM

Details

Reviewers
ngie
Group Reviewers
pkgbase
manpages
Summary

MFC after: 3 days
Reported by: ivy, kevans

Diff Detail

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

Event Timeline

ziaee requested review of this revision.Thu, Apr 23, 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.