public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Eli Schwartz" <eschwartz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/opendnssec/, net-dns/opendnssec/files/
Date: Mon,  8 Jul 2024 03:19:06 +0000 (UTC)	[thread overview]
Message-ID: <1720408720.e940cb1186e1d25ab604cad4b3e02cb7a324b30e.eschwartz@gentoo> (raw)

commit:     e940cb1186e1d25ab604cad4b3e02cb7a324b30e
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  8 03:13:00 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Mon Jul  8 03:18:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e940cb11

net-dns/opendnssec: add patch to build with gcc 14

Upstream's website appears to be having... issues. I did find a bug
reporting link but it led to a subdomain with broken SSL. Unclear how to
progress further.

The sum totality of the issues is a lot of missing headers. Not only did
this affect both configure checks as well as the installable artifacts,
but it also triggered LTO type mismatch errors when the missing stdlib
headers resulted in fake guessed prototypes that then mismatched libc.
Killing two birds with one stone!

Closes: https://bugs.gentoo.org/871294
Closes: https://bugs.gentoo.org/879727
Closes: https://bugs.gentoo.org/924367
Closes: https://bugs.gentoo.org/927176
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 ...s-of-headers-to-pass-the-basic-c99-sniff-.patch | 89 ++++++++++++++++++++++
 ...c-2.1.13.ebuild => opendnssec-2.1.13-r1.ebuild} |  4 +
 2 files changed, 93 insertions(+)

diff --git a/net-dns/opendnssec/files/0001-include-lots-of-headers-to-pass-the-basic-c99-sniff-.patch b/net-dns/opendnssec/files/0001-include-lots-of-headers-to-pass-the-basic-c99-sniff-.patch
new file mode 100644
index 000000000000..3d0f1b8e73ef
--- /dev/null
+++ b/net-dns/opendnssec/files/0001-include-lots-of-headers-to-pass-the-basic-c99-sniff-.patch
@@ -0,0 +1,89 @@
+From cd5e920572eabc54dc7350c41ca172b49e48ac1a Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 7 Jul 2024 21:38:29 -0400
+Subject: [PATCH] include lots of headers to pass the basic c99 sniff test
+
+Including configure checks, which currently emit broken results.
+
+And in one case, include config.h early enough to do something.
+---
+ common/scheduler/task.c             | 1 +
+ enforcer/src/daemon/time_leap_cmd.c | 2 +-
+ enforcer/src/utils/kaspcheck.c      | 1 +
+ enforcer/src/utils/kc_helper.c      | 1 +
+ m4/acx_broken_setres.m4             | 2 ++
+ 5 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/common/scheduler/task.c b/common/scheduler/task.c
+index 4dcf9e9..0dfa496 100644
+--- a/common/scheduler/task.c
++++ b/common/scheduler/task.c
+@@ -40,6 +40,7 @@
+ #include "duration.h"
+ #include "file.h"
+ #include "log.h"
++#include "utilities.h"
+ 
+ static const char* task_str = "task";
+ static pthread_mutex_t worklock = PTHREAD_MUTEX_INITIALIZER;
+diff --git a/enforcer/src/daemon/time_leap_cmd.c b/enforcer/src/daemon/time_leap_cmd.c
+index af41c8d..b17773c 100644
+--- a/enforcer/src/daemon/time_leap_cmd.c
++++ b/enforcer/src/daemon/time_leap_cmd.c
+@@ -26,8 +26,8 @@
+  *
+  */
+ 
+-#include <getopt.h>
+ #include "config.h"
++#include <getopt.h>
+ 
+ #include "file.h"
+ #include "duration.h"
+diff --git a/enforcer/src/utils/kaspcheck.c b/enforcer/src/utils/kaspcheck.c
+index 9bac3b7..fcdb36d 100644
+--- a/enforcer/src/utils/kaspcheck.c
++++ b/enforcer/src/utils/kaspcheck.c
+@@ -25,6 +25,7 @@
+ 
+ #define _GNU_SOURCE
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <getopt.h>
+ #include <string.h>
+ #include <syslog.h>
+diff --git a/enforcer/src/utils/kc_helper.c b/enforcer/src/utils/kc_helper.c
+index 72d181f..7f1278e 100644
+--- a/enforcer/src/utils/kc_helper.c
++++ b/enforcer/src/utils/kc_helper.c
+@@ -27,6 +27,7 @@
+ #include <syslog.h>
+ #include <stdarg.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+diff --git a/m4/acx_broken_setres.m4 b/m4/acx_broken_setres.m4
+index 374cee0..c9eda46 100644
+--- a/m4/acx_broken_setres.m4
++++ b/m4/acx_broken_setres.m4
+@@ -4,6 +4,7 @@ AC_DEFUN([ACX_BROKEN_SETRES],[
+ 		AC_MSG_CHECKING(if setresuid seems to work)
+ 		AC_RUN_IFELSE(
+ 			[AC_LANG_SOURCE([[
++#include <unistd.h>
+ #include <stdlib.h>
+ #include <errno.h>
+ int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
+@@ -20,6 +21,7 @@ int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
+ 		AC_MSG_CHECKING(if setresgid seems to work)
+ 		AC_RUN_IFELSE(
+ 			[AC_LANG_SOURCE([[
++#include <unistd.h>
+ #include <stdlib.h>
+ #include <errno.h>
+ int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
+-- 
+2.44.2
+

diff --git a/net-dns/opendnssec/opendnssec-2.1.13.ebuild b/net-dns/opendnssec/opendnssec-2.1.13-r1.ebuild
similarity index 96%
rename from net-dns/opendnssec/opendnssec-2.1.13.ebuild
rename to net-dns/opendnssec/opendnssec-2.1.13-r1.ebuild
index 36ea2b040912..7ae289d49c92 100644
--- a/net-dns/opendnssec/opendnssec-2.1.13.ebuild
+++ b/net-dns/opendnssec/opendnssec-2.1.13-r1.ebuild
@@ -59,6 +59,10 @@ PATCHES=(
 	"${FILESDIR}/${PN}-fix-run-dir-2.1.x.patch"
 	"${FILESDIR}/${PN}-use-system-trang.patch"
 	"${FILESDIR}/${PN}-fix-mysql.patch"
+	# fix some modern C errors due to missing includes. Not forwarded upstream,
+	# since upstream's website appears to be in a state of disarray and the
+	# "Bug Reporting" link doesn't work.
+	"${FILESDIR}"/0001-include-lots-of-headers-to-pass-the-basic-c99-sniff-.patch
 )
 
 DOCS=( MIGRATION NEWS )


             reply	other threads:[~2024-07-08  3:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08  3:19 Eli Schwartz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-18 19:12 [gentoo-commits] repo/gentoo:master commit in: net-dns/opendnssec/, net-dns/opendnssec/files/ Brian Evans
2016-03-24  0:30 Marc Schiffbauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1720408720.e940cb1186e1d25ab604cad4b3e02cb7a324b30e.eschwartz@gentoo \
    --to=eschwartz@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox