Skip to content

Docker build: fix for Net-IDN-Encode#459

Merged
tgreenx merged 2 commits into
zonemaster:developfrom
MichaelTimbert:docker-fix-NetIDNEncode
Jun 11, 2026
Merged

Docker build: fix for Net-IDN-Encode#459
tgreenx merged 2 commits into
zonemaster:developfrom
MichaelTimbert:docker-fix-NetIDNEncode

Conversation

@MichaelTimbert

@MichaelTimbert MichaelTimbert commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fix Docker image build failure caused by Net::IDN::Encode no longer
compiling with current toolchain versions.

Context

The upstream Net::IDN::Encode module has not been updated since
January 2022 and fails to build from source in the current Alpine-based
Docker image. A community-provided fix exists in
cfaerber/Net-IDN-Encode#11,
and a trial release incorporating the fix is available on CPAN:
Net-IDN-Encode-2.501-TRIAL.

I ran a quick AI check on the proposed fix and it doesnt find suspicious or malicious code.

Changes

  • Add build dependencies (build-base, perl-test-nowarnings, perl-dev)
    required to compile Net::IDN::Encode from source.
  • Install Net-IDN-Encode-2.501-TRIAL from CPAN before the remaining
    cpanm dependencies, so that the patched version satisfies any
    downstream requirements.

How to test this PR

The docker image build should complete without errors. Optionally verify the module
loads correctly:

❯ docker run --rm -ti  --entrypoint /bin/sh zonemaster/cli:local
~ $ perl -MNet::IDN::Encode -e 'print "OK\n"'
OK
``

@MichaelTimbert MichaelTimbert changed the title fix for Net-IDN-Encode Docker build: fix for Net-IDN-Encode Jun 8, 2026
@matsduf

matsduf commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@MichaelTimbert, please set label and milestone on this PR. Should we change for other installations of CLI, or just Docker?

mattias-p
mattias-p previously approved these changes Jun 8, 2026

@mattias-p mattias-p left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one formatting nit. Otherwise this LGTM.

Comment thread Dockerfile Outdated
@mattias-p

mattias-p commented Jun 8, 2026

Copy link
Copy Markdown
Member

Something must have gone wrong applying the patch. Now there are lots of duplicated lines. Or maybe I did something wrong creating the suggestion.

Comment thread Dockerfile
@matsduf matsduf added V-Patch Versioning: The change gives an update of patch in version. RC-Fixes Release category: Fixes. labels Jun 9, 2026
Comment thread Dockerfile Outdated
perl-test-differences \
perl-test-nowarnings \
perl-try-tiny \
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the tripple backtick on line 23.

@matsduf

matsduf commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

After removing the tripple backticks in Dockerfile I can build the CLI Docker image, but I get the following strange error:

$ docker run --rm zonemaster/cli:local zonemaster.se
Seconds Level    Message
======= ======== =======
  11.09 CRITICAL Fatal error in Zonemaster::Engine::Test::Nameserver: Can't locate object method "scramble_case" via package "www.zonemaster.se" (perhaps you forgot to load "www.zonemaster.se"?) at /usr/local/share/perl5/site_perl/Zonemaster/Engine/Test/Nameserver.pm line 1175.

@tgreenx

tgreenx commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

After removing the tripple backticks in Dockerfile I can build the CLI Docker image, but I get the following strange error:

$ docker run --rm zonemaster/cli:local zonemaster.se
Seconds Level    Message
======= ======== =======
  11.09 CRITICAL Fatal error in Zonemaster::Engine::Test::Nameserver: Can't locate object method "scramble_case" via package "www.zonemaster.se" (perhaps you forgot to load "www.zonemaster.se"?) at /usr/local/share/perl5/site_perl/Zonemaster/Engine/Test/Nameserver.pm line 1175.

Can you try and build from Engine with latest develop? There indeed was a missing import of this method, which was fixed by https://github.com/zonemaster/zonemaster-engine/pull/1530/changes#diff-9779582974eb66a438c0c1a289b489dd916130b93ca91f269b1cd42ece585e9dR18 (merged an hour ago)

@matsduf

matsduf commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Can you try and build from Engine with latest develop? There indeed was a missing import of this method, which was fixed by https://github.com/zonemaster/zonemaster-engine/pull/1530/changes#diff-9779582974eb66a438c0c1a289b489dd916130b93ca91f269b1cd42ece585e9dR18 (merged an hour ago)

I created a new image and that does not give the error.

Co-authored-by: Mattias Päivärinta <mattias@paivarinta.se>
@MichaelTimbert MichaelTimbert force-pushed the docker-fix-NetIDNEncode branch from 1dc2ae3 to 5c89b77 Compare June 10, 2026 13:28
@tgreenx tgreenx merged commit 8aef3c7 into zonemaster:develop Jun 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RC-Fixes Release category: Fixes. V-Patch Versioning: The change gives an update of patch in version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants