debkit 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. debkit-0.1.0/.gitignore +15 -0
  2. debkit-0.1.0/AGENTS.md +82 -0
  3. debkit-0.1.0/CLAUDE.md +1 -0
  4. debkit-0.1.0/CONFIG.md +166 -0
  5. debkit-0.1.0/CRYPTO.md +145 -0
  6. debkit-0.1.0/EXCEPTIONS.md +78 -0
  7. debkit-0.1.0/LICENSE +21 -0
  8. debkit-0.1.0/PKG-INFO +138 -0
  9. debkit-0.1.0/README.md +106 -0
  10. debkit-0.1.0/ROADMAP.md +53 -0
  11. debkit-0.1.0/SETUP.md +154 -0
  12. debkit-0.1.0/STORAGE.md +64 -0
  13. debkit-0.1.0/STRUCTURE.md +85 -0
  14. debkit-0.1.0/STYLE.md +60 -0
  15. debkit-0.1.0/TESTING.md +118 -0
  16. debkit-0.1.0/VALIDATION.md +371 -0
  17. debkit-0.1.0/docs/development/README.md +31 -0
  18. debkit-0.1.0/docs/development/action_pkg_insert.md +73 -0
  19. debkit-0.1.0/docs/development/action_pkg_remove.md +63 -0
  20. debkit-0.1.0/docs/development/action_sync.md +76 -0
  21. debkit-0.1.0/docs/development/diagrams/action-pkg-insert-activity.puml +113 -0
  22. debkit-0.1.0/docs/development/diagrams/action-pkg-insert-activity.svg +2 -0
  23. debkit-0.1.0/docs/development/diagrams/action-pkg-insert-sequence.puml +93 -0
  24. debkit-0.1.0/docs/development/diagrams/action-pkg-insert-sequence.svg +2 -0
  25. debkit-0.1.0/docs/development/diagrams/action-pkg-remove-activity.puml +39 -0
  26. debkit-0.1.0/docs/development/diagrams/action-pkg-remove-activity.svg +2 -0
  27. debkit-0.1.0/docs/development/diagrams/action-pkg-remove-sequence.puml +64 -0
  28. debkit-0.1.0/docs/development/diagrams/action-pkg-remove-sequence.svg +2 -0
  29. debkit-0.1.0/docs/development/diagrams/action-sync-activity.puml +85 -0
  30. debkit-0.1.0/docs/development/diagrams/action-sync-activity.svg +2 -0
  31. debkit-0.1.0/docs/development/diagrams/action-sync-sequence.puml +82 -0
  32. debkit-0.1.0/docs/development/diagrams/action-sync-sequence.svg +2 -0
  33. debkit-0.1.0/docs/development/diagrams/repo-sync-indices-activity.puml +60 -0
  34. debkit-0.1.0/docs/development/diagrams/repo-sync-indices-activity.svg +2 -0
  35. debkit-0.1.0/docs/development/diagrams/repo-sync-indices-sequence.puml +64 -0
  36. debkit-0.1.0/docs/development/diagrams/repo-sync-indices-sequence.svg +2 -0
  37. debkit-0.1.0/docs/development/repo_sync_indices.md +147 -0
  38. debkit-0.1.0/docs/guides/README.md +39 -0
  39. debkit-0.1.0/docs/guides/examples.md +310 -0
  40. debkit-0.1.0/pyproject.toml +148 -0
  41. debkit-0.1.0/scripts/check_docs.py +777 -0
  42. debkit-0.1.0/scripts/render_diagrams.py +173 -0
  43. debkit-0.1.0/src/debkit/__init__.py +7 -0
  44. debkit-0.1.0/src/debkit/__main__.py +8 -0
  45. debkit-0.1.0/src/debkit/_env.py +67 -0
  46. debkit-0.1.0/src/debkit/_escape.py +25 -0
  47. debkit-0.1.0/src/debkit/_logging.py +98 -0
  48. debkit-0.1.0/src/debkit/_options.py +177 -0
  49. debkit-0.1.0/src/debkit/action/__init__.py +325 -0
  50. debkit-0.1.0/src/debkit/action/action_history.py +191 -0
  51. debkit-0.1.0/src/debkit/action/action_pkg.py +468 -0
  52. debkit-0.1.0/src/debkit/action/action_sync.py +495 -0
  53. debkit-0.1.0/src/debkit/argparser.py +246 -0
  54. debkit-0.1.0/src/debkit/argtypes.py +140 -0
  55. debkit-0.1.0/src/debkit/cli.py +130 -0
  56. debkit-0.1.0/src/debkit/repo/__init__.py +610 -0
  57. debkit-0.1.0/src/debkit/repo/changes.py +172 -0
  58. debkit-0.1.0/src/debkit/repo/component.py +335 -0
  59. debkit-0.1.0/src/debkit/repo/compress.py +266 -0
  60. debkit-0.1.0/src/debkit/repo/debfile.py +207 -0
  61. debkit-0.1.0/src/debkit/repo/gnupg.py +215 -0
  62. debkit-0.1.0/src/debkit/repo/hashes.py +139 -0
  63. debkit-0.1.0/src/debkit/repo/index_selection.py +224 -0
  64. debkit-0.1.0/src/debkit/repo/package.py +177 -0
  65. debkit-0.1.0/src/debkit/repo/packages.py +525 -0
  66. debkit-0.1.0/src/debkit/repo/params.py +305 -0
  67. debkit-0.1.0/src/debkit/repo/release.py +881 -0
  68. debkit-0.1.0/src/debkit/repo/repo_diff.py +114 -0
  69. debkit-0.1.0/src/debkit/repo/repo_rw.py +444 -0
  70. debkit-0.1.0/src/debkit/repo/repo_sync.py +433 -0
  71. debkit-0.1.0/src/debkit/repo/shared_root.py +348 -0
  72. debkit-0.1.0/src/debkit/repo/sources.py +165 -0
  73. debkit-0.1.0/src/debkit/repo/stanza.py +47 -0
  74. debkit-0.1.0/tests/conftest.py +81 -0
  75. debkit-0.1.0/tests/helpers/__init__.py +0 -0
  76. debkit-0.1.0/tests/helpers/binaries.py +28 -0
  77. debkit-0.1.0/tests/helpers/factories.py +298 -0
  78. debkit-0.1.0/tests/helpers/gpg.py +83 -0
  79. debkit-0.1.0/tests/helpers/storage.py +188 -0
  80. debkit-0.1.0/tests/helpers/trees.py +78 -0
  81. debkit-0.1.0/tests/test_action.py +371 -0
  82. debkit-0.1.0/tests/test_action_history.py +308 -0
  83. debkit-0.1.0/tests/test_action_pkg.py +1094 -0
  84. debkit-0.1.0/tests/test_action_sync.py +1428 -0
  85. debkit-0.1.0/tests/test_argparser.py +468 -0
  86. debkit-0.1.0/tests/test_argtypes.py +143 -0
  87. debkit-0.1.0/tests/test_changes.py +223 -0
  88. debkit-0.1.0/tests/test_check_docs.py +417 -0
  89. debkit-0.1.0/tests/test_cli_main.py +329 -0
  90. debkit-0.1.0/tests/test_component.py +487 -0
  91. debkit-0.1.0/tests/test_compress.py +392 -0
  92. debkit-0.1.0/tests/test_debfile.py +410 -0
  93. debkit-0.1.0/tests/test_env.py +56 -0
  94. debkit-0.1.0/tests/test_gnupg.py +289 -0
  95. debkit-0.1.0/tests/test_gnupg_real.py +326 -0
  96. debkit-0.1.0/tests/test_hashes.py +75 -0
  97. debkit-0.1.0/tests/test_index_selection.py +292 -0
  98. debkit-0.1.0/tests/test_logging.py +85 -0
  99. debkit-0.1.0/tests/test_package.py +224 -0
  100. debkit-0.1.0/tests/test_packages.py +773 -0
  101. debkit-0.1.0/tests/test_params.py +284 -0
  102. debkit-0.1.0/tests/test_release.py +1110 -0
  103. debkit-0.1.0/tests/test_render_diagrams.py +255 -0
  104. debkit-0.1.0/tests/test_repo.py +485 -0
  105. debkit-0.1.0/tests/test_repo_diff.py +223 -0
  106. debkit-0.1.0/tests/test_repo_package.py +93 -0
  107. debkit-0.1.0/tests/test_repo_rw.py +1002 -0
  108. debkit-0.1.0/tests/test_repo_sync.py +1782 -0
  109. debkit-0.1.0/tests/test_sources.py +298 -0
  110. debkit-0.1.0/tests/test_stanza.py +69 -0
  111. debkit-0.1.0/uv.lock +1811 -0
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .coverage
8
+ coverage.xml
9
+ htmlcov/
10
+ .pytest_cache/
11
+ .mypy_cache/
12
+ .ruff_cache/
13
+ .env
14
+ # Default GnuPG home of a local debkit run → CONFIG.md
15
+ .gnupg/
debkit-0.1.0/AGENTS.md ADDED
@@ -0,0 +1,82 @@
1
+ # AI coding agent guide
2
+
3
+ Root contracts decide behavior; the implementation shows current state. Keep one canonical owner per
4
+ fact; link instead of copying.
5
+
6
+ ## Source priority
7
+
8
+ 1. The root contract that owns the domain below; `STYLE.md` prevails on style.
9
+ 2. Implementation under `src/debkit/` when checking current behavior.
10
+ 3. `docs/guides/` for user how-tos, `docs/development/` for contributor explanations and diagrams,
11
+ and `ROADMAP.md` for planned work and known deviations. All are non-canonical.
12
+
13
+ Storage behavior (backends, transactions, footmarks, history, S3 ACLs, digests) is owned by the
14
+ [txstore](https://github.com/vinklat/txstore) contracts; debkit's contracts own only how debkit uses
15
+ it. Resolve drift by updating the owning contract and implementation together, not by adding a
16
+ second definition.
17
+
18
+ ## Canonical sources
19
+
20
+ | File | Owns |
21
+ | -- | -- |
22
+ | `STYLE.md` | Coding conventions, logging rules, layer responsibilities, performance rules; prevails on style |
23
+ | `STRUCTURE.md` | Layout, module ownership, internal import directions, the txstore boundary |
24
+ | `STORAGE.md` | How debkit constructs storage, records transactions, and uses history |
25
+ | `VALIDATION.md` | Input constraints at the CLI, environment, URL, and `RepoParams` boundaries; path safety; sync index selection |
26
+ | `EXCEPTIONS.md` | Domain exception classes, owning modules, CLI exit groups and messages |
27
+ | `CONFIG.md` | CLI flags, `DEBKIT_*` variables, resolution order, defaults, secrets |
28
+ | `CRYPTO.md` | GPG verify and sign, Debian hash blocks, verification order, Release freshness |
29
+ | `TESTING.md` | Required coverage, harness rules, gates |
30
+ | `SETUP.md` | Install, run, test, quality gates, diagrams, dependency policy, release, upgrade notes |
31
+
32
+ ## Task routing
33
+
34
+ Read only the relevant sections; locate code from [STRUCTURE.md](STRUCTURE.md#layout).
35
+
36
+ | Task | Primary | Also check |
37
+ | -- | -- | -- |
38
+ | Validator / input rule | `VALIDATION.md` | `EXCEPTIONS.md` failure notation, `TESTING.md` |
39
+ | Exception or exit group | `EXCEPTIONS.md` | `src/debkit/cli.py`, `STYLE.md` logging |
40
+ | CLI flag / `DEBKIT_*` variable | `CONFIG.md` | `VALIDATION.md` environment values, `src/debkit/_options.py` |
41
+ | Storage construction / transactions | `STORAGE.md` | txstore contracts, `CONFIG.md` storage flags |
42
+ | Repo logic (`Repo*`) | `STYLE.md` layers → `STRUCTURE.md` | `EXCEPTIONS.md`, `VALIDATION.md`, `CRYPTO.md` |
43
+ | Action / subcommand | `STYLE.md` layers + `CONFIG.md` | `EXCEPTIONS.md`, `STORAGE.md`, `TESTING.md` |
44
+ | GPG / checksum / freshness | `CRYPTO.md` | `EXCEPTIONS.md` Distrustful group, `VALIDATION.md` |
45
+ | Import boundary | `STRUCTURE.md` dependencies | `tests/test_package.py`, `STYLE.md` layers |
46
+ | Dependency change | `SETUP.md` dependency policy | `STRUCTURE.md` dependencies, `tests/test_package.py`, `.github/debian-test.sh` |
47
+ | Bug fix | Owning contract + `EXCEPTIONS.md` | `TESTING.md` |
48
+ | Tests | `TESTING.md` | Contract for the behavior under test |
49
+ | Contract / doc edit | Writing rules below → owning contract | `scripts/check_docs.py`, `SETUP.md` quality gates |
50
+ | Release | `SETUP.md` release | `.github/workflows/release.yml`, `ROADMAP.md` phases |
51
+ | Quality gate / CI change | `SETUP.md` quality gates | `.github/workflows/ci.yml` |
52
+ | Developer explanation / diagram | `docs/development/` | Owning root contract, `SETUP.md` diagrams |
53
+ | User how-to / future behavior | `docs/guides/` / `ROADMAP.md` | Owning root contract before implementing |
54
+
55
+ ## Agent workflow
56
+
57
+ 1. Read only the owning contract sections from the routing table; open the module named in
58
+ [STRUCTURE.md](STRUCTURE.md#layout).
59
+ 2. Implement through the layer path in [STRUCTURE.md](STRUCTURE.md#dependencies). Write errors as
60
+ `condition → ExceptionClass (group)` and link `EXCEPTIONS.md` instead of copying its table. A new
61
+ flag → [CONFIG.md](CONFIG.md#maintenance); a new module →
62
+ [STRUCTURE.md](STRUCTURE.md#maintenance); a storage need txstore's public names do not meet is a
63
+ txstore change, never a private import.
64
+ 3. Add the narrowest test that falsifies the change per [TESTING.md](TESTING.md#maintenance).
65
+ 4. Run the [SETUP.md quality gates](SETUP.md#quality-gates); contract and `docs/` edits also run
66
+ `uv run python scripts/check_docs.py`. CI runs the gates again.
67
+
68
+ ## Contract writing rules
69
+
70
+ - One owner per fact. Link it as `→ FILE.md#anchor`; never copy its table or values.
71
+ - Preamble opens with `Owns: <domain>. Routing → AGENTS.md.`, optionally followed by one short
72
+ orienting paragraph. No cross-document pointer chains.
73
+ - Errors: `condition → ExceptionClass (group)`; class and group must match `EXCEPTIONS.md`. Every
74
+ mapped group exits 1, so the group is the discriminator, not the status.
75
+ - Prefer tables; one fact per row. Narrative cells stay under ~300 characters: split rows rather
76
+ than pad. Enumerations (flag lists, caught-exception lists) are exempt.
77
+ - Tables use `| -- |` separator rows and unpadded cells; do not run a table aligner.
78
+ - Bare imperative rules; no RFC 2119 keywords. Headings are sentence case and unique per file.
79
+ - No TODOs or "current exception" notes in contracts; record them in
80
+ [ROADMAP.md known deviations](ROADMAP.md#known-deviations) and link.
81
+ - Wrap prose at 100 columns; table rows are exempt. Prefer `→` shortcuts to sentences.
82
+ - After any contract or `docs/` edit run `uv run python scripts/check_docs.py`.
debkit-0.1.0/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
debkit-0.1.0/CONFIG.md ADDED
@@ -0,0 +1,166 @@
1
+ # Configuration contract
2
+
3
+ Owns: CLI flag names, their `DEBKIT_*` variables, resolution order, defaults, secrets, and only the
4
+ behavior needed to interpret a value. Routing → [AGENTS.md](AGENTS.md#canonical-sources).
5
+
6
+ `—` in Default means required. Flags are registered in the layer that owns them: global and S3 flags
7
+ in `argparser.py`, subcommand flags in the owning `Action*` module.
8
+
9
+ ## Resolution
10
+
11
+ | Rule | Behavior |
12
+ | -- | -- |
13
+ | Order | The flag, then its `DEBKIT_*` variable, then the default. |
14
+ | Empty | An empty variable counts as unset. |
15
+ | Switches | A boolean flag is a bare switch with a `--no-` form, so `--no-skip-verify` overrides `DEBKIT_SKIP_VERIFY=1`; its variable takes the boolean vocabulary → [VALIDATION.md](VALIDATION.md#environment-values). |
16
+ | Values | A variable passes through the flag's converter and choices; a rejected value → usage error naming the variable (Usage) → [VALIDATION.md](VALIDATION.md#environment-values). |
17
+ | Required | A required flag with neither flag nor variable → usage error naming both (Usage) → [EXCEPTIONS.md](EXCEPTIONS.md#cli-exit-groups). |
18
+ | Variable only | A [variable-only setting](#variable-only-settings) has no flag: its variable, then the default. |
19
+ | Lazy read | A variable is read only when its flag is absent, after argparse parses the command line. |
20
+ | Reader | Only `src/debkit/_env.py` reads the environment. |
21
+ | txstore | debkit passes every storage setting resolved, except S3 credentials left unset: txstore then reads `TXSTORE_S3_ACCESS` / `TXSTORE_S3_SECRET` → [STORAGE.md](STORAGE.md#construction). |
22
+
23
+ ## Global flags
24
+
25
+ | Flag | Variable | Default | Interpretation |
26
+ | -- | -- | -- | -- |
27
+ | `-V`, `--version` | none | none | Prints `__version__` and exits |
28
+ | `--target-url` | `DEBKIT_TARGET_URL` | — | Target deb source string → [VALIDATION.md](VALIDATION.md#debian-source-strings) |
29
+ | `-l`, `--log-level` | `DEBKIT_LOG_LEVEL` | `INFO` | Values → [VALIDATION.md](VALIDATION.md#log-levels) |
30
+ | `--log-format` | `DEBKIT_LOG_FORMAT` | `plain` | `plain` lines (module and function added at DEBUG) with control characters but tab escaped as `\xNN`, or one `json` object per line |
31
+ | `-n`, `--skip-verify` | `DEBKIT_SKIP_VERIFY` | off | Disables TLS, GPG, and digest verification → [CRYPTO.md](CRYPTO.md#verification-switches) |
32
+ | `--skip-verify-ssl` | `DEBKIT_SKIP_VERIFY_SSL` | off | Disables TLS certificate verification |
33
+ | `--skip-verify-gpg` | `DEBKIT_SKIP_VERIFY_GPG` | off | Disables GPG verification and Release signing → [CRYPTO.md](CRYPTO.md#verification-switches) |
34
+ | `--gnupg-home` | `DEBKIT_GNUPG_HOME` | `~/.gnupg` | GnuPG home directory, the trust root of every Release verification; a leading `~` is expanded → [CRYPTO.md](CRYPTO.md#gpg) |
35
+ | `--gnupg-keyring` | `DEBKIT_GNUPG_KEYRING` | `trustedkeys.gpg` | Trusted keyring filename |
36
+ | `--gnupg-sign-key` | `DEBKIT_GNUPG_SIGN_KEY` | none | Key that signs Release files: fingerprint, key ID, or user ID; unset leaves the choice to gpg → [CRYPTO.md](CRYPTO.md#gpg) |
37
+ | `--history-keep` | `DEBKIT_HISTORY_KEEP` | `20` | Newest transactions never pruned; values → [VALIDATION.md](VALIDATION.md#history-retention) |
38
+ | `--history-max-age` | `DEBKIT_HISTORY_MAX_AGE` | `90` | Days after which a transaction outside `--history-keep` is pruned; `0` disables pruning |
39
+
40
+ ## Storage flags
41
+
42
+ How they reach txstore → [STORAGE.md](STORAGE.md#construction).
43
+
44
+ | Flag | Variable | Default | Interpretation |
45
+ | -- | -- | -- | -- |
46
+ | `-u`, `--s3-access` | `DEBKIT_S3_ACCESS` | none | Access key ID, an identifier rather than a secret; required for `s3://`; unset falls back → [Resolution](#resolution) |
47
+ | `--s3-default-acl` | `DEBKIT_S3_DEFAULT_ACL` | `public-read` | Object ACL for writes, or `none` to send no ACL; values → [VALIDATION.md](VALIDATION.md#s3-canned-acls) |
48
+ | `--s3-bucket-acl` | `DEBKIT_S3_BUCKET_ACL` | none | Bucket ACL when a run creates the bucket; unset sends none |
49
+
50
+ ## Variable-only settings
51
+
52
+ Secrets have no flag → [Secrets](#secrets). `--help` lists their variables.
53
+
54
+ | Variable | Default | Interpretation |
55
+ | -- | -- | -- |
56
+ | `DEBKIT_GNUPG_PASSPHRASE` | empty string | Passphrase of the signing key → [CRYPTO.md](CRYPTO.md#gpg) |
57
+ | `DEBKIT_S3_SECRET` | none | S3 secret key; required for `s3://`; unset falls back → [Resolution](#resolution) |
58
+
59
+ ## Output flag
60
+
61
+ Accepted by `dump`, `list`, `stats`, `insert`, `remove`, `sync`, `check`, `log`, and `prune`.
62
+
63
+ | Flag | Variable | Default | Interpretation |
64
+ | -- | -- | -- | -- |
65
+ | `-o`, `--output` | `DEBKIT_OUTPUT` | `brief` | `brief` lines, with control characters in Release fields and storage keys escaped as `\xNN` like plain logs, or `json` |
66
+
67
+ ## Insert
68
+
69
+ | Flag | Variable | Default | Interpretation |
70
+ | -- | -- | -- | -- |
71
+ | `--changes-filename` | `DEBKIT_CHANGES_FILENAME` | none | `.changes` input |
72
+ | `--changes-sha256` | `DEBKIT_CHANGES_SHA256` | none | Expected SHA256 of the `.changes` file |
73
+ | `--deb-filename` | `DEBKIT_DEB_FILENAME` | none | Single `.deb` input |
74
+ | `--incoming-url` | `DEBKIT_INCOMING_URL` | — | Incoming storage URL or path → [VALIDATION.md](VALIDATION.md#storage-urls) |
75
+ | `--component` | `DEBKIT_COMPONENT` | `main` | Target component; a flat target keeps its single index slot but still nests the pool key under it → [VALIDATION.md](VALIDATION.md#repository-index-paths) |
76
+
77
+ Insert takes exactly one of `--changes-filename` and `--deb-filename`; neither or both →
78
+ `ActionException` (Generic). A `--deb-filename` without the `.deb` suffix → `ActionException`
79
+ (Generic). An upload whose pool key holds different bytes is refused →
80
+ [VALIDATION.md](VALIDATION.md#filename-safety).
81
+
82
+ ## Remove
83
+
84
+ | Flag | Variable | Default | Interpretation |
85
+ | -- | -- | -- | -- |
86
+ | `--pkg-pattern` | `DEBKIT_PKG_PATTERN` | — | JSON map of field → regex → [VALIDATION.md](VALIDATION.md#package-pattern-matching) |
87
+
88
+ ## Sync
89
+
90
+ | Flag | Variable | Default | Interpretation |
91
+ | -- | -- | -- | -- |
92
+ | `--source-url` | `DEBKIT_SOURCE_URL` | — | Source deb source string → [VALIDATION.md](VALIDATION.md#debian-source-strings) |
93
+ | `--architectures` | `DEBKIT_ARCHITECTURES` | `amd64,arm64` | Comma-separated list; `source` selects source packages → [VALIDATION.md](VALIDATION.md#architectures) |
94
+ | `--indices-exclude` | `DEBKIT_INDICES_EXCLUDE` | empty string | Comma-separated globs of Release-listed index paths to skip → [VALIDATION.md](VALIDATION.md#index-exclude-globs) |
95
+ | `--allow-release-rollback` | `DEBKIT_ALLOW_RELEASE_ROLLBACK` | off | Skips the Release freshness checks → [CRYPTO.md](CRYPTO.md#release-freshness) |
96
+ | `--verify-existing` | none | off | Verify target packages before the first pass → [CRYPTO.md](CRYPTO.md#verification-failures) |
97
+ | `--indices-only` | none | off | Sync index objects only |
98
+
99
+ ## Check
100
+
101
+ | Flag | Variable | Default | Interpretation |
102
+ | -- | -- | -- | -- |
103
+ | `--fix` | none | off | Delete corrupted and orphan files; what another dist sharing the root may need is kept → [VALIDATION.md](VALIDATION.md#index-selection); record each valid payload's digests → [STORAGE.md](STORAGE.md#transactions) |
104
+
105
+ Also accepts `--architectures` and `--indices-exclude` with the same variables and defaults as
106
+ [Sync](#sync): a check builds its index and package sets the same way a sync does, so other values
107
+ report the difference as missing or orphan objects. `--fix` deletes those orphans, so a check
108
+ narrower than the sync that built the mirror purges what it leaves out; what another dist sharing
109
+ the target root claims is never an orphan → [VALIDATION.md](VALIDATION.md#index-selection). Missing
110
+ are only the payloads and the parsed component indices the target listing lacks: the root Release
111
+ files were just read, and nothing is probed.
112
+
113
+ ## Log
114
+
115
+ No subcommand flags; uses `--target-url` and `-o`. Root-scoped: the `--target-url` dist and
116
+ component fields are optional and ignored → [STORAGE.md](STORAGE.md#history-commands).
117
+
118
+ ## Dry-run flag
119
+
120
+ Accepted by `revert` and `prune`.
121
+
122
+ | Flag | Variable | Default | Interpretation |
123
+ | -- | -- | -- | -- |
124
+ | `--dry-run` | none | off | Show what would be changed without applying |
125
+
126
+ ## Revert
127
+
128
+ Uses `--target-url`, whose dist and component fields are optional and ignored; reverts the latest
129
+ recorded transaction → [STORAGE.md](STORAGE.md#history-commands). Accepts `--dry-run`.
130
+
131
+ ## Prune
132
+
133
+ Uses `--target-url`, whose dist and component fields are optional and ignored; applies the
134
+ `--history-keep` and `--history-max-age` retention policy →
135
+ [STORAGE.md](STORAGE.md#history-commands). Root-scoped, and accepts `--dry-run` and `-o`.
136
+
137
+ | Flag | Variable | Default | Interpretation |
138
+ | -- | -- | -- | -- |
139
+ | `--orphans` | none | off | Also remove footmark objects belonging to no recorded transaction |
140
+
141
+ ## Secrets
142
+
143
+ - `DEBKIT_GNUPG_PASSPHRASE`, `DEBKIT_S3_SECRET`, and `TXSTORE_S3_SECRET` are secrets.
144
+ - Secrets are variables only, never flags: a command-line value is visible to other local users.
145
+ - `--help` names their variables but never shows a value.
146
+ - Never print, log, or fixture a secret.
147
+ - A child process, `zstd` or `gpg`, runs without any `DEBKIT_*` or `TXSTORE_*` variable: it reads
148
+ untrusted data and needs none of them; the passphrase reaches gpg on its input. Other inherited
149
+ variables pass through: debkit reads no `AWS_*` credential, since txstore takes explicit S3 keys.
150
+ - The S3 access key ID (`-u`, `DEBKIT_S3_ACCESS`, `TXSTORE_S3_ACCESS`) is an identifier, not a
151
+ secret, but is never logged next to the secret.
152
+ - Userinfo and query of a repository or storage URL are secrets: debkit logs and raises a URL only
153
+ through txstore's `redact_url` →
154
+ [txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.2/CONFIG.md#secrets).
155
+ - A credentialed URL goes in its variable (`DEBKIT_TARGET_URL`, `DEBKIT_SOURCE_URL`,
156
+ `DEBKIT_INCOMING_URL`) or, for `http(s)://`, in `~/.netrc` →
157
+ [txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.2/CONFIG.md#secrets); the
158
+ `--*-url` flags take the same value but expose it on the command line like any flag.
159
+
160
+ ## Maintenance
161
+
162
+ Register a new flag at the owning layer with `add_env_argument` (or `add_argument` when no variable
163
+ is intentional), a safe default, and its row here in the same change; register a secret with
164
+ `add_env_variable` and a [variable-only](#variable-only-settings) row. `scripts/check_docs.py`
165
+ verifies flag and variable parity with the code. Values that need validation get a section in
166
+ [VALIDATION.md](VALIDATION.md).
debkit-0.1.0/CRYPTO.md ADDED
@@ -0,0 +1,145 @@
1
+ # Cryptography contract
2
+
3
+ Owns: GPG verification and signing, Debian hash blocks and which digests debkit trusts, checksum
4
+ verification order, Release freshness, and verification-failure behavior. Routing →
5
+ [AGENTS.md](AGENTS.md#canonical-sources).
6
+
7
+ Verification is on by default; skipping is explicit through the switches below.
8
+
9
+ ## Verification switches
10
+
11
+ | Flag | Effect |
12
+ | -- | -- |
13
+ | `--skip-verify` | Disables TLS, GPG, and index and payload digest verification; GPG as under `--skip-verify-gpg`. An explicit `--changes-sha256` is still checked → [Verification failures](#verification-failures). |
14
+ | `--skip-verify-gpg` | No `GnuPG` instance is created by action setup; Release signatures are not checked, and a root Release without `Release.gpg` or `InRelease` reads as-is. |
15
+ | `--skip-verify-gpg`, writing | Release signing is off too: `insert` and `remove` save the root `Release` unsigned and delete its old `InRelease` and `Release.gpg`, logging each, since both sign the previous content. |
16
+ | `--skip-verify` or `--skip-verify-gpg` | Every command that reads a repository logs a warning once per run; `log`, `revert`, and `prune` verify nothing and do not. |
17
+ | `--skip-verify-ssl` | `verify=False` on HTTP and S3 clients → [STORAGE.md](STORAGE.md#construction). |
18
+
19
+ Flag names and variables → [CONFIG.md](CONFIG.md#global-flags).
20
+
21
+ ## GPG
22
+
23
+ Implemented by `GnuPG`, `cleartext_body`, and `canonical_text` in `repo/gnupg.py` over
24
+ `python-gnupg`; home and keyring → [CONFIG.md](CONFIG.md#global-flags).
25
+
26
+ | Operation | Behavior |
27
+ | -- | -- |
28
+ | `cleartext_body(data)` | The signed body of one cleartext message as gpg canonicalizes it, without checking the signature: trailing spaces, tabs, and CR stripped from every line, each line newline-terminated, armor headers dropped, dash-escaping undone. gpg authenticates nothing else. |
29
+ | `cleartext_body` encoding | Works on bytes, so the body keeps its encoding. |
30
+ | `canonical_text(data)` | `data` with the line canonicalization of `cleartext_body`, so a detached `Release` compares with an `InRelease` body. |
31
+ | `verify(data)` | Inline `InRelease` verification; returns `cleartext_body(data)`. |
32
+ | `verify(data, detach_sign)` | Detached `Release` + `Release.gpg` verification; returns `data`. The signature is staged in a `tempfile.NamedTemporaryFile` removed when its context exits, even when staging it fails, because `python-gnupg` needs a path on disk. |
33
+ | Root Release load | Fetches every root `Release`, `Release.gpg`, and `InRelease` present once and records their digests → [Verification order](#verification-order). |
34
+ | Root Release load, GPG verification on | Verifies the inline and the detached form alike when both are present, since `sync` mirrors both. |
35
+ | Root Release load, `Release.gpg` without `Release` | Signs nothing: skipped with a warning, so it is neither fetched nor mirrored. |
36
+ | Root Release load, `InRelease` and `Release` both present | With GPG verification on, the `InRelease` body differs from `canonical_text` of the `Release` → `ChecksumException` (Distrustful): freshness reads one form, `sync` mirrors both, and apt prefers `InRelease`. |
37
+ | Signature mode | `RootRelease.signature_mode` is the one place the GPG switch and the `GnuPG` combine: `VERIFY_AND_SIGN` (switch on, `GnuPG` set), `READ_SIGNED_UNVERIFIED` (switch on, no `GnuPG`: the `sync` target), `OFF` (`--skip-verify-gpg`). |
38
+ | Root Release load in `READ_SIGNED_UNVERIFIED` or `OFF` | No signature file is required, and an `InRelease` it parses is read through `cleartext_body`, unverified; `READ_SIGNED_UNVERIFIED` parses `InRelease` over a `Release` without `Release.gpg`, as the verified source does. |
39
+ | Root Release save | Writes the layout's root `Release` from `indices_path()` whichever form the load read, then signs it into `InRelease` and `Release.gpg` or removes both; a per-component Release is never signed. |
40
+ | Root Release save in `READ_SIGNED_UNVERIFIED` | Nothing signs it, and an unsigned save would drop the signatures it was read with → `ReleaseWriteException` (Write), before anything is written. |
41
+ | Signing key | `--gnupg-sign-key` names it; unset, gpg picks `default-key` from the home's `gpg.conf`, else the first key in the trusted keyring whose secret the home holds. A key gpg cannot use creates no signature, refused as below. |
42
+ | `sign(data, detach=False)` | Returns the signature (inline or detached) used when writing Release metadata; empty when gpg reports none created, as on a wrong passphrase, even though a failed clearsign prints its armor, and `Release.save` refuses an empty one → `ReleaseWriteException` (Write). |
43
+ | Key retrieval | gpg runs with `--no-auto-key-retrieve`, `--no-auto-key-locate`, and `--no-auto-key-import`, so no gpg run fetches, locates, or imports a key, whatever a config file says; for verify they back up `--no-options` below. |
44
+ | Verify and `gpg.conf` | Verify runs with `--no-options`, so a `keyring` or `primary-keyring` line in the home's `gpg.conf` adds no key that authenticates; only the trusted keyring does. |
45
+ | gpg version | `--no-auto-key-import` needs the GnuPG minimum → [SETUP.md](SETUP.md#prerequisites-and-install); an older gpg rejects it when `GnuPG` opens, before any verify or sign → `GPGVerifyException` (Read). |
46
+ | Keyring cannot be loaded | → `GPGVerifyException` (Read). |
47
+ | The `gpg` binary cannot be run | python-gnupg raises `OSError` → `GPGVerifyException` (Read). |
48
+ | Invalid signature or malformed signed message | → `GPGVerifyException` (Read). |
49
+ | Non-blank text after `-----END PGP SIGNATURE-----`, an unescaped `-` body line, or an armor header that is not `Name: value` with a letters-only name and a non-empty value | → `GPGVerifyException` (Read). |
50
+
51
+ ## Checksums
52
+
53
+ Digest helpers and the algorithm-name lists are txstore's →
54
+ [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.2/STORAGE.md#digests); the Debian
55
+ hash-block layer over them is `repo/hashes.py`.
56
+
57
+ | Item | Rule |
58
+ | -- | -- |
59
+ | Algorithms | `MD5Sum`, `SHA1`, `SHA256`, `SHA512`; `MD5Sum` exists for Debian compatibility and new behavior never relies on it alone. |
60
+ | `SHA1` | A `SHA1`-only record verifies: debkit filters nothing from txstore's comparison list; how algorithms combine → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.2/STORAGE.md#digests); requiring `SHA256` or `SHA512` → [ROADMAP.md](ROADMAP.md#ideas). |
61
+ | `ChecksumOpen`, `calc_digests`, `compare_digests`, `normalize_digests` | txstore; comparison semantics, including that MD5 alone never makes a match → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.2/STORAGE.md#digests). |
62
+ | Non-overlapping, unknown, or mismatched digests | `verify_checksum` returns `False`; what each path raises or logs → [Verification failures](#verification-failures). |
63
+ | Hash blocks | `parse_hash_block()` in `repo/hashes.py` splits a `Release` hash field, a `Checksums-<algorithm>` field, or a `Sources` `Files` field into `(digest, size, filename)` triples; a trailing partial run is dropped. |
64
+ | Index skip during sync | The target `Release` digest block is compared before the stored object metadata; which entries that settles → [VALIDATION.md](VALIDATION.md#index-selection). |
65
+
66
+ ## Verification order
67
+
68
+ `Repo.verify_checksum(filename, digests)` returns `True` at the first source that verifies:
69
+
70
+ 1. `Release`, `InRelease`, and `Release.gpg` are answered by the digests of the bytes the root
71
+ Release load fetched and verified, and by nothing else: no digest block lists them, a stanza
72
+ cannot vouch for them, and a file the load did not fetch fails; a failed `sync` transfer →
73
+ `ChecksumException` (Distrustful).
74
+ 2. A matching entry in any component package index, whatever the path's suffix, but only for a path
75
+ no `Release` digest block lists: each container keys by the `Filename` field it parsed, so a path
76
+ no index names misses and falls through.
77
+ 3. Any `Release` digest block, root or per-component: a disjunction over one iterator, so which
78
+ block answers is not observable.
79
+
80
+ Step 1 binds a `sync` copy of a root Release file to the bytes its signature and freshness checks
81
+ read; a source that serves other bytes for the copy fails the transfer → `ChecksumException`
82
+ (Distrustful).
83
+
84
+ A signed `Release` owns every key in its digest block, so step 2 is skipped for such a key and the
85
+ digest decides. A package index is remote metadata, and a stanza naming a listed index would
86
+ otherwise define that path's content in place of the GPG-rooted digest.
87
+
88
+ Steps 1 and 3 look the path up under its Release key, `RepoParams.release_key()`, whatever its
89
+ suffix: a Release-listed `.tar.gz` such as a dep11 icon tarball is an index, not a package →
90
+ [VALIDATION.md](VALIDATION.md#repository-index-paths).
91
+
92
+ Otherwise it returns `False`; callers differ → [Verification failures](#verification-failures).
93
+
94
+ ## Release freshness
95
+
96
+ Implemented by `RootRelease.check_fresh_against()` in `repo/release.py`; `sync` runs it before each
97
+ pass builds its transfer lists, when GPG verification is on and `--allow-release-rollback` is not
98
+ set. A signature proves who signed a Release, not that it is current, and the orphan pass purges
99
+ what an older Release no longer lists.
100
+
101
+ | Condition | Result |
102
+ | -- | -- |
103
+ | Source `Valid-Until` earlier than now | → `ReleaseFreshnessException` (Distrustful) |
104
+ | Source `Date` earlier than the loaded target `Date` | → `ReleaseFreshnessException` (Distrustful) |
105
+ | Source `Date` missing while the loaded target has a `Date` | → `ReleaseFreshnessException` (Distrustful) |
106
+ | Source `Date` or `Valid-Until` malformed → [VALIDATION.md](VALIDATION.md#release-dates) | → `ReleaseFreshnessException` (Distrustful) |
107
+ | Target trust | The operator owns the target, so its Release sets the floor unverified: whoever can write the target can roll it back directly, and `--allow-release-rollback` recovers from a bad floor. |
108
+ | Target compared | The target as read under txstore's `history_lock` → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.2/STORAGE.md#locking), so a peer commit that lands before the lock is granted is the floor; `--verify-existing` checks that same read |
109
+ | Target reset as corrupt | Its indices are ignored → [Verification failures](#verification-failures), but the `Date` its Release carried before the reset stays the floor |
110
+ | Later pass | The source is compared with the staged target and with the target as the run found it, so a staged target cannot lower the floor |
111
+ | Target loaded from `InRelease` | Its `Date` is read from the signed body → [GPG](#gpg), even though the target is not verified |
112
+ | Source `Valid-Until` missing, target not loaded, or target without `Date` | Not compared |
113
+ | Target `Date` malformed | Logged, not compared |
114
+ | `--allow-release-rollback` → [CONFIG.md](CONFIG.md#sync) | Checks skipped; a warning is logged once per run |
115
+
116
+ ## Verification failures
117
+
118
+ | Path | Failure |
119
+ | -- | -- |
120
+ | `sync` transfer digest mismatch | Target object deleted, then `ChecksumException` (Distrustful); the surrounding transaction discards every staged footmark → [STORAGE.md](STORAGE.md#transactions). |
121
+ | `check` payload digest mismatch | Logged and counted as an error; `--fix` deletes the object and counts it fixed unless another dist sharing the root may record its bytes → [VALIDATION.md](VALIDATION.md#index-selection). An unfixed error fails the check → [EXCEPTIONS.md](EXCEPTIONS.md#cli-exit-groups). |
122
+ | `sync --verify-existing` payload digest mismatch | Logged and, under the same shared-root rule, deleted inside the sync's transaction, so the sync copies it again. |
123
+ | `sync --verify-existing` kept payload | A corrupt payload the shared-root rule keeps is logged as not deleted; overwriting it follows the shared-root replace rule → [VALIDATION.md](VALIDATION.md#index-selection). |
124
+ | `insert` `.changes` file | A `.changes` file whose SHA256 differs from `--changes-sha256` → `ChecksumException` (Distrustful). |
125
+ | `insert --changes-filename` payload | Each transferred `.deb` is compared with its `Checksums-Sha256` entry unless digest verification is off, before the pool object rule → [VALIDATION.md](VALIDATION.md#filename-safety); a mismatch → `ChecksumException` (Distrustful). |
126
+ | `insert --changes-filename` payload mismatch | The transaction discards the staged transfer → [STORAGE.md](STORAGE.md#transactions). |
127
+ | `insert --deb-filename` payload | No manifest lists it, so it is never verified. |
128
+ | `insert` signed `.changes` | Parsed from its `cleartext_body`; its signature is not verified, so `--changes-sha256` is the only check on the file. |
129
+ | `insert` trust in the incoming storage | Trusted like `--deb-filename` input: whoever can write it can publish, since an unpinned `.changes` only shows the upload is consistent with itself. Pin `--changes-sha256` from a channel the uploader cannot write; uploader signatures → [ROADMAP.md](ROADMAP.md#ideas). |
130
+ | `insert` `.changes` with malformed armor | → `ChangesException` (Read). |
131
+ | Corrupted target indices during `sync` | Logged, target reset, sync proceeds and copies every selected index again → [VALIDATION.md](VALIDATION.md#index-selection); a reset target lists no package for `--verify-existing` to check. |
132
+ | GPG verification failure | `GPGVerifyException` (Read). |
133
+
134
+ ## Implementation rules
135
+
136
+ - Stream payloads; never load a package only to digest it → [STYLE.md](STYLE.md#performance).
137
+ - A verification failure stops the operation with a typed exception; never degrade to a warning.
138
+ - Use txstore's digest helpers for normalization and comparison and `repo/hashes.py` for hash-block
139
+ parsing; callers do not reimplement them.
140
+
141
+ ## Maintenance
142
+
143
+ Change verify, sign, or hash-block semantics here and in `repo/gnupg.py` or `repo/hashes.py`
144
+ together, with success and failure tests per [TESTING.md](TESTING.md#required-coverage). Digest
145
+ semantics change in txstore.
@@ -0,0 +1,78 @@
1
+ # Exception contract
2
+
3
+ Owns: domain exception classes, their owning modules, and the CLI exit groups, messages, and
4
+ statuses. Routing → [AGENTS.md](AGENTS.md#canonical-sources).
5
+
6
+ ## Rules
7
+
8
+ - Raise typed domain exceptions, never bare `Exception`.
9
+ - Define an exception in the module that owns the failure. A txstore class is imported from its
10
+ façade and grouped by `cli.py` like any domain class; its raising conditions are txstore's.
11
+ - Preserve the original cause with `raise ... from exc` when wrapping.
12
+ - Catch broad exceptions only at the CLI boundary; only `cli.py` groups exceptions, and it exits →
13
+ [STYLE.md](STYLE.md#layers).
14
+ - Contracts write failures as `condition → ExceptionClass (group)` using the groups below.
15
+
16
+ ## Domain exceptions
17
+
18
+ | Exception | Module | Meaning |
19
+ | -- | -- | -- |
20
+ | `ActionException` | `action/__init__.py` | Orchestration failure, including "no package matched" and unsupported history operations |
21
+ | `RepoReadException` | `repo/__init__.py` | Repository read or update failure |
22
+ | `RepoSyncException` | `repo/repo_sync.py` | Sync or mirror failure |
23
+ | `ReleaseReadException` | `repo/release.py` | Release parse or verify failure |
24
+ | `ReleaseNotFoundException` | `repo/release.py` | Neither a root `Release` nor an `InRelease` exists; subclass of `ReleaseReadException` |
25
+ | `ReleaseWriteException` | `repo/release.py` | Release signing failure, including an empty signature from GnuPG, or a root save with GPG verification on and no `GnuPG` |
26
+ | `ReleaseFreshnessException` | `repo/release.py` | Source Release expired, older than the target Release, missing its `Date`, or carrying a malformed date |
27
+ | `PackagesException` | `repo/packages.py` | Packages or Sources index parse or serialize failure, or a mutation of the read-only Sources index |
28
+ | `PackagesNotFoundException` | `repo/packages.py` | No index file the Release lists for an arch is in storage; subclass of `PackagesException` |
29
+ | `PackageException` | `repo/package.py` | Single package parse or serialize failure |
30
+ | `ComponentException` | `repo/component.py` | Component load failure, or an index slot refused for an invalid architecture |
31
+ | `ChangesException` | `repo/changes.py` | `.changes` parse or validation failure |
32
+ | `DebFileException` | `repo/debfile.py` | `.deb` inspection failure |
33
+ | `RepoParamsException` | `repo/params.py` | Invalid deb source or params |
34
+ | `GPGVerifyException` | `repo/gnupg.py` | GPG verification or keyring failure |
35
+ | `ChecksumException` | `repo/hashes.py` | Digest mismatch or distrustful object |
36
+ | `StorageException` | `txstore` | Backend failure; its remapping at construction → [STORAGE.md](STORAGE.md#construction) |
37
+ | `StorageNotFoundException` | `txstore` | Object missing on `get` / `get_stream`; subclass of `StorageException` |
38
+
39
+ ## CLI exit groups
40
+
41
+ `cli.py` logs the original exception, prints the group's exit message, and exits 1. The caught lists
42
+ are enumerations and mirror the `except` tuples in `cli.py` exactly.
43
+
44
+ | Group | Caught exceptions | Exit message | Extra warning |
45
+ | -- | -- | -- | -- |
46
+ | Read | `RepoReadException`, `GPGVerifyException`, `ComponentException`, `ChangesException`, `DebFileException`, `PackageException`, `PackagesException`, `ReleaseReadException` | `Can't read repository.` | none |
47
+ | Distrustful | `ChecksumException`, `ReleaseFreshnessException` | `Distrustful object.` | none |
48
+ | Write | `ReleaseWriteException` | `Can't write repository.` | `Some data may have been left unfinished.` |
49
+ | Sync | `RepoSyncException` | `Sync failed.` | `Some data may have remained incomplete.` |
50
+ | Generic | `ActionException`, `RepoParamsException`, `StorageException` | original message | none |
51
+
52
+ Exits outside the groups:
53
+
54
+ | Condition | Exit |
55
+ | -- | -- |
56
+ | Argparse usage error, including `ArgumentTypeError` from a type converter, an invalid `DEBKIT_*` value, or a missing required option | Usage text, status 2 (group Usage) |
57
+ | `check` finds an inconsistent repository | `Repository is not consistent.`, status 1 |
58
+ | `NotImplementedError` from a capability stub | Uncaught → [ROADMAP.md](ROADMAP.md#known-deviations) |
59
+ | A builtin `ValueError` or other programming error | Uncaught: a traceback, never an input-error message |
60
+
61
+ ## Orchestration vs repo semantics
62
+
63
+ | Condition | Result |
64
+ | -- | -- |
65
+ | `remove` matches no package | `RepoRW.remove_pkg` returns `False` → `ActionException` (Generic). |
66
+ | `insert` target without a root `Release` or `InRelease` | `ReleaseNotFoundException` only: a new repository is set up; any other `ReleaseReadException` (Read) stops the run, so an existing repository is never set up again. |
67
+ | `sync` or `check` target without a root `Release` or `InRelease` | `ReleaseNotFoundException` only: `sync` treats the target as empty, `check` reports it inconsistent; any other `ReleaseReadException` (Read) stops the run. |
68
+ | Release save that cannot be signed → [CRYPTO.md](CRYPTO.md#gpg) | `ReleaseWriteException` (Write). |
69
+ | Release file cannot be put | `StorageException` (Generic). |
70
+ | `log` / `revert` / `prune` failures | → [STORAGE.md](STORAGE.md#history-commands) |
71
+ | A storage URL txstore refuses | → [VALIDATION.md](VALIDATION.md#storage-urls) |
72
+
73
+ ## Maintenance
74
+
75
+ Add the class in the owning module and its row here, and adjust the catch tuple in `cli.py` when
76
+ exit behavior changes; `tests/test_cli_main.py` asserts every group message →
77
+ [TESTING.md](TESTING.md#required-coverage). `scripts/check_docs.py` verifies both tables against the
78
+ code; raise and test coverage per class → [TESTING.md](TESTING.md#required-coverage).
debkit-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Václav Vinklát
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.