Bug 263838 - dns/unbound: build and package unbound with --enable-event-api
Summary: dns/unbound: build and package unbound with --enable-event-api
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-07 12:57 UTC by Andrew Cagney
Modified: 2024-01-05 03:32 UTC (History)
2 users (show)

See Also:
fernape: maintainer-feedback? (yuri)


Attachments
patch (1.18 KB, patch)
2022-11-07 18:20 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2022-05-07 12:57:45 UTC
hopefully the subject says it all

the unbound that was bundled with FreeBSD 13
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2022-05-10 06:57:37 UTC
Hi Andrew,

Do you mean this file?

/usr/src/contrib/unbound/libunbound/unbound-event.h

It can be obtained when installing the source code of the distribution (or via git clone). Can you elaborate?

Thanks in advance.
Comment 2 Andrew Cagney 2022-05-10 12:26:38 UTC
(that's weird, the comments box appears at the top)

Yes.  If I remember right configuring with --libevent will add it to the install.
Comment 3 Andrew Cagney 2022-05-10 12:27:43 UTC
Make that --with-libevent
Comment 4 Andrew Cagney 2022-05-10 12:32:04 UTC
Nope, remind me to check the documentation:

  --enable-event-api      Enable (experimental) pluggable event base
                          libunbound API installed to unbound-event.h
Comment 5 Andrew Cagney 2022-10-26 01:09:29 UTC
Any progress? It is used when building libreswan's event-loop code.
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-27 10:51:46 UTC
(In reply to Andrew Cagney from comment #5)
Since that is marked as experimental ("Enable (experimental) pluggable event base libunbound API installed to unbound-event.h") I can see why it is not included by default.

I'm afraid that if you want ubound-event.h in 13.1 you will need to checkout the sources for the release and configure with --enable-event-api.
Comment 7 Andrew Cagney 2022-10-27 12:13:03 UTC
Interesting.  NetBSD, OpenBSD, and the Linux distros all bundle this.
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-27 12:49:43 UTC
(In reply to Andrew Cagney from comment #7)
I really don't know what version they use. At least in 1.17.0 (the one in current) it seems to be still experimental.
Comment 9 Andrew Cagney 2022-10-29 00:09:13 UTC
That's the version that is installed.
Comment 10 Fernando Apesteguía freebsd_committer freebsd_triage 2022-11-06 18:50:28 UTC
(In reply to Andrew Cagney from comment #9)
I doubt we will bundle that file being marked as unstable. Would the provided workaround be useful for you?
Comment 11 Andrew Cagney 2022-11-06 19:28:09 UTC
> I'm afraid that if you want ubound-event.h in 13.1 you will need to checkout the sources for the release and configure with --enable-event-api.

So libreswan should build and link against a private version of unbound?  I'm guessing but wouldn't bundling a private copy of a security sensitive library such as unbound be a big no-no when it comes to "ports" (FreeBSD's packaging guidelines).
Comment 12 Fernando Apesteguía freebsd_committer freebsd_triage 2022-11-07 07:51:06 UTC
(In reply to Andrew Cagney from comment #11)
Including maintainer in the discussion.

I don't see security/libreswan failing in the cluster and the port depends on dns/unbound. Does it fail for you?
Comment 13 Andrew Cagney 2022-11-07 13:14:01 UTC
Libreswan currently manages to build on FreeBSD because it is dragging around an old copy of unbound-event.h.  Little different to unpacking the sources.
Comment 14 Fernando Apesteguía freebsd_committer freebsd_triage 2022-11-07 16:38:03 UTC
(In reply to Andrew Cagney from comment #13)
Again maintainer might have better information :-)
Here are my thoughts:

In the install instructions[1] for Fedora and NetBSD they install unbound. That is from the packages repositories. So it would be equivalent to use unbound from ports in FreeBSD right? Unless something is incompatible.

If libreswan has its own copy of unbound-event.h, I wonder if they really _want_ to use that instead of whatever is installed in the host machine.

https://libreswan.org/wiki/Building_and_installing_from_source
Comment 16 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-07 18:20:23 UTC
Created attachment 237922 [details]
patch

Does the attached patch look reasonable?
Comment 17 Andrew Cagney 2022-11-07 18:50:39 UTC
I'm not clear on how this can help anyone building libreswan outside of FreeBSD's packaging system.

BTW, this should no longer be needed:
	${RLN} netbsd.mk freebsd.mk
Comment 18 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-07 19:14:35 UTC
(In reply to Andrew Cagney from comment #17)

Port patches are only for in-tree builds.

If you need the upstream package changed - you should contact the project maintainer.
Comment 19 Andrew Cagney 2022-11-07 23:25:12 UTC
What exactly needs to change upstream?  I don't see anything wrong with either libreswan or unbound here.
Comment 20 commit-hook freebsd_committer freebsd_triage 2022-11-08 01:44:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22784d03f650254ab0516030594719946b475db1

commit 22784d03f650254ab0516030594719946b475db1
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-11-08 01:37:04 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-11-08 01:44:19 +0000

    security/libreswan: Unbundle unbound-event.h

    Use the header from dns/unbound.

    PR:             263838
    Reported by:    Andrew Cagney <andrew.cagney@gmail.com>

 security/libreswan/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 21 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-08 01:44:53 UTC
Patch committed.

Thanks for reporting the issue!
Comment 22 Andrew Cagney 2022-11-08 01:45:58 UTC
Er, this bug isn't fixed.  unbound-event.h isn't being packaged.
Comment 23 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-08 01:50:42 UTC
(In reply to Andrew Cagney from comment #22)

What do you mean by "not being packaged"?
This port doesn't install any headers.
Comment 24 Andrew Cagney 2022-11-08 02:18:36 UTC
The request is to build and package unbound with --enable-event-api.
Comment 25 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-08 02:36:20 UTC
There is the port option EVAPI.
Is it the same thing?
Comment 26 Mark Linimon freebsd_committer freebsd_triage 2024-01-05 03:32:39 UTC
^Triage: canonicalize assignment.