chroot-distro 2.2.0__tar.gz → 2.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/PKG-INFO +29 -3
  2. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/README.md +28 -2
  3. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/pyproject.toml +1 -1
  4. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/cli.py +7 -3
  5. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/help/pages.py +37 -0
  6. chroot_distro-2.3.0/src/chroot_distro/commands/info.py +589 -0
  7. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/install.py +6 -3
  8. chroot_distro-2.3.0/src/chroot_distro/commands/kill.py +176 -0
  9. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/list_cmd.py +69 -0
  10. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/login/__init__.py +176 -39
  11. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/login/bindings.py +44 -12
  12. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/login/chroot_cmd.py +11 -4
  13. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/login/env.py +65 -5
  14. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/push.py +2 -1
  15. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/run.py +6 -0
  16. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/completions/chroot-distro.fish +15 -1
  17. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/elevate.py +9 -19
  18. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/layers.py +50 -71
  19. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/pull.py +42 -24
  20. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/push.py +50 -49
  21. chroot_distro-2.3.0/src/chroot_distro/helpers/docker/transport.py +257 -0
  22. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/download.py +188 -19
  23. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/mount_manager.py +9 -0
  24. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/parser.py +15 -2
  25. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_download_blob_multi.py +6 -6
  26. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_elevate.py +15 -9
  27. chroot_distro-2.3.0/tests/unit/test_info.py +178 -0
  28. chroot_distro-2.3.0/tests/unit/test_kill.py +317 -0
  29. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_login_helpers.py +14 -4
  30. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/uv.lock +1 -1
  31. chroot_distro-2.2.0/src/chroot_distro/commands/kill.py +0 -88
  32. chroot_distro-2.2.0/src/chroot_distro/helpers/docker/transport.py +0 -166
  33. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.editorconfig +0 -0
  34. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.github/codeql/codeql-config.yml +0 -0
  35. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.github/dependabot.yml +0 -0
  36. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.github/workflows/ci.yml +0 -0
  37. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.github/workflows/codeql.yml +0 -0
  38. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.github/workflows/publish.yml +0 -0
  39. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.gitignore +0 -0
  40. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/.python-version +0 -0
  41. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/LICENSE +0 -0
  42. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/check-before-commit.sh +0 -0
  43. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/__init__.py +0 -0
  44. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/arch.py +0 -0
  45. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/atomic.py +0 -0
  46. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/backup.py +0 -0
  47. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/build.py +0 -0
  48. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/clear_cache.py +0 -0
  49. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/copy.py +0 -0
  50. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/diff.py +0 -0
  51. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/help/__init__.py +0 -0
  52. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/help/render.py +0 -0
  53. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/install_local.py +0 -0
  54. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/login/passwd.py +0 -0
  55. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/ps.py +0 -0
  56. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/remove.py +0 -0
  57. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/rename.py +0 -0
  58. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/reset.py +0 -0
  59. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/restore.py +0 -0
  60. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/search.py +0 -0
  61. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/sync.py +0 -0
  62. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/commands/unmount.py +0 -0
  63. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/completions/_chroot-distro +0 -0
  64. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/completions/chroot-distro.bash +0 -0
  65. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/constants.py +0 -0
  66. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/exceptions.py +0 -0
  67. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/__init__.py +0 -0
  68. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/android.py +0 -0
  69. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_cache.py +0 -0
  70. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/__init__.py +0 -0
  71. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/constants.py +0 -0
  72. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/copy_step.py +0 -0
  73. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/dockerignore.py +0 -0
  74. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/engine.py +0 -0
  75. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/errors.py +0 -0
  76. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/handlers.py +0 -0
  77. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/parsing.py +0 -0
  78. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/run_step.py +0 -0
  79. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/stage.py +0 -0
  80. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/build_engine/users.py +0 -0
  81. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/display.py +0 -0
  82. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/__init__.py +0 -0
  83. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/cache.py +0 -0
  84. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/media.py +0 -0
  85. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/docker/refs.py +0 -0
  86. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/dockerfile.py +0 -0
  87. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/gpu.py +0 -0
  88. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/layer_diff.py +0 -0
  89. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/namespace.py +0 -0
  90. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/nvidia.py +0 -0
  91. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/oci_writer.py +0 -0
  92. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/rootfs.py +0 -0
  93. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/session.py +0 -0
  94. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/sound.py +0 -0
  95. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/tar_extract.py +0 -0
  96. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/wayland.py +0 -0
  97. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/helpers/x11.py +0 -0
  98. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/locking.py +0 -0
  99. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/message.py +0 -0
  100. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/names.py +0 -0
  101. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/paths.py +0 -0
  102. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/progress.py +0 -0
  103. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/py.typed +0 -0
  104. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/src/chroot_distro/rate_limit.py +0 -0
  105. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/conftest.py +0 -0
  106. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_android.py +0 -0
  107. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_arch.py +0 -0
  108. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_backup_restore.py +0 -0
  109. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_bind_options.py +0 -0
  110. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_cli.py +0 -0
  111. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_constants.py +0 -0
  112. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_diff_baseline_cache.py +0 -0
  113. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_display.py +0 -0
  114. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_display_sockets.py +0 -0
  115. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_docker_refs.py +0 -0
  116. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_dockerfile.py +0 -0
  117. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_download_algorithms.py +0 -0
  118. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_download_multi.py +0 -0
  119. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_gpu.py +0 -0
  120. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_install.py +0 -0
  121. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_install_local.py +0 -0
  122. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_layer_diff.py +0 -0
  123. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_list.py +0 -0
  124. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_locking.py +0 -0
  125. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_message.py +0 -0
  126. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_mount_manager_ns.py +0 -0
  127. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_names.py +0 -0
  128. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_namespace.py +0 -0
  129. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_parser.py +0 -0
  130. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_paths.py +0 -0
  131. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_progress.py +0 -0
  132. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_push_chunked.py +0 -0
  133. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_remove.py +0 -0
  134. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_rootfs.py +0 -0
  135. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_sound.py +0 -0
  136. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_tar_extract.py +0 -0
  137. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_unmount.py +0 -0
  138. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_wayland.py +0 -0
  139. {chroot_distro-2.2.0 → chroot_distro-2.3.0}/tests/unit/test_x11.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chroot-distro
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: chroot-distro is a lightweight Linux container management utility built around chroot.
5
5
  Project-URL: Homepage, https://github.com/sabamdarif/chroot-distro
6
6
  Project-URL: Repository, https://github.com/sabamdarif/chroot-distro
@@ -78,6 +78,7 @@ when needed (see [First-run check](#first-run-check)).
78
78
  * [`copy`](#copy--copy-files-to-or-from-a-container)
79
79
  * [`sync`](#sync--synchronize-files-to-or-from-a-container)
80
80
  * [`clear-cache`](#clear-cache--delete-the-download-cache)
81
+ * [`info`](#info--show-host-and-container-diagnostics)
81
82
  * [`help`](#help--show-command-help)
82
83
  3. [How Chroot-Distro works](#how-chroot-distro-works)
83
84
  4. [Storage layout](#storage-layout)
@@ -166,8 +167,9 @@ order: `sudo`, `doas`, `pkexec`, or `su`.
166
167
  | Termux, default | Prefer `su` (real root) over `sudo`. |
167
168
  | Termux, `--use-sudo` or `CHROOT_DISTRO_USE_SUDO=1` | Prefer `sudo` for elevation. |
168
169
 
169
- `list`, `ps`, `search`, and `help` do not require root and are never
170
- re-executed.
170
+ `list`, `ps`, `search`, `info`, and `help` do not require root on Termux and
171
+ are never re-executed. On regular Linux, `list`, `ps`, and `info` still
172
+ elevate to inspect root-owned data.
171
173
 
172
174
  ### Quick start
173
175
 
@@ -203,6 +205,9 @@ chroot-distro ps
203
205
  # Search Docker Hub for an image
204
206
  chroot-distro search nextcloud
205
207
 
208
+ # Print diagnostic report for host and containers
209
+ chroot-distro info
210
+
206
211
  # See what changed in a container relative to its image
207
212
  chroot-distro diff ubuntu
208
213
 
@@ -1031,6 +1036,27 @@ network access again.
1031
1036
 
1032
1037
  ---
1033
1038
 
1039
+ ### `info` — Show host and container diagnostics
1040
+
1041
+ ```
1042
+ chroot-distro info
1043
+ Aliases: version-info, nf
1044
+ ```
1045
+
1046
+ Print a structured diagnostics report about the host and installed containers. Useful to attach when filing a bug report so issues can be reproduced and triaged faster.
1047
+
1048
+ The report covers five sections:
1049
+
1050
+ - **Program** — `chroot-distro` version, Python version, data location.
1051
+ - **Host** — On Termux: Termux version, Android release/SDK, device. On Linux: distribution name/version, kernel, libc. Host CPU architecture and 32-bit support are shown in both cases.
1052
+ - **Capabilities** — Host checks that affect launching containers: privilege-escalation tool (`sudo`/`doas`/`pkexec`/`su`), Termux `/data` suid/exec flags, `binfmt_misc` + QEMU for foreign architectures, `unshare`/`nsenter` and user-namespace support, free disk space on the data dir, download cache size, and SELinux/AppArmor mode.
1053
+ - **Images** — Every installed container with rootfs size, detected architecture, image source, busy/idle status, plus source URL and image type from manifest labels when available.
1054
+ - **Analysis** — Lightweight checks per image: architecture mismatch against the host, missing manifest, empty or unusual rootfs.
1055
+
1056
+ Like `list` and `ps`, `info` is a read-only command that does not require root on Termux. On regular Linux hosts, it automatically elevates to inspect the same root-owned data directory where containers are installed.
1057
+
1058
+ ---
1059
+
1034
1060
  ### `help` — Show command help
1035
1061
 
1036
1062
  ```
@@ -49,6 +49,7 @@ when needed (see [First-run check](#first-run-check)).
49
49
  * [`copy`](#copy--copy-files-to-or-from-a-container)
50
50
  * [`sync`](#sync--synchronize-files-to-or-from-a-container)
51
51
  * [`clear-cache`](#clear-cache--delete-the-download-cache)
52
+ * [`info`](#info--show-host-and-container-diagnostics)
52
53
  * [`help`](#help--show-command-help)
53
54
  3. [How Chroot-Distro works](#how-chroot-distro-works)
54
55
  4. [Storage layout](#storage-layout)
@@ -137,8 +138,9 @@ order: `sudo`, `doas`, `pkexec`, or `su`.
137
138
  | Termux, default | Prefer `su` (real root) over `sudo`. |
138
139
  | Termux, `--use-sudo` or `CHROOT_DISTRO_USE_SUDO=1` | Prefer `sudo` for elevation. |
139
140
 
140
- `list`, `ps`, `search`, and `help` do not require root and are never
141
- re-executed.
141
+ `list`, `ps`, `search`, `info`, and `help` do not require root on Termux and
142
+ are never re-executed. On regular Linux, `list`, `ps`, and `info` still
143
+ elevate to inspect root-owned data.
142
144
 
143
145
  ### Quick start
144
146
 
@@ -174,6 +176,9 @@ chroot-distro ps
174
176
  # Search Docker Hub for an image
175
177
  chroot-distro search nextcloud
176
178
 
179
+ # Print diagnostic report for host and containers
180
+ chroot-distro info
181
+
177
182
  # See what changed in a container relative to its image
178
183
  chroot-distro diff ubuntu
179
184
 
@@ -1002,6 +1007,27 @@ network access again.
1002
1007
 
1003
1008
  ---
1004
1009
 
1010
+ ### `info` — Show host and container diagnostics
1011
+
1012
+ ```
1013
+ chroot-distro info
1014
+ Aliases: version-info, nf
1015
+ ```
1016
+
1017
+ Print a structured diagnostics report about the host and installed containers. Useful to attach when filing a bug report so issues can be reproduced and triaged faster.
1018
+
1019
+ The report covers five sections:
1020
+
1021
+ - **Program** — `chroot-distro` version, Python version, data location.
1022
+ - **Host** — On Termux: Termux version, Android release/SDK, device. On Linux: distribution name/version, kernel, libc. Host CPU architecture and 32-bit support are shown in both cases.
1023
+ - **Capabilities** — Host checks that affect launching containers: privilege-escalation tool (`sudo`/`doas`/`pkexec`/`su`), Termux `/data` suid/exec flags, `binfmt_misc` + QEMU for foreign architectures, `unshare`/`nsenter` and user-namespace support, free disk space on the data dir, download cache size, and SELinux/AppArmor mode.
1024
+ - **Images** — Every installed container with rootfs size, detected architecture, image source, busy/idle status, plus source URL and image type from manifest labels when available.
1025
+ - **Analysis** — Lightweight checks per image: architecture mismatch against the host, missing manifest, empty or unusual rootfs.
1026
+
1027
+ Like `list` and `ps`, `info` is a read-only command that does not require root on Termux. On regular Linux hosts, it automatically elevates to inspect the same root-owned data directory where containers are installed.
1028
+
1029
+ ---
1030
+
1005
1031
  ### `help` — Show command help
1006
1032
 
1007
1033
  ```
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "chroot-distro"
7
- version = "2.2.0"
7
+ version = "2.3.0"
8
8
  description = "chroot-distro is a lightweight Linux container management utility built around chroot."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -10,6 +10,7 @@ from chroot_distro.commands.clear_cache import command_clear_cache
10
10
  from chroot_distro.commands.copy import command_copy
11
11
  from chroot_distro.commands.diff import command_diff
12
12
  from chroot_distro.commands.help import HELP_COMMANDS, command_help
13
+ from chroot_distro.commands.info import command_info
13
14
  from chroot_distro.commands.install import command_install
14
15
  from chroot_distro.commands.kill import command_kill
15
16
  from chroot_distro.commands.list_cmd import command_list
@@ -59,6 +60,7 @@ _COMMAND_HANDLERS = {
59
60
  "ps": command_ps,
60
61
  "diff": command_diff,
61
62
  "search": command_search,
63
+ "info": command_info,
62
64
  "help": command_help,
63
65
  }
64
66
 
@@ -186,13 +188,15 @@ def main() -> None:
186
188
  # Root check requirement:
187
189
  # - In normal Linux: all commands require root except "help"
188
190
  # - In Termux: all commands require root except "list" and "help"
189
- # `search` is network-only and never needs root. `ps` and `list` only read
190
- # /proc and container metadata, so they are exempt on Termux like `help`.
191
+ # `search` is network-only and never needs root. `ps`, `list`, and `info`
192
+ # only read /proc and container metadata, so they are exempt on Termux like
193
+ # `help`. On Linux containers are installed by root and live in root's data
194
+ # dir, so these commands still elevate there to read the right location.
191
195
  requires_root = False
192
196
  if canonical in ("help", "search"):
193
197
  requires_root = False
194
198
  elif IS_TERMUX:
195
- if canonical not in ("list", "ps"):
199
+ if canonical not in ("list", "ps", "info"):
196
200
  requires_root = True
197
201
  else:
198
202
  requires_root = True
@@ -640,6 +640,42 @@ HELP_PAGES: dict[str, dict[str, typing.Any]] = {
640
640
  f"{PROGRAM_NAME} search --limit 50 ubuntu",
641
641
  ],
642
642
  },
643
+ "info": {
644
+ "usage": "info",
645
+ "aliases": ("version-info", "nf"),
646
+ "summary": (
647
+ "Print a structured diagnostics report about the host and installed "
648
+ "containers. Useful to attach when filing a bug report so issues can "
649
+ "be reproduced and triaged faster."
650
+ "\n\n"
651
+ "The report covers five sections:"
652
+ "\n\n"
653
+ " Program chroot-distro version, Python version, data location.\n"
654
+ " Host On Termux: Termux version, Android release/SDK, device. "
655
+ "On Linux: distribution name/version, kernel, libc. Host CPU "
656
+ "architecture and 32-bit support are shown in both cases.\n"
657
+ " Capabilities Host checks that affect launching containers: "
658
+ "privilege-escalation tool (sudo/doas/pkexec/su), Termux /data "
659
+ "suid/exec flags, binfmt_misc + QEMU for foreign architectures, "
660
+ "unshare/nsenter and user-namespace support, free disk space on "
661
+ "the data dir, download cache size, and SELinux/AppArmor mode.\n"
662
+ " Images Every installed container with rootfs size, detected "
663
+ "architecture, image source, busy/idle status, plus source URL and "
664
+ "image type from manifest labels when available.\n"
665
+ " Analysis Lightweight checks per image: architecture mismatch "
666
+ "against the host, missing manifest, empty or unusual rootfs."
667
+ "\n\n"
668
+ "Read-only. Like 'list' it is rootless on Termux, but elevates on "
669
+ "regular Linux to read the root-owned data directory where "
670
+ "containers are installed."
671
+ ),
672
+ "options": [
673
+ ("-h, --help", "Show this help."),
674
+ ],
675
+ "examples": [
676
+ f"{PROGRAM_NAME} info",
677
+ ],
678
+ },
643
679
  "sync": {
644
680
  "usage": "sync [OPTIONS] [DIST:]SRC [DIST:]DEST",
645
681
  "summary": (
@@ -697,4 +733,5 @@ TOP_COMMANDS = [
697
733
  ("kill", "Forcibly stop a running container."),
698
734
  ("diff", "Inspect filesystem changes in a container."),
699
735
  ("search", "Search Docker Hub for images."),
736
+ ("info", "Show host and container diagnostics for bug reports."),
700
737
  ]