diff options
author | Eugene Lamskoy | 2021-12-01 14:54:41 +0200 |
---|---|---|
committer | Eugene Lamskoy | 2021-12-01 14:54:41 +0200 |
commit | 00d1a2723a36da4694ee249bd7ffef92ebb7c301 (patch) | |
tree | fee0dd9e3f6475c5c979efacb35cb432095f1c99 | |
download | aur-00d1a2723a36da4694ee249bd7ffef92ebb7c301.tar.gz |
PHP 8.1.0 initial release
-rw-r--r-- | .SRCINFO | 155 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 347 | ||||
-rw-r--r-- | apache.conf | 13 | ||||
-rw-r--r-- | apache.patch | 10 | ||||
-rw-r--r-- | enchant-2.patch | 0 | ||||
-rwxr-xr-x | generate_patches | 64 | ||||
-rw-r--r-- | php-fpm.patch | 76 | ||||
-rw-r--r-- | php-fpm.tmpfiles | 1 | ||||
-rw-r--r-- | php.ini.patch | 79 |
10 files changed, 752 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3e6d8d697db3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,155 @@ +pkgbase = php81 + pkgver = 8.1.0 + pkgrel = 1 + url = https://www.php.net/ + arch = x86_64 + license = PHP + checkdepends = procps-ng + makedepends = apache + makedepends = aspell + makedepends = c-client + makedepends = db + makedepends = enchant + makedepends = gd + makedepends = gmp + makedepends = icu + makedepends = libsodium + makedepends = libxslt + makedepends = libzip + makedepends = net-snmp + makedepends = postgresql-libs + makedepends = sqlite + makedepends = systemd + makedepends = tidy + makedepends = unixodbc + makedepends = curl + makedepends = libtool + makedepends = postfix + makedepends = freetds + makedepends = pcre2 + makedepends = libnsl + makedepends = oniguruma + source = https://php.net/distributions/php-8.1.0.tar.xz + source = apache.patch + source = apache.conf + source = php-fpm.patch + source = php-fpm.tmpfiles + source = php.ini.patch + sha256sums = a1317eff0723a2b3d3122bbfe107a1158570ea2822dc35a5fb360086db0f6bbc + sha256sums = 702b163c66c65af92dcad8d79f41bda84bcd5d863235fcf1497c33a86db9e4ca + sha256sums = ebc0af1ef3a6baccb013d0ccb29923895a7b22ff2d032e3bba802dc6328301ce + sha256sums = 96e0b05a5ec72ee0f907d29fbb9612414d9dfebeee1249cbf2f2318bacf2d37c + sha256sums = eb0c0aec5b5fb282df0bfefd4d5bbc229ee80a5c5da6760ecf52697a23cc7175 + sha256sums = 6f73b6ac4b425ebc4505c7f75ca48763605b2c774c30bfa20072adcfbb1030cd + +pkgname = php81 + pkgdesc = A general-purpose scripting language that is especially suited to web development + depends = libxml2 + depends = hspell + depends = nuspell + depends = libvoikko + depends = curl + depends = libzip + depends = pcre2 + depends = argon2 + provides = php81-ldap=8.1.0 + provides = php81 + conflicts = php81-ldap + replaces = php81-ldap + backup = etc/php81/php.ini + +pkgname = php81-cgi + pkgdesc = CGI and FCGI SAPI for PHP + depends = php81 + +pkgname = php81-apache + pkgdesc = Apache SAPI for PHP + depends = php81 + depends = apache + depends = libnsl + backup = etc/httpd/conf/extra/php81_module.conf + +pkgname = php81-fpm + pkgdesc = FastCGI Process Manager for PHP + depends = php81 + depends = systemd + options = !emptydirs + backup = etc/php81/php-fpm.conf + backup = etc/php81/php-fpm.d/www.conf + +pkgname = php81-embed + pkgdesc = Embedded PHP SAPI library + depends = php81 + depends = systemd-libs + depends = libnsl + options = !emptydirs + +pkgname = php81-phpdbg + pkgdesc = Interactive PHP debugger + depends = php81 + options = !emptydirs + +pkgname = php81-dblib + pkgdesc = dblib module for PHP + depends = php81 + depends = freetds + +pkgname = php81-enchant + pkgdesc = enchant module for PHP + depends = php81 + depends = enchant + +pkgname = php81-gd + pkgdesc = gd module for PHP + depends = php81 + depends = gd + +pkgname = php81-imap + pkgdesc = imap module for PHP + depends = php81 + depends = c-client + +pkgname = php81-intl + pkgdesc = intl module for PHP + depends = php81 + depends = icu + +pkgname = php81-sodium + pkgdesc = sodium module for PHP + depends = php81 + depends = libsodium + +pkgname = php81-odbc + pkgdesc = ODBC modules for PHP + depends = php81 + depends = unixodbc + +pkgname = php81-pgsql + pkgdesc = PostgreSQL modules for PHP + depends = php81 + depends = postgresql-libs + +pkgname = php81-pspell + pkgdesc = pspell module for PHP + depends = php81 + depends = aspell + +pkgname = php81-snmp + pkgdesc = snmp module for PHP + depends = php81 + depends = net-snmp + +pkgname = php81-sqlite + pkgdesc = sqlite module for PHP + depends = php81 + depends = sqlite + +pkgname = php81-tidy + pkgdesc = tidy module for PHP + depends = php81 + depends = tidy + +pkgname = php81-xsl + pkgdesc = xsl module for PHP + depends = php81 + depends = libxslt diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..de726ef3c9d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.tar.xz +*.tar.gz +*.tar.bz2 +pkg/ +src/ +*.tar.zst + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d79651335958 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,347 @@ +pkgbase=php81 +_pkgbase=${pkgbase%81} +_realpkg=${pkgbase} +pkgname=("${pkgbase}" + "${_realpkg}-"{cgi,apache,fpm,embed,phpdbg,dblib,enchant,gd,imap,intl,sodium,odbc,pgsql,pspell,snmp,sqlite,tidy,xsl}) +pkgver=8.1.0 +pkgrel=1 +arch=('x86_64') +license=('PHP') +url='https://www.php.net/' +makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libsodium' 'libxslt' 'libzip' 'net-snmp' + 'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'postfix' 'freetds' 'pcre2' 'libnsl' + 'oniguruma' 'patchutils') +checkdepends=('procps-ng') +source=("https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz" + 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch') + +prepare() { + cd ${srcdir}/${_pkgbase}-${pkgver} + + patch -p0 -i ${srcdir}/apache.patch + patch -p0 -i ${srcdir}/php-fpm.patch + patch -p0 -i ${srcdir}/php.ini.patch + autoconf + + rm tests/output/stream_isatty_*.phpt +} + +build() { + # http://site.icu-project.org/download/61#TOC-Migration-Issues + unset CPPFLAGS + CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1' + + local _phpconfig="--srcdir=../${_pkgbase}-${pkgver} \ + --config-cache \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/${_realpkg} \ + --localstatedir=/var \ + --libdir=/usr/lib/${_realpkg} \ + --datarootdir=/usr/share/${_realpkg} \ + --datadir=/usr/share/${_realpkg} \ + --program-suffix=${_realpkg#php} \ + --with-layout=GNU \ + --with-config-file-path=/etc/${_realpkg} \ + --with-config-file-scan-dir=/etc/${_realpkg}/conf.d \ + --disable-rpath \ + --mandir=/usr/share/man \ + " + + local _phpextensions="\ + --enable-bcmath=shared \ + --enable-calendar=shared \ + --enable-dba=shared \ + --enable-exif=shared \ + --enable-ftp=shared \ + --enable-gd=shared \ + --enable-intl=shared \ + --enable-mbstring \ + --enable-pcntl \ + --enable-shmop=shared \ + --enable-soap=shared \ + --enable-sockets=shared \ + --enable-sysvmsg=shared \ + --enable-sysvsem=shared \ + --enable-sysvshm=shared \ + --with-bz2=shared \ + --with-curl=shared \ + --with-db4=/usr \ + --with-enchant=shared \ + --with-external-gd \ + --with-external-pcre \ + --with-ffi=shared \ + --with-gdbm \ + --with-gettext=shared \ + --with-gmp=shared \ + --with-iconv=shared \ + --with-imap-ssl \ + --with-imap=shared \ + --with-kerberos \ + --with-ldap=shared \ + --with-ldap-sasl \ + --with-mhash \ + --with-mysql-sock=/run/mysqld/mysqld.sock \ + --with-mysqli=shared,mysqlnd \ + --with-openssl \ + --with-password-argon2 \ + --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 \ + --with-pspell=shared \ + --with-readline \ + --with-snmp=shared \ + --with-sodium=shared \ + --with-sqlite3=shared \ + --with-tidy=shared \ + --with-unixODBC=shared \ + --with-xsl=shared \ + --with-zlib \ + --with-zip=shared \ + " + + EXTENSION_DIR=/usr/lib/${_realpkg}/modules + export EXTENSION_DIR + + mkdir ${srcdir}/build + cd ${srcdir}/build + ln -s ../${_pkgbase}-${pkgver}/configure + ./configure ${_phpconfig} \ + --enable-cgi \ + --enable-fpm \ + --with-fpm-systemd \ + --with-fpm-acl \ + --with-fpm-user=http \ + --with-fpm-group=http \ + --enable-embed=shared \ + ${_phpextensions} + make + + # apache + # reuse the previous run; this will save us a lot of time + cp -a ${srcdir}/build ${srcdir}/build-apache + cd ${srcdir}/build-apache + ./configure ${_phpconfig} \ + --with-apxs2 \ + ${_phpextensions} + make + + # phpdbg + cp -a ${srcdir}/build ${srcdir}/build-phpdbg + cd ${srcdir}/build-phpdbg + ./configure ${_phpconfig} \ + --enable-phpdbg \ + ${_phpextensions} + make +} + +#check() { +# +# unset CPPFLAGS +# cd ${srcdir}/build + + # Check if sendmail was configured correctly (FS#47600) +# sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail' + +# export REPORT_EXIT_STATUS=1 +# export NO_INTERACTION=1 +# export SKIP_ONLINE_TESTS=1 +# export SKIP_SLOW_TESTS=1 +# export TEST_PHP_ARGS="-j$(nproc)" +# export TESTS='tests Zend' +# +# make test +#} + +package_php81() { + pkgdesc='A general-purpose scripting language that is especially suited to web development' + depends=('libxml2' 'hspell' 'nuspell' 'libvoikko' 'curl' 'libzip' 'pcre2' 'argon2') + replaces=('php81-ldap') + conflicts=('php81-ldap') + provides=("php81-ldap=${pkgver}" "php81") + backup=("etc/${_realpkg}/php.ini") + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd} + install -D -m644 ${srcdir}/${_pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/${_realpkg}/php.ini + install -d -m755 ${pkgdir}/etc/${_realpkg}/conf.d/ + + # remove static modules + rm -f ${pkgdir}/usr/lib/${_realpkg}/modules/*.a + # remove modules provided by sub packages + rm -f ${pkgdir}/usr/lib/${_realpkg}/modules/{enchant,gd,imap,intl,sodium,odbc,pdo_dblib,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so + # remove empty directory + rmdir ${pkgdir}/usr/include/php/include + + # move include directory + mv ${pkgdir}/usr/include/php ${pkgdir}/usr/include/${_realpkg} + + # fix phar symlink + #rm ${pkgdir}/usr/bin/phar + ln -sf phar.phar81 ${pkgdir}/usr/bin/phar81 + + # rename executables + #mv ${pkgdir}/usr/bin/phar.phar ${pkgdir}/usr/bin/phar.phar81 + + # rename man pages + #mv ${pkgdir}/usr/share/man/man1/{phar,phar81}.1 + #mv ${pkgdir}/usr/share/man/man1/phar.{phar,phar81}.1 + + # fix paths in executables + sed -i "/^includedir=/c \includedir=/usr/include/${_realpkg}" ${pkgdir}/usr/bin/phpize81 + sed -i "/^include_dir=/c \include_dir=/usr/include/${_realpkg}" ${pkgdir}/usr/bin/php-config81 + + # make phpize use php-config81 + sed -i "/^\[ --with-php-config=/c \[ --with-php-config=PATH Path to php-config [php-config81]], php-config81, no)" ${pkgdir}/usr/lib/${_realpkg}/build/phpize.m4 +} + +package_php81-cgi() { + pkgdesc='CGI and FCGI SAPI for PHP' + depends=("${pkgbase}") + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-cgi +} + +package_php81-apache() { + pkgdesc='Apache SAPI for PHP' + depends=("${pkgbase}" 'apache' 'libnsl') + backup=("etc/httpd/conf/extra/${_realpkg}_module.conf") + + install -D -m755 ${srcdir}/build-apache/libs/libphp.so ${pkgdir}/usr/lib/httpd/modules/lib${_realpkg}.so + install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/${_realpkg}_module.conf +} + +package_php81-fpm() { + pkgdesc='FastCGI Process Manager for PHP' + depends=("${pkgbase}" 'systemd') + backup=("etc/${_realpkg}/php-fpm.conf" "etc/${_realpkg}/php-fpm.d/www.conf") + options=('!emptydirs') + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-fpm + install -D -m644 sapi/fpm/php-fpm.service ${pkgdir}/usr/lib/systemd/system/${_realpkg}-fpm.service + install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/${_realpkg}-fpm.conf +} + +package_php81-embed() { + pkgdesc='Embedded PHP SAPI library' + depends=("${pkgbase}" 'systemd-libs' 'libnsl') + options=('!emptydirs') + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi + mv ${pkgdir}/usr/lib/libphp.so ${pkgdir}/usr/lib/libphp-81.so +} + +package_php81-phpdbg() { + pkgdesc='Interactive PHP debugger' + depends=("${pkgbase}") + options=('!emptydirs') + + cd ${srcdir}/build-phpdbg + make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg +} + +package_php81-dblib() { + pkgdesc='dblib module for PHP' + depends=("${pkgbase}" 'freetds') + + install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_dblib.so +} + +package_php81-enchant() { + pkgdesc='enchant module for PHP' + depends=("${pkgbase}" 'enchant') + + install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}/usr/lib/${_realpkg}/modules/enchant.so +} + +package_php81-gd() { + pkgdesc='gd module for PHP' + depends=("${pkgbase}" 'gd') + + install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}/usr/lib/${_realpkg}/modules/gd.so +} + +package_php81-imap() { + pkgdesc='imap module for PHP' + depends=("${pkgbase}" 'c-client') + + install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}/usr/lib/${_realpkg}/modules/imap.so +} + +package_php81-intl() { + pkgdesc='intl module for PHP' + depends=("${pkgbase}" 'icu') + + install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}/usr/lib/${_realpkg}/modules/intl.so +} + +package_php81-sodium() { + pkgdesc='sodium module for PHP' + depends=("${pkgbase}" 'libsodium') + + install -D -m755 ${srcdir}/build/modules/sodium.so ${pkgdir}/usr/lib/${_realpkg}/modules/sodium.so +} + +package_php81-odbc() { + pkgdesc='ODBC modules for PHP' + depends=("${pkgbase}" 'unixodbc') + + install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}/usr/lib/${_realpkg}/modules/odbc.so + install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_odbc.so +} + +package_php81-pgsql() { + pkgdesc='PostgreSQL modules for PHP' + depends=("${pkgbase}" 'postgresql-libs') + + install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}/usr/lib/${_realpkg}/modules/pgsql.so + install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_pgsql.so +} + +package_php81-pspell() { + pkgdesc='pspell module for PHP' + depends=("${pkgbase}" 'aspell') + + install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}/usr/lib/${_realpkg}/modules/pspell.so +} + +package_php81-snmp() { + pkgdesc='snmp module for PHP' + depends=("${pkgbase}" 'net-snmp') + + install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}/usr/lib/${_realpkg}/modules/snmp.so +} + +package_php81-sqlite() { + pkgdesc='sqlite module for PHP' + depends=("${pkgbase}" 'sqlite') + + install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}/usr/lib/${_realpkg}/modules/sqlite3.so + install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}/usr/lib/${_realpkg}/modules/pdo_sqlite.so +} + +package_php81-tidy() { + pkgdesc='tidy module for PHP' + depends=("${pkgbase}" 'tidy') + + install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}/usr/lib/${_realpkg}/modules/tidy.so +} + +package_php81-xsl() { + pkgdesc='xsl module for PHP' + depends=("${pkgbase}" 'libxslt') + + install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}/usr/lib/${_realpkg}/modules/xsl.so +} +sha256sums=('a1317eff0723a2b3d3122bbfe107a1158570ea2822dc35a5fb360086db0f6bbc' + '702b163c66c65af92dcad8d79f41bda84bcd5d863235fcf1497c33a86db9e4ca' + 'ebc0af1ef3a6baccb013d0ccb29923895a7b22ff2d032e3bba802dc6328301ce' + '96e0b05a5ec72ee0f907d29fbb9612414d9dfebeee1249cbf2f2318bacf2d37c' + 'eb0c0aec5b5fb282df0bfefd4d5bbc229ee80a5c5da6760ecf52697a23cc7175' + '6f73b6ac4b425ebc4505c7f75ca48763605b2c774c30bfa20072adcfbb1030cd') diff --git a/apache.conf b/apache.conf new file mode 100644 index 000000000000..b516b5e66ffa --- /dev/null +++ b/apache.conf @@ -0,0 +1,13 @@ +# Required modules: dir_module, php7_module + +<IfModule dir_module> + <IfModule php7_module> + DirectoryIndex index.php index.html + <FilesMatch "\.php$"> + SetHandler application/x-httpd-php + </FilesMatch> + <FilesMatch "\.phps$"> + SetHandler application/x-httpd-php-source + </FilesMatch> + </IfModule> +</IfModule> diff --git a/apache.patch b/apache.patch new file mode 100644 index 000000000000..d46aceef4e4a --- /dev/null +++ b/apache.patch @@ -0,0 +1,10 @@ +--- sapi/apache2handler/config.m4.orig ++++ sapi/apache2handler/config.m4 +@@ -114,7 +114,6 @@ + PHP_BUILD_THREAD_SAFE + fi + else +- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'` + if test -n "$APACHE_THREADED_MPM"; then + PHP_BUILD_THREAD_SAFE + fi diff --git a/enchant-2.patch b/enchant-2.patch new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/enchant-2.patch diff --git a/generate_patches b/generate_patches new file mode 100755 index 000000000000..d773305aba7f --- /dev/null +++ b/generate_patches @@ -0,0 +1,64 @@ +#!/bin/bash + +. PKGBUILD + +makepkg -o --nodeps --noprepare --skipinteg + +pushd src/${_pkgbase}-${pkgver} + +sed '/APACHE_THREADED_MPM=/d' -i.orig sapi/apache2handler/config.m4 + +sed 's/.conf.default/.conf/g' -i.orig sapi/fpm/Makefile.frag + +sed \ + -e 's#run/php-fpm.pid#/run/php81-fpm/php-fpm.pid#' \ + -e 's#^;error_log =.*#error_log = syslog#' \ + -i.orig sapi/fpm/php-fpm.conf.in + +sed \ + -e 's#^listen =.*#listen = /run/php81-fpm/php-fpm.sock#' \ + -e 's#^;listen.owner =#listen.owner =#' \ + -e 's#^;listen.group =#listen.group =#' \ + -e 's#^;chdir =.*#;chdir = /srv/http#' \ + -i.orig sapi/fpm/www.conf.in + +sed \ + -e 's#^PIDFile=.*#PIDFile=/run/php81-fpm/php-fpm.pid#' \ + -e 's#^ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize#ExecStart=@EXPANDED_SBINDIR@/php-fpm81 --nodaemonize#' \ + -i.orig sapi/fpm/php-fpm.service.in + +extensions=";extension=bcmath\n;extension=bz2\n;extension=calendar\nextension=curl\n;extension=dba\n;extension=enchant\n;extension=exif\n;extension=ffi\n;extension=ftp\n;extension=gd\n;extension=gettext\n;extension=gmp\n;extension=iconv\n;extension=imap\n;extension=intl\n;extension=ldap\n;extension=mysqli\n;extension=odbc\n;zend_extension=opcache\n;extension=pdo_dblib\n;extension=pdo_mysql\n;extension=pdo_odbc\n;extension=pdo_pgsql\n;extension=pdo_sqlite\n;extension=pgsql\n;extension=pspell\n;extension=shmop\n;extension=snmp\n;extension=soap\n;extension=sockets\n;extension=sodium\n;extension=sqlite3\n;extension=sysvmsg\n;extension=sysvsem\n;extension=sysvshm\n;extension=tidy\n;extension=xmlrpc\n;extension=xsl\nextension=zip\n" + +sed \ + -r ":a;N;\$!ba;s/; Notes for Windows environments :\n.+;?extension=\w+\n/${extensions}/g" \ + -i.orig php.ini-production +sed \ + -e 's#^;extension_dir = "\./"$#extension_dir = "/usr/lib/php81/modules/"#g' \ + -i php.ini-production + +sed \ + -r 's#PKG_CHECK_MODULES\(\[ENCHANT\], \[enchant\]\)#PKG_CHECK_MODULES([ENCHANT], [enchant-2])#g' \ + -i.orig ext/enchant/config.m4 +sed \ + -r 's#enchant_dict_free_suggestions\(pdict->pdict, suggs\)#enchant_dict_free_string_list(pdict->pdict, suggs)#g' \ + -i.orig ext/enchant/enchant.c +sed \ + -r 's#enchant_dict_add_to_personal\(pdict->pdict, word, wordlen\)#enchant_dict_add(pdict->pdict, word, wordlen)#g' \ + -i ext/enchant/enchant.c +sed \ + -r 's#enchant_dict_is_in_session\(pdict->pdict, word, wordlen\)#enchant_dict_is_added(pdict->pdict, word, wordlen)#g' \ + -i ext/enchant/enchant.c + +diff -u sapi/apache2handler/config.m4.orig sapi/apache2handler/config.m4 | filterdiff --clean --remove-timestamps > ../../apache.patch + +diff -u sapi/fpm/Makefile.frag.orig sapi/fpm/Makefile.frag | filterdiff --clean --remove-timestamps > ../../php-fpm.patch +diff -u sapi/fpm/php-fpm.conf.in.orig sapi/fpm/php-fpm.conf.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch +diff -u sapi/fpm/www.conf.in.orig sapi/fpm/www.conf.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch +diff -u sapi/fpm/php-fpm.service.in.orig sapi/fpm/php-fpm.service.in | filterdiff --clean --remove-timestamps >> ../../php-fpm.patch + +diff -u php.ini-production.orig php.ini-production | filterdiff --clean --remove-timestamps > ../../php.ini.patch + +diff -u ext/enchant/config.m4.orig ext/enchant/config.m4 | filterdiff --clean --remove-timestamps > ../../enchant-2.patch +diff -u ext/enchant/enchant.c.orig ext/enchant/enchant.c | filterdiff --clean --remove-timestamps >> ../../enchant-2.patch + +popd diff --git a/php-fpm.patch b/php-fpm.patch new file mode 100644 index 000000000000..d5fade4a2422 --- /dev/null +++ b/php-fpm.patch @@ -0,0 +1,76 @@ +--- sapi/fpm/Makefile.frag.orig ++++ sapi/fpm/Makefile.frag +@@ -15,8 +15,8 @@ + else \ + echo "Installing PHP FPM defconfig: $(INSTALL_ROOT)$(sysconfdir)/" && \ + $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d; \ +- $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default; \ +- $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default; \ ++ $(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf; \ ++ $(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf; \ + fi + + @echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/" +--- sapi/fpm/php-fpm.conf.in.orig ++++ sapi/fpm/php-fpm.conf.in +@@ -14,14 +14,14 @@ + ; Pid file + ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ + ; Default Value: none +-;pid = run/php-fpm.pid ++;pid = /run/php81-fpm/php-fpm.pid + + ; Error log file + ; If it's set to "syslog", log is sent to syslogd instead of being written + ; into a local file. + ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ + ; Default Value: log/php-fpm.log +-;error_log = log/php-fpm.log ++error_log = syslog + + ; syslog_facility is used to specify what type of program is logging the + ; message. This lets syslogd specify that messages from different facilities +--- sapi/fpm/www.conf.in.orig ++++ sapi/fpm/www.conf.in +@@ -33,7 +33,7 @@ + ; (IPv6 and IPv4-mapped) on a specific port; + ; '/path/to/unix/socket' - to listen on a unix socket. + ; Note: This value is mandatory. +-listen = 127.0.0.1:9000 ++listen = /run/php81-fpm/php-fpm.sock + + ; Set listen(2) backlog. + ; Default Value: 511 (-1 on FreeBSD and OpenBSD) +@@ -45,8 +45,8 @@ + ; and group can be specified either by name or by their numeric IDs. + ; Default Values: user and group are set as the running user + ; mode is set to 0660 +-;listen.owner = @php_fpm_user@ +-;listen.group = @php_fpm_group@ ++listen.owner = @php_fpm_user@ ++listen.group = @php_fpm_group@ + ;listen.mode = 0660 + ; When POSIX Access Control Lists are supported you can set them using + ; these options, value is a comma separated list of user/group names. +@@ -395,7 +395,7 @@ + ; Chdir to this directory at the start. + ; Note: relative path can be used. + ; Default Value: current directory or / when chroot +-;chdir = /var/www ++;chdir = /srv/http + + ; Redirect worker stdout and stderr into main error log. If not set, stdout and + ; stderr will be redirected to /dev/null according to FastCGI specs. +--- sapi/fpm/php-fpm.service.in.orig ++++ sapi/fpm/php-fpm.service.in +@@ -8,8 +8,8 @@ + + [Service] + Type=@php_fpm_systemd@ +-PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid +-ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf ++PIDFile=/run/php81-fpm/php-fpm.pid ++ExecStart=@EXPANDED_SBINDIR@/php-fpm81 --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf + ExecReload=/bin/kill -USR2 $MAINPID + + # Set up a new file system namespace and mounts private /tmp and /var/tmp directories diff --git a/php-fpm.tmpfiles b/php-fpm.tmpfiles new file mode 100644 index 000000000000..b5020aa49929 --- /dev/null +++ b/php-fpm.tmpfiles @@ -0,0 +1 @@ +d /run/php81-fpm 755 root root diff --git a/php.ini.patch b/php.ini.patch new file mode 100644 index 000000000000..17536d60f0ff --- /dev/null +++ b/php.ini.patch @@ -0,0 +1,79 @@ +--- php.ini-production.orig ++++ php.ini-production +@@ -760,7 +760,7 @@ + + ; Directory in which the loadable extensions (modules) reside. + ; https://php.net/extension-dir +-;extension_dir = "./" ++extension_dir = "/usr/lib/php81/modules/" + ; On windows: + ;extension_dir = "ext" + +@@ -908,51 +908,45 @@ + ; deprecated in a future PHP major version. So, when it is possible, please + ; move to the new ('extension=<ext>) syntax. + ; +-; Notes for Windows environments : +-; +-; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) +-; extension folders as well as the separate PECL DLL download (PHP 5+). +-; Be sure to appropriately set the extension_dir directive. +-; ++;extension=bcmath + ;extension=bz2 +-;extension=curl ++;extension=calendar ++extension=curl ++;extension=dba ++;extension=enchant ++;extension=exif + ;extension=ffi + ;extension=ftp +-;extension=fileinfo + ;extension=gd + ;extension=gettext + ;extension=gmp +-;extension=intl ++;extension=iconv + ;extension=imap ++;extension=intl + ;extension=ldap +-;extension=mbstring +-;extension=exif ; Must be after mbstring as it depends on it + ;extension=mysqli +-;extension=oci8_12c ; Use with Oracle Database 12c Instant Client +-;extension=oci8_19 ; Use with Oracle Database 19 Instant Client + ;extension=odbc +-;extension=openssl +-;extension=pdo_firebird ++;zend_extension=opcache ++;extension=pdo_dblib + ;extension=pdo_mysql +-;extension=pdo_oci + ;extension=pdo_odbc + ;extension=pdo_pgsql + ;extension=pdo_sqlite + ;extension=pgsql ++;extension=pspell + ;extension=shmop +- +-; The MIBS data available in the PHP distribution must be installed. +-; See https://www.php.net/manual/en/snmp.installation.php + ;extension=snmp +- + ;extension=soap + ;extension=sockets + ;extension=sodium + ;extension=sqlite3 ++;extension=sysvmsg ++;extension=sysvsem ++;extension=sysvshm + ;extension=tidy ++;extension=xmlrpc + ;extension=xsl +- +-;zend_extension=opcache ++extension=zip + + ;;;;;;;;;;;;;;;;;;; + ; Module Settings ; |