ikiwiki/debian
Joey Hess aa226bbb6b Consume all stdin when rcs_receive short-circuits, to avoid git SIPIPE race.
We had a weird problem where, after moving to a new, faster server,
"git push" would sometimes fail like this:

Unpacking objects: 100% (3/3), done.
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

What turned out to be going on was that git-receive-pack was dying due
to an uncaught SIGPIPE. The SIGPIPE occurred when it tried to write to
the pre-receive hook's stdin. The pre-receive hook, in this case, was
able to do all the checks it needed to do without the input, and so did
exit(0) without consuming it.

Apparently that causes a race. Most of the time, git forks the hook,
writes output to the hook, and then the hook runs, ignores it, and exits.
But sometimes, on our new faster server, git forked the hook, and it
ran, and exited, before git got around to writing to it, resulting in
the SIGPIPE.

write(7, "c9f98c67d70a1cfeba382ec27d87644a"..., 100) = -1 EPIPE (Broken
pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---

I think git should ignore SIGPIPE when writing to hooks. Otherwise,
hooks may have to go out of their way to consume all input, and as I've
seen, the races when they fail to do this can lurk undiscovered.

I have written to the git mailing list about this.

As a workaround, consume all stdin before exiting.
2011-12-05 15:17:01 -04:00
..
.gitignore Add debian/.gitignore, with ignores for Debian build products 2008-01-26 22:28:44 -08:00
NEWS releasing version 3.20110321 2011-03-21 15:01:19 -04:00
README.Debian Remove trailing whitespace from README.Debian 2008-02-10 22:55:48 -08:00
changelog Consume all stdin when rcs_receive short-circuits, to avoid git SIPIPE race. 2011-12-05 15:17:01 -04:00
compat update compat level 2009-02-16 21:54:30 -05:00
control reorder depends; git first 2011-11-19 12:40:52 -04:00
copyright add missing license text 2011-11-30 16:43:34 -04:00
docs debhelper v7; rules file minimisation. 2009-02-15 20:12:16 -05:00
link debhelper v7; rules file minimisation. 2009-02-15 20:12:16 -05:00
postinst Moved javascript files under the ikiwiki/ directory, to avoid cluttering the top of the web root. This is another things that requires a wiki rebuild on upgrade to this version. 2010-04-24 00:54:59 -04:00
preinst Add auto-blog.setup 2009-01-12 19:04:24 -05:00
rules turn python-support back on 2009-05-04 19:17:59 -04:00

README.Debian

It's a good idea, and in some cases a requirement, to rebuild your wikis
when upgrading to a new version of ikiwiki. If you have a lot of different
wikis on a system, this can be a pain to do by hand, and it's a good idea
to automate it anyway.

This Debian package of ikiwiki supports rebuilding wikis on upgrade. It
will run ikiwiki-mass-rebuild if necessary when upgraded. The file
/etc/ikiwiki/wikilist lists the setup files of wikis to rebuild, as well
as the user who owns the wiki. Edit this file and add any wikis you
set up.

You can also allow users to maintain their own list of wikis to rebuild,
by listing their usernames in /etc/ikiwiki/wikilist without corresponding
setup files.  ikiwiki will then read their lists of wikis from
.ikiwiki/wikilist in their home directories.


The examples directory contains the source to some example wiki setups.