libmagic: ship the complete identification database - #29
Conversation
|
Independent devil review found that the original BSD-2-Clause declaration understated the licensing of the installed 5.45 database. Commit 6f3c169 corrects it to the complete Homebrew expression: BSD-2-Clause-Darwin + BSD-2-Clause + public domain. Revalidated after the correction:
The reviewer found no runtime, database-completeness, static-linking, fork-instrumentation, or ABI issue. The stacked file CLI adds the suggested separate gzip-header runtime coverage. |
e143ffd to
6dd503b
Compare
6f3c169 to
991712b
Compare
6dd503b to
ca052d7
Compare
Build the full version-matched magic.mgc with a native FILE_COMPILE helper, link the target library to declared compression dependencies, and validate the fixed-record database under Kandelo.
991712b to
3784d6b
Compare
|
Independent devil's-advocate source-only review at The review refreshed exact tap main Fresh dev-shell syntax, style, literal formula-load, support, dependency, diff, and no-artifact checks passed. A fresh ABI 18 replay classified Wasm/PDF and zlib/bzip2/xz payloads without external commands. A libmagic side module built against the current PIC bzip2/xz/zlib sources also passed |
Purpose
Make libmagic a first-class Kandelo Homebrew dependency with the complete upstream type database and native in-process support for zlib, bzip2, and xz payloads.
The database is compiled by a version-matched native
FILE_COMPILEhelper. Its on-disk format is fixed-width and endian-tagged, so the formula removes the earlier host-pointer-size truncation assumption instead of preserving a partial 14k-line database.Formula
magic.mgcfrom all 342 upstream source files;magic_loaddiscovery;fileCLI to a separate consumer PR.Existing ABI-18 evidence
The artifact-producing formula body is unchanged from the previously validated ABI-18 build:
brew test --keep-tmp --verbose libmagicpassed;PATH=/no-such-path;An independent source-only review subsequently replayed the ABI 18 runtime classification paths and rebuilt a libmagic side module against the current PIC bzip2/xz/zlib formula sources; both the classification and
dlopen/dlsymconsumer checks passed.Source merge and bottle publication
Compression source PR #25 is merged at tap main
a3ede334ad27aac7c4d5826bac761b9faf768f20. The declared bzip2, xz, and zlib source formulae now resolve from main, so this libmagic source formula no longer has a peer-branch dependency. This PR contains no bottle block, archive, receipt, sidecar, or package-registry artifact and may merge independently after fresh formula review.Bottle construction and installability claims remain separate. Before publishing a libmagic bottle:
Tap #22 is relevant only if a branch-based pre-merge dry run is needed. Automattic/kandelo#867 is merged and is not a gate.
Restack and current-main merge evidence
The two libmagic-owned commits were replayed onto tap main
a3ede334ad27aac7c4d5826bac761b9faf768f20, and a third commit changes only the support import to the canonical installedTap.fetchpath. README conflict resolution was additive. Before merge, an independent review refreshed exact tap mainaa99c67c632c4f5f0f6ac56850c2b325151e0b78;git merge-tree --write-treesucceeded cleanly, adding onlyFormula/libmagic.rband one README line, with the reviewed formula blob unchanged.Current head:
3784d6bd89e391f8e9660d90180f197e7c51ce2f.Validation through Kandelo's
scripts/dev-shell.shpassed:brew style Formula/libmagic.rb;pkgconf,automattic/kandelo-homebrew/bzip2,xz, andzlib;git diff --check, and a clean worktree;Formula/libmagic.rband one additive README line;Formula/bzip2.rborFormula/xz.rb, and no bottle metadata.The old validated formula blob was
5710428d9c4e3e5065e5f493af99027c6fbd69c3; the new import-adjusted blob is0ef72dfadb31c034174e66da97e70f819779e214. Every line after the support import is byte-identical, with SHA-256255ee00f07aecc3bea393ff8cc1b523f87f9155b3dd4f94f538e09300c31d94e.This PR changes only tap formula source and documentation. It does not change Kandelo's kernel, host runtime, SDK, or ABI.