-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide implementation for Zone11 (SPF test) #1287
Provide implementation for Zone11 (SPF test) #1287
Conversation
aa6361f
to
b67c363
Compare
The CI failures are due to a known issue in Mail::SPF: https://rt.cpan.org/Public/Bug/Display.html?id=34768 |
dafa092
to
cab0ca4
Compare
Installing |
1665d7d
to
bc30628
Compare
543feac
to
ce91cf2
Compare
I just need to address your comment on the |
That is now done. |
This requires new dependencies, doesn't it? An update of the installation instructions is needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create a PR for updating the installation instructions before merging this.
Pull request zonemaster/zonemaster-engine#1287 adds a run-time dependency on Mail::SPF. This comment documents the change in the public-facing installation instructions. Mail::SPF is not required for building Zonemaster::Engine, so the internal documentation pertaining to the build environment does not need to be updated.
Considering Marc's absence and the nature of my suggested change, I took the liberty of providing it, see commit f54b9e8. @matsduf please re-review. |
36e858e
to
f54b9e8
Compare
Depend on Mail::SPF for validating SPF policies.
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
In the continuous integration pipeline, use cpanm --sudo instead of plain cpanm to install all Perl packages. Doing so works around a packaging issue with Mail::SPF, and more closely reflects the official installation procedure.
Change the format of the test declarations inside t/Test-zone11.t so that it conforms to the format specified and agreed to in zonemaster#1297. This is unfortunately not a lossless conversion: the old format made it possible to specify extra checks such as “for zone all-different-spf.zone11.xa, the Z11_DIFFERENT_SPF_POLICIES_FOUND should be output 3 times”. Hopefully this can be brought back somehow later. Also, for some reason, the changes in the .t file required a new test run with ZONEMASTER_RECORD=1 set in the environment.
Document function "Zonemaster::Engine::Test::Zone::_spf_syntax_ok()"
f54b9e8
to
9471d82
Compare
Great, thanks! This looks good to me. |
Pull request zonemaster/zonemaster-engine#1287 adds a run-time dependency on Mail::SPF. This comment documents the change in the public-facing installation instructions. Mail::SPF is not required for building Zonemaster::Engine, so the internal documentation pertaining to the build environment does not need to be updated.
- Bumped Perl supported versions - Added Mail::SPF dependency. Zonemaster-Engine relies on Mail::SPF and there is a bug preventing its installation from cpanm. See Zonemaster-Engine commit `3ac72b0c` and/or pull request <zonemaster/zonemaster-engine#1287> for more information on this.
- Bumped Perl supported versions - Bumped distribution version - Added Mail::SPF dependency. Zonemaster-Engine relies on Mail::SPF and there is a bug preventing its installation from cpanm. See Zonemaster-Engine commit `3ac72b0c` and/or pull request <zonemaster/zonemaster-engine#1287> for more information on this.
Release testing: Looks fine. |
Purpose
This PR introduces an implementation for Zone11, the test case for SPF policies.
Context
Changes
How to test this PR