Skip to content

fix(dns): align snap BIND config with deb packaging#330

Open
alexsander-souza wants to merge 1 commit into
canonical:masterfrom
alexsander-souza:fix_missing_bind_db
Open

fix(dns): align snap BIND config with deb packaging#330
alexsander-souza wants to merge 1 commit into
canonical:masterfrom
alexsander-souza:fix_missing_bind_db

Conversation

@alexsander-souza

Copy link
Copy Markdown
Contributor

The snap was shipping static named.conf and db.local files that diverged from the system bind9 package and required manual maintenance. On Ubuntu 26.04+, bind9 no longer ships db.local and the localhost zone is handled internally by BIND.

Rewrite run-named to derive all BIND config files from the staged bind9 package at runtime, applying only the minimal snap-specific patches:

  • named.conf: rewrite /etc/bind/ paths to $SNAP_DATA/bind/
  • named.conf.options: written fresh with snap paths and the MAAS options include, replacing the trivial bind9-shipped version
  • named.conf.root-hints: rewrite /usr/share/dns/ to $SNAP/usr/share/dns/
  • named.conf.local: copied verbatim with the named.conf.maas include appended, mirroring what edit_named_options does for the deb install

@alexsander-souza alexsander-souza requested a review from a team June 8, 2026 23:33
@maas-lander

Copy link
Copy Markdown
Collaborator

Check where you would like a Mattermost message to be sent to when CI completes and this PR is merged

  • Direct message
  • ~maas

@alexsander-souza

Copy link
Copy Markdown
Contributor Author

there's no "browseable" version (that I know) of the config files shipped with bind9. the easiest way is to either:

  1. install bind9 in a resolute container
  2. download the ubuntu patch and extract the files under debian/extra/etc

@alexsander-souza alexsander-souza force-pushed the fix_missing_bind_db branch 2 times, most recently from 95ed545 to 86c0788 Compare June 9, 2026 17:19
The snap was shipping static named.conf and db.local files that diverged
from the system bind9 package and required manual maintenance. On Ubuntu
26.04+, bind9 no longer ships db.local and the localhost zone is handled
internally by BIND.

Rewrite run-named to derive all BIND config files from the staged bind9
package at runtime, applying only the minimal snap-specific patches:
- named.conf: rewrite /etc/bind/ paths to $SNAP_DATA/bind/
- named.conf.options: written fresh with snap paths and the MAAS options
  include, replacing the trivial bind9-shipped version
- named.conf.root-hints: rewrite /usr/share/dns/ to $SNAP/usr/share/dns/
- named.conf.local: copied verbatim with the named.conf.maas include
  appended, mirroring what edit_named_options does for the deb install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants