Skip to content

Conversation

@kissgyorgy
Copy link
Contributor

We introduced this API to be able to use it ourselves, but as it turns out we don't need it, and we don't want to expose a public API unnecessarily, because we can never "take it back". Also the MAGIC environment variable works well for libmagic if someone wants to control the magic database, so this API might not even be needed.

The problem we were trying to solve to use the same magic database on different systems, but that turned out impossible to do, because the magic format breaks between every version, so the only way to use libmagic is to use the same version of the magic database, which is usually the one shipped with the system.

@kissgyorgy kissgyorgy requested a review from vlaci June 29, 2022 07:17
@kissgyorgy kissgyorgy marked this pull request as draft June 29, 2022 07:18
We introduced this API to be able to use it ourselves, but as it turns out we
don't need it, and we don't want to expose a public API unnecessarily, because
we can never "take it back". Also the `MAGIC` environment variable works well for
libmagic if someone wants to control the magic database, so this API might not
even be needed.

The problem we were trying to solve to use the same magic database on different
systems, but that turned out impossible to do, because the magic database format
breaks between every version, so the only way to use libmagic is to use the same
version of the magic database, which is usually the one shipped with the system.
@kissgyorgy kissgyorgy changed the title Revert "Config option for custom magic file" Remove magic_file config option Jun 29, 2022
@kissgyorgy kissgyorgy marked this pull request as ready for review June 29, 2022 07:23
@kissgyorgy kissgyorgy requested a review from e3krisztian June 29, 2022 07:24
@vlaci vlaci merged commit d24bcc5 into main Jun 29, 2022
@vlaci vlaci deleted the revert-magic-api branch June 29, 2022 08:22
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.

3 participants