Re: [htdig] Re: [ANNOUNCE] ht://Dig 3.1.4 RPMs for Red Hat


Subject: Re: [htdig] Re: [ANNOUNCE] ht://Dig 3.1.4 RPMs for Red Hat
From: Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Date: Mon Dec 13 1999 - 09:17:46 PST


According to Hugo.van.der.Kooij@caiw.nl:
> On Fri, 10 Dec 1999, Geoff Hutchison wrote:
> > At 12:17 AM +0100 12/11/99, Hugo.van.der.Kooij@caiw.nl wrote:
> > >Did you add the funny stuff at the end /etc/htdig/htdig.conf?
> >
> > What "funny stuff" are you referring to?
>
> a few lines like:
> local_urls: http://192.168.1.1/=/home/httpd/html/
> start_url: http://192.168.1.1/
>
> > >It took me while to find out that two lines of start_url results in random
> > >behaviour.
> >
> > If you mean trying to split start_url over multiple lines, you need
> > to include a '\' at the end. Otherwise it will only read the first
> > line and ignore the rest.
>
> Nope. I mean two times a line called start_url: with one at the usual
> place and one at the bottom.

There's nothing wrong with having two definitions of start_url (or any
other attribute) in one config file. The second will simply override
the first definition. It will do this consistenly. Do you have any
specific details on the sort of "random behaviour" you claim this caused?
Does the random behaviour disappear when you remove or comment out the
first start_url definitions? It may be that the problem is with the IP
address that was pulled out of your httpd.conf.

> Gathering from the info in there the RPM does suffer from a wish to
> configure things where it shouldn't. (Because it does things wrong as it
> does not look at all at the hostname or the changes in httpd.conf and
> such.)

Whether the RPM should or shouldn't configure things is a matter of
debate. The fact is that a lot of RPMs do include default configurations,
or try to automatically configure for the site on which you're installing.
My .spec file includes a post-install script to grab the first ServerName
directive from /etc/httpd/conf/httpd.conf. (Actually, I got the idea
from Elliot Lee, who had put together an earlier RPM for 3.0.8b2.
I simply expanded on it to include the local_urls stuff.) While this
is a simple-minded test, it will work with an "out of the box" Apache
installation on Red Hat Linux, as well as simple variations on the
default configuration.

The philosophy I tried to adhere to in this was that because Red Hat's
Apache RPM works right out of the box, my ht://Dig RPM should work out
of the box as well, without having to configure it. If you end up making
major changes to Apache's configuration, it's not unreasonable to expect
you to also make corresponding changes to ht://Dig's configuration.
Certainly, the post-install script's assumptions break down when Apache
defines multiple virtual servers, but if you're going to index multiple
sites, or any highly customised site, you really ought to take the time
to carefully review the entire configuration file, and familiarise yourself
with all the configuration attributes.

If you argue that the RPM chooses to "configure things where it
shouldn't," then you could make the same criticism of Red Hat's Apache
RPMs. The fact is, it works very well with most Apache configurations
on Red Hat Linux. Perhaps, though, it should check to see if more than
one ServerName is defined, and if so, not use any rather than using the
first one.

I chose to add the start_url, local_urls, and local_user_urls attributes
to the end of the htdig.conf file, to avoid having to rewrite the entire
file and make edits here and there on the fly. This is only done when
installing htdig for the first time, to work with Apache's defaults.
I'll admit that I could have done more, as far as adding comments along
with the attribute definitions, to explain what they're doing. I hadn't
done it because I assumed if someone needed to configure ht://Dig,
they'd look up what these attributes do in the documentation. I'll see
what I can do to make the post-install script's actions more clear.

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig-unsubscribe@htdig.org You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Mon Dec 13 1999 - 09:31:15 PST