The documentation for the 'file' command states that local additions should be placed in /etc/magic, but that file is never referenced. This impacts dev-lang/lua-5.0.2 which installs a local addition. Obviously, this also impacts me, as I'm also adding some entries. The workaround is to create a symlink to /etc/magic named ~/.magic for each user.
Correction: The symlink mentioned does not supplement the existing magic with localizations in /etc/magic, it replaces it. There may not be an effective workaround.
looks like all versions of file do this from a quick glance at file.c, it looks like file only works with 1 magic database at a time ... if you have say ~/.magic, then the system magic file will never be utilized in the case of /etc/magic, this is a compile time default which is overridden by /usr/share/misc/file/magic
oops, did not mean to close ...
I just created bug 102970 for "dev-lang/lua adds to /etc/magic, ignored." I referenced this bug there, so now it's linked both ways. The issue remaining with this bug is that the documentation (man page and such) says that localizations should go in /etc/magic, which is not how it is implemented. This is probably something that should be pushed upstream to the 'file' maintainer, as being able to add local additions is a useful feature.
ive e-mailed upstream already ... personally i dont think lua should be installing /etc/magic ... what if some other package wants to install file updates too ? they should all be moved into the file package
talked to upstream and they're just going to fix the documentation by trimming all mentioning of /etc/magic i guess it's never been supported, but no one noticed the manpage was outdated ;) file-4.15 now in portage