-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: uninstall cacher client based on tag
For: #41
- Loading branch information
1 parent
fb7db5d
commit 084d08f
Showing
1 changed file
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ sudo qubesctl --skip-dom0 --targets=tpl-sys-cacher state.apply sys-cacher.instal | |
sudo qubesctl --skip-dom0 --targets=sys-cacher state.apply sys-cacher.configure | ||
sudo qubesctl --skip-dom0 --targets=sys-cacher-browser state.apply sys-cacher.configure-browser | ||
sudo qubesctl state.apply sys-cacher.appmenus,sys-cacher.tag | ||
sudo qubesctl --skip-dom0 --templates state.apply sys-cacher.install-client | ||
sudo qubesctl --skip-dom0 --targets="$(qvm-ls --no-spinner --raw-list --tags updatevm-sys-cacher | tr "\n" ",")" state.apply sys-cacher.install-client | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ben-grande
via email
Author
Owner
|
||
``` | ||
<!-- pkg:end:post-install --> | ||
|
||
|
@@ -99,19 +99,22 @@ By default, only templates will use the proxy to update, if you want to cache | |
Non-TemplateVMs updates or simply make them functional again, the qube will | ||
need the `service.updates-proxy-setup` feature set: | ||
```sh | ||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply sys-cacher.install-client | ||
qvm-tags add QUBE updatevm-sys-cacher | ||
qvm-features QUBE service.updates-proxy-setup 1 | ||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply sys-cacher.install-client | ||
``` | ||
Don't forget to restart the qube. | ||
|
||
If you don't want or can't restart the qube, such as DispVMs, where you would | ||
lose the current session, run the above commands plus the following inside the | ||
qube: | ||
lose the current session: | ||
```sh | ||
sudo touch /var/run/qubes-service/updates-proxy-setup | ||
sudo /usr/lib/qubes/update-proxy-configs | ||
sudo systemctl restart qubes-updates-proxy-forwarder.socket | ||
qvm-tags add QUBE updatevm-sys-cacher | ||
qvm-features QUBE service.updates-proxy-setup 1 | ||
qvm-run --user=root QUBE -- " | ||
touch /var/run/qubes-service/updates-proxy-setup | ||
/usr/lib/qubes/update-proxy-configs | ||
systemctl restart qubes-updates-proxy-forwarder.socket" | ||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply sys-cacher.install-client | ||
``` | ||
|
||
### Rewrite URIs inside the qube | ||
|
@@ -131,21 +134,22 @@ sudo apt-cacher-ng-repo uninstal | |
- Top: | ||
```sh | ||
sudo qubesctl top.enable sys-cacher.deinit | ||
sudo qubesctl --templates state.apply | ||
sudo qubesctl --targets="$(qvm-ls --no-spinner --raw-list --tags updatevm-sys-cacher | tr "\n" ",")" state.apply | ||
sudo qubesctl top.disable sys-cacher.deinit | ||
``` | ||
|
||
- State: | ||
```sh | ||
sudo qubesctl state.apply sys-cacher.remove-policy | ||
sudo qubesctl --skip-dom0 --targets="$(qvm-ls --no-spinner --raw-list --tags updatevm-sys-cacher | tr "\n" ",")" state.apply sys-cacher.uninstall-client | ||
sudo qubesctl state.apply sys-cacher.untag | ||
sudo qubesctl --skip-dom0 --templates state.apply sys-cacher.uninstall-client | ||
``` | ||
|
||
If you want to use the standard proxy for a few templates: | ||
If you want to use the standard proxy for a few qubes, only uninstall it | ||
from the templates that you don't want to cache packages: | ||
```sh | ||
sudo qubesctl --skip-dom0 --targets=TEMPLATE state.apply sys-cacher.uninstall-client | ||
qvm-tags del TEMPLATE updatevm-sys-cacher | ||
sudo qubesctl --skip-dom0 --targets=QUBE state.apply sys-cacher.uninstall-client | ||
qvm-tags del QUBE updatevm-sys-cacher | ||
``` | ||
|
||
## Credits | ||
|
You know I like to avoid issuing
qubesctl
commands with targets defined explicitly, but as manual (semi-automatic) targetting goes, this is a neat way to make things less error-prone than manually listing qube names! Nice trade-off! 👍