Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2023 16:46:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 272795] FreeBSD Handbook section 4.5.1 could be better.
Message-ID:  <bug-272795-9-rUHji039Zv@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-272795-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-272795-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272795

--- Comment #4 from Leo Bicknell <bicknell@ufp.org> ---
(In reply to Graham Perrin =E2=97=90 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 he=
lp to=20
> 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=20
  get 2023Q1 ports built stuff and if I run it again in April 2023 it will =
jump
to=20
  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 use=
d to
build
    the current packages on the mirror.

  - I can find no way to make "pkg" tell me what quarterly snapshot index i=
s 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 g=
et
the
  corresponding ports snapshot.  But come April either 1) It says on the 20=
23Q1=20
  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 quart=
er.=20
git has=20
  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=20
  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 ta=
gs.=20=20
Now it's easy programmatically to verify both are in sync, or to write a sc=
ript
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" t=
hat
moves forward
every quarter.  Now as a sysadmin I can just always bring my tree current w=
ith
"quarterly".

A high effort fix is as a sysadmin I don't want to manage any of this acros=
s a
fleet of=20
servers.  I would like to set some variables in /etc/periodic.conf (or maybe
/etc/rc.conf)
that do this automatically:

PKG_UPDATE_QUATERLY=3D"YES"
PORTS_UPDATE_QUATERLY=3D"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 bounda=
ry.=20
I never have
to think about updating either one, and the built in checks for out of date
software always
stay current.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272795-9-rUHji039Zv>