rpm build bad magic is caused by locale dependance

Bug #501593 reported by Elan Ruusamäe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
PLD Linux
New
Undecided
Unassigned

Bug Description

asterisk-sounds-core package building fails, as rpmbuild finds bad magic:

error: magic_file(ms, ".../usr/share/asterisk/sounds/vm-onefor.sln16") failed: mode 37777700644 DOS executable (device driver)vasprintf failed (Invalid or incomplete multibyte or wide character)
rpmbuild: rpmfc.c:1366: rpmfcClassify: Assertion `ftype != ((void *)0)' failed.

however, file(1) seems NOT to fail if invoked in non-utf8 locale:

$ LC_ALL=en_US.utf8 file vm-onefor.sln16
vm-onefor.sln16: ERROR: DOS executable (device driver)vasprintf failed (Invalid or incomplete multibyte or wide character)

$ LC_ALL=C file vm-onefor.sln16
vm-onefor.sln16: DOS executable (device driver), name: \377\001\377\377\375\375\375\377\377\261

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

This is bug in libmagic.

Revision history for this message
Elan Ruusamäe (glen666) wrote :

in other words, (so jbj can't read rpm is blamed again), both rpmbuild(1) and file(1) fail under utf8 locale, both "succeed" on C locale.

and imho either rpm or limagic should iconv the result before printing out with vasprintf(2).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.