Skip to content

Commit 83c364e

Browse files
authored
Merge pull request zonemaster#1220 from zonemaster/develop
Merge develop branch into master (Backend)
2 parents e231264 + cb7d565 commit 83c364e

24 files changed

Lines changed: 479 additions & 319 deletions

.github/workflows/ci.yml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
name: CI
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
- master
9+
- 'release/**'
10+
pull_request:
11+
branches:
12+
- develop
13+
- master
14+
- 'release/**'
15+
16+
env:
17+
ZONEMASTER_RECORD: 0
18+
compatibility: develop
19+
# compatibility: latest
20+
21+
jobs:
22+
run-tests:
23+
strategy:
24+
matrix:
25+
db: [sqlite, mysql, postgresql]
26+
perl: ['5.40']
27+
include:
28+
- db: sqlite
29+
perl: '5.36'
30+
- db: sqlite
31+
perl: '5.26'
32+
33+
runs-on: ubuntu-22.04
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- uses: shogo82148/actions-setup-perl@v1
39+
with:
40+
perl-version: ${{ matrix.perl }}
41+
42+
- name: Install binary dependencies
43+
run: |
44+
# * These were taken from the installation instruction.
45+
# * Gettext was added so we can run cpanm . on the Engine sources.
46+
# * The Perl modules were left out because I couldn't get all of them
47+
# to work with custom Perl versions.
48+
# * Cpanminus was left out because actions-setup-perl installs it.
49+
sudo apt-get install -y \
50+
autoconf \
51+
automake \
52+
build-essential \
53+
gettext \
54+
libidn2-dev \
55+
libssl-dev \
56+
libtool \
57+
m4 \
58+
59+
- name: "Install development versions of Zonemaster::LDNS and Zonemaster::Engine"
60+
if: ${{ env.compatibility == 'develop' }}
61+
run: |
62+
cpanm --sudo --notest \
63+
Devel::CheckLib \
64+
Module::Install \
65+
ExtUtils::PkgConfig \
66+
Module::Install::XSUtil
67+
git clone --branch=develop --depth=1 \
68+
https://github.com/zonemaster/zonemaster-ldns.git
69+
git clone --branch=develop --depth=1 \
70+
https://github.com/zonemaster/zonemaster-engine.git
71+
( cd zonemaster-ldns ; perl Makefile.PL ) # Generate MYMETA.yml to appease cpanm
72+
( cd zonemaster-engine ; perl Makefile.PL ) # Generate MYMETA.yml to appease cpanm
73+
make -C zonemaster-engine # Generate MO files so they get installed
74+
cpanm --sudo --notest ./zonemaster-ldns ./zonemaster-engine
75+
rm -rf zonemaster-ldns zonemaster-engine
76+
77+
# Installing Zonemaster::Engine requires root privileges, because of a
78+
# bug in Mail::SPF preventing normal installation with cpanm as
79+
# non-root user (see link below [1]).
80+
#
81+
# The alternative, if one still wishes to install Zonemaster::Engine
82+
# as non-root user, is to install Mail::SPF first with a command like:
83+
#
84+
# % cpanm --notest \
85+
# --install-args="--install_path sbin=$HOME/.local/sbin" \
86+
# Mail::SPF
87+
#
88+
# For the sake of consistency, other Perl packages installed from CPAN
89+
# are also installed as root.
90+
#
91+
# [1]: https://rt.cpan.org/Public/Bug/Display.html?id=34768
92+
- name: Install remaining dependencies
93+
run: cpanm --sudo --notest --installdeps .
94+
95+
- name: Install Zonemaster::Backend
96+
run: |
97+
perl Makefile.PL
98+
make # Generate MO files so they get installed
99+
cpanm --sudo --notest --verbose .
100+
101+
- name: Set up database
102+
if: ${{ matrix.db != 'sqlite' }}
103+
run: |
104+
case "${{ matrix.db }}" in
105+
mariadb)
106+
cpanm --sudo --notest DBD::mysql
107+
docker run --detach --name ci-mariadb mariadb:10.11
108+
mysql -u root -e "CREATE USER 'ci'@'localhost' IDENTIFIED BY 'password';"
109+
mysql -u root -e "CREATE DATABASE zonemaster CHARACTER SET utf8 COLLATE utf8_bin;"
110+
mysql -u root -e "GRANT ALL ON zonemaster.* TO 'ci'@'localhost';"
111+
;;
112+
postgresql)
113+
cpanm --sudo --notest DBD::Pg
114+
# PGPASSWORD is used by psql
115+
export PGPASSWORD=password
116+
docker run --detach --name ci-postgres -p 5432:5432 --env POSTGRES_PASSWORD="$PGPASSWORD" postgres:16
117+
for i in {1..20} ; do
118+
pg_isready -h localhost -p 5432 && break
119+
sleep 2
120+
done
121+
psql -h localhost -U postgres -c "CREATE USER ci WITH PASSWORD 'password';"
122+
psql -h localhost -U postgres -c 'CREATE DATABASE zonemaster OWNER ci;'
123+
;;
124+
esac
125+
126+
- name: Install locales
127+
run: |
128+
sudo perl -pi -e 's/^# (da_DK\.UTF-8.*|en_US\.UTF-8.*|es_ES\.UTF-8.*|fi_FI\.UTF-8.*|fr_FR\.UTF-8.*|nb_NO\.UTF-8.*|sl_SI\.UTF-8.*|sv_SE\.UTF-8.*)/$1/' /etc/locale.gen
129+
sudo locale-gen
130+
131+
- name: Show content of log files
132+
if: ${{ failure() }}
133+
run: cat /home/runner/.cpanm/work/*/build.log
134+
135+
- name: Test
136+
env:
137+
ZONEMASTER_BACKEND_CONFIG_FILE: ./share/backend_config.ci_${{ matrix.db }}.ini
138+
run: make test TEST_VERBOSE=1

.travis.yml

Lines changed: 0 additions & 132 deletions
This file was deleted.

Changes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
Release history for Zonemaster component Zonemaster-Backend
22

33

4+
v11.5.0 2025-06-26 (part of Zonemaster v2025.1 release)
5+
6+
[Deprecations]
7+
- API method "get_batch_job_result" is deprecated to be removed in v2025.2.
8+
Use method "batch_status" instead. #1215
9+
10+
[Features]
11+
- Redefines "batch_status" to replace "get_batch_job_result" #1215
12+
13+
[Fixes]
14+
- Updates translation (Norwegian) #1213
15+
- Adapts to changed Engine API #1143
16+
- Sorts historic tests by creation date and not ID #1212
17+
18+
419
v11.4.0 2025-03-04 (part of Zonemaster v2024.2.1 release)
520

621
[Features]

MANIFEST

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ share/locale/nb/LC_MESSAGES/Zonemaster-Backend.mo
5252
share/locale/sl/LC_MESSAGES/Zonemaster-Backend.mo
5353
share/locale/sv/LC_MESSAGES/Zonemaster-Backend.mo
5454
share/Makefile
55-
share/patch/patch_db_zonemaster_backend_ver_9.0.0.pl
5655
share/patch/patch_db_zonemaster_backend_ver_11.1.0.pl
5756
share/patch/patch_db_zonemaster_backend_ver_11.2.0.pl
57+
share/patch/patch_db_zonemaster_backend_ver_9.0.0.pl
5858
share/patch/patch_mysql_db_zonemaster_backend_ver_1.0.3.pl
5959
share/patch/patch_mysql_db_zonemaster_backend_ver_5.0.0.pl
6060
share/patch/patch_mysql_db_zonemaster_backend_ver_5.0.2.pl
@@ -65,9 +65,6 @@ share/patch/patch_postgresql_db_zonemaster_backend_ver_8.0.0.pl
6565
share/patch/patch_sqlite_db_zonemaster_backend_ver_8.0.0.pl
6666
share/patch/README.txt
6767
share/tmpfiles.conf
68-
share/travis_mysql_backend_config.ini
69-
share/travis_postgresql_backend_config.ini
70-
share/travis_sqlite_backend_config.ini
7168
share/zm-rpcapi.lsb
7269
share/zm-rpcapi.service
7370
share/zm-testagent.lsb
@@ -92,5 +89,5 @@ t/test_profile_network_true.json
9289
t/test_profile_no_network.json
9390
t/test_validate_syntax.t
9491
t/TestUtil.pm
95-
t/validator.t
9692
t/translator.t
93+
t/validator.t

MANIFEST.SKIP

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
^.*\.log
66
^.*\.swp$
77
^MANIFEST\.SKIP$
8-
^\.github/pull_request_template\.md$
9-
^\.travis\.yml$
8+
^\.github/
109
^docs/internal-documentation/
1110
\.po$
1211
^share/[^/]*\.mo$
1312
^share/Zonemaster-Backend.pot$
13+
^share/backend_config\.ci_mysql\.ini$
14+
^share/backend_config\.ci_postgresql\.ini$
15+
^share/backend_config\.ci_sqlite\.ini$
1416
^share/update-po$
1517
^Zonemaster-Backend-[0-9.]*\.tar\.gz
1618

Makefile.PL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ requires
3535
'Router::Simple::Declare' => 0,
3636
'Starman' => 0,
3737
'Try::Tiny' => 0.12,
38-
'Zonemaster::LDNS' => 4.001000, # v4.1.0
39-
'Zonemaster::Engine' => 7.001000, # v7.1.0
38+
'Zonemaster::LDNS' => 5.000000, # v5.0.0
39+
'Zonemaster::Engine' => 8.000000, # v8.0.0
4040
;
4141

4242
test_requires 'DBD::SQLite' => 1.66;

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# Zonemaster Backend
2-
[![Build Status](https://travis-ci.org/zonemaster/zonemaster-backend.svg?branch=master)](https://travis-ci.org/zonemaster/zonemaster-backend)
3-
42

53
### Purpose
64
This repository is one of the components of the Zonemaster software. For an

lib/Zonemaster/Backend.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package Zonemaster::Backend;
22

3-
our $VERSION = '11.4.0';
3+
our $VERSION = '11.5.0';
44

55
use strict;
66
use warnings;

0 commit comments

Comments
 (0)