Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support .arr, support ios/wasm binaries #4521

Merged
merged 12 commits into from
Dec 18, 2024
Merged

Conversation

iaincoulter
Copy link
Contributor

Code changes to include .aar in list of zip type files. AAR is an android archive
Binary file signatures for different apple mach_o/universal and arm support.
Binary file signature for WASM binary

@iaincoulter iaincoulter changed the title fix: support .arr, support ios/wasm binaries fix: add wasm support for file command in version scanner Oct 22, 2024
@iaincoulter iaincoulter changed the title fix: add wasm support for file command in version scanner fix: support .arr, support ios/wasm binaries Oct 22, 2024
@iaincoulter
Copy link
Contributor Author

Later change as realised some machines use "file" in version_scanner which i had not handled. Fixed "file" method so it also handles WebAssembly and backup python code handles various Mach-O formats and Webassembly via regex in file.py

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good; thanks for thinking to add this support. Could you add some tests for each signature? Probably the easiest is to add a few tiny mostly-empty archives into test/data (I think our current tests are often metadata + a text file) but you might be able to do some magic with pytest and mock to fake it, or have the test generate the file.

@iaincoulter
Copy link
Contributor Author

While adding new tests also realised flaw in versionScanner is_executable. Due to its use of 'file' utility it can fail to detect all binary file type that the python regexp supports so as a backup when it fails the file is_binary script is also run to double check for extra binary types that 'file' can miss.
One such type has magic chars CA FE BA BE but file on rocky8 reports "ISO-8859 text, with no line terminators"

@terriko
Copy link
Contributor

terriko commented Oct 30, 2024

Approving tests to run again

@iaincoulter
Copy link
Contributor Author

Keep updating as new changes are applied to main but long tests continue to fail?

@terriko
Copy link
Contributor

terriko commented Nov 12, 2024

Updating the branch so that we get the updated longtest config.

@iaincoulter
Copy link
Contributor Author

Hi, does someone need to do anything to enable the tests to run again

@terriko
Copy link
Contributor

terriko commented Nov 19, 2024

Hi, does someone need to do anything to enable the tests to run again

Yeah, because of some concern about people overloading our CI jobs I have to re-approve anyone not on a regular contributors list. Let me get those tests running again now.

@iaincoulter
Copy link
Contributor Author

Updated with latest changes again but python long tests still an issue, last time i looked it appeared they had completed as test summary was displayed but then next step never ran?

@terriko
Copy link
Contributor

terriko commented Dec 2, 2024

Re-running the tests. We found an issue with the cache today that may not be fully resolved right this second, so I might need to do this again tomorrow. I'll flag it for myself so hopefully I'll get a chance to do that.

@terriko terriko added the awaiting maintainer Need a maintainer to respond / help out label Dec 2, 2024
@terriko terriko self-assigned this Dec 2, 2024
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, after much fighting with our CI system unrelated to this issue, I think we're set so the tests will pass now. I've fixed the merge conflict and will kick the tests off one more time, but I'll set this to merge when they pass. Thank you so much for working on this and for your extreme patience in getting it merged!

@terriko terriko enabled auto-merge (squash) December 18, 2024 21:26
@terriko terriko merged commit f087bb9 into intel:main Dec 18, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting maintainer Need a maintainer to respond / help out
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants