[packages/nagios-nrpe] - fix from Debian for missing dhparam -C 2048 aka get_dh2048, rel 3
baggins
baggins at pld-linux.org
Sat Oct 16 22:11:14 CEST 2021
commit ed3355ed382003dfc05fe6cd26b0a9608642b3ca
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Oct 16 22:10:32 2021 +0200
- fix from Debian for missing dhparam -C 2048 aka get_dh2048, rel 3
11_reproducible_dh.h.patch | 79 ++++++++++++++++++++++++++++++++++++++++++++++
nagios-nrpe.spec | 11 +++++--
2 files changed, 87 insertions(+), 3 deletions(-)
---
diff --git a/nagios-nrpe.spec b/nagios-nrpe.spec
index 6f13e3f..da8d0cf 100644
--- a/nagios-nrpe.spec
+++ b/nagios-nrpe.spec
@@ -2,7 +2,7 @@ Summary: Nagios remote plugin execution service/plugin
Summary(pl.UTF-8): Demon i wtyczka zdalnego wywoływania wtyczek Nagios
Name: nagios-nrpe
Version: 4.0.3
-Release: 2
+Release: 3
License: GPL v2
Group: Networking
Source0: https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-%{version}/nrpe-%{version}.tar.gz
@@ -13,6 +13,7 @@ Source3: %{name}.tmpfiles
Source4: commands.cfg
Patch0: %{name}-config.patch
Patch1: nrpe_check_control.patch
+Patch2: 11_reproducible_dh.h.patch
URL: https://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details
BuildRequires: openssl-devel
BuildRequires: openssl-tools
@@ -67,8 +68,11 @@ na innych komputerach za pomocą demona nrpe.
%undos contrib/nrpe_check_control.c
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
+%{__aclocal}
+%{__autoconf}
%configure \
--with-nrpe-port=%{nsport} \
--with-nrpe-user=nagios \
@@ -109,7 +113,8 @@ if [ "$1" = "0" ] ; then
/sbin/chkconfig --del nrpe
fi
-%triggerpostun -- %{name} < 2.15-5
+%triggerpostun -- %{name} < 2.6-1.1
+# < 2.15-5
# skip *this* trigger on downgrade
[ $1 -le 1 ] && exit 0
@@ -129,7 +134,7 @@ sed -i -e '/^command\[/d' %{_sysconfdir}/nrpe.cfg
%service nrpe restart
-%triggerpostun -- %{name} < 2.6-1.1
+# < 2.6-1.1
%{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
%triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
diff --git a/11_reproducible_dh.h.patch b/11_reproducible_dh.h.patch
new file mode 100644
index 0000000..605fb1a
--- /dev/null
+++ b/11_reproducible_dh.h.patch
@@ -0,0 +1,79 @@
+Description: Use pre-generated dh.h for reproducible builds.
+Author: Bas Couwenberg <sebastic at debian.org>
+Bug-Debian: https://bugs.debian.org/834857
+Forwarded: not-needed
+
+--- /dev/null
++++ b/include/dh.h
+@@ -0,0 +1,53 @@
++#ifndef HEADER_DH_H
++# include <openssl/dh.h>
++#endif
++
++DH *get_dh2048()
++{
++ static unsigned char dhp_2048[] = {
++ 0xD0, 0x0A, 0x1E, 0x0E, 0x73, 0xE5, 0x51, 0xC3, 0x6C, 0xAA,
++ 0x7F, 0x6B, 0x9C, 0x9D, 0x47, 0x26, 0xAA, 0x25, 0x2B, 0x73,
++ 0xCD, 0x93, 0x94, 0xA2, 0xEA, 0x56, 0x14, 0xD4, 0x42, 0x48,
++ 0x21, 0x61, 0xF9, 0xA1, 0xB7, 0x88, 0xA7, 0xDA, 0x8B, 0xD8,
++ 0xFF, 0x12, 0x8D, 0x50, 0x2D, 0x1D, 0x40, 0xAB, 0xFD, 0x97,
++ 0x89, 0x18, 0x1D, 0x57, 0x69, 0xD3, 0x68, 0xBF, 0x68, 0xA1,
++ 0x20, 0xAD, 0x80, 0xFF, 0xB4, 0xE3, 0xC6, 0xC9, 0x5A, 0x62,
++ 0x23, 0x39, 0x45, 0x79, 0x8D, 0x03, 0x45, 0x55, 0xEB, 0xCA,
++ 0x34, 0x37, 0x44, 0x4B, 0x9C, 0xFF, 0x3B, 0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
++ DH *dh = DH_new();
++ BIGNUM *dhp_bn, *dhg_bn;
++
++ if (dh == NULL)
++ return NULL;
++ dhp_bn = BN_bin2bn(dhp_2048, sizeof (dhp_2048), NULL);
++ dhg_bn = BN_bin2bn(dhg_2048, sizeof (dhg_2048), NULL);
++ if (dhp_bn == NULL || dhg_bn == NULL
++ || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
++ DH_free(dh);
++ BN_free(dhp_bn);
++ BN_free(dhg_bn);
++ return NULL;
++ }
++ return dh;
++}
+--- a/macros/ax_nagios_get_ssl
++++ b/macros/ax_nagios_get_ssl
+@@ -288,15 +288,7 @@ if test x$SSL_TYPE != xNONE; then
+ # Find the openssl program
+
+ if test x$need_dh = xyes; then
+- AC_PATH_PROG(sslbin,openssl,value-if-not-found,$ssl_dir/sbin$PATH_SEPARATOR$ssl_dir/bin$PATH_SEPARATOR$PATH)
+ AC_DEFINE(USE_SSL_DH)
+- # Generate DH parameters
+- if test -f "$sslbin"; then
+- echo ""
+- echo "*** Generating DH Parameters for SSL/TLS ***"
+- # awk to strip off meta data at bottom of dhparam output
+- $sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h
+- fi
+ fi
+ fi
+ fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-nrpe.git/commitdiff/ed3355ed382003dfc05fe6cd26b0a9608642b3ca
More information about the pld-cvs-commit
mailing list