X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-ua0-f180.google.com (mail-ua0-f180.google.com [209.85.217.180]) by lists.alpinelinux.org (Postfix) with ESMTP id EDB665C43F8 for ; Thu, 2 Mar 2017 13:21:44 +0000 (GMT) Received: by mail-ua0-f180.google.com with SMTP id 72so75972899uaf.3 for ; Thu, 02 Mar 2017 05:21:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ByhcTw6lNtMkErVw2VaO5NHTbfYvw+ImM49n7mLqGrc=; b=NltYaCGXo4iZGb0cAHYLqFu/tocqVkq+OX6+LWnFN8RR7dD8W0jqfgT5ZH3ftKmhmi wD1dxmFSOJcYcnIccM5FTbE5oYrVNj/oG+nLT8ojK1XR8lXkucpf+2eZEw7nHvRIXGGL yNFzWQf7SLOdcuaXj2MgiSPuwjc+4xmsmLObRsXPM8zokBG1I+9DczCJQ3/OPZupFtSX EfLO4zBREtYW4iIitLrmo3fTjNNBSXgQOv2iDswbiXEHI7uGX82vUwTszwdcb7F3Ok1x AerAG/TgUbVqxDoK4UI7zgDwF5K9VYhcEpE8p5Ndf9s1ocs9w55q4drB7fz3ENSsZUOG qwgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ByhcTw6lNtMkErVw2VaO5NHTbfYvw+ImM49n7mLqGrc=; b=mwi9+Z9f6mKjoTeA7WlftnjdJBES2Xc1WKSqJhziCwP2Mc589CHxWMuL+SZqrtJ6T5 M/d4r2aXiV33KVTm+wViDimKC6wPo4ZfaxRnyFdlWyjJIGfEjiMaGeJfyCf1L3iwDOr2 YJSJq048cGaKCLR51FgiZHMj6hAR09Ce1xMS1B6DdIfMfxeJ2QdGGHJtIYALysbFWHP2 RIPJIzlmjTuByVId44KaQljCGLvkaJ4dpmspFtXxh78WnD01SJnsXZML3IizV/jM2JnC lLXSdlLJv3Kgjs79QDlp9qBAdNjGTg6dVkrFc+opRxSnlFkpsMi6Bec/ZAQH0Tuh17pn GbFg== X-Gm-Message-State: AMke39kWO1a5487AlliDQE3+j+sFkHLbE78BlPiZApzFEBYyueS6EQHcOS/mOHaq7b2YubkDb59d0FjbaOPJBA== X-Received: by 10.176.6.233 with SMTP id g96mr6409788uag.68.1488460904374; Thu, 02 Mar 2017 05:21:44 -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.103.104.66 with HTTP; Thu, 2 Mar 2017 05:21:43 -0800 (PST) In-Reply-To: References: <20170301091223.29158-1-valery.kartel@gmail.com> <20170301170449.1ef9a5f0@ncopa-desktop.copa.dup.pw> From: Valery Kartel Date: Thu, 2 Mar 2017 15:21:43 +0200 Message-ID: Subject: Re: [alpine-aports] [PATCH] testing/php7.1: do not build fileinfo with system magic file To: Natanael Copa Cc: alpine-aports Content-Type: multipart/alternative; boundary=94eb2c04515c77ab930549bf4fb3 --94eb2c04515c77ab930549bf4fb3 Content-Type: text/plain; charset=UTF-8 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 : > 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 : > >> On Wed, 1 Mar 2017 11:12:23 +0200 >> Valery Kartel 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 >> > 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() { >> >> > --94eb2c04515c77ab930549bf4fb3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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-wi= de 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 an= d reported a problem with it

:: But once installed, Nextcloud for in= stance 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://bug= s.alpinelinux.org/issues/6945

I not investigate where the p= roblem 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 Natanae= l Copa <ncopa@alpinelinux.org>:
On Wed,=C2=A0 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

> ---
>=C2=A0 testing/php7.1/APKBUILD | 8 ++------
>=C2=A0 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 @@
>=C2=A0 # Maintainer: Valery Kartel <valery.kartel@gmail.com>
>=C2=A0 pkgname=3Dphp7.1
>=C2=A0 pkgver=3D7.1.2
> -pkgrel=3D3
> +pkgrel=3D4
>=C2=A0 _apiver=3D20160303
>=C2=A0 _suffix=3D${pkgname#php}
>=C2=A0 _pkgreal=3D${pkgname%$_suffix}
> @@ -19,7 +19,7 @@ makedepends=3D"autoconf bison re2c apache2-dev = libxml2-dev libxslt-dev libzip-dev
>=C2=A0 =C2=A0 =C2=A0 =C2=A0aspell-dev enchant-dev expat-dev pcre-dev cu= rl-dev gmp-dev icu-dev imap-dev gd-dev
>=C2=A0 =C2=A0 =C2=A0 =C2=A0libical-dev libressl-dev openldap-dev net-sn= mp-dev db-dev krb5-dev gdbm-dev sqlite-dev
>=C2=A0 =C2=A0 =C2=A0 =C2=A0freetds-dev mariadb-dev postgresql-dev unixo= dbc-dev freetype-dev tidyhtml-dev libwebp-dev
> -=C2=A0 =C2=A0 =C2=A0libpng-dev libjpeg-turbo-dev libmcrypt-dev recode= -dev libedit-dev gettext-dev file-dev
> +=C2=A0 =C2=A0 =C2=A0libpng-dev libjpeg-turbo-dev libmcrypt-dev recode= -dev libedit-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-module.conf
> @@ -168,10 +168,6 @@ build() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--with-litespeed= \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--with-imap=3Dsh= ared --with-imap-ssl \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|| return 1
> -=C2=A0 =C2=A0 =C2=A0# rebuild fileinfo with current /usr/share/misc/m= agic.mgc
> -=C2=A0 =C2=A0 =C2=A0sapi/cli/php -n ext/fileinfo/create_data_file.php \
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/share/misc/magic= .mgc > ext/fileinfo/data_file.c || return 1
> -=C2=A0 =C2=A0 =C2=A0make
>=C2=A0 }
>
>=C2=A0 check() {



--94eb2c04515c77ab930549bf4fb3-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---