Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#58889 - {arch-install-scripts} arch-chroot: recursive symlinks to /etc/resolv.conf in host and target

Attached to Project: Arch Linux
Opened by Pete Anderson (P_Daddy) - Tuesday, 05 June 2018, 22:46 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 06 June 2018, 02:44 GMT
Task Type Bug Report
Category Arch Projects
Status Assigned
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No



The existing `chroot_add_resolv_conf` function attempts to resolve symlinks in the chroot environment. But it doesn't try to resolve them in the host environment, and if `/etc/resolv.conf` is a symlink in the host environment, then `mount --bind` will fail. Additionally, if the symlink is recursive, it won't try to resolve it any further. This proposed patch adds a `resolve_link` function, which is called to resolve both `$chrootdir/etc/resolv.conf` as well as `/etc/resolv.conf` on the host. It recursively resolves the link, and keeps the target beneath the chroot, if applicable.
This task depends upon