<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>7728</bug_id>
          
          <creation_ts>2002-09-10 02:16 0000</creation_ts>
          <short_desc>WWWOFFLE - integration with ht://dig</short_desc>
          <delta_ts>2005-02-15 03:06:06 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.4</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>david@rebirthing.co.nz</reporter>
          <assigned_to>dragonheart@gentoo.org</assigned_to>
          <cc>web-apps@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>david@rebirthing.co.nz</who>
            <bug_when>2002-09-10 02:16:49 0000</bug_when>
            <thetext>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 &lt;sys/types.h&gt;
   #include &lt;unistd.h&gt;
   main() {
     setuid(0);
     system(&quot;/var/spool/wwwoffle/search/htdig/scripts/wwwoffle-htdig-incr&quot;);
   }

With all this in place, someone can just &apos;emerge wwwoffle&apos;, and have wwwoffle
fully integrated with ht://dig, ready to go. In addition, any user can run
&apos;wwwupdate&apos;, 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! :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>danarmak@gentoo.org</who>
            <bug_when>2002-09-10 15:07:45 0000</bug_when>
            <thetext>This looks good. Delayed a little because we&apos;re in a bugfixing freeze right 
now, but I might well handle it before the freeze is over. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>danarmak@gentoo.org</who>
            <bug_when>2003-06-10 14:31:22 0000</bug_when>
            <thetext>No use pretending I maintain wwwoffle anymore. It just doesn&apos;t need much (any) work except 
for the occasional version bump, or i&apos;d have handed it off long ago. But since I&apos;m now &quot;in the 
process of quitting development&quot;, I&apos;ll send this off to the bugwranglers to mark that wwwoffle 
is mostly unmaintained until someone picks it up... 
(Herds where are you...) </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>seemant@gentoo.org</who>
            <bug_when>2003-06-14 15:28:41 0000</bug_when>
            <thetext>wout, you&apos;re the only other person who&apos;s touched this package, so handing to you</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wmertens@gentoo.org</who>
            <bug_when>2003-06-17 15:28:00 0000</bug_when>
            <thetext>Ok, will take a look. I don&apos;t like calling scripts as root though, will see. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jean@upfrontsystems.co.za</who>
            <bug_when>2004-02-07 07:02:26 0000</bug_when>
            <thetext>I don&apos;t like wwwoffled starting as root either. I&apos;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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dragonheart@gentoo.org</who>
            <bug_when>2004-04-24 02:16:07 0000</bug_when>
            <thetext>Hopefully will be fixed soon - ref bug #35275. Wout any objections to me stealing this one?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wmertens@gentoo.org</who>
            <bug_when>2004-04-27 23:30:59 0000</bug_when>
            <thetext>No, go right ahead. I could never make that ht://dig work. Good job :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dragonheart@gentoo.org</who>
            <bug_when>2004-06-19 18:21:55 0000</bug_when>
            <thetext>If someone writes a webapp version of htdig I&apos;ll make wwwoffle work with it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rl03@gentoo.org</who>
            <bug_when>2004-08-26 05:55:06 0000</bug_when>
            <thetext>-r5 uses webapp.eclass, in CVS now</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dragonheart@gentoo.org</who>
            <bug_when>2004-09-19 00:29:18 0000</bug_when>
            <thetext>I&apos;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(&quot;/usr/share/htdig/header.html&quot;, 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, &quot;&lt;!DOCTYPE HTML PUBLIC \&quot;-//W3C//D&quot;..., 4096) = 877
[pid 16274] write(1, &quot;Content-type: text/html\r\n\r\n&lt;!DOC&quot;..., 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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dragonheart@gentoo.org</who>
            <bug_when>2005-02-15 03:06:06 0000</bug_when>
            <thetext>I guess its obvious that I don&apos;t care enough either to fix this. The lack of cc people here indicates the same.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>