]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
CI: Flush the CPAN cache if /usr/bin/perl has been updated since
authorJoe Orton <jorton@apache.org>
Mon, 14 Oct 2024 13:53:01 +0000 (13:53 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 14 Oct 2024 13:53:01 +0000 (13:53 +0000)
the cache was built. Possible fix for 2.4.x failure seen here:

https://github.com/apache/httpd/actions/runs/11322484507/job/31483266212

SSLeay.c: loadable library and perl binaries are mismatched (got first handshake key 0xeb00080, needed 0xf380080)

perldiag(1) describes this as a mismatch between libraries and binaries,
likely solved by reinstalling XS modules:

https://github.com/Perl/perl5/blob/77b78882c76e7461ccc4dcf2eb3afb9644836a72/pod/perldiag.pod#L3617

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921307 13f79535-47bb-0310-9956-ffa450edef68

test/travis_before_linux.sh

index 79b983c0abb105d8a82b3937ce0edda428e6467e..1c0f3018933699484429181cd6862410bac0e096 100755 (executable)
@@ -66,6 +66,13 @@ echo "add-auto-load-safe-path $HOME/work/httpd/httpd/.gdbinit" >> $HOME/.gdbinit
 if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
     # Clear CPAN cache if necessary
     if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi
+
+    # Also flush if the system Perl is newer than the cache, otherwise
+    # it may refuse to load the (older) XS modules.
+    if [ /usr/bin/perl -nt ~/perl5/.key ]; then
+        : Purging cache since /usr/bin/perl has been updated
+        rm -rf ~/perl5
+    fi
     
     cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)