Re: where do scripts go?
On Sun, Jul 11, 2004 at 05:56:05AM -0700, William Ballard wrote:
> I'm writing a GUI app that displays a list of scanned files and has some
> U/I bits to help me choose what folder it goes to, the date associated
> with it, &c., and then I press a button and move and rename the file.
>
> The rules for what validating the users input and the actual mechanism
> for renaming files is highly site-specific, so I'm going to split out
> that logic into a perl script which will communicate with the GUI via
> ordinary pipes. It will not make sense to run this script seperately.
> The user will be able to specify an alternate script on the command
> line.
>
> Where does this script belong? /usr/bin, /var/lib/<package>,
> /usr/share/<package> ?
OK, The first distinction we'll make is between intent to modify. Not
intended for modification in the normal course of use? It lives somewhere
in /usr. Modification by admin is /etc, and modification by package usually
means /var/lib. If we're modifying, that's about it. Note that you'll
ordinarily want to split the modifiable portion of a script into a separate
file, so a portion of it might follow the rules below, whilst the modifiable
remainder would follow the above rules.
>From there, we look at execution by user. Yes? /usr/{s,}bin. No? Is it
architecture dependent or independent -- that is, should the exact same file
contents be comprehensible on all architectures? If it's architecture
dependent, /usr/lib it goes. Independent stuff in /usr/share.
Most of those get a package name appended, for namespace protection.
> This is probably in the policy but I missed it.
Possibly, but I think it's a bit more spread out. And, as you can see, the
rules aren't exactly straightforward -- nor are they necessarily set in
stone exactly as I've detailed them above. I'm sure someone will come up
with alternative strategies.
- Matt
Reply to: