X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by lists.alpinelinux.org (Postfix) with ESMTP id 920BE5C4555 for ; Wed, 7 Dec 2016 10:21:07 +0000 (GMT) Received: by mail-wm0-f44.google.com with SMTP id u144so33521477wmu.1 for ; Wed, 07 Dec 2016 02:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oBb+1CSDzP1deZYKR72bLyr4DvN9Z384jaH8vp4hjx0=; b=Ze995pV5ApCvtihxjnCwgxaPCOHZqJVhBfceWYKfHhTSlcMOJ22C7HCZ3B9wzIo0Sl 8igdbYJlo7GtQYp2dFLWOa4O37XIZtrbdKWPP4QWqEpwF1OXlHINx+yLiOJk5Oue3v0d qSy9aSMZVE8FC6wmQKk9bsDsYTwn49w/MEQCP9eCrtAh0U7Gygg/h7dXV4ZaJCxzg2Km ZPIGZZidxJHcEe9I5k7ZwS1J1ZLCOg3tHnASPowhJnV/kR1PfHiiD1giOFU+IzpfRZzN EG2dOPACq5nA3NduCoDUeS9LMH0uwkCcfdEimqLx26+kdwt8TC8OBKYDz+m6dB06LMb3 yVXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oBb+1CSDzP1deZYKR72bLyr4DvN9Z384jaH8vp4hjx0=; b=ewj7JUyYB4GKPNCZUStsx3EBF+l+gzJXs1r8zqnTRm1FRB9mdXVf6UPy0LO6qf9VSV YPUzwc96G19AtBDDpLtKIrf3Aa4zxxMV549yp+Q/csn+F7TNLKoTkj8d5SjmrCOfgyb4 pAEmWOOnUsSHuHndiaUKy6htT9ogkqwmJPeNJpT1CcZkvv6/sF2M/g4acO6bW/8olOCx RGOyBQnLXphDjn4cK2J0GbE9ANVVe7kbUPW/KQVviykfvkqDRFiPMj2L5nJw7j3MPgeW vLHigab7a11AUdPl1LD3yQfiQO0Pv3t6wB9HGJbk91FtULdx4Y99+A9Pzs1ZxaF1PVkN 4Uxg== X-Gm-Message-State: AKaTC00F1f2lq8CL28EJfun0nJ3kb6SHmNVnwsbmAje+VTgpPekgfT8m3Y+T4j/l5yGjuUisHBlCOujukQ8AFw== X-Received: by 10.28.161.129 with SMTP id k123mr2001571wme.66.1481106066447; Wed, 07 Dec 2016 02:21:06 -0800 (PST) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.80.176.36 with HTTP; Wed, 7 Dec 2016 02:21:05 -0800 (PST) In-Reply-To: <20161207103124.0871f167@vostro> References: <20161202165351.421-1-valery.kartel@gmail.com> <20161207103124.0871f167@vostro> From: Valery Kartel Date: Wed, 7 Dec 2016 12:21:05 +0200 Message-ID: Subject: Re: [alpine-aports] [PATCH] community/php7: upgrade to 7.1.0, close issues #5367, #5670 To: Timo Teras Cc: alpine-aports Content-Type: multipart/alternative; boundary=001a114cbebef7226a05430ee0c1 --001a114cbebef7226a05430ee0c1 Content-Type: text/plain; charset=UTF-8 Hi, I think, I made a last-minute change in init script and forgot to rebuild checksum, sorry. When I added php7 package initially, I made it with "7" suffix to test it with co-existing php5 simultaneously. At those time and for now php5 have no suffix at all. The only place where php5 intersects and conflicts with php7 in production is a cli. PHP7'th -fpm and -cgi ones are with "7" suffix for now and do not break co-existing PHP5'th -fpm and -cgi. Most of php shell scripts have #!/usr/bin/php as interpreter. So I saw no sense made cli php7 suffix for now. I renamed apache2 module to the same as in php5. My idea is to add suffix 5 or 7 for both php-cli binaries and to make a post-install script, that simply remade symlinks php5->php or php7-php. So for select a specific php-cli version as default it simply needs to readd package: "apk -f add php5" or "apk -f add php7" and so on. So the last one would be system-default. I did it in my local php5 & php7 -cli versions but not commit it because I suspect it would many questions from aports-maintainers :) Another way is to make an empty php[57]-cli-select subpackage with those post-install script. 2016-12-07 10:31 GMT+02:00 Timo Teras : > Hi, > > On Fri, 2 Dec 2016 18:53:51 +0200 > Valery Kartel 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 > > @@ -2,35 +2,40 @@ > > # Maintainer: Valery Kartel > > 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 > > " > > @@ -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 @@ -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" @@ -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 > --001a114cbebef7226a05430ee0c1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I think, I = made a last-minute change in init script and forgot to rebuild checksum, so= rry.

When I added php7 package initially, I made it with "= ;7" suffix to test it with co-existing php5 simultaneously.
A= t those time and for now php5 have no suffix at all.

The only = place where php5 intersects and conflicts with php7 in production is a cli.= PHP7'th -fpm and -cgi ones are with "7" suffix for now and d= o not break co-existing PHP5'th -fpm and -cgi. Most of php shell script= s have #!/usr/bin/php as interpreter. So I saw no sense made cli php7 suffi= x for now.

I renamed apache2 module to the same as in php5.
My idea is to add suffix 5 or 7 for both php-cli binaries and to= make a post-install script, that simply remade symlinks php5->php or ph= p7-php. So for select a specific php-cli version as default it simply needs= to readd package: "apk -f add php5" or "apk -f add php7&quo= t; and so on. So the last one would be system-default.
I did it in my l= ocal php5 & php7 -cli versions but not commit it because I suspect it w= ould many questions from aports-maintainers :)

Another way is to mak= e an empty php[57]-cli-select subpackage with those post-install script.


20= 16-12-07 10:31 GMT+02:00 Timo Teras <timo.teras@iki.fi>:
=
Hi,

On Fri,=C2=A0 2 Dec 2016 18:53:51 +0200
Valery Kartel <valery.kartel@= 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.installat= ion.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 checksu= m.

> diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
> index c0b1f5cdc3..bb8d9e930a 100644
> --- a/community/php7/APKBUILD
> +++ b/community/php7/APKBUILD
> @@ -2,35 +2,40 @@
>=C2=A0 # Maintainer: Valery Kartel <valery.kartel@gmail.com>
>=C2=A0 pkgname=3Dphp7
>=C2=A0 _pkgreal=3Dphp
> -pkgver=3D7.0.13
> -pkgrel=3D1
> +pkgver=3D7.1.0
> +pkgrel=3D0
>=C2=A0 pkgdesc=3D"The PHP language runtime engine - 7th branch&quo= t;
>=C2=A0 url=3D"http://www.php.net/"
>=C2=A0 arch=3D"all"
>=C2=A0 license=3D"PHP-3"
>=C2=A0 options=3D""
>=C2=A0 depends=3D"$pkgname-common"
> -depends_dom=3D"$pkgname-xml"
> -depends_mysqlnd=3D"$pkgname-mysqli"
> -depends_phar=3D"$pkgname"
> -depends_soap=3D"$pkgname-xml"
> -depends_wddx=3D"$pkgname-xml"
> -depends_xmlreader=3D"$pkgname-dom"
> -depends_xmlrpc=3D"$pkgname-xml"
> -depends_xsl=3D"$pkgname-dom"
> +# make imap loaded after recode
> +depends_imap=3D"-- $depends_recode"
> +depends_mysqlnd=3D"$pkgname-mysqli $depends_mysqli" > +depends_pdo_mysql=3D"$pkgname-pdo $depends_pdo"
> +depends_pdo_odbc=3D"$pkgname-pdo $depends_pdo"
> +depends_pdo_pgsql=3D"$pkgname-pdo $depends_pdo"
> +depends_pdo_sqlite=3D"$pkgname-pdo $depends_pdo"
> +depends_dom=3D"$pkgname-xml $depends_xml"
> +depends_soap=3D"$pkgname-xml $depends_xml"
> +depends_wddx=3D"$pkgname-xml $depends_xml"
> +depends_xmlrpc=3D"$pkgname-xml $depends_xml"
> +depends_xmlreader=3D"$pkgname-dom $depends_dom"
> +depends_xsl=3D"$pkgname-dom $depends_dom"
> +_prefix_opcache=3D"zend_"
>=C2=A0 makedepends=3D"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
> -=C2=A0 =C2=A0 =C2=A0readline-dev paxmark gettext-dev
> +=C2=A0 =C2=A0 =C2=A0readline-dev gettext-dev
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"
>=C2=A0 source=3D"http://php.net/= distributions/$_pkgreal-$pkgver.tar.bz2
>=C2=A0 =C2=A0 =C2=A0 =C2=A0$pkgname-fpm.initd
>=C2=A0 =C2=A0 =C2=A0 =C2=A0$pkgname-fpm.logrotate
>=C2=A0 =C2=A0 =C2=A0 =C2=A0$pkgname-module.conf
>=C2=A0 =C2=A0 =C2=A0 =C2=A0install-pear.patch
> -=C2=A0 =C2=A0 =C2=A0tidy-buffio.patch
>=C2=A0 =C2=A0 =C2=A0 =C2=A0includedir.patch
>=C2=A0 =C2=A0 =C2=A0 =C2=A0pid_log.patch
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"
> @@ -38,8 +43,8 @@ builddir=3D"$srcdir/$_pkgreal-$pkgver"= ;
>
>=C2=A0 _exts=3D"bcmath bz2 calendar ctype curl dba dom enchant exi= f ftp gd
> gettext gmp iconv imap intl json ldap mbstring mcrypt mysqli mysqlnd > odbc opcache openssl pcntl pdo pdo_dblib pdo_mysql
> -=C2=A0 =C2=A0 =C2=A0pdo_odbc pdo_pgsql pdo_sqlite pgsql phar:phar pos= ix pspell
> readline session shmop snmp soap
> -=C2=A0 =C2=A0 =C2=A0sockets sqlite3 sysvmsg sysvsem sysvshm tidy wddx= xml
> xmlreader xmlrpc xsl zip zlib
> +=C2=A0 =C2=A0 =C2=A0pdo_odbc pdo_pgsql pdo_sqlite pgsql phar:phar pos= ix pspell
> recode session shmop snmp
> +=C2=A0 =C2=A0 =C2=A0soap sockets sqlite3 sysvmsg sysvsem sysvshm tidy= wddx xml
> xmlreader xmlrpc xsl zip zlib "
>=C2=A0 subpackages=3D"$pkgname-dev $pkgname-doc $pkgname-apache2 > $pkgname-phpdbg $pkgname-embed $pkgname-litespeed $pkgname-cgi
> $pkgname-fpm $pkgname-pear::noarch @@ -52,14 +57,12 @@ for _ext in
> $_exts; do done
>=C2=A0 subpackages=3D"$subpackages $pkgname-common::noarch" >
> -_apiver=3D"20151012"
> +_apiver=3D"20160303"
>
>=C2=A0 prepare() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0cd "$builddir"
> -
>=C2=A0 =C2=A0 =C2=A0 =C2=A0default_prepare || return 1
>=C2=A0 =C2=A0 =C2=A0 =C2=A0update_config_sub || return 1
> -
>=C2=A0 =C2=A0 =C2=A0 =C2=A0local vapi=3D$(sed -n '/#define PHP_API_= VERSION/{s/.* //;p}'
> main/php.h) if [ "$vapi" !=3D "$_apiver" ]; then >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error "Upst= reram API version is now $vapi. Expecting
> $_apiver" @@ -74,7 +77,6 @@ _build() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--build=3D$CBUIL= D \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--host=3D$CHOST = \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--prefix=3D/usr = \
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--program-suffix=3D7 = \

I understand this was requested in #5367, however this causes c= ertain
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=3D$pkgver&qu= ot;
package so apk knows you cannot install both simultaneusly.

Alternative is to add 'php' package has trigger matching php binari= es,
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<= br> 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

--001a114cbebef7226a05430ee0c1-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---