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.net/blueprint/additional_software_packages/offline_mode/#incomplete-online-upgrade for high level logic
73 Scenario: Recovering in offline mode after Additional Software previously failed to upgrade and then succeed to upgrade when online
75 And I start Tails from USB drive "__internal" and I login with persistence enabled and an administration password
76 And I configure APT to prefer an old version of cowsay
77 When I install an old version "3.03+dfsg2-1" of the cowsay package using apt
78 And I accept adding "cowsay" to Additional Software
79 And Additional Software is correctly configured for package "cowsay"
80 And I shutdown Tails and wait for the computer to power off
81 And I start Tails from USB drive "__internal" with network unplugged
82 And I enable persistence
83 # We need to add back this custom APT source for the Additional Software
84 # install step, as it was not saved in persistence
85 And I configure APT to prefer an old version of cowsay
86 And I log in to a new session
87 And the installed version of package "cowsay" is "3.03+dfsg2-1" after Additional Software has been started
88 And I revert the APT tweaks that made it prefer an old version of cowsay
89 # We remove the newest package after it has been downloaded and before
90 # it is installed, so that the upgrade process fails
91 And I prepare the Additional Software upgrade process to fail
92 And the network is plugged
94 # Note: the next step races against the appearance of the "The
95 # upgrade of your additional software failed" notification.
96 # It should win most of the time, which is good, but there's no
97 # guarantee it does. If it loses, then it'll remove the notification
98 # we'll be trying to interact with below ("I can open…")
99 And all notifications have disappeared
100 And available upgrades have been checked
101 And I see the "The upgrade of your additional software failed" notification after at most 300 seconds
102 And I can open the Additional Software configuration window from the notification
103 And I shutdown Tails and wait for the computer to power off
104 And I start Tails from USB drive "__internal" with network unplugged
105 And I enable persistence
106 # We need to add back this custom APT source for the Additional Software
107 # install step, as it was not saved in persistence
108 And I configure APT to prefer an old version of cowsay
109 And I log in to a new session
110 And the installed version of package "cowsay" is "3.03+dfsg2-1" after Additional Software has been started
111 And I revert the APT tweaks that made it prefer an old version of cowsay
112 And the network is plugged
114 Then the Additional Software upgrade service has started
115 And the installed version of package "cowsay" is newer than "3.03+dfsg2-1"
117 # Depends on scenario: Recovering in offline mode after Additional Software previously failed to upgrade and then succeed to upgrade when online
118 @not_release_blocker_inherited
119 Scenario: I am notified when Additional Software fails to install a package
121 And I start Tails from USB drive "__internal" with network unplugged
122 And I enable persistence
123 And I remove the "cowsay" deb files from the APT cache
124 # Prevent the "Warning: virtual machine detected!" notification from racing
125 # with the one we'll be interacting with below.
126 And I disable the tails-virt-notify-user.service user unit
127 And I log in to a new session
128 Then I see the "The installation of your additional software failed" notification after at most 300 seconds
129 And I can open the Additional Software log file from the notification
130 And the package "cowsay" is not installed