Skip to content

unbound-uci-ext: add new package - #30753

Open
raspbeguy wants to merge 1 commit into
openwrt:masterfrom
raspbeguy:unbound-uci-ext
Open

raspbeguy wants to merge 1 commit into
openwrt:masterfrom
raspbeguy:unbound-uci-ext

Conversation

@raspbeguy

Copy link
Copy Markdown

📦 Package Details

Maintainer: @raspbeguy

Description:

unbound-uci-ext adds UCI options for unbound directives that the unbound package leaves out of UCI. The unbound package keeps them out on purpose (658c27e, closing #13750), and it ships /etc/unbound/unbound_srv.conf and /etc/unbound/unbound_ext.conf as the files for local additions. This package writes a marked region in each of those two files, from its own UCI configs. It does not touch /etc/config/unbound or anything outside the marked regions.

  • /etc/config/unbound_srv renders into unbound_srv.conf, inside the server: clause: interface, outgoing-interface, ip-transparent, and raw server: lines.
  • /etc/config/unbound_ext renders raw lines into unbound_ext.conf, for clauses such as forward-zone:, stub-zone: and view:.
  • A procd init script with a reload trigger on both configs. unbound restarts only when one of the two files changed, because a restart drops its cache.
  • Both configs ship with enabled '0', so an install changes nothing until the user turns them on. Stopping or removing the package removes the marked regions.
  • Values that contain a newline, or that are longer than 256 characters, are skipped with a warning, so a value cannot leave its marked region.
  • test.sh renders both configs into temporary files, and checks the rendered lines, the text outside the marked region, and the clean-up.

The uapi package (#30752) exposes these two configs as REST endpoints, but neither package depends on the other.


🧪 Run Testing Details

  • OpenWrt Version: 25.12.5 (r33051-f5dae5ece4)
  • OpenWrt Target/Subtarget: x86/64
  • OpenWrt Device: QEMU virtual machine (Q35)

Tested with the APK that this Makefile built in the 25.12.5 x86_64 SDK, from the v0.2.2 tag archive, with unbound 1.25.2:

  • It contains the same files, with the same modes, as the APK of the project's own 0.2.2 release.
  • An upgrade from 0.2.1 kept the user's /etc/config/unbound_srv and started the service.
  • test.sh passed on the device.
  • apk del stopped and disabled the service, and a fresh install enabled it again. With both configs disabled, neither step changed the two unbound files, and unbound kept serving.

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

Not applicable: the package carries no patches.

@openwrt openwrt Bot added the Add package label Oct 11, 2026
@raspbeguy raspbeguy mentioned this pull request Oct 11, 2026
3 tasks done
Comment thread net/unbound-uci-ext/test.sh Resolved

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commits; no new issues found.


Generated by Claude Code

unbound-uci-ext adds UCI options for unbound directives that the
unbound package leaves out of UCI. It renders them into a marked region
of /etc/unbound/unbound_srv.conf and unbound_ext.conf, the two files
that unbound ships for local additions. Both configs ship disabled, so
an install changes nothing.

Release notes:
https://github.com/openwrt-iac/unbound-uci-ext/releases/tag/v0.2.2

Signed-off-by: Guy Godfroy <guy.godfroy@gugod.fr>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commits; no new issues found.


Generated by Claude Code

@feckert

feckert commented Nov 27, 2026

Copy link
Copy Markdown
Member

Why don't we extend the “unbound-daemon” package to include these UCI functions?

@raspbeguy

Copy link
Copy Markdown
Author

Why don't we extend the “unbound-daemon” package to include these UCI functions?

@feckert The UCI of unbound is small on purpose. Its README says: "Not every Unbound option is in UCI, but rather, UCI simplifies the combination of related options." Its maintainer also left the interface directives out of UCI, so that users set them in the extended conf files. He is no longer the maintainer, but I prefer to follow his design.

The directives of this package do not fit that UCI. interface:, outgoing-interface: and ip-transparent: map one to one to unbound options, and the raw lines are a passthrough. Adding them to unbound-daemon changes the design of its UCI.

That way nothing changes for users who do not install it, and it needs no change in unbound-daemon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants