MFC after: 3 days Discussed with: bapt, des, emaste, ivy, phk, pi Differential Revision: https://reviews.freebsd.org/D55458
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 71104 Build 67987: arc lint + arc unit
Event Timeline
i would like to see a bit more prose to explain what this command actually does, probably in its own (sub)section. in particular, explain that it unregisters the packages without removing the files ("depkgbasify" is inside baseball terminology, users won't know what this means), and explain why you'd want to do that: mainly, because it prevents the package database from becoming inconsistent with the installed system. also, should mention that it's not easily reversible and would require the system be re-pkgbasified to undo.
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 225 | this should be FreeBSD-*, there are no pkgbase packages whose names start with FreeBSD-base-. | |
| 225 | also, you might need -f here, at least if you have ports installed, because of dependency issues. | |
| 227 | don't use > as this will overwrite the contents of any existing file the user might have created. also, bsdinstall creates its own file called FreeBSD-base.conf, which is the one you'd want to change. i suggest replacing this with prose: in most cases, /usr/local/etc/pkg/repos/FreeBSD-base.conf can simply be deleted, since the base repository is disabled by default in /etc/pkg/FreeBSD.conf. | |
| 228 | this should not be necessary since pkg shouldn't remove itself. that would only happen if you did pkg unregister -a. | |
also: there are ports packages whose names begin with freebsd- (in lowercase); i think pkg is now case sensitive here, but someone should test that to make sure it won't randomly unregister those ports.
+ add pkg del freebsd-src
+ escape wildcard
+ change echo redirection to append
+ remove pkg bootstrap
Refactoring this entire examples section into something that will look
nice with subsections is out of scope of this commit. It's a good sized,
bikesheddable job just in of itself. Lets get this in, if it's accurate
now, and one of us can attempt that next.
one other thing that comes to mind is that pkg unregister was added in pkg 2.5.0, but, iirc, we only shipped 2.4.something on the 15.0 media. that won't be an issue for most people because you can just update pkg, but if you did an offline install of 15.0, and wanted to depkgbasify it before doing anything else, this wouldn't work. this will be a non-issue once 15.1 comes out and maybe it's minor enough to not be worth mentioning...
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 225 | the two packages we want to remove here are FreeBSD-src and FreeBSD-src-sys. | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 225 | Are these normally marked vital if installed? If so, you need -f to remove them. | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 221 | It's not clear what "De-pkgbasify" means -- the "pkgbase" short name does not appear anywhere in this page prior to this change, and this doesn't explain what effect this command will have on the system. The user might think it's going to remove their base system packages. Maybe something like "Remove base system pkg(8) metadata, for use with ..." We could also mention that it can be done for building from src or use with freebsd-update. | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 221 | Or "Delete src packages and remove base system metadata for the remaining packages" | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 225 | no, but FreeBSD-set-src is, which i forgot about. so to remove all three we'd need -f. it might be easier to just tell the user to unregister everything then delete /usr/src if they want to clone it... | |
remove de-pkgbasify
remove src removal. unregister everything, then managing their source
tree is part of their source build phase.
Thanks, this looks good. The only thing I think we should add is a warning about the consequence of doing so -- i.e., that the user will not be able to update via base system packages.
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 229 | i'm still not sure this makes sense because you'll end up with a file containing FreeBSD-base: { enabled: yes }
FreeBSD-base: { enabled: no }which is strange and confusing. it's better to explain that the user should disable the base repository, e.g. by removing this file, so it's clear why we're doing this. | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 229 | I am open to concrete suggestions to improve this, but we should have working examples. The example should be explained well enough to understand what's going on. I do not want to implement that change because I want to have working examples. | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 229 |
i doubt this, because i suggested several and your response was "this is out of scope" (because we can't have prose in EXAMPLES, or something). so whatever. | |
i doubt this,
Rude.
because i suggested several and your response was "this is out of scope" (because we can't have prose in EXAMPLES, or something). so whatever.
You gave some instruction to one of our teammates how to do something that wasn't written down. I am just trying to write it down so that we can have one less of this problem where "how to use pkgbase" is a secret that people can only get from talking to you. This is not about not having prose in EXAMPLES where it obviously is in every single manual page that has examples, it's that having blocks of prose in a single example requires me to produce subsections for all the other examples. This is both yak shaving and very obviously out of the scope of this commit.
You do not have to make me shave this yak in order to have any progress at all. Nevertheless, at 2 A.M. I have shaved this yak for you in what is now added as the parent revision.
- forgot to quote FreeBSD-\*
- switch to rm freebsd-base repo conf
- switch to example 7, this should be proceeded by an enrolling example
add info about repos. notably, i am lying about pkg unregister -r,
i know pkg unregister doesn't support repos yet, but i am proposing
it does, or that someone else proposes how we are supposed to do this,
or admits that we have no plan how people are supposed to upgrade.
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 230 | the user may have an existing FreeBSD.conf, especially if they upgraded from 14.x or earlier. i suggest not recommend to unconditionally overwrite this. | |
| 241 | this is not correct if the existing system doesn't match the pkg repository (e.g., src.conf differences). converting an existing system to pkgbase is a rather complicated process and i'm not sure this should be documented in the manpage at all... it might make more sense to include this in the 16.0 release notes, assuming we drop freebsd-update at that time. | |
| 252 | it's not, pkg unregister is fully supported. | |
| 255 | do they? why? i thought this had been fixed by making pkg case sensitive by default. | |
| 260 | would rather say something like "via make installworld". you can upgrade pkgbase systems from source without depkgbasifying them. | |
| 270 | again, the user may have existing content in this file that we can't just unconditionally delete. | |
i don't think the expanded scope of this diff is necessary. can we just document how to depkgbasify a system? that is the more important case, because we need to support people who install from disc1.iso with pkgbase and now need to depkgbasify to upgrade via installworld.
Yes, let's start with just deregistering packages to allow for installworld.
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 260 | I assume you mean by building packages from that source and installing them? Good point, "upgrade in-place via source" does not need to imply installworld. | |
| share/man/man7/freebsd-base.7 | ||
|---|---|---|
| 260 | yes, precisely that. | |