On Fri, Nov 05, 2021 at 05:36:48PM -0700, Andrew Hewus Fresh wrote:
> I like it, some comments in-line but overall I think this would have
> helped me get started with siteXX stuff, so OK afresh1@

Great, I'll commit with tweaks as per below, thanks!

> > +If existent and executable,
> 
> This whole sentence reads weird to me.  I don't know if this is better,
> but it confused me.
> 
>      If they exist and are executable at the end of the install or
>      upgrade process, /install.site or /upgrade.site respectively, are
>      run with chroot(8) based at the system's root.
> 
> > +.Pa /install.site
> > +and
> > +.Pa /upgrade.site
> > +are run last during install and upgrade, respectively, with
> > +.Xr chroot 8
> > +based at the system's root.

I'll adapt this to

If they exist and are executable, /install.site and /upgrade.site are
run at the end of the install and upgrade process, respectively, with
chroot(8) based at the system's root.

> > +.Sh FILES
> > +.Bl -tag -width "site${VERSION}-$(hostname -s).tgz" -compact
> > +.It Pa site${ Ns Va VERSION Ns }.tgz
> > +Generic set.
> > +.It Pa site${ Ns Va VERSION Ns }-$( Ns Ic hostname Fl s Ns ).tgz
> > +Host-specific set.
> > +.It Pa /upgrade.site
> > +Generic post-upgrade script.
> > +.It Pa /install.site
> > +Generic post-install script.
> > +.El
> > +.Sh EXAMPLES
> > +Create
> > +.Nm
> > +sets and update the index:
> > +.Bd -literal -offset indent
> > +# tar -czhf site70.tgz generic/
> > +# tar -czhf site70-puffy.tgz puffy/
> > +# ls -lT > index.txt
> > +.Ed
> > +.Pp
> > +Trigger an upgrade of
> > +.Xr packages 7
> > +upon next boot:
> > +.Bd -literal -offset indent
> > +echo 'pkg_add -Iu' >>/etc/rc.firsttime
> 
> I think some clarity that this should go into one of those siteXX.tgz
> files as "/upgrade.site" would help folks connect how to get those files
> onto the install media and make it clearer that those files get
> extracted into the chroot and that you don't have to figure out how to
> get them into the root of the install media.

That's one way and certainly the only one for fresh installs (unless
you modify the install media, which seems pointless), but for upgrades
you can create /upgrade.site and the installer will pick it up from
there.

That is,

        cat << EOF >/upgrade.site
        echo 'pkg_add -Iu' >>/etc/rc.firsttime
        EOF
        chmod +x /upgrade.site
        sysupgrade

will upgrade packages after sysupgrade reboots -- no need for dealing
with siteXX.tgz on your existing install.

But you're right, I completely missed creating /upgrade.site in that
example, so I'll fix that.

> Perhaps that is clear enough from "run [...] with chroot", but I think
> this example makes things less clear, at least the way it is.

So I'll leave that for now.  Again, we can polish in-tree.

Reply via email to