summaryrefslogtreecommitdiffstats
path: root/features/additional_software_packages.feature
blob: 80db623b86e616e2b39e45f499dc692789a72c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@product @check_tor_leaks

Feature: Additional software
  As a Tails user
  I may want to install softwares not shipped in Tails
  And have them installed automatically when I enable persistence in the Greeter

  # An issue with this feature is that scenarios depend on each
  # other. When editing this feature, make sure you understand these
  # dependencies (which are documented below).

  Scenario: I am warned I can not use Additional Software when I start Tails from a DVD and install a package
    Given I have started Tails from DVD and logged in with an administration password and the network is connected
    And I update APT using apt
    When I install "sslh" using apt
    Then I am notified I can not use Additional Software for "sslh"
    And I can open the Additional Software documentation from the notification

  # Here we install the sslh package to test if debconf does not prevent
  # Additional Software from automatically installing packages.
  # This scenario also sets up the "__internal" drive that the following
  # scenarios will reuse.
  # Note: the "__internal" drive will keep its state across scenarios
  # and features until one of its snapshots is restored.
  Scenario: I set up Additional Software when installing a package without persistent partition and the package is installed next time I start Tails
    Given I start Tails from a freshly installed USB drive with an administration password and the network is plugged and I login
    And I update APT using apt
    And I install "sslh" using apt
    Then I am proposed to add the "sslh" package to my Additional Software
    And I create a persistent storage and activate the Additional Software feature
    And I shutdown Tails and wait for the computer to power off
    And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
    And Additional Software is correctly configured for package "sslh"
    And the package "sslh" is installed after Additional Software has been started

  # 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
  Scenario: The Additional Software dpkg hook notices when persistence is locked down while installing a package
    Given a computer
    And I start Tails from USB drive "__internal" and I login with an administration password
    And I update APT using apt
    When I install "makepp" using apt
    Then the Additional Software dpkg hook has been run for package "makepp" and notices the persistence is locked
    And the package "makepp" is installed

  # 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
  Scenario: My Additional Software list is configurable through a GUI or through notifications when I install or remove packages with APT or Synaptic
    Given a computer
    And I start Tails from USB drive "__internal" and I login with persistence enabled and an administration password
    When I uninstall "sslh" using apt
    And I accept removing "sslh" from Additional Software
    Then "sslh" is not in the list of Additional Software
    When I start Synaptic
    And I update APT using Synaptic
    And I install "cowsay" using Synaptic
    And I accept adding "cowsay" to Additional Software
    Then Additional Software is correctly configured for package "cowsay"
    When I uninstall "cowsay" using apt
    And I refuse removing "cowsay" from Additional Software
    Then Additional Software is correctly configured for package "cowsay"
    When I start "Additional Software" via GNOME Activities Overview
    And I remove "cowsay" from the list of Additional Software using Additional Software GUI
    Then "cowsay" is not in the list of Additional Software
    When I install "cowsay" using apt
    And I refuse adding "cowsay" to Additional Software
    Then "cowsay" is not in the list of Additional Software

  # 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
  # See https://tails.boum.org/blueprint/additional_software_packages/offline_mode/#incomplete-online-upgrade for high level logic
  Scenario: Recovering in offline mode after Additional Software previously failed to upgrade and then succeed to upgrade when online
    Given a computer
    And I start Tails from USB drive "__internal" and I login with persistence enabled and an administration password
    And I configure APT to prefer an old version of cowsay
    When I install an old version "3.03+dfsg2-1" of the cowsay package using apt
    And I accept adding "cowsay" to Additional Software
    And Additional Software is correctly configured for package "cowsay"
    And I shutdown Tails and wait for the computer to power off
    And I start Tails from USB drive "__internal" with network unplugged
    And I enable persistence
    # We need to add back this custom APT source for the Additional Software
    # install step, as it was not saved in persistence
    And I configure APT to prefer an old version of cowsay
    And I log in to a new session
    And the installed version of package "cowsay" is "3.03+dfsg2-1" after Additional Software has been started
    And I revert the APT tweaks that made it prefer an old version of cowsay
    # We remove the newest package after it has been downloaded and before
    # it is installed, so that the upgrade process fails
    And I prepare the Additional Software upgrade process to fail
    And the network is plugged
    And Tor is ready
    # Note: the next step races against the appearance of the "The
    # upgrade of your additional software failed" notification.
    # It should win most of the time, which is good, but there's no
    # guarantee it does. If it loses, then it'll remove the notification
    # we'll be trying to interact with below ("I can open…")
    And all notifications have disappeared
    And available upgrades have been checked
    And I see the "The upgrade of your additional software failed" notification after at most 300 seconds
    And I can open the Additional Software configuration window from the notification
    And I shutdown Tails and wait for the computer to power off
    And I start Tails from USB drive "__internal" with network unplugged
    And I enable persistence
    # We need to add back this custom APT source for the Additional Software
    # install step, as it was not saved in persistence
    And I configure APT to prefer an old version of cowsay
    And I log in to a new session
    And the installed version of package "cowsay" is "3.03+dfsg2-1" after Additional Software has been started
    And I revert the APT tweaks that made it prefer an old version of cowsay
    And the network is plugged
    And Tor is ready
    Then the Additional Software upgrade service has started
    And the installed version of package "cowsay" is newer than "3.03+dfsg2-1"

  # Depends on scenario: Recovering in offline mode after Additional Software previously failed to upgrade and then succeed to upgrade when online
  Scenario: I am notified when Additional Software fails to install a package
    Given a computer
    And I start Tails from USB drive "__internal" with network unplugged
    And I enable persistence
    And I remove the "cowsay" deb files from the APT cache
    # Prevent the "Warning: virtual machine detected!" notification from racing
    # with the one we'll be interacting with below.
    And I disable the tails-virt-notify-user.service user unit
    And I log in to a new session
    Then I see the "The installation of your additional software failed" notification after at most 300 seconds
    And I can open the Additional Software log file from the notification
    And the package "cowsay" is not installed