Repository navigation
Add macos to GHA (and discover a libmagic bug) - #20
Conversation
|
This is interesting! It says it cannot find The difference between ubuntu/debian and arch/macos is in the packaging of the
Anyone has an idea? |
|
I have: So it seems equivalent.
I don't see anything wrong in the test of library. The |
|
From python-magic: ahupp/python-magic#166 But I could not reproduce on Arch 2021-01-11. |
|
@jruere what do you get in the following code? But: and then: |
|
I can reproduce the problem with the procedure you gave. Finally, This looks like a but in libmagic... |
|
I don't have a machine running on OSX so I can't really help but I remember I had numerous issues with the difference of versions of libmagic. Some detected mime types properly, some didn't, this is the reason why I was updating It is very likely that I don't really have a solution for this. You might want to tell the user to install the GNU version on OSX and say "this is the only version we support officially". One other alternative would be to implement your own MIME detection mechanism but this might bring other problems. For example, ZIP files always start with the bytes "PK", that one is easy to identify. |
|
Can you share a.zip? What it looks like is that there's a magic database entry for this second format, but the mimetype wasn't setup properly. |
With the following script in Python 3.9: I get a 120 Bytes large file And this is its base64 version: the md5sum of the file is Thank you for looking at the problem! |
|
Looks like a regression in libmagic 5.39: vs |
|
Thank you, @ahupp! That explains why it works on Ubuntu 20.04 (libmagic1 5.38) and not on arch-based distro (file 5.39). What can we do about it? |
|
I'm reporting a bug upstream, but for now, I don't know if there's anything you can do about it. |
|
@eumiro you can add a note to the troubleshooting section 😁 https://github.com/destream-py/destream#troubleshooting |
|
Now we'll need to find a way to |
|
I think we can introduce the |
Did you see this? https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula Maybe try Apparently you can do |
Very good point! haha That sounds like a perfectly acceptable solution for me. (I wouldn't suggest to make a Windows CI check just yet because I suspect the test code will fail to even execute properly.) |
That's it, thanks. I will now pin both linux and macos to libmagic version 5.38. As soon as there's a problem installing it or we get a new fixed version of libmagic, we can deal with it again. |
|
I feel trapped every time I click on the link "View it on GitHub" because I get that page that says there is nothing to see 😖 https://twitter.com/CecileTonglet/status/1348595584136077314 |
I am sorry. But who wrote about quick dirty commits that get cleaned up afterwards? 🤔 |
😇 Now my PRs look more like this: IMI-eRnD-Be/wasm-run#28 |
Disclaimer: I have no experience with macos, so just trying…