~alpine/aports

3 2

[alpine-aports] [PATCH] testing/php7.1: do not build fileinfo with system magic file

Details
Message ID
<20170301091223.29158-1-valery.kartel@gmail.com>
Sender timestamp
1488359543
DKIM signature
missing
Download raw message
Patch: +2 -6
--
because its buggy
---
 testing/php7.1/APKBUILD | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/testing/php7.1/APKBUILD b/testing/php7.1/APKBUILD
index 717daa1c96..74a4e3ce6e 100644
--- a/testing/php7.1/APKBUILD
+++ b/testing/php7.1/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=php7.1
pkgver=7.1.2
pkgrel=3
pkgrel=4
_apiver=20160303
_suffix=${pkgname#php}
_pkgreal=${pkgname%$_suffix}
@@ -19,7 +19,7 @@ makedepends="autoconf bison re2c apache2-dev libxml2-dev libxslt-dev libzip-dev
	aspell-dev enchant-dev expat-dev pcre-dev curl-dev gmp-dev icu-dev imap-dev gd-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 libwebp-dev
	libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev gettext-dev file-dev
	libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev gettext-dev
	"
source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
	$pkgname-module.conf
@@ -168,10 +168,6 @@ build() {
		--with-litespeed \
		--with-imap=shared --with-imap-ssl \
		|| return 1
	# rebuild fileinfo with current /usr/share/misc/magic.mgc
	sapi/cli/php -n ext/fileinfo/create_data_file.php \
		/usr/share/misc/magic.mgc > ext/fileinfo/data_file.c || return 1
	make
}

check() {
-- 
2.11.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20170301170449.1ef9a5f0@ncopa-desktop.copa.dup.pw>
In-Reply-To
<20170301091223.29158-1-valery.kartel@gmail.com> (view parent)
Sender timestamp
1488384289
DKIM signature
missing
Download raw message
On Wed,  1 Mar 2017 11:12:23 +0200
Valery Kartel <valery.kartel@gmail.com> wrote:

> --
> because its buggy

is php buggy or system magic file?
Do we want fix system magic?

-nc

> ---
>  testing/php7.1/APKBUILD | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/testing/php7.1/APKBUILD b/testing/php7.1/APKBUILD
> index 717daa1c96..74a4e3ce6e 100644
> --- a/testing/php7.1/APKBUILD
> +++ b/testing/php7.1/APKBUILD
> @@ -2,7 +2,7 @@
>  # Maintainer: Valery Kartel <valery.kartel@gmail.com>
>  pkgname=php7.1
>  pkgver=7.1.2
> -pkgrel=3
> +pkgrel=4
>  _apiver=20160303
>  _suffix=${pkgname#php}
>  _pkgreal=${pkgname%$_suffix}
> @@ -19,7 +19,7 @@ makedepends="autoconf bison re2c apache2-dev libxml2-dev libxslt-dev libzip-dev
>  	aspell-dev enchant-dev expat-dev pcre-dev curl-dev gmp-dev icu-dev imap-dev gd-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 libwebp-dev
> -	libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev gettext-dev file-dev
> +	libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev gettext-dev
>  	"
>  source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
>  	$pkgname-module.conf
> @@ -168,10 +168,6 @@ build() {
>  		--with-litespeed \
>  		--with-imap=shared --with-imap-ssl \
>  		|| return 1
> -	# rebuild fileinfo with current /usr/share/misc/magic.mgc
> -	sapi/cli/php -n ext/fileinfo/create_data_file.php \
> -		/usr/share/misc/magic.mgc > ext/fileinfo/data_file.c || return 1
> -	make
>  }
>  
>  check() {



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Details
Message ID
<CAKTwcDOWtZj-eFm3T3-9rG4nzLP+Xyqmy2HxJG8c2VBuVEdq7w@mail.gmail.com>
In-Reply-To
<20170301170449.1ef9a5f0@ncopa-desktop.copa.dup.pw> (view parent)
Sender timestamp
1488385188
DKIM signature
missing
Download raw message
I added a feature to use system-wide magic.mgc when I made fileinfo
extension shared (pre-last commit).

Then a guys who deploy alpine and php7.1 in their projects wrote me me and
reported a problem with it

:: But once installed, Nextcloud for instance cannot generated preview of
images,
:: I get this explicit error from the logs
:; finfo::finfo(): Failed to load magic database at '(null)'

and there is an open bug with the same problem:
https://bugs.alpinelinux.org/issues/6945

I not investigate where the problem is, but as a quick fix I made a
switch-back to bundled in php magic database

2017-03-01 18:04 GMT+02:00 Natanael Copa <ncopa@alpinelinux.org>:

> On Wed,  1 Mar 2017 11:12:23 +0200
> Valery Kartel <valery.kartel@gmail.com> wrote:
>
> > --
> > because its buggy
>
> is php buggy or system magic file?
> Do we want fix system magic?
>
> -nc
>
> > ---
> >  testing/php7.1/APKBUILD | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/testing/php7.1/APKBUILD b/testing/php7.1/APKBUILD
> > index 717daa1c96..74a4e3ce6e 100644
> > --- a/testing/php7.1/APKBUILD
> > +++ b/testing/php7.1/APKBUILD
> > @@ -2,7 +2,7 @@
> >  # Maintainer: Valery Kartel <valery.kartel@gmail.com>
> >  pkgname=php7.1
> >  pkgver=7.1.2
> > -pkgrel=3
> > +pkgrel=4
> >  _apiver=20160303
> >  _suffix=${pkgname#php}
> >  _pkgreal=${pkgname%$_suffix}
> > @@ -19,7 +19,7 @@ makedepends="autoconf bison re2c apache2-dev
> libxml2-dev libxslt-dev libzip-dev
> >       aspell-dev enchant-dev expat-dev pcre-dev curl-dev gmp-dev icu-dev
> imap-dev gd-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 libwebp-dev
> > -     libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev
> gettext-dev file-dev
> > +     libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev
> gettext-dev
> >       "
> >  source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
> >       $pkgname-module.conf
> > @@ -168,10 +168,6 @@ build() {
> >               --with-litespeed \
> >               --with-imap=shared --with-imap-ssl \
> >               || return 1
> > -     # rebuild fileinfo with current /usr/share/misc/magic.mgc
> > -     sapi/cli/php -n ext/fileinfo/create_data_file.php \
> > -             /usr/share/misc/magic.mgc > ext/fileinfo/data_file.c ||
> return 1
> > -     make
> >  }
> >
> >  check() {
>
>
Details
Message ID
<CAKTwcDNU8f2Hn6yos94qtBwv5Bvn19g6PEL_Xw1xiXWmgdduVQ@mail.gmail.com>
In-Reply-To
<CAKTwcDOWtZj-eFm3T3-9rG4nzLP+Xyqmy2HxJG8c2VBuVEdq7w@mail.gmail.com> (view parent)
Sender timestamp
1488460903
DKIM signature
missing
Download raw message
Found that php's fileinfo uses own bundled version of libmagic.
This lib is incompatible with system magic.mgc file format
And it's not possible to swith it use system libmagic.

2017-03-01 18:19 GMT+02:00 Valery Kartel <valery.kartel@gmail.com>:

> I added a feature to use system-wide magic.mgc when I made fileinfo
> extension shared (pre-last commit).
>
> Then a guys who deploy alpine and php7.1 in their projects wrote me me and
> reported a problem with it
>
> :: But once installed, Nextcloud for instance cannot generated preview of
> images,
> :: I get this explicit error from the logs
> :; finfo::finfo(): Failed to load magic database at '(null)'
>
> and there is an open bug with the same problem:
> https://bugs.alpinelinux.org/issues/6945
>
> I not investigate where the problem is, but as a quick fix I made a
> switch-back to bundled in php magic database
>
> 2017-03-01 18:04 GMT+02:00 Natanael Copa <ncopa@alpinelinux.org>:
>
>> On Wed,  1 Mar 2017 11:12:23 +0200
>> Valery Kartel <valery.kartel@gmail.com> wrote:
>>
>> > --
>> > because its buggy
>>
>> is php buggy or system magic file?
>> Do we want fix system magic?
>>
>> -nc
>>
>> > ---
>> >  testing/php7.1/APKBUILD | 8 ++------
>> >  1 file changed, 2 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/testing/php7.1/APKBUILD b/testing/php7.1/APKBUILD
>> > index 717daa1c96..74a4e3ce6e 100644
>> > --- a/testing/php7.1/APKBUILD
>> > +++ b/testing/php7.1/APKBUILD
>> > @@ -2,7 +2,7 @@
>> >  # Maintainer: Valery Kartel <valery.kartel@gmail.com>
>> >  pkgname=php7.1
>> >  pkgver=7.1.2
>> > -pkgrel=3
>> > +pkgrel=4
>> >  _apiver=20160303
>> >  _suffix=${pkgname#php}
>> >  _pkgreal=${pkgname%$_suffix}
>> > @@ -19,7 +19,7 @@ makedepends="autoconf bison re2c apache2-dev
>> libxml2-dev libxslt-dev libzip-dev
>> >       aspell-dev enchant-dev expat-dev pcre-dev curl-dev gmp-dev
>> icu-dev imap-dev gd-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 libwebp-dev
>> > -     libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev
>> gettext-dev file-dev
>> > +     libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev
>> gettext-dev
>> >       "
>> >  source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
>> >       $pkgname-module.conf
>> > @@ -168,10 +168,6 @@ build() {
>> >               --with-litespeed \
>> >               --with-imap=shared --with-imap-ssl \
>> >               || return 1
>> > -     # rebuild fileinfo with current /usr/share/misc/magic.mgc
>> > -     sapi/cli/php -n ext/fileinfo/create_data_file.php \
>> > -             /usr/share/misc/magic.mgc > ext/fileinfo/data_file.c ||
>> return 1
>> > -     make
>> >  }
>> >
>> >  check() {
>>
>>
>
Reply to thread Export thread (mbox)