[pt-br] Update translation bits.
[tails-test.git] / wiki / src / blueprint / remember_installed_packages.mdwn
blob2f4ce3505064db25307ac5c9b61d5c3faf47a840
1 When user have enabled persistence, it could be nice to remember which
2 extra packages they have installed.
4 We propose to use the term "your additional software" to mention to the
5 user those packages in the GUI, notifications, etc.
7 This feature will be implemented in several steps.
9 Past research
10 =============
12 Possible interfaces
13 -------------------
15 ### 1
17 Either in the greeter or upon login, an
18 interface could appear offering the user to select which packages should be
19 reinstalled (all unselected by default).
21 Having this choice in the greeter could allow users to install their preferred
22 software without having an administrative password set.
24 > This interface would quickly become messy, as soon as a desired
25 > additional package pulls dozens (if not hundreds) of dependencies.
27 ### 2
29 Alternative idea: in tails-persistence-setup, allow selecting
30 packages (among the ones additionally installed during the current
31 session, and/or offer a "All installed additional packages"
32 option) to be automatically re-installed next time. Then, at boot
33 time, when persistence is enabled, our live-persistence script (or
34 something else started from tails-greeter) would (unconditionally?)
35 read this packages list from the persistent volume and install them.
37 Things to think about
38 ---------------------
40 - security implications of this whole idea needs to be researched before
41   diving in the code.
43 > since the cached APT packages are
44 > hand picked by the user, security will depend on these packages and
45 > security of the persistent volume where the *.deb are going to be
46 > stored. Am I missing something here?
48 - how to answer pontential apt/dpkg/debconf questions? record answers? force yes?
50 - re-install these packages from cache only, or prefer fetching more up-to-date
51   versions from online mirrors if available? If we want to fetch updates, when
52   should the install start? Think about offline usage and about network
53   fingerprint.
55 - should the packages been installed before starting the session (required for
56   packages related to session modification e.g. `msva-perl`) or after (e.g.
57   requiring network, like firmware downloader)
59 Possible implementation tricks
60 ------------------------------
62 ### Installing at startup, then upgrading
64 One solution to the upgrad/offline use problem might be to install the packages
65 at from cache at startup, then to try to fetch upgrades and install them if
66 network appears.
68 ### Creating a list of user-installed packages
70 A configuration snippet can be add in `/etc/apt/apt.conf.d` with a
71 `Dpkg::Post-Invoke` option. This allows to trigger a script each time
72 APT is run.
74 This script should query APT database and record all packages that are
75 not in `autoinstall` state.
77 On boot time, that list should be filtered with packages that are already
78 shipped with Tails.
80 > Here's an example script which filters shipped packages on runtime instead:
81
82     comm -23 <(list-manually-installed-packages) <default-packages.txt >session-packages.txt
83     comm -23 <(cat session-packages.txt|sort) <(cat saved-packages.txt|sort) >> saved-packages.txt
84
85 > It mantains a list of packages manually installed by the user in saved-packages.txt. This file should be placed in its own directory so it can be made persistent.
87 > list-manually-installed-packages is another script which does what its name says. In squeeze it can be done with:
89     comm -3 <(dpkg -l | grep '^ii' | cut -d\  -f 3|sort) <(apt-mark showauto|sort)
91 > When we move to wheezy it may simply become 'apt-mark showmanual', if it proves to be equivalent.
93 > default-packages.txt is the list of packages shipped with Tails, generated at ISO creation time with list-manually-installed-packages
95 > session-packages.txt is a temporary file, can be placed in /tmp