Problem was that the commented variant only was a new, $dist-security
one, but is also written if the security repo is disabled with other
distributions than sid/unstable.
This reverts most code, but not the implemented functionality of
commit 2fba5cb90e.
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
This is the official way, needs no own parsing (therefore less
fault-prone) and shorter. Also fixes Debian bug #560011 -- the manual
parsing did not catch all syntax variants.
Also add some comments before /etc/apt/sources.list generation in the
Ubuntu hooks.
Temporarily use resolv.conf from dom0 when chrooting into domU,
to be able to run apt-get and yum inside chroot.
This permits to use different nameservers in domU, and does not
break install nor offline update from dom0.
1. Copy "resolv.conf" before running apt-get update / yum update.
Without this DNS is probably not available/working.
2. Copy /etc/sudoers from the host, if we're installing sudo.
Source common.sh from the parent directory if the global installation
isn't found.
This allows "make test" to succeed *before* the tools are installed.
Added to the repository. These are almost straight copies of the
previous hook scripts except they are now Debian-specific.
They also each log their start and finish and optional information
via the use of the ../common.sh file.
No major changes anticipated.