Open patch-work opened 4 hours ago
The original error message seemed to suggest the existence of a conflict with installed modules. The real meaning was that it did not find the right XS.pm. Infact the perl file /usr/local/bin/authentication_milter includes a call to JSON::XS, and the openbsd package* did not include p5-JSON-XS in the Makefile.
> doas pkg_add p5-JSON-XS
quirks-7.50 signed on 2024-10-15T23:10:48Z
Collision in p5-common-sense-3.75: the following files already exist
/usr/local/libdata/perl5/site_perl/amd64-openbsd/common/sense.pm from p5-common-sense-3.75 (different checksum)
/usr/local/libdata/perl5/site_perl/amd64-openbsd/common/sense.pod from p5-common-sense-3.75 (same checksum)
/usr/local/man/man3p/common::sense.3p from p5-common-sense-3.75 (same checksum)
It seems to be a missing package registration
Repair ? [y/N/a] y
p5-JSON-XS-4.03v1:p5-common-sense-3.75: ok
Collision in p5-Types-Serialiser-1.01: the following files already exist
/usr/local/libdata/perl5/site_perl/Types/Serialiser.pm from p5-Types-Serialiser-1.01 (same checksum)
/usr/local/libdata/perl5/site_perl/Types/Serialiser/Error.pm from p5-Types-Serialiser-1.01 (same checksum)
/usr/local/man/man3p/Types::Serialiser.3p from p5-Types-Serialiser-1.01 (different checksum)
/usr/local/man/man3p/Types::Serialiser::Error.3p from p5-Types-Serialiser-1.01 (different checksum)
It seems to be a missing package registration
Repair ? [y/N/a] y
p5-JSON-XS-4.03v1:p5-Types-Serialiser-1.01: ok
Collision in p5-JSON-XS-4.03v1: the following files already exist
/usr/local/bin/json_xs from p5-JSON-XS-4.03v1 (same checksum)
/usr/local/libdata/perl5/site_perl/amd64-openbsd/JSON/XS.pm from p5-JSON-XS-4.03v1 (same checksum)
/usr/local/libdata/perl5/site_perl/amd64-openbsd/JSON/XS/Boolean.pm from p5-JSON-XS-4.03v1 (same checksum)
/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/JSON/XS/XS.so from p5-JSON-XS-4.03v1 (different checksum)
/usr/local/man/man1/json_xs.1 from p5-JSON-XS-4.03v1 (different checksum)
/usr/local/man/man3p/JSON::XS.3p from p5-JSON-XS-4.03v1 (different checksum)
/usr/local/man/man3p/JSON::XS::Boolean.3p from p5-JSON-XS-4.03v1 (different checksum)
It seems to be a missing package registration
Repair ? [y/N/a] y
p5-JSON-XS-4.03v1: ok
The module p5-common-sense was not present originally, as there was no module at all, and it is not part of the modules that were installed by p5-Mail-Milter-Authentication, so it was installed by p5-JSON-XS itself.
New test:
> doas /usr/local/bin/authentication_milter -h
Encoder.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb80000, needed 0xf280000)
A new error occurs.
The module Encoder.pm does not occur explicitly in the authentication milter's source code, so is it a resouce internal to the many modules above, or yet another missing module?
> doas find /usr -type f -name Encoder.pm
/usr/local/libdata/perl5/site_perl/amd64-openbsd/Sereal/Encoder.pm
/usr/libdata/perl5/amd64-openbsd/Encode/Encoder.pm
> grep -ai Encoder /usr/local/bin/authentication_milter
[empty]
> grep -ai Encode /usr/local/bin/authentication_milter
print $json->encode( $default_config );
On a different system, same OS...
> doas /usr/local/bin/authentication_milter -h
lib/Hash/SharedMem.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb80000, needed 0xf280000)
The file Changes says...
2.20200329.1 2020-03-29 23:55:13+00:00 UTC
- Metrics: Upgrade to Prometheus::Tiny::Shared 0.020
backed by Hash::SharedMem
The module was not installed.
> doas pkg_info | grep -i shared
p5-File-ShareDir-1.118 locate install data per-module
p5-File-ShareDir-Install-0.14 install shared files, to use with File::ShareDir
p5-MaxMind-DB-Common-0.040001p1 code shared by the MaxMind DB reader and writer modules
p5-Test-File-ShareDir-1.001002p0 create fake sharedir for testing
p5-Test-SharedFork-0.35p0 fork test
shared-mime-info-2.4p0 shared mime database for desktops
The module is not available as an OpenBSD package:
https://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/
Let us use CPAN...
> doas cpan -i Hash::SharedMem
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 18 Jun 2024 07:17:01 GMT
CPAN: HTTP::Tiny loaded ok (v0.086)
CPAN: Net::SSLeay loaded ok (v1.94)
CPAN: IO::Socket::SSL loaded ok (v2.089)
Fetching with HTTP::Tiny:
https://cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.204)
............................................................................DONE
Fetching with HTTP::Tiny:
https://cpan.org/modules/02packages.details.txt.gz
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Sat, 19 Oct 2024 17:52:40 GMT
CPAN: HTTP::Date loaded ok (v6.02)
..............
New CPAN.pm version (v2.37) available.
[Currently running version is v2.36]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
..............................................................DONE
Fetching with HTTP::Tiny:
https://cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
CPAN: Module::CoreList loaded ok (v5.20231129)
Hash::SharedMem is up to date (0.005).
> doas cpan -i Prometheus::Tiny::Shared
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 19 Oct 2024 17:52:40 GMT
CPAN: Module::CoreList loaded ok (v5.20231129)
Prometheus::Tiny::Shared is up to date (0.027).
Did it work?
> doas /usr/local/bin/authentication_milter -h
lib/Hash/SharedMem.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb80000, needed 0xf280000)
No, it did not.
Assuming the milter will work at some point, its number of moving parts is so high that a single wheel of this complicated watch will eventually break not only the milter itself but also the mailing system. Will I have the time to fix it, each time it breaks?
> pkg_info | grep p5- | awk '{print $1}'
No perl packages at all. This is a new system.
Test
Possible conflicting files: