Commit Graph

55 Commits (e30725efa8f85a788540efcddb80acc3ba23c257)

Author SHA1 Message Date
Joey Hess 6605764c52 Fix unusual --setup --post-commit command line option combo. 2009-02-09 14:58:10 -05:00
Joey Hess bb93fccf06 Coding style change: Remove explcit vim folding markers. 2008-12-17 15:22:16 -05:00
Joey Hess 91cb55d96b Correct --dumpsetup to include the srcdir in the setup file. 1997-08-14 08:31:42 -04:00
Joey Hess 96ff36b872 fix --wrappergroup
Was documented to work at command line, but didn't
1997-08-14 07:48:11 -04:00
Joey Hess 6ad8b8f760 require srcdir and destdir params when --render used w/o --setup
The srcdir is needed by --render, so if --setup is not specified, read it
at the command line.
2008-10-30 15:05:58 -04:00
Joey Hess 6d445cdaca fix --setup --render
In this mode, rebuild mode should not be on
2008-10-30 14:59:37 -04:00
Joey Hess 26e1fe2021 Preserve syslog setting when doing `ikiwiki -setup foo -dumpsetup bar`
The syslog value from the setup file is purposfully ignored when doing
ikiwiki -setup, so that it will output to stdout (while generating wrappers
that do use the syslog). But that caused -dumpsetup to not preserve
the syslog value from the setup file.
2008-10-29 14:28:55 -04:00
Joey Hess d3d3999410 do no-op post_commit test in wrapper
This speeds up web commits by 1/4th of a second or so, since perl does
not have to start up for the post commit hook.

perl's locking is completly FuBar, since it's impossible to tell what perl
flock() really does, and thus difficult to write code in other languages
that interoperates with perl's locking. (Let alone interoperating with
existing fcntl locking from perl...)

In this particular case, I think I was able to find a way to avoid the
insanity, mostly. The C code does a true flock(2), and if perl is using an
incompatable lock method that does not use the same locking primative at
the kernel level, then the C code's test will fail, and it will go ahead
and run the perl code. Then the perl code's test will test the right thing.

On Debian, at least lately, perl's flock() does a true flock(2), so the
optimisation does work.
2008-10-26 15:13:04 -04:00
Joey Hess 7ddea03684 move untrusted committer test into the wrapper
This saves around 1/4th second per trusted commit since ikiwiki
doesn't need to start up.
2008-10-26 14:03:18 -04:00
Joey Hess 85f4b99710 untrusted committers code seems to be fully working
Still need to investigate possible races, and test some more.
2008-10-23 18:05:57 -04:00
Joey Hess 4669eab596 more work on untrusted committers
Wired up check_canedit and check_canremove, still need to deal with
check_canattach, and test.
2008-10-23 16:29:50 -04:00
Joey Hess 62962a470d Merge branch 'master' into git-anon 2008-10-23 14:09:01 -04:00
Joey Hess 8821ba3a59 Optimise the no-op post-commit hook in the web edit case by skipping loading plugins. (Particularly a win when using external plugins.) 2008-10-23 14:08:45 -04:00
Joey Hess 094af3d113 initial support for git repos with untrusted committers
Still need to wire up the calls to check_* , but it's cold out here and my
hands are going numb, so enough for now.
2008-10-22 20:52:34 -04:00
Joey Hess 872e7425e4 typo 2008-10-01 14:29:59 -04:00
Joey Hess b5bc0e812d don't say rebuilding wiki when refreshing
If run w/o --refresh, it should still say "refreshing wiki", if there's no
setup file specifed.
2008-09-30 15:40:08 -04:00
Joey Hess 60a80be0b3 Epand usage message and add --help. Closes: #500344 2008-09-27 11:17:19 -04:00
Joey Hess c4777e30a9 allow setup file to enable verbose mode 2008-09-23 13:24:20 -04:00
Joey Hess c51b304d90 Fix reversion in use of ikiwiki -verbose -setup with a setup file that enables syslog.
Setup output is once again output to stdout in this case.

Implemented by stashing the verbose/syslog values set in the setup file,
and using those values in the generated wrappers, but not allowing them to take
effect during the setup operation itself, so that command-line options,
appearing before or after -setup, are honored.

Also, some cleanups to how %config is generated for wrappers, removing some
fields that do not need to be recorded inside the wrapper.
2008-09-20 15:38:02 -04:00
Joey Hess 0e654c1ea0 Avoid uninitialised value when --dumpsetup is used and no srcdir/destdir specified. 2008-09-08 19:21:45 -04:00
Joey Hess adc2eb3d8c Options set in the setup file are now immediatly loaded by ikiwiki -setup. This allows later switches to override them. Previously, setup file options overrode most command line options. 2008-08-06 01:58:04 -04:00
Joey Hess 9802fbee40 remove WRAPPED_OPTIONS once loaded
This makes reentrant ikiwiki calls from wrappers work.
2008-08-05 20:11:32 -04:00
Joey Hess 241c08844d avoid forcing verbose off
Setting to undef rather than 0 means that setup files generated from
the cgi wrapper will not have verbose set to 0, but instead commented out.
2008-08-05 19:40:08 -04:00
Joey Hess 4b4bce5006 Revert "typo"
This reverts commit c8d3626c51.
2008-08-05 19:39:30 -04:00
Joey Hess c8d3626c51 typo 2008-08-05 19:30:09 -04:00
Joey Hess 6040886c72 checkconfig before wrapper setup
Necessary now that the plugins control what wrappers are built.
2008-07-27 01:52:36 -04:00
Joey Hess 6a64d13352 allow --dumpsetup to be used w/o specifying srcdir and destdir
shortcut tried to use srcdir in checkconfig; change it to not so this will
work.
2008-07-26 23:00:44 -04:00
Joey Hess b073359b18 refactor 2008-07-26 15:39:41 -04:00
Joey Hess 1c00717cb2 can now dump fully functional setup files 2008-07-26 15:34:38 -04:00
Joey Hess d3f600c54b don't clear syslog config when dumping 2008-07-26 14:55:01 -04:00
Joey Hess ae8318b3cb httpauth removed long ago 2008-07-26 13:57:24 -04:00
Joey Hess 255172215e fixes 2008-07-26 12:53:07 -04:00
Joey Hess 5bea644fdd add dumpsetup option; refactor 2008-07-26 12:46:31 -04:00
Joey Hess bf6198baf3 add getconfig for inline
Also, moved the pingurl getopt parsing to inline.
2008-07-25 17:24:52 -04:00
Joey Hess 180c963074 revert eval change 2008-07-12 23:45:21 -04:00
Joey Hess e3c0e49774 only htmlize errors when cgi is actually running 2008-07-12 23:23:25 -04:00
Josh Triplett a35dd1d806 Add --prefix-directives and --no-prefix-directives options to ikiwiki
This avoids the need to set prefix_directives with --set.
2008-02-08 18:35:12 -08:00
Joey Hess 80915c830a * cgi hooks are now run before ikiwiki state is loaded.
* This allows locking the wiki before loading state, which avoids some
  tricky locking code when saving a web edit.
2008-02-03 00:23:04 -05:00
Joey Hess d7fdd04b5a * Removed support for sending commit notification mails. Along with it went
the svnrepo and notify settings, though both will be ignored if left in
  setup files.
2008-01-29 00:36:58 -05:00
joey 58318b3ef9 * Allow -cgi -wrapper to be passed on the command line to generate a
wrapper.
* Fix some taint issues with generating wrappers using the command line.
2007-08-28 21:14:03 +00:00
joey 506bcbac04 * Fix --libdir to work at the command line.
* Plugins can now be written as standalone external programs, which can
  be written in any language that can do XML::RPC.
2007-08-13 03:07:31 +00:00
joey 2e6bbb2bec * Add --set-option command line switch. 2007-08-04 06:28:43 +00:00
joey 1e5cd11635 * Add a libdir config option to let ikiwiki load perl modules, including
plugins, from a user-configurable directory.
2007-07-27 00:48:06 +00:00
joey 1612dce6bb * Add a htmlext config option, this can be used to make ikiwiki generate
html files with a different extension.
2007-07-25 01:16:53 +00:00
joey 02b9f69ba5 * Finally apply the index.html patch, with thanks to everyone who worked
on and supported creating it (especially Tumov). This adds a "usedirs"
  option that makes ikiwiki use foo/index.html instead of foo.html as
  output page names. It is not yet enabled by default.
2007-04-01 19:59:42 +00:00
joey a2cfdaaec5 * Hide excess backlinks and expand using CSS trick; control quantiy via
the numbacklinks setting.
2007-03-31 08:48:10 +00:00
joey 0302056332 * Add --post-commit option, which allows for the case of a split web server
and RCS server (or a push mirror). With this the RCS server can have a
  real post-commit hook that sshs back to the web server, and runs ikiwiki
  in post-commit mode to update the wiki.
2007-03-29 18:27:00 +00:00
joey c60477228c * Since the CGI had to drop the wiki lock to avoid deadlocking the
commit hook, it was possible for one CGI to race another one and "win"
  the commit of both their files. This race has been fixed by adding a new
  commitlock, which when locked by the CGI, disables the commit hook
  (except for commit mails). The CGI then takes care of the updates the
  commit hook would have done.
2007-02-21 08:55:28 +00:00
joey 5f162cfd34 * Add canedit hook, allowing arbitrary controls over when a page can be
edited.
* Move code forcing signing before edit to a new "signinedit" plugin, and
  code checking for locked pages into a new "lockedit" plugin. Both are 
  enabled by default.
* Remove the anonok config setting. This is now implemented by a new
  "anonok" plugin. Anyone with a wiki allowing anonymous edits should
  change their configs to enable this new plugin.
* Add an opendiscussion plugin that allows anonymous users to edit
  discussion pages, on a wiki that is otherwise wouldn't allow it.
* Lots of CGI code reorg and cleanup.
2007-02-02 02:33:03 +00:00
joey 137a87afd5 userdir fixes 2006-12-29 05:58:33 +00:00