Subject: Re: Location of Package Config Files
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 11/08/2001 14:49:09
[ On Tuesday, November 6, 2001 at 18:41:07 (+0900), Curt Sampson wrote: ]
> Subject: Location of Package Config Files
>
> That's certainly true if ${PREFIX} is not under /usr. Unfortuanately,
> it is under /usr by default, which puts config files under /usr. It
> would also presumably put log and other "var" files under /usr, except
> we chose to be "consistently inconsistent" there and put "var" package
> stuff directly under /var instead.

That's very easy to fix (i.e. to make PREFIX=/usr meaningful).  Just do:

	cd /usr
	ln -s ../etc etc
	ln -s share/info info
	ln -s share/man man
	ln -s ../var var

(I've currently got a slightly more careful variant of the above in my
"make distrib-dirs" target in /usr/src/etc/Makefile....  :-)

(I don't think anything I use actually makes use of $PREFIX/var though.)

> > Yes, and we try to follow hier(7) conventions under ${PREFIX} where
> > possible.
> 
> No we do not. We do not use ${PREFIX}/var, though it would be entirely
> possible to do so.

Even worse there's no ${PREFIX}/share containing 'info', 'man', etc.

> If we really want to allow total separation of package stuff (which I
> think is mostly just wanted by developers), what do you think about the
> idea of putting a new hierachy under /pkg?

I'd rather just directly integrate into the system directories,
including /sbin, /bin, and /var & /etc, etc.

> Shipping a /pkg directory with these symlinks:
> 
>     /pkg/etc -> ../etc
>     /pkg/usr -> ../usr
>     /pkg/var -> ../var

don't forget you would also probably want:

	/usr/man -> /usr/share/man
	/usr/info -> /usr/share/info

> would mean that those of us who don't use a separate filesystem for it
> would just get everything integrated normally, and those who mount a
> disk on /pkg would get everything completely separate. You don't even
> have to add links or delete files for either circumstance.

Hmm.... I think it would be better to have a flag that says "NO_PREFIX"
(which could be implemented with somthing as simple as an empty PREFIX
setting).  This would mean modifying pkgsrc to install things properly
in /etc, /bin, /sbin, /usr/bin, /usr/sbin, /usr/lib, /usr/share, and so
on.  This is quite easy with most autoconf'ed things, but perhaps harder
with some others.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>