summaryrefslogtreecommitdiff
path: root/public_hurd_boxen/installation/darnassus.mdwn
blob: e997892066058021689ec1fe7bf3daea7cf7173b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
[[!meta copyright="Copyright © 2013, 2014, 2015, 2016 Free Software Foundation,
Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

/!\ Incomplete, but hopefully helpful for future reference.


# Packages

  * apache2

    Installation done by Richard.

  * ikiwiki

    Modified package, `ikiwiki_3.20140227_all.deb`, which contains some patch
    (not yet in a suitable form for upstream) to get rendering of our news
    pages correct (correct?).  Thus, set the package to `hold` with `dpkg
    --set-selections`.  To avoid [garbled non-ascii characters in body in web
    interface](https://ikiwiki.info/bugs/garbled_non-ascii_characters_in_body_in_web_interface/),
    manually `patch /usr/share/perl5/IkiWiki/CGI.pm` with upstream commits
    feb21ebfacb341fc34244e1c9b8557fd81d1dfc1, and
    f35c6a97d1837a37879996211bd6f3c8eb356df9 ([[!debbug 776181]]).

      * libcgi-session-perl libtext-csv-perl libcgi-formbuilder-perl
        libauthen-passphrase-perl libnet-openid-consumer-perl
        libterm-readline-gnu-perl libgravatar-url-perl librpc-xml-perl
        libtext-wikiformat-perl libhighlight-perl perlmagick graphviz texinfo

      * libemail-send-perl (for my *sendmail vs. ikiwiki* patch)

        2015-10-05:

            E: Package 'libemail-send-perl' has no installation candidate

          * <http://snapshot.debian.org/package/libreturn-value-perl/1.666004-1/#libreturn-value-perl_1.666004-1>
          * <http://snapshot.debian.org/package/libemail-send-perl/2.199-1/#libemail-send-perl_2.199-1>

      * libsearch-xapian-perl xapian-omega (for ikiwiki's search plugin)

      * libyaml-perl libyaml-syck-perl (for ikiwiki's YAML field plugins)

      * libtext-markdown-perl (used instead of libtext-markdown-discount-perl,
        but the latter still needs to be installed)

    Make sure that liblwpx-paranoidagent-perl is not installed; OpenID logins
    with fail otherwise: *no_identity_server: Could not determine ID provider
    from URL*.  Issue discovered on 2014-02-28, but unclear since when it did
    actually occur.  Nothing in the apache logs.  Not fixed by the update to
    ikiwiki 3.20140227.

  * cgit

    So one can view diffs of the wiki pages, etc.

        $ sudo ln -s ~hurd-web/hurd-web.git /var/lib/git/

    <http://darnassus.sceen.net/cgit/hurd-web.git/>.

  * git-daemon-sysvinit

    Enable as per `/usr/share/doc/git-daemon-sysvinit/README.Debian`.  Also set
    `GIT_DAEMON_OPTIONS=--export-all`, and `GIT_DAEMON_DIRECTORY='/var/lib/git'`.


# `~hurd-web/`

<http://darnassus.sceen.net/~hurd-web/>, and Git access: push to/pull from
`darnassus:~hurd-web/hurd-web.git`.


## Setup

    $ mkdir hurd-web.git && GIT_DIR=hurd-web.git git init
    [...]

Configure the [`post-update` hook](http://ikiwiki.info/post-commit/):

    $ ln -is ../../public_html.workspace.update hurd-web.git/hooks/post-update

For a full rebuild:

    $ ./public_html.workspace.generate\ wrappers --rebuild

May want to clean up `~hurd-web/public_html.workspace/.ikiwiki/` before that.
/!\ But preserve the `userdb` file.

As a user with appropriate permissions, then install the CGI file:

    § sudo mv ~hurd-web/public_html.workspace.cgi /usr/lib/cgi-bin/hurd-web


# `~tschwinge/`

/!\ TODO.

    $ mkdir tmp/backup && chmod 0733 tmp/backup


# `/var/www/robots.txt`

/!\ TODO.

This file used to contain:

    User-agent: *
    Disallow: /gitweb/
    Disallow: /cgi-bin/

... which I've now changed to:

    User-agent: *
    Disallow: /

The goal is that robots rather index the official pages,
<http://www.gnu.org/software/hurd/>, instead of the staging area on
<http://darnassus.sceen.net/~hurd-web/>.


# IRC, freenode, #hurd, 2013-02-09

    <tschwinge> We need an httpd (Apache used to work), and ikiwiki and some
      such stuff.
    <tschwinge> This has its own git repository.
    <tschwinge> This was on a separate virtual machine.
    <tschwinge> Then there was the Git repository on flubber used for people to
      push to.
    <tschwinge> Ho -- let me actually try to remember the setup.  Has been some
      years...
    <braunr> what machine currently hosts the wiki ?
    <tschwinge> Anyway, there is no requirement for the web server to be on a
      separate machine; your decision.
    <tschwinge> braunr: http://www.gnu.org/software/hurd/public_hurd_boxen.html
    <tschwinge> snubber
    <tschwinge> That was the web server.
    <tschwinge> And flubber had the repository for developers to push to.
    <tschwinge> The repository for people to push to and pull from (used to be
      on flubber) would be on darnassus now.

    <tschwinge> braunr: Of course ;-) -- I had some parts of the process
      documented:
      http://www.gnu.org/software/hurd/public_hurd_boxen/installation/snubber.html
    <tschwinge> If both Git repositories are to be on the same machine
      (darnassus) we might not actually need inetutils-inetd and netcat.
    <tschwinge> Still trying to figure out what I had done there...  ;-)
    <tschwinge> OK, I again understand the setup.  Last been touched in the
      2008/2009 timeframe.  ;-)

    <tschwinge> I'll add a hurd-web user.
    <tschwinge> So...  I actually have to locate a backup of the files from
      flubber related to the wiki,
    * tschwinge goes searching his backup devices.
    <braunr> i added userdirs on darnassus' apache
    <tschwinge> braunr: I just noticed when I wanted to add it myself.  ;-)
    <tschwinge> braunr: Do you know about CGI scripts?
    <braunr> yes
    <tschwinge> braunr: snubber had these in /var/www/cgi-bin/; darnassus now
      in /usr/lib/cgi-bin/.
    <tschwinge> ikiwiki needs to install one CGI script.
    <braunr> ok
    <tschwinge> Does this go into /usr/lib/cgi-bin/ then?  Or into ~hurd-web/
      and a symlink somewhere?
    <braunr> ikiwiki should have installed it where it's appropriate
    <braunr> normally in /usr/lib/cgi-bin/
    <tschwinge> It's a CGI script that is generated per ikiwiki instance, so
      specific to hurd-web.
    <braunr> where does it install it by default ?
    <tschwinge> $PWD ;-)
    <braunr> ah
    <braunr> it seems a bit silly to me to generate cgi scripts :/
    <braunr> i don't care much actually, we won't have virtual servers
    <braunr> so anywhere is fine
    <tschwinge> What does the +SymLinksIfOwnerMatch Apache option mean?
    <braunr> apache will normally not follow symlink
    <braunr> unless the owner of the symlink is the same as the target's
    <braunr> (with this option)
    <tschwinge> That's enabled for CGI scripts.  So would it work to have a
      symlink /usr/lib/cgi-bin/hurd-web.cgi -> ~hurd-web/hurd-web.cgi?
    <braunr> the traditional way to access cgi scripts is to explicitely refer
      to them as http://server/cgi-bin/script
    <braunr> using *.cgi may allow too open access to cgis
    <braunr> (although normally, the userdir conf should disable them)
    <braunr> hm not sure it does
    <braunr> so put it in /usr/lib/cgi-bin/
    <tschwinge> So the hurd-web ikiwiki instance just needs to be configured
      accordingly with the URL where the CGI script will be found, and then it
      will render the pages accordingly.
    <tschwinge> OK.
    <braunr> and just named hurd-web