1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/php85: new aport

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
This commit is contained in:
Andy Postnikov 2025-05-25 18:21:08 +02:00
parent 8f23285e34
commit 5b1e2a9d59
14 changed files with 1100 additions and 0 deletions

623
testing/php85/APKBUILD Normal file
View file

@ -0,0 +1,623 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
# Bundled libraries
#
# Name | License | Location | State
# ----------+---------------------+------------------------+---------
# bcmath | LGPL-2.1-or-later | ext/bcmath/libbcmath | used
# date | MIT | ext/date/lib | used
# fileinfo | BSD-2-Clause | ext/fileinfo/libmagic | used
# gd | BSD | ext/gd/libgd | used
# hash | CC0-1.0 | ext/hash/sha3 | used
# xxHash | BSD-2-Clause | ext/hash/xxhash | used
# libmbfl | LGPL-2.1-only | ext/mbstring/libmbfl | used
# pcre | BSD-3-Clause | ext/pcre/pcrelib | not used
# sqlite3 | Public | ext/sqlite3/libsqlite | not used
# libzip | BSD-3-Clause | ext/zip/lib | not used
# Static extensions
#
# Name | Reason
# ----------+--------------------------------------------
# zlib | https://bugs.alpinelinux.org/issues/8299
# json | https://wiki.php.net/rfc/always_enable_json
maintainer="Andy Postnikov <apostnikov@gmail.com>"
pkgname=php85
pkgver=8.5.0_alpha1
_pkgver=${pkgver/_/}
pkgrel=0
_apiver=20240925
_suffix=${pkgname#php}
# Is this package the default (latest) PHP version?
_default_php="no"
provides="$pkgname-cli php-cli php" # for backward compatibility
# priority of community/php83 is 100
provider_priority=80
pkgdesc="The PHP$_suffix language runtime engine"
url="https://www.php.net/"
arch="all"
license="PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0"
depends="$pkgname-common"
depends_dev="$pkgname=$pkgver-r$pkgrel autoconf pcre2-dev re2c"
# Most dependencies between extensions is auto-discovered (see _extension()).
_depends_mysqlnd="$pkgname-openssl"
_depends_pdo_mysql="$pkgname-pdo $pkgname-mysqlnd"
_depends_phar="$pkgname"
# openssl is actually transitive dependency here, but we need to because of
# load index based on number of dependencies.
_depends_mysqli="$pkgname-mysqlnd $pkgname-openssl"
_clang_ver=19
makedepends="
$depends_dev
acl-dev
apache2
apache2-dev
argon2-dev
bison
bzip2-dev
clang$_clang_ver
curl-dev
enchant2-dev
freetds-dev
freetype-dev
gdbm-dev
gettext-dev
gmp-dev
icu-dev
libavif-dev
libedit-dev
libical-dev
libjpeg-turbo-dev
libpng-dev
libpq-dev
lmdb-dev
oniguruma-dev
libsodium-dev
libwebp-dev
libxml2-dev
libxpm-dev
libxslt-dev
libzip-dev
net-snmp-dev
openldap-dev
sqlite-dev
tidyhtml-dev
unixodbc-dev
zlib-dev
"
checkdepends="icu-data-full procps-ng lsof"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc
$pkgname-phpdbg $pkgname-apache2
$pkgname-embed $pkgname-cgi $pkgname-fpm
$pkgname-pear::noarch
"
# RC releases
#source="https://downloads.php.net/~pierrick/php-${pkgver}RC1.tar.xz
#source="https://downloads.php.net/~edorian/php-${pkgver}RC1.tar.xz
#source="https://downloads.php.net/~daniels/php-${pkgver}RC1.tar.xz
# stable releases
#source="https://www.php.net/distributions/php-$pkgver.tar.xz
source="https://downloads.php.net/~daniels/php-${_pkgver}.tar.xz
$pkgname-fpm.initd
$pkgname-fpm.logrotate
$pkgname-module.conf
disabled-tests.list
disabled-tests.loongarch64.list
disabled-tests.x86.list
disabled-tests.ppc64le.list
disabled-tests.s390x.list
install-pear.patch
includedir.patch
sharedir.patch
$pkgname-fpm-version-suffix.patch
phpinfo-avif.patch
"
builddir="$srcdir/php-$_pkgver"
_libdir="/usr/lib/$pkgname"
_extension_dir="$_libdir/modules"
_extension_confd="/etc/$pkgname/conf.d"
_extensions="
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
exif
ffi
fileinfo
ftp
gd
gettext
gmp
iconv
intl
ldap
mbstring
mysqli
mysqlnd
odbc
opcache
openssl
pcntl
pdo
pdo_dblib
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
phar
posix
session
shmop
simplexml
snmp
soap
sodium
sockets
sqlite3
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
"
for _ext in $_extensions; do
case "$_ext" in
phar) subpackages="$subpackages $pkgname-$_ext:$_ext";;
*) subpackages="$subpackages $pkgname-$_ext:_extension";;
esac
done
subpackages="$subpackages $pkgname-common::noarch"
subpackages="$subpackages $pkgname-litespeed"
prepare() {
default_prepare
local vapi=$(sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h)
if [ "$vapi" != "$_apiver" ]; then
error "Upstream API version is now $vapi. Expecting $_apiver"
error "After updating _apiver, all 3rd-party extensions must be rebuilt."
return 1
fi
# https://bugs.php.net/63362 - Not needed but installed headers.
# Drop some Windows specific headers to avoid installation,
# before build to ensure they are really not needed.
rm -f TSRM/tsrm_win32.h \
TSRM/tsrm_config.w32.h \
Zend/zend_config.w32.h \
ext/mysqlnd/config-win.h \
ext/standard/winver.h
# Fix some bogus permissions.
find . -name '*.[ch]' -exec chmod 644 {} \;
# Remove failing tests includng arch specific ones.
local tests="disabled-tests.list disabled-tests.$CARCH.list"
local file; for file in $tests; do [ -f "$srcdir"/$file ] && \
sed -n '/^[^#]/p' "$srcdir"/$file | while read -r item; do
rm -r $item # do it in this way to apply globbing...
done
done
autoconf
}
# Notes:
# * gd-jis-conv breaks any non-latin font rendering (vakartel).
# * libxml cannot be build as shared.
# * -O2 optimize for apps usage (andypost)
_build() {
export CFLAGS="${CFLAGS/-Os/-O2}"
export CXXFLAGS="${CXXFLAGS/-Os/-O2}"
local without_pcre_jit
[ "$CARCH" = "s390x" ] && without_pcre_jit="--without-pcre-jit"
case "$CARCH" in
arm*|aarch64|riscv64|loongarch64)
export CFLAGS="${CFLAGS/-fstack-clash-protection}"
export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection}"
;;
esac
export CC=clang-$_clang_ver
export CXX=clang++-$_clang_ver
PHP_BUILD_PROVIDER="Alpine Linux aports" \
EXTENSION_DIR=$_extension_dir ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--program-suffix=$_suffix \
--libdir=$_libdir \
--datadir=/usr/share/$pkgname \
--sysconfdir=/etc/$pkgname \
--localstatedir=/var \
--with-layout=GNU \
--with-pic \
--with-config-file-path=/etc/$pkgname \
--with-config-file-scan-dir=$_extension_confd \
--disable-rpath \
--disable-short-tags \
\
--enable-bcmath=shared \
--with-bz2=shared \
--enable-calendar=shared \
--enable-ctype=shared \
--with-curl=shared \
--enable-dba=shared \
--with-dbmaker=shared \
--with-gdbm \
--with-lmdb \
--enable-dom=shared \
--with-enchant=shared \
--enable-exif=shared \
--with-ffi=shared \
--enable-fileinfo=shared \
--enable-ftp=shared \
--enable-gd=shared \
--with-avif \
--with-freetype \
--with-jpeg \
--with-webp \
--with-xpm \
--disable-gd-jis-conv \
--with-gettext=shared \
--with-gmp=shared \
--with-iconv=shared \
--enable-intl=shared \
--with-ldap=shared \
--with-ldap-sasl \
--with-libedit \
--with-libxml \
--enable-mbstring=shared \
--with-mysqli=shared \
--with-mysql-sock=/run/mysqld/mysqld.sock \
--enable-mysqlnd=shared \
--enable-opcache=shared \
--with-openssl=shared \
--with-system-ciphers \
--with-openssl-argon2 \
--with-password-argon2 \
--enable-pcntl=shared \
--with-external-pcre \
$without_pcre_jit \
--enable-pdo=shared \
--with-pdo-dblib=shared,/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-pgsql=shared \
--with-pdo-sqlite=shared \
--with-pgsql=shared \
--enable-phar=shared \
--enable-posix=shared \
--without-readline \
--enable-session=shared \
--enable-shmop=shared \
--enable-simplexml=shared \
--with-snmp=shared \
--enable-soap=shared \
--with-sodium=shared \
--enable-sockets=shared \
--with-sqlite3=shared \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--with-tidy=shared \
--enable-tokenizer=shared \
--with-unixODBC=shared,/usr \
--enable-xml=shared \
--enable-xmlreader=shared \
--enable-xmlwriter=shared \
--with-xsl=shared \
--with-zip=shared \
--with-zlib \
--enable-zend-test=shared \
"$@"
rm -f modules/* # clean-up possible previous build
make
}
build() {
# build phpcgi and apache2 SAPIs first
# because not fixed https://bugs.php.net/bug.php?id=52419
# apache2 module
_build --disable-phpdbg \
--disable-cli \
--with-apxs2
mv libs/libphp.so sapi/apache2handler/mod_php$_suffix.so
local enable_litespeed
[ -z ${subpackages##*-litespeed*} ] && enable_litespeed=--enable-litespeed
# cgi, cli, fpm, embed, phpdbg, pear/pecl, litespeed
_build --enable-phpdbg \
--with-pear=/usr/share/$pkgname \
--enable-fpm \
--with-fpm-acl \
$enable_litespeed \
--enable-embed
}
check() {
# PHP is so stupid that it's not able to resolve dependencies
# between extensions and load them in correct order, so we must
# help it...
# opcache is Zend extension, it's handled specially in Makefile
local php_modules=$(_extensions_by_load_order \
| grep -vx opcache \
| xargs -n 1 printf "'$builddir/modules/%s.la' ")
sed -i "/^PHP_TEST_SHARED_EXTENSIONS/,/extension=/ \
s|in \$(PHP_MODULES)\"*|in $php_modules|" Makefile
# XXX: Few tests fail on the named platforms.
# Ignore it for now and continue build even on test failures.
local allow_fail='no'
case "$CARCH" in
no ) allow_fail='yes'
esac
TESTS="${TESTS:- --show-diff }" NO_INTERACTION=1 REPORT_EXIT_STATUS=1 \
SKIP_SLOW_TESTS=1 SKIP_ONLINE_TESTS=1 TEST_TIMEOUT=10 \
SKIP_PERF_SENSITIVE=1 \
TZ='' LANG='' LC_ALL='' TEST_FPM_EXTENSION_DIR=modules \
TRAVIS=true SKIP_IO_CAPTURE_TESTS=1 \
make test || [ "$allow_fail" = yes ]
echo 'NOTE: We have skipped quite a lot tests, see disabled-tests.list.'
}
package() {
make -j1 INSTALL_ROOT="$pkgdir" install
rm "$pkgdir"/usr/lib/php$_suffix/modules/zend_test.so
install -Dm644 php.ini-production "$pkgdir"/etc/$pkgname/php.ini
local file; for file in pear peardev pecl; do
sed -i -e "s|/usr/bin/php|/usr/bin/php$_suffix|g" \
-e "s|PHP=php|PHP=php$_suffix|" \
"$pkgdir"/usr/bin/$file
done
find "$pkgdir" -name '.*' -print0 | xargs -0 rm -rf
rmdir "$pkgdir"/var/run
if [ "$_default_php" = yes ]; then
ln -s php$_suffix "$pkgdir"/usr/bin/php
fi
install -D -m 755 sapi/apache2handler/mod_php$_suffix.so \
"$pkgdir"/usr/lib/apache2/mod_php$_suffix.so
install -D -m 644 "$srcdir"/php$_suffix-module.conf \
"$pkgdir"/etc/apache2/conf.d/php$_suffix-module.conf
}
dev() {
default_dev
replaces="php-dev"
amove \
usr/bin/php-config$_suffix \
usr/bin/phpize$_suffix \
$_libdir/build
if [ "$_default_php" = yes ]; then
ln -s phpize$_suffix "$subpkgdir"/usr/bin/phpize
ln -s php-config$_suffix "$subpkgdir"/usr/bin/php-config
fi
}
doc() {
default_doc
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
cp CODING_STANDARDS.md EXTENSIONS LICENSE NEWS \
README* UPGRADING* \
"$subpkgdir"/usr/share/doc/$pkgname/
}
apache2() {
pkgdesc="PHP$_suffix Module for Apache2"
depends="$depends apache2"
provides="php-apache2"
amove usr/lib/apache2/mod_php$_suffix.so
amove etc/apache2/conf.d/php$_suffix-module.conf
}
phpdbg() {
pkgdesc="Interactive PHP$_suffix debugger"
provides="php-phpdbg"
amove usr/bin/phpdbg$_suffix
if [ "$_default_php" = yes ]; then
ln -s phpdbg$_suffix "$subpkgdir"/usr/bin/phpdbg
fi
}
embed() {
pkgdesc="PHP$_suffix Embedded Library"
provides="php-embed"
amove usr/lib/php$_suffix/libphp.so
}
litespeed() {
pkgdesc="PHP$_suffix LiteSpeed SAPI"
provides="php-lightspeed"
amove usr/bin/lsphp$_suffix
if [ "$_default_php" = yes ]; then
ln -s lsphp$_suffix "$subpkgdir"/usr/bin/lsphp
fi
}
cgi() {
pkgdesc="PHP$_suffix Common Gateway Interface"
provides="php-cgi"
amove usr/bin/php-cgi$_suffix
if [ "$_default_php" = yes ]; then
ln -s php-cgi$_suffix "$subpkgdir"/usr/bin/php-cgi
fi
}
fpm() {
pkgdesc="PHP$_suffix FastCGI Process Manager"
provides="php-fpm"
amove etc/$pkgname/php-fpm* usr/sbin var
amove usr/share/$pkgname/fpm
local file; for file in php-fpm.conf php-fpm.d/www.conf; do
mv "$subpkgdir"/etc/$pkgname/$file.default \
"$subpkgdir"/etc/$pkgname/$file
done
install -D -m 755 "$srcdir"/$pkgname-fpm.initd \
"$subpkgdir"/etc/init.d/php-fpm$_suffix
install -D -m 644 "$srcdir"/$pkgname-fpm.logrotate \
"$subpkgdir"/etc/logrotate.d/php-fpm$_suffix
mkdir -p "$subpkgdir"/var/log/$pkgname
}
pear() {
pkgdesc="PHP$_suffix Extension and Application Repository"
depends="$pkgname $pkgname-xml"
provides="php-pear"
mkdir -p "$subpkgdir"/usr/bin
local file; for file in pecl pear peardev; do
mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/$file$_suffix
if [ "$_default_php" = yes ]; then
ln -s $file$_suffix "$subpkgdir"/usr/bin/$file
fi
done
amove etc/$pkgname/pear.conf usr/share
}
common() {
pkgdesc="$pkgdesc (common config)"
provides="php-common $pkgname-zlib php-zlib $pkgname-json php-json" # for backward compatibility
depends=""
amove etc
mkdir -p "$subpkgdir"/$_extension_confd "$subpkgdir"/$_extension_dir
}
phar() {
_extension
amove usr/bin/phar$_suffix.phar usr/bin/phar$_suffix
if [ "$_default_php" = yes ]; then
ln -s phar.phar$_suffix "$subpkgdir"/usr/bin/phar.phar
ln -s phar.phar$_suffix "$subpkgdir"/usr/bin/phar
fi
}
_extension() {
local extname="${subpkgname#"$pkgname"-}"
local extdepends="$(eval "echo \$_depends_$extname")"
local extdesc="$(head -n1 "$builddir"/ext/$extname/CREDITS 2>/dev/null ||:)"
pkgdesc="PHP$_suffix extension: ${extdesc:-$extname}"
provides="php-$extname"
: "${extdepends:=$(_resolve_extension_deps "$extname")}"
depends="$depends $extdepends"
local load_order=$(_extension_load_order "$extname")
# extension prefix
local prefix=
[ "$extname" != "opcache" ] || prefix="zend_"
amove $_extension_dir/$extname.so
mkdir -p "$subpkgdir"/$_extension_confd
echo "${prefix}extension=$extname" \
> "$subpkgdir"/$_extension_confd/"$(printf %02d $load_order)"_$extname.ini
}
# Resolves dependencies of the given extension name (without $pkgname- prefix)
# on other extensions in $_extensions and prints them with $pkgname- prefix.
_resolve_extension_deps() {
local name="$1"
# We use config.w32 just because it's more accurate than config.m4.
local config="$builddir/ext/$name/config.w32"
[ -f "$config" ] || return 0
sed -En "s/.*ADD_EXTENSION_DEP\('$name', ([^)]+)\).*/\1/p" "$config" \
| tr -d "'," | tr ' ' '\n' \
| sort -u \
| while read -r dep; do
if echo "$_extensions" | grep -qw "$dep"; then
echo "$pkgname-$dep"
fi
done
}
# Prints a load order (0-based integer) for the given extension name. Extension
# with lower load order should be loaded before exts with higher load order.
# It's based on number of dependencies of the extension (with exception for
# "imap"), which is flawed, but simple and good enough for now.
_extension_load_order() {
local name="$1"
local deps=$(eval "echo \$_depends_$name")
case "$name" in
# XXX: This must be loaded after recode, even though it does
# not depend on it. So we must use this hack...
*) echo "${deps:=$(_resolve_extension_deps $name)}" | wc -w;;
esac
}
# Prints $_extensions sorted by load order and name.
_extensions_by_load_order() {
local deps list name
for name in $_extensions; do
list="$list $(_extension_load_order $name);$name"
done
printf '%s\n' $list | sort -t ';' -k 1 | sed -E 's/\d+;//'
}
sha512sums="
cae92f131b91c22794c14cb4b092ab8775252813ccf9261ab2792abb434a2e806fbb8f6ea149e65f88cf69f53fb66b605d9395411c3df2c5abb4a0410d6b18f9 php-8.5.0alpha1.tar.xz
7e08969f99a3ccaa0b6a9e5b91ce7dc8775978f096cc4eeffe378988fd52b61c78fc230b8e686521a458dabc1741bbf160039fa334cf5548281b5dec9820e1f6 php85-fpm.initd
be2926ba61d0a7ef99178eb1c02e9e5a6698e9423f51b090f997e6ec056dbf8f87c2cd627dbc96eae86b1442c9c1b2df16ed406295023a29c02470ba284e4c69 php85-fpm.logrotate
57ef049fd8e659eed6b1e5895b8c8c04356873b80fdc7d2c66a7e750efdb27e8a3cd6c5bfa35ceae75d8f0885f1915611619260154f0ef2e6c60a27b7cc7909e php85-module.conf
ecde6ae517b3c970a3c1e2aa3bd8569091e7b5e66c51ea7d7ca74cbcd6fcc30ee7b219500e8bc091705493eb761186f521fd99e5efc1731f389b09a1b0bcf831 disabled-tests.list
a8b68c261e69f8feafa1bd8d9d2bd64c405884db716b30b7fa7f1d285fd938a5400bd57444148541040bb0d7410b21271d737303973af085458f3b4f8ce342aa disabled-tests.loongarch64.list
6d8f18822eeb61e1ef2d24551dde2dadaf7607f81364392351e6400da63e4d6fd9ea5f433c5ab7e4de78191d2bcebe3172d4a3024f0ee21b2e1e2c3cf4ad73cc disabled-tests.x86.list
579444b30b3229535dfa68e9341ef096140cd26f1c74f0f920cffe23bac51e144c21a49bfe36fb7356066136ebf0baff6f7e37b8c384c051b430344b66ef5e10 disabled-tests.ppc64le.list
4934def86c4d3817080ba152bc07d58ac6987f3070464e21c8e33e506184e760963cbf34db3aa66dbaceac1b2bf4daa49e60194b9b36290a946559a82e4590d6 disabled-tests.s390x.list
d7bf35f424d8383e4bf6372d3ba8fca2ba1d1c435d1aea495a39fe79a5e17b31f96d373a33d777830412477be35a58be29eb852d7c6c012204e6004c4366fac2 install-pear.patch
b4f802ec3e69190cfa6f2b00bfc9c7741e8300aba479728a00345cbde1c4f20b9ce46b08b861f8d4bb3c6fd6abf1e0f648783937ebef1fdc119fa93d2837a385 includedir.patch
63142be325211db9d8eb50279806c5cb987ec61cc2cf8c8149cf310c41b229dc5d73f0ba4879bbf73ea1ced8bbbd30c0758d7d03551cfdaa1ecdfd13a12efafe sharedir.patch
c1592df33609233de2bde1a702afdf9bf373347c7be4aa205c149d0bf32bfb5026d453f8b6c80bf07e44dfe40eeb971228f2b2fdbd8483f64d8a7686ee4f4592 php85-fpm-version-suffix.patch
c5de72b65f8ace3a4a8859b1b200d3b9d1aa52fa20f573feaef5074ead5bbdfab54c1dcd129f27607b15f6e7ed0056c4270743cf559a3f85f7228cdaed591ede phpinfo-avif.patch
"

View file

@ -0,0 +1,169 @@
#
# Tests that we don't need to run
#
# Windows tests
ext/standard/tests/file/windows_mb_path/*
ext/standard/tests/file/*win32*.phpt
ext/standard/tests/dir/*win32*.phpt
ext/standard/tests/general_functions/*win32*.phpt
ext/standard/tests/streams/*win32.phpt
ext/standard/tests/strings/*win32.phpt
ext/phar/tests/*win32.phpt
ext/sockets/tests/*win32.phpt
# Require database or slow as dblib
ext/mysqli/tests/*
ext/odbc/tests/*
ext/pdo/tests/*.phpt
ext/pdo_dblib/tests/*
ext/pdo_mysql/tests/*
ext/pdo_odbc/tests/*
ext/pdo_pgsql/tests/*
ext/pgsql/tests/*
#
# Tests that fail and probably should not...
#
# Too many tests fail! Some of them bogus, some not.
# THIS SHOULD BE REALLY FIXED!
ext/openssl/tests/bug46127.phpt
ext/openssl/tests/bug48182.phpt
ext/openssl/tests/bug54992.phpt
ext/openssl/tests/bug65538_001.phpt
ext/openssl/tests/bug65538_003.phpt
ext/openssl/tests/bug65729.phpt
ext/openssl/tests/bug68265.phpt
ext/openssl/tests/bug68879.phpt
ext/openssl/tests/bug68920.phpt
ext/openssl/tests/bug69215.phpt
ext/openssl/tests/bug72333.phpt
ext/openssl/tests/bug73072.phpt
ext/openssl/tests/bug74159.phpt
ext/openssl/tests/bug76705.phpt
ext/openssl/tests/bug77390.phpt
ext/openssl/tests/capture_peer_cert_001.phpt
ext/openssl/tests/openssl_peer_fingerprint_basic.phpt
ext/openssl/tests/peer_verification.phpt
ext/openssl/tests/san_peer_matching.phpt
ext/openssl/tests/session_meta_capture.phpt
ext/openssl/tests/session_meta_capture_tlsv13.phpt
ext/openssl/tests/sni_server.phpt
ext/openssl/tests/sni_server_key_cert.phpt
ext/openssl/tests/stream_crypto_flags_001.phpt
ext/openssl/tests/stream_crypto_flags_002.phpt
ext/openssl/tests/stream_crypto_flags_003.phpt
ext/openssl/tests/stream_crypto_flags_004.phpt
ext/openssl/tests/stream_security_level.phpt
ext/openssl/tests/stream_verify_peer_name_001.phpt
ext/openssl/tests/stream_verify_peer_name_002.phpt
ext/openssl/tests/stream_verify_peer_name_003.phpt
ext/openssl/tests/streams_crypto_method.phpt
ext/openssl/tests/tls_min_v1.0_max_v1.1_wrapper.phpt
ext/openssl/tests/tls_wrapper.phpt
ext/openssl/tests/tls_wrapper_with_tls_v1.3.phpt
ext/openssl/tests/tlsv1.0_wrapper.phpt
ext/openssl/tests/tlsv1.1_wrapper.phpt
ext/openssl/tests/tlsv1.2_wrapper.phpt
ext/openssl/tests/tlsv1.3_wrapper.phpt
# Needs to open tls socket
ext/openssl/tests/bug62890.phpt
# Broken tests, missing config.
sapi/fpm/tests/socket-ipv4-fallback.phpt
# Error messages in different order.
sapi/cgi/tests/005.phpt
# Not stable enchant-2 library support - 15/29
ext/enchant/tests/broker_dict_exists.phpt
ext/enchant/tests/broker_free_02.phpt
ext/enchant/tests/broker_free_dict.phpt
ext/enchant/tests/broker_request_dict.phpt
ext/enchant/tests/broker_request_dict_01.phpt
ext/enchant/tests/broker_set_ordering.phpt
ext/enchant/tests/dict_add_to_personal.phpt
ext/enchant/tests/dict_add_to_session.phpt
ext/enchant/tests/dict_check.phpt
ext/enchant/tests/dict_describe.phpt
ext/enchant/tests/dict_get_error.phpt
ext/enchant/tests/dict_is_in_session.phpt
ext/enchant/tests/dict_quick_check_01.phpt
ext/enchant/tests/dict_store_replacement.phpt
ext/enchant/tests/dict_suggest.phpt
# Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed.
ext/iconv/tests/iconv_basic_001.phpt
# Wrong charset, conversion from `UTF-8' to `UTF-8//IGNORE' is not allowed.
ext/iconv/tests/bug48147.phpt
# stream_filter_append(): unable to create or locate filter "convert.iconv.ucs-2/utf-8//IGNORE"
ext/iconv/tests/bug76249.phpt
# Class 'Phar' not found.
ext/opcache/tests/issue0115.phpt
ext/opcache/tests/issue0149.phpt
# Fails in CI - Insufficient privileges. https://gitlab.alpinelinux.org/alpine/aports/-/issues/12692#note_169663
ext/pcntl/tests/pcntl_unshare_01.phpt
ext/pcntl/tests/pcntl_unshare_02.phpt
ext/pcntl/tests/pcntl_unshare_03.phpt
ext/pcntl/tests/pcntl_unshare_04.phpt
# Randomly fails.
ext/pcntl/tests/002.phpt
# Randomly fails on arm7
ext/standard/tests/file/bug60120.phpt
# Call to undefined function session_start().
ext/session/tests/session_regenerate_id_cookie.phpt
# Class 'SoapServer' not found.
ext/soap/tests/bugs/bug73037.phpt
# Incorrect results.
ext/soap/tests/server009.phpt
# Failing tests related to locale and/or iconv.
ext/iconv/tests/bug52211.phpt
#
# Tests that fail for known reason and/or we don't need to worry about them
#
# Fails due to unsupported JP charsets.
ext/iconv/tests/eucjp2iso2022jp.phpt
ext/iconv/tests/iconv_mime_encode.phpt
# Requires running SNMP server.
ext/snmp/tests/*
# Fails on riscv64 CI (lmdb and socket_set_option)
ext/dba/tests/bug78808.phpt
ext/dba/tests/dba_lmdb.phpt
ext/dba/tests/dba_lmdb_creation_matrix.phpt
ext/dba/tests/dba_lmdb_flags.phpt
ext/dba/tests/dba_lmdb_readonly.phpt
ext/sockets/tests/bug63000.phpt
ext/sockets/tests/socket_getopt.phpt
ext/sockets/tests/socket_sendrecvmsg_error.phpt
ext/sockets/tests/socket_meminfo.phpt
ext/sockets/tests/socket_sendto_zerocopy.phpt
ext/sockets/tests/socket_tcp_congestion.phpt
# needs root
ext/pcntl/tests/pcntl_setpriority_error_linux.phpt
# fails since 8.4_alpha1
ext/soap/tests/bugs/bug51561.phpt
ext/soap/tests/bugs/bug49278.phpt
# openssl 1 and unstable
ext/openssl/tests/openssl_error_string_basic.phpt
# since 8.4.0RC1
ext/soap/tests/bugs/bug62900.phpt

View file

@ -0,0 +1,3 @@
# as of 8.4.0beta1
ext/gd/tests/avif_decode_encode.phpt
ext/gd/tests/imagecreatefromstring_avif.phpt

View file

@ -0,0 +1,4 @@
Zend/tests/fibers/suspend-in-force-close-fiber-after-shutdown.phpt
Zend/tests/fibers/throw-in-multiple-destroyed-fibers-after-shutdown.phpt
Zend/tests/fibers/gh9916-009.phpt
Zend/tests/fibers/destructors_011.phpt

View file

@ -0,0 +1,2 @@
ext/gd/tests/avif_decode_encode.phpt
ext/phar/tests/tar/bug70417.phpt

View file

@ -0,0 +1,13 @@
ext/standard/tests/math/cos_basic.phpt
ext/standard/tests/math/cos_variation.phpt
ext/standard/tests/math/sin_basic.phpt
ext/standard/tests/math/sin_variation.phpt
ext/standard/tests/math/tan_variation.phpt
# https://github.com/php/php-src/issues/12076
ext/sqlite3/tests/sqlite3_bind_bug68849.phpt
# fails since 8.4_alpha1
ext/date/tests/createFromTimestamp.phpt
ext/date/tests/createFromTimestamp_32bit.phpt
ext/date/tests/gh14383.phpt

View file

@ -0,0 +1,33 @@
--- a/scripts/Makefile.frag
+++ b/scripts/Makefile.frag
@@ -2,7 +2,7 @@
# Build environment install
#
-phpincludedir = $(includedir)/php
+phpincludedir = $(includedir)/php85
phpbuilddir = $(libdir)/build
BUILD_FILES = \
--- a/scripts/php-config.in
+++ b/scripts/php-config.in
@@ -6,7 +6,7 @@
exec_prefix="@exec_prefix@"
version="@PHP_VERSION@"
vernum="@PHP_VERSION_ID@"
-include_dir="@includedir@/php"
+include_dir="@includedir@/php85"
lib_dir="@orig_libdir@"
includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
ldflags="@PHP_LDFLAGS@"
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -5,7 +5,7 @@
datarootdir='@datarootdir@'
exec_prefix="`eval echo @exec_prefix@`"
phpdir="`eval echo @libdir@`/build"
-includedir="`eval echo @includedir@`/php"
+includedir="`eval echo @includedir@`/php85"
builddir="`pwd`"
SED="@SED@"

View file

@ -0,0 +1,14 @@
--- ./pear/Makefile.frag.orig 2013-04-12 07:02:27.041602514 +0000
+++ ./pear/Makefile.frag 2013-04-12 07:04:09.065836822 +0000
@@ -1,7 +1,10 @@
peardir=$(PEAR_INSTALLDIR)
+# help the built php to find xml extension so we can install pear
+PEAR_INSTALL_XML_FLAGS = -d extension="$(top_builddir)/modules/xml.so" -d extension="$(top_builddir)/modules/phar.so"
+
# Skip all php.ini files altogether
-PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1
+PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 $(PEAR_INSTALL_XML_FLAGS)
WGET = `which wget 2>/dev/null`
FETCH = `which fetch 2>/dev/null`

View file

@ -0,0 +1,79 @@
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -1307,7 +1307,7 @@
}
if (!fpm_global_config.error_log) {
- fpm_global_config.error_log = strdup("log/php-fpm.log");
+ fpm_global_config.error_log = strdup("log/php85/error.log");
}
#ifdef HAVE_SYSTEMD
@@ -1318,7 +1318,7 @@
#ifdef HAVE_SYSLOG_H
if (!fpm_global_config.syslog_ident) {
- fpm_global_config.syslog_ident = strdup("php-fpm");
+ fpm_global_config.syslog_ident = strdup("php-fpm85");
}
if (fpm_global_config.syslog_facility < 0) {
@@ -1841,7 +1841,7 @@
if (fpm_globals.prefix == NULL) {
spprintf(&tmp, 0, "%s/php-fpm.conf", PHP_SYSCONFDIR);
} else {
- spprintf(&tmp, 0, "%s/etc/php-fpm.conf", fpm_globals.prefix);
+ spprintf(&tmp, 0, "%s/etc/php85/php-fpm.conf", fpm_globals.prefix);
}
if (!tmp) {
--- a/sapi/fpm/php-fpm.conf.in
+++ b/sapi/fpm/php-fpm.conf.in
@@ -16,3 +16,3 @@
; Default Value: none
-;pid = run/php-fpm.pid
+;pid = run/php-fpm85.pid
@@ -22,4 +22,4 @@
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
-; Default Value: log/php-fpm.log
-;error_log = log/php-fpm.log
+; Default Value: log/php85/error.log
+;error_log = log/php85/error.log
@@ -35,4 +35,4 @@
; which must suit common needs.
-; Default Value: php-fpm
-;syslog.ident = php-fpm
+; Default Value: php-fpm85
+;syslog.ident = php-fpm85
--- a/sapi/fpm/www.conf.in
+++ b/sapi/fpm/www.conf.in
@@ -292,7 +292,7 @@
; The access log file
; Default: not set
-;access.log = log/$pool.access.log
+;access.log = log/php85/$pool.access.log
; The access log format.
; The following syntax is allowed
@@ -372,7 +372,7 @@
; The log file for slow requests
; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set
-;slowlog = log/$pool.log.slow
+;slowlog = log/php85/$pool.slow.log
; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
@@ -485,6 +485,6 @@
; specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_value[error_log] = /var/log/php85/$pool.error.log
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M

View file

@ -0,0 +1,93 @@
#!/sbin/openrc-run
# If you want to run separate master process per pool, then create a symlink
# to this runscript for each pool. In that mode, the php-fpm daemon is started
# as nobody by default. You can override the user (and group) by declaring
# variable "user" and optionally "group" in conf.d file, or in the $fpm_config
# file (the former has precedence).
: ${name:="PHP FastCGI Process Manager"}
command="/usr/sbin/php-fpm85"
command_background="yes"
start_stop_daemon_args="--quiet"
pidfile="/run/$RC_SVCNAME/php-fpm.pid"
retry="SIGTERM/20"
# configtest is here only for backward compatibility
extra_commands="checkconfig configtest"
extra_started_commands="reload reopen"
description_checkconfig="Run php-fpm config check"
description_reload="Gracefully reload workers and config"
description_reopen="Reopen log files"
required_files="$fpm_config"
depend() {
need net
use apache2 lighttpd nginx
}
init_vars() {
# Defaults for single master process with multiple pools
if [ "$RC_SVCNAME" = "php-fpm85" ]; then
: ${fpm_config:="/etc/php85/php-fpm.conf"}
: ${user:="root"}
# Defaults for master process per pool
else
: ${fpm_config="/etc/php85/php-fpm.d/${RC_SVCNAME#php-fpm85.}.conf"}
: ${user:="$(conf_get user)"}
: ${user:="nobody"}
: ${group:="$(conf_get group)"}
fi
command_args="--nodaemonize --fpm-config $fpm_config"
start_stop_daemon_args="$start_stop_daemon_args
--user $user ${group:+"--group $group"}"
}
start_pre() {
checkconfig || return 1
# If unix socket is used (instead of TCP/IP), then ensure that the
# directory exists and has correct privileges.
local listen="$(conf_get listen)"
if [ "${listen:0:1}" = "/" ]; then
checkpath -d -o $user:$group "$(dirname "$listen")"
fi
checkpath -d "$(dirname "$pidfile")"
}
reload() {
ebegin "Reloading $name"
start-stop-daemon --signal USR2 --pidfile "$pidfile"
eend $?
}
reopen() {
ebegin "Reopening $name log files"
start-stop-daemon --signal USR1 --pidfile "$pidfile"
eend $?
}
checkconfig() {
init_vars
ebegin "Checking $fpm_config"
local out
out="$(su -s /bin/sh -c "$command --test --fpm-config $fpm_config" $user 2>&1)" || {
printf "%s\n" "$out"
eend 1 "failed, please correct errors above"
return 1
}
}
configtest() {
ewarn "configtest is deprecated, use checkconfig instead"
checkconfig
}
conf_get() {
local key="$1"
sed -nE "s/^${key}\s*=\s*\"?([^\";]+).*/\1/p" "$fpm_config" | head -n 1
}

View file

@ -0,0 +1,13 @@
/var/log/php85/*.log {
rotate 7
daily
missingok
notifempty
delaycompress
compress
dateext
sharedscripts
postrotate
/etc/init.d/php-fpm85 --ifstarted --quiet reopen
endscript
}

View file

@ -0,0 +1,13 @@
LoadModule php_module modules/mod_php85.so
DirectoryIndex index.php index.html
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# Uncomment the following to allow .phps files to be handled by the php source filter,
# and displayed as syntax-highlighted source code
#<FilesMatch "\.phps$">
# SetHandler application/x-httpd-php-source
#</FilesMatch>

View file

@ -0,0 +1,30 @@
Patch-Source: https://github.com/php/php-src/pull/7526
From d3402bfd3e9a87b1d4ce3785e393e698746c645c Mon Sep 17 00:00:00 2001
From: Andy Postnikov <apostnikov@gmail.com>
Date: Tue, 28 Sep 2021 23:35:37 +0300
Subject: [PATCH] display libavif version and codecs via phpinfo()
---
ext/gd/gd.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 880d6dddc7d7..67349e8749bf 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -448,6 +448,15 @@
#endif
#ifdef HAVE_GD_AVIF
php_info_print_table_row(2, "AVIF Support", "enabled");
+#ifdef HAVE_GD_BUNDLED
+#include <avif/avif.h>
+ {
+ php_info_print_table_row(2, "AVIF Version", avifVersion());
+ char tmp[256];
+ avifCodecVersions(tmp);
+ php_info_print_table_row(2, "AVIF Codecs", tmp);
+ }
+#endif
#endif
#ifdef HAVE_GD_TGA
php_info_print_table_row(2, "TGA Read Support", "enabled");

View file

@ -0,0 +1,11 @@
--- a/php.ini-production
+++ b/php.ini-production
@@ -743,7 +743,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
+include_path = ".:/usr/share/php85"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"