From 65c4c8ee77a887c7a3779ea473362bff16455116 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 00:46:50 -0400 Subject: [PATCH 01/22] --- ...e_web_interface_fail_to_get_committed.mdwn | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn diff --git a/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn b/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn new file mode 100644 index 000000000..b2c8c3117 --- /dev/null +++ b/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn @@ -0,0 +1,65 @@ +For some reason, on a wiki hosted locally using [ikiwiki-hosting](http://ikiwiki-hosting.branchable.com), web edits do not get committed and pushed to the central repository anymore. + +For example, I just did an edit on the web interface, which went on without error, but then the modified files are not committed: + +[[!format txt """ +o-cats@marcos:~/source$ git status +# On branch master +# Changes not staged for commit: +# (use "git add ..." to update what will be committed) +# (use "git checkout -- ..." to discard changes in working directory) +# +# modified: 2014/summer.mdwn +# +no changes added to commit (use "git add" and/or "git commit -a") +"""]] + +The files and the .cgi are owned by the right user: + +[[!format txt """ +o-cats@marcos:~/source$ ls -al 2014/summer.mdwn +-rw-r--r-- 1 o-cats o-cats 2812 Nov 28 23:35 2014/summer.mdwn +o-cats@marcos:~/source$ ls -al /var/www/o-cats/ikiwiki.cgi +-rwxr-xr-x 1 o-cats o-cats 15596 Oct 4 12:16 /var/www/o-cats/ikiwiki.cgi +"""]] + +The virtual host is configured to run as the right user: + +[[!format txt """ + + ServerAdmin root@localhost + ServerName foo.example.com + + SuexecUserGroup o-cats o-cats + + UserDir disabled + + DocumentRoot /home/o-cats/public_html + + DirectoryIndex index.html index + AllowOverride None + + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + allow from all + + + Options ExecCGI + AllowOverride None + Order allow,deny + allow from all + + ScriptAlias /ikiwiki.cgi /var/www/o-cats/ikiwiki.cgi + + ErrorLog /var/log/ikiwiki-hosting/o-cats/error.log + LogLevel warn + CustomLog /var/log/ikiwiki-hosting/o-cats/access.log combined + + + ErrorDocument 404 "/ikiwiki.cgi" + +"""]] + +What's going on all of a sudden? This is Debian wheezy. --[[anarcat]] From 3e4350a4efa2b509d4801a23417ad48e01be2151 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 01:53:11 -0400 Subject: [PATCH 02/22] move conversation about licenses here --- doc/todo/pagedown_plugin/discussion.mdwn | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 doc/todo/pagedown_plugin/discussion.mdwn diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn new file mode 100644 index 000000000..b2e2f0cb9 --- /dev/null +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -0,0 +1,59 @@ +I've tried to retrieve the wmd-editor source tarball lately, but the site seems offline. + +From what I've read on the Internet, wmd-editor is not (yet?) free software by itself, and its author has gone MIA. +But it looks like somebody recently took the step to rewrite a wmd-clone under a saner license, see [[pagedown|http://code.google.com/p/pagedown/source/browse/]]. + +Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me... + +> AFAICS, pagedown is a modified version of WMD. Let's +> look at its license file: --[[Joey]] +> +> A javascript port of Markdown, as used on Stack Overflow +> and the rest of Stack Exchange network. +> +> Largely based on showdown.js by John Fraser (Attacklab). +> +> Original Markdown Copyright (c) 2004-2005 John Gruber +> +> +> +> Original Showdown code copyright (c) 2007 John Fraser +> +> Modifications and bugfixes (c) 2009 Dana Robinson +> Modifications and bugfixes (c) 2009-2011 Stack Exchange Inc. +> +> Permission is hereby granted, free of charge, to any person obtaining a +> copy [...] +> +> Ok, so it says it's based on showdown. John Fraser wrote showdown and also +> WMD, which IIRC was built on top of showdown. (Showdown converts the +> markdown to html, and WMD adds the editor UI.) +> +> I can nowhere find a actual statement of the copyright of showdown or +> WMD. has a "MIT License" notice on it, +> but this is clearly just the license chosen when signing up at google +> code for the repo that would be used for a rewrite of the code, and the only thing +> said about the previous 1.0 release of WMD is "use it freely", which is not +> specific enough to be a grant of license, and is moreover not a free +> software license, as it does not cover distribution or modification. +> +> Which was all covered in the thread here, +> when StackOverflow decided to start working on pagedown. +> +> This thread does not give any indication that they ever managed to get +> a license grant for WMD/showdown. It frankly, does not inspire confidence +> that the people working on this care about the license. +> +> It would probably be pretty easy to adapt the ikiwiki wmd plugin +> to use pagedown. But without a clear and credible license, why? +> +> (Note that I have a wmd-new branch in my ikiwiki git repo that +> uses , which was an earlier +> version of pagedown (probably, not entirely clear).) +> +> An alternate alternative is markitup: +> It has a clear history and a credible license (MIT or GPL dual license). +> It's also easily extensible to other formats so could handle rst etc. +> It does not, however, have a markdown to html converter -- for +> previewing it has to talk to the server with AJAX. +> --[[Joey]] From 010855ae265a31368de93e6c9d052487d932a330 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 01:54:12 -0400 Subject: [PATCH 03/22] move pagedown conversation to the pagedown_plugin page --- doc/plugins/wmd/discussion.mdwn | 57 ++------------------------------- 1 file changed, 3 insertions(+), 54 deletions(-) diff --git a/doc/plugins/wmd/discussion.mdwn b/doc/plugins/wmd/discussion.mdwn index b57ef4057..fcf1e86b6 100644 --- a/doc/plugins/wmd/discussion.mdwn +++ b/doc/plugins/wmd/discussion.mdwn @@ -3,62 +3,11 @@ I've tried to retrieve the wmd-editor source tarball lately, but the site seems From what I've read on the Internet, wmd-editor is not (yet?) free software by itself, and its author has gone MIA. But it looks like somebody recently took the step to rewrite a wmd-clone under a saner license, see [[pagedown|http://code.google.com/p/pagedown/source/browse/]]. -Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me... +Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me... --(unsigned) -> AFAICS, pagedown is a modified version of WMD. Let's -> look at its license file: --[[Joey]] +> I have moved that conversation to the pagedown plugin todo [[todo/pagedown_plugin/discussion]] page, which now actually has an implementation! --[[anarcat]] -
-A javascript port of Markdown, as used on Stack Overflow
-and the rest of Stack Exchange network.
-
-Largely based on showdown.js by John Fraser (Attacklab).
-
-Original Markdown Copyright (c) 2004-2005 John Gruber
-  
-
-
-Original Showdown code copyright (c) 2007 John Fraser
-
-Modifications and bugfixes (c) 2009 Dana Robinson
-Modifications and bugfixes (c) 2009-2011 Stack Exchange Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy [...]
-
- -> Ok, so it says it's based on showdown. John Fraser wrote showdown and also -> WMD, which IIRC was built on top of showdown. (Showdown converts the -> markdown to html, and WMD adds the editor UI.) -> -> I can nowhere find a actual statement of the copyright of showdown or -> WMD. has a "MIT License" notice on it, -> but this is clearly just the license chosen when signing up at google -> code for the repo that would be used for a rewrite of the code, and the only thing -> said about the previous 1.0 release of WMD is "use it freely", which is not -> specific enough to be a grant of license, and is moreover not a free -> software license, as it does not cover distribution or modification. -> -> Which was all covered in the thread here, -> when StackOverflow decided to start working on pagedown. -> -> This thread does not give any indication that they ever managed to get -> a license grant for WMD/showdown. It frankly, does not inspire confidence -> that the people working on this care about the license. -> -> It would probably be pretty easy to adapt the ikiwiki wmd plugin -> to use pagedown. But without a clear and credible license, why? -> -> (Note that I have a wmd-new branch in my ikiwiki git repo that -> uses , which was an earlier -> version of pagedown (probably, not entirely clear).) -> -> An alternate alternative is markitup: -> It has a clear history and a credible license (MIT or GPL dual license). -> It's also easily extensible to other formats so could handle rst etc. -> It does not, however, have a markdown to html converter -- for -> previewing it has to talk to the server with AJAX. -> --[[Joey]] +Other conversations: >> I've got pagedown working on my personal site (simon.kisikew.org) but I'm not sure how >> I can inject the relevant <div>'s in the right place. They need to go **above** From ea33ebfc69a490768ace90ca94a87cac972f7565 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 01:59:05 -0400 Subject: [PATCH 04/22] i believe showdown is free, yet WMD is clearly not, let's switch! --- doc/todo/pagedown_plugin/discussion.mdwn | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index b2e2f0cb9..6810c5e40 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -57,3 +57,40 @@ Given all the above, what about upgrading this plugin to use pagedown instead of > It does not, however, have a markdown to html converter -- for > previewing it has to talk to the server with AJAX. > --[[Joey]] + + +>> Showdown has a pretty explicit [license.txt file](https://github.com/coreyti/showdown/blob/master/license.txt) +>> and it basically looks like a BSD license. That license.txt file was imported into +>> github directly from the upstream showdown source, so it seems credible. That zip file +>> is still available [on archive.org](http://wayback.archive.org/web/20100612163302/http://attacklab.net/showdown/showdown-v0.9.zip), +>> and does mention a BSD copyright. +>> +>> So Showdown itself is clean: it's free. Nowhere does it say it derives from WMD, or +>> if it does, it doesn't matter *because* it was made by the same author **and then** +>> released under that free license. But even then, it does *not* mention being a +>> derivative of WMD. +>> +>> I agree the license behind WMD is murky. One the one hand, the [google code page](https://code.google.com/p/wmd/) +>> mentions the code will be relicensed under MIT but "for now" we can "use it freely": +>> +>> > *I'm refactoring the code, and will be releasing WMD under the MIT license soon. For +>> now you can download the most recent release (wmd-1.0.1.zip) and use it freely.* +>> +>> That zip file is again offline, but it's also [on archive.org](http://web.archive.org/web/20101226145228/http://wmd-editor.com/downloads/wmd-1.0.1.zip). +>> Things get a little more murky there: the file doesn't actually mention any copyright +>> statement, and the code is actually obfuscated, something that is mentionned on the aforementionned +>> Stack Exchange thread. The [terms and conditions of WMD](http://web.archive.org/web/20100323043113/http://wmd-editor.com/terms) +>> are pretty hostile however: +>> +>>> *All rights reserved. You may not duplicate, copy, or reuse any portion of the HTML/CSS, JavaScript, or visual design elements or concepts without express written permission from AttackLab.* +>> +>> But one could argue they apply only to WMD, and *not* showdown, which has been +>> explicitely published under a different license. And maybe that was the whole +>> point here: the stack exchange people were trying to negociate having the +>> clear and free version of WMD for their own use, maybe showdown is actually +>> what came out of this and what allows Stack exchange to do their thing... +>> +>> And besides: the point here is that we *can't actually use WMD safely*, but +>> we **can use pagedown safely!**. +>> +>> So let's work on merging that pretty branch already shall we? :) --[[anarcat]] From 7b90d9d55b8ec8cd13c287d905276e1d11137741 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 02:00:43 -0400 Subject: [PATCH 05/22] indicate origin of the copy-paste --- doc/todo/pagedown_plugin/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index 6810c5e40..550076556 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -1,3 +1,5 @@ +(This conversation was moved from [[plugins/wmd/discussion]]. --[[anarcat]]) + I've tried to retrieve the wmd-editor source tarball lately, but the site seems offline. From what I've read on the Internet, wmd-editor is not (yet?) free software by itself, and its author has gone MIA. From 4757ee1ab77b1b5d9c2aceb88b152705bad224e0 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 02:01:14 -0400 Subject: [PATCH 06/22] --- doc/plugins/wmd/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/plugins/wmd/discussion.mdwn b/doc/plugins/wmd/discussion.mdwn index fcf1e86b6..191004dc3 100644 --- a/doc/plugins/wmd/discussion.mdwn +++ b/doc/plugins/wmd/discussion.mdwn @@ -5,7 +5,7 @@ But it looks like somebody recently took the step to rewrite a wmd-clone under a Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me... --(unsigned) -> I have moved that conversation to the pagedown plugin todo [[todo/pagedown_plugin/discussion]] page, which now actually has an implementation! --[[anarcat]] +> I have moved that conversation to the pagedown plugin todo [[todo/pagedown_plugin/discussion]] page, which now actually has an implementation now, and is free! --[[anarcat]] Other conversations: From cda64f643ebb1332da969885e4020cda9aeb2c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Fri, 29 Nov 2013 01:30:24 -0500 Subject: [PATCH 07/22] i rebased all my branches to the latest release and renamed some branches, 2 bugs still await merging to be fixed --- doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn | 6 +++--- doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn | 2 +- doc/todo/osm__95__optimisations__95__and__95__fixes.mdwn | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn b/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn index ca3599660..90e2c7900 100644 --- a/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn +++ b/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn @@ -1,3 +1,5 @@ +[[!template id=gitbranch branch=anarcat/dev/openid_email author="[[anarcat]]"]] + This bug affects [[plugins/notifyemail]] but is probably caused more by [[plugins/openid]]. When using OpenID to login to a site, no email notification is sent to the user (pagespec set to `*`) when a modification is done on the wiki. I believe this is because the OpenID plugin assumes the email comes from the OpenID provider - which is not necessarily going to succeed if, for privacy reason, the OpenID provider refuses to transmit the email to ikiwiki. In the OpenID plugin, the email is actually fetched when authenticating and is stored in the session, like so: @@ -56,9 +58,7 @@ sub formbuilder_setup (@) { I believe this could be worked around simply by re-enabling that field and allowing the user to specify an email there by hand, making a note that the OpenID provider's email is used by default. -[[!template id=gitbranch branch=anarcat/openid_email author="[[anarcat]]"]] - -The dumbest [[!taglink patch]] that actually fixes the problem for me is in the branch mentionned here. +The dumbest [[!taglink patch]] that actually fixes the problem for me is in the branch mentionned above. It would probably be better to add a comment on the field as indicated above, but it's a good proof of concept. diff --git a/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn b/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn index 151c023be..dad974a81 100644 --- a/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn +++ b/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn @@ -1,4 +1,4 @@ -[[!template id=gitbranch branch=anarcat/syslog_utf8 author="[[anarcat]]"]] +[[!template id=gitbranch branch=anarcat/dev/syslog_utf8 author="[[anarcat]]"]] [[this feature|todo/syslog_should_show_wiki_name]] made it so syslog doesn't work anymore if the site being logged has non-ASCII characters it in. diff --git a/doc/todo/osm__95__optimisations__95__and__95__fixes.mdwn b/doc/todo/osm__95__optimisations__95__and__95__fixes.mdwn index fa74d3126..3496cff68 100644 --- a/doc/todo/osm__95__optimisations__95__and__95__fixes.mdwn +++ b/doc/todo/osm__95__optimisations__95__and__95__fixes.mdwn @@ -1,5 +1,5 @@ [[!template id=gitbranch branch=anarcat/osm_kml_formatting author="[[anarcat]]"]] -[[!template id=gitbranch branch=anarcat/osm_openlayers_misc author="[[anarcat]]"]] +[[!template id=gitbranch branch=anarcat/attic/osm_emacs_indent author="[[anarcat]]"]] I have accumulated a small series of patches to the OSM plugin along with the [[other|todo/osm_arbitrary_layers]] [[fixes|bugs/osm_KML_maps_do_not_display_properly_on_google_maps]] I have submitted here. They have lived in a tangled mess on my master branch so far, but not anymore! @@ -20,7 +20,7 @@ I have two main branches that need merging (on top of [[todo/osm_arbitrary_layer > doubly for files served over the network. Cherry-picked the layer sorting > change. --[[Joey]] -> > Alright, I am fine with that, thanks. -- [[anarcat]] +> > Alright, I am fine with that, thanks. I moved my branch to the attic. -- [[anarcat]] Those two branches are also merged directly on my master branch... along with [[todo/osm_arbitrary_layers]]. From 5a148e5f3a5ea53d693572600651405cbfda0395 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 02:36:21 -0400 Subject: [PATCH 08/22] fixed in 3.20130711, maybe backport? --- ...hanges_from_the_web_interface_fail_to_get_committed.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn b/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn index b2c8c3117..67a48a2e3 100644 --- a/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn +++ b/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn @@ -63,3 +63,9 @@ The virtual host is configured to run as the right user: """]] What's going on all of a sudden? This is Debian wheezy. --[[anarcat]] + +> Oh... it seems like this is related yet again to the disruptive git upgrade: +> +> [Thu Nov 28 23:35:01 2013] [error] [client 2001:1928:1:9::1] Aborting commit due to empty commit message., referer: http://foo.example.com +> +> So this is [[fixed|done]] as of 3.20130711. Shouldn't we backport to wheezy now? :) --[[anarcat]] From 62e16c41f54d764cc08dd4aa305d242a98b86052 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 03:11:36 -0400 Subject: [PATCH 09/22] a new bug --- ..._in_the_python_proxy_even_if_disabled.mdwn | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn diff --git a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn new file mode 100644 index 000000000..3d57aa8e7 --- /dev/null +++ b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn @@ -0,0 +1,41 @@ +ikiwiki 3.20130904.1~bpo70+1 + +rebuilding the whole wiki: + +[[!format txt """ +anarcat@marcos:ikiwiki*$ sudo ikisite changesetup wiki.anarc.at --rebuild +Subroutine import redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 19. +Subroutine getsetup redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 29. +Subroutine pagetemplate redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 38. +Subroutine otherlanguagesloop redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 51. +Use of uninitialized value $body in split at /usr/share/perl5/Text/MultiMarkdown.pm line 1131. +uncaught exception: 'ascii' codec can't encode character u'\xe9' in position 289: ordinal not in range(128) +Traceback (most recent call last): + File "/usr/lib/ikiwiki/plugins/proxy.py", line 309, in run + self._in_fd, self._out_fd) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 192, in handle_rpc + ret = self._dispatcher.dispatch(method, params) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 84, in dispatch + return self._dispatch(method, params) + File "/usr/lib/python2.7/SimpleXMLRPCServer.py", line 420, in _dispatch + return func(*params) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 253, in hook_proxy + "{0} hook `{1}' returned: [{2}]".format(type, name, ret)) +UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 289: ordinal not in range(128) + +Traceback (most recent call last): + File "/usr/lib/ikiwiki/plugins/rst", line 86, in + proxy.run() + File "/usr/lib/ikiwiki/plugins/proxy.py", line 317, in run + self.error('uncaught exception: {0}\n{1}'.format(e, tb)) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 298, in error + self.rpc('error', msg) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 233, in rpc + *args, **kwargs) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 173, in send_rpc + raise GoingDown() +proxy.py.GoingDown +error: ikiwiki failed +"""]] + +\xe9 is "é" in latin1, it may be the last letter of my name. no clue how it got there. suspecting this is related to the fix in [[bugs/proxy.py_utf8_troubles]], since this was not happening before the upgrade from squeeze. --[[anarcat]] From 47325c33dd49ac51b0788a53ef412b206f1248d6 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 03:16:32 -0400 Subject: [PATCH 10/22] some more ideas --- .../crashes_in_the_python_proxy_even_if_disabled.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn index 3d57aa8e7..4e54e5df4 100644 --- a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn +++ b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn @@ -39,3 +39,14 @@ error: ikiwiki failed """]] \xe9 is "é" in latin1, it may be the last letter of my name. no clue how it got there. suspecting this is related to the fix in [[bugs/proxy.py_utf8_troubles]], since this was not happening before the upgrade from squeeze. --[[anarcat]] + +> Ooops... turns out the plugin *was* enabled, through the `rst` plugin. After disabling it, the crash is gone, but one page isn't rendered anymore: +> +> removing art/histoireinternet/index.html, no longer built by art/histoireinternet.rst +> +> Here is that source file: http://anarc.at/art/histoireinternet.rst - and it seems encoded properly: +> +> $ curl -s http://anarc.at/art/histoireinternet.rst | iconv -f utf8 -t latin1 | iconv -f latin1 -t utf8 > /dev/null +> $ +> +> So I am not sure what is going on here... --[[anarcat]] From 71d744d56c0948051597c02f74d8151ebecaddc1 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 03:44:21 -0400 Subject: [PATCH 11/22] this plugin even works, and it is awesome. --- doc/todo/pagedown_plugin/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index 550076556..165b3d776 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -95,4 +95,17 @@ Given all the above, what about upgrading this plugin to use pagedown instead of >> And besides: the point here is that we *can't actually use WMD safely*, but >> we **can use pagedown safely!**. >> +>> I tried the plugin: it works, and it works well. It's also fairly trivial to +>> install the upstream showdown library, which is not shipped with the plugin +>> (which alleviates all possible copyright problems). You can take test the +>> plugin at +>> +>> There are only two issues I could find during testing: +>> +>> 1. two previews are showed (the showdown one and the regular ikiwiki one), +>> which can be confusing, but is still necessary because the showdown one +>> doesn't parse ikiwiki directives. +>> 2. the wiki needs to be rebuilt when the plugin is activated, which is not +>> done by default +>> >> So let's work on merging that pretty branch already shall we? :) --[[anarcat]] From 008bd028edc7546a4b5e3245e8a8e8a23f77ae03 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 03:47:08 -0400 Subject: [PATCH 12/22] found another issue --- doc/todo/pagedown_plugin/discussion.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index 165b3d776..7e08eefe3 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -100,12 +100,15 @@ Given all the above, what about upgrading this plugin to use pagedown instead of >> (which alleviates all possible copyright problems). You can take test the >> plugin at >> ->> There are only two issues I could find during testing: +>> There are only three issues I could find during testing: >> >> 1. two previews are showed (the showdown one and the regular ikiwiki one), >> which can be confusing, but is still necessary because the showdown one >> doesn't parse ikiwiki directives. >> 2. the wiki needs to be rebuilt when the plugin is activated, which is not >> done by default +>> 3. on large pages, the edit screen isn't in the first screen, so it's not +>> obvious we're editing the page, which is also a little confusing - we +>> would need an anchor in there... >> >> So let's work on merging that pretty branch already shall we? :) --[[anarcat]] From ac01e0788c2762fca16ed1854d80895c266f3634 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 03:56:57 -0400 Subject: [PATCH 13/22] idiotic patch to fix a small issue with the plugin --- doc/todo/pagedown_plugin/discussion.mdwn | 27 ++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index 7e08eefe3..796ab36c9 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -105,10 +105,29 @@ Given all the above, what about upgrading this plugin to use pagedown instead of >> 1. two previews are showed (the showdown one and the regular ikiwiki one), >> which can be confusing, but is still necessary because the showdown one >> doesn't parse ikiwiki directives. ->> 2. the wiki needs to be rebuilt when the plugin is activated, which is not ->> done by default +>> 2. the wiki needs to be rebuilt when the plugin is first activated for the +>> stylesheets to regenerate. new wikis are not affected, and this can be +>> deployed massively on farms without user intervention. >> 3. on large pages, the edit screen isn't in the first screen, so it's not >> obvious we're editing the page, which is also a little confusing - we ->> would need an anchor in there... +>> would need an anchor in there... Update: a simple patch fixes that... +>> but in a rather crude way: >> ->> So let's work on merging that pretty branch already shall we? :) --[[anarcat]] +>> [[!format diff """ +--- a/IkiWiki/Render.pm ++++ b/IkiWiki/Render.pm +@@ -87,7 +87,7 @@ sub genpage ($$) { + my $actions=0; + if (length $config{cgiurl}) { + if (IkiWiki->can("cgi_editpage")) { +- $template->param(editurl => cgiurl(do => "edit", page => $page)); ++ $template->param(editurl => cgiurl(do => "edit", page => $page) . '#editcontent'); + $actions++; + } + } +"""]] +>> ideally, we would show the edit box next to the page preview... +>> +>> [[!template id=gitbranch branch=anarcat/pagedown author="[[anarcat]]"]] +>> +>> Anyways, let's work on merging that pretty branch already shall we? :) --[[anarcat]] From 9282fef4a2269742a1b2aa100853184f2126f6e6 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 04:23:59 -0400 Subject: [PATCH 14/22] ok ok i gotta sleep now --- doc/todo/pagedown_plugin/discussion.mdwn | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index 796ab36c9..42015c4ff 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -126,7 +126,20 @@ Given all the above, what about upgrading this plugin to use pagedown instead of } } """]] ->> ideally, we would show the edit box next to the page preview... +>> ideally, we would show the edit box next to the page preview... And there's a way to do that too! But it requires some more CSS hackery, like [this](http://css-tricks.com/scrollfollow-sidebar/), for example: +>> +>> #wmd-preview { +>> position: relative; +>> margin: 15px auto; +>> float: left; +>> width: 50%; +>> } +>> form { +>> position: fixed; +>> margin-left: 50%; +>> } +>> +>> But this is getting a little crazy and I need to sleep now. >> >> [[!template id=gitbranch branch=anarcat/pagedown author="[[anarcat]]"]] >> From ee8e5961faa1279138c54a4687f1054338fea3f7 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlSFgIlytGZgMLh_Cw4IA011V8pLKk5dVg" Date: Fri, 29 Nov 2013 05:48:47 -0400 Subject: [PATCH 15/22] --- doc/plugins/contrib/cowsay.mdwn | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/plugins/contrib/cowsay.mdwn diff --git a/doc/plugins/contrib/cowsay.mdwn b/doc/plugins/contrib/cowsay.mdwn new file mode 100644 index 000000000..b8aa04fee --- /dev/null +++ b/doc/plugins/contrib/cowsay.mdwn @@ -0,0 +1,33 @@ +[[!template id=plugin name=cowsay author="[[BrianCandler]]"]] +[[!tag type/fun]] + +This plugin provides the [[ikiwiki/directive/cowsay]] [[ikiwiki/directive]]. +This directive allows creation of ASCII-art cows. + +For example, + +~~~ +\[[!cowsay state="stoned" text=""" +moo tube! +"""]] +~~~ + +renders as + +~~~ + ___________ +< moo tube! > + ----------- + \ ^__^ + \ (**)\_______ + (__)\ )\/\ + U ||----w | + || || +~~~ + +You must have the [cowsay](https://en.wikipedia.org/wiki/Cowsay) package +installed. + +# Download + +You can get the source code from [github](https://github.com/candlerb/ikiwiki-cowsay) From 1d4d139912f616f0b6c940efaeaeecc66299149e Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlSFgIlytGZgMLh_Cw4IA011V8pLKk5dVg" Date: Fri, 29 Nov 2013 05:51:10 -0400 Subject: [PATCH 16/22] no need to have a directive page --- doc/plugins/contrib/cowsay.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/plugins/contrib/cowsay.mdwn b/doc/plugins/contrib/cowsay.mdwn index b8aa04fee..4d0824a04 100644 --- a/doc/plugins/contrib/cowsay.mdwn +++ b/doc/plugins/contrib/cowsay.mdwn @@ -1,7 +1,7 @@ [[!template id=plugin name=cowsay author="[[BrianCandler]]"]] [[!tag type/fun]] -This plugin provides the [[ikiwiki/directive/cowsay]] [[ikiwiki/directive]]. +This plugin provides the cowsay [[ikiwiki/directive]]. This directive allows creation of ASCII-art cows. For example, From 68987ed560d45b005c15cbb87d6713cbdfc3ea3a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 29 Nov 2013 08:44:12 -0400 Subject: [PATCH 17/22] --- .../crashes_in_the_python_proxy_even_if_disabled.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn index 4e54e5df4..26896b303 100644 --- a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn +++ b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn @@ -50,3 +50,12 @@ error: ikiwiki failed > $ > > So I am not sure what is going on here... --[[anarcat]] + +>> Python is decoding what it receives from IkiWiki using the default `ascii` +>> codec. To match IkiWiki's "all source text is UTF-8" assumption, the +>> Python proxy should explicitly decode incoming text from bytes +>> (`str`) to `unicode` using the `utf8` codec instead. +>> +>> Python's conservative default is "`ascii`, regardless of locale" - +>> this minimizes the chance of silently incorrect decoding, but +>> unfortunately also maximizes the chance of crashing. --[[smcv]] From 9919f92be5243918178e222b876ab09317b00ab2 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlSFgIlytGZgMLh_Cw4IA011V8pLKk5dVg" Date: Fri, 29 Nov 2013 10:04:10 -0400 Subject: [PATCH 18/22] --- .../structured_config_data_is_mangled.mdwn | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 doc/bugs/structured_config_data_is_mangled.mdwn diff --git a/doc/bugs/structured_config_data_is_mangled.mdwn b/doc/bugs/structured_config_data_is_mangled.mdwn new file mode 100644 index 000000000..7d8f5defb --- /dev/null +++ b/doc/bugs/structured_config_data_is_mangled.mdwn @@ -0,0 +1,48 @@ +Put something like this in the setup file: + +~~~ +conversion: + - from: odt + to: pdf + command: [unoconv, -f, pdf, -o, $OUTPUTDIR, $INPUTFILE] + - from: ditaa + to: png + command: [ditaa, $INPUTFILE, $OUTPUTFILE, -s, 0.7] +~~~ + +However `Dumper($config{conversion})` shows: + +~~~ +$VAR1 = [ + 'HASH(0x164e1a0)', + 'HASH(0x164e3c8)' + ]; +~~~ + +I think it is getting mangled in `sub merge` in `IkiWiki/Setup.pm` and its calls to `possibly_foolish_untaint` + +Workaround: force the array values to be strings, and then re-parse them using YAML::XS::Load: + +~~~ +conversion: + - | + from: [odt, odp] + to: pdf + command: [unoconv, -f, pdf, -o, $OUTPUTDIR, $INPUTFILE] + - | + from: ditaa + to: png + command: [ditaa, $INPUTFILE, $OUTPUTFILE, -s, 0.7] + +... + +sub checkconfig { + if (!defined $config{conversion} || ref $config{conversion} ne "ARRAY") { + error(sprintf(gettext("Must specify '%s' and it must be a list"), "conversion")); + } + for (my $i=0; $i < @{$config{conversion}}; $i++) { + $config{conversion}->[$i] = YAML::XS::Load($config{conversion}->[$i]) if + ref $config{conversion}->[$i] ne 'HASH'; + } +} +~~~ From 5f6ed2ebca66244de0e4aa489df92013d74e3abe Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 29 Nov 2013 20:03:26 -0400 Subject: [PATCH 19/22] i have a patch for this now --- doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn index 26896b303..bbaa53658 100644 --- a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn +++ b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn @@ -1,3 +1,5 @@ +[[!template id=gitbranch branch=anarcat/dev/proxy-utf8-fail author="[[anarcat]]"]] + ikiwiki 3.20130904.1~bpo70+1 rebuilding the whole wiki: @@ -59,3 +61,7 @@ error: ikiwiki failed >> Python's conservative default is "`ascii`, regardless of locale" - >> this minimizes the chance of silently incorrect decoding, but >> unfortunately also maximizes the chance of crashing. --[[smcv]] + +> > > Right, I know that. The trick is to find the rabbit hole. :P +> > > +> > > And I found it. With my dev/proxy-utf8-fail, this doesn't fail anymore. Yay, a [[patch]] ready for commit! --[[anarcat]] From 10a21ef3e2c1ffd2b6a1f8352106a0149b540cf2 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Sat, 30 Nov 2013 19:40:54 -0400 Subject: [PATCH 20/22] just a thought --- doc/todo/bugs-everywhere_integration.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/todo/bugs-everywhere_integration.mdwn diff --git a/doc/todo/bugs-everywhere_integration.mdwn b/doc/todo/bugs-everywhere_integration.mdwn new file mode 100644 index 000000000..705922c3b --- /dev/null +++ b/doc/todo/bugs-everywhere_integration.mdwn @@ -0,0 +1,7 @@ +So this is a little nutty [[wishlist]]. + +There's this cool software called [Bugs Everywhere](http://bugseverywhere.org/) (be) which allows you to track your bug reports as plain text files in git. + +There's also an "html" command for be that allows you to produce an HTML rendering of the repository. + +ikiwiki could detect and use that instead of the (fairly limited) [[tips/integrated_issue_tracking_with_ikiwiki]].. --[[anarcat]] From 66e7e2daca86fd26ea4bfd62110d1342d72de242 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlHLiVkr16cy4E11FqrDFre19QM_5u3hBo" Date: Tue, 3 Dec 2013 11:12:22 -0400 Subject: [PATCH 21/22] Note YAML::XS absence from Makefile.PL --- doc/bugs/yaml:xs_codependency_not_listed.mdwn | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/bugs/yaml:xs_codependency_not_listed.mdwn b/doc/bugs/yaml:xs_codependency_not_listed.mdwn index f136d8b12..d52d2e5af 100644 --- a/doc/bugs/yaml:xs_codependency_not_listed.mdwn +++ b/doc/bugs/yaml:xs_codependency_not_listed.mdwn @@ -11,3 +11,4 @@ error: Bad exit status from /var/tmp/rpm-tmp.Sgq2QK (%build) when trying to build > Ok, added. [[done]] --[[Joey]] +>> Appears to be missing in 'Makefile.PL' also. -- [[ttw]] From 9a75c8a11e3bfd5c67c51d8f8dba11443dde6d90 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawkwqKsWfFCk-NK99S77R2v1JorVCnpzXUA" Date: Tue, 3 Dec 2013 12:11:23 -0400 Subject: [PATCH 22/22] --- doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn diff --git a/doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn b/doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn new file mode 100644 index 000000000..ff2eeb8f2 --- /dev/null +++ b/doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn @@ -0,0 +1,3 @@ +Using one of the strategies described here: http://stackoverflow.com/questions/6333814/ ... we could support copying/pasting images from the clipboard (in supported browsers). + +[[!tag wishlist]]