Re: RFC: etcupdate tool in base?

From: Garrett Cooper <yanefbsd_at_gmail.com>
Date: Mon, 14 Jun 2010 14:22:32 -0700
On Thu, Jun 10, 2010 at 10:46 AM, John Baldwin <jhb_at_freebsd.org> wrote:
> I've had several folks ask me recently about importing etcupdate
> (http://www.FreeBSD.org/~jhb/etcupdate) into the base system as an alternate
> tool for updating /etc during upgrades.  Do folks have any strong objections
> to doing so?  More details about how it works and an HTML version of the
> manpage can be found at the URL above.

Finally got around to looking at this.

Some comments:

1. Script doesn't check to see whether or not it has write access (and
doesn't catch some errors):

$ etcupdate
mkdir: /var/db/etcupdate: Permission denied
/usr/sbin/etcupdate: cannot create /var/db/etcupdate/log: No such file
or directory

Eventually it stops though, so maybe it's not really a big issue...

2. Some messages are a bit misleading:

$ etcupdate
/usr/sbin/etcupdate: cannot create /var/db/etcupdate/log: Permission denied
$ ls -l /var/db/etcupdate/log
-rw-r--r--  1 root  wheel  0 Jun 14 14:06 /var/db/etcupdate/log
$ whoami
garrcoop

3. Workflow comments.

i. Ok... I know I'm doing a downgrade, but what now?

$ sudo etcupdate
No previous tree to compare against, a sane comparison is not possible.

ii. Did a bit more reading, and I think that `etcupdate build' is what
I want... but it wasn't happy when I did that:

$ sudo etcupdate build
Missing required tarball.

usage: etcupdate [-nBF] [-d workdir] [-r | -s source | -t tarball] [-A patterns]
                 [-D destdir] [-I patterns] [-L logfile] [-M options]
       etcupdate build [-B] [-d workdir] [-s source] [-L logfile] [-M options]
                 <tarball>
       etcupdate diff [-d workdir] [-D destdir] [-I patterns] [-L logfile]
       etcupdate extract [-B] [-d workdir] [-s source | -t tarball] [-L logfile]
                 [-M options]
       etcupdate resolve [-d workdir] [-D destdir] [-L logfile]
       etcupdate status [-d workdir]

So uh... ok? Manpage and usage were a bit confusing (but not too bad).
After I fixed my arguments, here's what I came up with:

$ sudo etcupdate build -s /data/scratch/src/stable/8/
/root/etcupdate-stable8.tbz
$ sudo etcupdate extract -t /root/etcupdate-stable8.tbz
$

Wait -- what happened...? What's going on isn't overly apparent from
running extract. It's nice having clean utilities, but I'm not used to
the etcupdate workflow, so having some verbosity would be helpful :D.

Thanks,
-Garrett
Received on Mon Jun 14 2010 - 19:22:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC