aboutsummaryrefslogtreecommitdiff
path: root/template/install-on-netbsd.html.j2
blob: 0370b29d6b155aa7c392d2f50d4c775448a2b42d (plain) (blame)
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
{% extends "common/base.j2" %}
{% block body_content %}
<main id="maincontent">
<article class="container">

  <header>
    <h1>{{ _("Tutorial: GNUnet on NetBSD 8.0 CURRENT") }}</h1>
  </header>

  <p>
    Welcome to the GNUnet tutorial for NetBSD!
  </p>
  <p>
    This tutorial provides concrete instructions on how to install a
    current version of GNUnet. The goal is to support newcomers,
    either users or developers, who want to get in touch with
    GNUnet for the first time.
  </p>

  <h2>{{ _("Requirements") }}</h2>

  <p>
    As a bare minimum, we recommend you
    install <a href="http://pkgsrc.org">pkgsrc</a>. This tutorial
    assumes you have the CURRENT version checked out. Additionally you
    might want to install <code>devel/git-base</code> and git
    clone <a href="http://pkgsrc.org/wip/">pkgsrc-wip</a> into
    the <code>wip</code> folder in your pkgsrc folder:
  </p>
  <p>
    <code>
      $ cd /usr/pkgsrc<br>
      $ git clone git://wip.pkgsrc.org/pkgsrc-wip.git wip
    </code>
  </p>

  <h2>{{ _("Installation") }}</h2>

  <p>
    Note: <code>$</code> stands for commands run as unprivileged
    user, <code>#</code> for commands run as root user (this can be done
    with security/doas, security/sudo, or just as root).
  </p>
  <p>
    GNUnet is not yet in the pkgsrc tree, it&#39;s still in the
    pkgsrc-wip repository. So if you checked out pkgsrc-wip
    into <code>/usr/pksrc/wip</code>:
  </p>
  <p>
    <code>
      $ cd /usr/pkgsrc/wip/gnunet
    </code>
  </p>
  <p>
    Before you start building, you might want to review
    your <code>/etc/mk.conf</code>. I suggest to consider:
  </p>
  <ul>
    <li>WRKOBJDIR=/usr/work
    <li>DISTDIR=/usr/distfiles
    <li>DEPENDS_TARGET=package
    <li>UPDATE_TARGET=bin-install
    <li>ACCEPTABLE_LICENSES+=gnu-agpl-v3
    <li>MKREPRO=yes
  </ul>
  <p>
    As we rely on ImageMagick somewhere down our dependency chain (it
    is one of libextractor&#39;s dependencies), you need to set the
    following (as of 2019-03-06) as well:
  </p>
  <ul>
    <li>IGNORE_URL+=https://nvd.nist.gov/vuln/detail/CVE-2018-15607
  </ul>
  <p>
    You could however just <code>env ALLOW_VULNERABLE_PACKAGES=1</code>
  </p>
  <p>
    The build process can involve manual installation interruptions for
    dependencies!
  </p> 
  <p>
    Then start building:
    <p>
      <code>
        $ make package
      </code>
    </p>
  <p>
    Once you are done, type:
  </p>
  <p>
    <code>
      $ make install
    </code>
  </p>
  <p>
    or alternatively:
    <p>
    <p>
      <code>
        # pkg_add /usr/pkgsrc/packages/All/gnunet-0.11.8.tgz
      </code>
    </p>
  <p>
    And you&#39;re done!.<br>
    GNUnet has a number of services and features.
    Please check <a href="https://docs.gnunet.org/">our documentation</a>
    to learn how to use them. If you find anything odd or bugs, please
    <a href="https://bugs.gnunet.org">let us know</a>.
  </p>
  <p>
    Note that the rc.d file which is installed is not yet fully functional
    and is getting debugged.
  </p>

  <h2>{{_("First steps")}}</h2>
  <p>
    Congratulations! GNUnet is now installed! Before starting it you
    may create a configuration file. By default GNUnet looks in
    our home directory for the file `~/.config/gnunet.conf`.
    Creating the configuation file is optional. For now just create an empty
    file which will remind you of the location later if needed:
  </p>
  <p>
    <code>
      $ touch ~/.config/gnunet.conf
    </code>
  </p>
  <br />   
  <p>
    It&#39;s reccomended that you increase your bandwidth restrictions
    from the acutely low defaults. The example below sets the WAN
    and LAN limits to the value "unlimited".
  </p>
  <br />
  <code>
    $ gnunet-config -s ats -o WAN_QUOTA_IN -V unlimited<br />
    $ gnunet-config -s ats -o WAN_QUOTA_OUT -V unlimited<br /> 
    $ gnunet-config -s ats -o LAN_QUOTA_IN -V unlimited<br />
    $ gnunet-config -s ats -o LAN_QUOTA_OUT -V unlimited<br />
  </code>
  <br />
  <p>
    GNUnet and its services are managed using the command line tool  `gnunet-arm`
    (Automatic Restart Manager).
    <br/>
    To start GNUnet with its default services execute:
  </p>
  <p>
    <code>
      $ gnunet-arm -s
    </code>
  </p>

  <p>
    To list the running services use:
  </p>
  <p>
    <code>
      $ gnunet-arm -I<br>
      Running services:<br>
      ats (gnunet-service-ats)<br>
      revocation (gnunet-service-revocation)<br>
      set (gnunet-service-set)<br>
      nat (gnunet-service-nat)<br>
      transport (gnunet-service-transport)<br>
      peerstore (gnunet-service-peerstore)<br>
      hostlist (gnunet-daemon-hostlist)<br>
      identity (gnunet-service-identity)<br>
      namecache (gnunet-service-namecache)<br>
      peerinfo (gnunet-service-peerinfo)<br>
      datastore (gnunet-service-datastore)<br>
      zonemaster (gnunet-service-zonemaster)<br>
      zonemaster-monitor (gnunet-service-zonemaster-monitor)<br>
      nse (gnunet-service-nse)<br>
      cadet (gnunet-service-cadet)<br>
      dht (gnunet-service-dht)<br>
      core (gnunet-service-core)<br>
      gns (gnunet-service-gns)<br>
      statistics (gnunet-service-statistics)<br>
      topology (gnunet-daemon-topology)<br>
      fs (gnunet-service-fs)<br>
      namestore (gnunet-service-namestore)<br>
      vpn (gnunet-service-vpn)
    </code>
  </p>
  <p>
    To stop all services, use the `-e` option.
  </p>
  <p>
    <code>
      $ gnunet-arm -e
    </code>
  </p>

  <h2>{{ _("Alternative: Installation from source") }}</h2>

  <p>
    The following instructions are only really interesting for developers
    or if you need special build switches.
    First, install the dependencies from pkgsrc. You can use binary built
    packages, but since we are using CURRENT of pkgsrc, this is more direct.
    For the binary built version, use pkg_add or pkgin (and read into pkgsrc
    CURRENT with pkgin or pkg_add).
  </p>
  <p>
  <ul>
    <li>audio/libopus
    <li>databases/sqlite3
    <li>devel/gettext-lib (maybe?)
    <li>devel/gmp
    <li>devel/nss
    <li>devel/zlib
    <li>devel/libgsf
    <li>devel/libltdl
    <li>devel/git-base
    <li>devel/autoconf
    <li>devel/automake
    <li>devel/libtool
    <li>devel/pkgconf (required for some of the dependencies, not GNUnet)
    <li>devel/libffi
    <li>devel/libidn2
    <li>devel/libextractor
    <li>lang/python37 (for the testsuite)
    <li>math/glpk (only for experimental features)
    <li>multimedia/gstreamer1
    <li>multimedia/gst-plugins1-base
    <li>multimedia/libogg
    <li>textproc/jansson
    <li>textproc/libunistring
    <li>security/libgcrypt
    <li>security/gnutls
    <li>www/gnurl
    <li>www/libmicrohttpd
  </ul>
  </p>

  <h3>{{ _("Get the source code") }}</h3>
  <p>
  <code>
    $ cd ~<br>
    $ git clone https://gnunet.org/git/gnunet.git ~/src/gnunet/gnunet
  </code>
  </p>

  <h3>{{ _("Compile and Install") }}</h3>
  <p>
    You have a choice between two options:
  </p>
  <ul>
    <li>build the production version
  </ul>
  <p>
    or
  </p>
  <ul>
    <li>build the development version.
  </ul>
  <p>
    If you want to start writing GNUnet applications or join the
    GNUnet development choose the development version (it will print
    more debug output and contains debug symbols that can be displayed
    with a debugger). Otherwise choose the production version.
  </p>
  
  <h5>{{ _("Option 1: GNUnet for production / usage") }}</h5>
  <p>
    We are assuming a shell and environment which exports $HOME.
    If $HOME is not exported, do so or replace $HOME accordingly
    in the instructions given below.
  </p>
  <p>
    <code>
      $ cd ~/src/gnunet/gnunet<br>
      $ sh ./bootstrap<br>
      $ LDFLAGS=-L/usr/pkg/lib ./configure --prefix=$HOME/gnunet
    </code>
  </p>
  <p>
    After configure passes, you need to add a 'gnunetdns' group to your system.
    Further, you need to add a user 'gnunet' which is part of the group 'gnunet'.
    Then:
  </p>
  <p>
    <code>
      <!-- in case the parallel builds work: -->
      <!-- $ make -j$(sysctl -n hw.ncpu || echo -n 1)<br> -->
      <!-- # make -j$(sysctl -n hw.ncpu || echo -n 1) install -->
      $ make<br>
      # make install
    </code>
  </p>

  <h5>{{ _("Option 2: GNUnet experimental") }}</h5>

  <p>
    Perform the same steps as for Option 1, but add the configure switch
    <code>--enable-experimental</code>. For even more verbosity you could
    configure gnunet like this:
  </p>
  <p>
    <code>
      $ LDFLAGS="-L/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib" CFLAGS="-g -O0" ./configure --prefix=$HOME/gnunet --enable-logging=verbose
    </code>
  </p>
  <p>
    This allows you to get more verbose logs when you export GNUNET_FORCE_LOG=";;;;DEBUG" before you run tests.
  </p>
</article>
{% endblock body_content %}