debkit 0.1.0__tar.gz → 0.1.2__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.
- debkit-0.1.2/.github/build-constraints.txt +25 -0
- {debkit-0.1.0 → debkit-0.1.2}/.gitignore +7 -0
- debkit-0.1.2/.mdformat.toml +6 -0
- {debkit-0.1.0 → debkit-0.1.2}/AGENTS.md +7 -8
- debkit-0.1.2/CHANGELOG.md +69 -0
- {debkit-0.1.0 → debkit-0.1.2}/CONFIG.md +3 -2
- {debkit-0.1.0 → debkit-0.1.2}/CRYPTO.md +5 -5
- {debkit-0.1.0 → debkit-0.1.2}/EXCEPTIONS.md +1 -1
- debkit-0.1.2/Makefile +60 -0
- {debkit-0.1.0 → debkit-0.1.2}/PKG-INFO +14 -12
- {debkit-0.1.0 → debkit-0.1.2}/README.md +11 -9
- debkit-0.1.2/ROADMAP.md +74 -0
- debkit-0.1.2/SETUP.md +166 -0
- {debkit-0.1.0 → debkit-0.1.2}/STORAGE.md +3 -3
- {debkit-0.1.0 → debkit-0.1.2}/STRUCTURE.md +6 -4
- {debkit-0.1.0 → debkit-0.1.2}/STYLE.md +8 -2
- {debkit-0.1.0 → debkit-0.1.2}/TESTING.md +6 -4
- {debkit-0.1.0 → debkit-0.1.2}/VALIDATION.md +42 -14
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/README.md +1 -1
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/action_pkg_insert.md +26 -4
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/action_pkg_remove.md +9 -4
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/action_sync.md +22 -7
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-pkg-insert-activity.puml +10 -2
- debkit-0.1.2/docs/development/diagrams/action-pkg-insert-activity.svg +2 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-pkg-insert-sequence.puml +9 -2
- debkit-0.1.2/docs/development/diagrams/action-pkg-insert-sequence.svg +2 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/repo-sync-indices-activity.puml +8 -2
- debkit-0.1.2/docs/development/diagrams/repo-sync-indices-activity.svg +2 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/repo-sync-indices-sequence.puml +10 -3
- debkit-0.1.2/docs/development/diagrams/repo-sync-indices-sequence.svg +2 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/repo_sync_indices.md +39 -10
- {debkit-0.1.0 → debkit-0.1.2}/docs/guides/README.md +5 -3
- {debkit-0.1.0 → debkit-0.1.2}/docs/guides/examples.md +24 -8
- {debkit-0.1.0 → debkit-0.1.2}/pyproject.toml +8 -3
- {debkit-0.1.0 → debkit-0.1.2}/scripts/check_docs.py +98 -47
- {debkit-0.1.0 → debkit-0.1.2}/scripts/render_diagrams.py +3 -3
- debkit-0.1.2/src/debkit/_escape.py +45 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/action/action_pkg.py +21 -14
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/__init__.py +135 -51
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/compress.py +7 -26
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/debfile.py +25 -5
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/hashes.py +62 -5
- debkit-0.1.2/src/debkit/repo/index_selection.py +410 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/packages.py +18 -18
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/params.py +8 -2
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/release.py +60 -25
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/repo_rw.py +24 -19
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/repo_sync.py +12 -3
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/shared_root.py +22 -30
- {debkit-0.1.0 → debkit-0.1.2}/tests/conftest.py +21 -1
- {debkit-0.1.0 → debkit-0.1.2}/tests/helpers/factories.py +30 -8
- {debkit-0.1.0 → debkit-0.1.2}/tests/helpers/trees.py +5 -2
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_action.py +24 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_action_pkg.py +165 -1
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_action_sync.py +348 -19
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_check_docs.py +140 -3
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_cli_main.py +3 -1
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_compress.py +18 -38
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_debfile.py +27 -3
- debkit-0.1.2/tests/test_escape.py +21 -0
- debkit-0.1.2/tests/test_hashes.py +149 -0
- debkit-0.1.2/tests/test_index_selection.py +657 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_package.py +12 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_packages.py +25 -9
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_release.py +116 -30
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_repo.py +375 -1
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_repo_rw.py +172 -43
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_repo_sync.py +59 -5
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_sources.py +2 -0
- {debkit-0.1.0 → debkit-0.1.2}/uv.lock +106 -5
- debkit-0.1.0/ROADMAP.md +0 -53
- debkit-0.1.0/SETUP.md +0 -154
- debkit-0.1.0/docs/development/diagrams/action-pkg-insert-activity.svg +0 -2
- debkit-0.1.0/docs/development/diagrams/action-pkg-insert-sequence.svg +0 -2
- debkit-0.1.0/docs/development/diagrams/repo-sync-indices-activity.svg +0 -2
- debkit-0.1.0/docs/development/diagrams/repo-sync-indices-sequence.svg +0 -2
- debkit-0.1.0/src/debkit/_escape.py +0 -25
- debkit-0.1.0/src/debkit/repo/index_selection.py +0 -224
- debkit-0.1.0/tests/test_hashes.py +0 -75
- debkit-0.1.0/tests/test_index_selection.py +0 -292
- {debkit-0.1.0 → debkit-0.1.2}/CLAUDE.md +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/LICENSE +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-pkg-remove-activity.puml +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-pkg-remove-activity.svg +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-pkg-remove-sequence.puml +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-pkg-remove-sequence.svg +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-sync-activity.puml +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-sync-activity.svg +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-sync-sequence.puml +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/docs/development/diagrams/action-sync-sequence.svg +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/__init__.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/__main__.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/_env.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/_logging.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/_options.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/action/__init__.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/action/action_history.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/action/action_sync.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/argparser.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/argtypes.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/cli.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/changes.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/component.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/gnupg.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/package.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/repo_diff.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/sources.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/src/debkit/repo/stanza.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/helpers/__init__.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/helpers/binaries.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/helpers/gpg.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/helpers/storage.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_action_history.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_argparser.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_argtypes.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_changes.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_component.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_env.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_gnupg.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_gnupg_real.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_logging.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_params.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_render_diagrams.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_repo_diff.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_repo_package.py +0 -0
- {debkit-0.1.0 → debkit-0.1.2}/tests/test_stanza.py +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Build backend for release artifacts; refresh with:
|
|
2
|
+
# echo 'hatchling>=1.27' | uv pip compile - --generate-hashes --python-version 3.13 --no-header
|
|
3
|
+
hatchling==1.32.4 \
|
|
4
|
+
--hash=sha256:08ecf7548fb48205e7f213d70c71e67b8271b7242093dc3f1da578b42c734a2c \
|
|
5
|
+
--hash=sha256:c4468f73144c054d2aab4ef0f0378c43b9878bf07f8ffd6b79690e970d375f07
|
|
6
|
+
packaging==26.3 \
|
|
7
|
+
--hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \
|
|
8
|
+
--hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
|
|
9
|
+
# via hatchling
|
|
10
|
+
pathspec==1.1.1 \
|
|
11
|
+
--hash=sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a \
|
|
12
|
+
--hash=sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189
|
|
13
|
+
# via hatchling
|
|
14
|
+
pluggy==1.7.0 \
|
|
15
|
+
--hash=sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec \
|
|
16
|
+
--hash=sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8
|
|
17
|
+
# via hatchling
|
|
18
|
+
tomlkit==0.15.2 \
|
|
19
|
+
--hash=sha256:05562412163a3037b94497385fb7f9204c637bc605af7a48199e41cf2272f437 \
|
|
20
|
+
--hash=sha256:83e32755ba1d20d9340bd069ee97e9f6232ba2346b63ffcba425de01f7e327a6
|
|
21
|
+
# via hatchling
|
|
22
|
+
trove-classifiers==2026.9.21.13 \
|
|
23
|
+
--hash=sha256:0a9ebc8d4e2f3e8a22848c5258033035bec17a3012ac3fea16dbaa764489eb71 \
|
|
24
|
+
--hash=sha256:8b1ff4f9c191b1040b71c37f1e445ab99732911e3cd91de52838453a854d7a17
|
|
25
|
+
# via hatchling
|
|
@@ -10,6 +10,13 @@ htmlcov/
|
|
|
10
10
|
.pytest_cache/
|
|
11
11
|
.mypy_cache/
|
|
12
12
|
.ruff_cache/
|
|
13
|
+
# Secrets and key material: kept out of commits, the sdist, and untracked files in make debian-test.
|
|
13
14
|
.env
|
|
15
|
+
.env.*
|
|
16
|
+
*.pem
|
|
17
|
+
*.key
|
|
18
|
+
*.asc
|
|
19
|
+
*.gpg
|
|
20
|
+
*.p12
|
|
14
21
|
# Default GnuPG home of a local debkit run → CONFIG.md
|
|
15
22
|
.gnupg/
|
|
@@ -8,7 +8,8 @@ fact; link instead of copying.
|
|
|
8
8
|
1. The root contract that owns the domain below; `STYLE.md` prevails on style.
|
|
9
9
|
2. Implementation under `src/debkit/` when checking current behavior.
|
|
10
10
|
3. `docs/guides/` for user how-tos, `docs/development/` for contributor explanations and diagrams,
|
|
11
|
-
|
|
11
|
+
`ROADMAP.md` for planned work and known deviations, and `CHANGELOG.md` for released changes and
|
|
12
|
+
upgrade notes. All are non-canonical.
|
|
12
13
|
|
|
13
14
|
Storage behavior (backends, transactions, footmarks, history, S3 ACLs, digests) is owned by the
|
|
14
15
|
[txstore](https://github.com/vinklat/txstore) contracts; debkit's contracts own only how debkit uses
|
|
@@ -27,7 +28,7 @@ second definition.
|
|
|
27
28
|
| `CONFIG.md` | CLI flags, `DEBKIT_*` variables, resolution order, defaults, secrets |
|
|
28
29
|
| `CRYPTO.md` | GPG verify and sign, Debian hash blocks, verification order, Release freshness |
|
|
29
30
|
| `TESTING.md` | Required coverage, harness rules, gates |
|
|
30
|
-
| `SETUP.md` | Install, run, test, quality gates, diagrams, dependency policy, release
|
|
31
|
+
| `SETUP.md` | Install, run, test, quality gates, diagrams, dependency policy, release |
|
|
31
32
|
|
|
32
33
|
## Task routing
|
|
33
34
|
|
|
@@ -43,12 +44,12 @@ Read only the relevant sections; locate code from [STRUCTURE.md](STRUCTURE.md#la
|
|
|
43
44
|
| Action / subcommand | `STYLE.md` layers + `CONFIG.md` | `EXCEPTIONS.md`, `STORAGE.md`, `TESTING.md` |
|
|
44
45
|
| GPG / checksum / freshness | `CRYPTO.md` | `EXCEPTIONS.md` Distrustful group, `VALIDATION.md` |
|
|
45
46
|
| 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
|
+
| Dependency change | `SETUP.md` dependency policy | `STRUCTURE.md` dependencies, `tests/test_package.py`, `.github/debian-test.sh`, `Makefile` `DEBIAN_IMAGE` |
|
|
47
48
|
| Bug fix | Owning contract + `EXCEPTIONS.md` | `TESTING.md` |
|
|
48
49
|
| Tests | `TESTING.md` | Contract for the behavior under test |
|
|
49
50
|
| 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`
|
|
51
|
-
| Quality gate / CI change | `SETUP.md` quality gates | `.github/workflows/ci.yml` |
|
|
51
|
+
| Release | `SETUP.md` release | `.github/workflows/release.yml`, `CHANGELOG.md`, `ROADMAP.md` releases |
|
|
52
|
+
| Quality gate / CI change | `SETUP.md` quality gates | `Makefile`, `.github/workflows/ci.yml` |
|
|
52
53
|
| Developer explanation / diagram | `docs/development/` | Owning root contract, `SETUP.md` diagrams |
|
|
53
54
|
| User how-to / future behavior | `docs/guides/` / `ROADMAP.md` | Owning root contract before implementing |
|
|
54
55
|
|
|
@@ -62,8 +63,7 @@ Read only the relevant sections; locate code from [STRUCTURE.md](STRUCTURE.md#la
|
|
|
62
63
|
[STRUCTURE.md](STRUCTURE.md#maintenance); a storage need txstore's public names do not meet is a
|
|
63
64
|
txstore change, never a private import.
|
|
64
65
|
3. Add the narrowest test that falsifies the change per [TESTING.md](TESTING.md#maintenance).
|
|
65
|
-
4. Run
|
|
66
|
-
`uv run python scripts/check_docs.py`. CI runs the gates again.
|
|
66
|
+
4. Run `make fmt`, then `make check` → [SETUP.md](SETUP.md#quality-gates); CI runs the gates again.
|
|
67
67
|
|
|
68
68
|
## Contract writing rules
|
|
69
69
|
|
|
@@ -79,4 +79,3 @@ Read only the relevant sections; locate code from [STRUCTURE.md](STRUCTURE.md#la
|
|
|
79
79
|
- No TODOs or "current exception" notes in contracts; record them in
|
|
80
80
|
[ROADMAP.md known deviations](ROADMAP.md#known-deviations) and link.
|
|
81
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`.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Released changes and their upgrade notes. Planned work → [ROADMAP.md](ROADMAP.md); entry format and
|
|
4
|
+
release steps → [SETUP.md](SETUP.md#release).
|
|
5
|
+
|
|
6
|
+
## Unreleased
|
|
7
|
+
|
|
8
|
+
## 0.1.2 - 2026-12-05
|
|
9
|
+
|
|
10
|
+
S3 CA bundle trust on txstore 0.1.4, nested component selection, and Release-listed per-arch indices
|
|
11
|
+
only. Release → [v0.1.2](https://github.com/vinklat/debkit/releases/tag/v0.1.2).
|
|
12
|
+
|
|
13
|
+
| Change | Migration |
|
|
14
|
+
| -- | -- |
|
|
15
|
+
| txstore | Requires txstore 0.1.4 or later → [Dependency policy](SETUP.md#dependency-policy). |
|
|
16
|
+
| S3 CA bundle | With TLS verification on, S3 now follows boto3's CA bundle lookup instead of always certifi → [txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.4/CONFIG.md#tls-trust). |
|
|
17
|
+
| S3 CA settings for other tools | With TLS verification on, check the CA bundle settings you set for other tools → [txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.4/CONFIG.md#tls-trust). |
|
|
18
|
+
| S3 CA bundle path | A path that does not resolve now fails the S3 connection, at construction for a target debkit creates → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#construction). |
|
|
19
|
+
| S3 private CA | A private-CA endpoint no longer needs `--skip-verify-ssl` → [txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.4/CONFIG.md#tls-trust). |
|
|
20
|
+
| S3 AWS environment | An unknown AWS profile or, with verification on, an empty CA bundle setting now fails S3 construction → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#construction); which group each URL ends in → [STORAGE.md](STORAGE.md#construction). |
|
|
21
|
+
| HTTP CA bundle | A CA bundle path that does not resolve is now a `StorageException` from the HTTPS request instead of a raw `OSError` → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#construction). |
|
|
22
|
+
| HTTP CA bundle failures | An HTTP CA bundle path that does not resolve → `RepoReadException`, `ChangesException`, or `DebFileException` (Read) → [EXCEPTIONS.md](EXCEPTIONS.md#cli-exit-groups). |
|
|
23
|
+
| Unlisted per-arch Release | A per-arch `Release` the root Release does not list is now absent, never probed or read, even with `--skip-verify`, so a command that loads the repository, both ends of `sync` included, no longer stops on it → [VALIDATION.md](VALIDATION.md#index-loading). |
|
|
24
|
+
| Unlisted per-arch Release failures | The load no longer fails on one with `ChecksumException` (Distrustful), or with `ReleaseReadException` (Read) past the size cap → [VALIDATION.md](VALIDATION.md#index-loading). |
|
|
25
|
+
| Unlisted per-arch Release under `--skip-verify` | The load no longer fails on one with `ReleaseReadException` (Read) when it did not parse, or with `ComponentException` (Read) when it named no or another architecture → [VALIDATION.md](VALIDATION.md#architectures). |
|
|
26
|
+
| Unlisted per-arch Release storage | Storage is no longer probed or read for one, so a backend failure there no longer stops `insert`, `remove`, or `check --fix` with `ComponentException` (Read) → [VALIDATION.md](VALIDATION.md#index-loading). |
|
|
27
|
+
| Unlisted per-arch Release in a mirror | `sync` no longer copies one, so one an earlier `sync --skip-verify` mirrored is purged from a listable target; `check` reports one as an orphan and `check --fix` deletes it → [VALIDATION.md](VALIDATION.md#index-loading). |
|
|
28
|
+
| Nested components | A sync selecting `main`, by its source string or by `Components`, no longer mirrors the indices of a component its source Release lists below it, such as `main/debug`, unless the selection names that component too → [VALIDATION.md](VALIDATION.md#index-selection). |
|
|
29
|
+
| Nested components in a mirror | An existing target purges those indices on its next sync; `check` reports them as orphans, and `check --fix` deletes them → [VALIDATION.md](VALIDATION.md#index-selection). |
|
|
30
|
+
| Deep components | A `Components` token past the component depth cap is now dropped and logged → [VALIDATION.md](VALIDATION.md#index-selection). |
|
|
31
|
+
| Release log line | A Release load now logs its identifying, date, and selection fields, each quoted and cut at 80 characters, instead of every field, so `Description`, `Changelogs`, `Acquire-By-Hash`, and other fields debkit does not read are no longer logged → [STYLE.md](STYLE.md#logging). |
|
|
32
|
+
| Index directory components | A `Components` token with a `/` ending in an index directory, such as `main/source` or `main/binary-amd64`, is now dropped and logged rather than loaded as a component → [VALIDATION.md](VALIDATION.md#index-selection). |
|
|
33
|
+
| Index directory components failures | A load that reads its components from the Release no longer fails on such a token with `ComponentException` (Read) → [VALIDATION.md](VALIDATION.md#index-selection). |
|
|
34
|
+
|
|
35
|
+
## 0.1.1 - 2026-11-22
|
|
36
|
+
|
|
37
|
+
Size-capped storage reads on txstore 0.1.3. Release →
|
|
38
|
+
[v0.1.1](https://github.com/vinklat/debkit/releases/tag/v0.1.1).
|
|
39
|
+
|
|
40
|
+
| Change | Migration |
|
|
41
|
+
| -- | -- |
|
|
42
|
+
| txstore | Requires txstore 0.1.3 or later → [Dependency policy](SETUP.md#dependency-policy). |
|
|
43
|
+
| Unsupported operation | An operation the backend lacks is now a `StorageNotSupportedException` instead of a bare `NotImplementedError`, handled like any storage failure → [EXCEPTIONS.md](EXCEPTIONS.md#domain-exceptions). |
|
|
44
|
+
| Oversized objects | A checked copy longer than its recorded `Size` stops → `ChecksumException` (Distrustful); when a cap applies → [VALIDATION.md](VALIDATION.md#object-sizes). |
|
|
45
|
+
| Stream read failures | A backend error while an S3 or HTTP body is read is now a `StorageException` instead of escaping unwrapped → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#storage-abi). |
|
|
46
|
+
| Stream read failures in a sync copy | A failed copy is retried, then → `RepoSyncException` (Sync) → [EXCEPTIONS.md](EXCEPTIONS.md#cli-exit-groups). |
|
|
47
|
+
| Read metrics | A read refused at its cap counts one read error and no read bytes in the `-o json` metrics → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#storage-abi). |
|
|
48
|
+
|
|
49
|
+
## 0.1.0 - 2026-11-12
|
|
50
|
+
|
|
51
|
+
Initial public release, on the public txstore storage package: insert, remove, inspect, sync, and
|
|
52
|
+
check Debian repositories on fs, S3, and HTTP, with transactional writes and history. Release →
|
|
53
|
+
[v0.1.0](https://github.com/vinklat/debkit/releases/tag/v0.1.0).
|
|
54
|
+
|
|
55
|
+
| Change | Migration |
|
|
56
|
+
| -- | -- |
|
|
57
|
+
| Variables | Every variable gains the `DEBKIT_` prefix: `TARGET_URL` → `DEBKIT_TARGET_URL`, `S3_SECRET` → `DEBKIT_S3_SECRET`, and so on → [CONFIG.md](CONFIG.md). |
|
|
58
|
+
| Switches | `--skip-verify 1` → `--skip-verify`; `--skip-verify-gpg false` → omit it or pass `--no-skip-verify-gpg`. The same holds for `--skip-verify-ssl` and `--allow-release-rollback`. |
|
|
59
|
+
| Logging | `-l` gains `DEBKIT_LOG_LEVEL` and drops `TRACING`; `--log-format json` is new. |
|
|
60
|
+
| Filesystem URLs | `fs://` takes an absolute path only: `fs://debian` → `debian` or `fs:///abs/debian` → [VALIDATION.md](VALIDATION.md#storage-urls). |
|
|
61
|
+
| S3 bucket ACL | A created bucket no longer inherits `--s3-default-acl`; pass `--s3-bucket-acl` to set one. |
|
|
62
|
+
| S3 credentials | Unset S3 credentials fall back to `TXSTORE_S3_ACCESS` / `TXSTORE_S3_SECRET`. |
|
|
63
|
+
| `--history-max-age` | Now has an upper bound → [VALIDATION.md](VALIDATION.md#history-retention). |
|
|
64
|
+
| Help | `--help` no longer prints secret values taken from the environment. |
|
|
65
|
+
| Secret flags | `-t`/`--s3-secret` and `--gnupg-passphrase` are gone: set `DEBKIT_S3_SECRET` and `DEBKIT_GNUPG_PASSPHRASE` instead → [CONFIG.md](CONFIG.md#secrets). |
|
|
66
|
+
| Pool layout | An inserted `.deb` lands in Debian's source pool layout under its source package name, not its upload path's first letter and `Package` name → [VALIDATION.md](VALIDATION.md#filename-safety). Old pool keys stay valid; re-inserting an existing version adds a second stanza under its new key. |
|
|
67
|
+
| GnuPG home | `--gnupg-home` defaults to `~/.gnupg`, not `.gnupg` under the working directory, so a checkout cannot plant the trusted keyring → [CONFIG.md](CONFIG.md#global-flags). Keep a per-directory home with `DEBKIT_GNUPG_HOME=$PWD/.gnupg`. |
|
|
68
|
+
| Trusted keys | Verification reads no `gpg.conf`, so its `keyring` lines and key retrieval or import no longer authenticate a signer: import the keys into the trusted keyring → [CRYPTO.md](CRYPTO.md#gpg). GnuPG has a minimum version → [Prerequisites](SETUP.md#prerequisites-and-install). |
|
|
69
|
+
| Signing without a passphrase | Fixed: with no `DEBKIT_GNUPG_PASSPHRASE`, gpg read the first line of the Release as the passphrase, so `Release.gpg` and `InRelease` signed the Release without it. Re-sign such a repository with any `insert` or `remove`. |
|
|
@@ -19,6 +19,7 @@ in `argparser.py`, subcommand flags in the owning `Action*` module.
|
|
|
19
19
|
| Lazy read | A variable is read only when its flag is absent, after argparse parses the command line. |
|
|
20
20
|
| Reader | Only `src/debkit/_env.py` reads the environment. |
|
|
21
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
|
+
| TLS trust | debkit adds no CA setting: with verification on, each backend keeps its library's CA lookup → [txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.4/CONFIG.md#tls-trust). |
|
|
22
23
|
|
|
23
24
|
## Global flags
|
|
24
25
|
|
|
@@ -151,10 +152,10 @@ Uses `--target-url`, whose dist and component fields are optional and ignored; a
|
|
|
151
152
|
secret, but is never logged next to the secret.
|
|
152
153
|
- Userinfo and query of a repository or storage URL are secrets: debkit logs and raises a URL only
|
|
153
154
|
through txstore's `redact_url` →
|
|
154
|
-
[txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.
|
|
155
|
+
[txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.4/CONFIG.md#secrets).
|
|
155
156
|
- A credentialed URL goes in its variable (`DEBKIT_TARGET_URL`, `DEBKIT_SOURCE_URL`,
|
|
156
157
|
`DEBKIT_INCOMING_URL`) or, for `http(s)://`, in `~/.netrc` →
|
|
157
|
-
[txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.
|
|
158
|
+
[txstore CONFIG.md](https://github.com/vinklat/txstore/blob/v0.1.4/CONFIG.md#secrets); the
|
|
158
159
|
`--*-url` flags take the same value but expose it on the command line like any flag.
|
|
159
160
|
|
|
160
161
|
## Maintenance
|
|
@@ -51,14 +51,14 @@ Implemented by `GnuPG`, `cleartext_body`, and `canonical_text` in `repo/gnupg.py
|
|
|
51
51
|
## Checksums
|
|
52
52
|
|
|
53
53
|
Digest helpers and the algorithm-name lists are txstore's →
|
|
54
|
-
[txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.
|
|
54
|
+
[txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#digests); the Debian
|
|
55
55
|
hash-block layer over them is `repo/hashes.py`.
|
|
56
56
|
|
|
57
57
|
| Item | Rule |
|
|
58
58
|
| -- | -- |
|
|
59
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.
|
|
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.
|
|
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.4/STORAGE.md#digests); requiring `SHA256` or `SHA512` → [ROADMAP.md](ROADMAP.md#features). |
|
|
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.4/STORAGE.md#digests). |
|
|
62
62
|
| Non-overlapping, unknown, or mismatched digests | `verify_checksum` returns `False`; what each path raises or logs → [Verification failures](#verification-failures). |
|
|
63
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
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). |
|
|
@@ -105,7 +105,7 @@ what an older Release no longer lists.
|
|
|
105
105
|
| Source `Date` missing while the loaded target has a `Date` | → `ReleaseFreshnessException` (Distrustful) |
|
|
106
106
|
| Source `Date` or `Valid-Until` malformed → [VALIDATION.md](VALIDATION.md#release-dates) | → `ReleaseFreshnessException` (Distrustful) |
|
|
107
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.
|
|
108
|
+
| Target compared | The target as read under txstore's `history_lock` → [txstore STORAGE.md](https://github.com/vinklat/txstore/blob/v0.1.4/STORAGE.md#locking), so a peer commit that lands before the lock is granted is the floor; `--verify-existing` checks that same read |
|
|
109
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
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
111
|
| Target loaded from `InRelease` | Its `Date` is read from the signed body → [GPG](#gpg), even though the target is not verified |
|
|
@@ -126,7 +126,7 @@ what an older Release no longer lists.
|
|
|
126
126
|
| `insert --changes-filename` payload mismatch | The transaction discards the staged transfer → [STORAGE.md](STORAGE.md#transactions). |
|
|
127
127
|
| `insert --deb-filename` payload | No manifest lists it, so it is never verified. |
|
|
128
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#
|
|
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#features). |
|
|
130
130
|
| `insert` `.changes` with malformed armor | → `ChangesException` (Read). |
|
|
131
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
132
|
| GPG verification failure | `GPGVerifyException` (Read). |
|
|
@@ -35,6 +35,7 @@ statuses. Routing → [AGENTS.md](AGENTS.md#canonical-sources).
|
|
|
35
35
|
| `ChecksumException` | `repo/hashes.py` | Digest mismatch or distrustful object |
|
|
36
36
|
| `StorageException` | `txstore` | Backend failure; its remapping at construction → [STORAGE.md](STORAGE.md#construction) |
|
|
37
37
|
| `StorageNotFoundException` | `txstore` | Object missing on `get` / `get_stream`; subclass of `StorageException` |
|
|
38
|
+
| `StorageNotSupportedException` | `txstore` | Operation a read-only, write-only, or non-transactional backend lacks; subclass of `StorageException` and `NotImplementedError` |
|
|
38
39
|
|
|
39
40
|
## CLI exit groups
|
|
40
41
|
|
|
@@ -55,7 +56,6 @@ Exits outside the groups:
|
|
|
55
56
|
| -- | -- |
|
|
56
57
|
| 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
58
|
| `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
59
|
| A builtin `ValueError` or other programming error | Uncaught: a traceback, never an input-error message |
|
|
60
60
|
|
|
61
61
|
## Orchestration vs repo semantics
|
debkit-0.1.2/Makefile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Developer commands and quality gates → SETUP.md#quality-gates.
|
|
2
|
+
|
|
3
|
+
RUN := uv run --locked
|
|
4
|
+
# Markdown that fmt and lint format.
|
|
5
|
+
MD_PATHS := *.md docs
|
|
6
|
+
# Debian testing until forky releases; then the next testing suite → SETUP.md#dependency-policy.
|
|
7
|
+
DEBIAN_IMAGE := debian:forky
|
|
8
|
+
|
|
9
|
+
.DEFAULT_GOAL := help
|
|
10
|
+
|
|
11
|
+
.PHONY: help install fmt lint test docs-check diagrams diagrams-check build static check \
|
|
12
|
+
debian-test
|
|
13
|
+
|
|
14
|
+
help: ## List targets
|
|
15
|
+
@grep -E '^[a-z][a-z0-9_-]*:.*## ' $(MAKEFILE_LIST) \
|
|
16
|
+
| awk -F':.*## ' '{printf " %-15s %s\n", $$1, $$2}'
|
|
17
|
+
|
|
18
|
+
install: ## Sync the virtualenv from uv.lock
|
|
19
|
+
uv sync --locked
|
|
20
|
+
|
|
21
|
+
# Lint fixes first: they can leave code the formatter changes.
|
|
22
|
+
fmt: ## Format Python and Markdown, auto-fix lint
|
|
23
|
+
$(RUN) ruff check --fix .
|
|
24
|
+
$(RUN) ruff format .
|
|
25
|
+
$(RUN) mdformat $(MD_PATHS)
|
|
26
|
+
|
|
27
|
+
lint: ## Format check (Python, Markdown), lint, strict type check
|
|
28
|
+
$(RUN) ruff format --check .
|
|
29
|
+
$(RUN) mdformat --check $(MD_PATHS)
|
|
30
|
+
$(RUN) ruff check .
|
|
31
|
+
$(RUN) mypy
|
|
32
|
+
|
|
33
|
+
test: ## Tests with the coverage gate
|
|
34
|
+
$(RUN) pytest --cov
|
|
35
|
+
|
|
36
|
+
docs-check: ## Contract and docs parity
|
|
37
|
+
$(RUN) python scripts/check_docs.py
|
|
38
|
+
|
|
39
|
+
diagrams: ## Render stale PlantUML diagrams (needs Docker)
|
|
40
|
+
$(RUN) python scripts/render_diagrams.py
|
|
41
|
+
|
|
42
|
+
diagrams-check: ## Check diagram SVGs are fresh (offline)
|
|
43
|
+
$(RUN) python scripts/render_diagrams.py --check
|
|
44
|
+
|
|
45
|
+
# → SETUP.md#release
|
|
46
|
+
build: ## Build the sdist and wheel into dist/
|
|
47
|
+
uv build --build-constraints .github/build-constraints.txt --require-hashes
|
|
48
|
+
|
|
49
|
+
static: lint docs-check diagrams-check build ## Every local gate except tests
|
|
50
|
+
|
|
51
|
+
check: static test ## Every local gate; CI also runs debian-test
|
|
52
|
+
|
|
53
|
+
# → SETUP.md#dependency-policy. COPYFILE_DISABLE keeps macOS tar from adding AppleDouble ._* files;
|
|
54
|
+
# GNU tar ignores it. -e CI passes CI through when set, so CI-only test rules hold → TESTING.md.
|
|
55
|
+
# pipefail fails the run when tar cannot read a listed file; make 3.81 has no .SHELLFLAGS.
|
|
56
|
+
debian-test: SHELL := /bin/bash -o pipefail
|
|
57
|
+
debian-test: ## The suite on Debian's packaged dependencies (needs git, bash, Docker)
|
|
58
|
+
git ls-files -z --cached --others --exclude-standard | COPYFILE_DISABLE=1 tar -c --null -T - \
|
|
59
|
+
| docker run --rm -i -e CI $(DEBIAN_IMAGE) \
|
|
60
|
+
sh -c 'mkdir /src && cd /src && tar -x && sh .github/debian-test.sh'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: debkit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Build, mirror, and verify Debian package repositories on filesystem, S3, and HTTP storage.
|
|
5
5
|
Project-URL: Homepage, https://github.com/vinklat/debkit
|
|
6
6
|
Project-URL: Source, https://github.com/vinklat/debkit
|
|
7
7
|
Project-URL: Issues, https://github.com/vinklat/debkit/issues
|
|
8
8
|
Project-URL: Documentation, https://github.com/vinklat/debkit/blob/main/docs/guides/README.md
|
|
9
|
-
Project-URL: Changelog, https://github.com/vinklat/debkit/blob/main/
|
|
9
|
+
Project-URL: Changelog, https://github.com/vinklat/debkit/blob/main/CHANGELOG.md
|
|
10
10
|
Author: Václav Vinklát
|
|
11
11
|
License-Expression: MIT
|
|
12
12
|
License-File: LICENSE
|
|
@@ -26,7 +26,7 @@ Requires-Python: >=3.13
|
|
|
26
26
|
Requires-Dist: humanize<5,>=4.14.0
|
|
27
27
|
Requires-Dist: python-debian<2,>=1.0.1
|
|
28
28
|
Requires-Dist: python-gnupg<0.6,>=0.5.5
|
|
29
|
-
Requires-Dist: txstore<0.2,>=0.1.
|
|
29
|
+
Requires-Dist: txstore<0.2,>=0.1.4
|
|
30
30
|
Requires-Dist: urllib3<3,>=2.7.0
|
|
31
31
|
Description-Content-Type: text/markdown
|
|
32
32
|
|
|
@@ -36,7 +36,8 @@ Command-line tool for building, inspecting, and mirroring Debian package reposit
|
|
|
36
36
|
filesystem, S3-compatible object storage, or HTTP(S) servers, with GPG-signed Release files,
|
|
37
37
|
streamed checksum verification, and transactional writes you can revert.
|
|
38
38
|
|
|
39
|
-
Current version: **0.1.
|
|
39
|
+
Current version: **0.1.2**. Changes → [CHANGELOG.md](https://github.com/vinklat/debkit/blob/v0.1.2/CHANGELOG.md); planned work →
|
|
40
|
+
[ROADMAP.md](https://github.com/vinklat/debkit/blob/v0.1.2/ROADMAP.md).
|
|
40
41
|
|
|
41
42
|
## Capabilities
|
|
42
43
|
|
|
@@ -58,8 +59,8 @@ Current version: **0.1.0**. Planned work → [ROADMAP.md](https://github.com/vin
|
|
|
58
59
|
### Installation
|
|
59
60
|
|
|
60
61
|
Released versions are published to [PyPI](https://pypi.org/project/debkit/). Prerequisites →
|
|
61
|
-
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
62
|
-
[Quick how-to](https://github.com/vinklat/debkit/blob/v0.1.
|
|
62
|
+
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.2/SETUP.md#prerequisites-and-install). Other examples →
|
|
63
|
+
[Quick how-to](https://github.com/vinklat/debkit/blob/v0.1.2/docs/guides/examples.md).
|
|
63
64
|
|
|
64
65
|
```bash
|
|
65
66
|
pip install debkit
|
|
@@ -122,17 +123,18 @@ debkit --target-url /srv/repo log
|
|
|
122
123
|
| Location | Audience | Authority |
|
|
123
124
|
| -- | -- | -- |
|
|
124
125
|
| `/` root contract documents | Developers and AI agents | Canonical |
|
|
125
|
-
| [docs/guides/](https://github.com/vinklat/debkit/blob/v0.1.
|
|
126
|
-
| [docs/development/](https://github.com/vinklat/debkit/blob/v0.1.
|
|
126
|
+
| [docs/guides/](https://github.com/vinklat/debkit/blob/v0.1.2/docs/guides/README.md) | Anyone operating the CLI | Non-canonical how-tos and examples |
|
|
127
|
+
| [docs/development/](https://github.com/vinklat/debkit/blob/v0.1.2/docs/development/README.md) | Developers and contributors | Non-canonical diagrams, code maps, explanations |
|
|
127
128
|
|
|
128
|
-
Domain owners and agent navigation → [AGENTS.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
129
|
+
Domain owners and agent navigation → [AGENTS.md](https://github.com/vinklat/debkit/blob/v0.1.2/AGENTS.md#canonical-sources).
|
|
129
130
|
|
|
130
131
|
## Technology
|
|
131
132
|
|
|
132
133
|
Python and [txstore](https://github.com/vinklat/txstore); runtime dependencies →
|
|
133
|
-
[STRUCTURE.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
134
|
-
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
134
|
+
[STRUCTURE.md](https://github.com/vinklat/debkit/blob/v0.1.2/STRUCTURE.md#dependencies); contributor toolchain →
|
|
135
|
+
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.2/SETUP.md#prerequisites-and-install); tests and quality gates →
|
|
136
|
+
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.2/SETUP.md#quality-gates); Ruff and mypy → [STYLE.md](https://github.com/vinklat/debkit/blob/v0.1.2/STYLE.md#python-baseline).
|
|
135
137
|
|
|
136
138
|
## License
|
|
137
139
|
|
|
138
|
-
MIT → [LICENSE](https://github.com/vinklat/debkit/blob/v0.1.
|
|
140
|
+
MIT → [LICENSE](https://github.com/vinklat/debkit/blob/v0.1.2/LICENSE).
|
|
@@ -4,7 +4,8 @@ Command-line tool for building, inspecting, and mirroring Debian package reposit
|
|
|
4
4
|
filesystem, S3-compatible object storage, or HTTP(S) servers, with GPG-signed Release files,
|
|
5
5
|
streamed checksum verification, and transactional writes you can revert.
|
|
6
6
|
|
|
7
|
-
Current version: **0.1.
|
|
7
|
+
Current version: **0.1.2**. Changes → [CHANGELOG.md](https://github.com/vinklat/debkit/blob/v0.1.2/CHANGELOG.md); planned work →
|
|
8
|
+
[ROADMAP.md](https://github.com/vinklat/debkit/blob/v0.1.2/ROADMAP.md).
|
|
8
9
|
|
|
9
10
|
## Capabilities
|
|
10
11
|
|
|
@@ -26,8 +27,8 @@ Current version: **0.1.0**. Planned work → [ROADMAP.md](https://github.com/vin
|
|
|
26
27
|
### Installation
|
|
27
28
|
|
|
28
29
|
Released versions are published to [PyPI](https://pypi.org/project/debkit/). Prerequisites →
|
|
29
|
-
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
30
|
-
[Quick how-to](https://github.com/vinklat/debkit/blob/v0.1.
|
|
30
|
+
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.2/SETUP.md#prerequisites-and-install). Other examples →
|
|
31
|
+
[Quick how-to](https://github.com/vinklat/debkit/blob/v0.1.2/docs/guides/examples.md).
|
|
31
32
|
|
|
32
33
|
```bash
|
|
33
34
|
pip install debkit
|
|
@@ -90,17 +91,18 @@ debkit --target-url /srv/repo log
|
|
|
90
91
|
| Location | Audience | Authority |
|
|
91
92
|
| -- | -- | -- |
|
|
92
93
|
| `/` root contract documents | Developers and AI agents | Canonical |
|
|
93
|
-
| [docs/guides/](https://github.com/vinklat/debkit/blob/v0.1.
|
|
94
|
-
| [docs/development/](https://github.com/vinklat/debkit/blob/v0.1.
|
|
94
|
+
| [docs/guides/](https://github.com/vinklat/debkit/blob/v0.1.2/docs/guides/README.md) | Anyone operating the CLI | Non-canonical how-tos and examples |
|
|
95
|
+
| [docs/development/](https://github.com/vinklat/debkit/blob/v0.1.2/docs/development/README.md) | Developers and contributors | Non-canonical diagrams, code maps, explanations |
|
|
95
96
|
|
|
96
|
-
Domain owners and agent navigation → [AGENTS.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
97
|
+
Domain owners and agent navigation → [AGENTS.md](https://github.com/vinklat/debkit/blob/v0.1.2/AGENTS.md#canonical-sources).
|
|
97
98
|
|
|
98
99
|
## Technology
|
|
99
100
|
|
|
100
101
|
Python and [txstore](https://github.com/vinklat/txstore); runtime dependencies →
|
|
101
|
-
[STRUCTURE.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
102
|
-
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.
|
|
102
|
+
[STRUCTURE.md](https://github.com/vinklat/debkit/blob/v0.1.2/STRUCTURE.md#dependencies); contributor toolchain →
|
|
103
|
+
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.2/SETUP.md#prerequisites-and-install); tests and quality gates →
|
|
104
|
+
[SETUP.md](https://github.com/vinklat/debkit/blob/v0.1.2/SETUP.md#quality-gates); Ruff and mypy → [STYLE.md](https://github.com/vinklat/debkit/blob/v0.1.2/STYLE.md#python-baseline).
|
|
103
105
|
|
|
104
106
|
## License
|
|
105
107
|
|
|
106
|
-
MIT → [LICENSE](https://github.com/vinklat/debkit/blob/v0.1.
|
|
108
|
+
MIT → [LICENSE](https://github.com/vinklat/debkit/blob/v0.1.2/LICENSE).
|
debkit-0.1.2/ROADMAP.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# debkit roadmap
|
|
2
|
+
|
|
3
|
+
Planned releases, deferred work, and places the code does not yet meet a contract. Shipped work →
|
|
4
|
+
[CHANGELOG.md](CHANGELOG.md). Nothing here is dated or committed.
|
|
5
|
+
|
|
6
|
+
## Releases
|
|
7
|
+
|
|
8
|
+
| Version | Goal | Blocked by |
|
|
9
|
+
| -- | -- | -- |
|
|
10
|
+
| 0.2.0 | Debian package `debkit` | txstore 0.2.0 and its Debian package |
|
|
11
|
+
|
|
12
|
+
## Backlog
|
|
13
|
+
|
|
14
|
+
Unscheduled and unordered work, each row waiting on a trigger. Promote a row to a release when its
|
|
15
|
+
trigger fires or the work is planned; drop it when it no longer applies.
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
Changes a user of the CLI or of a published repository would see.
|
|
20
|
+
|
|
21
|
+
| Feature | Revisit when | Area |
|
|
22
|
+
| -- | -- | -- |
|
|
23
|
+
| `insert` and `remove` of source packages; `insert` refuses them and `remove` keeps their payloads today | A user publishes source packages, or the `IndexKind` work starts | [VALIDATION.md](VALIDATION.md#sources-stanzas) |
|
|
24
|
+
| Case-insensitive `Release` field names, as Debian Policy 5.1 requires; the email parser matches case-sensitively, so a lowercase `sha256:` block is ignored | A source publishes lowercase field names, or the deb822 reader work starts | [VALIDATION.md](VALIDATION.md#release-fields) |
|
|
25
|
+
| Mirror `by-hash/` indices | A mirror's clients rely on `Acquire-By-Hash` | [VALIDATION.md](VALIDATION.md#repository-index-paths) |
|
|
26
|
+
| Decode a `.zst` `control.tar` in process with `compression.zstd`, capped by `ZstdDecompressor.decompress(max_length=…)`, replacing the `zstd` subprocess and the `zstd` binary prerequisite | `requires-python` rises to 3.14, once Debian testing no longer ships Python 3.13 | [VALIDATION.md](VALIDATION.md#object-sizes) |
|
|
27
|
+
| Require `SHA256` or `SHA512` for payload, index, and shared-root replace decisions, so a `SHA1`-only record no longer verifies | A mirrored source publishes `SHA1`-only records, or a publisher is not trusted with its own payloads | [CRYPTO.md](CRYPTO.md#checksums) |
|
|
28
|
+
| Cap the token warnings one Release logs, with one line naming how many more were dropped; a signed Release of distinct invalid `Architectures` or `Components` tokens, or of index paths naming no architecture, logs one line per token today | A source publishes many invalid tokens, or the `Components` and `Architectures` token reader work starts | [STYLE.md](STYLE.md#logging) |
|
|
29
|
+
| Signer fingerprint pinning per source | One keyring must serve several sources | [CRYPTO.md](CRYPTO.md#gpg) |
|
|
30
|
+
| Opt-in uploader keyring (`--changes-keyring`) that `insert` verifies a clearsigned `.changes` against, separate from the keyring that verifies and signs Releases | An incoming storage is writable by anyone the operator does not trust to publish | [CRYPTO.md](CRYPTO.md#verification-failures) |
|
|
31
|
+
|
|
32
|
+
### Internal design
|
|
33
|
+
|
|
34
|
+
Restructuring a user would not see.
|
|
35
|
+
|
|
36
|
+
| Change | Revisit when | Area |
|
|
37
|
+
| -- | -- | -- |
|
|
38
|
+
| Typed settings object passed to actions instead of the argparse `Namespace`; it also carries the parsed `--architectures` and `--indices-exclude` selection `_selection()` returns as a tuple | An action is called from Python rather than the CLI | [STRUCTURE.md](STRUCTURE.md#dependencies) |
|
|
39
|
+
| Immutable `RepoParams` holding location only, with the run's `VerifyPolicy` passed to `Repo*` beside it instead of the `verify_gpg` and `verify_digests` fields | The typed settings work starts, or a second caller builds `RepoParams` | [CRYPTO.md](CRYPTO.md#verification-switches) |
|
|
40
|
+
| One deb822 stanza reader and writer for `Release`, `.changes`, and `Sources`, which still read through the email parser, with the repeated-field and blank-line rules as its parameters | A fourth stanza rule diverges between the email parser and `debian.deb822` | [VALIDATION.md](VALIDATION.md#release-fields) |
|
|
41
|
+
| `ReleaseKey`/`StoragePath` NewTypes and a coordinate-aware `Packages` owning its component, arch, and codec | A fifth raw `component.packages` walk outside `Component`, or `IndexKind` or `Layout` starts | [STRUCTURE.md](STRUCTURE.md#layout) |
|
|
42
|
+
| `Repo.slots()` iterator over the coordinate-aware `Packages`, replacing the hand-written component and arch walks in `repo/__init__.py`, `repo/shared_root.py`, and `ActionPkg`, resolving the component and arch selection once, loading a dist's root Release once for all its heads, and renaming `Packages.packages` | The coordinate-aware `Packages` lands | [STRUCTURE.md](STRUCTURE.md#layout) |
|
|
43
|
+
| Split `ActionPkg` into its read-only views, `ActionInsert`, and `ActionRemove`, and `ActionHistory` per subcommand, as `ActionSync` and `ActionCheck` are, so no action reads its subcommand's flags as optional | The typed settings work starts, or the `ActionPkg.insert` placement moves into `RepoRW` | [STRUCTURE.md](STRUCTURE.md#layout) |
|
|
44
|
+
| `ActionPkg.insert` placement into `RepoRW` | The `IndexKind` work starts | [STYLE.md](STYLE.md#layers) |
|
|
45
|
+
| Repo-level sync use case, so `ActionSync` keeps only the CLI wiring | An action is called from Python, or the typed settings work starts | [STYLE.md](STYLE.md#layers) |
|
|
46
|
+
| `SyncPlanner(source, target, listing)` returning the `SyncPlan`, so `RepoSync` keeps only the transfer, with an optional listing replacing the `existing_files`/`can_list` pair | The `ActionSync` sync policy moves into a repo-level use case, or `RepoSync` gains a second caller | [STRUCTURE.md](STRUCTURE.md#layout) |
|
|
47
|
+
| One `Components` and `Architectures` token reader on `RootRelease`, returning the safe tokens and the dropped ones for `Repo` to log, replacing the parses in `Repo.release_components` and `Repo.release_archs` | A second `Components` reader, or the `Layout` work starts | [STRUCTURE.md](STRUCTURE.md#layout) |
|
|
48
|
+
| `ComponentRelease` split out of `Release`, so `load_component` and `setup_component` cannot be called on a `RootRelease` | A third Release role, or a caller of either method on the root | [STRUCTURE.md](STRUCTURE.md#layout) |
|
|
49
|
+
| One listed-file reader (listing, `exists`, capped read, digest check over its record set, the cap exception class as a parameter) shared by `load_component` and `Packages`, with a `HexDigests` accessor replacing the raw `digests` membership and record lookups | A third listed-file reader, or the `ComponentRelease` split starts | [VALIDATION.md](VALIDATION.md#index-loading) |
|
|
50
|
+
| `IndexSelection` value object holding the component names, the selected and known architectures, and the exclude globs, replacing the `select_index_entry` closure in `Repo._get_indices` and the `None` flat-repo branch | A second caller of `select_index_entry`, or the `Layout` work starts | [VALIDATION.md](VALIDATION.md#index-selection) |
|
|
51
|
+
| One parsed Release key (component, index kind, arch) read by `_listed_slots`, `Repo._listed_binary_archs`, and the sync component split, which today parse a key two ways: `parse_listed_index` and `ComponentNames.split` | A third way to parse a Release key, or the `IndexKind` work starts | [VALIDATION.md](VALIDATION.md#index-selection) |
|
|
52
|
+
| `IndexKind` value object owning the arch directory, index name, container class, and writability, replacing the `SOURCE_ARCH` comparisons | A second index kind is written, or `insert` of source packages starts | [STRUCTURE.md](STRUCTURE.md#dependencies) |
|
|
53
|
+
| `insert` reads each `.deb` control from the stored copy after its `.changes` digest check, so the index stanza and the verified payload come from one read | The pool key no longer needs the control before the transfer | [CRYPTO.md](CRYPTO.md#verification-failures) |
|
|
54
|
+
| `Layout` value object (componented, flat, rootless flat) owning the index prefix, component slot, component Release, `Components` field, pool-key rules, and a flat layout's one index shared by every arch slot under the empty arch, replacing the `is_flat`/`is_real_dist` branches and the identity dedup in `Component.containers()` | A new layout is added, or the `IndexKind` work starts | [VALIDATION.md](VALIDATION.md#repository-index-paths) |
|
|
55
|
+
|
|
56
|
+
## Known deviations
|
|
57
|
+
|
|
58
|
+
Implementation that does not yet meet a root contract. Contracts link here instead of carrying
|
|
59
|
+
TODOs; remove a row when the code meets the rule. `Fix` names the release or backlog row that closes
|
|
60
|
+
the deviation by its first words and links its section; `—` means none is recorded.
|
|
61
|
+
|
|
62
|
+
| Contract | Deviation | Source | Fix |
|
|
63
|
+
| -- | -- | -- | -- |
|
|
64
|
+
| [VALIDATION.md](VALIDATION.md#index-selection) | Indices the source Release lists below a head that is a selected component followed only by index directories, as `main/binary-amd64/binary-amd64/Packages`, split at that component, so they are mirrored while no `Component` loads their payloads. | `repo/index_selection.py` `ComponentNames.split` | — |
|
|
65
|
+
| [STYLE.md](STYLE.md#logging) | A token read from a `.changes`, a `.deb` control, or an index stanza is quoted whole in its exception message, not through `quote_brief`, so a field megabytes long makes a message as long. | `repo/changes.py` `Changes`, `repo/debfile.py` `DebFile`, `repo/component.py`, `repo/package.py`, `repo/__init__.py` `Size` check, `action/action_pkg.py` arch checks, `repo/sources.py` `Sources` stanza file names | — |
|
|
66
|
+
| [STYLE.md](STYLE.md#logging) | A Release key, an index stanza `Filename`, or a payload path from one is logged or raised whole, not through `quote_brief`, so a key megabytes long makes a log line or message as long. | `repo/packages.py` `Filename` checks and unsafe filename, `repo/index_selection.py` `select_index_entry`, `repo/repo_sync.py` digest, transfer, and verify lines, `repo/repo_rw.py` remove, verify, and delete lines, `repo/sources.py` `Sources` debug line, `repo/hashes.py` size check, `action/action_sync.py` check report | — |
|
|
67
|
+
| [STYLE.md](STYLE.md#performance) | The shared root loads each listed head of another dist as its own `Repo`, which reads and parses that dist's root Release again, so the cost grows with the square of its listed heads: about 5 s for 1 000. | `repo/shared_root.py` `_claims_of` | `Repo.slots()` iterator → [internal design](#internal-design) |
|
|
68
|
+
| [VALIDATION.md](VALIDATION.md#sources-stanzas) | Read-only-ness on the insert path is inferred per call site: `RepoRW.binary_archs` filters on the source architecture, and the `.changes` and control-field checks refuse it before the transfer. `remove` and `save` already rely on `Sources` returning the base contract's "nothing changed"; a read-only base shared by `Packages` and `Sources` would own insert too. | `repo/repo_rw.py` `RepoRW.binary_archs`, `action/action_pkg.py` `_target_archs` | — |
|
|
69
|
+
| [STYLE.md](STYLE.md#layers) | `ActionPkg.insert` places each `.deb` in the pool, caps its reads at its `.changes` `Size`, checks it against its `.changes` digest, and refuses other bytes under a held pool key through `RepoRW.held_digests`, repo logic an action does not own. | `action/action_pkg.py` `insert` | `ActionPkg.insert` placement into `RepoRW` → [internal design](#internal-design) |
|
|
70
|
+
| [CRYPTO.md](CRYPTO.md#verification-failures) | `insert` builds the index stanza from a first read of each `.deb` and checks its `.changes` digest on the transfer, a second read, so an incoming-storage writer racing the two could pair other control fields with the verified payload. | `action/action_pkg.py` `insert` | `insert` reads each `.deb` control from the stored copy → [internal design](#internal-design) |
|
|
71
|
+
| [STYLE.md](STYLE.md#layers) | `ActionSync` decides the sync policy itself: the target reset after a checksum failure, the freshness floors of each pass, and the verify-before-sync order. | `action/action_sync.py` `sync`, `_load_target`, `_sync_until_settled` | Repo-level sync use case → [internal design](#internal-design) |
|
|
72
|
+
| [VALIDATION.md](VALIDATION.md#repository-index-paths) | `by-hash/` objects are not mirrored because the root `Release` does not list them; an apt client of a mirror whose `Release` advertises `Acquire-By-Hash: yes` falls back to the canonical index path after a 404. | `repo/__init__.py` `Repo._get_indices` | Mirror `by-hash/` indices → [features](#features) |
|
|
73
|
+
| [VALIDATION.md](VALIDATION.md#object-sizes) | An upload inserted with `--deb-filename`, without digest verification, or listed in its `.changes` with no usable `Size`, on a backend that cannot seek, is read whole with `storage.get` before the control caps apply, since no checked `Size` bounds it and python-debian's `ArFile` seeks; only the backend bounds its size. | `repo/debfile.py` `DebFile._read_control` | — |
|
|
74
|
+
| [SETUP.md](SETUP.md#dependency-policy) | `.github/debian-test.sh`, run by `make debian-test` locally and in CI, installs txstore from PyPI, since Debian does not package it yet; every other dependency comes from apt. | `.github/debian-test.sh` | Release 0.2.0 → [releases](#releases) |
|