1 @product @check_tor_leaks
3 Feature: Additional software
5 I may want to install softwares not shipped in Tails
6 And have them installed automatically when I enable persistence in the Greeter
8 # An issue with this feature is that scenarios depend on each
9 # other. When editing this feature, make sure you understand these
10 # dependencies (which are documented below).
12 Scenario: I am warned I can not use Additional Software when I start Tails from a DVD and install a package
13 Given I have started Tails from DVD and logged in with an administration password and the network is connected
14 And I update APT using apt
15 When I install "sslh" using apt
16 Then I am notified I can not use Additional Software for "sslh"
17 And I can open the Additional Software documentation from the notification
19 # Here we install the sslh package to test if debconf does not prevent
20 # Additional Software from automatically installing packages.
21 # This scenario also sets up the "__internal" drive that the following
22 # scenarios will reuse.
23 # Note: the "__internal" drive will keep its state across scenarios
24 # and features until one of its snapshots is restored.
25 Scenario: I set up Additional Software when installing a package without persistent partition and the package is installed next time I start Tails
26 Given I start Tails from a freshly installed USB drive with an administration password and the network is plugged and I login
27 And I update APT using apt
28 And I install "sslh" using apt
29 Then I am proposed to add the "sslh" package to my Additional Software
30 And I create a persistent storage and activate the Additional Software feature
31 And I shutdown Tails and wait for the computer to power off
32 And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
33 And Additional Software is correctly configured for package "sslh"
34 And the package "sslh" is installed after Additional Software has been started
36 # Depends on scenario: I set up Additional Software when installing a package without persistent partition and the package is installed next time I start Tails
37 Scenario: The Additional Software dpkg hook notices when persistence is locked down while installing a package
39 And I start Tails from USB drive "__internal" and I login with an administration password
40 And I update APT using apt
41 When I install "makepp" using apt
42 Then the Additional Software dpkg hook has been run for package "makepp" and notices the persistence is locked
43 And the package "makepp" is installed
45 # Depends on scenario: I set up Additional Software when installing a package without persistent partition and the package is installed next time I start Tails
46 Scenario: My Additional Software list is configurable through a GUI or through notifications when I install or remove packages with APT or Synaptic
48 And I start Tails from USB drive "__internal" and I login with persistence enabled and an administration password
49 When I uninstall "sslh" using apt
50 And I accept removing "sslh" from Additional Software
51 Then "sslh" is not in the list of Additional Software
53 And I update APT using Synaptic
54 And I install "cowsay" using Synaptic
55 And I accept adding "cowsay" to Additional Software
56 Then Additional Software is correctly configured for package "cowsay"
57 When I uninstall "cowsay" using apt
58 And I refuse removing "cowsay" from Additional Software
59 Then Additional Software is correctly configured for package "cowsay"
60 When I start "Additional Software" via GNOME Activities Overview
61 And I remove "cowsay" from the list of Additional Software using Additional Software GUI
62 Then "cowsay" is not in the list of Additional Software
63 When I install "cowsay" using apt
64 And I refuse adding "cowsay" to Additional Software
65 Then "cowsay" is not in the list of Additional Software
67 # Depends on scenario: My Additional Software list is configurable through a GUI or through notifications when I install or remove packages with APT or Synaptic
68 # See https://tails.boum.org/blueprint/additional_software_packages/offline_mode/#incomplete-online-upgrade for high level logic
69 Scenario: Recovering in offline mode after Additional Software previously failed to upgrade and then succeed to upgrade when online
71 And I start Tails from USB drive "__internal" and I login with persistence enabled and an administration password
72 And I configure APT to prefer an old version of cowsay
73 When I install an old version "3.03+dfsg2-1" of the cowsay package using apt
74 And I accept adding "cowsay" to Additional Software
75 And Additional Software is correctly configured for package "cowsay"
76 And I shutdown Tails and wait for the computer to power off
77 And I start Tails from USB drive "__internal" with network unplugged
78 And I enable persistence
79 # We need to add back this custom APT source for the Additional Software
80 # install step, as it was not saved in persistence
81 And I configure APT to prefer an old version of cowsay
82 And I log in to a new session
83 And the installed version of package "cowsay" is "3.03+dfsg2-1" after Additional Software has been started
84 And I revert the APT tweaks that made it prefer an old version of cowsay
85 # We remove the newest package after it has been downloaded and before
86 # it is installed, so that the upgrade process fails
87 And I prepare the Additional Software upgrade process to fail
88 And the network is plugged
90 # Note: the next step races against the appearance of the "The
91 # upgrade of your additional software failed" notification.
92 # It should win most of the time, which is good, but there's no
93 # guarantee it does. If it loses, then it'll remove the notification
94 # we'll be trying to interact with below ("I can open…")
95 And all notifications have disappeared
96 And available upgrades have been checked
97 And I see the "The upgrade of your additional software failed" notification after at most 300 seconds
98 And I can open the Additional Software configuration window from the notification
99 And I shutdown Tails and wait for the computer to power off
100 And I start Tails from USB drive "__internal" with network unplugged
101 And I enable persistence
102 # We need to add back this custom APT source for the Additional Software
103 # install step, as it was not saved in persistence
104 And I configure APT to prefer an old version of cowsay
105 And I log in to a new session
106 And the installed version of package "cowsay" is "3.03+dfsg2-1" after Additional Software has been started
107 And I revert the APT tweaks that made it prefer an old version of cowsay
108 And the network is plugged
110 Then the Additional Software upgrade service has started
111 And the installed version of package "cowsay" is newer than "3.03+dfsg2-1"
113 # Depends on scenario: Recovering in offline mode after Additional Software previously failed to upgrade and then succeed to upgrade when online
114 Scenario: I am notified when Additional Software fails to install a package
116 And I start Tails from USB drive "__internal" with network unplugged
117 And I enable persistence
118 And I remove the "cowsay" deb files from the APT cache
119 # Prevent the "Warning: virtual machine detected!" notification from racing
120 # with the one we'll be interacting with below.
121 And I disable the tails-virt-notify-user.service user unit
122 And I log in to a new session
123 Then I see the "The installation of your additional software failed" notification after at most 300 seconds
124 And I can open the Additional Software log file from the notification
125 And the package "cowsay" is not installed