Additional Software data is not fully copied to Persistent Storage during initial setup on Bullseye
[[_TOC_]] # Affected user scenario & symptoms This bug can impact a given user once, and only once, for a given USB stick: ```gherkin Given I have Additional Software disabled and no Persistent Storage When I install a package And I accept Tails' offer to install this package every time I start Tails But I ignore t-p-s' offer to restart immediately And I restart Tails myself later Then on reboot this package may not be installed But if I install the same package again Then it will be installed, as expected, every time I start Tails in the future ``` Users who already have Additional Software enabled won't experience this bug. !764 somewhat lowered the risk users hit this bug, by synchronizing the data to the USB stick before restarting, when the user clicks *Restart* in t-p-s. But: * UX is poor: copying the data can taken 10-30 seconds and there's no sign of progress in the UI - !799 improves this * Presumably, a user who just installed a package wants to use them, not restart Tails. So plausibly most users won't click *Restart* at that point, and thus won't benefit from this mitigation. That's why, in https://tails.boum.org/news/test_5.0-beta1/, I instead documented how to recover from the problem. # Current status With the codebase that'll essentially become 5.0, i.e. with bf4c3fa3ef1a339508584c0a0cf490e9df07cd96 applied, we tried, and failed, to reproduce this on: - 4 bare metal machines - a VM with a virtual USB stick configured for max 7MB/s write But on the `18839-remove-workaround` branch, that does not use the aforementioned workaround, we always see the problem. Go figure. # Technical details After enabling Additional Software for a newly installed package and shutting down, when I inspect the persistent filesystem from outside of Tails: * according to `e2fsck` the filesystem is clean * `live-additional-software.conf` LGTM * `persistence.conf` LGTM * the `apt` directory exists and is empty * the `apt_sync_started` flag file exists ⇒ `tails-synchronize-data-to-new-persistent-volume-on-shutdown.service` failed to copy the data.
issue