Welcome to the GNUnet tutorial for NetBSD!
It provides concrete instructions on how to install a current version of GNUnet. The goal is to support newcomers, either end users or developers, who want to get in touch with GNUnet for the first time.
As a bare minimum, we recommend you install pkgsrc. This tutorial assumes you have the CURRENT version checked out. Additionally you might want to install
devel/git-base and git clone pkgsrc-wip into the
wip folder in your pkgsrc folder:
$ cd /usr/pkgsrc
$ git clone git://wip.pkgsrc.org/pkgsrc-wip.git wip
Note: $ stands for commands run as unprivileged user, # for commands run as root user.
GNUnet is not yet in the pkgsrc tree, it's still in the pkgsrc-wip repository. So if you checked out pkgsrc-wip into
$ cd /usr/pkgsrc/wip/gnunet
Before you start building, you might want to review your
/etc/mk.conf. I suggest to consider:
As we rely on ImageMagick somewhere down our dependency chain (it is one of libextractor's dependencies), you need to set the following (as of 2019-03-06) as well:
You could however just
The build process can involve manual installation interruptions for dependencies!
Then start building:
$ make package
Once you are done, type as root:
# make install
# pkg_add /usr/pkgsrc/packages/All/gnunet-0.11.0.tgz
Note that the rc.d file which is installed is not yet functional.
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 `~/.gnunet/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:
$ touch ~/.config/gnunet.conf
GNUnet and its services are managed using the command line tool `gnunet-arm`
(Automatic Restart Manager).
To start GNUnet with its default services execute:
$ gnunet-arm -s
To list the running services use:
$ gnunet-arm -I
To stop all services, use the `-e` option.
$ gnunet-arm -e
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).
$ cd ~
$ git clone https://gnunet.org/git/gnunet.git ~/src/gnunet/gnunet
You have a choice between two options: build the *production version* or *development version*. 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.
$ cd ~/src/gnunet/gnunet
$ sh ./bootstrap
$ LDFLAGS=-L/usr/pkg/lib ./configure --prefix=~/gnunet
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:
# make install
Perform the same steps as for Option 1, but add the configure switch
--enable-experimental. For even more verbosity you could
configure gnunet like this:
$ LDFLAGS=-L/usr/pkg/lib CFLAGS="-g -O0" ./configure --prefix=~/gnunet --enable-logging=verbose
This allows you to get more verbose logs when you export GNUNET_FORCE_LOG=";;;;DEBUG" before you run tests.