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 - 12:46:06 PST


According to Hugo.van.der.Kooij@caiw.nl:
> On Mon, 13 Dec 1999, Gilles Detillieux wrote:
> > 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.
>
> After disabling the extra lines and correctly stating what should be there
> on the first few lines it worked as should be.

OK, but that's not what I asked. I wanted to know if disabling the
FIRST start_url definition made any difference to your results, because
you claimed that having two separate definitions of start_url led to
"random behaviour". I'd still like to know what that random behaviour is,
and how having two separate definitions of an attribute can lead to it.

On the other hand, if the "random behaviour" is in fact just htdig diging
a site other than what you wanted, because the RPM grabbed an address from
your httpd.conf other than what you wanted, then this is a configuration
issue and not a bug in htdig. That's what I'm trying to sort out here.

> > 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.
>
> I suggested to make it the first few lines which should be just as simple.

Not quite. Adding lines to the end of a file, from within a shell script,
can be as simple as "echo 'stuff' >> file". Adding lines to the start
of a file requires more shuffling around. In the case of htdig.conf,
if I simply add a new start_url definition at the start of the file,
without disabling the existing one somewhere in the middle, then the
existing one will override the new one, because it comes later in the
resulting file.

That would mean that to put the new definitions anywhere but at the end,
I'd need to write a Perl, awk or sed script to do the required editing of
the file on the fly, and embed that script into the post-install script
in the spec file. While that's certainly feasible, I'm not sure how much
time I should spend on this, given that I haven't received any other
complaints in the past year about the placement of these new attribute
definitions. I do accept that I could do more to make the purpose of
these definitions clearer, and I intend to do at least that much.

Changing the placement of them still doesn't take away from the fact
that if htdig isn't doing what you want it to, you should still read
your entire config file, from top to bottom, to see how things are set.
If you do that, you will see the attributes that were configured in,
regardless of where the post-install script puts them. If you don't do
that, you're working blindly and making assumptions, whether you use the
RPMs or install from the source tarball. We've had a few users asking
why htdig was indexing www.htdig.org, after they had installed from the
source, and hadn't bothered to even look at the resulting htdig.conf.

-- 
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 - 13:09:03 PST