From 43c54ed864f035392f56fd9bc7a9faefe9a4d66a Mon Sep 17 00:00:00 2001 From: Matthew Roy Date: Thu, 14 Nov 2019 10:37:13 -0500 Subject: [PATCH 1/3] Include instructions for snaps Include instructions for installing snapd and qubes-snapd-helper from issue #2766 (https://github.com/QubesOS/qubes-issues/issues/2766) based on the instructions from @ioleo that worked for me. --- user/common-tasks/software-update-domu.md | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/user/common-tasks/software-update-domu.md b/user/common-tasks/software-update-domu.md index f4418ca5..1c666a04 100644 --- a/user/common-tasks/software-update-domu.md +++ b/user/common-tasks/software-update-domu.md @@ -198,6 +198,70 @@ Example policy file in R4.0 (with Whonix installed, but not set as default Updat @anyvm @anyvm deny ``` +# Installing Snap Packages + +Snap packages do not use the normal update channels for Debian and Fedora (dnf and apt) and are often installed as the user rather than as root. To support these in an AppVM you need to take the following steps: + +1. In the **TemplateVM** you must install snapd and qubes-snapd-helper: +Open a terminal in TemplateVM and run: +```shell_session +[user@fedora-30-snap-demo ~]$ sudo dnf install snapd qubes-snapd-helper +Last metadata expiration check: 0:55:39 ago on Thu Nov 14 09:26:47 2019. +Dependencies resolved. +======================================================================================================== + Package Arch Version Repository Size +======================================================================================================== +Installing: + snapd x86_64 2.42.1-1.fc30 updates 17 M + qubes-snapd-helper noarch 1.0.1-1.fc30 qubes-vm-r4.0-current 10 k +Installing dependencies: +[...] + +Transaction Summary +======================================================================================================== +Install 20 Packages + +Total download size: 37 M +Installed size: 121 M +Is this ok [y/N]: y + +Downloading Packages: +[..] +Failed to resolve booleanif statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:1174 +/usr/sbin/semodule: Failed! +[...] +Last metadata expiration check: 0:57:08 ago on Thu Nov 14 09:26:47 2019. +Notifying dom0 about installed applications + +Installed: + snapd-2.42.1-1.fc30.x86_64 qubes-snapd-helper-1.0.1-1.fc30.noarch +[...] +Complete! +``` +You may see a message "Failed to resolve booleanif statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:1174 +/usr/sbin/semodule: Failed!". This is expected and you cna safely continue. + +Shutdown the TemplateVM: +```shell_session +[user@fedora-30-snap-demo ~]$ sudo shutdown -h now +``` + +2. Now open the **AppVM** in which you would like to install the Snap application and run a terminal: +```shell_session +[user@snap-demo-AppVM ~]$ snap install +``` +when the install is complete shutdown the AppVM: +```shell_session +[user@snap-demo-AppVM ~]$ sudo shutdown -h now +``` + +3. Refresh the Applications list for the AppVM. +In the Qubes Menu for the **AppVM*** launch the Qube Settings. +Then go to the Applicaitons tab and click "Refresh Applications" + +The refresh will take a few minutes, but after it's complete the Snap app will appear in the AppVM's list of availble applications. At this point the snap will be persistant within the AppVM and will receive updates when the AppVM is running. + + [domUs]: /doc/glossary/#domu [TemplateVMs]: /doc/templates/ [StandaloneVM]: /doc/standalone-and-hvm/ From 74744e8cb0556fb0970fd84e0c4a92f3896a0ea2 Mon Sep 17 00:00:00 2001 From: Matthew Roy Date: Mon, 18 Nov 2019 14:47:25 -0500 Subject: [PATCH 2/3] Clean up spelling and clarify 2 sentences --- user/common-tasks/software-update-domu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user/common-tasks/software-update-domu.md b/user/common-tasks/software-update-domu.md index 1c666a04..9db46553 100644 --- a/user/common-tasks/software-update-domu.md +++ b/user/common-tasks/software-update-domu.md @@ -200,7 +200,7 @@ Example policy file in R4.0 (with Whonix installed, but not set as default Updat # Installing Snap Packages -Snap packages do not use the normal update channels for Debian and Fedora (dnf and apt) and are often installed as the user rather than as root. To support these in an AppVM you need to take the following steps: +Snap packages do not use the normal update channels for Debian and Fedora (apt and dnf) and are often installed as the user rather than as root. To support these in an AppVM you need to take the following steps: 1. In the **TemplateVM** you must install snapd and qubes-snapd-helper: Open a terminal in TemplateVM and run: @@ -239,7 +239,7 @@ Installed: Complete! ``` You may see a message "Failed to resolve booleanif statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:1174 -/usr/sbin/semodule: Failed!". This is expected and you cna safely continue. +/usr/sbin/semodule: Failed!". This is expected and you can safely continue. Shutdown the TemplateVM: ```shell_session @@ -257,9 +257,9 @@ when the install is complete shutdown the AppVM: 3. Refresh the Applications list for the AppVM. In the Qubes Menu for the **AppVM*** launch the Qube Settings. -Then go to the Applicaitons tab and click "Refresh Applications" +Then go to the Applications tab and click "Refresh Applications" -The refresh will take a few minutes, but after it's complete the Snap app will appear in the AppVM's list of availble applications. At this point the snap will be persistant within the AppVM and will receive updates when the AppVM is running. +The refresh will take a few minutes; after it's complete the Snap app will appear in the AppVM's list of available applications. At this point the snap will be persistent within the AppVM and will receive updates when the AppVM is running. [domUs]: /doc/glossary/#domu From d457c3009fb5a3e3b04fed101b0c35d6b5a2438c Mon Sep 17 00:00:00 2001 From: Matthew Roy Date: Tue, 19 Nov 2019 12:36:36 -0500 Subject: [PATCH 3/3] Remove extra AppVM restart Implement comments by @marmarek that an AppVM shutdown is unneeded and the AppVM will just be restarted by dom0 in the following step of the install process. --- user/common-tasks/software-update-domu.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/user/common-tasks/software-update-domu.md b/user/common-tasks/software-update-domu.md index 9db46553..c749b161 100644 --- a/user/common-tasks/software-update-domu.md +++ b/user/common-tasks/software-update-domu.md @@ -250,10 +250,7 @@ Shutdown the TemplateVM: ```shell_session [user@snap-demo-AppVM ~]$ snap install ``` -when the install is complete shutdown the AppVM: -```shell_session -[user@snap-demo-AppVM ~]$ sudo shutdown -h now -``` +When the install is complete you can close the terminal window. 3. Refresh the Applications list for the AppVM. In the Qubes Menu for the **AppVM*** launch the Qube Settings.