Skip to content

Commit

Permalink
Install Mail::SPF manually in Github Actions
Browse files Browse the repository at this point in the history
There is a long-standing packaging issue with Mail::SPF that prevents
cpanm from automatically installing it with non-root privileges. [1] It
also seems that upstream is unwilling to patch the problem.

Yet this package is very useful for checking SPF syntax. One does not
simply reimplement the same thing by oneself.

So what are our options? Fork it? Copy the code and maintain it in a
Zonemaster::Engine::SPF namespace or similar? Or work around the bug?

Fortunately, the Perl library in question is easy to find in
distribution package repositories. It’s packaged by Debian, Ubuntu,
Alpine Linux, FreeBSD at least.

However, in Github Actions, all Perl modules are install from CPAN. That
must be because the Perl module packages supplied by the OS are only
built against the version of Perl packaged by said OS, and we are
testing against multiple different versions of Perl that may be
different from the packaged one. In order to keep that consistency, the
best option is to install Mail::SPF from CPAN while adding the
workaround documented in the library’s INSTALL file.

[1]: https://rt.cpan.org/Public/Bug/Display.html?id=34768
  • Loading branch information
marc-vanderwal committed Nov 9, 2023
1 parent b67c363 commit bc30628
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ jobs:
libtool \
m4 \
# Work around bug in Mail::SPF preventing normal installation with cpanm
# (see https://rt.cpan.org/Public/Bug/Display.html?id=34768)
- name: Install Mail::SPF (latest)
run: |
cpanm --notest --install-args="--install_path sbin=$HOME/.local/sbin" Mail::SPF
- name: Install Zonemaster::LDNS (latest)
if: ${{ matrix.compatibility == 'latest' }}
run: |
Expand Down

0 comments on commit bc30628

Please sign in to comment.