]> sipb.mit.edu Git - ikiwiki.git/commitdiff
estseek patch (slightly altered) and other replies
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 18 Sep 2006 20:53:17 +0000 (20:53 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 18 Sep 2006 20:53:17 +0000 (20:53 +0000)
IkiWiki/Plugin/search.pm
debian/changelog
doc/ikiwiki.setup
doc/patchqueue/various_fixes.mdwn
doc/plugins/search.mdwn

index 2d8c3d4e16305cf07700ec09553535d08a9aeb57..5a4dfd491a896047e354b46af7f389ff3b994db5 100644 (file)
@@ -7,6 +7,8 @@ use strict;
 use IkiWiki;
 
 sub import { #{{{
 use IkiWiki;
 
 sub import { #{{{
+       hook(type => "getopt", id => "hyperestraier",
+               call => \&getopt);
        hook(type => "checkconfig", id => "hyperestraier",
                call => \&checkconfig);
        hook(type => "pagetemplate", id => "hyperestraier",
        hook(type => "checkconfig", id => "hyperestraier",
                call => \&checkconfig);
        hook(type => "pagetemplate", id => "hyperestraier",
@@ -19,6 +21,12 @@ sub import { #{{{
                call => \&cgi);
 } # }}}
 
                call => \&cgi);
 } # }}}
 
+sub getopt () { #{{{
+        eval q{use Getopt::Long};
+        Getopt::Long::Configure('pass_through');
+        GetOptions("estseek=s" => \$config{estseek});
+} #}}}
+
 sub checkconfig () { #{{{
        foreach my $required (qw(url cgiurl)) {
                if (! length $config{$required}) {
 sub checkconfig () { #{{{
        foreach my $required (qw(url cgiurl)) {
                if (! length $config{$required}) {
@@ -99,8 +107,9 @@ sub estcfg () { #{{{
        close TEMPLATE;
        $cgi="$estdir/".IkiWiki::basename($config{cgiurl});
        unlink($cgi);
        close TEMPLATE;
        $cgi="$estdir/".IkiWiki::basename($config{cgiurl});
        unlink($cgi);
-       symlink("/usr/lib/estraier/estseek.cgi", $cgi) ||
-               error("symlink $cgi: $!");
+       my $estseek = defined $config{estseek} ? $config{estseek} : '/usr/lib/estraier/estseek.cgi';
+       symlink($estseek, $cgi) ||
+               error("symlink $estseek $cgi: $!");
 } # }}}
 
 sub estcmd ($;@) { #{{{
 } # }}}
 
 sub estcmd ($;@) { #{{{
index 73ad45ea1da3d4069db01996aabc60ae0216b530..da85371b7b12e186d15c1ab15dba0630a90eaf3b 100644 (file)
@@ -50,8 +50,10 @@ ikiwiki (1.27) UNRELEASED; urgency=low
   * chomp trailing newline at the end of templates read in by the template
     plugin, to allow use of the template preprocessor directive in
     whitespace-sensative situations. Closes: #387073
   * chomp trailing newline at the end of templates read in by the template
     plugin, to allow use of the template preprocessor directive in
     whitespace-sensative situations. Closes: #387073
+  * Patch from James Westby to make the location of the estseek.cgi script
+    configurable.
 
 
- -- Joey Hess <joeyh@debian.org>  Mon, 18 Sep 2006 15:26:01 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 18 Sep 2006 16:43:10 -0400
 
 ikiwiki (1.26) unstable; urgency=low
 
 
 ikiwiki (1.26) unstable; urgency=low
 
index ab5c9eb35fb581971591d07cade902defe3badca..a9d9414c0be584b18483ee9c541ba4b58749dd68 100644 (file)
@@ -96,4 +96,12 @@ use IkiWiki::Setup::Standard {
        #                   sidebar map rst toc linkmap}],
        # If you want to disable any of the default plugins, list them here.
        #disable_plugins => [qw{inline htmlscrubber}],
        #                   sidebar map rst toc linkmap}],
        # If you want to disable any of the default plugins, list them here.
        #disable_plugins => [qw{inline htmlscrubber}],
+
+       # For use with the tag plugin, make all tags be located under a
+       # base page.
+       #tagbase => "tag".
+       
+       # For use with the search plugin if your estseek.cgi is located 
+       # somewhere else.
+       #estseek => "/usr/lib/estraier/estseek.cgi",
 }
 }
index 81cb6c5921e436bfe48f11e643330aa6d4efc3ac..176b30a21e4a4f7964b4861507f7dbb6c0d84412 100644 (file)
@@ -81,28 +81,9 @@ much help I'm afraid.
 >> to adjust permissions on my cgi-dir. This seems to be the root of the 
 >> problem.
 
 >> to adjust permissions on my cgi-dir. This seems to be the root of the 
 >> problem.
 
-----
-
-    --- IkiWiki/Plugin/search.pm
-    +++ IkiWiki/Plugin/search.pm
-    @@ -99,7 +99,7 @@
-            close TEMPLATE;
-            $cgi="$estdir/".IkiWiki::basename($config{cgiurl});
-            unlink($cgi);
-    -       symlink("/usr/lib/estraier/estseek.cgi", $cgi) ||
-    +       symlink("/usr/local/libexec/estseek.cgi", $cgi) ||
-                    error("symlink $cgi: $!");
-     } # }}}
-
-obviously I'm not asking you to include this patch, but it would
-be good if this sort of thing was configurable (at build time?). I can
-have a go if you like, but I'm not sure what would be acceptable to
-you.
-
-> This should be made configurable via an option in %IkiWiki::config,
-> the search plugin could register a getopt hook to handle it. --[[Joey]]
-
->> Like this? <http://jameswestby.net/scratch/estseek.diff>
+>>> Ah, I think it's better to keep the permissions of the repository
+>>> and source directory sane (755) and make the cgi suid to your user,
+>>> which is how it's designed to work.
 
 ----
 
 
 ----
 
@@ -178,29 +159,6 @@ informative if that code path is ever taken, but I hope that it never is.
 >> <http://mail-archives.apache.org/mod_mbox/spamassassin-dev/200509.mbox/%3C3838.431C7D9B.5F152B8F.dev@spamassassin.apache.org%3E>
 >> is what pointed me to find the problem/workaround.
 
 >> <http://mail-archives.apache.org/mod_mbox/spamassassin-dev/200509.mbox/%3C3838.431C7D9B.5F152B8F.dev@spamassassin.apache.org%3E>
 >> is what pointed me to find the problem/workaround.
 
-      
-
-----
-
-As for backports there is a problem with the sarge version of libcgi-session-perl
-and my sslcookie patch (complaints about a missing include file auto/CGI/Session/cookie.al IIRC).
-This file does not and has not ever existed, but it appears to be fixed in 
-the backport of libcgi-session-perl that I did. That puts the dependency
-required at somewhere between 3.95-2 and 4.14-1. This could then be added
-to debian/control. It would mean one more package to backport, but stops the
-bug if anyone actually uses my sslcookie option except me.
-
-> May as well, done --[[Joey]]
-
->> Thanks.
-
-As for backports I managed with 
-
- * ikiwiki_1.26
- * libcgi-formbuilder-perl_3.03.01-1
- * libcgi-session-perl_4.14-1
-
-backported to sarge, with bpo in sources.list. This only covers Depends: though,
-for instance hyperestraier needs to be backported, which I haven't got
-round to yet as there is a chain to do.
-
+>>> Given that verification, an untaint contingent on the value of $^V
+>>> sounds reasonable and I'd accept such a patch. I'm not quite sure which
+>>> version(s) of perl it should check for.
index b9875ff8504813a8b1c9119cbd23a91c761f7152..5b53253714222e0b20f027890ee2da5e563c261c 100644 (file)
@@ -7,3 +7,6 @@ full text search to ikiwiki, using the [[HyperEstraier]] engine.
 It's possible to configure HyperEstraier via one of ikiwiki's
 [[templates]], but for most users, no configuration should be needed aside
 from enabling the plugin.
 It's possible to configure HyperEstraier via one of ikiwiki's
 [[templates]], but for most users, no configuration should be needed aside
 from enabling the plugin.
+
+This plugin has a configuration option. To change the path to estseek.cgi,
+set `--estseek=/path/to/estseek.cgi`