Subject: problems with AUTO_MKDIRS=yes, r/o pkgsrc and UNPRIVILEGED=yes
To: None <tech-pkg@NetBSD.org>
From: Aleksey Cheusov <cheusov@tut.by>
List: tech-pkg
Date: 12/25/2007 15:08:18
I have some problems with AUTO_MKDIRS=yes (wip/runawk package under Linux).
PLIST:
   @comment $NetBSD$
   bin/runawk
   man/man1/runawk.1
   share/doc/${PKGBASE}/ChangeLog
   share/doc/${PKGBASE}/NEWS
   share/doc/${PKGBASE}/README
   share/runawk/abs.awk
   share/runawk/alt_assert.awk
   share/runawk/max.awk
   share/runawk/min.awk

Makefile:
   ...
   AUTO_MKDIRS=yes
   ...

pkgsrc is mounted read-only.
mk.conf:
   UNPRIVILEGED=yes

Building package fails:
   => Creating installation directories from PLIST files
   install   -c -s   -o pkgsrc -g pkgsrc -m 555 runawk /home/pkgsrc/pkg/bin/runawk
   install   -c   -o pkgsrc -g pkgsrc -m 444 runawk.1 /home/pkgsrc/pkg/man/man1/runawk.1
   install   -c   -o pkgsrc  -g pkgsrc  -m 444  modules/abs.awk /home/pkgsrc/pkg/share/runawk/abs.awk
   install   -c   -o pkgsrc  -g pkgsrc  -m 444  modules/alt_assert.awk /home/pkgsrc/pkg/share/runawk/alt_assert.awk
   install   -c   -o pkgsrc  -g pkgsrc  -m 444  modules/max.awk /home/pkgsrc/pkg/share/runawk/max.awk
   install   -c   -o pkgsrc  -g pkgsrc  -m 444  modules/min.awk /home/pkgsrc/pkg/share/runawk/min.awk
   /usr/bin/install -c -o pkgsrc -g pkgsrc -m 644 /tmp/pkgsrc-pkg/wip/runawk/work/runawk-0.9.0/"README" /home/pkgsrc/pkg/share/doc/runawk
   /usr/bin/install: cannot create regular file `/home/pkgsrc/pkg/share/doc/runawk': No such file or directory
   *** Error code 1

After replacing "${PKGBASE}" with "runawk" in PLIST package is built fine.

Under NetBSD with r/w pkgsrc and without UNPRIVILEGED=yes everything
works fine as is.

Any comments?

-- 
Best regards, Aleksey Cheusov.