Opened 6 months ago

Last modified 6 months ago

#73634 new defect

p5-net-ssleay: Testing shows a failure due to too long pathname of test socket

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.12.3
Keywords: Cc:
Port: p5-net-ssleay

Description

t/local/31_rsa_generate_key.t ............... ok

#   Failed test 'X509V3_EXT_print nid=103	extended-cert.cert.pem:4'
#   at t/local/32_x509_get_cert_info.t line 273.
#          got: 'Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl1.crl
# 
# Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl2.crl
# '
#     expected: 'Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl1.crl
# Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl2.crl'
# Looks like you failed 1 test of 746.
t/local/32_x509_get_cert_info.t ............. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/746 subtests 
t/local/33_x509_create_cert.t ............... ok

My updated Portfileis:

  1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
  2 
  3 PortSystem          1.0
  4 PortGroup           perl5 1.0
  5 
  6 perl5.branches      5.28 5.30 5.32 5.34 5.36 5.38
  7 perl5.setup         Net-SSLeay 1.94 ../../authors/id/C/CH/CHRISN
  8 revision            4
  9 license             Artistic-2
 10 maintainers         nomaintainer
 11 description         Perl extension for using OpenSSL and LibreSSL
 12 long_description    Net::SSLeay Perl bindings for OpenSSL and LibreSSL
 13 
 14 checksums           rmd160  81ca79cbbdd67efa424eaa0d51c20897c64f06f0 \
 15                     sha256  9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d \
 16                     size    663948
 17 
 18 if {${perl5.major} != ""} {
 19     configure.env   OPENSSL_PREFIX=$prefix
 20     patchfiles      patch-fix-email-address.diff
 21 
 22     depends_lib-append \
 23                     port:openssl
 24 
 25     depends_build-append \
 26                     port:p${perl5.major}-test-exception \
 27                     port:p${perl5.major}-test-nowarnings \
 28                     port:p${perl5.major}-test-warn
 29 }

See also #71837.

Attachments (3)

main.log (71.7 KB) - added by ballapete (Peter "Pete" Dyballa) 6 months ago.
Main.log from intel macOS Sonoma, 14.8.3
Portfile (1.2 KB) - added by ballapete (Peter "Pete" Dyballa) 6 months ago.
Latest version of Portfile
Portfile_p5-net-ssleay.diff (1.9 KB) - added by ballapete (Peter "Pete" Dyballa) 6 months ago.
Patch for Portfile

Download all attachments as: .zip

Change History (9)

Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from intel macOS Sonoma, 14.8.3

Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: Portfile added

Latest version of Portfile

comment:1 Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

I added a note to the end of Portfile:

"Testing this port will fail because MacPorts uses too long path names when testing."

comment:2 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: too long pathname of socket removed
Summary: Testing p5-net-ssleay shows a failure due to too long pathname of test socketp5-net-ssleay: Testing shows a failure due to too long pathname of test socket

Instead of providing a complete Portfile, it's better to provide a diff so we can see what you changed.

How does this test failure relate to a too-long pathname?

MacPorts 2.11 shortened the build directory pathnames in order to try to combat the too-long pathname problem we see in some ports. If that's still the problem here, then I don't think we can go much shorter.

The ticket summary should begin with the port name and a colon and the Keywords field should mainly use our standardized keywords.

comment:3 in reply to:  2 Changed 6 months ago by jmroot (Joshua Root)

Replying to ryandesign:

How does this test failure relate to a too-long pathname?

Unix domain sockets do have an unusually short path length limit (103 characters) which could be reached by some ports, but it's not at all clear from the information provided that that's the problem here.

comment:4 Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

Yes, that's not clear. At least it's likely (search the code for "socket").

When make is invoked to build one is asked:

Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] 
*** If there are build errors, test failures or run-time malfunctions,
    try to use the same compiler and options to compile your OpenSSL,
    Perl, and Net::SSLeay.

Answering here, manually, with "y" produces the same failure:

t/local/31_rsa_generate_key.t ............... ok
t/local/32_x509_get_cert_info.t ............. 1/746 
#   Failed test 'X509V3_EXT_print nid=103	extended-cert.cert.pem:4'
#   at t/local/32_x509_get_cert_info.t line 273.
#          got: 'Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl1.crl
# 
# Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl2.crl
# '
#     expected: 'Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl1.crl
# Full Name:
#   URI:http://intermediate-ca.net-ssleay.example/crl2.crl'
# Looks like you failed 1 test of 746.
t/local/32_x509_get_cert_info.t ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/746 subtests 
t/local/33_x509_create_cert.t ............... ok

These external tests are performed additionally, outside of MacPorts:

t/external/ocsp.t ........................... # tcp connect to www.microsoft.com:443 ok
# got stapled OCSP response
# SSL_connect ok
t/external/ocsp.t ........................... 1/3 # tcp connect to www.heise.de:443 ok
# got no stapled OCSP response
# SSL_connect ok
# tcp connect to revoked.grc.com:443 ok
# got stapled OCSP response
# SSL_connect ok
t/external/ocsp.t ........................... ok
t/handle/external/10_destroy.t .............. ok
t/handle/external/50_external.t ............. ok

Since I do not know how to answer with "y" in build or configure phase I cannot perform the network tests from MacPorts. Letting MacPorts extract and patch the software I can continue manually – and the network tests are successful as well:

PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.38" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*/*.t t/*/*/*.t
t/external/ocsp.t ........................... # tcp connect to www.microsoft.com:443 ok
# got stapled OCSP response
# SSL_connect ok
t/external/ocsp.t ........................... 1/3 # tcp connect to www.heise.de:443 ok
# got no stapled OCSP response
# SSL_connect ok
# tcp connect to revoked.grc.com:443 ok
# got stapled OCSP response
# SSL_connect ok
t/external/ocsp.t ........................... ok
t/handle/external/10_destroy.t .............. ok
t/handle/external/50_external.t ............. ok
t/handle/local/05_use.t ..................... ok

Could be the Github ticket https://github.com/radiator-software/p5-net-ssleay/issues/537 can give some insight!

comment:5 Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

comment:6 in reply to:  2 Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign:

Instead of providing a complete Portfile, it's better to provide a diff so we can see what you changed.

I am attaching the diff. It has at the end some additional lines to make very sure that the tests are performed with a perl executable of the proper version.

The ticket summary should begin with the port name and a colon and the Keywords field should mainly use our standardized keywords.

I hoped to start a category of faults.

BTW, couldn't MacPorts use a more sane mechanism to differentiate between sub-ports? Adding a hex construct like for example "4c9dd678" is overkill. ≈ 4 billions sub-ports is largely over-estimated. One position should suffice. The ASCII alphabet offers 2 × 26 characters plus ten digits, the Basic Plane 0 of Unicode has a quite large number of characters. This could help to keep paths short and healthy.

Another option is to allow port to build somewhere else in particular cases, for example in /tmp.

Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: Portfile_p5-net-ssleay.diff added

Patch for Portfile

Note: See TracTickets for help on using tickets.