Bug #73046 [Opn->Nab]: 'ext/fileinfo/create_data_file.php' don't work on Fedora 24
| From: | ab@php.net | Date: | Thu, 08 Sep 2016 23:00:29 +0000 |
| Subject: | Bug #73046 [Opn->Nab]: 'ext/fileinfo/create_data_file.php' don't work on Fedora 24 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203890@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73046&edit=1
ID: 73046
Updated by: ab@php.net
Reported by: spam2 at rhsoft dot net
Summary: 'ext/fileinfo/create_data_file.php' don't work on
Fedora 24
-Status: Open
+Status: Not a bug
Type: Bug
Package: Compile Failure
Operating System: Linux
PHP Version: 7.0.11RC1
Block user comment: N
Private report: N
New Comment:
Thanks for the report. It is fine. Please check bug #67516 again - the magic database format might
change from version to version. Bundling an incompatible magic file is same as using it externally.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2016-09-08 11:08:09] spam2 at rhsoft dot net
Description:
------------
while trying to solve https://bugs.php.net/bug.php?id=67516 by use the
systems "magic.mgc" in the rpm build-process this ends in a unuseable
'fileinfo.so' - the build process looks fine, the size reasonable but:
___________________________________________
Warning: finfo_open(): Failed to load magic database at '(null)'. in
/mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 15
Warning: finfo_file() expects parameter 1 to be resource, boolean given in
/mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 16
Warning: finfo_close() expects parameter 1 to be resource, boolean given in
/mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 17
___________________________________________
file-5.25-6.fc24.x86_64
file-libs-5.25-6.fc24.x86_64
https://koji.fedoraproject.org/koji/packageinfo?packageID=418
Test script:
---------------
%prep
%setup -q -n php-%{version}
%patch1 -p1
# generate 'data_file.c' from bundeled libmagic with current system data
/usr/bin/php ext/fileinfo/create_data_file.php /usr/share/misc/magic.mgc >
ext/fileinfo/data_file.c
_____________________________________
above how i tried re-generate 'data_file.c' within rpmbuild (yes it's a bootsrap
issue if PHP is not in any version installed but woul dbe OK for local packaging and can be warpped
in a check if it exists too)
Expected result:
----------------
'data_file.c' created with updated magic-db and so for years fiuxed wrong detected
filetypes corrected
Actual result:
--------------
unusable 'fileinfo.so' (--enable-fileinfo=shared) which loads but don#t work
Warning: finfo_open(): Failed to load magic database at '(null)'. in
/mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 15
Warning: finfo_file() expects parameter 1 to be resource, boolean given in
/mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 16
Warning: finfo_close() expects parameter 1 to be resource, boolean given in
/mnt/data/lounge-daten/php-mimtype-bug/mime.php on line 17
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73046&edit=1