Bug 212215

Summary: [NEW PORT] dns/knot-resolver: caching full resolver implementation of NIC.CZ
Product: Ports & Packages Reporter: Leo Vandewoestijne <freebsd>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Some People CC: pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Knot-Resolver 1.1.1
none
adjusting UIDs and GIDs
freebsd: maintainer-approval+
New shar file for knot-resolver
freebsd: maintainer-approval+
creates the kres user in UIDs/GIDs
none
better GIDs and UIDs
freebsd: maintainer-approval+
hopefully the final shar freebsd: maintainer-approval+

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.

Notes:
- 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 freebsd_triage 2016-08-31 16:08:28 UTC
testbuilds@work
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 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:

%%REDIS%%/usr/lib/kdns_modules/redis.so
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 freebsd_triage 2016-09-04 18:52:33 UTC
Please note: Fails to build on 9.3a:

http://people.freebsd.org/~pi/logs/dns__knot-resolver-93a
  (if -Wtype-limits is patched out of config.mk)

http://people.freebsd.org/~pi/logs/dns__knot-resolver-93a-1473013717.txt
  (failure with -Wtype-limits in config.mk)

so I mark it broken on 9 and commit.
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-04 18:57:10 UTC
Committed, thanks!
Comment 10 commit-hook freebsd_committer freebsd_triage 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

Log:
  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>

Changes:
  head/GIDs
  head/UIDs
  head/dns/Makefile
  head/dns/knot-resolver/
  head/dns/knot-resolver/Makefile
  head/dns/knot-resolver/distinfo
  head/dns/knot-resolver/files/
  head/dns/knot-resolver/files/patch-daemon_daemon.mk
  head/dns/knot-resolver/files/patch-lib_lib.mk
  head/dns/knot-resolver/files/patch-lib_nsrep.h
  head/dns/knot-resolver/files/patch-lib_resolve.h
  head/dns/knot-resolver/files/patch-platform.mk
  head/dns/knot-resolver/files/pkg-message.in
  head/dns/knot-resolver/pkg-descr
  head/dns/knot-resolver/pkg-plist
Comment 11 Mathieu Arnold freebsd_committer freebsd_triage 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 freebsd_triage 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

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

  PR:		212215
  Reported by:	mat

Changes:
  head/dns/knot-resolver/Makefile
  head/dns/knot-resolver/pkg-plist
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?