Subject: Re: pkg/19166: example rc.d scripts for packages should be registered in package contents
To: Johnny Lam <jlam@jgrind.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 01/22/2003 00:19:32
[ On Tuesday, January 21, 2003 at 18:22:10 (-0800), Johnny Lam wrote: ]
> Subject: Re: pkg/19166: example rc.d scripts for packages should be registered in package contents
>
> RCD_SCRIPTS_EXAMPLEDIR was not meant to be a user-settable variable.  It
> was originally for packages that have odd requirements for where their
> example control scripts are stored, e.g. qmail.  It is intended to be
> purely a package variable, as are all of the variables in
> bsd.pkg.install.mk, though we have no good way to make that distinction
> yet, as namespace issues haven't been completely resolved.

I think you're a little late.  You need to very clearly document things
like up front, not after the fact.  Namespace issues would be much less
critical if internal documentation was a lot more detailed.

There are certainly other variables in bsd.pkg.install.mk that clearly
are user-settable, such as PKG_CREATE_USERGROUP, PKG_CONFIG, and
PKG_RCD_SCRIPTS.  The first two are even mentioned as such in
Packages.txt.  Without at least mentioning these details in the internal
documentation a user can only assume that lack of mention in
Packages.txt is an oversight.

(it's really too bad the qmail package sets LOCALBASE=/ -- I'm certain
that's not necessary, though not doing so may make the resulting package
a little less standard, if one can actually say such a thing about
qmail... :-)

Regardless there's no elegance in having to have package maintainers
manually keep all this stuff in sync when their RCD_SCRIPTS can
automatically be registered regardless of where they're installed.

> > And of course I think the default for RCD_SCIRPTS_EXAMPLEDIR should _not_
> > be anywhere under ${PREFIX}/etc so as to avoid some confusion and future
> > problems too.
> 
> Please debate this on the tech-pkg instead of on netbsd-bugs.

Well the actual change request for this part of my suggestion is in
PR#19165.

As far as I'm concerned there's nothing much to debate -- the evidence
is clear that people get confused by using ${PREFIX}/etc/rc.d as an
"example" directory, and meanwhile there's a perfectly good
"share/examples" directory for this very purpose, and there's been ample
discussion about it for literally years now.

I think the first suggestion for using ${PREFIX}/share/examples/rc.d was
made by Luke Mewburn on 2000/02/13 on tech-pkg (in step with his plan to
use /usr/share/examples/rc.d for base-OS examples too).

The same suggestion was also made by Hubert Feyrer on 2000/05/01.

It was also re-suggested by Julio Merino on 2002/05/23, also on tech-pkg.

In followups to those messages I don't see anyone arguing against
${PREFIX}/share/examples/rc.d and several people have clearly said
${PREFIX}/etc/rc.d is the wrong place.

I finally got tired of it all and made it a real change request PR.

-- 
								Greg A. Woods

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