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

Drop dependency on fact_helper_file #128

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

maringuu
Copy link
Collaborator

@maringuu maringuu commented Nov 7, 2023

See individual commits.

Related fkie-cad/FACT_core#1140

Still not great as the whole installation happens after copying
but at least not copying is not the first thing we do.

Related #124
The only benefit it provides over the python package magic is that
it includes some additional magic.
Now that this file is in its own repo we can simple use the
MAGIC environment variable.
As the fact_extractor is only ever run in docker it suffices to set
this in the dockerfile.
@maringuu
Copy link
Collaborator Author

maringuu commented Nov 7, 2023

Converting to draft as we must somehow tell pytest that it should execute the tests with the proper MAGIC variable.
But then we would have to download firmware.mgc in the installer too which I don't like.

@maringuu maringuu marked this pull request as draft November 7, 2023 10:21
@jstucke
Copy link
Collaborator

jstucke commented Jul 26, 2024

Converting to draft as we must somehow tell pytest that it should execute the tests with the proper MAGIC variable. But then we would have to download firmware.mgc in the installer too which I don't like.

The extractor needs the same functionality as FACT: using the custom MIME definitions and if that does not work fall back to the regular ones. Because the regular ones are not a subset of the custom MIMEs and we are missing some important ones if we don't have this fallback (probably .zip, .tar, etc.). That is probably also the reason that the tests don't work. This is why this logic was put into the "fact_helper_file" module. It is probably necessary to take the code from fkie-cad/FACT_core#1140 and use it to refactor fact_helper_file.

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.

None yet

2 participants