You are not logged in.
Hi,
I'm using "makechrootpkg" to build custom packages. Some dependencies are hosted in a custom repository in my local network. While normal DNS resolution works it fails to resolve the URL of the custom repository, "http://myrepo.local". Is it possible to resolve this domain within the chroot or do have to use a script to automatically update the host file with the IP address of the repository in the chroot before running "makechrootpkg"?
Offline
automatically update the host file with the IP address
Do you generally resolve the domain this way?
*.local is typically avahi/mdns so (most likely) nsswitch.conf in the $CHROOT will have to be adapted to utilize this resolver?
Offline
No I don't, I have the Avahi daemon running. If I add "mdns4_minimal [NOTFOUND=return]" to the nsswitch.conf in the chroot, even the normal name resolution doesn't work anymore.
Offline
Did some more testing. I created a clean CHROOT with "mkarchroot", installed the "nss-mdns" package and added the "mdns4_minimal" entry to "/etc/nsswitch.conf" in the CHROOT. Now I tried
sudo arch-chroot /my/chroot pacman -Sy
and it works, but when running
sudo arch-nspawn /my/chroot pacman -Sy
I get
Could not resolve host: mynas.local
. The thing is "arch-spawn" is used in the "makechrootpkg" script.
Offline
Offline
I assume the CHROOT already uses the host network. The "arch-nspawn" script neither uses "systemd-nspawn@.service" to start the container nor does it add the "--network-veth" / "-n" option.
Last edited by M5Hc6UsQ (2020-03-28 23:39:03)
Offline
If the repo is located on the same machine, not merely the same network, I suggest trying to make the chroot access it via the file:///path/to/repo protocol instead of using an http server and DNS resolution.
makechrootpkg will automatically mount the file:/// repo into the chroot for you.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
The repository is on a different machine.
Offline