elgentos / setup

2 stars 2 forks source link

Fix Dnsmasq installation #31

Open janmartenjongerius opened 3 years ago

janmartenjongerius commented 3 years ago

Currently the Dnsmasq installation breaks on fresh installations. This is really hard to test against, because networking works slightly differently within CI and local development tooling.

The issue seems to be that apt cannot download the packages for dnsmasq once the configuration for the network manager has been altered and the network manager has restarted.

A solution could be to install the dnsmasq package before making these changes, but then the apt installation breaks, because it tries to initialize dnsmasq while there is a different service already using the same port. Since that does not seem to explicitly break the installation, perhaps it can be reconfigured at a later step.

The configuration file should probably depend on the dnsmasq executable and get a distinct make recipe. That way, partial installation does not skip the configuration of the network manager on a retry.

janmartenjongerius commented 3 years ago

Using sudo apt install dnsmasq --download-only -y the package and all its dependencies can be downloaded without being installed, which circumnavigates the catch-22 of having to disable DNS while downloading a DNS package that relies on DNS in order to download it in the first place.