Bug #73046 [Nab]: 'ext/fileinfo/create_data_file.php' don't work on Fedora 24

From: Date: Fri, 09 Sep 2016 07:53:03 +0000
Subject: Bug #73046 [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-203902@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 User updated by: spam2 at rhsoft dot net Reported by: spam2 at rhsoft dot net Summary: 'ext/fileinfo/create_data_file.php' don't work on Fedora 24 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: It is fine? 'ext/fileinfo/create_data_file.php' should realize that it's incompatible, do a exit(1) with e error message and so would stop 'rpmbuild' implicit instead compile and link for a long time to produce a non-working build without any warning Previous Comments: ------------------------------------------------------------------------ [2016-09-08 23:00:28] ab@php.net 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. ------------------------------------------------------------------------ [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

« previous php.bugs (#203902) next »