[Bug 272795] FreeBSD Handbook section 4.5.1 could be better.
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 272795] FreeBSD Handbook section 4.5.1 could be better."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 29 Jul 2023 16:46:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272795
--- Comment #4 from Leo Bicknell <bicknell@ufp.org> ---
(In reply to Graham Perrin ◐ from comment #3)
> Six revisions by me in recent weeks. If you can take a fresh look at the wiki page
> (without the FreeBSD Handbook as context or comparison), does the page help to
> demystify things?
I think I understand it well enough, but my opinion is that the combination of
how
packages and ports work is not very user friendly. However it's possible I
don't
understand it. Let me describe what I think is my understanding:
- If I do a "pkg update" with the default configuration it will grab the
"quarterly"
package snapshot from a directory. E.g. if I run it on February 2023 it will
go
get 2023Q1 ports built stuff and if I run it again in April 2023 it will jump
to
2023Q2 ports built stuff automatically.
- It looks to me like this is done by building packages from the quarterly
ports
snapshot and then dumping them in /quarterly on the mirrors. Building from
head
appears to go into /latest, if I understand right.
- I can find no way to make "pkg" tell me what quarterly snapshot was used to
build
the current packages on the mirror.
- I can find no way to make "pkg" tell me what quarterly snapshot index is on
my
local disk.
- I can find no way to make "pkg" tell me what quarterly snapshot an
individual
installed package came from.
- If in February I also do a "git checkout -b 2023Q1 .../ports.git I will get
the
corresponding ports snapshot. But come April either 1) It says on the 2023Q1
branch because all I do is a git pull, or 2) I must manually do a git
checkout
-b 2023Q2.
This causes me to make the following observations:
- pkg has the magic keyword `quarterly` which always gets the current quarter.
git has
no similar keyword (branch, tag, other magic).
- Checking if ports and packages are in sync is hard.
- Updating ports is more manual than updating packages, I have to figure out
which
quarter when I update ports.
I think the most lightweight fix is to add a command to pkg that would print
out the
quarter for the on-disk and/or remote copy in the same format as the git tags.
Now it's easy programmatically to verify both are in sync, or to write a script
that
jumps git /usr/ports forward when pkg starts emitting a new value.
A medium effort fix would be to add a tag to ports git called "quarterly" that
moves forward
every quarter. Now as a sysadmin I can just always bring my tree current with
"quarterly".
A high effort fix is as a sysadmin I don't want to manage any of this across a
fleet of
servers. I would like to set some variables in /etc/periodic.conf (or maybe
/etc/rc.conf)
that do this automatically:
PKG_UPDATE_QUATERLY="YES"
PORTS_UPDATE_QUATERLY="YES"
Then some magic (I'm thinking maybe the weekly periodic script) would
automatically suck
down new pkg and/or git checkout new ports when we cross a quarterly boundary.
I never have
to think about updating either one, and the built in checks for out of date
software always
stay current.
--
You are receiving this mail because:
You are the assignee for the bug.