Open andypost opened 4 months ago
@bukka You can use following image/docker but it's supposed to work with aports to build
So workflow is
git clone https://github.com/alpinelinux/aports
docker run --rm -it -v $(shell pwd):/mnt --network host skilldlabs/aports-build:edge ash
doas apk upgrade -a
cd community/php83
abuild deps unpack prepare build
TESTS='--show-diff ext/openssl' abuild check
but before checking you need to remove/comment tests disabled-tests.list
and run abuild checksum
to prevent removal of tests
Meantime testing of 8.2.19RC1 shows 2 more failed tests with openssl 3.3
Disabled for OpenSSL 3.3.0 ext/openssl/tests/bug74341.phpt
TEST 9026/16464 [ext/openssl/tests/bug74341.phpt]
========DIFF========
+ Warning: Trying to access array offset on value of type bool in /builds/.../php-8.2.19RC1/ext/openssl/tests/bug74341.php on line 42
+ NULL
- int(1389052800)
- int(1459494000)
+
+ Warning: Trying to access array offset on value of type bool in /builds/.../php-8.2.19RC1/ext/openssl/tests/bug74341.php on line 43
+ NULL
========DONE========
Building 8.2.19 and disabled ext/openssl/tests/gh10495.php
TEST 9043/16463 [ext/openssl/tests/gh10495.phpt]
========DIFF========
+ Warning: stream_socket_client(): Unable to connect to tlsv1.2://127.0.0.1:10012 (Connection refused) in /builds/alpine/aports/community/php82/src/php-8.2.19/ext/openssl/tests/ServerClientTestCase.inc(159) : eval()'d code on line 7
+
+ Fatal error: Uncaught TypeError: feof(): Argument #1 ($stream) must be of type resource, bool given in /builds/alpine/aports/community/php82/src/php-8.2.19/ext/openssl/tests/ServerClientTestCase.inc(159) : eval()'d code:12
- bool(false)
- bool(true)
- string(6) "warmup"
+ Stack trace:
+ #0 /builds/alpine/aports/community/php82/src/php-8.2.19/ext/openssl/tests/ServerClientTestCase.inc(159) : eval()'d code(12): feof(false)
+ #1 /builds/alpine/aports/community/php82/src/php-8.2.19/ext/openssl/tests/ServerClientTestCase.inc(159): eval()
+ #2 /builds/alpine/aports/community/php82/src/php-8.2.19/ext/openssl/tests/gh10495.php(95): ServerClientTestCase->run(' $context = ...', Array)
+ #3 {main}
+ thrown in /builds/alpine/aports/community/php82/src/php-8.2.19/ext/openssl/tests/ServerClientTestCase.inc(159) : eval()'d code on line 12
========DONE========
I just noticed that bug74341 ( https://github.com/php/php-src/issues/14036#issuecomment-2075950245 ) is actually not Alpine specific but failing for me as well. I did some debugging and it's failing on ASN.1 parsing of the cert. My suspicion is that's it's due those changes in OpenSSL 3.3
The d2i_ASN1_GENERALIZEDTIME(), d2i_ASN1_UTCTIME(), ASN1_TIME_check(), and related functions have been augmented to check for a minimum length of the input string, in accordance with ITU-T X.690 section 11.7 and 11.8.
I will need to investigate more what those change are about and how we can best fix the test.
So it was really caused by that OpenSSL change. The actual PHP bug PR that fixed might not be really correct so I created a PR to more or less revert it. There is actually already a bug for that change: https://github.com/php/php-src/issues/13343
That test was just disabled on lower branches and fix of the logic merged to master.
Description
The follow-up to https://github.com/php/php-src/issues/13806#issuecomment-2066573669
Lot's of
openssl
tests are failing and disabled historically https://github.com/alpinelinux/aports/blob/300996aa8dd41d6a958bd2ec512ab64dead76f48/community/php83/disabled-tests.list#L31-L74The list is
PHP Version
PHP 8.2.18
Operating System
Alpinelinux