pyCertWiz 2.0.1__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 (200) hide show
  1. pycertwiz-2.0.1/CHANGELOG.md +198 -0
  2. pycertwiz-2.0.1/LICENSE +339 -0
  3. pycertwiz-2.0.1/MANIFEST.in +5 -0
  4. pycertwiz-2.0.1/Makefile +84 -0
  5. pycertwiz-2.0.1/PKG-INFO +924 -0
  6. pycertwiz-2.0.1/README.md +877 -0
  7. pycertwiz-2.0.1/SECURITY.md +335 -0
  8. pycertwiz-2.0.1/docs/ACME.md +269 -0
  9. pycertwiz-2.0.1/docs/ACME_CLIENT.md +273 -0
  10. pycertwiz-2.0.1/docs/CA_LISTENER.md +733 -0
  11. pycertwiz-2.0.1/docs/CERTIFICATES.md +107 -0
  12. pycertwiz-2.0.1/docs/CONFIGURATION.md +445 -0
  13. pycertwiz-2.0.1/docs/EXPORTING.md +86 -0
  14. pycertwiz-2.0.1/docs/GUI.md +179 -0
  15. pycertwiz-2.0.1/docs/KEYSTORES.md +123 -0
  16. pycertwiz-2.0.1/docs/MIGRATION.md +207 -0
  17. pycertwiz-2.0.1/docs/OPERATIONS.md +174 -0
  18. pycertwiz-2.0.1/docs/PACKAGING.md +153 -0
  19. pycertwiz-2.0.1/docs/PROTOCOL.md +264 -0
  20. pycertwiz-2.0.1/docs/PROVIDERS.md +93 -0
  21. pycertwiz-2.0.1/docs/PROXY.md +93 -0
  22. pycertwiz-2.0.1/docs/STFC-ACME-MODERNISATION.md +1236 -0
  23. pycertwiz-2.0.1/examples/chain/escience-2b.pem +23 -0
  24. pycertwiz-2.0.1/examples/chain/escience-3b.pem +16 -0
  25. pycertwiz-2.0.1/examples/chain/escience-root-2026.pem +15 -0
  26. pycertwiz-2.0.1/examples/chain/escience-root.pem +21 -0
  27. pycertwiz-2.0.1/examples/crontab +12 -0
  28. pycertwiz-2.0.1/examples/launchd/com.example.pycert.plist +25 -0
  29. pycertwiz-2.0.1/examples/nagios/pycert.cfg +24 -0
  30. pycertwiz-2.0.1/examples/pycert.toml +111 -0
  31. pycertwiz-2.0.1/examples/systemd/pycert-renew-acme.service +14 -0
  32. pycertwiz-2.0.1/examples/systemd/pycert-renew-acme.timer +10 -0
  33. pycertwiz-2.0.1/examples/systemd/pycert-watch.service +17 -0
  34. pycertwiz-2.0.1/examples/systemd/pycert-watch.timer +11 -0
  35. pycertwiz-2.0.1/pyproject.toml +116 -0
  36. pycertwiz-2.0.1/setup.cfg +4 -0
  37. pycertwiz-2.0.1/src/pyCertWiz.egg-info/PKG-INFO +924 -0
  38. pycertwiz-2.0.1/src/pyCertWiz.egg-info/SOURCES.txt +198 -0
  39. pycertwiz-2.0.1/src/pyCertWiz.egg-info/dependency_links.txt +1 -0
  40. pycertwiz-2.0.1/src/pyCertWiz.egg-info/entry_points.txt +7 -0
  41. pycertwiz-2.0.1/src/pyCertWiz.egg-info/requires.txt +22 -0
  42. pycertwiz-2.0.1/src/pyCertWiz.egg-info/top_level.txt +1 -0
  43. pycertwiz-2.0.1/src/pycert/__init__.py +15 -0
  44. pycertwiz-2.0.1/src/pycert/__main__.py +6 -0
  45. pycertwiz-2.0.1/src/pycert/asn1.py +135 -0
  46. pycertwiz-2.0.1/src/pycert/ber.py +145 -0
  47. pycertwiz-2.0.1/src/pycert/bundled.py +67 -0
  48. pycertwiz-2.0.1/src/pycert/bundles.py +723 -0
  49. pycertwiz-2.0.1/src/pycert/ca.py +693 -0
  50. pycertwiz-2.0.1/src/pycert/certs.py +674 -0
  51. pycertwiz-2.0.1/src/pycert/chain.py +370 -0
  52. pycertwiz-2.0.1/src/pycert/cli.py +2299 -0
  53. pycertwiz-2.0.1/src/pycert/config.py +1623 -0
  54. pycertwiz-2.0.1/src/pycert/csr.py +192 -0
  55. pycertwiz-2.0.1/src/pycert/data/__init__.py +0 -0
  56. pycertwiz-2.0.1/src/pycert/data/ca/__init__.py +0 -0
  57. pycertwiz-2.0.1/src/pycert/data/ca/escience-2b.pem +23 -0
  58. pycertwiz-2.0.1/src/pycert/data/ca/escience-3b.pem +16 -0
  59. pycertwiz-2.0.1/src/pycert/data/ca/escience-root-2026.pem +15 -0
  60. pycertwiz-2.0.1/src/pycert/data/ca/escience-root.pem +21 -0
  61. pycertwiz-2.0.1/src/pycert/deploy.py +481 -0
  62. pycertwiz-2.0.1/src/pycert/diagnostics.py +337 -0
  63. pycertwiz-2.0.1/src/pycert/errors.py +59 -0
  64. pycertwiz-2.0.1/src/pycert/exporter.py +372 -0
  65. pycertwiz-2.0.1/src/pycert/gui/__init__.py +107 -0
  66. pycertwiz-2.0.1/src/pycert/gui/app.py +1776 -0
  67. pycertwiz-2.0.1/src/pycert/gui/bundle.py +363 -0
  68. pycertwiz-2.0.1/src/pycert/gui/dialogs.py +1093 -0
  69. pycertwiz-2.0.1/src/pycert/gui/icons.py +144 -0
  70. pycertwiz-2.0.1/src/pycert/gui/models.py +357 -0
  71. pycertwiz-2.0.1/src/pycert/gui/settings.py +475 -0
  72. pycertwiz-2.0.1/src/pycert/gui/setup.py +136 -0
  73. pycertwiz-2.0.1/src/pycert/gui/theme.py +281 -0
  74. pycertwiz-2.0.1/src/pycert/gui/tray.py +164 -0
  75. pycertwiz-2.0.1/src/pycert/gui/viewer.py +350 -0
  76. pycertwiz-2.0.1/src/pycert/gui/widgets.py +727 -0
  77. pycertwiz-2.0.1/src/pycert/gui/wizard.py +630 -0
  78. pycertwiz-2.0.1/src/pycert/gui/workers.py +232 -0
  79. pycertwiz-2.0.1/src/pycert/keystore.py +862 -0
  80. pycertwiz-2.0.1/src/pycert/monitor.py +256 -0
  81. pycertwiz-2.0.1/src/pycert/p12.py +275 -0
  82. pycertwiz-2.0.1/src/pycert/pkcs12_writer.py +343 -0
  83. pycertwiz-2.0.1/src/pycert/providers/__init__.py +98 -0
  84. pycertwiz-2.0.1/src/pycert/providers/acme.py +1204 -0
  85. pycertwiz-2.0.1/src/pycert/providers/base.py +270 -0
  86. pycertwiz-2.0.1/src/pycert/providers/ukca.py +399 -0
  87. pycertwiz-2.0.1/src/pycert/proxy.py +254 -0
  88. pycertwiz-2.0.1/src/pycert/secrets_store.py +449 -0
  89. pycertwiz-2.0.1/src/pycert/store.py +614 -0
  90. pycertwiz-2.0.1/src/pycert/transport.py +843 -0
  91. pycertwiz-2.0.1/src/pycert/util.py +235 -0
  92. pycertwiz-2.0.1/src/pycert/workflow.py +1702 -0
  93. pycertwiz-2.0.1/tests/acme_client.py +207 -0
  94. pycertwiz-2.0.1/tests/certwizard_wire.py +224 -0
  95. pycertwiz-2.0.1/tests/conftest.py +218 -0
  96. pycertwiz-2.0.1/tests/e2e.py +125 -0
  97. pycertwiz-2.0.1/tests/gui_support.py +42 -0
  98. pycertwiz-2.0.1/tests/mock_ca.py +17 -0
  99. pycertwiz-2.0.1/tests/openssl_support.py +30 -0
  100. pycertwiz-2.0.1/tests/raw_server.py +189 -0
  101. pycertwiz-2.0.1/tests/test_acme_certbot.py +79 -0
  102. pycertwiz-2.0.1/tests/test_acme_deep_matrix.py +503 -0
  103. pycertwiz-2.0.1/tests/test_acme_eab_persistence.py +312 -0
  104. pycertwiz-2.0.1/tests/test_acme_emulation.py +318 -0
  105. pycertwiz-2.0.1/tests/test_acme_matrix.py +254 -0
  106. pycertwiz-2.0.1/tests/test_asn1.py +76 -0
  107. pycertwiz-2.0.1/tests/test_ber.py +73 -0
  108. pycertwiz-2.0.1/tests/test_bundles.py +395 -0
  109. pycertwiz-2.0.1/tests/test_ca.py +278 -0
  110. pycertwiz-2.0.1/tests/test_ca_server_matrix.py +508 -0
  111. pycertwiz-2.0.1/tests/test_cert_fuzz.py +127 -0
  112. pycertwiz-2.0.1/tests/test_certs.py +100 -0
  113. pycertwiz-2.0.1/tests/test_certwizard_wire_parity.py +352 -0
  114. pycertwiz-2.0.1/tests/test_chain.py +251 -0
  115. pycertwiz-2.0.1/tests/test_chain_deep.py +152 -0
  116. pycertwiz-2.0.1/tests/test_chain_matrix.py +421 -0
  117. pycertwiz-2.0.1/tests/test_cli.py +249 -0
  118. pycertwiz-2.0.1/tests/test_cli_deep.py +192 -0
  119. pycertwiz-2.0.1/tests/test_cli_matrix.py +497 -0
  120. pycertwiz-2.0.1/tests/test_cli_multica.py +421 -0
  121. pycertwiz-2.0.1/tests/test_concurrency.py +73 -0
  122. pycertwiz-2.0.1/tests/test_concurrency_round3.py +104 -0
  123. pycertwiz-2.0.1/tests/test_config.py +222 -0
  124. pycertwiz-2.0.1/tests/test_config_matrix.py +362 -0
  125. pycertwiz-2.0.1/tests/test_config_profiles.py +241 -0
  126. pycertwiz-2.0.1/tests/test_cov_core_acme.py +185 -0
  127. pycertwiz-2.0.1/tests/test_cov_core_ca.py +165 -0
  128. pycertwiz-2.0.1/tests/test_cov_core_cli.py +124 -0
  129. pycertwiz-2.0.1/tests/test_cov_core_config_store.py +113 -0
  130. pycertwiz-2.0.1/tests/test_cov_core_formats.py +216 -0
  131. pycertwiz-2.0.1/tests/test_cov_core_keystore.py +147 -0
  132. pycertwiz-2.0.1/tests/test_cov_gui_app.py +694 -0
  133. pycertwiz-2.0.1/tests/test_cov_gui_app_tray.py +330 -0
  134. pycertwiz-2.0.1/tests/test_cov_gui_widgets.py +457 -0
  135. pycertwiz-2.0.1/tests/test_cov_gui_widgets_dialogs.py +489 -0
  136. pycertwiz-2.0.1/tests/test_cov_gui_widgets_settings.py +156 -0
  137. pycertwiz-2.0.1/tests/test_cov_gui_widgets_wizard.py +266 -0
  138. pycertwiz-2.0.1/tests/test_coverage_ca.py +70 -0
  139. pycertwiz-2.0.1/tests/test_coverage_ca2.py +114 -0
  140. pycertwiz-2.0.1/tests/test_coverage_cli.py +420 -0
  141. pycertwiz-2.0.1/tests/test_coverage_config.py +147 -0
  142. pycertwiz-2.0.1/tests/test_coverage_crypto.py +166 -0
  143. pycertwiz-2.0.1/tests/test_coverage_diagnostics.py +174 -0
  144. pycertwiz-2.0.1/tests/test_coverage_misc.py +432 -0
  145. pycertwiz-2.0.1/tests/test_coverage_secrets.py +173 -0
  146. pycertwiz-2.0.1/tests/test_coverage_transport.py +272 -0
  147. pycertwiz-2.0.1/tests/test_coverage_workflow.py +484 -0
  148. pycertwiz-2.0.1/tests/test_csr.py +104 -0
  149. pycertwiz-2.0.1/tests/test_csr_matrix.py +205 -0
  150. pycertwiz-2.0.1/tests/test_deploy.py +384 -0
  151. pycertwiz-2.0.1/tests/test_diagnostics.py +117 -0
  152. pycertwiz-2.0.1/tests/test_diagnostics_deep.py +83 -0
  153. pycertwiz-2.0.1/tests/test_docs_packaging.py +156 -0
  154. pycertwiz-2.0.1/tests/test_e2e_actions.py +201 -0
  155. pycertwiz-2.0.1/tests/test_e2e_actions_more.py +111 -0
  156. pycertwiz-2.0.1/tests/test_e2e_cli_matrix.py +118 -0
  157. pycertwiz-2.0.1/tests/test_e2e_lifecycle.py +144 -0
  158. pycertwiz-2.0.1/tests/test_e2e_listener_faults.py +175 -0
  159. pycertwiz-2.0.1/tests/test_e2e_protocol.py +183 -0
  160. pycertwiz-2.0.1/tests/test_e2e_security.py +183 -0
  161. pycertwiz-2.0.1/tests/test_exporter.py +206 -0
  162. pycertwiz-2.0.1/tests/test_first_run.py +210 -0
  163. pycertwiz-2.0.1/tests/test_gui_qt.py +1330 -0
  164. pycertwiz-2.0.1/tests/test_hardening_extra.py +99 -0
  165. pycertwiz-2.0.1/tests/test_hardening_round3.py +236 -0
  166. pycertwiz-2.0.1/tests/test_hook_programs.py +87 -0
  167. pycertwiz-2.0.1/tests/test_key_protection.py +169 -0
  168. pycertwiz-2.0.1/tests/test_keystore.py +581 -0
  169. pycertwiz-2.0.1/tests/test_keystore_edge.py +323 -0
  170. pycertwiz-2.0.1/tests/test_listener_fuzz_extra.py +43 -0
  171. pycertwiz-2.0.1/tests/test_listener_fuzz_round3.py +73 -0
  172. pycertwiz-2.0.1/tests/test_monitor.py +164 -0
  173. pycertwiz-2.0.1/tests/test_p12.py +181 -0
  174. pycertwiz-2.0.1/tests/test_p12_deep.py +158 -0
  175. pycertwiz-2.0.1/tests/test_p12_matrix.py +246 -0
  176. pycertwiz-2.0.1/tests/test_pkcs12_writer.py +414 -0
  177. pycertwiz-2.0.1/tests/test_provider_acme.py +821 -0
  178. pycertwiz-2.0.1/tests/test_provider_acme_unit.py +430 -0
  179. pycertwiz-2.0.1/tests/test_providers_core.py +240 -0
  180. pycertwiz-2.0.1/tests/test_proxy.py +309 -0
  181. pycertwiz-2.0.1/tests/test_rename.py +164 -0
  182. pycertwiz-2.0.1/tests/test_renewal_record.py +250 -0
  183. pycertwiz-2.0.1/tests/test_sandbox_java.py +387 -0
  184. pycertwiz-2.0.1/tests/test_secret_deep.py +158 -0
  185. pycertwiz-2.0.1/tests/test_secrets.py +142 -0
  186. pycertwiz-2.0.1/tests/test_secrets_keyring.py +117 -0
  187. pycertwiz-2.0.1/tests/test_security.py +186 -0
  188. pycertwiz-2.0.1/tests/test_stateful.py +84 -0
  189. pycertwiz-2.0.1/tests/test_stateful_round3.py +41 -0
  190. pycertwiz-2.0.1/tests/test_store.py +126 -0
  191. pycertwiz-2.0.1/tests/test_store_deep.py +106 -0
  192. pycertwiz-2.0.1/tests/test_store_matrix.py +312 -0
  193. pycertwiz-2.0.1/tests/test_system_anchors.py +46 -0
  194. pycertwiz-2.0.1/tests/test_transport.py +929 -0
  195. pycertwiz-2.0.1/tests/test_transport_deep.py +642 -0
  196. pycertwiz-2.0.1/tests/test_transport_fuzz.py +80 -0
  197. pycertwiz-2.0.1/tests/test_util.py +71 -0
  198. pycertwiz-2.0.1/tests/test_workflow.py +355 -0
  199. pycertwiz-2.0.1/tests/test_workflow_deep.py +296 -0
  200. pycertwiz-2.0.1/tests/test_workflow_matrix.py +448 -0
@@ -0,0 +1,198 @@
1
+ # Changelog
2
+
3
+ ## 2.0.1
4
+
5
+ ### Fixed
6
+
7
+ - Every request to the UK CA looked up this computer's full name for the
8
+ `LocalHost` header, a reverse DNS lookup that takes seconds where reverse
9
+ DNS is slow. It is now looked up once per run. On GitHub's macOS runners
10
+ this made the test suite crawl until it timed out.
11
+
12
+ ## 2.0.0
13
+
14
+ **pyCert is now pyCertWiz.** The distribution (`pip install pyCertWiz`), the
15
+ application and the GitHub repository (rob-c/pyCertWiz) carry the new name, and
16
+ a `pycertwiz` command joins `pycert`. Nothing else moves: the `pycert` command,
17
+ the `pycert` Python package, the configuration and data folders
18
+ (`~/.config/pycert`, `~/.local/share/pycert`) and the Keychain/Secret Service
19
+ entry (`pyCert`) keep their names, so existing installations carry on working.
20
+
21
+ pyCertWiz becomes a manager for many personal and host certificates from several
22
+ CAs, with a new desktop application.
23
+
24
+ ### New
25
+
26
+ - **Qt desktop application** (`pip install 'pyCertWiz[gui]'`, PySide6). It
27
+ replaces the Tkinter GUI and includes:
28
+ - a sidebar with views and per-CA reachability, summary cards, and
29
+ renewal/unreachable banners;
30
+ - a sortable, searchable table with status pills and days-left bars;
31
+ - a detail panel with Overview, Chain, Deployment and History tabs;
32
+ - a request wizard that adapts to the CA and requests many host names at
33
+ once;
34
+ - background collection of issued certificates, with tray/menu-bar
35
+ notifications;
36
+ - the Java bundle inspector;
37
+ - live light/dark appearance.
38
+
39
+ It is tested headless with pytest-qt.
40
+ - **Several CAs per configuration.** `[ca]` is the primary profile and
41
+ `[cas.<name>]` tables add more. `default_ca` chooses the profile for new
42
+ requests, and each request records its CA. Manage profiles with
43
+ `pycert ca list|show|default|add-acme|add-ukca|remove|eab` or the GUI
44
+ settings.
45
+ - **CA provider interface** (`pycert.providers`). It has two built-in
46
+ providers, `ukca` (the CertWizard protocol, unchanged on the wire) and
47
+ `acme`, plus third-party providers through the `pycert.providers` entry
48
+ point.
49
+ - **ACME client** (RFC 8555) on pyCertWiz's hardened transport:
50
+ - accounts, External Account Binding, and http-01 (standalone or webroot)
51
+ or dns-01 (hook or manual) validation;
52
+ - wildcards with dns-01, renewal, revocation, crash-safe resumption of
53
+ orders, and cancellation;
54
+ - tested end to end against the sandbox ACME server.
55
+ - **Java keystores as a live store** (`pycert keystore link|list|sync|password|unlink|import`,
56
+ GUI *Link a Java keystore…* and the bundle inspector's *Use as certificate
57
+ store…*):
58
+ - every key entry of a CertWizard `cakeystore.pkcs12` (or a modern keytool or
59
+ OpenSSL keystore) is managed by pyCertWiz;
60
+ - issued and renewed certificates are written back, while other entries stay
61
+ byte-for-byte unchanged;
62
+ - certificates renewed elsewhere are picked up, and CertWizard's pending
63
+ requests are finished by pyCertWiz.
64
+ - **Private keys are never written unprotected.** Deployed keys and bundles
65
+ and proxy bundles use the saved secret or a passphrase you choose; exports
66
+ and `~/.globus/userkey.pem` need a new passphrase (see below). A single
67
+ exported key file may be left without a passphrase only after an
68
+ interactive confirmation (type `unencrypted`); bundles never.
69
+ - **Exports in many formats, always with a new passphrase**:
70
+ `pycert export --format p12|pem-bundle|pem-files|key|cert|fullchain|der|p7b`
71
+ and `--encryption aes256|3des|pkcs8|traditional`, and an **Export…** dialog
72
+ in the GUI. PKCS#12 with AES-256 is the default. Anything with a private key
73
+ needs a new passphrase of at least 8 characters, entered twice; pyCertWiz's
74
+ saved secret is refused. `pycert install` follows the same rule.
75
+ `pycert export --stored` re-writes pyCertWiz's own copy (the old default
76
+ behaviour). See [docs/EXPORTING.md](docs/EXPORTING.md).
77
+ - **Rename certificates**: `pycert edit ALIAS --name NEW`, and **Rename…** (F2)
78
+ in the GUI. With `--rename-keystore-entry`, or the checkbox, the linked
79
+ Java keystore entry is renamed too.
80
+ - **Certificate, keys and chain viewer** in the GUI (Ctrl/Cmd+K): the full
81
+ chain with details and PEM, the public key, and the private key on request
82
+ (type `show`; never copied; cleared on close).
83
+ - **User/host type is shown** in the certificate list (the Type column is on
84
+ by default) and in the details.
85
+ - **Keystore passphrases are never stored.** They are asked for each session
86
+ (the GUI asks at start-up), and locked keystores are reported by
87
+ `pycert check`.
88
+ - **Bulk host requests**: `pycert request h1 h2 … --type host` or
89
+ `--from-file hosts.txt`.
90
+ - **Deployment targets** (`pycert deploy list|add|remove|run|presets`, and in
91
+ the GUI):
92
+ - presets for grid-host, globus-user, nginx and Apache, or custom
93
+ paths;
94
+ - atomic writes with explicit modes, owner/group, `.bak` backups, symlink
95
+ refusal and reload hooks;
96
+ - automatic re-deployment after issuance and renewal.
97
+ - **Monitoring**:
98
+ - `pycert check` is a Nagios/Icinga plugin (exit 0/1/2/3). It reports
99
+ expiry, requests stuck at the RA, failed requests, unverified chains and
100
+ deployment drift.
101
+ - `pycert report` exports an inventory as a table, CSV or JSON.
102
+ - `pycert doctor` now checks deployments and every CA.
103
+ - `pycert edit ALIAS --description … --auto-renew/--no-auto-renew`;
104
+ `pycert renew --due` honours the flag and accepts `--ca` and
105
+ `--include-manual`.
106
+ - `pycert ping --all` / `--ca`, and `pycert info --ca` (ACME directory
107
+ metadata).
108
+ - Optional **`keyring` secret backend** (`pip install 'pyCertWiz[keyring]'`).
109
+ - `PYCERT_GUI_SETTINGS` keeps GUI preferences in an INI file;
110
+ `XDG_CONFIG_HOME` is searched for the configuration.
111
+ - GitHub Actions CI on Linux and macOS for Python 3.10–3.14. The test suite
112
+ runs in parallel (`pytest -n auto`).
113
+ - **Packages** that carry their own Python and Qt: a macOS app in a `.dmg`
114
+ (Apple silicon and Intel), and for Linux an AppImage, `.deb`, `.rpm` and
115
+ Arch package (x86_64 and aarch64), plus a Nix flake. They add a desktop
116
+ entry, and the bundled executable is both the GUI and the command line.
117
+ Each package is installed in clean containers of eleven distributions and
118
+ tested end to end against the sandbox CA, including the GUI on X11. Tagged
119
+ releases are published to GitHub Releases, with checksums and build
120
+ provenance, and to PyPI. See [docs/PACKAGING.md](docs/PACKAGING.md).
121
+ - **First-run setup in the GUI.** With no configuration yet, the desktop
122
+ application asks for the e-mail address, RA and where to keep the saved
123
+ secret, and writes the same files as `pycert init`, which now shares its
124
+ code. `pycert gui --check` renders a window once and exits, for package
125
+ tests.
126
+
127
+ ### Changed
128
+
129
+ - **Renewals start from the CA's record, as in CertWizard.** Before a UK-CA
130
+ renewal pyCertWiz looks the certificate up by its public key. It refuses
131
+ certificates the CA does not report as VALID, or that expired more than 30
132
+ days ago, and checks any e-mail in the name against the one being sent. All
133
+ of this happens before a key is generated. The contact e-mail defaults to
134
+ the one the CA holds (previously the local or configured address); changing
135
+ it is reported. Imported certificates get their record from
136
+ `pycert status --refresh`, **Check now** or the GUI's background check.
137
+ - The sandbox CA issues subjects in production order (C, O, OU, L, CN) and
138
+ challenges with the production PPPK realm.
139
+
140
+ - **Python 3.10+ is required** (was 3.6+). The hand-written TOML parser, the
141
+ dataclasses backport and the compatibility layer have been removed in favour
142
+ of `tomllib`/`tomli`, `dataclasses` and current `cryptography` (≥ 42) APIs.
143
+ - Packaging moved to PEP 621 metadata in `pyproject.toml` (`setup.cfg`
144
+ removed). Extras: `gui`, `keyring`, `all`, `dev`.
145
+ - Configuration format version 2. Version 1 files load unchanged; `[ca]` gains
146
+ `name` and `display_name`.
147
+ - Request state version 2 adds `ca`, `provider`, `deploy`, `auto_renew` and
148
+ `description`. Older state files are read as before.
149
+ - Example automation now uses `pycert watch --once` (collect and deploy). New
150
+ examples cover ACME renewal timers, Nagios/NRPE and cron.
151
+
152
+ ### Fixed
153
+
154
+ - With PySide6 older than 6.10 (for example 6.9 on RHEL/AlmaLinux 8) every
155
+ change of view or search in the GUI failed: Qt 6.9 has `beginFilterChange()`
156
+ but not `endFilterChange()`. Both are now required, with a fallback.
157
+ - On current Fedora, pyCertWiz found no system trust anchors: OpenSSL there is
158
+ configured with a hashed CA directory only, which Python does not list. ACME
159
+ chains (Let's Encrypt and others) could therefore not be validated against
160
+ system trust. pyCertWiz now falls back to the distribution's CA bundle
161
+ (`$SSL_CERT_FILE`, then the usual Fedora/RHEL, Debian/Ubuntu/Arch, openSUSE
162
+ and BSD locations).
163
+ - A deploy or dns-01 hook whose program is missing or not executable is now
164
+ reported as such ("deploy hook not found", "could not be run (not
165
+ executable)") on every platform; under emulation the exec error could be
166
+ lost, leaving only "exit 127".
167
+
168
+ - The GUI crashed (segmentation fault) when the appearance changed after the
169
+ new-certificate wizard had been opened and a background CA check had run.
170
+ Wizards and dialogs are now disposed after use instead of living on as
171
+ hidden children of the main window.
172
+ - CertWizard's pending-request placeholders (`<CN> CSR cert`) were imported
173
+ as *user* certificates with that CN. A host renewal collected that way
174
+ would have been renewed later with an extra e-mail SAN. The real CN and
175
+ type are now used, and the issued certificate corrects older imports.
176
+ - Exporting onto a path that is a folder failed with a raw `IsADirectoryError`;
177
+ write failures are now reported clearly.
178
+
179
+ - `pycert request --key-algorithm/--rsa-bits/--ec-curve`, and the GUI key
180
+ choice, were silently ignored for new requests; the configuration defaults
181
+ were always used. They are now honoured, and pyCertWiz warns that the UK
182
+ e-Science CA cannot renew EC certificates in place.
183
+ - A host request with extra `--san-dns` names no longer omits the host's own
184
+ name from the SANs.
185
+ - The GUI's busy indicator could clear before a background result had been
186
+ delivered.
187
+ - A PKCS#12 bundle whose certificates are encrypted with PBES2 (modern keytool,
188
+ OpenSSL 3) lost all but its first key entry when re-saved from the bundle
189
+ inspector.
190
+ - Writing a file re-moded its existing parent directory to 0700. This affected
191
+ deployment to `/etc/grid-security`, ACME webroots, and `export --out`.
192
+ - A failing secret backend (locked keychain, failing password-manager command)
193
+ could make pyCertWiz generate and save a new passphrase.
194
+
195
+ ### Removed
196
+
197
+ - The Tkinter GUI. `pycert gui` and `pycert-gui` start the Qt application.
198
+ - Python 3.6–3.9 support, `tools/check_py36.py` and the `vermin` check.
@@ -0,0 +1,339 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ <signature of Ty Coon>, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
@@ -0,0 +1,5 @@
1
+ include README.md SECURITY.md CHANGELOG.md LICENSE Makefile pyproject.toml
2
+ recursive-include docs *.md
3
+ recursive-include examples *
4
+ recursive-include tests *.py
5
+ recursive-include src/pycert/data *.pem
@@ -0,0 +1,84 @@
1
+ PYTHON ?= python3
2
+ VENV ?= .venv
3
+ BIN := $(VENV)/bin
4
+ JOBS ?= auto
5
+
6
+ .PHONY: help venv install dev test test-serial coverage lint format check selftest gui screenshots build package-macos package-linux package-test clean
7
+
8
+ help:
9
+ @echo "make venv create the virtualenv and install pyCertWiz (editable, with the GUI)"
10
+ @echo "make dev venv + test tooling (pytest, pytest-qt, pytest-xdist, ruff, build)"
11
+ @echo "make test run the test suite in parallel (JOBS=auto)"
12
+ @echo "make test-serial run the test suite in one process"
13
+ @echo "make coverage full suite with the 100% line and branch coverage gate (GUI included)"
14
+ @echo "make lint ruff check"
15
+ @echo "make format ruff format + autofix"
16
+ @echo "make check lint + test"
17
+ @echo "make gui start the desktop application"
18
+ @echo "make screenshots regenerate docs/images against a throw-away sandbox CA"
19
+ @echo "make build build a wheel and sdist in dist/"
20
+ @echo "make package-macos pyCertWiz.app and a .dmg for this Mac, in dist/"
21
+ @echo "make package-linux Linux bundle, AppImage, .deb, .rpm, Arch package (Docker; ARCH=x86_64|aarch64)"
22
+ @echo "make package-test install the Linux packages in clean containers and test them (IMAGE=, FORMAT=)"
23
+ @echo "make clean remove caches and build artefacts"
24
+
25
+ venv:
26
+ $(PYTHON) -m venv $(VENV)
27
+ $(BIN)/pip install --upgrade pip
28
+ $(BIN)/pip install -e ".[gui]"
29
+
30
+ dev: venv
31
+ $(BIN)/pip install -e ".[dev]"
32
+
33
+ install: venv
34
+
35
+ test:
36
+ QT_QPA_PLATFORM=offscreen $(BIN)/pytest -n $(JOBS)
37
+
38
+ test-serial:
39
+ QT_QPA_PLATFORM=offscreen $(BIN)/pytest
40
+
41
+ coverage:
42
+ QT_QPA_PLATFORM=offscreen $(BIN)/pytest -n $(JOBS) --cov=src/pycert --cov-report=term-missing --cov-fail-under=100
43
+
44
+ lint:
45
+ $(BIN)/ruff check src tests sandbox_ca
46
+
47
+ selftest:
48
+ $(BIN)/pycert selftest
49
+
50
+ format:
51
+ $(BIN)/ruff format src tests sandbox_ca
52
+ $(BIN)/ruff check --fix src tests sandbox_ca
53
+
54
+ check: lint test
55
+
56
+ gui:
57
+ $(BIN)/pycert gui
58
+
59
+ screenshots:
60
+ QT_QPA_PLATFORM=offscreen $(BIN)/python tools/screenshots.py docs/images
61
+
62
+ build: dev
63
+ $(BIN)/python -m build
64
+
65
+ package-macos:
66
+ packaging/macos/build-app.sh
67
+
68
+ # Docker builds for this machine's architecture; ARCH=x86_64 on Apple silicon emulates.
69
+ ARCH ?= $(shell uname -m | sed 's/arm64/aarch64/')
70
+ BUILD_IMAGE = $(if $(filter aarch64,$(ARCH)),almalinux:10,almalinux:8)
71
+ DOCKER_PLATFORM = $(if $(filter aarch64,$(ARCH)),linux/arm64,linux/amd64)
72
+ package-linux:
73
+ docker run --rm --platform $(DOCKER_PLATFORM) -v "$(CURDIR):/src" -w /src $(BUILD_IMAGE) packaging/linux/build.sh
74
+ docker run --rm --platform $(DOCKER_PLATFORM) -v "$(CURDIR):/src" -w /src ubuntu:24.04 sh -c \
75
+ 'apt-get update -qq && apt-get install -y -qq curl ca-certificates binutils file >/dev/null && packaging/linux/package.sh $(ARCH)'
76
+
77
+ IMAGE ?= debian:13
78
+ FORMAT ?= deb
79
+ package-test:
80
+ packaging/tests/container-test.sh $(IMAGE) $(FORMAT)
81
+
82
+ clean:
83
+ rm -rf $(VENV) dist build *.egg-info src/*.egg-info .pytest_cache .ruff_cache .coverage htmlcov
84
+ find . -name __pycache__ -type d -prune -exec rm -rf {} +