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 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
All hooks files which were identical in two groups (debianoid and
redhatoid) have been moved to the new hooks/common directory and now
have symbolic links to the according new files at their old locations.
All hooks files which were identical and had no second group of
identically named hook files have been moved to a new hooks/common
directory and now have symbolic links to the new single file at their
old locations.
Also slightly modified to make this work:
* Makefile: copy new hooks/common directory
* Some tests: ignore new hooks/common directory
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.
If nameserver config option is not set (default value), copy Dom0's
/etc/resolv.conf on guest.
Provide a role to show how to customize /etc/resolv.conf in guest.
This makes t/no-tabs.t pass.
I'm responsible for some tabs in previous patches, so this
fixes mine also :)
Note that I find this test silly, but "dura lex, sed lex"...
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.
* Long overdue clean up of 50-setup-hostname, since simply
copying the dom0's /etc/hosts file isn't reliable.
* Added a --copy-hosts option for those that do want to copy
the dom0's /etc/hosts
* Documented both options in the .conf file as well as in
the scripts
This will fix 70-install-ssh, allowing it complete postinst by
generating host SSH keys for it. The resulting RSA host key
fingerprint is printed in an Installation summary at the end
of isntall. Next step is to apply the same change to the remaining
70-install-ssh's.