Mail archive
alpine-aports

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

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Wed, 7 Dec 2016 12:21:05 +0200

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 <timo.teras_at_iki.fi>:

> 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__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__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__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__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 - 12:21:05 GMT