This reverts most code, but not the implemented functionality of
commit 2fba5cb90e30f2bfab07782c9fa3b99275e769da.
Requiring a config file change to still be able to install old
distributions would make a bump of the major version necessary
according to Semantic Versioning. Let's avoid that:
The list of distributions with the old path scheme is finite and will
never change again. Hence it's ok and especially backwards compatible
to hardcode this list in hooks/debian/20-setup-apt.
It's also less and more obvious (but not necessarily easier to read)
code. But it's all in one place and not scattered over three files.
And it's just one line instead like a dozen or two dozens.
Closes: #972749 (kinda again)
From Debian 11 Bullseye onwards, debian uses $dist-security instead of
$dist/updates as distribution part in /etc/apt/sources.list.
Mark those distributions with the old-style subdirectory path with
"security-subdir" in distributions.conf.
Thanks to Paul Wise for the bug report (and hence reminding me of
this) and for the suggestions on how to implement this (even if I
didn't follow them for the sake of simplicity and no additional
dependencies).
Closes: #972749
Reasoning:
Debian 8 Jessie has still (external) ELTS until 2022. But
debian-internal LTS has ended and it will likely vanish from the
normal mirrors soon. And it is already available in the archive. (And
some architectures are already only available in the archive.)
Also mention marking Debian 7 Wheezy as EoL in NEWS.markdown. (Was
already mentioned in debian/changelog.)
Any tag ending in ".gpg" will be considered to be the according
keyring file in /usr/share/keyrings/. This is at least needed for some
Ubuntu releases which were eol'ed in the past few years, especially
because Ubuntu split up their keyrings much more finegrained than just
"archive" and "archive-removed-keys".
Mark buster and bullseye as not testable, too, for now.
Move comment about #659360 (debootstrap cannot build Ubuntu Edgy or
earlier) from release-testing to distributions.conf, too.
Split off hardcoded release code names list and default mirrors in
xen-create-image into separate configuration file which are parsed
before the default settings or command-line options are set.
Otherwise a versioned pygrub path will be used (e.g.
/usr/lib/xen-4.1/bin/pygrub in the case of Debian Wheezy) and then
all host configurations would need to be updated when dist-upgrading
to Debian Jessie with Xen 4.3.
In case you already ran into this issue, the following command should
fix the issue for you:
fgrep -l xen-4.1/bin/pygrub -r /etc/xen/ | xargs sed -e 's:xen-4.1/bin/pygrub:xen-default/bin/pygrub:g' -i
Does not yet work due to missing support for Saucy in debootstrap.
Also move default mirror for Ubuntu Hardy from archive to old-releases
as Hardy is now EoL.
Update documentation and tests accordingly.
Also add pygrub = 1 as example to xen-tools.conf, now that the effect
can be reversed via commandline options.