Re: Cannot easily contribute to the wiki

2018-10-25 Thread Joshua Branson
Thomas Schwinge  writes:

I was able to my local hurd wiki to build locally.  I had to disable the
xapian search and ymlfront plugins.  Now I have the hurd wiki building
locally!

Hoo ray!!!

> Hi!
>
> On Mon, 24 Sep 2018 11:19:42 -0400, Joshua Branson  
> wrote:
>> A few years ago I had the Hurd wiki cloned locally, and I could rather
>> trivially set it up.  However, following the online guide a few days
>> ago, I'm running into some issues.
>>
>> https://www.gnu.org/software/hurd/contributing/web_pages.html
>>
>> I've cloned the repo.  I've run
>>
>> $ apt-get install ikiwiki libyaml-syck-perl markdown
>> libsearch-xapian-perl texinfo
>>
>> Neither of these commands work in the web pages directory:
>>
>>  ikiwiki --setup ikiwiki.setup
>>
>> ./render_locally
>>
>>
>> They both fail with "Failed to load plugin, Ikiwiki::Plugin::field".
>
> Please always quote the exact log what you did and what happened;
> copy'n'paste from your terminal.
>
>> Basically getting all of ikiwiki's plugins needed to run the hurd wiki
>> is a bit of a pain.
>
> That's why these non-standard "field" etc. plugins are shipped inside the
> Hurd "web" repository, see ".library/IkiWiki/Plugin/".
>
>> This is not a complaint just an observation and a request for help.
>
> Thanks for reporting.
>
>
> I'm aware of one problem that is seen with "recent" verions of Perl
> (don't know when exactly this started), which indeed makes the "getfield"
> plugin fail to load:
>
> $ ./render_locally
> Failed to load plugin IkiWiki::Plugin::getfield: Unescaped left brace in 
> regex is illegal here in regex; marked by <-- HERE in m/{{ <-- HERE 
> \$([-\w/]+#)?[-\w]+}}/ at [...]/.library/IkiWiki/Plugin/getfield.pm line 68.
> Compilation failed in require at (eval 94) line 1.
> BEGIN failed--compilation aborted at (eval 94) line 1.
>
> (This, or something similar, also happens when pushing to darnassus.)
>
> I already have identified a fix, and will push that in the next days.
>
>
> Grüße
>  Thomas



Re: Cannot easily contribute to the wiki

2018-09-28 Thread Svante Signell
On Fri, 2018-09-28 at 11:27 -0400, Joshua Branson wrote:
> 
> Well maybe.  I changed the script to this:
> 
> [joshua@dobby ~]$ cat $(which hurd)
> #!/bin/bash
> modprobe kvm
> modprobe kvm_intel
> cd ~/programming/gnu/hurd/vm/
> MEMORY=2G
> FILE=debian-hurd-2017-11-01.img
> # If I ever need to add a cdrom
> echo "running ssh"
> 
> qemu-system-i386 -m $MEMORY  \
>  -net user -net nic, model=rtl8139   \  # make
> wiki use a driver card that gnumach has available in the kernel
> hostfwd=tcp:127.0.0.1:-:22 \
>-drive file=$FILE,cache=writeback,format=raw \
>-enable-kvm  \
>-curses  \
>-no-reboot;
> # -machine kernel_irqchip=off  \
> 
> 
> I then got this error:
> 
> [joshua@dobby ~]$ hurd
> running ssh
> Gtk-Message: 11:23:18.177: Failed to load module "canberra-gtk-
> module"
> qemu-system-i386: -net nic,: Could not open 'model=rtl8139': No such
> file or directory
> /home/joshua/programming/bash/hurd: line 12: -drive: command not
> found

Are you sure a space is allowed after -net nic,? I normally use -net
nic,model=e1000. And BTW: rtl8139 is buggy, sometimes Ethernet
connections fail. Dunno however if e1000 is supported by the mach
kernel or dde though.



Re: Cannot easily contribute to the wiki

2018-09-28 Thread Joshua Branson
Thomas Schwinge  writes:

> Hi!
>
> On Thu, 27 Sep 2018 18:42:08 -0400, Joshua Branson  
> wrote:
>> "./render_locally".
>>
>> $ ymlfront: failed to use YAML::Syck
>
> Nothing else get printed?

Nope.  That's the only error message that I get.  :(

>
>> Luckily Parabola packages perl-yaml-syck!  But after I ran installed
>> perl-yaml-syck, I still got the same error:
>>
>> $ ymlfront: failed to use YAML::Syck
>>
>> So I rebooted and tried again.   Same error:
>>
>> $ ymlfront: failed to use YAML::Syck
>>
>>
>> Granted, on my parabola machine, I'm not sure if I have all of the
>> dependancies.  Mainly the wiki says to use apt-get, which I don't have.
>>
>> $ apt-get install ikiwiki libyaml-syck-perl markdown libsearch-xapian-perl 
>> texinfo
>>
>>
>> Here's the dependancies I know I have:
>>
>> [joshua@dobby hurd-web]$ pacman -Q markdown texinfo perl-yaml-syck
>> discount 2.2.4-1
>> texinfo 6.5-1
>> perl-yaml-syck 1.30-5
>
> What does the following print?
>
> $ perl -e 'use YAML::Syck' && echo OK

It outputs:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
OK

So I should probably figure out how to set my language and LC_ALL...

>
>
> I do remember commit 178b9e4a14e8ea6fa415c3c36461e41da8434694 "ymlfront:
> Force use of YAML::Syck", but that shouldn't cause any problems if the
> relevant Perl packages are properly installed.  You might try to
> temporarily revert that one, though.
>
> Or, temporarily disable (some of) these plugins, see "ikiwiki.setup".
> You should still be able to "render_locally", just some information will
> be missing on a few pages.

I'll have to give that a shot.  This might be obvious, but I'm afraid to
commit patches for the wiki, until I can see the results of the
patches.  ie: I don't want to write incorrect markdown, and the only way
to make sure it is correct, is to render it locally.  You probably know
this, and I'm just ranting.  :)

>
>
>> So since my Parabola GNU/Linux machine didn't work, I thought I'd try
>> the Hurd vm I have.
>
> How do you start the VM?

I use a shell script:

[joshua@dobby ~]$ which hurd
/home/joshua/programming/bash/hurd
[joshua@dobby ~]$ cat $(which hurd)
#!/bin/bash
modprobe kvm
modprobe kvm_intel
cd ~/programming/gnu/hurd/vm/
MEMORY=2G
FILE=debian-hurd-2017-11-01.img
# If I ever need to add a cdrom
echo "running ssh"

qemu-system-i386 -m $MEMORY -net nic  \
 -net user,
 hostfwd=tcp:127.0.0.1:-:22 \
 -drive file=$FILE,cache=writeback,format=raw \
 -enable-kvm  \
 -curses  \
 -no-reboot;
 # -curses  \
 # -machine kernel_irqchip=off  \


Just last night I had some trouble sshing into the vm too, so I'll have
to investigate that.
>
>> Then I booted up my Hurd VM and tried git pulling.
>>
>>  fatal: Unable to look up darnassus.sceen.net (port 9418) (Temporary failure 
>> in n
>>ame resolution)
>
> Same when pulling from savannah.gnu.org, probably?

Apparently I'm pulling from braunr's repo.  I think

joshua@debian:~/programming/hurd-web$ git remote -v
   origin  
git://darnassus.sceen.net/hurd-web.git (fetch)
   origin  
git://darnassus.sceen.net/hurd-web.git (push)

 joshua@debian:~/programming/hurd-web$ which ping
   /bin/ping
   joshua@debian:~/programming/hurd-web$ 
ping www.google.com
   ping: unknown host

joshua@debian:~/programming/hurd-web$ git fetch git://git.savannah.gnu.org/hurd/
   web.git
   fatal: Unable to look up 
git.savannah.gnu.org (port 9418) (Temporary failure in
   name resolution)

>
>> I also got this error as the vm was booting:
>> ip up: failed to bring up /dev/eth0
>
> Does the information from
> <20180922084542.7v26lpgphexf52vn@var.youpi.perso.aquilenet.fr">http://mid.mail-archive.com/20180922084542.7v26lpgphexf52vn@var.youpi.perso.aquilenet.fr>
> help by any chance?
>

Well maybe.  I changed the script to this:

[joshua@dobby ~]$ cat $(which hurd)
#!/bin/bash
modprobe kvm
modprobe kvm_intel
cd ~/programming/gnu/hurd/vm/
MEMORY=2G
FILE=debian-hurd-2017-11-01.img
# If I ever need to add a cdrom
echo "running ssh"

qemu-system-i386 -m $MEMORY  \
 -net user -net nic, model=rtl8139   \  # make wiki use a 
driver card that gnumach has

Re: Cannot easily contribute to the wiki

2018-09-28 Thread Thomas Schwinge
Hi!

On Thu, 27 Sep 2018 18:42:08 -0400, Joshua Branson  wrote:
> "./render_locally".
> 
> $ ymlfront: failed to use YAML::Syck

Nothing else get printed?

> Luckily Parabola packages perl-yaml-syck!  But after I ran installed
> perl-yaml-syck, I still got the same error:
> 
> $ ymlfront: failed to use YAML::Syck
> 
> So I rebooted and tried again.   Same error:
> 
> $ ymlfront: failed to use YAML::Syck
> 
> 
> Granted, on my parabola machine, I'm not sure if I have all of the
> dependancies.  Mainly the wiki says to use apt-get, which I don't have.
> 
> $ apt-get install ikiwiki libyaml-syck-perl markdown libsearch-xapian-perl 
> texinfo
> 
> 
> Here's the dependancies I know I have:
> 
> [joshua@dobby hurd-web]$ pacman -Q markdown texinfo perl-yaml-syck
> discount 2.2.4-1
> texinfo 6.5-1
> perl-yaml-syck 1.30-5

What does the following print?

$ perl -e 'use YAML::Syck' && echo OK


I do remember commit 178b9e4a14e8ea6fa415c3c36461e41da8434694 "ymlfront:
Force use of YAML::Syck", but that shouldn't cause any problems if the
relevant Perl packages are properly installed.  You might try to
temporarily revert that one, though.

Or, temporarily disable (some of) these plugins, see "ikiwiki.setup".
You should still be able to "render_locally", just some information will
be missing on a few pages.


> So since my Parabola GNU/Linux machine didn't work, I thought I'd try
> the Hurd vm I have.

How do you start the VM?

> Then I booted up my Hurd VM and tried git pulling.
> 
>  fatal: Unable to look up darnassus.sceen.net (port 9418) (Temporary failure 
> in n
>ame resolution)

Same when pulling from savannah.gnu.org, probably?

> I also got this error as the vm was booting:
> ip up: failed to bring up /dev/eth0

Does the information from
<20180922084542.7v26lpgphexf52vn@var.youpi.perso.aquilenet.fr">http://mid.mail-archive.com/20180922084542.7v26lpgphexf52vn@var.youpi.perso.aquilenet.fr>
help by any chance?


> So, I'm kind of stuck at the moment.  :(

Well, on the contrary, there certainly are enough items here that can be
investigated.  :-)


Grüße
 Thomas



Re: Cannot easily contribute to the wiki

2018-09-27 Thread Joshua Branson
Thomas Schwinge  writes:

> Hi!
>
> On Wed, 26 Sep 2018 16:36:44 -0400, Joshua Branson  
> wrote:
>> Thomas Schwinge  writes:
>
> I now pushed the attached to address this.
>
>
> Please fetch and try again.
>

Thanks for the speedy response!  I still am getting some issues...On my
Parabola GNU/Linux machine, I get the following issues when running
"./render_locally".

$ ymlfront: failed to use YAML::Syck

Luckily Parabola packages perl-yaml-syck!  But after I ran installed
perl-yaml-syck, I still got the same error:

$ ymlfront: failed to use YAML::Syck

So I rebooted and tried again.   Same error:

$ ymlfront: failed to use YAML::Syck


Granted, on my parabola machine, I'm not sure if I have all of the
dependancies.  Mainly the wiki says to use apt-get, which I don't have.

$ apt-get install ikiwiki libyaml-syck-perl markdown libsearch-xapian-perl 
texinfo


Here's the dependancies I know I have:

[joshua@dobby hurd-web]$ pacman -Q markdown texinfo perl-yaml-syck
discount 2.2.4-1
texinfo 6.5-1
perl-yaml-syck 1.30-5


[joshua@dobby hurd-web]$ guix package -I ikiwiki
ikiwiki 3.20170111  out 
/gnu/store/xsrhihjj1rjhzhba0b2dfmbhd7c0j115-ikiwiki-3.20170111


So since my Parabola GNU/Linux machine didn't work, I thought I'd try
the Hurd vm I have.

Then I booted up my Hurd VM and tried git pulling.

 fatal: Unable to look up darnassus.sceen.net (port 9418) (Temporary failure in 
n
   ame resolution)


I also got this error as the vm was booting:
ip up: failed to bring up /dev/eth0


So, I'm kind of stuck at the moment.  :(



Re: Cannot easily contribute to the wiki

2018-09-26 Thread Thomas Schwinge
Hi!

On Wed, 26 Sep 2018 16:36:44 -0400, Joshua Branson  wrote:
> Thomas Schwinge  writes:
> > I'm aware of one problem that is seen with "recent" verions of Perl
> > (don't know when exactly this started), which indeed makes the "getfield"
> > plugin fail to load:
> >
> > $ ./render_locally 
> > Failed to load plugin IkiWiki::Plugin::getfield: Unescaped left brace 
> > in regex is illegal here in regex; marked by <-- HERE in m/{{ <-- HERE 
> > \$([-\w/]+#)?[-\w]+}}/ at [...]/.library/IkiWiki/Plugin/getfield.pm line 68.
> > Compilation failed in require at (eval 94) line 1.
> > BEGIN failed--compilation aborted at (eval 94) line 1.
> >
> 
> This is pretty the exact issue that I had.  :)
> 
> 
> > (This, or something similar, also happens when pushing to darnassus.)
> >
> > I already have identified a fix, and will push that in the next days.

I now pushed the attached to address this.


Please fetch and try again.


Grüße
 Thomas


>From 6a870e98d7f94402e83c02e9d7dfffb15f9013e4 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge 
Date: Wed, 26 Sep 2018 22:20:34 +0200
Subject: [PATCH] Resolve incompatibility in "getfield" and "texinfo" plugins

... seen with recent versions of Perl:

Failed to load plugin IkiWiki::Plugin::getfield: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/{{ <-- HERE \$([-\w/]+#)?[-\w]+}}/ at [...]/.library/IkiWiki/Plugin/getfield.pm line 68.
Compilation failed in require at (eval 94) line 1.
BEGIN failed--compilation aborted at (eval 94) line 1.
---
 .library/IkiWiki/Plugin/getfield.pm | 12 ++--
 .library/IkiWiki/Plugin/texinfo.pm  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.library/IkiWiki/Plugin/getfield.pm b/.library/IkiWiki/Plugin/getfield.pm
index 971e7ec..fb876f3 100644
--- a/.library/IkiWiki/Plugin/getfield.pm
+++ b/.library/IkiWiki/Plugin/getfield.pm
@@ -65,13 +65,13 @@ sub do_filter (@) {
 my $page_type=pagetype($page_file);
 if (defined $page_type)
 {
-	while ($params{content} =~ /{{\$([-\w\/]+#)?[-\w]+}}/)
+	while ($params{content} =~ /\{\{\$([-\w\/]+#)?[-\w]+\}\}/)
 	{
 	# substitute {{$var}} variables (source-page)
-	$params{content} =~ s/{{\$([-\w]+)}}/get_field_value($1,$page)/eg;
+	$params{content} =~ s/\{\{\$([-\w]+)\}\}/get_field_value($1,$page)/eg;
 
 	# substitute {{$page#var}} variables (source-page)
-	$params{content} =~ s/{{\$([-\w\/]+)#([-\w]+)}}/get_other_page_field_value($2,$page,$1)/eg;
+	$params{content} =~ s/\{\{\$([-\w\/]+)#([-\w]+)\}\}/get_other_page_field_value($2,$page,$1)/eg;
 	}
 }
 
@@ -79,12 +79,12 @@ sub do_filter (@) {
 $page_type=pagetype($page_file);
 if (defined $page_type)
 {
-	while ($params{content} =~ /{{\+\$([-\w\/]+#)?[-\w]+\+}}/)
+	while ($params{content} =~ /\{\{\+\$([-\w\/]+#)?[-\w]+\+\}\}/)
 	{
 	# substitute {{+$var+}} variables (dest-page)
-	$params{content} =~ s/{{\+\$([-\w]+)\+}}/get_field_value($1,$destpage)/eg;
+	$params{content} =~ s/\{\{\+\$([-\w]+)\+\}\}/get_field_value($1,$destpage)/eg;
 	# substitute {{+$page#var+}} variables (source-page)
-	$params{content} =~ s/{{\+\$([-\w\/]+)#([-\w]+)\+}}/get_other_page_field_value($2,$destpage,$1)/eg;
+	$params{content} =~ s/\{\{\+\$([-\w\/]+)#([-\w]+)\+\}\}/get_other_page_field_value($2,$destpage,$1)/eg;
 	}
 }
 
diff --git a/.library/IkiWiki/Plugin/texinfo.pm b/.library/IkiWiki/Plugin/texinfo.pm
index 8c65116..0950fb6 100644
--- a/.library/IkiWiki/Plugin/texinfo.pm
+++ b/.library/IkiWiki/Plugin/texinfo.pm
@@ -107,7 +107,7 @@ sub filter (@)
 # ``Render'' by hand some stuff that is commonly found in this section.
 if (defined $copyright{$page})
 {
-	$copyright{$page} =~ s/\@copyright{}/©/g;
+	$copyright{$page} =~ s/\@copyright\{\}/©/g;
 }
 if (defined $license{$page})
 {
-- 
1.9.1



Re: Cannot easily contribute to the wiki

2018-09-26 Thread Joshua Branson
Thomas Schwinge  writes:

> Hi!
>
> On Mon, 24 Sep 2018 11:19:42 -0400, Joshua Branson  
> wrote:
>> A few years ago I had the Hurd wiki cloned locally, and I could rather
>> trivially set it up.  However, following the online guide a few days
>> ago, I'm running into some issues.
>> 
>> is a bit of a pain.
>
> That's why these non-standard "field" etc. plugins are shipped inside the
> Hurd "web" repository, see ".library/IkiWiki/Plugin/".
>
>> This is not a complaint just an observation and a request for help.
>
> Thanks for reporting.
>
>
> I'm aware of one problem that is seen with "recent" verions of Perl
> (don't know when exactly this started), which indeed makes the "getfield"
> plugin fail to load:
>
> $ ./render_locally 
> Failed to load plugin IkiWiki::Plugin::getfield: Unescaped left brace in 
> regex is illegal here in regex; marked by <-- HERE in m/{{ <-- HERE 
> \$([-\w/]+#)?[-\w]+}}/ at [...]/.library/IkiWiki/Plugin/getfield.pm line 68.
> Compilation failed in require at (eval 94) line 1.
> BEGIN failed--compilation aborted at (eval 94) line 1.
>

This is pretty the exact issue that I had.  :)


> (This, or something similar, also happens when pushing to darnassus.)
>
> I already have identified a fix, and will push that in the next days.
>
>
> Grüße
>  Thomas



Re: Cannot easily contribute to the wiki

2018-09-26 Thread Thomas Schwinge
Hi!

On Mon, 24 Sep 2018 11:19:42 -0400, Joshua Branson  wrote:
> A few years ago I had the Hurd wiki cloned locally, and I could rather
> trivially set it up.  However, following the online guide a few days
> ago, I'm running into some issues.
> 
> https://www.gnu.org/software/hurd/contributing/web_pages.html
> 
> I've cloned the repo.  I've run
> 
> $ apt-get install ikiwiki libyaml-syck-perl markdown
> libsearch-xapian-perl texinfo
> 
> Neither of these commands work in the web pages directory:
> 
>  ikiwiki --setup ikiwiki.setup
> 
> ./render_locally
> 
> 
> They both fail with "Failed to load plugin, Ikiwiki::Plugin::field".

Please always quote the exact log what you did and what happened;
copy'n'paste from your terminal.

> Basically getting all of ikiwiki's plugins needed to run the hurd wiki
> is a bit of a pain.

That's why these non-standard "field" etc. plugins are shipped inside the
Hurd "web" repository, see ".library/IkiWiki/Plugin/".

> This is not a complaint just an observation and a request for help.

Thanks for reporting.


I'm aware of one problem that is seen with "recent" verions of Perl
(don't know when exactly this started), which indeed makes the "getfield"
plugin fail to load:

$ ./render_locally 
Failed to load plugin IkiWiki::Plugin::getfield: Unescaped left brace in 
regex is illegal here in regex; marked by <-- HERE in m/{{ <-- HERE 
\$([-\w/]+#)?[-\w]+}}/ at [...]/.library/IkiWiki/Plugin/getfield.pm line 68.
Compilation failed in require at (eval 94) line 1.
BEGIN failed--compilation aborted at (eval 94) line 1.

(This, or something similar, also happens when pushing to darnassus.)

I already have identified a fix, and will push that in the next days.


Grüße
 Thomas



Cannot easily contribute to the wiki

2018-09-24 Thread Joshua Branson


Hello,

A few years ago I had the Hurd wiki cloned locally, and I could rather
trivially set it up.  However, following the online guide a few days
ago, I'm running into some issues.

https://www.gnu.org/software/hurd/contributing/web_pages.html

I've cloned the repo.  I've run

$ apt-get install ikiwiki libyaml-syck-perl markdown
libsearch-xapian-perl texinfo

Neither of these commands work in the web pages directory:

 ikiwiki --setup ikiwiki.setup

./render_locally


They both fail with "Failed to load plugin, Ikiwiki::Plugin::field".

Basically getting all of ikiwiki's plugins needed to run the hurd wiki
is a bit of a pain.

This is not a complaint just an observation and a request for help.

Thanks,

Joshua