lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] default locations for LMI config/data files


From: Vadim Zeitlin
Subject: [lmi] default locations for LMI config/data files
Date: Sat, 31 Jan 2009 01:58:10 +0100

 Hello,

 I'd like to return to this topic:

        http://lists.nongnu.org/archive/html/lmi/2008-03/msg00040.html

As you can see, it was last discussed almost a year ago but we didn't do
anything about it and so it remains rather inconvenient to install and run
LMI under Linux. It's not a big deal, of course, but I believe it could be
fixed relatively easily and would like to do it if possible.

 Please notice that while the problems I have arise when LMI is built using
configure, I believe they would also happen if you installed it in a
non-default location using the manual makefiles. And the default location
is not always suitable, if only because writing to /opt requires root
permissions which you don't always have or want to use (I'm somewhat
paranoid about running "make install" of my own makefiles as root without
testing them first personally).


 The first problem is that the location of the configuration file
(configurable_settings.xml) is currently hard-coded to /etc/opt/lmi. This
is the right place for configuration of programs installed under /opt
according to FHS (I emphasize this because I've never seen it actually used
in practice but well, following standard is still probably a good idea) but
it shouldn't be used when I install LMI in e.g. ~/opt. I see two non
exclusive solutions to this problem:

1. Look for the settings file in "lmi" subdirectory of LMI_SYSCONF_DIR and
define LMI_SYSCONF_DIR as "/etc/opt" unless it's already defined (which
would be done by configure if either --prefix or --sysconfdir standard
option was used).

2. Add a command-line option --config-file allowing to specify the config
file location during run-time (this would override the compile-time
customization done by (1) if it's accepted).


 The second problem is that I currently always need to use --data_path
options when running LMI, e.g. "--data_path ~/Linux_i686/opt/share/lmi"
(Linux_i686 is just because I also have to build a 32 bit version for my 64
bit Linux version so I use a separate prefix to make it clear but
irrelevant otherwise). It would be nice if this were not necessary and I
still (i.e. as written in the message linked to above) believe that doing

3. Look for data files in "lmi" subdirectory of LMI_DATAROOT_DIR if it is
defined and "/opt/lmi/data" otherwise.


 What do you think about doing this? For me personally only (1) is really
necessary (i.e. important enough to maintain a local patch doing this even
if you don't want to accept it) but (2) and (3) would be very convenient as
well.

 Thanks,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]