summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:59:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:59:49 +0000
commit0e764bd6a393ec1a7e876e4cafbbf0665e78849c (patch)
treebd15cfb16df2d659532769e8bdfd76a16c7f7ad6 /debian/patches
parentAdding upstream version 1:9.18.19. (diff)
downloadbind9-0e764bd6a393ec1a7e876e4cafbbf0665e78849c.tar.xz
bind9-0e764bd6a393ec1a7e876e4cafbbf0665e78849c.zip
Adding debian version 1:9.18.19-1~deb12u1.debian/1%9.18.19-1_deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/0001-Disable-treat-warnings-as-errors-in-sphinx-build.patch28
-rw-r--r--debian/patches/0002-Add-support-for-reporting-status-via-sd_notify.patch177
-rw-r--r--debian/patches/series2
3 files changed, 207 insertions, 0 deletions
diff --git a/debian/patches/0001-Disable-treat-warnings-as-errors-in-sphinx-build.patch b/debian/patches/0001-Disable-treat-warnings-as-errors-in-sphinx-build.patch
new file mode 100644
index 0000000..21d80a4
--- /dev/null
+++ b/debian/patches/0001-Disable-treat-warnings-as-errors-in-sphinx-build.patch
@@ -0,0 +1,28 @@
+From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej@debian.org>
+Date: Wed, 18 May 2022 17:15:38 +0200
+Subject: Disable treat-warnings-as-errors in sphinx-build
+
+---
+ Makefile.docs | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.docs b/Makefile.docs
+index 1369289..8db3b51 100644
+--- a/Makefile.docs
++++ b/Makefile.docs
+@@ -2,7 +2,6 @@ SPHINX_V = $(SPHINX_V_@AM_V@)
+ SPHINX_V_ = $(SPHINX_V_@AM_DEFAULT_V@)
+ SPHINX_V_0 = -q
+ SPHINX_V_1 = -n
+-SPHINX_W = -W
+
+ AM_V_SPHINX = $(AM_V_SPHINX_@AM_V@)
+ AM_V_SPHINX_ = $(AM_V_SPHINX_@AM_DEFAULT_V@)
+@@ -21,7 +20,6 @@ SESSION_KEY = .. |session_key| replace:: ``$(runstatedir)/session.key``
+ export RST_EPILOG = $(RNDC_CONF)$(LF)$(RNDC_KEY)$(LF)$(NAMED_CONF)$(LF)$(BIND_KEYS)$(LF)$(NAMED_PID)$(LF)$(SESSION_KEY)
+
+ common_SPHINXOPTS = \
+- $(SPHINX_W) \
+ -c $(srcdir) \
+ -a \
+ $(SPHINX_V)
diff --git a/debian/patches/0002-Add-support-for-reporting-status-via-sd_notify.patch b/debian/patches/0002-Add-support-for-reporting-status-via-sd_notify.patch
new file mode 100644
index 0000000..dec22c7
--- /dev/null
+++ b/debian/patches/0002-Add-support-for-reporting-status-via-sd_notify.patch
@@ -0,0 +1,177 @@
+From: Debian DNS Team <team+dns@tracker.debian.org>
+Date: Wed, 25 Jan 2023 15:51:06 +0100
+Subject: Add-support-for-reporting-status-via-sd_notify
+
+---
+ bin/named/Makefile.am | 8 +++++++-
+ bin/named/server.c | 44 +++++++++++++++++++++++++++++++++++++++++---
+ configure.ac | 20 ++++++++++++++++++++
+ 3 files changed, 68 insertions(+), 4 deletions(-)
+
+diff --git a/bin/named/Makefile.am b/bin/named/Makefile.am
+index 57a023b..38045f0 100644
+--- a/bin/named/Makefile.am
++++ b/bin/named/Makefile.am
+@@ -14,6 +14,7 @@ AM_CPPFLAGS += \
+ $(MAXMINDDB_CFLAGS) \
+ $(DNSTAP_CFLAGS) \
+ $(LIBUV_CFLAGS) \
++ $(LIBSYSTEMD_CFLAGS) \
+ $(ZLIB_CFLAGS)
+
+ if HAVE_JSON_C
+@@ -109,7 +110,7 @@ named_LDADD = \
+ $(MAXMINDDB_LIBS) \
+ $(DNSTAP_LIBS) \
+ $(LIBUV_LIBS) \
+- $(LIBXML2_LIBS) \
++ $(LIBSYSTEMD_LIBS) \
+ $(ZLIB_LIBS)
+
+ if HAVE_JSON_C
+@@ -121,3 +122,8 @@ if HAVE_LIBNGHTTP2
+ named_LDADD += \
+ $(LIBNGHTTP2_LIBS)
+ endif HAVE_LIBNGHTTP2
++
++if HAVE_LIBXML2
++named_LDADD += \
++ $(LIBXML2_LIBS)
++endif HAVE_LIBXML2
+diff --git a/bin/named/server.c b/bin/named/server.c
+index 2f21fc5..6930d98 100644
+--- a/bin/named/server.c
++++ b/bin/named/server.c
+@@ -26,6 +26,10 @@
+ #include <fstrm.h>
+ #endif
+
++#ifdef HAVE_LIBSYSTEMD
++#include <systemd/sd-daemon.h>
++#endif
++
+ #include <isc/aes.h>
+ #include <isc/app.h>
+ #include <isc/attributes.h>
+@@ -219,11 +223,12 @@
+ } while (0)
+
+ #define CHECKFATAL(op, msg) \
+- do { \
++ { \
+ result = (op); \
+- if (result != ISC_R_SUCCESS) \
++ if (result != ISC_R_SUCCESS) { \
+ fatal(server, msg, result); \
+- } while (0)
++ } \
++ }
+
+ /*%
+ * Maximum ADB size for views that share a cache. Use this limit to suppress
+@@ -9929,6 +9934,15 @@ view_loaded(void *arg) {
+ "FIPS mode is %s",
+ FIPS_mode() ? "enabled" : "disabled");
+ #endif /* ifdef HAVE_FIPS_MODE */
++
++#if HAVE_LIBSYSTEMD
++ sd_notifyf(0,
++ "READY=1\n"
++ "STATUS=running\n"
++ "MAINPID=%" PRId64 "\n",
++ (int64_t)getpid());
++#endif /* HAVE_LIBSYSTEMD */
++
+ atomic_store(&server->reload_status, NAMED_RELOAD_DONE);
+
+ isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+@@ -10108,6 +10122,10 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
+ UNUSED(task);
+ INSIST(task == server->task);
+
++#if HAVE_LIBSYSTEMD
++ sd_notify(0, "STOPPING=1\n");
++#endif /* HAVE_LIBSYSTEMD */
++
+ /*
+ * We need to shutdown the interface before going
+ * exclusive (which would pause the netmgr).
+@@ -10528,6 +10546,10 @@ reload(named_server_t *server) {
+ isc_result_t result;
+
+ atomic_store(&server->reload_status, NAMED_RELOAD_IN_PROGRESS);
++#if HAVE_LIBSYSTEMD
++ sd_notify(0, "RELOADING=1\n"
++ "STATUS=reload command received\n");
++#endif /* HAVE_LIBSYSTEMD */
+
+ CHECK(loadconfig(server));
+
+@@ -10544,6 +10566,12 @@ reload(named_server_t *server) {
+ atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
+ }
+ cleanup:
++#if HAVE_LIBSYSTEMD
++ sd_notifyf(0,
++ "READY=1\n"
++ "STATUS=reload command finished: %s\n",
++ isc_result_totext(result));
++#endif /* HAVE_LIBSYSTEMD */
+ return (result);
+ }
+
+@@ -10903,6 +10931,10 @@ isc_result_t
+ named_server_reconfigcommand(named_server_t *server) {
+ isc_result_t result;
+ atomic_store(&server->reload_status, NAMED_RELOAD_IN_PROGRESS);
++#if HAVE_LIBSYSTEMD
++ sd_notify(0, "RELOADING=1\n"
++ "STATUS=reconfig command received\n");
++#endif /* HAVE_LIBSYSTEMD */
+
+ CHECK(loadconfig(server));
+
+@@ -10919,6 +10951,12 @@ named_server_reconfigcommand(named_server_t *server) {
+ atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
+ }
+ cleanup:
++#if HAVE_LIBSYSTEMD
++ sd_notifyf(0,
++ "READY=1\n"
++ "STATUS=reconfig command finished: %s\n",
++ isc_result_totext(result));
++#endif /* HAVE_LIBSYSTEMD */
+ return (result);
+ }
+
+diff --git a/configure.ac b/configure.ac
+index dc61f79..c3cd5d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -872,6 +872,26 @@ AS_CASE([$with_zlib],
+ AC_SUBST([ZLIB_CFLAGS])
+ AC_SUBST([ZLIB_LIBS])
+
++#
++# was --with-libsystemd specified?
++#
++# [pairwise: --with-libsystemd=auto, --with-libsystemd=yes, --without-libsystemd]
++AC_ARG_WITH([libsystemd],
++ [AS_HELP_STRING([--with-libsystemd],
++ [build with libsystemd integration [default=auto]])],
++ [], [with_libsystemd=auto])
++
++AS_CASE([$with_libsystemd],
++ [no],[],
++ [auto],[PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd],
++ [AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Use libsystemd library])],
++ [:])],
++ [yes],[PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd],
++ [AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Use libsystemd library])])],
++ [AC_MSG_ERROR([Specifying libsystemd installation path is not supported, adjust PKG_CONFIG_PATH instead])])
++AC_SUBST([LIBSYSTEMD_CFLAGS])
++AC_SUBST([LIBSYSTEMD_LIBS])
++
+ #
+ # Check if the system supports glibc-compatible backtrace() function.
+ #
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..90f118a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Disable-treat-warnings-as-errors-in-sphinx-build.patch
+0002-Add-support-for-reporting-status-via-sd_notify.patch