FS#71130 - [file] file -mime misdetects cpio files

Attached to Project: Arch Linux
Opened by Emil (xexaxo) - Friday, 04 June 2021, 20:39 GMT
Last edited by Sébastien Luttringer (seblu) - Tuesday, 19 October 2021, 00:27 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

`file -mime foo.cpio` incorrectly detects the file as octet-stream.
`file foo.cpio` seem smarter.

Notices while hacking on mkinitcpio.


Additional info:
* package version(s)
5.40-5

* link to upstream bug report, if any
https://bugs.astron.com/view.php?id=267


Steps to reproduce:

echo test > test-file
LANG=C bsdtar --uid 0 --gid 0 --null -cf - --format=newc test-file > foo.cpio
file --mime foo.cpio
foo.cpio: application/octet-stream; charset=binary <<< WRONG
file foo.cpio
foo.cpio: ASCII cpio archive (SVR4 with no CRC) <<< GOOD
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Tuesday, 19 October 2021, 00:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in 5.41
Comment by Emil (xexaxo) - Friday, 09 July 2021, 11:50 GMT
Note: different (also working) version was merged upstream

https://github.com/file/file/commit/ac8578e8916a274588ed1af0ed7dadac0bcc14fb

Loading...