X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-wj0-f171.google.com (mail-wj0-f171.google.com [209.85.210.171]) by lists.alpinelinux.org (Postfix) with ESMTP id 2C9B85C455A for ; Thu, 8 Dec 2016 13:03:01 +0000 (GMT) Received: by mail-wj0-f171.google.com with SMTP id tg4so132609853wjb.1 for ; Thu, 08 Dec 2016 05:03:01 -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=1YDR3+T0/xNki7+OGQHd+LYhft5JHpj5xPEazXcSZ38=; b=0GA+xjM63MXjmJHn/48RZk7r13sd4A/3hX5CGyIRSdpmVRTe3ozgyAt4r541nC088W c0U6gXX572Vz/+OCZfwOWhkdX/oaYyg8MMpwVH4JhgPtSGlXO45ugx2easeuT+eC6bsz DYNdhgn8RPPnnhB553MynSwklG4xe12fjMW4pDSlESpNR0Ej7OUhVyLCTw0RGeadcja3 4+B87CH1m8TQT3X2Bn6npucuuRH5jpq1r5WfAa6Luxvc4QXFqgvsODzFkhYfDVhS9QPe IlpXiN/whSN5LIlu/PTllSL6cAmx4GykPbLZrlQ+2HhUF3MW7lNdwLmho9PkWojvDRBV yUPQ== 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=1YDR3+T0/xNki7+OGQHd+LYhft5JHpj5xPEazXcSZ38=; b=FBzkTLMpSmOA/C/J1eu6dOEmPWO7gd9QTXTrujQqw2x20IohQ4SGBmzFdWnK8CcSdx e1mO8EGqeQAopQNxXtH44FJ40J6L1j+4VsYlNQMHnDD1ksETyeS6tHFnM8j/3UO9Cqe9 NngI7d7qXbrC9Y+KHzTFKL7/QmLlyGQeLec1ZrGH3gmhEWfdZQbDoG4KpgVO7CV9DAAa wpX5eP+ZOnigaP0LVlcGaNOJhu3Y15MKUdAALwIN1T/sow5x0xL3+/WYayoo4b+rLLtj cv06JuV9XBLysjTR8I5rO5gsorNh/zc0K6Se/LBip6uqVZBzVy/QS+HtPUR4sHa+7Z99 CoQw== X-Gm-Message-State: AKaTC037PkP43los6WQ8EMHAKOq8SXVHrQ+wPmGWWRzr42k/+GQnPA9GJTavbVFC4LiV1jB/IfUqfXGmqsBquA== X-Received: by 10.194.71.133 with SMTP id v5mr63872351wju.222.1481202180181; Thu, 08 Dec 2016 05:03:00 -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; Thu, 8 Dec 2016 05:02:59 -0800 (PST) In-Reply-To: References: <20161202165351.421-1-valery.kartel@gmail.com> <20161207103124.0871f167@vostro> From: Valery Kartel Date: Thu, 8 Dec 2016 15:02:59 +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=047d7bfd0be2ca55be054325417d --047d7bfd0be2ca55be054325417d Content-Type: text/plain; charset=UTF-8 Hi, I made another php-7.1 patch with suffixed binaries and a trigger that symlinks it to no-suffixed ones. If such idea would be implemented in php5, we can easily switch system-default php version with: # apk fix php5-common # apk fix php7-common 2016-12-07 12:21 GMT+02:00 Valery Kartel : > 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 >> > > --047d7bfd0be2ca55be054325417d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I made another php-7.= 1 patch with suffixed binaries and a trigger that symlinks it to no-suffixe= d ones.
If such idea would be implemented in php5, we can <= span class=3D"gmail-">easily switch system-default php version with:
# apk fix php5-common
# apk fix php7-common

2016-12-07 12:21 GMT+02:00 Valer= y Kartel <valery.kartel@gmail.com>:
Hi,

<= /div>I think, I made a last-minute change in init script and forgot to rebu= ild checksum, sorry.

When I added php7 package initially, I ma= de it with "7" suffix to test it with co-existing php5 simultaneo= usly.
At those time and for now php5 have no suffix at all.
The only place where php5 intersects and conflicts with php7 in prod= uction is a cli. PHP7'th -fpm and -cgi ones are with "7" suff= ix 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 mad= e cli php7 suffix for now.

I renamed apache2 module to the sam= e 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 ph= p5->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 becaus= e I suspect it would many questions from aports-maintainers :)

Anoth= er way is to make an empty php[57]-cli-select subpackage with those post-in= stall script.



2016-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/distr= ibutions/$_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


--047d7bfd0be2ca55be054325417d-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---