Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7728 - WWWOFFLE - integration with ht://dig
Summary: WWWOFFLE - integration with ht://dig
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Daniel Black (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-10 02:16 UTC by David McNab
Modified: 2005-02-15 03:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David McNab 2002-09-10 02:16:49 UTC
WWWOFFLE comes into its real power when taking advantage of its integration with
the ht://dig search engine.

I suggest that the WWWOFFLE emerge would have a nicer result if:

1. ht://dig is added as a dependency
2. At end of installation, the emerge executes:
  $ ln -s /home/httpd/cgi-bin/htsearch /usr/bin/htsearch (WWWOFFLE needs this)
  $ /var/spool/wwwoffle/search/htdoc/scripts/wwwoffle-htdig-full
  $ htmerge
3. Add the following little prog into /usr/bin/wwwupdate, and chmod it ug+s:

   #include <sys/types.h>
   #include <unistd.h>
   main() {
     setuid(0);
     system("/var/spool/wwwoffle/search/htdig/scripts/wwwoffle-htdig-incr");
   }

With all this in place, someone can just 'emerge wwwoffle', and have wwwoffle
fully integrated with ht://dig, ready to go. In addition, any user can run
'wwwupdate', and then be able to search on an up-to-date cache.

Lastly, to those who wrote and now maintain the ebuild for WWWOFFLE - thanks for
making this great and totally useful prog available on Gentoo! :)
Comment 1 Dan Armak (RETIRED) gentoo-dev 2002-09-10 15:07:45 UTC
This looks good. Delayed a little because we're in a bugfixing freeze right 
now, but I might well handle it before the freeze is over. 
Comment 2 Dan Armak (RETIRED) gentoo-dev 2003-06-10 14:31:22 UTC
No use pretending I maintain wwwoffle anymore. It just doesn't need much (any) work except 
for the occasional version bump, or i'd have handed it off long ago. But since I'm now "in the 
process of quitting development", I'll send this off to the bugwranglers to mark that wwwoffle 
is mostly unmaintained until someone picks it up... 
(Herds where are you...) 
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-14 15:28:41 UTC
wout, you're the only other person who's touched this package, so handing to you
Comment 4 Wout Mertens (RETIRED) gentoo-dev 2003-06-17 15:28:00 UTC
Ok, will take a look. I don't like calling scripts as root though, will see. 
Comment 5 Jean Jordaan 2004-02-07 07:02:26 UTC
I don't like wwwoffled starting as root either. I've added a wwwoffle user 
wwwoffle:x:1002:2::/dev/null:/bin/false
and chowned /var/spool/wwwoffled to it. Maybe the ebuild can be modified to do something like this?
Comment 6 Daniel Black (RETIRED) gentoo-dev 2004-04-24 02:16:07 UTC
Hopefully will be fixed soon - ref bug #35275. Wout any objections to me stealing this one?
Comment 7 Wout Mertens (RETIRED) gentoo-dev 2004-04-27 23:30:59 UTC
No, go right ahead. I could never make that ht://dig work. Good job :)
Comment 8 Daniel Black (RETIRED) gentoo-dev 2004-06-19 18:21:55 UTC
If someone writes a webapp version of htdig I'll make wwwoffle work with it.
Comment 9 Renat Lumpau (RETIRED) gentoo-dev 2004-08-26 05:55:06 UTC
-r5 uses webapp.eclass, in CVS now
Comment 10 Daniel Black (RETIRED) gentoo-dev 2004-09-19 00:29:18 UTC
I've commited version 2.8c which should support htdig. I had some trouble though.

Running the daemon as follows:
strace -f start-stop-daemon --start --quiet --exec /usr/sbin/wwwoffled    -u wwwoffle -- -c /etc/wwwoffle/wwwoffle.conf -d 6

Initiating the database (of words) as per file:///usr/share/doc/wwwoffle-2.8c/README.htdig:

su - wwwoffle -c /var/spool/wwwoffle/search/htdig/scripts/wwwoffle-htdig-full

check the permission are wwwoffle owned and readable:

find  /var/spool/wwwoffle/search/htdig/db* -ls

and going to the htdig search page

http://localhost:8080/search/htdig/search.html

and undertaking a search generated the following error in the strace:

[pid 16274] fstat64(1, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
[pid 16274] ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfffd628) = -1 ENOTTY (Inappropriate ioctl for device)
[pid 16274] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001c000
[pid 16274] open("/usr/share/htdig/header.html", O_RDONLY) = 5
[pid 16274] fstat64(5, {st_mode=S_IFREG|0644, st_size=877, ...}) = 0
[pid 16274] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001d000
[pid 16274] read(5, "<!DOCTYPE HTML PUBLIC \"-//W3C//D"..., 4096) = 877
[pid 16274] write(1, "Content-type: text/html\r\n\r\n<!DOC"..., 1024) = -1 EBADF (Bad file descriptor)

FD 1 is the stdout which should redirect back to the calling wwwoffled and get dumped as output. Suggestions as to why are welcome.
Comment 11 Daniel Black (RETIRED) gentoo-dev 2005-02-15 03:06:06 UTC
I guess its obvious that I don't care enough either to fix this. The lack of cc people here indicates the same.