ybox 0.9.8__tar.gz → 0.9.9__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 (104) hide show
  1. {ybox-0.9.8/src/ybox.egg-info → ybox-0.9.9}/PKG-INFO +51 -38
  2. {ybox-0.9.8 → ybox-0.9.9}/README.md +50 -37
  3. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/__init__.py +1 -1
  4. {ybox-0.9.8 → ybox-0.9.9/src/ybox.egg-info}/PKG-INFO +51 -38
  5. {ybox-0.9.8 → ybox-0.9.9}/LICENSE +0 -0
  6. {ybox-0.9.8 → ybox-0.9.9}/MANIFEST.in +0 -0
  7. {ybox-0.9.8 → ybox-0.9.9}/pyproject.toml +0 -0
  8. {ybox-0.9.8 → ybox-0.9.9}/setup.cfg +0 -0
  9. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/cmd.py +0 -0
  10. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/completions/ybox.fish +0 -0
  11. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/add-gpg-key.sh +0 -0
  12. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/distro.ini +0 -0
  13. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/init-base.sh +0 -0
  14. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/init-user.sh +0 -0
  15. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/init.sh +0 -0
  16. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/list_fmt_long.py +0 -0
  17. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/arch/pkgdeps.py +0 -0
  18. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/check-package.sh +0 -0
  19. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/distro.ini +0 -0
  20. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/fetch-gpg-key-id.sh +0 -0
  21. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/init-base.sh +0 -0
  22. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/init-user.sh +0 -0
  23. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/init.sh +0 -0
  24. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/list_fmt_long.py +0 -0
  25. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-generic/pkgdeps.py +0 -0
  26. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-oldstable/distro.ini +0 -0
  27. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/deb-stable/distro.ini +0 -0
  28. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/supported.list +0 -0
  29. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/ubuntu2204/distro.ini +0 -0
  30. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/distros/ubuntu2404/distro.ini +0 -0
  31. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/profiles/apps.ini +0 -0
  32. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/profiles/basic.ini +0 -0
  33. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/profiles/dev.ini +0 -0
  34. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/profiles/games.ini +0 -0
  35. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/entrypoint-base.sh +0 -0
  36. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/entrypoint-common.sh +0 -0
  37. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/entrypoint-cp.sh +0 -0
  38. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/entrypoint-root.sh +0 -0
  39. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/entrypoint-user.sh +0 -0
  40. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/entrypoint.sh +0 -0
  41. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/prime-run +0 -0
  42. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/run-in-dir +0 -0
  43. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/conf/resources/run-user-bash-cmd +0 -0
  44. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/config.py +0 -0
  45. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/env.py +0 -0
  46. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/filelock.py +0 -0
  47. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/migrate/0.9.0-0.9.7:0.9.8.py +0 -0
  48. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/__init__.py +0 -0
  49. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/clean.py +0 -0
  50. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/info.py +0 -0
  51. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/inst.py +0 -0
  52. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/list.py +0 -0
  53. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/mark.py +0 -0
  54. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/repair.py +0 -0
  55. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/repo.py +0 -0
  56. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/search.py +0 -0
  57. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/uninst.py +0 -0
  58. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/pkg/update.py +0 -0
  59. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/print.py +0 -0
  60. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/__init__.py +0 -0
  61. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/cmd.py +0 -0
  62. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/control.py +0 -0
  63. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/create.py +0 -0
  64. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/destroy.py +0 -0
  65. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/graphics.py +0 -0
  66. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/logs.py +0 -0
  67. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/ls.py +0 -0
  68. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/run/pkg.py +0 -0
  69. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/0.9.1-added.sql +0 -0
  70. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/0.9.6-added.sql +0 -0
  71. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/init.sql +0 -0
  72. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/migrate/0.9.0:0.9.1.sql +0 -0
  73. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/migrate/0.9.1:0.9.2.sql +0 -0
  74. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/migrate/0.9.2:0.9.3.sql +0 -0
  75. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/schema/migrate/0.9.5:0.9.6.sql +0 -0
  76. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/state.py +0 -0
  77. {ybox-0.9.8 → ybox-0.9.9}/src/ybox/util.py +0 -0
  78. {ybox-0.9.8 → ybox-0.9.9}/src/ybox.egg-info/SOURCES.txt +0 -0
  79. {ybox-0.9.8 → ybox-0.9.9}/src/ybox.egg-info/dependency_links.txt +0 -0
  80. {ybox-0.9.8 → ybox-0.9.9}/src/ybox.egg-info/entry_points.txt +0 -0
  81. {ybox-0.9.8 → ybox-0.9.9}/src/ybox.egg-info/requires.txt +0 -0
  82. {ybox-0.9.8 → ybox-0.9.9}/src/ybox.egg-info/top_level.txt +0 -0
  83. {ybox-0.9.8 → ybox-0.9.9}/tests/create_migration_db.py +0 -0
  84. {ybox-0.9.8 → ybox-0.9.9}/tests/functional/__init__.py +0 -0
  85. {ybox-0.9.8 → ybox-0.9.9}/tests/functional/distro_base.py +0 -0
  86. {ybox-0.9.8 → ybox-0.9.9}/tests/functional/test_create_destroy.py +0 -0
  87. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/basic_no_shared.ini +0 -0
  88. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/containers.json +0 -0
  89. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/distro_minimal.ini +0 -0
  90. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/migration/0.9.0.db.gz +0 -0
  91. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/migration/0.9.1.db.gz +0 -0
  92. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/migration/0.9.2.db.gz +0 -0
  93. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/migration/0.9.5.db.gz +0 -0
  94. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/migration/0.9.6.db.gz +0 -0
  95. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/migration/0.9.7.db.gz +0 -0
  96. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/packages.json +0 -0
  97. {ybox-0.9.8 → ybox-0.9.9}/tests/resources/repos.json +0 -0
  98. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/__init__.py +0 -0
  99. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/test_cmd.py +0 -0
  100. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/test_config.py +0 -0
  101. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/test_env.py +0 -0
  102. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/test_filelock.py +0 -0
  103. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/test_state.py +0 -0
  104. {ybox-0.9.8 → ybox-0.9.9}/tests/unit/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ybox
3
- Version: 0.9.8
3
+ Version: 0.9.9
4
4
  Summary: Securely run Linux distribution inside a container
5
5
  Author-email: Sumedh Wale <sumwale@yahoo.com>, Vishal Rao <vishalrao@gmail.com>
6
6
  License: Copyright (c) 2024-2025 Sumedh Wale and contributors
@@ -101,7 +101,7 @@ you can simply launch it from your desktop environment's applications as usual.
101
101
 
102
102
  In this way this acts as a complete replacement of flatpak/snap while being able to choose
103
103
  from way bigger software repositories, and with applications configured the way they are
104
- supposed to be in the original Linux distribution (which is only Arch Linux for now).
104
+ supposed to be in the original Linux distribution.
105
105
  The big difference being that these are just containers where you can open a shell
106
106
  (using `ybox-cmd`) and learn/play as required, or micro-configure stuff. The shell will
107
107
  behave quite like a full Linux installation apart from missing system-level stuff like systemd.
@@ -109,37 +109,50 @@ behave quite like a full Linux installation apart from missing system-level stuf
109
109
 
110
110
  ## Installation
111
111
 
112
- If you have cloned the repository, then no further installation is required to run the utilities
113
- in `src` directory which can be done directly off the repository. In the near future this will
114
- also be published on `pypi.org`, so you will be able to install with `pip install --user ybox`.
115
-
116
- As of now the following is required:
117
-
118
- - clone the repo: `git clone https://github.com/sumwale/ybox.git`
119
- - rootless podman or docker
120
- * for podman this needs installation of `podman` and `slirp4netns`/`passt` packages,
121
- then setup /etc/subuid and /etc/subgid as noted here:
122
- [/etc/subuid and /etc/subgid configuration](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration)
123
- (many distributions like ubuntu will set up subuid/subgid for current user automatically)
124
- * for docker follow the instructions in the official [docs](https://docs.docker.com/engine/security/rootless/)
125
- - python version 3.9 or higher -- all fairly recent Linux distributions should satisfy this
126
- but still confirm with `python3 --version`
127
- - install [simple-term-menu](https://pypi.org/project/simple-term-menu/),
128
- [tabulate](https://pypi.org/project/tabulate/) and
129
- [packaging](https://pypi.org/project/packaging/), either from your distribution
130
- repository, if available, else: `pip install --user simple-term-menu packaging tabulate`
131
- (obviously you will need `pip` itself to be installed which should be in your
132
- distribution repositories e.g. ubuntu/debian have it as `python3-pip`)
133
-
134
- In the future, installer will take care of setting all of these up.
135
-
136
- Now you can simply go to the repository and run the `ybox-create` and other utilities from
137
- the `src` directory of the repository checkout. For convenience, you can symlink these to
138
- your `~/.local/bin` directory which should be in PATH in modern Linux distributions:
139
-
140
- ```sh
141
- ln -s <full path of checkout ybox directory>/src/ybox-* ~/.local/bin/
142
- ```
112
+ First install the requirements:
113
+
114
+ - Python version 3.9 or higher. All recent Linux distributions should satisfy
115
+ this but still confirm with `python3 --version`.
116
+ - Rootless podman or docker. Podman is recommended as it works out of the box for most
117
+ distributions and container runs as normal non-root user unlike docker that
118
+ needs to run as root in the container that may break some applications.
119
+ * For podman this needs installation of `podman` and `slirp4netns` (or `passt` with
120
+ podman >= 5) packages. Then setup /etc/subuid and /etc/subgid as noted here:
121
+ [/etc/subuid and /etc/subgid configuration](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration).
122
+ Most distributions will set up subuid/subgid for current user automatically
123
+ and rootless podman works out of the box after installation (tested on Ubuntu,
124
+ Arch and Debian). Check with `podman unshare cat /proc/self/uid_map` which
125
+ should show an output like:
126
+ ```
127
+ 0 1000 1
128
+ 1 100000 65536
129
+ ```
130
+ where `1000` is the current user's ID (output of `id -u`).
131
+ * For docker follow the instructions in the official [docs](https://docs.docker.com/engine/security/rootless/).
132
+
133
+ Finally install the `ybox` package for the current user using `pip` (`pip` is installed
134
+ on most Linux distributions by default, or install from your distribution's
135
+ repository e.g. `python3-pip` for Debian/Ubuntu based distros, `python-pip` on Arch):
136
+
137
+ ```sh
138
+ pip install ybox --user
139
+ ```
140
+
141
+ Note that newer versions of `pip` disallow installing packages directly and instead
142
+ require you to install in a custom virtual environment which can be done manually
143
+ (e.g. bash/zsh: `python3 -m venv ybox-venv && source ybox-env/bin/activate`,
144
+ fish: `python3 -m venv ybox-venv && source ybox-env/bin/activate.fish`)
145
+ or automatically using `pipx`. Alternatively you can add `--break-system-packages`
146
+ flag to the `pip` command above or add it globally for all future packages using
147
+ `python3 -m pip config set global.break-system-packages true`. The alternative
148
+ approach works well for `ybox` which has a very minimal set of dependencies but
149
+ in the rare case you see any issues due to package conflicts, use `pipx` or
150
+ manual virtual environment.
151
+
152
+ Now you can run the `ybox-create` and other utilities that are normally installed
153
+ in your `~/.local/bin` directory which should be in PATH for modern Linux distributions.
154
+ If not, then add it to your PATH in your `.bashrc` (for bash) or the configuration
155
+ file of your login shell.
143
156
 
144
157
  All the `ybox-*` utilities will show detailed help with the `-h`/`--help` option.
145
158
 
@@ -182,7 +195,7 @@ e.g. `~/.local/share/ybox/ybox-arch_apps/home` for the above example.
182
195
 
183
196
  When shared root directory is enabled (which is the default in the shipped profiles), then
184
197
  it uses the common distribution path in `~/.local/share/ybox/SHARED_ROOTS/<distribution>`
185
- by default i.e. `~/.local/share/ybox/SHARED_ROOTS/arch` for the Arch Linux guests.
198
+ by default e.g. `~/.local/share/ybox/SHARED_ROOTS/arch` for the Arch Linux guests.
186
199
 
187
200
  For more advanced usage, you can copy from the available profiles in `src/ybox/conf/profiles`
188
201
  into `~/.config/ybox/profiles`, then edit as required. The `basic.ini` profile lists
@@ -329,10 +342,10 @@ ybox-destroy ybox-arch_apps
329
342
  ```
330
343
 
331
344
  Will destroy the `apps` container created in the example before. This does not delete the
332
- $HOME files, nor does it delete the shared root directory (if enabled). Hence, if you create
345
+ `$HOME` files, nor does it delete the shared root directory (if enabled). Hence, if you create
333
346
  a new container having the same shared root, then it will inherit everything installed
334
347
  previously. Likewise, if you create the container with the same profile again, then it
335
- will also have the $HOME as before if you do not explicitly delete the directories
348
+ will also have the `$HOME` as before if you do not explicitly delete the directories
336
349
  in `~/.local/share/ybox`.
337
350
 
338
351
 
@@ -361,10 +374,10 @@ ybox-cmd ybox-arch_apps -- ls -l
361
374
  ```
362
375
 
363
376
  The default profiles also link the .bashrc and starship configuration files from your host
364
- $HOME directory by default, so you should see the same bash shell configuration as in your
377
+ `$HOME` directory by default, so you should see the same bash shell configuration as in your
365
378
  host. These are linked in read-only mode, so if you want to change these auto-linked
366
379
  configuration files inside the container, then you will need to create a copy from the symlink
367
- first (but then it will lose the link from the host $HOME).
380
+ first (but then it will lose the link from the host `$HOME`).
368
381
 
369
382
  A shell on a container will act like a native Linux distribution environment for most purposes.
370
383
  The one prominent missing thing is systemd which is not enabled deliberately since it requires
@@ -57,7 +57,7 @@ you can simply launch it from your desktop environment's applications as usual.
57
57
 
58
58
  In this way this acts as a complete replacement of flatpak/snap while being able to choose
59
59
  from way bigger software repositories, and with applications configured the way they are
60
- supposed to be in the original Linux distribution (which is only Arch Linux for now).
60
+ supposed to be in the original Linux distribution.
61
61
  The big difference being that these are just containers where you can open a shell
62
62
  (using `ybox-cmd`) and learn/play as required, or micro-configure stuff. The shell will
63
63
  behave quite like a full Linux installation apart from missing system-level stuff like systemd.
@@ -65,37 +65,50 @@ behave quite like a full Linux installation apart from missing system-level stuf
65
65
 
66
66
  ## Installation
67
67
 
68
- If you have cloned the repository, then no further installation is required to run the utilities
69
- in `src` directory which can be done directly off the repository. In the near future this will
70
- also be published on `pypi.org`, so you will be able to install with `pip install --user ybox`.
71
-
72
- As of now the following is required:
73
-
74
- - clone the repo: `git clone https://github.com/sumwale/ybox.git`
75
- - rootless podman or docker
76
- * for podman this needs installation of `podman` and `slirp4netns`/`passt` packages,
77
- then setup /etc/subuid and /etc/subgid as noted here:
78
- [/etc/subuid and /etc/subgid configuration](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration)
79
- (many distributions like ubuntu will set up subuid/subgid for current user automatically)
80
- * for docker follow the instructions in the official [docs](https://docs.docker.com/engine/security/rootless/)
81
- - python version 3.9 or higher -- all fairly recent Linux distributions should satisfy this
82
- but still confirm with `python3 --version`
83
- - install [simple-term-menu](https://pypi.org/project/simple-term-menu/),
84
- [tabulate](https://pypi.org/project/tabulate/) and
85
- [packaging](https://pypi.org/project/packaging/), either from your distribution
86
- repository, if available, else: `pip install --user simple-term-menu packaging tabulate`
87
- (obviously you will need `pip` itself to be installed which should be in your
88
- distribution repositories e.g. ubuntu/debian have it as `python3-pip`)
89
-
90
- In the future, installer will take care of setting all of these up.
91
-
92
- Now you can simply go to the repository and run the `ybox-create` and other utilities from
93
- the `src` directory of the repository checkout. For convenience, you can symlink these to
94
- your `~/.local/bin` directory which should be in PATH in modern Linux distributions:
95
-
96
- ```sh
97
- ln -s <full path of checkout ybox directory>/src/ybox-* ~/.local/bin/
98
- ```
68
+ First install the requirements:
69
+
70
+ - Python version 3.9 or higher. All recent Linux distributions should satisfy
71
+ this but still confirm with `python3 --version`.
72
+ - Rootless podman or docker. Podman is recommended as it works out of the box for most
73
+ distributions and container runs as normal non-root user unlike docker that
74
+ needs to run as root in the container that may break some applications.
75
+ * For podman this needs installation of `podman` and `slirp4netns` (or `passt` with
76
+ podman >= 5) packages. Then setup /etc/subuid and /etc/subgid as noted here:
77
+ [/etc/subuid and /etc/subgid configuration](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration).
78
+ Most distributions will set up subuid/subgid for current user automatically
79
+ and rootless podman works out of the box after installation (tested on Ubuntu,
80
+ Arch and Debian). Check with `podman unshare cat /proc/self/uid_map` which
81
+ should show an output like:
82
+ ```
83
+ 0 1000 1
84
+ 1 100000 65536
85
+ ```
86
+ where `1000` is the current user's ID (output of `id -u`).
87
+ * For docker follow the instructions in the official [docs](https://docs.docker.com/engine/security/rootless/).
88
+
89
+ Finally install the `ybox` package for the current user using `pip` (`pip` is installed
90
+ on most Linux distributions by default, or install from your distribution's
91
+ repository e.g. `python3-pip` for Debian/Ubuntu based distros, `python-pip` on Arch):
92
+
93
+ ```sh
94
+ pip install ybox --user
95
+ ```
96
+
97
+ Note that newer versions of `pip` disallow installing packages directly and instead
98
+ require you to install in a custom virtual environment which can be done manually
99
+ (e.g. bash/zsh: `python3 -m venv ybox-venv && source ybox-env/bin/activate`,
100
+ fish: `python3 -m venv ybox-venv && source ybox-env/bin/activate.fish`)
101
+ or automatically using `pipx`. Alternatively you can add `--break-system-packages`
102
+ flag to the `pip` command above or add it globally for all future packages using
103
+ `python3 -m pip config set global.break-system-packages true`. The alternative
104
+ approach works well for `ybox` which has a very minimal set of dependencies but
105
+ in the rare case you see any issues due to package conflicts, use `pipx` or
106
+ manual virtual environment.
107
+
108
+ Now you can run the `ybox-create` and other utilities that are normally installed
109
+ in your `~/.local/bin` directory which should be in PATH for modern Linux distributions.
110
+ If not, then add it to your PATH in your `.bashrc` (for bash) or the configuration
111
+ file of your login shell.
99
112
 
100
113
  All the `ybox-*` utilities will show detailed help with the `-h`/`--help` option.
101
114
 
@@ -138,7 +151,7 @@ e.g. `~/.local/share/ybox/ybox-arch_apps/home` for the above example.
138
151
 
139
152
  When shared root directory is enabled (which is the default in the shipped profiles), then
140
153
  it uses the common distribution path in `~/.local/share/ybox/SHARED_ROOTS/<distribution>`
141
- by default i.e. `~/.local/share/ybox/SHARED_ROOTS/arch` for the Arch Linux guests.
154
+ by default e.g. `~/.local/share/ybox/SHARED_ROOTS/arch` for the Arch Linux guests.
142
155
 
143
156
  For more advanced usage, you can copy from the available profiles in `src/ybox/conf/profiles`
144
157
  into `~/.config/ybox/profiles`, then edit as required. The `basic.ini` profile lists
@@ -285,10 +298,10 @@ ybox-destroy ybox-arch_apps
285
298
  ```
286
299
 
287
300
  Will destroy the `apps` container created in the example before. This does not delete the
288
- $HOME files, nor does it delete the shared root directory (if enabled). Hence, if you create
301
+ `$HOME` files, nor does it delete the shared root directory (if enabled). Hence, if you create
289
302
  a new container having the same shared root, then it will inherit everything installed
290
303
  previously. Likewise, if you create the container with the same profile again, then it
291
- will also have the $HOME as before if you do not explicitly delete the directories
304
+ will also have the `$HOME` as before if you do not explicitly delete the directories
292
305
  in `~/.local/share/ybox`.
293
306
 
294
307
 
@@ -317,10 +330,10 @@ ybox-cmd ybox-arch_apps -- ls -l
317
330
  ```
318
331
 
319
332
  The default profiles also link the .bashrc and starship configuration files from your host
320
- $HOME directory by default, so you should see the same bash shell configuration as in your
333
+ `$HOME` directory by default, so you should see the same bash shell configuration as in your
321
334
  host. These are linked in read-only mode, so if you want to change these auto-linked
322
335
  configuration files inside the container, then you will need to create a copy from the symlink
323
- first (but then it will lose the link from the host $HOME).
336
+ first (but then it will lose the link from the host `$HOME`).
324
337
 
325
338
  A shell on a container will act like a native Linux distribution environment for most purposes.
326
339
  The one prominent missing thing is systemd which is not enabled deliberately since it requires
@@ -1,2 +1,2 @@
1
1
  """`ybox` is a tool to easily manage linux distributions in containers"""
2
- __version__ = "0.9.8"
2
+ __version__ = "0.9.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ybox
3
- Version: 0.9.8
3
+ Version: 0.9.9
4
4
  Summary: Securely run Linux distribution inside a container
5
5
  Author-email: Sumedh Wale <sumwale@yahoo.com>, Vishal Rao <vishalrao@gmail.com>
6
6
  License: Copyright (c) 2024-2025 Sumedh Wale and contributors
@@ -101,7 +101,7 @@ you can simply launch it from your desktop environment's applications as usual.
101
101
 
102
102
  In this way this acts as a complete replacement of flatpak/snap while being able to choose
103
103
  from way bigger software repositories, and with applications configured the way they are
104
- supposed to be in the original Linux distribution (which is only Arch Linux for now).
104
+ supposed to be in the original Linux distribution.
105
105
  The big difference being that these are just containers where you can open a shell
106
106
  (using `ybox-cmd`) and learn/play as required, or micro-configure stuff. The shell will
107
107
  behave quite like a full Linux installation apart from missing system-level stuff like systemd.
@@ -109,37 +109,50 @@ behave quite like a full Linux installation apart from missing system-level stuf
109
109
 
110
110
  ## Installation
111
111
 
112
- If you have cloned the repository, then no further installation is required to run the utilities
113
- in `src` directory which can be done directly off the repository. In the near future this will
114
- also be published on `pypi.org`, so you will be able to install with `pip install --user ybox`.
115
-
116
- As of now the following is required:
117
-
118
- - clone the repo: `git clone https://github.com/sumwale/ybox.git`
119
- - rootless podman or docker
120
- * for podman this needs installation of `podman` and `slirp4netns`/`passt` packages,
121
- then setup /etc/subuid and /etc/subgid as noted here:
122
- [/etc/subuid and /etc/subgid configuration](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration)
123
- (many distributions like ubuntu will set up subuid/subgid for current user automatically)
124
- * for docker follow the instructions in the official [docs](https://docs.docker.com/engine/security/rootless/)
125
- - python version 3.9 or higher -- all fairly recent Linux distributions should satisfy this
126
- but still confirm with `python3 --version`
127
- - install [simple-term-menu](https://pypi.org/project/simple-term-menu/),
128
- [tabulate](https://pypi.org/project/tabulate/) and
129
- [packaging](https://pypi.org/project/packaging/), either from your distribution
130
- repository, if available, else: `pip install --user simple-term-menu packaging tabulate`
131
- (obviously you will need `pip` itself to be installed which should be in your
132
- distribution repositories e.g. ubuntu/debian have it as `python3-pip`)
133
-
134
- In the future, installer will take care of setting all of these up.
135
-
136
- Now you can simply go to the repository and run the `ybox-create` and other utilities from
137
- the `src` directory of the repository checkout. For convenience, you can symlink these to
138
- your `~/.local/bin` directory which should be in PATH in modern Linux distributions:
139
-
140
- ```sh
141
- ln -s <full path of checkout ybox directory>/src/ybox-* ~/.local/bin/
142
- ```
112
+ First install the requirements:
113
+
114
+ - Python version 3.9 or higher. All recent Linux distributions should satisfy
115
+ this but still confirm with `python3 --version`.
116
+ - Rootless podman or docker. Podman is recommended as it works out of the box for most
117
+ distributions and container runs as normal non-root user unlike docker that
118
+ needs to run as root in the container that may break some applications.
119
+ * For podman this needs installation of `podman` and `slirp4netns` (or `passt` with
120
+ podman >= 5) packages. Then setup /etc/subuid and /etc/subgid as noted here:
121
+ [/etc/subuid and /etc/subgid configuration](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration).
122
+ Most distributions will set up subuid/subgid for current user automatically
123
+ and rootless podman works out of the box after installation (tested on Ubuntu,
124
+ Arch and Debian). Check with `podman unshare cat /proc/self/uid_map` which
125
+ should show an output like:
126
+ ```
127
+ 0 1000 1
128
+ 1 100000 65536
129
+ ```
130
+ where `1000` is the current user's ID (output of `id -u`).
131
+ * For docker follow the instructions in the official [docs](https://docs.docker.com/engine/security/rootless/).
132
+
133
+ Finally install the `ybox` package for the current user using `pip` (`pip` is installed
134
+ on most Linux distributions by default, or install from your distribution's
135
+ repository e.g. `python3-pip` for Debian/Ubuntu based distros, `python-pip` on Arch):
136
+
137
+ ```sh
138
+ pip install ybox --user
139
+ ```
140
+
141
+ Note that newer versions of `pip` disallow installing packages directly and instead
142
+ require you to install in a custom virtual environment which can be done manually
143
+ (e.g. bash/zsh: `python3 -m venv ybox-venv && source ybox-env/bin/activate`,
144
+ fish: `python3 -m venv ybox-venv && source ybox-env/bin/activate.fish`)
145
+ or automatically using `pipx`. Alternatively you can add `--break-system-packages`
146
+ flag to the `pip` command above or add it globally for all future packages using
147
+ `python3 -m pip config set global.break-system-packages true`. The alternative
148
+ approach works well for `ybox` which has a very minimal set of dependencies but
149
+ in the rare case you see any issues due to package conflicts, use `pipx` or
150
+ manual virtual environment.
151
+
152
+ Now you can run the `ybox-create` and other utilities that are normally installed
153
+ in your `~/.local/bin` directory which should be in PATH for modern Linux distributions.
154
+ If not, then add it to your PATH in your `.bashrc` (for bash) or the configuration
155
+ file of your login shell.
143
156
 
144
157
  All the `ybox-*` utilities will show detailed help with the `-h`/`--help` option.
145
158
 
@@ -182,7 +195,7 @@ e.g. `~/.local/share/ybox/ybox-arch_apps/home` for the above example.
182
195
 
183
196
  When shared root directory is enabled (which is the default in the shipped profiles), then
184
197
  it uses the common distribution path in `~/.local/share/ybox/SHARED_ROOTS/<distribution>`
185
- by default i.e. `~/.local/share/ybox/SHARED_ROOTS/arch` for the Arch Linux guests.
198
+ by default e.g. `~/.local/share/ybox/SHARED_ROOTS/arch` for the Arch Linux guests.
186
199
 
187
200
  For more advanced usage, you can copy from the available profiles in `src/ybox/conf/profiles`
188
201
  into `~/.config/ybox/profiles`, then edit as required. The `basic.ini` profile lists
@@ -329,10 +342,10 @@ ybox-destroy ybox-arch_apps
329
342
  ```
330
343
 
331
344
  Will destroy the `apps` container created in the example before. This does not delete the
332
- $HOME files, nor does it delete the shared root directory (if enabled). Hence, if you create
345
+ `$HOME` files, nor does it delete the shared root directory (if enabled). Hence, if you create
333
346
  a new container having the same shared root, then it will inherit everything installed
334
347
  previously. Likewise, if you create the container with the same profile again, then it
335
- will also have the $HOME as before if you do not explicitly delete the directories
348
+ will also have the `$HOME` as before if you do not explicitly delete the directories
336
349
  in `~/.local/share/ybox`.
337
350
 
338
351
 
@@ -361,10 +374,10 @@ ybox-cmd ybox-arch_apps -- ls -l
361
374
  ```
362
375
 
363
376
  The default profiles also link the .bashrc and starship configuration files from your host
364
- $HOME directory by default, so you should see the same bash shell configuration as in your
377
+ `$HOME` directory by default, so you should see the same bash shell configuration as in your
365
378
  host. These are linked in read-only mode, so if you want to change these auto-linked
366
379
  configuration files inside the container, then you will need to create a copy from the symlink
367
- first (but then it will lose the link from the host $HOME).
380
+ first (but then it will lose the link from the host `$HOME`).
368
381
 
369
382
  A shell on a container will act like a native Linux distribution environment for most purposes.
370
383
  The one prominent missing thing is systemd which is not enabled deliberately since it requires
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes