1# tools13: foreign ODF 1.2 / 1.3 corpus 2 3`make-foreign-corpus.py` converts the same input documents with another popular Open Source Office suite 4(headless) once per output version, giving ODF 1.2 / 1.3 twins for an import smoke test. 5 6## Version values (observed) 7 8The output version comes from the profile setting `/org.openoffice.Office.Common/Save/ODF`, property 9`DefaultVersion`, written to the private profile's `user/registrymodifications.xcu`. Found black-box by converting one 10small document per value (`--probe`) and reading `office:version` / `manifest:version` and the declared namespaces back 11from the result. "Ext" means loext, calcext, officeooo, drawooo, tableooo and the ooo-ms-interop `field` namespace are 12declared. 13 14| value | office:version | extension namespaces | 15|---|---|---| 16| 1 | none (ODF 1.0) | no | 17| 2 | 1.1 (manifest has no version) | no | 18| 4 | 1.2 | no | 19| 8, 9 | 1.2 | yes | 20| 10 | 1.3 | no | 21| 11 | 1.3 | yes | 22| 12 | 1.4 | no | 23| 13 | 1.4 | yes | 24| 0, 3, 5, 6, 7, 14-20 | 1.4 | yes (acts as the default) | 25 26Modes used: `v12` = 4, `v12ext` = 8, `v13` = 10, `v13ext` = 11. Observed on one build (26.8.1.1); re-run `--probe` 27for another one. Plain-mode outputs still carry the legacy `ooo`, `oooc`, `ooow`, `rpt`, `formx` namespaces. 28 29## Run 30 31 python3 -I make-foreign-corpus.py <path to the other suite's soffice binary> 32 33Defaults: 55 documents chosen from `runs/gate-t16f/jobs.tsv` (see the comment above `QUOTA` in the script; 34`--list-selection` prints them), output root `test/odf-validate/runs/phase3/foreign/`. Other options: `--inputs LIST` 35(one path per line, first tab column used), `--root`, `--modes`, `--batch`, `--timeout`, 36`--probe WORKDIR [--probe-range 0-20]` for the value table only. 37 38Outputs: `<root>/<mode>/<name>.<odt|ods|odp|odg>` (legacy inputs map to their ODF type, e.g. `x.doc` -> `x.odt`; two 39inputs that would give the same output name are refused), `<root>/manifest.tsv` (input, mode, output, office:version, 40manifest:version, ok/fail, note), `<root>/logs/`, and one private profile per mode (`<root>/foreign-prof-<mode>`). 41Every output is checked for the expected `office:version` (in content, styles, meta, settings) and 42`manifest:version`; plain modes must declare no extension namespaces, ext modes must. Any mismatch or missing 43output gives a non-zero exit. Timed-out batches are retried file by file. 44 45Process safety: only processes whose command line carries one of its own profile URLs are ever killed, and the 46script refuses to start if such a process already exists. 47 48## Use 49 50A later import smoke test loads `<root>/v13/X` and `<root>/v12/X` (and the `ext` pair) and compares what the importer 51produced from each, so a 1.3-specific import difference shows up against the 1.2 twin of the same source. 52 53## Clean-room note 54 55Only the other suite's output files and its public behaviour are observed. Its source code and its installed 56resource/configuration files are not read, and its name is not used in files here; the binary path is a command 57line argument only. 58