Bug 2095871 - file-5.42-1.fc37 breaks the buildroot due to changed output
Summary: file-5.42-1.fc37 breaks the buildroot due to changed output
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vincent Mihalkovič
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-10 19:13 UTC by Kevin Fenzi
Modified: 2022-08-02 09:57 UTC (History)
8 users (show)

Fixed In Version: file-5.42-3.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-02 09:57:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.