Feature #14570

Implement Offline Mode for Additional Software Packages

Added by Anonymous 2017-08-30 13:03:23 . Updated 2018-03-14 11:15:55 .

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

100%

Feature Branch:
bugfix/14570-asp-offline-vs-incomplete-previous-upgrade
Type of work:
Code
Starter:
Affected tool:
Additional Software Packages
Deliverable for:
299

Description

(B5)

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


Files


Subtasks

Bug #10958: Disable automatic removal of debs after install Resolved

100


Related issues

Related to Tails - Feature #9819: Check for updates of "additional software" only once Resolved 2015-07-29
Related to Tails - Feature #14571: Code review for Implement Offline Mode Resolved 2017-08-30 2018-01-15
Has duplicate Tails - Feature #6260: Offline additional software Duplicate 2013-09-07
Blocks Tails - Feature #14581: Install caff (signing-party) by default Rejected 2017-09-01
Blocks Tails - Bug #15198: Convert ASP to Python3 and follow PEP-8 Resolved 2018-01-19
Blocked by Tails - Feature #14572: Implement automated tests for Additional Software/Offline Mode Resolved 2017-08-30 2018-01-15

History

#1 Updated by Anonymous 2017-08-30 13:05:04

#2 Updated by Anonymous 2017-08-30 13:06:11

  • Assignee changed from intrigeri to alant

#4 Updated by Anonymous 2017-08-30 13:07:00

  • Description updated

#5 Updated by Anonymous 2017-08-30 13:09:33

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

#6 Updated by Anonymous 2017-08-30 13:10:35

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

#7 Updated by Anonymous 2017-08-30 13:10:49

#8 Updated by BitingBird 2017-08-30 13:11:06

  • Target version set to 2018

#9 Updated by Anonymous 2017-08-30 13:14:18

  • Due date set to 2018-01-15

#10 Updated by Anonymous 2017-08-30 13:16:28

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

#11 Updated by intrigeri 2017-08-30 17:26:52

#13 Updated by intrigeri 2017-08-30 17:30:02

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

#14 Updated by intrigeri 2017-08-30 17:30:14

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

#17 Updated by Anonymous 2017-09-04 16:50:31

  • Affected tool set to Additional Software Packages

#18 Updated by Anonymous 2017-09-07 08:42:29

  • Target version changed from 2018 to Tails_3.5

#19 Updated by Anonymous 2017-09-20 08:11:15

  • Description updated

#20 Updated by alant 2017-12-05 14:58:40

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

#21 Updated by alant 2017-12-05 16:42:05

#22 Updated by intrigeri 2017-12-14 09:50:30

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

#23 Updated by intrigeri 2017-12-14 09:50:38

#24 Updated by intrigeri 2017-12-14 09:52:18

  • Description updated

#25 Updated by alant 2017-12-14 11:26:14

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 Feature #6260 seems to be already resolved : recent APT doesn’t check Valid-Until on package installation.

#26 Updated by intrigeri 2017-12-14 12:35:53

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 2017-12-14 13:16:01

  • Status changed from Confirmed to In Progress

Applied in changeset commit:58e5e0bcf92ea88d5a6abb94957226bd85d76fc0.

#28 Updated by alant 2017-12-14 15:48:16

  • 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 2017-12-15 09:21:34

  • Description updated

#30 Updated by intrigeri 2017-12-15 12:02:22

  • 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 2017-12-15 13:42:32

intrigeri wrote:
> once happy, we’ll reassign to segfault or u, who are supposed to review our code

This is supposed to happen on Feature #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 2017-12-15 16:26:27

  • 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 2017-12-15 16:29:54

  • 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).

#34 Updated by intrigeri 2018-01-04 06:34:53

  • blocks Feature #14581: Install caff (signing-party) by default added

#35 Updated by Anonymous 2018-01-11 14:19:24

Hi Alan, when done, please reassign to segfault and point him to Feature #14571. Thanks!

#36 Updated by alant 2018-01-12 16:28:09

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

intrigeri wrote:
> alant wrote:
> > 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).

Done and tested inside a running Tails. Please review and merge.

#37 Updated by intrigeri 2018-01-13 10:52:09

> Please review and merge.

s/and merge/and reassign to anonym for merging/

(and I expect anonym to have a quick look at the diff too as the RM)

#38 Updated by segfault 2018-01-14 18:32:18

The code looks good to me, except for some nitpicking:

1. Commit 7a0f8800 introduces a broad except: clause which doesn’t log the exception message. I would fix this with the attached patch.

2. According to PEP 8, one-line docstrings should have the closing """ on the same line.

Also, there is some bad code (an unclosed file, statements without effect, a potential reference before assignment) in tails-additional-software, which was not added in this branch, and which gets mostly deleted by bugfix/9059-additional-software-after-session. I would like to take another quick look at it after the two branches are merged.

I’m currently building the ISO to test it. Will report back later.

#39 Updated by Anonymous 2018-01-15 14:42:15

segfault: thanks! Once done, pleasr reassign to alant. I'm also adding anonym as a watcher, as he should at least have a quick look too.

#40 Updated by alant 2018-01-15 22:25:52

> 1. Commit 7a0f8800 introduces a broad except: clause which doesn’t log the exception message. I would fix this with the attached patch.
>
Applied, thanks

> 2. According to PEP 8, one-line docstrings should have the closing """ on the same line.
>
I agree, but fixing it here without doing it in all the file looks wierd, so I propose to forget about it for now, and do it later on when converting this file to python3. I plan to do that after all branches are merged and tests are written.

#41 Updated by segfault 2018-01-16 08:39:40

  • Assignee changed from segfault to anonym

> I’m currently building the ISO to test it. Will report back later.
Seems to work fine.

#42 Updated by Anonymous 2018-01-19 09:45:23

> > 2. According to PEP 8, one-line docstrings should have the closing """ on the same line.
> >
> I agree, but fixing it here without doing it in all the file looks wierd, so I propose to forget about it for now, and do it later on when converting this file to python3. I plan to do that after all branches are merged and tests are written.

I’ll create a ticket for that so it’s not forgotten.

#43 Updated by Anonymous 2018-01-19 09:47:07

  • related to Bug #15198: Convert ASP to Python3 and follow PEP-8 added

#44 Updated by anonym 2018-01-22 08:49:16

  • Target version changed from Tails_3.5 to Tails_3.6

#45 Updated by anonym 2018-01-30 16:56:57

  • Assignee changed from anonym to bertagaz
  • QA Check changed from Ready for QA to Pass

Looks great! I pushed some minor fixes to whitespaces and comments only. I’d merge it, if I hadn’t pushed quite a bit of stuff for Feature #14572, so I’m handing over the merge to the RM.

#46 Updated by Anonymous 2018-02-04 11:25:20

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

#47 Updated by Anonymous 2018-02-04 11:25:27

  • related to Feature #14571: Code review for Implement Offline Mode added

#48 Updated by Anonymous 2018-02-05 13:56:29

  • related to deleted (Bug #15198: Convert ASP to Python3 and follow PEP-8)

#49 Updated by Anonymous 2018-02-05 13:57:15

  • blocks Bug #15198: Convert ASP to Python3 and follow PEP-8 added

#50 Updated by Anonymous 2018-02-05 13:57:29

  • blocked by deleted (Bug #15198: Convert ASP to Python3 and follow PEP-8)

#51 Updated by Anonymous 2018-02-05 13:57:53

  • blocks Bug #15198: Convert ASP to Python3 and follow PEP-8 added

#52 Updated by intrigeri 2018-02-08 06:59:42

  • related to deleted (Feature #14572: Implement automated tests for Additional Software/Offline Mode)

#53 Updated by intrigeri 2018-02-08 06:59:50

  • blocked by Feature #14572: Implement automated tests for Additional Software/Offline Mode added

#54 Updated by bertagaz 2018-02-20 20:14:23

  • Status changed from In Progress to Fix committed

Applied in changeset commit:7dfa97612868f7459f79cab29a66114969e18658.

#55 Updated by bertagaz 2018-02-20 20:28:10

  • Assignee deleted (bertagaz)

That’s now merged into devel and will go into 3.6, woohoo!

#56 Updated by bertagaz 2018-03-14 11:15:55

  • Status changed from Fix committed to Resolved