Bug 212215 - [NEW PORT] dns/knot-resolver: caching full resolver implementation of NIC.CZ
Summary: [NEW PORT] dns/knot-resolver: caching full resolver implementation of NIC.CZ
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
Depends on:
Reported: 2016-08-28 13:30 UTC by Leo Vandewoestijne
Modified: 2016-09-08 13:18 UTC (History)
1 user (show)

See Also:

Knot-Resolver 1.1.1 (8.90 KB, application/x-shar)
2016-08-28 13:30 UTC, Leo Vandewoestijne
no flags Details
adjusting UIDs and GIDs (1.59 KB, patch)
2016-08-30 10:42 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
New shar file for knot-resolver (8.20 KB, application/x-shar)
2016-09-01 08:07 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
creates the kres user in UIDs/GIDs (770 bytes, patch)
2016-09-01 08:08 UTC, Leo Vandewoestijne
no flags Details | Diff
better GIDs and UIDs (808 bytes, patch)
2016-09-04 11:56 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
hopefully the final shar (8.79 KB, application/x-shar)
2016-09-04 12:27 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Vandewoestijne 2016-08-28 13:30:58 UTC
Created attachment 174157 [details]
Knot-Resolver 1.1.1

Since a while NIC.CZ made a resolver library and daemon available.
With a few tiny patches is now works on FreeBSD also.

- normal testing procedures (as in the porters manual) works flawless
- portlint -ANt only returns the expected usual WARNS
- poudriere is complaining about pkg-plist, but that's because the plist generating is not taking the patches in account. Everything is dealt with, and installs and cleans up correctly.
- there's no rc script (yet), as it needs a supervisor (I will work on that later)
Comment 1 Leo Vandewoestijne 2016-08-30 10:42:31 UTC
Created attachment 174211 [details]
adjusting UIDs and GIDs

This additional patch addresses the UIDs and GIDs files in the main "/usr/ports" dir.
Also it addresses an orphaned README in the ports docs dir.

The patch was made with having the above shar applied to /usr/ports.orig
New ports are supposed to be added with a share file, but if -in this case- it's easier, then I can also supply the above two in a single diff.
Comment 2 Kurt Jaeger freebsd_committer 2016-08-31 16:08:28 UTC
Comment 3 Kurt Jaeger freebsd_committer 2016-08-31 18:08:50 UTC
Testbuilds done.

1) A port is not allowed to install outside /usr/local.

That port installs stuff into /usr/lib. Can you change that to install
into /usr/local/lib/ ?

2) The port has to options for MEMCACHED and REDIS, but the pkg-plist
does not list those only if the option is selected.

In the pkg-plist this should be masked like this:

Comment 4 Leo Vandewoestijne 2016-09-01 08:07:13 UTC
Created attachment 174281 [details]
New shar file for knot-resolver

Here's a new shar:

- It fixes the lib path

- It deals with the memcached and redis .so files in plus trough MEMCACHED_PLIST_FILES / REDIS_PLIST_FILES in Makefile (the %%REDIS%% method returns errors to me).

- The patch for the man8 path became absolute using a gzip command after stage

- It fixes a problem with modules; when .so dependencies were found modules would be installed regardless of selected option.

- It now has the kres user - in stead of 'hijacking' the knot (auth) user.
For this it needs patching of ports/UIDs and ports/GIDs - I'll upload a patch for that in the next minute.
Comment 5 Leo Vandewoestijne 2016-09-01 08:08:58 UTC
Created attachment 174282 [details]
creates the kres user in UIDs/GIDs

creates the kres user in ports/UIDs & ports/GIDs
Comment 6 Leo Vandewoestijne 2016-09-04 11:56:03 UTC
Created attachment 174368 [details]
better GIDs and UIDs

I think "kresd" is a better name for the user/group (in stead of "kres"),
as this is the name used in all example configs also.
Comment 7 Leo Vandewoestijne 2016-09-04 12:27:49 UTC
Created attachment 174370 [details]
hopefully the final shar

- adjusted USER/GROUP to what's used in config examples also.

- fixed the man path back to man/man8
(in stead of share/man/man8 - which wasn't found by the `man` command)

- removed duplicate docs from pkg-plist

So hopefully it's now perfect, or good enough.
Comment 8 Kurt Jaeger freebsd_committer 2016-09-04 18:52:33 UTC
Please note: Fails to build on 9.3a:

  (if -Wtype-limits is patched out of config.mk)

  (failure with -Wtype-limits in config.mk)

so I mark it broken on 9 and commit.
Comment 9 Kurt Jaeger freebsd_committer 2016-09-04 18:57:10 UTC
Committed, thanks!
Comment 10 commit-hook freebsd_committer 2016-09-04 18:57:42 UTC
A commit references this bug:

Author: pi
Date: Sun Sep  4 18:56:54 UTC 2016
New revision: 421347
URL: https://svnweb.freebsd.org/changeset/ports/421347

  New port: dns/knot-resolver

  The Knot DNS Resolver is a caching full resolver implementation,
  including both a resolver library and a daemon.

  WWW: https://www.knot-resolver.cz/

  PR:		212215
  Submitted by:	Leo Vandewoestijne <freebsd@dns-lab.com>

Comment 11 Mathieu Arnold freebsd_committer 2016-09-04 19:12:09 UTC
What tool generated the pkg-plist file?
I ask because that tool is very buggy and should be fixed asap.
Comment 12 commit-hook freebsd_committer 2016-09-04 19:18:45 UTC
A commit references this bug:

Author: pi
Date: Sun Sep  4 19:18:10 UTC 2016
New revision: 421348
URL: https://svnweb.freebsd.org/changeset/ports/421348

  dns/knot-resolver: clean up Makefile, pkg-plist

  PR:		212215
  Reported by:	mat

Comment 13 Leo Vandewoestijne 2016-09-08 13:18:11 UTC
(In reply to Kurt Jaeger from comment #8)

Thanks, I may be able to fix that to, will try to do so later on.

(In reply to Mathieu Arnold from comment #11)

I simply used `make makeplist` and
- removed the PORTDOCS (duplicate -and needed- in Makefile),
- adjusted share/man/man8/kresd.8.gz (to man/man8/kresd.8.gz),
- replaced the memcached/redis .so's (with the PLIST entry in Makefile).

Would you recommend another method to generate?