diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2023-02-22 14:14:52 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2023-05-02 15:23:14 +0200 |
| commit | a19f606aad717fe5c9c69237c3af53feb547115e (patch) | |
| tree | d40f582025bb4b03e5d778c33be8556fce1dc36b /doc/sources.list.5.xml | |
| parent | 3625351722e67903dc34993fe318e50863bd2d31 (diff) | |
Initial support for snapshot servers, apt --snapshot option
Provide snapshot support for offical Debian and Ubuntu archives.
There are two ways to enable snapshots for sources:
1. Add Snapshot: yes to your sources file ([snapshot=yes]). This
will allow you to specify a snapshot to use when updating or
installing using the --snapshot,-S option.
2. Add Snapshot: ID to your sources files to request a specific
snapshot for this source.
Snapshots are discovered using Label and Origin fields in the Release
file of the main source, hence you need to have updated the source at
least once before you can use snapshots.
The Release file may also declare a snapshots server to use, similar
to Changelogs, it can contain a Snapshots field with the values:
1. `Snapshots: https://example.com/@SNAPSHOTID@` where `@SNAPSHOTID@`
is a placeholder that is replaced with the requested snapshot id
2. `Snapshots: no` to disable snapshot support for this source.
Requesting snapshots for this source will result in a failure
to load the source.
The implementation adds a SHADOWED option to deb source entries,
and marks the main entry as SHADOWED when a snapshot has been
requested, which will cause it to be updated, but not included
in the generated cache.
The concern here was that we need to keep generating the shadowed
entries because the cleanup in `apt update` deletes any files not
queued for download, so we gotta keep downloading the main source.
This design is not entirely optimal, but avoids the pitfalls of
having to reimplement list cleanup.
Gaps:
- Ubuntu Pro repositories and PPAs are not yet supported.
Diffstat (limited to 'doc/sources.list.5.xml')
| -rw-r--r-- | doc/sources.list.5.xml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml index 478694c77..4fa7a245b 100644 --- a/doc/sources.list.5.xml +++ b/doc/sources.list.5.xml @@ -392,6 +392,23 @@ Signed-By: or, if that fails, a <filename>Release</filename> file and its associated <filename>Release.gpg</filename> file. By setting this option, the specified path will be tried instead of the InRelease file, and the fallback to <filename>Release</filename> files will be disabled. + </para></listitem> + + <listitem><para><option>Snapshot</option> (<option>snapshot</option>) + allows selecting an earlier version of the archive from the snapshot service. Supported + values are: </para> + <itemizedlist> + <listitem> + <para><literal>enable</literal> to allow selecting a snapshot with the <option>--snapshot</option> option, or</para> + </listitem> + <listitem> + <para>a snapshot ID to select a specific snapshot.</para> + </listitem> + </itemizedlist> + <para> + Snapshot IDs are usually timestamps in the form of <literal>YYYYMMDDTHHMMSSZ</literal>, such as + <literal>20220102T030405Z</literal> which is the January 2nd, 2022 at 03:04:05 UTC, servers may + however support additional types of IDs, and APT does not perform any checks so far. </para></listitem> </itemizedlist> |
