Subject: Re: Package building questions...
To: Mason Loring Bliss <firstname.lastname@example.org>
From: Hubert Feyrer <email@example.com>
Date: 02/21/1999 01:38:14
On Sat, 20 Feb 1999, Mason Loring Bliss wrote:
> * pkg/REQ:
> Require-script that is invoked before installation and de-installation
> to ensure things like certain accounts being available, user/sysadmin
> agreeing with usage policy, etc.
You need to provide this script in your package. For the calling, see
6. If the package contains a require script (see pkg_create(1)), it is
executed with the following arguments:
pkg-name The name of the package being installed
INSTALL Keyword denoting to the script that it is to run an
installation requirements check. (The keyword is use-
ful only to scripts which serve multiple functions).
If the require script exits with a non-zero status code, the instal-
lation is terminated.
See also: pkg_delete(1).
> 1) Am I correct in assuming that the proper thing to do is to have a package
> require the existance of a particular account, and refuse to build without
> it, rather than blindly creating the account?
No. the package system's goal is to take as much work from the (possibly
non-technically knowledged) user as possible. Thus, do what you can if it
comes to account creation. (There seems to be some consensus on not to
touch /etc/* ... you'd have to tell the user to do this manually in
> 2) Should this check be done in .../pkg/REQ? If not, what's the appropriate
seems best for me... i think postgresql does it in the PLIST, though.
> 3) And is there an accepted way to allow a user to change such an account
> name, if they wish? I would assume that setting the desired default in the
> Makefile would work... Is it safe to assume that variables defined in the
> Makefile exist for, e.g., .../pkg/REQ? I can find this out from the source,
> but I'd be just as happy with commentary.
Um, no, , see above. You'd have to edit this (automatically) into the REQ
script. Several other packages do such editing to PLIST and MESSAGES -
please look around for some examples.
> PS: I've grown accustomed to a feature in fvwm2 2.1.7... Is there any
> opposition to having our package source use this version? If not, I'll do
> up a package, once I've gotten the basics down. That version, anyway,
> compiles out of the box under NetBSD, I think. (I don't remember having
> to do anything at all funky to make it work.)
I also have 2.1.7 running here at home, and I also have a package for it
(in case you want it, let me know). There's also 2.1.10 out, but I didn't
find time to update my package.
The reason this isn't in pkgsrc is that all these versions are tagged
"beta". (Although I have to say I have _never_ seen 2.1.7 or anything else
crashing... maybe I should just commit it? What do people think?)
Hubert Feyrer <firstname.lastname@example.org>