According to Daniel S. Haischt:
> i would like to use htdig to index the web site
> of my own open source project that is hosted
> on sourceforge.net.
> 
> unfortunatly it is not possible to compile a
> custom version of htdig on the sf shell server.
> 
> i had serious problems while trying to use the
> preinstalled version of htdig that comes with
> the sf shell server.
> 
> is there a howto on how to use the preinstalled
> version of htdig with your own os project?

There's no HOWTO document that I know of, but I can share a few
tips that Geoff and I figured out in getting our own site indexed.
SourceForge has a policy of only running "officially released" packages
for the distributions they use, so for Red Hat that means sticking to
Red Hat's buggy RPMs based on older 3.2.0b4 snapshots, instead of the
3.1.6 stable release.  As far as I know, they don't provide a compatible
htsearch binary for the web server either.  Your only viable option
is to use a custom version of htdig, whether you want 3.1.6 or a newer
3.2.0b4 snapshot, but you have to compile it on another system.

The shell.sf.net server currently runs Red Hat Linux release 7.3
(Valhalla), on an i686 architecture and 2.4.18 kernel, so you can use
any precompiled binaries for Red Hat 7.1-7.3 on i386 and up.  I believe
Geoff compiled the ht://Dig package for our project on a 7.2 system.
We always use the -c option to specify the configuration file to the
binaries, and define all the relevant directories in the htdig.conf,
so the precompiled paths don't matter.

The cgi-bin/htsearch binary was a bit tricker, though.  Our web site
at htdig.sourceforge.net is hosted on a Debian Linux 2.2 system, which
I didn't have access to for compiling, so I cobbled together a custom
htsearch binary on Red Hat 7.2, and statically linked it so I didn't have
to deal with shared library incompatibilities.  I also forced the right
paths in htsearch.cc so the binary would have them compiled-in.  I did
this by going into the htsearch source directory, where I had already
compiled everything for RH 7.2, then I removed htsearch.o and did a make
-n to see how it would have compiled and linked things normally.  I then
adapted these commands with the -D options I wanted for the compile,
and the -static option on the link, e.g.:

    c++ -c -DCONFIG_DIR=\"/home/groups/h/ht/htdig/htdig\" \
        -DDEFAULT_CONFIG_FILE=\"/home/groups/h/ht/htdig/htdig/htdig.conf\" \
        -I../htlib -I../htcommon -I../db/dist -I../include -O2 -march=i386 \
        -mcpu=i686 htsearch.cc
    c++ -o htsearch.static -static -L../htlib -L../htcommon -L../db/dist \
        -L/usr/lib Display.o DocMatch.o ResultList.o ResultMatch.o Template.o \
        TemplateList.o WeightWord.o htsearch.o parser.o ../htfuzzy/libfuzzy.a \
        ../htcommon/libcommon.a ../htlib/libht.a ../db/dist/libdb.a -lz
    strip htsearch.static

I then copied the htsearch.static binary above to shell.sf.net, into
/home/groups/h/ht/htdig/cgi-bin/htsearch.

Should SourceForge change server architectures again, the trick to
figuring out what they're running is to look for /etc/redhat-release
or /etc/debian_version, or some other identification of distribution.
To discover this on the web server, I used a CGI shell script, which I
can maintain from the shell server.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to