~singpolyma/biboumi

ref: 579d46f78ae5cf6a5e3e56772f7767d796765740 biboumi/doc/install.rst -rw-r--r-- 5.4 KiB
579d46f7 — louiz’ Update the changelog for the private message changes 2 years ago
                                                                                
c70b97d7 louiz’
6f3dacc4 louiz’
c70b97d7 louiz’
a3757351 Florent Le Coz
c70b97d7 louiz’
a3757351 Florent Le Coz
b32729fb louiz’
6f3dacc4 louiz’
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
3c5cdec1 Florent Le Coz
39175e1a Florent Le Coz
6f3dacc4 louiz’
39175e1a Florent Le Coz
86f275e1 louiz’
39175e1a Florent Le Coz
c70b97d7 louiz’
2aa868c7 Florent Le Coz
3c5cdec1 Florent Le Coz
6f3dacc4 louiz’
2aa868c7 Florent Le Coz
6f3dacc4 louiz’
3c5cdec1 Florent Le Coz
2aa868c7 Florent Le Coz
6f3dacc4 louiz’
3c5cdec1 Florent Le Coz
6f3dacc4 louiz’
f5b61f0f Florent Le Coz
1bb3e2e7 louiz’
ac0f96a5 louiz’
3d1e85fd louiz’
6f3dacc4 louiz’
2aa868c7 Florent Le Coz
5b560078 louiz’
9837f611 Florent Le Coz
1bb3e2e7 louiz’
198b0fa6 Florent Le Coz
99a4dded louiz’
1bb3e2e7 louiz’
99a4dded louiz’
6f3dacc4 louiz’
3468924a Florent Le Coz
2aa868c7 Florent Le Coz
c70b97d7 louiz’
6f3dacc4 louiz’
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
524f7925 Florent Le Coz
c70b97d7 louiz’
3c5cdec1 Florent Le Coz
b37fc70f Florent Le Coz
524f7925 Florent Le Coz
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
3c5cdec1 Florent Le Coz
2bb4a347 Florent Le Coz
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
3c5cdec1 Florent Le Coz
2bb4a347 Florent Le Coz
6f3dacc4 louiz’
3c5cdec1 Florent Le Coz
c70b97d7 louiz’
b9424781 Florent Le Coz
2bb4a347 Florent Le Coz
b9424781 Florent Le Coz
c70b97d7 louiz’
b9424781 Florent Le Coz
2bb4a347 Florent Le Coz
b9424781 Florent Le Coz
3c5cdec1 Florent Le Coz
b32729fb louiz’
6f3dacc4 louiz’
c70b97d7 louiz’
1017e8f4 louiz’
c70b97d7 louiz’
1017e8f4 louiz’
6f3dacc4 louiz’
3c5cdec1 Florent Le Coz
b32729fb louiz’
6f3dacc4 louiz’
db5e02a0 Florent Le Coz
c70b97d7 louiz’
db5e02a0 Florent Le Coz
c70b97d7 louiz’
db5e02a0 Florent Le Coz
c70b97d7 louiz’
db5e02a0 Florent Le Coz
c70b97d7 louiz’
db5e02a0 Florent Le Coz
b32729fb louiz’
6f3dacc4 louiz’
c70b97d7 louiz’
6f3dacc4 louiz’
5b560078 louiz’
3d1e85fd louiz’
6f3dacc4 louiz’
99a4dded louiz’
0168b96b louiz’
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
Installation
============

The very short version:

.. code-block:: sh

   cmake . && make && ./biboumi

If that didn’t work, read on.

Dependencies
------------

Here’s the list of all the build and runtime dependencies. Because we
strive to use the smallest number of dependencies possible, many of them
are optional.  That being said, you will have the best experience using
biboumi by having all dependencies.

Tools:
~~~~~~

- A C++14 compiler (clang >= 3.4 or gcc >= 5.0 for example)
- CMake
- sphinx (optional) to build the documentation

Libraries:
~~~~~~~~~~

expat_
 Used to parse XML from the XMPP server.

libiconv_
 Encoding from anything into UTF-8

libuuid_
 Generate unique IDs

sqlite3_ or libpq_ (optional, but recommented)
 Provides a way to store various options and messages archives in a
 database. Each user of the gateway can store their own values (for
 example their prefered port, or their IRC password). Without this
 dependency, many interesting features are missing.

libidn_ (optional, but recommended)
 Provides the stringprep functionality. Without it, JIDs for IRC users are
 not provided.

udns_ (optional, but recommended)
 Asynchronously resolve domain names. This offers better reactivity and
 performances when connecting to a big number of IRC servers at the same
 time.

libbotan_ 2.x (optional, but recommended)
 Provides TLS support. Without it, IRC connections are all made in
 plain-text mode.

gcrypt_ (mandatory only if botan is absent)
 Provides the SHA-1 hash function, for the case where Botan is absent. It
 does NOT provide any TLS or encryption feature.

systemd_ (optional)
 Provides the support for a systemd service of Type=notify. This is useful only
 if you are packaging biboumi in a distribution with Systemd.

Customize
---------

The basics
~~~~~~~~~~

Once you have all the dependencies you need, configure the build system
using cmake. The cleanest way is to create a build directory, and run
everything inside it:


.. code-block:: sh

  mkdir build/ && cd build/ && cmake ..

Choosing the dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~

Without any option, cmake will look for all dependencies available on the
system and use everything it finds.  If a mandatory dependency is missing
it will obviously stop and yield an error, however if an optional
dependency is missing, it will just ignore it.

To specify that you want or don’t want to use, you need to
pass an option like this:

.. code-block:: sh

  cmake .. -DWITH_XXXX=1 -DWITHOUT_XXXX=1

The `WITH_` prefix indicates that cmake should stop if that dependency can
not be found, and the `WITHOUT_` prefix indicates that this dependency
should not be used even if it is present on the system.

The `XXXX` part needs to be replaced by one of the following: BOTAN,
LIBIDN, SYSTEMD, DOC, UDNS, SQLITE3, POSTGRESQL.

Other options
~~~~~~~~~~~~~

The default build type is "Debug", if you want to build a release version,
set the CMAKE_BUILD_TYPE variable to "release", by running this command
instead:

.. code-block:: sh

    cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr

You can also configure many parameters of the build (like customize CFLAGS,
the install path, choose the compiler, or enabling some options like the
POLLER to use), using the ncurses interface of ccmake:

.. code-block:: sh

    ccmake ..

In ccmake, first use 'c' to configure the build system, edit the values you
need and finaly use 'g' to generate the Makefiles to build the system and
quit ccmake.

You can also configure these options using a -D command line flag.

Biboumi also has a few advanced options that are useful only in very
specific cases.

- POLLER: lets you select the poller used by biboumi, at
  compile-time. Possible values are:

  - EPOLL: use the Linux-specific epoll(7). This is the default on Linux.
  - POLL: use the standard poll(2). This is the default value on all non-Linux
    platforms.

- DEBUG_SQL_QUERIES: If set to ON, additional debug logging and timing
  will be done for every SQL query that is executed. The default is OFF.
  Please set it to ON if you intend to share your debug logs on the bug
  trackers, if your issue affects the database.

Example:

.. code-block:: sh

  cmake . -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr -DWITH_BOTAN=1 -DWITHOUT_SYSTEMD=1

This command will configure the project to build a release, with TLS enabled
(using Botan) but without using Systemd (even if available on the system).


Build
-----

Once you’ve configured everything using cmake, build the software:

To build the biboumi binary, run:

.. code-block:: sh

  make


Install
-------

And then, optionaly, Install the software system-wide

.. code-block:: sh

  make install

This will install the biboumi binary, but also the man-page (if configured
with it), the policy files, the systemd unit file, etc.


Run
---

Finally, run the software using the `biboumi` binary.  Read the documentation (the
man page biboumi(1)) or the usage page.

.. _expat: http://expat.sourceforge.net/
.. _libiconv: http://www.gnu.org/software/libiconv/
.. _libuuid: http://sourceforge.net/projects/libuuid/
.. _libidn: http://www.gnu.org/software/libidn/
.. _libbotan: http://botan.randombit.net/
.. _udns: http://www.corpit.ru/mjt/udns.html
.. _sqlite3: https://sqlite.org
.. _systemd: https://www.freedesktop.org/wiki/Software/systemd/
.. _biboumi.1.rst: doc/biboumi.1.rst
.. _gcrypt: https://www.gnu.org/software/libgcrypt/
.. _libpq: https://www.postgresql.org/docs/current/static/libpq.html