Bug 2008470 - Syntax error in .wasm specification [patch included]
Summary: Syntax error in .wasm specification [patch included]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: 34
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: 2021-09-28 10:43 UTC by Fritz Elfert
Modified: 2021-10-02 01:28 UTC (History)
5 users (show)

Fixed In Version: file-5.39-7 file-5.39-7.fc34
Clone Of:
Environment:
Last Closed: 2021-10-02 01:28:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch, fixing this bug (519 bytes, patch)
2021-09-28 10:43 UTC, Fritz Elfert
no flags Details | Diff
Patch against package source (481 bytes, patch)
2021-09-28 11:05 UTC, Fritz Elfert
no flags Details | Diff

Description Fritz Elfert 2021-09-28 10:43:54 UTC
Created attachment 1826925 [details]
Patch, fixing this bug

Created attachment 1826925 [details]
Patch, fixing this bug

Description of problem:
file spits out an error when examining a .wasm file (WebAssembly):

Version-Release number of selected component (if applicable):
5.39-6-fc34

How reproducible:
always

Steps to Reproduce:
1. Fetch a .wasm file (e.g. this one: https://github.com/jitsi/jitsi-meet/raw/master/react/features/stream-effects/virtual-background/vendor/tflite/tflite.wasm)
2. run file on that file:  file ./tflite.wasm
3.

Actual results:
./tflite.wasm: ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)

Expected results:
Should print:
./tflite.wasm: WebAssembly (wasm) binary module version 1 (MVP)


Additional info:

Comment 1 Fritz Elfert 2021-09-28 11:05:07 UTC
Created attachment 1826941 [details]
Patch against package source

First patch was against wrong file.

Comment 2 Vincent Mihalkovič 2021-09-29 14:46:42 UTC
Hi, 
problem was reported in: https://mailman.astron.com/pipermail/file/2020-June/000382.html and fix (different from what you suggested in the attachment) is already in upstream: https://github.com/file/file/commit/85b7ab83257b3191a1a7ca044589a092bcef2bb3 (this means also in fedora 35 and fedora rawhide).

dist-git commit: https://src.fedoraproject.org/rpms/file/c/33fd181e723ff61712ecbb2a72aac88b20cc6c1c

Comment 3 Fritz Elfert 2021-09-30 08:01:29 UTC
(In reply to Vincent Mihalkovič from comment #2)
> Hi, 
> problem was reported in:
> https://mailman.astron.com/pipermail/file/2020-June/000382.html and fix
> (different from what you suggested in the attachment) is already in
> upstream:
> https://github.com/file/file/commit/85b7ab83257b3191a1a7ca044589a092bcef2bb3
> (this means also in fedora 35 and fedora rawhide).
> 
> dist-git commit:
> https://src.fedoraproject.org/rpms/file/c/
> 33fd181e723ff61712ecbb2a72aac88b20cc6c1c

In that case, PLEASE provide a release for Fedora 34.

Comment 4 Fedora Update System 2021-09-30 10:24:16 UTC
FEDORA-2021-fb9d0de1d9 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fb9d0de1d9

Comment 5 Fritz Elfert 2021-09-30 10:40:58 UTC
(In reply to Fedora Update System from comment #4)
> FEDORA-2021-fb9d0de1d9 has been submitted as an update to Fedora 34.
> https://bodhi.fedoraproject.org/updates/FEDORA-2021-fb9d0de1d9

Hmm. There seems to be missing something here (trying to install manually):

$ rpm -Uvh https://kojipkgs.fedoraproject.org//packages/file/5.39/7.fc34/x86_64/file-5.39-7.fc34.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/file/5.39/7.fc34/x86_64/file-libs-5.39-7.fc34.x86_64.rpm
Retrieving https://kojipkgs.fedoraproject.org//packages/file/5.39/7.fc34/x86_64/file-5.39-7.fc34.x86_64.rpm
Retrieving https://kojipkgs.fedoraproject.org//packages/file/5.39/7.fc34/x86_64/file-libs-5.39-7.fc34.x86_64.rpm
error: Failed dependencies:
        file = 5.39-6.fc34 is needed by (installed) python3-file-magic-5.39-6.fc34.noarch
$

So, apparently in the old F34 version of file, there was a python wrapper included which has been moved elsewhere?

Comment 6 Kamil Dudka 2021-09-30 11:13:49 UTC
python3-file-magic-5.39-7.fc34.noarch.rpm is included in the build:

    https://koji.fedoraproject.org/koji/buildinfo?buildID=1838160

It is just missing in your `rpm -Uvh ...` command.

Comment 7 Fritz Elfert 2021-09-30 19:43:03 UTC
(In reply to Kamil Dudka from comment #6)
> python3-file-magic-5.39-7.fc34.noarch.rpm is included in the build:
> 
>     https://koji.fedoraproject.org/koji/buildinfo?buildID=1838160
> 
> It is just missing in your `rpm -Uvh ...` command.

I actually did not find it on koji and therefore its missing in my rpm cmdline.
And YES, I'm somewhat stupid as I did not look in the noarch list, only at x86_64.  Probably too tired at the time.
Thanks anyway - voted +1 on bodhi now.

Comment 8 Fedora Update System 2021-10-01 02:19:45 UTC
FEDORA-2021-fb9d0de1d9 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fb9d0de1d9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-fb9d0de1d9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Kamil Dudka 2021-10-01 06:40:21 UTC
No problem, I also had to look twice to find the subpackage in the noarch section.  Thank you for testing the update!

Comment 10 Fedora Update System 2021-10-02 01:28:11 UTC
FEDORA-2021-fb9d0de1d9 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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