[openssl-dev] [openssl.org #4211] Document Perl requirements for OpenSSL 1.1.0

Rainer Jung via RT rt at openssl.org
Sat Jan 2 01:57:18 UTC 2016


Trying to build OpenSSL 1.1.0-pre1 on Solaris 10 Sparc I got the 
opportunity to get some insight in the perl requirements especially for 
running the new OpenSSL test suite. Solaris 10 Sparc comes with perl 
5.8.4 which suffices to build OpenSSL, but not for running the test suite.

Current Docs Situation
======================

Currently the OpenSSL distribution contains the info:

- NEWS
o Reworked test suite, now based on perl, Test::Harness and Test::More

Maybe one should point to the main INSTALL "Note on Perl" section here?


- INSTALL
  To install OpenSSL, you will need:
...
   * Perl 5 with core modules (see 'Note on Perl' further down)
...

and further down:

  Note on Perl
  ------------

  For our scripts, we rely quite a bit on Perl, and increasingly on
  some core Perl modules.  These Perl modules are part of the Perl
  source, so if you build Perl on your own, you should be set.

  However, if you install Perl as binary packages, the outcome might
  differ, and you may have to check that you do get the core modules
  installed properly.  We do not claim to know them all, but experience
  has told us the following:

  - on Linux distributions based on Debian, the package 'perl' will
    install the core Perl modules as well, so you will be fine.
  - on Linux distributions based on RPMs, you will need to install
    'perl-core' rather than just 'perl'.

  It is highly recommended that you have at least Perl version 5.12
  installed.


Here I wonder why version 5.12 is recommended. See below for some 
argument to actually require minimum version 5.10.1 instead of 
recommending 5.12.


- CHANGES
   *) New testing framework
      The testing framework has been largely rewritten and is now using
      perl and the perl modules Test::Harness and an extended variant of
      Test::More called OpenSSL::Test to do its work.  All test scripts in
      test/ have been rewritten into test recipes, and all direct calls to
      executables in test/Makefile have become individual recipes using the
      simplified testing OpenSSL::Test::Simple.

      For documentation on our testing modules, do:

         perldoc test/testlib/OpenSSL/Test/Simple.pm
         perldoc test/testlib/OpenSSL/Test.pm

      [Richard Levitte]

Maybe one should point to the main INSTALL "Note on Perl" section here?


- test/README

no info. Maybe one should point to the main INSTALL "Note on Perl" 
section here?


Minimum useful Perl Version
===========================

Minimum useful version for building and testing OpenSSL 1.1.0 IMHO is 
5.10, better 5.10.1. Reasons:

- several test suite files contain regexps with "\R" which has only been 
introduced in 5.10.0.
- the module File::Path is need in version >= 2 which was first bundled 
in 5.10.0
- the module parent.pm is needed, which was first bundled in 5.10.1

The only other requirement, Test::More in version >= 0.96 was first 
bundled much later in perl 5.13.4. It is probably a bit too new to 
require that perl version in general. Fortunately adding a newer 
Test::More to an existing perl is quite trivial, even using a private 
lib directory when not having write permissions for the perl 
installation. Since Test::More has no other dependencies and doesn't 
compile native stuff etc. during its installation, it suffices to add 
the directory lib/Test from the extracted Test::More download (ie. the 
following files):

Test/Builder/IO/Scalar.pm
Test/Builder/Tester/Color.pm
Test/Builder/Module.pm
Test/Builder/Tester.pm
Test/Tester/Capture.pm
Test/Tester/CaptureRunner.pm
Test/Tester/Delegate.pm
Test/use/ok.pm
Test/Tutorial.pod
Test/Simple.pm
Test/Builder.pm
Test/Tester.pm
Test/More.pm

into some directory and add that directory to the PERL5LIB env var 
before running make test. That is a bit dirty though (doesn't run the 
module test suite etc.).

Using cpan, it typically works to install a module like Test::More to a 
private directory /my/perl/dir by setting the following env vars before 
running cpan:

   PERL_LOCAL_LIB_ROOT=/my/perl/dir
   PERL_MB_OPT="--install_base /my/perl/dir"
   PERL_MM_OPT="INSTALL_BASE=/my/perl/dir"
   PERL5LIB=/my/perl/dir/lib/perl5

then running cpan and "install Test::More" and the setting the env var

   PERL5LIB=/my/perl/dir/lib/perl5

before building and especially testing OpenSSL.

So I wonder why the INSTALL file recommends 5.12? I'd require 5.10.1 and 
add some info about adding a sufficiently new (0.96) version of 
Test::More to an existing installation.

One can check which module was bundled with which perl version using the 
"corelist" command, that itself was first bundled a bit before 5.10.

Regards,

Rainer

_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod



More information about the openssl-dev mailing list