rpm-build.x86_64 0-4.5.90-0.git8461.7 When trying to build a firmware package, at least one binary file causes rpmbuild to throw an "assertion failed" error: magic_file(ms, "/builddir/build/BUILDROOT/alsa-firmware-1.0.17-1.fc10.x86_64/lib/firmware/mixart/miXart8.xlx") failed: mode 100644 DOS executable (device driver)vasprintf failed (Invalid or incomplete multibyte or wide character) rpmbuild: rpmfc.c:1405: rpmfcClassify: Assertion `ftype != ((void *)0)' failed. See http://linux.dell.com/files/fedora/FixBuildRequires/mock-results/x86_64/alsa-firmware-1.0.17-1.fc10.src.rpm/result/build.log for full build log.
This is not a bug or RPM itself but a bug of "file" utility RPM calls to figure out a file type. The current upstream RPM no more complains with this cryptic assertion error but produces more readable message when detection of file type fails :) Reassigning to file.
Hello Tim, can you please attach the "xlx" files, that cause the error? The best would be if you can attach one that was recognized correctly and then the "miXart8.xlx" which was incorrectly classified as DOS executable thanks, Daniel
Created attachment 317687 [details] An XLX file which I think "file" detected correctly, although it's not entirely clear from the output
Created attachment 317688 [details] The file which "file" didn't detect correctly I believe the attached files will demonstrate it, however I don't have a working F10 alpha build sys at the moment, so these are from a build on F-9 and it's possible they may be somehow different
Yup, with file 4.26 built from CVS I get: [pmatilai@localhost Download]$ file *.xlx miXart8.xlx: ERROR: DOS executable (device driver)vasprintf failed (Invalid or incomplete multibyte or wide character) x1_1_vxp.xlx: data
it seems that file(1) has false positive test for a DOS device driver 0 belong 0xffffffff DOS executable (device driver) (see /usr/share/magic) because the file "miXart8.xlx" begins with 0xffffffff That means I can reproduce the error and analyze it... if you want the compilation to be succesful, try -as a temporarily workaround- comment out the line and recompile magic file... Another thing: why is the build script dependent on magic in .xlx files? Does anyone know?
rpm runs magic_open() on every file in the package manifest, then, performs secondary operations on certain types of files. Because file is blowing up trying to parse these xlx files, rpm bails. From build/rpmfc.c: ms = magic_open(msflags); if (ms == NULL) { rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), msflags, strerror(errno)); assert(ms != NULL); /* XXX figger a proper return path. */ }
(In reply to comment #0) > http://linux.dell.com/files/fedora/FixBuildRequires/mock-results/x86_64/alsa-firmware-1.0.17-1.fc10.src.rpm/result/build.log ^^^^ reassigning the bug from F9 to F10
Created attachment 319651 [details] a patch I have changed the magic file in order to define the "DOS executable (device driver)" section more precisely, so file(1) will not crash and will not return negative value to rpmbuild(8)
fixed in file-4.26-2.fc10