bugsikiwiki-hostinghttp://ikiwiki-hosting.branchable.com/bugs/ikiwiki-hostingikiwiki2019-10-02T14:39:13Zcontrolpanel crashes when ikisite-wrapper failshttp://ikiwiki-hosting.branchable.com/bugs/controlpanel_crashes_when_ikisite-wrapper_fails/2019-10-02T14:39:13Z2017-04-19T15:24:04Z
<p>If ikisite-wrapper is not suid (which is the default), the command will fail when ran. Or more precisely, it will return nothing.</p>
<p>This will make the following code block crash:</p>
<div class="highlight-perl"><pre class="hl"> <span class="hl kwa">foreach</span> <span class="hl kwc">my</span> <span class="hl kwb">$siteinfo</span> <span class="hl opt">(</span>@<span class="hl opt">{</span>IkiWiki<span class="hl opt">::</span>Hosting<span class="hl opt">::</span>yamlgetshell<span class="hl opt">(</span>
<span class="hl str">"ikisite-wrapper"</span><span class="hl opt">,</span> <span class="hl str">"list"</span><span class="hl opt">,</span> <span class="hl str">"--extended"</span><span class="hl opt">,</span>
<span class="hl opt">(</span><span class="hl kwc">map</span> <span class="hl opt">{</span> <span class="hl str">"--admin=</span><span class="hl ipl">$_</span><span class="hl str">"</span><span class="hl opt">}</span> <span class="hl kwb">@accounts</span><span class="hl opt">),</span>
<span class="hl opt">(</span><span class="hl kwc">map</span> <span class="hl opt">{</span> <span class="hl str">"--owner=</span><span class="hl ipl">$_</span><span class="hl str">"</span><span class="hl opt">}</span> <span class="hl kwb">@accounts</span><span class="hl opt">),</span>
<span class="hl opt">)}) {</span>
</pre></div>
<p>... in controlpanel.pm, because it returns an empty reference. I'm not sure what to do with this - as I'm not really using the control panel, but I figured this could help:</p>
<div class="highlight-diff"><pre class="hl">diff --git a/IkiWiki/Plugin/controlpanel.pm b/IkiWiki/Plugin/controlpanel.pm
index c55a97d..37981f1 100644
<span class="hl kwb">--- a/IkiWiki/Plugin/controlpanel.pm</span>
<span class="hl kwa">+++ b/IkiWiki/Plugin/controlpanel.pm</span>
@@ -35,11 +35,12 @@ sub sessioncgi ($$) {
my (@owned_sites, @adminned_sites);
my $num=0;
<span class="hl kwb">- foreach my $siteinfo (@{IkiWiki::Hosting::yamlgetshell(</span>
<span class="hl kwb">- "ikisite-wrapper", "list", "--extended",</span>
<span class="hl kwb">- (map { "--admin=$_"} @accounts),</span>
<span class="hl kwb">- (map { "--owner=$_"} @accounts),</span>
<span class="hl kwb">- )}) {</span>
<span class="hl kwa">+ my $sites = IkiWiki::Hosting::yamlgetshell(</span>
<span class="hl kwa">+ "ikisite-wrapper", "list", "--extended",</span>
<span class="hl kwa">+ (map { "--admin=$_"} @accounts),</span>
<span class="hl kwa">+ (map { "--owner=$_"} @accounts),</span>
<span class="hl kwa">+ );</span>
<span class="hl kwa">+ foreach my $siteinfo (@{$sites}) {</span>
$siteinfo->{cgiurl}=$config{cgiurl};
$siteinfo->{num}=$num++;
</pre></div>
<p>... no? --<a href="http://ikiwiki-hosting.branchable.com/users/anarcat/">anarcat</a></p>
<blockquote><p>ping! there's a <a href="http://ikiwiki-hosting.branchable.com/patch/">patch</a> here. <img src="http://ikiwiki-hosting.branchable.com/smileys/smile.png" alt=":)" /> -- <a href="http://ikiwiki-hosting.branchable.com/users/anarcat/">anarcat</a></p></blockquote>
stale git lockfile cleanup on boothttp://ikiwiki-hosting.branchable.com/bugs/stale_git_lockfile_cleanup_on_boot/2015-03-08T18:21:53Z2015-03-08T18:21:53Z
<p>A server crash or unclean shutdown can result in .git/index.lck files
in sites, which prevent further commits.</p>
<p>At startup, ikiwiki-hosting could find such files and remove. It would
need to do it before the webserver is started to avoid races. --<a href="http://ikiwiki-hosting.branchable.com/users/joey/">Joey</a></p>
too much garbage to remove when failing to createhttp://ikiwiki-hosting.branchable.com/bugs/too_much_garbage_to_remove_when_failing_to_create/2014-04-14T15:34:10Z2014-04-13T23:17:18Z
<p>say you have some weird condition in ikisite that makes your wiki creation failed. you screwed up your <code>ikiwiki-hosting.conf</code>, the lunar phases are all out whack or some higgs boson offset the universe in a weird way, whatever it is, the wiki creation failed and now you want to try again. (edit: actually it was <a href="http://ikiwiki-hosting.branchable.com/bugs/wiki_creation_impossible/">wiki creation impossible</a>). here's a typical situation:</p>
<pre><code># ikisite branch wiki.anarc.at rl.orangeseeds.org
error: rl.orangeseeds.org already exists
</code></pre>
<p>well, that's okay, i'll just delete it now:</p>
<pre><code># ikisite delete rl.orangeseeds.org
error: cannot read /home/o-rl/ikiwiki.setup: No such file or directory
</code></pre>
<p>well isn't that great. i can't create it, i can't delete it - it's in this weeeird state where it half-exists. can't we make delete little more clever to deal with this? -- <a href="http://ikiwiki-hosting.branchable.com/users/anarcat/">anarcat</a></p>
<p>i have a crazy <a href="http://ikiwiki-hosting.branchable.com/patch/">patch</a> to workaround that... it seems that eval doesn't unroll forks as I would expect it to, so the error recovery code runs under the wrong UID. so i double-fork on top of eval to keep the right UID.</p>
<p>using this i can reliably delete any traces of any site, at least enough to fool <code>branch</code> again.</p>
<p>this is in the <code>dev/idempotent-delete</code> branch of my git repo (<code>git://src.anarc.at/ikiwiki-hosting</code>). --<a href="http://ikiwiki-hosting.branchable.com/users/anarcat/">anarcat</a></p>
<blockquote><p>I use <code>ikisite userdelete</code> in these situations, but it can leave cruft
behind.. --<a href="http://ikiwiki-hosting.branchable.com/users/joey/">Joey</a></p></blockquote>
ikisite calendar old postshttp://ikiwiki-hosting.branchable.com/bugs/ikisite_calendar_old_posts/2011-11-26T19:03:12Z2010-11-14T00:39:05Z
<p>ikisite calendar only adds calendar files for new years. However, a user
might import data from years past. It should probably find the oldest year
with content and add all years from it to the present.</p>
branching themed site and picking no themehttp://ikiwiki-hosting.branchable.com/bugs/branching_themed_site_and_picking_no_theme/2011-11-26T19:03:12Z2010-08-14T19:25:12Z
<p>If a site with a theme is branched, and the user selects the "Simple" (ie,
none) theme, the branch inherits the parent site's theme.</p>