Project

General

Profile

Feature #14570

Feature #14568: Additional Software Packages

Implement Offline Mode for Additional Software Packages

Added by u 4 months ago. Updated about 9 hours ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
01/17/2016
Due date:
% Done:

100%

QA Check:
Dev Needed
Feature Branch:
bugfix/14570-asp-offline-vs-incomplete-previous-upgrade
Type of work:
Code
Starter:
Affected tool:
Additional Software Packages

Description

(B5)

The additional software feature currently only works reliably when connected to the Internet and we want to remove this limitation.


Subtasks

Bug #10958: Disable automatic removal of debs after installFix committed


Related issues

Related to Tails - Feature #14572: Implement automated tests for Additional Software/Offline Mode Confirmed 08/30/2017 01/15/2018
Related to Tails - Feature #9819: Check for updates of "additional software" only once Confirmed 07/29/2015
Duplicated by Tails - Feature #6260: Offline additional software Duplicate 09/07/2013
Blocks Tails - Feature #14571: Code review for Implement Offline Mode Confirmed 08/30/2017 01/15/2018

Associated revisions

Revision 58e5e0bc (diff)
Added by intrigeri 1 day ago

ASP: start dumping our analysis (refs: #14570)

Revision a838a5eb (diff)
Added by intrigeri 1 day ago

ASP: drop obsolete possible solutions and merge sections (refs: #14570)

Revision fac21d9d (diff)
Added by intrigeri 1 day ago

ASP: describe better the 2 "new" problems (refs: #14570)

Revision 6fe29852 (diff)
Added by intrigeri about 16 hours ago

ASP: fix & improve testing procedure (refs: #14570).

Revision c391d839 (diff)
Added by intrigeri about 13 hours ago

ASP: stuff out the testing procedure (refs: #14570)

Revision 7a0f8800 (diff)
Added by intrigeri about 13 hours ago

Additional software packages: fix the "incomplete online upgrade process" cause of breakage in offline mode (refs: #14570)

Problem: assume that during an online Tails session, the APT indices are
successfully updated, but then Tails is shut down before the Debian packages
that need upgrading have been downloaded. Then, if Tails is started offline the
next time, the packages that needed to be upgraded could not be installed.

Solution: use updated APT lists when installing packages (before running
`apt-get update`, and possibly offline) only after we know our package cache has
been updated too. In more details:

- Upgrade operation (run once Tor has bootstrapped): save a copy of
`/var/lib/apt/lists/` before running the `apt-get update`;
once `apt-get upgrade` has succeeded, remove this copy of the old
APT lists.
- Installation operation: if there is a copy of the old APT lists, restore it
before running `apt-get install`.

History

#1 Updated by u 4 months ago

#2 Updated by u 4 months ago

  • Assignee changed from intrigeri to alant

#4 Updated by u 4 months ago

  • Description updated (diff)

#5 Updated by u 4 months ago

  • Blocked by Feature #14571: Code review for Implement Offline Mode added

#6 Updated by u 4 months ago

  • Blocked by deleted (Feature #14571: Code review for Implement Offline Mode)

#7 Updated by u 4 months ago

#8 Updated by BitingBird 4 months ago

  • Target version set to 2018

#9 Updated by u 4 months ago

  • Due date set to 01/15/2018

#10 Updated by u 4 months ago

  • Related to Feature #14572: Implement automated tests for Additional Software/Offline Mode added

#11 Updated by intrigeri 4 months ago

#13 Updated by intrigeri 4 months ago

  • Related to Feature #9819: Check for updates of "additional software" only once added

#14 Updated by intrigeri 4 months ago

  • Subject changed from Implement Offline Mode to Implement Offline Mode for Additional Software Packages

#17 Updated by u 3 months ago

  • Affected tool set to Additional Software Packages

#18 Updated by u 3 months ago

  • Target version changed from 2018 to Tails_3.5

#19 Updated by u 3 months ago

  • Description updated (diff)

#20 Updated by alant 10 days ago

  • Blueprint set to https://tails.boum.org/blueprint/additional_software_packages_offline_mode/

#21 Updated by alant 10 days ago

#22 Updated by intrigeri 1 day ago

  • Related to deleted (Feature #6260: Offline additional software)

#23 Updated by intrigeri 1 day ago

#24 Updated by intrigeri 1 day ago

  • Description updated (diff)

#25 Updated by alant 1 day ago

I tried installing packages offline in Tails 3.3 using the following procedure :

  • start Tails online with persistence of apt packages and apt lists
  • install optipng (currently pulled from stretch/updates, which expires on 22 Dec 2017) and wdiff (from stretch, which doesn't expire) and add them to additional software list
  • reboot offline
  • the install works and optipng version is the one from stretch/updates
  • set the date 1 year in the future in the BIOS
  • reboot offline
  • the install works and optipng version is the one from stretch/updates

I went through the entire procedure 3 times and got the same results. Basic offline operation is thus already working, and #6260 seems to be already resolved : recent APT doesn't check Valid-Until on package installation.

#26 Updated by intrigeri 1 day ago

We've identified 3 causes of issues with offline usage of Additional Software Packages, and described them on the blueprint. Two of these problems have been fixed and Alan will now look closer at the last one.

#27 Updated by intrigeri 1 day ago

  • Status changed from Confirmed to In Progress

#28 Updated by alant 1 day ago

  • Blueprint changed from https://tails.boum.org/blueprint/additional_software_packages_offline_mode/ to https://tails.boum.org/blueprint/additional_software_packages/offline_mode

#29 Updated by intrigeri about 16 hours ago

  • Description updated (diff)

#30 Updated by intrigeri about 13 hours ago

  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/14570-asp-offline-vs-incomplete-previous-upgrade

Please:

  • make sure this implements the design you came up with correctly
  • make sure I got right the bits that your design did not specify (e.g. failure modes, when to delete the copy of the old APT lists, etc.)
  • do a first code review so I learn some more Python :)

Then once happy, we'll reassign to segfault or u, who are supposed to review our code before sending to a Foundations Team member's plate for the last (presumably very quick) review and merge.

#31 Updated by intrigeri about 12 hours ago

intrigeri wrote:

once happy, we'll reassign to segfault or u, who are supposed to review our code

This is supposed to happen on #14571. I'm not sure I understand the intended Redmine workflow/semantics which are different from what we would do (Ready for QA, reassign to the reviewer), but let's try :)

before sending to a Foundations Team member's plate for the last (presumably very quick) review and merge.

Actually, I would like automated tests to be ready before we merge this branch.

#32 Updated by alant about 9 hours ago

  • Assignee changed from alant to intrigeri
  • QA Check changed from Ready for QA to Dev Needed

I reviewed the code. I fixed 2 whitespace errors and removed the f_ prefix in restore_old_apt_lists, which makes the code less readable to me.

I also think it would be more clean to move content of srcdir to dstdir instead of copying it in restore_old_apt_lists, then call delete_old_apt_lists. If you agree, please do it.

Else, it looks fine. I didn't try the code inside an ISO.

#33 Updated by intrigeri about 9 hours ago

  • Assignee changed from intrigeri to alant

alant wrote:

I reviewed the code. I fixed 2 whitespace errors and removed the f_ prefix in restore_old_apt_lists, which makes the code less readable to me.

Thanks!

I also think it would be more clean to move content of srcdir to dstdir instead of copying it in restore_old_apt_lists, then call delete_old_apt_lists. If you agree, please do it.

I agree, please do it (you have vastly more time allocated on this ticket than me).

Also available in: Atom PDF