Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] community/php7: upgrade to 7.1.0, close issues #5367, #5670

From: Timo Teras <timo.teras_at_iki.fi>
Date: Wed, 7 Dec 2016 10:31:24 +0200

Hi,

On Fri, 2 Dec 2016 18:53:51 +0200
Valery Kartel <valery.kartel_at_gmail.com> wrote:

> WARN: PHP API version changed. All external extensions needs to be
> rebuilded!
>
> added shared extension 'recode'
> fixed imap loading order
> (http://php.net/manual/en/recode.installation.php) removed shared
> extension 'readline', made it compiled-in (Bug #5670) removed prefix
> in common binaries: php, php-config, phpize (Support #5367) some
> fixes in APKBUILD and others ---

Much of this looks good. few questions and notes below.

First, 'abuild checksum' is needed to update php7-fpm.initd checksum.

> diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
> index c0b1f5cdc3..bb8d9e930a 100644
> --- a/community/php7/APKBUILD
> +++ b/community/php7/APKBUILD
> _at_@ -2,35 +2,40 @@
> # Maintainer: Valery Kartel <valery.kartel_at_gmail.com>
> pkgname=php7
> _pkgreal=php
> -pkgver=7.0.13
> -pkgrel=1
> +pkgver=7.1.0
> +pkgrel=0
> pkgdesc="The PHP language runtime engine - 7th branch"
> url="http://www.php.net/"
> arch="all"
> license="PHP-3"
> options=""
> depends="$pkgname-common"
> -depends_dom="$pkgname-xml"
> -depends_mysqlnd="$pkgname-mysqli"
> -depends_phar="$pkgname"
> -depends_soap="$pkgname-xml"
> -depends_wddx="$pkgname-xml"
> -depends_xmlreader="$pkgname-dom"
> -depends_xmlrpc="$pkgname-xml"
> -depends_xsl="$pkgname-dom"
> +# make imap loaded after recode
> +depends_imap="-- $depends_recode"
> +depends_mysqlnd="$pkgname-mysqli $depends_mysqli"
> +depends_pdo_mysql="$pkgname-pdo $depends_pdo"
> +depends_pdo_odbc="$pkgname-pdo $depends_pdo"
> +depends_pdo_pgsql="$pkgname-pdo $depends_pdo"
> +depends_pdo_sqlite="$pkgname-pdo $depends_pdo"
> +depends_dom="$pkgname-xml $depends_xml"
> +depends_soap="$pkgname-xml $depends_xml"
> +depends_wddx="$pkgname-xml $depends_xml"
> +depends_xmlrpc="$pkgname-xml $depends_xml"
> +depends_xmlreader="$pkgname-dom $depends_dom"
> +depends_xsl="$pkgname-dom $depends_dom"
> +_prefix_opcache="zend_"
> makedepends="autoconf bison re2c apache2-dev libxml2-dev libxslt-dev
> libzip-dev bzip2-dev zlib-dev aspell-dev enchant-dev expat-dev
> pcre-dev curl-dev gmp-dev icu-dev imap-dev libical-dev libressl-dev
> openldap-dev net-snmp-dev db-dev krb5-dev gdbm-dev sqlite-dev
> freetds-dev mariadb-dev postgresql-dev unixodbc-dev freetype-dev
> tidyhtml-dev libxpm-dev libpng-dev libwebp-dev libjpeg-turbo-dev
> libmcrypt-dev gsoap-dev recode-dev
> - readline-dev paxmark gettext-dev
> + readline-dev gettext-dev
> "
> source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
> $pkgname-fpm.initd
> $pkgname-fpm.logrotate
> $pkgname-module.conf
> install-pear.patch
> - tidy-buffio.patch
> includedir.patch
> pid_log.patch
> "
> _at_@ -38,8 +43,8 @@ builddir="$srcdir/$_pkgreal-$pkgver"
>
> _exts="bcmath bz2 calendar ctype curl dba dom enchant exif ftp gd
> gettext gmp iconv imap intl json ldap mbstring mcrypt mysqli mysqlnd
> odbc opcache openssl pcntl pdo pdo_dblib pdo_mysql
> - pdo_odbc pdo_pgsql pdo_sqlite pgsql phar:phar posix pspell
> readline session shmop snmp soap
> - sockets sqlite3 sysvmsg sysvsem sysvshm tidy wddx xml
> xmlreader xmlrpc xsl zip zlib
> + pdo_odbc pdo_pgsql pdo_sqlite pgsql phar:phar posix pspell
> recode session shmop snmp
> + soap sockets sqlite3 sysvmsg sysvsem sysvshm tidy wddx xml
> xmlreader xmlrpc xsl zip zlib "
> subpackages="$pkgname-dev $pkgname-doc $pkgname-apache2
> $pkgname-phpdbg $pkgname-embed $pkgname-litespeed $pkgname-cgi
> $pkgname-fpm $pkgname-pear::noarch _at_@ -52,14 +57,12 @@ for _ext in
> $_exts; do done
> subpackages="$subpackages $pkgname-common::noarch"
>
> -_apiver="20151012"
> +_apiver="20160303"
>
> prepare() {
> cd "$builddir"
> -
> default_prepare || return 1
> update_config_sub || return 1
> -
> local vapi=$(sed -n '/#define PHP_API_VERSION/{s/.* //;p}'
> main/php.h) if [ "$vapi" != "$_apiver" ]; then
> error "Upstreram API version is now $vapi. Expecting
> $_apiver" _at_@ -74,7 +77,6 @@ _build() {
> --build=$CBUILD \
> --host=$CHOST \
> --prefix=/usr \
> - --program-suffix=7 \

I understand this was requested in #5367, however this causes certain
breakage. I'm mostly worried of the following:

-etc/init.d/php-fpm7
-usr/bin/php7
-usr/lib/apache2/mod_php7.so
+etc/init.d/php7-fpm
+usr/bin/php
+usr/lib/apache2/libphp7.so

Means any script coding shebang #!/usr/bin/php7 using the existing
needs to be fixed.

init.d symlinks might get broken. And I think apache2 at least to used
have mod_*.so convention... is this not required anymore?

If we do change the names. Especially /usr/bin/php, we'd need to add
conflicts, or make both php versions provide virtual "php=$pkgver"
package so apk knows you cannot install both simultaneusly.

Alternative is to add 'php' package has trigger matching php binaries,
and it adds symlinks to the latest php major version (similar how to
busybox and java-common works). Hopefully we get apk-tools to support
this kind of symlinks for next major alpine release.

Any additional thoughts on how to do this without breaking too much
stuff? Even with fixes, I'm slightly reluctant to apply this until
3.5-stable has been branched. Meanwhile, I'd hope us to come with good
plan on if we should keep the --program-suffix (and add it to php5 too)
and introduce symlinks to the latest binary, or if it should be
conflicting packages. Any ideas if we need to support php5+php7
coexistance?

- Timo


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Dec 07 2016 - 10:31:24 GMT