[SRU] apt snapshot integration backport

Bug #2038453 reported by Julian Andres Klode
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Pro
Status tracked in 18.04
18.04
In Progress
Undecided
Unassigned
apt (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Won't Fix
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
Mantic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
The snapshot service provides users access to older states of the archive with ease of use, and enables a consistent user experience across all supported releases, as otherwise users would have to rewrite their sources.list to make use of snapshots and set up pinning; hence partners requested the feature be SRUed to older releases as well.

[Test plan]
The complete regression test suite in autopkgtests includes an automatic test case for this and the known limitations that have been fixed. Aside from that, it is also worthwhile to do an end-to-end test:

Configure snapshot=yes for Ubuntu sources in your sources.list and

1. run apt update - it should not use snapshot
2. run apt update --snapshot 20231001T000000Z, it should download the snapshot
3. run apt policy --snapshot 20231001T000000Z hello, it should show hello in the snapshot
4. run apt install --snapshot 20231001T000000Z hello, it should install hello from the snapshot
5. Run apt update; observe snapshot not being downloaded
6. Observe snapshots are gone from /var/lib/apt/lists again

[Where problems could occur]
The integration has been purposefully limited in how it works to reduce the impact it has on the APT code; hence it was possible to cherry-pick this into 22.04, 20.04, and even 18.04, with only a minor editorial change. This significantly limits the risk.

This feature is only enabled for sources with snapshot=yes (.list) or Snapshot: yes (.sources) or other truthy values apt recognizes. Most users will not have such entries as they did not have an APT supporting it.

This combined should ensure that users do not experience any regressions. However the feature may be lacking in some ways that we may want to address in follow up SRUs; it has not been used in the wild a lot.

Changed in apt (Ubuntu Mantic):
status: New → Fix Released
Changed in apt (Ubuntu Lunar):
status: New → Won't Fix
description: updated
description: updated
Changed in apt (Ubuntu Bionic):
status: New → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu Focal):
status: New → Confirmed
Changed in apt (Ubuntu Jammy):
status: New → Confirmed
description: updated
description: updated
Changed in apt (Ubuntu Jammy):
status: Confirmed → In Progress
Changed in apt (Ubuntu Focal):
status: Confirmed → In Progress
Revision history for this message
Julian Andres Klode (juliank) wrote :

jammy and focal packages uploaded to the archive for SRU

jammy, focal, and bionic also uploaded to

https://launchpad.net/~deity/+archive/ubuntu/apt/+packages

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Julian, or anyone else affected,

Accepted apt into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/2.4.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apt (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Changed in apt (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Julian, or anyone else affected,

Accepted apt into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/2.0.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apt/2.4.11)

All autopkgtests for the newly accepted apt (2.4.11) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

apt/2.4.11 (armhf)
sbuild/0.81.2ubuntu6 (arm64, ppc64el, s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#apt

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Julian Andres Klode (juliank) wrote :

Verification for apt/2.4.11 in jammy-proposed completed successfully.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Verification for apt/2.0.10 in focal-proposed completed successfully.

This time I even made less typos while testing :D

tags: added: verification-done-focal verification-done-jammy
removed: verification-needed-focal verification-needed-jammy
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.0.10

---------------
apt (2.0.10) focal; urgency=medium

  * Backport archive snapshot integration as of 2.7.3 (LP: #2038453)

 -- Julian Andres Klode <email address hidden> Fri, 06 Oct 2023 11:42:30 +0200

Changed in apt (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for apt has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.4.11

---------------
apt (2.4.11) jammy; urgency=medium

  * Backport archive snapshot integration as of 2.7.3 (LP: #2038453)

 -- Julian Andres Klode <email address hidden> Fri, 06 Oct 2023 10:53:53 +0200

Changed in apt (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.