-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vendor import and integration for ldns-1.8.3 #732
Conversation
Cirrus didn't like it:
|
CC @dag-erling |
bf9f788
to
b2f62c4
Compare
Yes I forgot to add a new file, |
FWIW NLNet are very receptive to patches so I would encourage you to fix any build issues you encounter properly and submit the patches upstream rather than just work around them. |
Hi des, in this case the fixes are coming from ldns and probably need to be imported to FreeBSD. (see https://github.com/NLnetLabs/ldns/blob/173fbf303518d060e0d2bdc0bbd1830c0ec8f21d/Changelog#L65, https://github.com/NLnetLabs/ldns/blob/173fbf303518d060e0d2bdc0bbd1830c0ec8f21d/Changelog#L89) |
I'm talking about what you described as workarounds for build issues. |
One workaround is because of an existing fix upstream that doesn't play well with FreeBSD's toolchain and compilation settings, but will probably not make sense upstream (the renaming of a function). Another question - since I am rebasing again on |
No, that's upstream code. |
I think I now understand what happened: it was imported with 1.6.13 (where it was upstream), modified with 1.7.0 (possibly with differences from upstream?) but then upstream removed it in 1.7.1. That would explain the conflict; in any case it looks safe to remove this code, which would match upstream. I could not find any references to this in |
I think the workaround about missing prototypes for internal API calls is worth submitting upstream; I am currently breaking it down into a separate commit here. It should be brought as a single commit together with the vendor import in FreeBSD though. |
b2f62c4
to
e3cbf21
Compare
I managed to combine the two workarounds, into what I believe should be a single fix worth submitting upstream. |
This is now done in NLnetLabs/ldns#214. |
The underlying issue for the GCC 12 compilation fix was submitted upstream at NLnetLabs/ldns#215. |
d5f64de
to
4177c84
Compare
This adds a copy of the function prototypes for internal functions where necessary. It effectively works around the following compilation error: error: no previous prototype for function [-Werror,-Wmissing-prototypes] Tested on FreeBSD/amd64 (14.0-CURRENT).
parse.c performs pointer arithmetic with a pointer to a memory area that's been reallocated in the meantime. It is very inelegant but looks harmless otherwise. This change sets the -Wno-use-after-free flag with GCC for this file.
4177c84
to
1709a62
Compare
@dag-erling I have largely simplified the diff with your help from NLnetLabs/ldns#214; thanks! |
There are several other issues with this PR, please see the Phabricator review I posted which is only missing the gcc fix. |
I read through the Phabricator review but I don't see anything else than your comment "Remove man pages.", for which I can't find the corresponding changes. What's still missing? (I'm new to Phabricator) |
My version:
|
@dag-erling updated ldns in the base system in 5afab0e |
Dear FreeBSD developers,
While preparing the update of OpenSSL to version 3 in base, I figured some bugfixes upstream for ldns haven't made their way into the system yet. I have therefore prepared this vendor import for base, for which I also created a
contrib/ldns/include/internal.h
header as a workaround for build errors (internal function prototypes defined in.c
files, corresponding functions unused in their original location). Another change had to do with the renaming of a function in the API (ldns_serial_arithmitics_gmtime_r
vsldns_serial_arithmetics_gmtime_r
).Since des@ has done the previous vendor imports for ldns, it'd probably also be nice to involve him for review before merging.
Thanks!
Sponsored by the FreeBSD Foundation