[Xapian-devel] Omega changes

Olly Betts olly at survex.com
Tue Dec 21 11:58:20 GMT 2004


On Tue, Dec 21, 2004 at 09:56:03AM +0000, Richard Boulton wrote:
> I notice that the default apache configuration (for debian, and as
> suggested in the apache 2.0 download) refuses to serve any files
> beginning with ".ht".  I wonder if it would be worth making omega
> check for .htomega.conf (before checking for omega.conf
> and /etc/omega.conf), to take advantage of this default setting?

I don't think so.  For a start, a hidden config file is rather
unexpected outside of a home directory.  And because this behaviour
doesn't apply to all apache installations (let alone all httpd servers)
I think it clouds the issue rather than helping.  You'd really need to
check you can't fetch .htomega.conf, and if you're going to need to make
that check anyway, you might as well just use omega.conf.  Relying on
this ".ht" rule is also especially brittle - if I change from Debian to
another distro which doesn't provide this rule by default, suddenly my
config file is downloadable.

We want a nice simple guideline - omega.conf in the same directory of
omega is intended for use with a cgi-bin directory style setup.  You
shouldn't use it elsewhere unless you understand the issues and are
prepared to take more care.  We also want to avoid the lookup rules
becoming overly complicated.

> 4) Otherwise, check ${sysconfdir}/omega.conf (ie, /etc/omega.conf on
> Linux)

Incidentally, I noticed that it's currently hardwired to
"/etc/omega.conf".  Although just using sysconfdir means that it would
default to "/usr/local/etc" with just "./configure".  Maybe that's more
correct, but it's not backward compatible so we ought to make this change
at 0.9.0 or similar (I know the packages will override this but builds
from source are affected).

BTW there's a handy autoconf macro which you'll probably find useful for
setting SYSCONFDIR in config.h - it was used by xapian-core, but no
longer so it's probably in the Attic in the m4 directory.  It originally
came from the autoconf macro archive, but ISTR we'd modified it.

> 5) Otherwise, default to the current defaults.
> 
> If any of the configuration files are present but invalid, or
> permissions prevent them being read, omega should fail, and display a
> "Script is misconfigured" error message in the browser

Perhaps "Omega is misconfigured" is clearer?  It's not a script...

> If there are no objections, I'll implement this later this week.

I'm hoping to do a 0.8.5 release sometime this week, which doesn't want
at least some of this in.  We could add the environmental variable part
without breaking existing installations, but it's probably not worth
delaying the release for.

Cheers,
    Olly




More information about the Xapian-devel mailing list