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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

iaincoulter
Copy link

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
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
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
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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants