Spec: M3 — zixl reads installer packages #18
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeff/zixl#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
zixl writes installer packages, but it cannot read one. Looking inside a package, its own or anyone else's, takes msitools'
msiinfoandmsidump. zixl's own tests depend on them, so they test zixl against a tool that has its own bugs. And a Windows user has nomsiinfoat all.Solution
The library reads an installer package back into an installer database: its tables and rows, with strings decoded from the database's code page, the contents of binary cells, the summary information, and every other stream. Two programs sit on top of it.
zixl-infotakesmsiinfo's subcommands:tables,streams,suminfo,export [-s]andextract.zixl-dumptakesmsidump's options, writing tables as text archive (.idt) files and streams as files. zixl's tests then read packages with zixl's own tools. msitools stays as a cross-check, comparing what each side reads out of the same packages.User Stories
.idtfiles, so that I can diff two packages.readto return the same installer database type thatwritetakes, so that a package can be read, changed and written again.Implementation Decisions
zixl.readtakes an installer package's bytes and returns its installer database (Database) plus the package's streams. It is the reverse of writing:_Tablesand_Columns, the table streams, and the summary information.Diagnostics, naming what is wrong._Storages) and digital signatures. They are listed but not read.zixl-infoandzixl-dump, keep the command lines ofmsiinfoandmsidump. Where msitools departs from Microsoft's documentation, zixl follows the documentation:_ForceCodepage.idtending its line;Testing Decisions
readarbitrary bytes.nix flake checkreads every fixture's packages, zixl's and wixl's, with both zixl's tools and msitools, and compares the output, normalizing only the documented differences.zixl-infoandzixl-dumpwhere they now usemsiinfoandmsidump.Out of Scope
export -s.msidump -S).Further Notes
docs/msi-layout.mdalready describes the layout from the writer's side. [MS-CFB] and [MS-OLEPS] cover the containers.Tickets
Every ticket is done: #19 (
7bb90da), #20 (f549911), #21 (5cecf36), #22 (b9e6042).zixl.readreads packages back into aDatabase, zixl-info and zixl-dump take msiinfo's and msidump's command lines, a fuzz target handsreadarbitrary bytes, and compare.sh cross-checks the reader against msitools on every fixture.