[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
creating directories for syspkgs
On Tue, 12 May 2009, Joerg Sonnenberger wrote:
> On Tue, May 12, 2009 at 07:45:45PM +0300, Alan Barrett wrote:
> > How do you suggest I use @pkgdir to create directories with the correct
> > ownership and permissions?
> What is correct ownership/permissions here?
"correct" is "whatever METALOG says". For example, if METALOG says
./var/chroot/named/etc/namedb/cache type=dir uname=named gname=named mode=0775
and src/distrib/sets/lists/base/mi says:
then I want to put something in the base-bind-root syspkg to create the
directory with owner named, group named, mode 0775, and to remove the
directory if the syspkg is removed.
What I do now:
I add a directory node to the pax archive with the correct ownership and
$ tar -z -tvf base-bind-root-188.8.131.52.20090427.tgz | grep cache
drwxrwxr-x 2 named named 0 Apr 27 22:00
and I add the following lines to +CONTENTS:
$ tar -z -xf base-bind-root-184.108.40.206.20090427.tgz -O +CONTENTS | grep cache
@exec install -d -o named -g named -m 0775 %D/var/chroot/named/etc/namedb/cache
What doesn't work:
Current versions of pkg_add complain "PLIST entry and package don't
match" as soon as they encounter a directory in the pax archive. This
used to work with older versions of pkg_add.
What I would like to do:
I would like to add a directory node to the pax archive with the correct
ownership and mode, and also add as little as possible to the +CONTENTS
file to get pkg_add to do the right thing. Ideally, I'd like to simply
mention the directory name in +CONTENTS; it would also be OK if I had
to use a trailing slash. Each directory belongs to exactly one syspkg
(as recorded in src/sistrib/sets/lists), so syspkgs don't need @pkgdir's
behaviour of treating the directory as shared between multiple packages.
--apb (Alan Barrett)
Main Index |
Thread Index |