[Infrastructures] how to build an internal (local) file structure?
Ivan Popov
pin@konvalo.org
Thu, 24 Mar 2005 21:03:57 +0100
Hello Mike,
On Thu, Mar 24, 2005 at 12:26:26PM -0600, Mike wrote:
> /COMPANY
> /bin
> /lib
> /etc
>
> Like a typical unix box. My question is for things like data,
> mapping, resource, or configuration files... where should they
> go? If there is a file 'mapping.pl' that needs the file
> 'mapping.cfg', certainly the 'mapping.pl' goes in
> /COMPANY/bin. Does the 'mapping.cfg' go into /COMPANY/lib,
> /COMPANY/etc, or somewhere else?
there was a related thread on slashdot recently, about where and how
configuration files should go and why. Pity that people spend
so much energy arguing which placement "is right".
The rather evident conclusion watching the multiple competing ideas is
that there is no "right" placement - given the intention to mix together
different software's files.
Try to look at it from another perspective.
There is no sence to place a file among other unrelated ones if it is
going to be used by one certain program.
Collect all that relates to one program into one place and
you will find that you do not have to make decisions like what you describe.
My view would be rather
/COMPANY/sw/mapping/bin/mapping.pl
| | 'config/mapping.cfg
| 'otherprog/exe/otherprog.exe
| 'dll/smth.dll
| ....
'bin/mapping.pl -> /COMPANY/sw/mapping/bin/mapping.pl
'otherprog.exe -> /COMPANY/sw/otherprog/exe/otherprog.exe
Resources that a program may need can be very application-specific
and hence would not correspond to "lib + etc" - might be, say, rather
"cache + data + profiles" or something else.
> What makes sense?
It makes sence to arrange directories according to the particular software
needs, I think.
There are some technical reasons to group software into one or few
/bin directories, and the shared libraries into one or few directories
as well. There is no such need for the less homogenous rest of the
possible resources (config files and various stuff).
My 2c,
--
Ivan