monitoring-plugins: 2.3.0 -> 2.3.5

fixes the ping plugin with recent versions of ping
This commit is contained in:
Guillaume Girol 2023-12-22 12:00:00 +00:00
parent 54aac082a4
commit 769b8d7efc

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeShellScript
, fetchpatch
, autoreconfHook
, pkg-config
, runCommand
@ -40,25 +40,33 @@ let
mkdir -p $out/bin
ln -s /run/wrappers/bin/sendmail $out/bin/mailq
'';
# For unknown reasons the installer tries executing $out/share and fails so
# we create it and remove it again later.
share = writeShellScript "share" ''
exit 0
'';
in
stdenv.mkDerivation rec {
pname = "monitoring-plugins";
version = "2.3.0";
version = "2.3.5";
src = fetchFromGitHub {
owner = "monitoring-plugins";
repo = "monitoring-plugins";
rev = "v" + lib.versions.majorMinor version;
sha256 = "sha256-yLhHOSrPFRjW701aOL8LPe4OnuJxL6f+dTxNqm0evIg=";
rev = "v${version}";
sha256 = "sha256-J9fzlxIpujoG7diSRscFhmEV9HpBOxFTJSmGGFjAzcM=";
};
patches = [
# fix build (makefile cannot produce -lcrypto)
# remove on next release
(fetchpatch {
url = "https://github.com/monitoring-plugins/monitoring-plugins/commit/bad156676894a2755c8b76519a11cdd2037e5cd6.patch";
hash = "sha256-aI/sX04KXe968SwdS8ZamNtgdNbHtho5cDsDaA+cjZY=";
})
# fix check_smtp with --starttls https://github.com/monitoring-plugins/monitoring-plugins/pull/1952
# remove on next release
(fetchpatch {
url = "https://github.com/monitoring-plugins/monitoring-plugins/commit/2eea6bb2a04bbfb169bac5f0f7c319f998e8ab87.patch";
hash = "sha256-CyVD340+zOxuxRRPmtowD3DFFRB1Q7+AANzul9HqwBI=";
})
];
# TODO: Awful hack. Grrr...
# Anyway the check that configure performs to figure out the ping
# syntax is totally impure, because it runs an actual ping to
@ -78,8 +86,6 @@ stdenv.mkDerivation rec {
--with-ping-command='${lib.getBin unixtools.ping}/bin/ping -4 -n -U -w %d -c %d %s'
--with-ping6-command='${lib.getBin unixtools.ping}/bin/ping -6 -n -U -w %d -c %d %s'
)
install -Dm555 ${share} $out/share
'';
configureFlags = [
@ -107,10 +113,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''
rm $out/share
'';
meta = with lib; {
description = "Official monitoring plugins for Nagios/Icinga/Sensu and others";
homepage = "https://www.monitoring-plugins.org";