Bug 1367144

Summary: python3-magic file() returnes b"b'ASCII text'"
Product: [Fedora] Fedora Reporter: Zbigniew JÄ™drzejewski-Szmek <zbyszek>
Component: fileAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 25CC: jkaluza, kdudka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: file-5.28-4.fc26 file-5.28-4.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-27 10:27:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zbigniew Jędrzejewski-Szmek 2016-08-15 17:11:37 UTC
Description of problem:
$ python3 -c 'import magic; m=magic.open(magic.NONE); m.load(); print(m.file("/etc/fstab"))'
b"b'ASCII text'"

This seems doubly wrong.

It breaks diffoscope and probably any other users badly.

Version-Release number of selected component (if applicable):
python3-magic-5.28-3.fc25.noarch

How reproducible:
deterministic

Additional info:
It works fine in F24:
$ python3 -c 'import magic; m=magic.open(magic.NONE); m.load(); print(m.file("/etc/fstab"))'; rpm -q python3-magic
ASCII text
python3-magic-5.25-6.fc24.noarch

Python2 also works fine in F25/rawhide, so this is a python3-only issue.

Comment 1 Kamil Dudka 2016-08-17 07:22:21 UTC
upstream commit:
https://github.com/file/file/commit/73e043d2

Comment 2 Fedora Update System 2016-08-17 07:51:17 UTC
file-5.28-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-180a7eca23

Comment 3 Fedora Update System 2016-08-17 19:53:47 UTC
file-5.28-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-180a7eca23

Comment 4 Fedora Update System 2016-08-27 10:27:07 UTC
file-5.28-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.