Commit ac4f4c56 authored by mats Dufberg's avatar mats Dufberg
Browse files

Update master to state of develop

parent 7f5e1338
......@@ -9,7 +9,7 @@ jobs:
- perl: "5.32.0"
env: TARGET=PostgreSQL ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_postgresql_backend_config.ini
services: postgresql
# Cover all Perl versions with SQLite
# Cover supported Perl versions with SQLite
- perl: "5.32.0"
env: TARGET=SQLite ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_sqlite_backend_config.ini
- perl: "5.30"
......@@ -18,12 +18,6 @@ jobs:
env: TARGET=SQLite ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_sqlite_backend_config.ini
- perl: "5.26"
env: TARGET=SQLite ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_sqlite_backend_config.ini
- perl: "5.24"
env: TARGET=SQLite ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_sqlite_backend_config.ini
- perl: "5.22"
env: TARGET=SQLite ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_sqlite_backend_config.ini
- perl: "5.16"
env: TARGET=SQLite ZONEMASTER_RECORD=0 ZONEMASTER_BACKEND_CONFIG_FILE=./share/travis_sqlite_backend_config.ini
addons:
apt:
......@@ -107,19 +101,20 @@ before_install:
- git clone --depth=1 --branch=$TRAVIS_BRANCH https://github.com/zonemaster/zonemaster-engine.git
- ( cd zonemaster-engine && cpanm --verbose --notest . ) && rm -rf zonemaster-engine
# Install share files
- mkdir -p ./lib/auto/share/dist/
- ln -s ../../../../share ./lib/auto/share/dist/Zonemaster-Backend
before_script:
- if [[ "$TARGET" == "PostgreSQL" ]]; then psql -c "create user travis_zonemaster WITH PASSWORD 'travis_zonemaster';" -U postgres; fi
- if [[ "$TARGET" == "PostgreSQL" ]]; then psql -c 'create database travis_zonemaster OWNER travis_zonemaster;' -U postgres; fi
- if [[ "$TARGET" == "PostgreSQL" ]]; then psql -U postgres -c "CREATE USER travis_zonemaster WITH PASSWORD 'travis_zonemaster';"; fi
- if [[ "$TARGET" == "PostgreSQL" ]]; then psql -U postgres -c 'CREATE DATABASE travis_zonemaster OWNER travis_zonemaster;'; fi
- if [[ "$TARGET" == "PostgreSQL" ]]; then cpanm DBD::Pg; fi
- if [[ "$TARGET" == "PostgreSQL" ]]; then perl -I./lib ./script/create_db_postgresql_9.3.pl; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -e "CREATE USER 'travis_zm'@'localhost' IDENTIFIED BY 'travis_zonemaster';" -u root; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -e "CREATE DATABASE travis_zonemaster CHARACTER SET utf8 COLLATE utf8_bin;" -u root; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -e "GRANT ALL ON travis_zonemaster.* TO 'travis_zm'@'localhost';" -u root; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -e "FLUSH PRIVILEGES;" -u root; fi
- if [[ "$TARGET" == "MySQL" ]]; then cpanm --force DBD::mysql; fi
- if [[ "$TARGET" == "MySQL" ]]; then perl -I./lib ./script/create_db_mysql.pl; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -u root -e "CREATE USER 'travis_zm'@'localhost' IDENTIFIED BY 'travis_zonemaster';"; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -u root -e "CREATE DATABASE travis_zonemaster CHARACTER SET utf8 COLLATE utf8_bin;"; fi
- if [[ "$TARGET" == "MySQL" ]]; then mysql -u root -e "GRANT ALL ON travis_zonemaster.* TO 'travis_zm'@'localhost';"; fi
- if [[ "$TARGET" == "MySQL" ]]; then cpanm DBD::mysql; fi
script:
- perl -I./lib ./share/create_db.pl
- perl Makefile.PL && make test
Release history for Zonemaster component Zonemaster-Backend
v8.0.0 2021-12-03 (public release version)
[Breaking changes]
- Removes support of PostgreSQL before version 10 (#892)
- Removes "retry" configuration setting (#896, 881)
[Deprecation]
- Deprecates country code in RPC API calls (#796, #794)
[Features]
- Adds translation of error messages (#891)
- Adds Finnish translation of error messages (#921, #911)
- Adds Swedish translation of error messages (#899)
- Replaces CentOS with Rocky Linux (#908, #895)
- Adds upgrade documentation (#907, #879, #618)
- Adds support for collecting metrics (#844)
- Optimization of batches when PostgreSQL is used (#890)
- Improved result history response in API (#837, #830)
- Makes database port configurable (#755, #496)
[Fixes]
- Document clean-up and improvement (#913, #907, #882, #873, #871,
#822, #814, #816, #797)
- Improves error catching (#916, #914)
- Database clean-up and improvement (#906, #887, #859, #833, #839, #831,
#815, #824, #826, #812, #798, #775, #804, #805, 806)
- Updates zmb command line tool (#825, #628, #810, #768, #787, #780)
- Updates dependencies (#902, #901, 903)
- Fix translation issue (#894, #811, #809)
- Improves error message when creation of API user is blocked (#889)
- Improves RPC API error messages (#853, #789, #847, #819, #817, #820,
#703)
- Harmonize database code (#841, #832, #840, #865, #834, #689, #805)
- Use SQLite by default (#855)
- Improves handling of crashed tests (#845)
- Fixes configuration loading error (#851, #813)
- Improves log handling (#843)
- Fixes local adress mapping (#836)
- Updates default location for configuration file (#835)
- Improves validation (#801, #808, #685, #808, #802, #799, #757)
v7.0.0 2021-09-15 (public security release)
[Fixes]
- By design adding a API user (needed for the batch function) is limited to
......
### Code license
Copyright (c) 2013-2017, IIS (The Internet Foundation in Sweden)
Copyright (c) 2013-2017, AFNIC
Copyright (c) The Swedish Internet Foundation (<https://internetstiftelsen.se/en/>)
Copyright (c) AFNIC (<https://www.afnic.fr/en/>)
All rights reserved.
Copyright belongs to external contributor where applicable.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
......@@ -28,8 +30,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
### Documentation license
Copyright (c) 2013-2017, IIS (The Internet Foundation in Sweden)
Copyright (c) 2013-2017, AFNIC
Copyright (c) The Swedish Internet Foundation (<https://internetstiftelsen.se/en/>)
Copyright (c) AFNIC (<https://www.afnic.fr/en/>)
All rights reserved.
Copyright belongs to external contributor where applicable.
Creative Commons Attribution 4.0 International License
You should have received a copy of the license along with this
......
......@@ -6,11 +6,14 @@ docs/Configuration.md
docs/files-description.md
docs/GettingStarted.md
docs/Installation.md
docs/Telemetry.md
docs/TypographicConventions.md
docs/upgrade_db_zonemaster_backend_ver_1.0.3.md
docs/upgrade_db_zonemaster_backend_ver_1.1.0.md
docs/upgrade_db_zonemaster_backend_ver_5.0.0.md
docs/upgrade_db_zonemaster_backend_ver_5.0.2.md
docs/Upgrade.md
docs/upgrade/upgrade_zonemaster_backend_ver_1.0.3.md
docs/upgrade/upgrade_zonemaster_backend_ver_1.1.0.md
docs/upgrade/upgrade_zonemaster_backend_ver_5.0.0.md
docs/upgrade/upgrade_zonemaster_backend_ver_5.0.2.md
docs/upgrade/upgrade_zonemaster_backend_ver_8.0.0.md
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
......@@ -21,6 +24,7 @@ inc/Module/Install/Scripts.pm
inc/Module/Install/Share.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
inc/Module/Install/External.pm
lib/Zonemaster/Backend.pm
lib/Zonemaster/Backend/Config.pm
lib/Zonemaster/Backend/Config/DCPlugin.pm
......@@ -28,6 +32,8 @@ lib/Zonemaster/Backend/DB.pm
lib/Zonemaster/Backend/DB/MySQL.pm
lib/Zonemaster/Backend/DB/PostgreSQL.pm
lib/Zonemaster/Backend/DB/SQLite.pm
lib/Zonemaster/Backend/Errors.pm
lib/Zonemaster/Backend/Metrics.pm
lib/Zonemaster/Backend/RPCAPI.pm
lib/Zonemaster/Backend/TestAgent.pm
lib/Zonemaster/Backend/Translator.pm
......@@ -38,8 +44,6 @@ MANIFEST This list of files
META.yml
README.md
script/add-batch-job.pl
script/create_db_mysql.pl
script/create_db_postgresql_9.3.pl
script/zmb
script/zmtest
script/zonemaster_backend_rpcapi.psgi
......@@ -47,16 +51,17 @@ script/zonemaster_backend_testagent
share/backend_config.ini
share/cleanup-mysql.sql
share/cleanup-postgres.sql
share/create_db_sqlite.pl
share/create_db.pl
share/freebsd-pwd.conf
share/initial-mysql.sql
share/initial-postgres.sql
share/patch_db_README.txt
share/patch_mysql_db_zonemaster_backend_ver_1.0.3.pl
share/patch_mysql_db_zonemaster_backend_ver_5.0.0.pl
share/patch_mysql_db_zonemaster_backend_ver_5.0.2.pl
share/patch_postgresql_db_zonemaster_backend_ver_1.0.3.pl
share/patch_postgresql_db_zonemaster_backend_ver_5.0.0.pl
share/patch/README.txt
share/patch/patch_mysql_db_zonemaster_backend_ver_1.0.3.pl
share/patch/patch_mysql_db_zonemaster_backend_ver_5.0.0.pl
share/patch/patch_mysql_db_zonemaster_backend_ver_5.0.2.pl
share/patch/patch_mysql_db_zonemaster_backend_ver_8.0.0.pl
share/patch/patch_postgresql_db_zonemaster_backend_ver_1.0.3.pl
share/patch/patch_postgresql_db_zonemaster_backend_ver_5.0.0.pl
share/patch/patch_postgresql_db_zonemaster_backend_ver_8.0.0.pl
share/patch/patch_sqlite_db_zonemaster_backend_ver_8.0.0.pl
share/tmpfiles.conf
share/travis_mysql_backend_config.ini
share/travis_postgresql_backend_config.ini
......@@ -65,7 +70,17 @@ share/zm-rpcapi.lsb
share/zm-testagent.lsb
share/zm_rpcapi-bsd
share/zm_testagent-bsd
share/locale/da/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/es/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/fi/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/fr/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/nb/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/sv/LC_MESSAGES/Zonemaster-Backend.mo
share/Makefile
share/GNUmakefile
t/config.t
t/db.t
t/parameters_validation.t
t/test01.data
t/test01.t
t/test_validate_syntax.t
......
......@@ -8,6 +8,10 @@
^\.github/pull_request_template\.md$
^\.travis\.yml$
^docs/internal-documentation/
\.po$
^share/[^/]*\.mo$
^share/Zonemaster-Backend.pot$
^share/update-po$
#!start included /usr/share/perl/5.20/ExtUtils/MANIFEST.SKIP
# Avoid version control files.
......
use inc::Module::Install;
use Module::Install::Share;
name 'Zonemaster-Backend';
all_from 'lib/Zonemaster/Backend.pm';
......@@ -8,6 +9,8 @@ bugtracker 'https://github.com/zonemaster/zonemaster-backend/issues';
# "2.1.0" could be declared as "2.001" but not as "2.1"
# (see Zonemaster::LDNS below)
configure_requires 'Locale::Msgfmt' => 0.15;
requires
'Class::Method::Modifiers' => 1.09,
'Config::IniFiles' => 0,
......@@ -18,11 +21,12 @@ requires
'HTML::Entities' => 0,
'JSON::PP' => 0,
'JSON::RPC' => 1.01,
'JSON::Validator' => 3.12,
'JSON::Validator' => 4.00,
'Log::Any' => 0,
'Log::Any::Adapter::Dispatch' => 0,
'Log::Dispatch' => 0,
'LWP::UserAgent' => 0,
'Mojolicious' => 7.28,
'Moose' => 2.04,
'Parallel::ForkManager' => 1.12,
'Plack::Builder' => 0,
......@@ -31,9 +35,10 @@ requires
'Starman' => 0,
'String::ShellQuote' => 0,
'Try::Tiny' => 0.12,
'Zonemaster::Engine' => 4.002,
'Zonemaster::Engine' => 4.003,
'Zonemaster::LDNS' => 2.002,
'Plack::Middleware::ReverseProxy' => 0,
'Locale::TextDomain' => 1.20,
;
test_requires 'DBD::SQLite';
......@@ -53,4 +58,26 @@ install_script 'zmb';
no_index directory => 'CodeSnippets';
no_index directory => 'Doc';
# Make all platforms include inc/Module/Install/External.pm
requires_external_bin 'find';
if ($^O eq "freebsd") {
requires_external_bin 'gmake';
};
sub MY::postamble {
my $text;
if ($^O eq "freebsd") {
# Make FreeBSD use gmake for share/Makefile
$text = 'GMAKE ?= "gmake"' . "\n"
. 'pure_all :: share/Makefile' . "\n"
. "\t" . 'cd share && $(GMAKE) all' . "\n";
} else {
$text = 'pure_all :: share/Makefile' . "\n"
. "\t" . 'cd share && $(MAKE) all' . "\n";
};
return $text;
};
install_share;
WriteAll;
......@@ -25,28 +25,10 @@ Zonemaster Engine installed. Please see the
instructions](https://github.com/zonemaster/zonemaster-engine/blob/master/docs/Installation.md).
### Upgrade
### Upgrade
If you upgrade Zonemaster-Backend and want to keep the content of the database
(MySQL/MariaDB or PostgrSQL) then you should not reset the database when you
follow the [installation instructions]. In some cases you need to patch the
database when you update Zonemaster-Backend.
See the [upgrade document].
Always take a backup first if the database is valuable.
Current version | Link to instructions | Comments
------------------------------------|-----------------------|-----------------------
Older than 1.0.3 | [Upgrade to 1.0.3] |
At least 1.0.3 but older than 1.1.0 | [Upgrade to 1.1.0] |
At least 1.1.0 but older than 5.0.0 | [Upgrade to 5.0.0] |
At least 5.0.0 but older than 5.0.2 | [Upgrade to 5.0.2] | For MySQL/MariaDB only
If the database was created before Zonemaster-Backend version 5.0.0, then you
have to upgrade in several steps.
To complete the upgrade follow the [installation instructions], except for creating
the database. If you instead want to start from an empty database, then you remove the database
and create a new database using the [installation instructions].
### Installation
......@@ -83,7 +65,4 @@ The software is released under the 2-clause BSD license. See separate
[Configuration documentation]: docs/Configuration.md
[Installation instructions]: docs/Installation.md
[Upgrade to 1.0.3]: docs/upgrade_db_zonemaster_backend_ver_1.0.3.md
[Upgrade to 1.1.0]: docs/upgrade_db_zonemaster_backend_ver_1.1.0.md
[Upgrade to 5.0.0]: docs/upgrade_db_zonemaster_backend_ver_5.0.0.md
[Upgrade to 5.0.2]: docs/upgrade_db_zonemaster_backend_ver_5.0.2.md
[Upgrade document]: docs/Upgrade.md
This diff is collapsed.
# Configuration
## Table of contents
* [Introduction](#Introduction)
* [RPCAPI section](#rpcapi-section)
* [enable_add_batch_job](#enable_add_batch_job)
* [enable_add_api_user](#enable_add_api_user)
* [DB section](#DB-section)
* [engine](#engine)
* [user](#user)
* [password](#password)
* [database_host](#database_host)
* [database_name](#database_name)
* [polling_interval](#polling_interval)
* [MYSQL section](#MYSQL-section)
* [host](#host)
* [port](#port)
* [user](#user-1)
* [password](#password-1)
* [database](#database)
* [POSTGRESQL section](#POSTGRESQL-section)
* [host](#host-1)
* [port](#port-1)
* [user](#user-2)
* [password](#password-2)
* [database](#database-1)
* [SQLITE section](#SQLITE-section)
* [database_file](#database_file)
* [LANGUAGE section](#LANGUAGE-section)
* [locale](#locale)
* [METRICS section](#METRICS-section)
* [statsd_host](#statsd_host)
* [statsd_port](#statsd_port)
* [PUBLIC PROFILES and PRIVATE PROFILES sections](#PUBLIC-PROFILES-and-PRIVATE-PROFILES-sections)
* [ZONEMASTER section](#ZONEMASTER-section)
* [max_zonemaster_execution_time](#max_zonemaster_execution_time)
* [number_of_processes_for_frontend_testing](#number_of_processes_for_frontend_testing)
* [number_of_processes_for_batch_testing](#number_of_processes_for_batch_testing)
* [lock_on_queue](#lock_on_queue)
* [age_reuse_previous_test](#age_reuse_previous_test)
## Introduction
Zonemaster *Backend* is configured in
`/etc/zonemaster/backend_config.ini` (CentOS, Debian and Ubuntu) or
`/etc/zonemaster/backend_config.ini` (Linux) or
`/usr/local/etc/zonemaster/backend_config.ini` (FreeBSD). Following
[Installation instructions] will create the file with factory settings.
Each section in `backend_config.ini` is documented below.
Restart the `zm-rpcapi` and `zm-testagent` daemons to load the changes
made to the `backend_config.ini` file.
The `backend_config.ini` file uses a file format in the INI family that is
described in detail [here][File format].
Repeating a key name in one section is forbidden.
Each section in `backend_config.ini` is documented below.
## RPCAPI section
Available keys: `enable_add_batch_job`, `enable_add_api_user`.
......@@ -77,34 +123,58 @@ over this.
### polling_interval
A strictly positive decimal number. Max 5 and 3 digits in the integer and fraction
components respectively.
Time in seconds between database lookups by Test Agent.
Default value: `0.5`.
## MYSQL section
Available keys : `host`, `user`, `password`, `database`.
Available keys : `host`, `port`, `user`, `password`, `database`.
### host
An [LDH domain name] or IP address.
The host name of the machine on which the MySQL server is running.
If this property is unspecified, the value of [DB.database_host] is used instead.
### port
The port the MySQL server is listening on.
Default value: `3306`.
If [MYSQL.host] is set to `localhost` (but neither `127.0.0.1` nor `::1`),
then the value of the [MYSQL.port] property is discarded as the driver
connects using a UNIX socket (see the [DBD::mysql documentation]).
### user
An ASCII-only [MariaDB unquoted identifier].
Max length [80 characters][MariaDB identifier max lengths].
The name of the user with sufficient permission to access the database.
If this property is unspecified, the value of [DB.user] is used instead.
### password
A string of [US ASCII printable characters].
The first character must be neither space nor `<`.
Max length 100 characters.
The password of the configured user.
If this property is unspecified, the value of [DB.password] is used instead.
### database
A US ASCII-only [MariaDB unquoted identifier].
Max length [64 characters][MariaDB identifier max lengths].
The name of the database to use.
If this property is unspecified, the value of [DB.database_name] is used instead.
......@@ -112,28 +182,43 @@ If this property is unspecified, the value of [DB.database_name] is used instead
## POSTGRESQL section
Available keys : `host`, `user`, `password`, `database`.
Available keys : `host`, `port`, `user`, `password`, `database`.
### host
An [LDH domain name] or IP address.
The host name of the machine on which the PostgreSQL server is running.
If this property is unspecified, the value of [DB.database_host] is used instead.
### port
The port the PostgreSQL server is listening on.
Default value: `5432`.
### user
A US ASCII-only [PostgreSQL identifier]. Max length 63 characters.
The name of the user with sufficient permission to access the database.
If this property is unspecified, the value of [DB.user] is used instead.
### password
A string of [US ASCII printable characters].
The first character must be neither space nor `<`.
Max length 100 characters.
The password of the configured user.
If this property is unspecified, the value of [DB.password] is used instead.
### database
A US ASCII-only [PostgreSQL identifier]. Max length 63 characters.
The name of the database to use.
If this property is unspecified, the value of [DB.database_name] is used instead.
......@@ -145,6 +230,8 @@ Available keys : `database_file`.
### database_file
An absolute path.
The full path to the SQLite main database file.
If this property is unspecified, the value of [DB.database_name] is used instead.
......@@ -154,26 +241,28 @@ If this property is unspecified, the value of [DB.database_name] is used instead
The LANGUAGE section has one key, `locale`.
The value of the `locale` key is a space separated list of
`locale tags` where each tag must match the regular expression
`/^[a-z]{2}_[A-Z]{2}$/`.
### locale
A string matching one of the following descriptions:
* A space separated list of one or more `locale tags` where each tag matches the
regular expression `/^[a-z]{2}_[A-Z]{2}$/`.
* The empty string. **Deprecated**, remove the LANGUAGE.locale entry or specify
LANGUAGE.locale = en_US instead.
It is an error to repeat the same `locale tag`.
If the `locale` key is empty or absent, the `locale tag` value
"en_US" is set by default.
#### Design
The two first characters of a `locale tag` are intended to be an
[ISO 639-1] two-character language code and the two last characters
are intended to be an [ISO 3166-1 alpha-2] two-character country code.
A `locale tag` is a locale setting for the available translation
of messages without ".UTF-8", which is implied.
If a new `locale tag` is added to the configuration then the equivalent
MO file should be added to Zonemaster-Engine at the correct place so
that gettext can retrieve it, or else the added `locale tag` will not
add any actual language support. See the
[Zonemaster-Engine share directory] for the existing PO files that are
converted to MO files. (Here we should have a link
to documentation instead.)
#### Usage
Removing a language from the configuration file just blocks that
language from being allowed. If there are more than one `locale tag`
......@@ -181,48 +270,22 @@ language from being allowed. If there are more than one `locale tag`
all those must be removed to block that language.
English is the Zonemaster default language, but it can be blocked
from being allowed by RPC-API by not including it in the
configuration.
from being allowed by RPC-API by including some `locale tag` in the
configuration, but none starting with language code for English ("en").
In the RPCAPI, `language tag` is used ([Language tag]). The
`language tags` are generated from the `locale tags`. Each
`locale tag` will generate two `language tags`, a short tag
equal to the first two letters (usually the same as a language
code) and a long tag which is equal to the full `locale tag`.
If "en_US" is the `locale tag` then "en" and "en_US" are the
`language tags`.
If there are two `locale tags` that would give the same short
`language tag` then that is excluded. E.g. "en_US en_UK" will
only give "en_US" and "en_UK" as `language tags`.
#### Out-of-the-box support
The default installation and configuration supports the
following languages.
Language | Locale tag value | Locale value used
---------|--------------------|------------------
Danish | da_DK | da_DK.UTF-8
English | en_US | en_US.UTF-8
Finnish | fi_FI | fi_FI.UTF-8
French | fr_FR | fr_FR.UTF-8
Norwegian| nb_NO | nb_NO.UTF-8
Swedish | sv_SE | sv_SE.UTF-8
The following `language tags` are generated:
* da
* da_DK
* en
* en_US
* fi
* fi_FI
* fr
* fr_FR
* nb
* nb_NO
* sv
* sv_SE
It is an error to repeat the same `locale tag`.
Language | Locale tag value | Language code | Locale value used
---------|------------------|---------------|------------------
Danish | da_DK | da | da_DK.UTF-8
English | en_US | en | en_US.UTF-8
Finnish | fi_FI | fi | fi_FI.UTF-8
French | fr_FR | fr | fr_FR.UTF-8
Norwegian| nb_NO | nb | nb_NO.UTF-8
Swedish | sv_SE | sv | sv_SE.UTF-8
Setting in the default configuration file:
......@@ -230,18 +293,54 @@ Setting in the default configuration file:
locale = da_DK en_US fi_FI fr_FR nb_NO sv_SE
```
#### Installation considerations
If a new `locale tag` is added to the configuration then the equivalent
MO file should be added to Zonemaster-Engine at the correct place so
that gettext can retrieve it, or else the added `locale tag` will not
add any actual language support. The MO file should be created for the
`language code` of the `locale tag` (see the table above), not the entire
`locale tag`. E.g. if the `locale` configuration key includes "sv_SE" then
a MO file for "sv" should be included in the installation.
Use of MO files based on the entire `locale tag` is *deprecated*.
See the [Zonemaster-Engine share directory] for the existing PO files that are
converted to MO files during installation. (Here we should have a link
to documentation instead.)
Each locale set in the configuration file, including the implied
".UTF-8", must also be installed or activate on the system
running the RPCAPI daemon for the translation to work correctly.
## METRICS section
### statsd_host
An [LDH domain name] or IP address.
The host name of the machine on which the StatsD receiver is running.
Leave unspecified to disable the metrics.
Note that this feature requires the `Net::Statsd` module to be installed.
### statsd_port
The port the StatsD receiver is listening on.
Default value: `8125`. </