Subject: Re: syspkg dependencies
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 10/19/2004 17:48:48
On Tue, 19 Oct 2004, Alistair Crooks wrote:
> What's wrong with using the existing pkg_install utilities for system
> packages? (A genuine question, I know that David has a lot more
> experience in this area than I do).
I described some of the problems (and suggested solutions)
in <http://mail-index.NetBSD.org/tech-pkg/2003/12/11/0018.html>.
-- begin quote
I sent details in private mail. Essentially, empty directories that
exist in the *.tgz file, and that are mentioned in @dirrm lines in
the +CONTENTS file embedded in the tgz, are not created by pkg_add.
Non-empty directories are created almost by accident, as a side-effect
of creating files, with no attention being paid to their ownership or
permissions.
To fix this, I think pkg_add should parse @dirrm lines, and create each
listed directory with the ownership and permissions described in the
ustar headers in the *.tgz file. Alternatively, we could pass "@option
extract-in-place" to pkg_add, in which case the tar process should
just DTRT with empty directories that exist in the *.tgz file. As yet
another alternative, I suppose we could decree that pkg_add's existing
behaviour is correct, but pkg_create needs to put lines like "@exec
mkdir foo ; chown user:group foo ; chmod 666 foo" into the +CONTENTS
file.
-- end quote
Since that time, I have discovered that "@option extract-in-place"
doesn't work either.
pkg_add is such scary code that I have never worked up the courage to
try to fix it. I could almost trivially make my modified version of
distrib/sets/regpkg add "@exec mkdir" commands to the syspkgs, but
I have not done so.
--apb (Alan Barrett)