Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
648ea37
Merge pull request #1233 from zonemaster/master
matsduf Dec 19, 2025
93c70aa
Updates Swedish PO file
matsduf Mar 2, 2026
8a09d98
CI: Target Perl version 5.42
marc-vanderwal Apr 8, 2026
51be6e5
move the Docker-related files to the docker directory
MichaelTimbert May 20, 2026
a5358b6
add comment to zonemaster_launch script
MichaelTimbert May 20, 2026
ddf342e
improve help message
MichaelTimbert May 20, 2026
3d8bfa0
add docker/ to MANIFEST.SKIP
MichaelTimbert May 20, 2026
21b7958
First itiration
matsduf May 25, 2026
e9236b9
Second iteration
matsduf May 25, 2026
1a6a7ea
Third iteration, all functions are implemented and seems to be workin…
matsduf May 26, 2026
e77a821
Apply suggestions from code review
matsduf May 27, 2026
838e737
Adds Perl module to MANIFEST
matsduf May 27, 2026
5f8c547
Update docker/zonemaster_launch
MichaelTimbert May 28, 2026
1b557ff
Minor correction, corrected spelling and smaller refactoring
matsduf May 28, 2026
8804b78
Adds unit tests
matsduf May 28, 2026
b172b44
Apply suggestions from code review
matsduf May 28, 2026
7256916
Adds link to documentation plus editorial update
matsduf May 28, 2026
babbd6f
Merge pull request #1238 from matsduf/updates-swedish-translation
matsduf May 29, 2026
14911d9
Merge pull request #1243 from matsduf/url-to-tld-for-gui
matsduf Jun 1, 2026
2645b3a
Merge pull request #1242 from MichaelTimbert/docker
MichaelTimbert Jun 1, 2026
8bb2e43
Update data file format
marc-vanderwal Jun 9, 2026
a0e5c08
Merge pull request #1247 from marc-vanderwal/chore/test-data-file-update
marc-vanderwal Jun 10, 2026
704482b
Add artifact build to the CI
MichaelTimbert Feb 24, 2026
92d613f
fixing missing .mo files
MichaelTimbert Mar 3, 2026
5146753
add gettext dependency
MichaelTimbert Mar 3, 2026
9f62e01
fix sha commit
MichaelTimbert Mar 3, 2026
4c4bad9
Documentation: add artifact section
MichaelTimbert Jun 11, 2026
932c9db
Tidy
mattias-p Jun 3, 2026
ac8e0ea
Fixes
mattias-p Jun 3, 2026
a55cf6b
Refactor
mattias-p Jun 3, 2026
d603804
Add schema version
mattias-p May 4, 2026
f4df2a4
Remediate some techical debt
mattias-p Jun 9, 2026
833981e
Make migration script idempotent
mattias-p Jun 9, 2026
5a4f560
Merge pull request #1241 from mattias-p/1234-schema-version
mattias-p Jun 11, 2026
8d0a9b0
Better systemd integration for zm-testagent
mattias-p Jun 4, 2026
cfcd52a
Better systemd integration for zm-rpcapi
mattias-p Jun 4, 2026
c5d3c18
Tidy
mattias-p Jun 8, 2026
2f2fd67
Remediate some more techical debt
mattias-p Jun 9, 2026
937130a
Avoid redundant logging of timestamp and pid in journald
mattias-p Jun 9, 2026
1a3a5d3
Merge pull request #1235 from MichaelTimbert/artifact
MichaelTimbert Jun 11, 2026
67e1e26
Merge pull request #1244 from mattias-p/systemd-integration
mattias-p Jun 11, 2026
0a351a4
Merge pull request #1240 from marc-vanderwal/chore/ci-perl-5.42
marc-vanderwal Jun 11, 2026
91abe1f
CI: force update
MichaelTimbert Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
db: [sqlite, mysql, postgresql]
perl: ['5.40']
perl: ['5.42']
include:
- db: sqlite
perl: '5.36'
Expand All @@ -39,6 +39,9 @@ jobs:
with:
perl-version: ${{ matrix.perl }}

- name: update
run: sudo apt update -y

- name: Install binary dependencies
run: |
# * These were taken from the installation instruction.
Expand Down Expand Up @@ -136,3 +139,41 @@ jobs:
env:
ZONEMASTER_BACKEND_CONFIG_FILE: ./share/backend_config.ci_${{ matrix.db }}.ini
run: make test TEST_VERBOSE=1

build-artifact:
needs: run-tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: update
run: sudo apt update -y

- name: apt install
run: sudo apt-get install -y build-essential git libmodule-install-perl gettext

- name: build
run: perl Makefile.PL && make all dist

- name: Get short SHA
id: short_sha
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_ENV
else
echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
fi

- name: Get Zonemaster-Backend version
id: version
run: |
result=`grep "our $VERSION" lib/Zonemaster/Backend.pm`
result+='printf $VERSION;'
VERSION=`perl -e "$result"`
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: Zonemaster-Backend-${{ steps.version.outputs.version }}-${{ env.SHORT_SHA }}
path: Zonemaster-Backend-${{ steps.version.outputs.version }}.tar.gz
4 changes: 4 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ lib/Zonemaster/Backend/Log.pm
lib/Zonemaster/Backend/Metrics.pm
lib/Zonemaster/Backend/RPCAPI.pm
lib/Zonemaster/Backend/TestAgent.pm
lib/Zonemaster/Backend/TLD_URL.pm
lib/Zonemaster/Backend/Translator.pm
lib/Zonemaster/Backend/Validator.pm
LICENSE
Expand All @@ -52,6 +53,7 @@ share/locale/nb/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/sl/LC_MESSAGES/Zonemaster-Backend.mo
share/locale/sv/LC_MESSAGES/Zonemaster-Backend.mo
share/Makefile
share/patch/patch_db_schema_version_1.pl
share/patch/patch_db_zonemaster_backend_ver_11.1.0.pl
share/patch/patch_db_zonemaster_backend_ver_11.2.0.pl
share/patch/patch_db_zonemaster_backend_ver_9.0.0.pl
Expand All @@ -76,9 +78,11 @@ t/batches.t
t/config.t
t/db.t
t/db_ddl.t
t/db_schema_version.t
t/idn.data
t/idn.t
t/lifecycle.t
t/log.t
t/parameters_validation.t
t/queue.t
t/rpc_validation.t
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
^.*\.log
^.*\.swp$
^MANIFEST\.SKIP$
^Dockerfile$
^zonemaster_launch$
^docker/Dockerfile$
^docker/zonemaster_launch$
^\.github/
^docs/internal-documentation/
\.po$
Expand Down
31 changes: 16 additions & 15 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ requires
'Router::Simple::Declare' => 0,
'Starman' => 0,
'Try::Tiny' => 0.12,
'Zonemaster::LDNS' => 5.000001, # v5.0.1
'Zonemaster::Engine' => 8.001000, # v8.1.0
'Zonemaster::LDNS' => 5.000001, # v5.0.1
'Zonemaster::Engine' => 8.001000, # v8.1.0
;

test_requires 'Capture::Tiny';
test_requires 'DBD::SQLite' => 1.66;
test_requires 'Test::Differences';
test_requires 'Test::Fatal';
test_requires 'Test::Exception';
test_requires 'Time::Local' => 1.26;
test_requires 'Time::Local' => 1.26;
test_requires 'Test::NoWarnings' => 0;

recommends 'DBD::mysql';
Expand All @@ -61,25 +63,24 @@ no_index directory => 'Doc';

# Make all platforms include inc/Module/Install/External.pm
requires_external_bin 'find';
if ($^O eq "freebsd") {
if ( $^O eq "freebsd" ) {
requires_external_bin 'gmake';
};
}

sub MY::postamble {
my $text;
if ($^O eq "freebsd") {
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";
};
$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";
}
my $docker = <<'END_DOCKER';

docker-build:
docker build --tag zonemaster/backend:local --build-arg version=$(VERSION) .
docker build -f docker/Dockerfile --tag zonemaster/backend:local --build-arg version=$(VERSION) .

docker-tag-version:
docker tag zonemaster/backend:local zonemaster/backend:$(VERSION)
Expand All @@ -90,7 +91,7 @@ docker-tag-latest:
END_DOCKER

return $text . $docker;
};
}

install_share;

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ The Zonemaster Backend documentation is split up into several documents:
it through its life cycle, all using JSON-RPC calls to the *RPC API daemon*.
* The [API] documentation describes the *RPC API daemon* inteface in detail.

## CI artifact

A tarball (`Zonemaster-Backend-<version>.tar.gz`) is built and uploaded as a GitHub Actions artifact on every push and pull request. This artifact can be useful for release testing and PR review.
To download it:
1. Go to the [Actions tab](https://github.com/zonemaster/zonemaster-backend/actions) of the repository.
2. Select a workflow run (e.g. for a specific PR or branch).
3. Scroll to the bottom of the run summary to the **Artifacts** section.
4. Download the artifact named `Zonemaster-Backend-<version>-<short_sha>`.
The artifact name includes the module version and the first 7 characters of the commit SHA.

## License

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN apk add --no-cache \

RUN apk add --no-cache \
jq \
perl-capture-tiny \
perl-class-method-modifiers \
perl-config-inifiles \
perl-dbd-sqlite \
Expand Down Expand Up @@ -78,7 +79,7 @@ RUN install -v -m 755 -o zonemaster -g zonemaster -d /var/lib/zonemaster
USER zonemaster
RUN $(perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")')/create_db.pl
USER zonemaster
COPY zonemaster_launch /usr/local/bin
COPY docker/zonemaster_launch /usr/local/bin

USER root
ARG S6_OVERLAY_VERSION=3.2.1.0
Expand Down
67 changes: 67 additions & 0 deletions docker/zonemaster_launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/bin/sh

# zonemaster_launch - Docker entrypoint script for Zonemaster Backend
#
# This script serves as the entrypoint for the Zonemaster Backend Docker container.
# It acts as a command dispatcher that starts different Zonemaster components based
# on the first argument passed to the container.
#
# How it works:
# - The script reads the first argument ($1) and uses a case statement to determine
# which component to launch.
# - For CLI tools (cli, zmb, zmtest), it passes any additional arguments to the
# respective command and exits after completion.
# - For services (rpcapi, testagent), it starts the process in the foreground,
# keeping the container running.
# - The 'full' option executes /init (from s6-overlay) which starts both the
# RPC API and testagent services together.
# - If no valid argument is provided, it displays a help message with available options.
#
# Usage:
# docker run zonemaster/zonemaster-backend cli <args> # Run CLI command
# docker run zonemaster/zonemaster-backend rpcapi # Start RPC API server
# docker run zonemaster/zonemaster-backend testagent # Start test agent
# docker run zonemaster/zonemaster-backend full # Start all services

case $1 in

cli)
shift 1
zonemaster-cli $@
;;

zmb)
shift 1
zmb $@
;;

zmtest)
shift 1
zmtest $@
;;

rpcapi)
/usr/local/bin/starman --listen=0.0.0.0:5000 --preload-app --user=zonemaster --group=zonemaster /usr/local/bin/zonemaster_backend_rpcapi.psgi

;;

testagent)
/usr/local/bin/zonemaster_backend_testagent --user=zonemaster --group=zonemaster --logfile=- foreground
;;

full)
exec /init
;;
*)
echo "'$1' is not a valid option.
Available options:
- cli : pass argument to zonemaster-cli
- full : start both rpcapi & testagent
- rpcapi : start RPC API server
- testagent : start test agent
- zmb : run zmb command
- zmtest : run zmtest command"
exit 1
;;

esac;
Loading
Loading