It appears that charm-apt-mirror's generated repository, or more specifically apt-mirror, does not clone enough of the apt repository to power do-release-upgrade.
We may need to leverage a postmirror.sh script to add code which will sync the important missing bits. This script will also need to be careful about proxy settings since a simple rsync may not be allowed; it may be worth investigating how apt-mirror does its mirroring and to use a similar method.
This page (as well as many other pages scattered online) seems to give some details regarding the missing bits: https://makandracards.com/makandra/12439-setup-an-ubuntu-mirror-that-enables-local-release-upgrades
Definition of done: apt-mirror should be capable of mirroring enough of the official Ubuntu repositories so as to allow for performing a do-release-upgrade using the mirror without errors. Any special parameters needed by do-release-upgrade to use the custom mirror during this process should be documented.
Note that the changelogs. ubuntu. com directory on the mirror is not copied over when creating a snapshot. It looks like the _on_create_snapshot handler only looks at directories that contain `dists/` and `pool/` as subdirectories. The changelogs mirror does not have these subdirectories and is thus not copied over to the published snapshot, and is thus not exposed as part of the repo.
Workaround: apt-mirror/ && cp -r mirror/ changelogs. ubuntu. com publish/
cd /var/spool/