Re: [Tails-dev] Pip is not torified by default

Nachricht löschen

Nachricht beantworten
Autor: anonym
Datum:  
To: tails-dev
Betreff: Re: [Tails-dev] Pip is not torified by default
On 01/02/2024 04.46, Patrick wrote:
> Python3-pip should be added back next release


It never was installed in any Tails release.

> and with a global config to torify it by default.

You can make any single file (like `~/.config/pip/pip.conf`) persistent
with the Dotfiles persistence feature. [0]

[0] https://tails.net/doc/persistent_storage/configure/#dotfiles

> There are many nice python tools not included with tails that users may
> like to install. Also pip seems like a easy way to test different python
> tools for use and possible integration onto tails.


Tails is not a general purpose operating system, we simply do not have
resources to support all use cases. [1] Our focus are on the needs of
our personas [2], and none of them are into Python development. :)

[1] https://tails.net/support/faq/#new-software
[2] https://tails.net/contribute/personas/

But, as already shown above, Tails allows you to customize it
extensively through the persistence feature. The Additional Software
persistence feature [3] allows you to keep any package from Debian
installed and up-to-date, so just install python3-pip and the other
tools you like that way.

[3] https://tails.net/doc/persistent_storage/additional_software/

> A persistent storage feature for user installed python packages could
> also be designed to be a hook that adds the appropriate corresponding
> .local folders to the persistence.conf upon activation of the feature.


It is not a documented feature any more (I think because of bugs like
#19267) but you can also make any folder persistent yourself. Start
Tails with an administration password, login, start a Root Terminal.

This makes ~/.local persistent:

     echo '/home/amnesia/.local    source=dot-local' \
          >> /live/persistence/TailsData_unlocked/persistence.conf


You can do this multiple times, so this also makes the pip cache persistent:

     echo '/home/amnesia/.cache/pip    source=pip-cache' \
          >> /live/persistence/TailsData_unlocked/persistence.conf


The `source=pip-cache` part means that the data will be stored on the
persistent storage in `/live/persistence/TailsData_unlocked/pip-cache`,
so just make sure to never re-use the same source as any other line in
that file. You must restart Tails for lines added like this to take effect.

Cheers!