Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

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!
Tasklist

FS#43225 - [unbound] Unable to access trusted-keys due to chroot

Attached to Project: Community Packages
Opened by Mantas Mikulėnas (grawity) - Thursday, 25 December 2014, 18:06 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 11 January 2015, 22:19 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

After  FS#42146 , Unbound itself has difficulties with DNSSEC.

[Description]

By default Unbound comes configured to chroot into /etc/unbound, but the new rootkey file /etc/trusted-key.key is outside the chroot and therefore unreadable.

It means that Unbound won't perform any DNSSEC validation until I manually add 'auto-trust-anchor-file: "root.key"' in unbound.conf and copy the file to /etc/unbound.

This is actually worse than the pre- FS#42146  state. Previously it would have been enough to just run `sudo unbound-anchor` to fix both Unbound and libunbound. But after  FS#42146 , manual configuration became necessary.

(Also: '--with-rootkey-file' sets up the *auto*-trust-anchor-file option, which means Unbound will periodically update the file using RFC 5011, which might be undesirable from a packaging perspective.)

[Possible fix]

As much as I'd like having one central place for the root key, it's probably not going to work properly.

I suggest dropping '--with-rootkey-file' and instead ensuring that /etc/unbound/root.key exists by default, either by

a) running `cp /etc/trusted-key.key "$pkgdir/etc/unbound/root.key"` in package(),

b) running `unbound-anchor -a "$pkgdir/etc/unbound/root.key"` in package(),

c) adding "ExecStartPre=/usr/bin/unbound-anchor" to unbound.service,

or all of the above.

That way, both Unbound and gnutls-cli (libunbound) will work correctly.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Sunday, 11 January 2015, 22:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  unbound-1.5.1-4 in [community]
Comment by Mantas Mikulėnas (grawity) - Thursday, 25 December 2014, 18:08 GMT
(Option a) would change dnssec-anchors into a makedepend. Option b) downloads root.key from IANA over HTTPS using a hardcoded CA cert.)
Comment by Mantas Mikulėnas (grawity) - Friday, 26 December 2014, 15:21 GMT
Fedora solves this by running `unbound-anchor` from:

1) ExecStartPre http://pkgs.fedoraproject.org/cgit/unbound.git/tree/unbound.service

2) cronjob http://pkgs.fedoraproject.org/cgit/unbound.git/tree/unbound.cron

The -c option is optional (hardcoded certificate works too). If the PKGBUILD is reverted, then -a is also optional.
Comment by Gaetan Bisson (vesath) - Friday, 09 January 2015, 19:52 GMT
I really want to depend on the dnssec-anchors package for a copy of the root key (and its updates). Option a overwrites /etc/trusted-key.key so we cannot consider it. Copying this file under /etc/unbound would leave the copy outdated when dnssec-anchors is updated (unless unbound is updated at the same time). Option c is more acceptable but does not use our system-wide trusted-key.key.

So I feel a little uneasy implementing any of those options.
Comment by Mantas Mikulėnas (grawity) - Sunday, 11 January 2015, 20:56 GMT
d) ExecStartPre=/bin/cp -f /etc/trusted-key.key /etc/unbound/root.key

e) Don't chroot Unbound by default

Yeah, packaging purity is nice (like Firefox using system CAs), but not when it means more work for the end user...
Comment by Gaetan Bisson (vesath) - Sunday, 11 January 2015, 21:36 GMT
Alright. Please let me know if unbound-1.5.1-4 from [testing] does what you want.
Comment by Gaetan Bisson (vesath) - Sunday, 11 January 2015, 21:40 GMT
I meant [community-testing]. Cheers.
Comment by Mantas Mikulėnas (grawity) - Sunday, 11 January 2015, 22:07 GMT
Yes, this works better.

Loading...