Bug 2095871

Summary: file-5.42-1.fc37 breaks the buildroot due to changed output
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: fileAssignee: Vincent Mihalkovič <vmihalko>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: atu, jkaluza, kdudka, mhroncok, odubaj, svashisht, tvignaud, vmihalko
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: file-5.42-3.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-02 09:57:28 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:

Description Kevin Fenzi 2022-06-10 19:13:24 UTC
some of the rpm build scriptlets run things like: 
find -executable -type f ! -path '*:*' ! -path $'*\n*' | file -N --mime-type -f -

With file-5.41-1.fc37, you get output like: 

./scripts/ansible-vars: text/x-script.python   

with file-5.42-1.fc37 you get output like: 

.: text/x-script.python                                                                              

ie, -f - seems to not be showing the input filename? 

I've untagged this build from the rawhide buildroot now until this is sorted out.

Comment 1 Vincent Mihalkovič 2022-06-11 09:27:52 UTC
This problem was created in this commit: https://github.com/file/file/commit/f448f3e5c37de8c285ac14b032b2bdcea82fc08b.

Only first character (in your example ".") is printed out because the value of variable "wid" (in this line https://github.com/file/file/blob/master/src/file.c#L557) is equal to 1.
I have to look closer in function ("file_mbswidth") which calculates the "wid" variable - "file_mbswidth" https://github.com/file/file/commit/f448f3e5c37de8c285ac14b032b2bdcea82fc08b#diff-118cc5d9da84ee97c0ccc6ebf240979f78016b6ea455c0d0d0c92f940761a96fR582 (modified in mentioned commit)...

Comment 2 Miro Hrončok 2022-06-14 14:52:12 UTC
Note that the update was reverted in distgit now as well.

Comment 3 Vincent Mihalkovič 2022-08-02 09:57:28 UTC
dist-git commit: https://src.fedoraproject.org/rpms/file/c/def8ebfc2a8ed8d56766404023c0531beb3102a1