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