Bug 278280 - [NEW PORT] dns/py-libknot: Python bindings for libknot
Summary: [NEW PORT] dns/py-libknot: Python bindings for libknot
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: Vladimir Druzenko
URL: https://gitlab.nic.cz/knot/knot-dns/-...
Keywords: patch
Depends on: 279828 279989 280414
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-09 21:12 UTC by Einar Bjarni Halldórsson
Modified: 2024-07-23 16:58 UTC (History)
2 users (show)

See Also:
freebsd: maintainer-feedback+


Attachments
Adds new port, dns/py-libknot (2.06 KB, patch)
2024-04-09 21:12 UTC, Einar Bjarni Halldórsson
no flags Details | Diff
the whole picture, adjusting dns/knot3, adding dns/py-libknot (2.03 KB, patch)
2024-04-11 20:45 UTC, Leo Vandewoestijne
freebsd: maintainer-approval-
Details | Diff
final dns/py-libknot (1.40 KB, patch)
2024-04-12 16:05 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
final dns/py-libknot - tabs are tabs (1.35 KB, patch)
2024-04-14 17:15 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
dns/py-libknot 3.3.6 (1.40 KB, patch)
2024-06-19 11:59 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
py-libknot 3.3.7 (1.40 KB, patch)
2024-06-25 14:36 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
py-libknot 3.3.8 (1.40 KB, patch)
2024-07-23 09:44 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2024-04-09 21:12:22 UTC
Created attachment 249864 [details]
Adds new port, dns/py-libknot
Comment 1 Einar Bjarni Halldórsson 2024-04-09 21:14:18 UTC
libknot connects to knot dns through socket and needs libknot.so to run.

I added a LIB_DEPENDS= libknot.so:dns/knot3
Comment 2 Leo Vandewoestijne 2024-04-11 17:58:13 UTC
Please await my alternative proposal (I'm currently testing)
Comment 3 Leo Vandewoestijne 2024-04-11 20:45:12 UTC
Created attachment 249910 [details]
the whole picture, adjusting dns/knot3, adding dns/py-libknot

(In reply to Einar Bjarni Halldórsson from comment #1)

NO_ARCH=        yes

should be below

USE_PYTHON=    autoplist concurrent distutils pep517

distutils i.c.w. pep517 is conflicting.
distutils w/o pep517 works.
pep517 is likely preferred, but fails building, unless you add devel/py-hatchling as build dependancy.

I was trying to make this a metaport, as that would prevent version conflicts and double work. But it would make the Makefile of dns/knot3 even more overcomplicated. So instead I would like to take the approach as in attached patch.

All mutations now validate perfectly with all the testing tools.
Comment 4 Einar Bjarni Halldórsson 2024-04-12 14:53:16 UTC
(In reply to Leo Vandewoestijne from comment #3)
LGTM
Comment 5 Leo Vandewoestijne 2024-04-12 16:05:35 UTC
Created attachment 249934 [details]
final dns/py-libknot

Final result.

Thanks Einar, for pointing out I missed this module.
Comment 6 Leo Vandewoestijne 2024-04-14 17:15:20 UTC
Created attachment 249976 [details]
final dns/py-libknot - tabs are tabs

Identical, but corrected: retained tabs as tabs (and not spaces).
Comment 7 Leo Vandewoestijne 2024-06-19 11:59:55 UTC
Created attachment 251568 [details]
dns/py-libknot 3.3.6

Adjustment to make it the current 3.3.6
Comment 8 Leo Vandewoestijne 2024-06-24 08:47:46 UTC
(In reply to Leo Vandewoestijne from comment #7)
Patch already tested succesfully in Poudriere,
but also now when having the current Knot 3.3.6 already in place.
Comment 9 Leo Vandewoestijne 2024-06-25 14:36:07 UTC
Created attachment 251690 [details]
py-libknot 3.3.7

same, but update to Knot 3.3.7
Comment 10 Leo Vandewoestijne 2024-07-10 12:53:27 UTC
Comment on attachment 249864 [details]
Adds new port, dns/py-libknot

Declined 3.3.5 patch - for clarity.

The 3.3.7 patch is ready to be commited.
Comment 11 Leo Vandewoestijne 2024-07-23 09:44:39 UTC
Created attachment 252240 [details]
py-libknot 3.3.8

Same, but update to Knot 3.3.8

Tested all fine using poudriere, for all production versions.
Ready to be commited.
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-23 13:13:25 UTC
(In reply to Leo Vandewoestijne from comment #11)
WWW is weird:
dns/py-libknot/Makefile:WWW=             https://gitlab.nic.cz/knot/knot-dns/-/tree/master/python/libknot

Why not like for other knot ports:
dns/knot-resolver/Makefile:WWW=          https://www.knot-resolver.cz/
dns/knot3/Makefile:WWW=          https://www.knot-dns.cz/
Comment 13 Leo Vandewoestijne 2024-07-23 13:46:46 UTC
(In reply to Vladimir Druzenko from comment #12)
> Why not like for other knot ports?
>
I thought it was useful to point straight to the corresponding documentation specifically for this lib, especially since the generic knot3 documentation doesn't include it.
Comment 14 commit-hook freebsd_committer freebsd_triage 2024-07-23 16:52:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1a18e0ae75e73291bb9e6f9ed1ca832ae3e09daa

commit 1a18e0ae75e73291bb9e6f9ed1ca832ae3e09daa
Author:     Leo Vandewoestijne <freebsd@dns.company>
AuthorDate: 2024-07-23 16:49:21 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-23 16:49:21 +0000

    dns/py-libknot: new port: Python API using knot.sock to interact with the Knot DNS daemon

    Using this module it's possible to create scripts for efficient tasks
    that would require complex shell scripts with multiple calls of knotc.
    For communication with the daemon it uses the same mechanism as the
    knotc utility, i.e. communication via a Unix socket.

    PR:     278280

 dns/Makefile                   |  1 +
 dns/py-libknot/Makefile (new)  | 22 ++++++++++++++++++++++
 dns/py-libknot/distinfo (new)  |  3 +++
 dns/py-libknot/pkg-descr (new) |  2 ++
 4 files changed, 28 insertions(+)
Comment 15 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-23 16:58:55 UTC
Thanks.