2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, lockfileProgs, perlPackages }:
|
2012-08-25 11:14:40 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "logcheck";
|
2021-02-04 23:47:35 +01:00
|
|
|
version = "1.3.22";
|
2017-03-01 03:10:30 +01:00
|
|
|
_name = "logcheck_${version}";
|
2012-08-25 11:14:40 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-01 03:10:30 +01:00
|
|
|
url = "mirror://debian/pool/main/l/logcheck/${_name}.tar.xz";
|
2021-02-04 23:47:35 +01:00
|
|
|
sha256 = "sha256-e7XeRNlFsexlVskK2OnLTmNV/ES2xWU+/+AElexV6E4=";
|
2012-08-25 11:14:40 +02:00
|
|
|
};
|
|
|
|
|
2017-06-16 13:48:04 +02:00
|
|
|
prePatch = ''
|
2017-06-17 11:38:50 +02:00
|
|
|
# do not set sticky bit in nix store.
|
2017-06-16 13:48:04 +02:00
|
|
|
substituteInPlace Makefile --replace 2750 0750
|
|
|
|
'';
|
|
|
|
|
2012-08-25 11:14:40 +02:00
|
|
|
preConfigure = ''
|
2018-12-15 04:50:31 +01:00
|
|
|
substituteInPlace src/logtail --replace "/usr/bin/perl" "${perlPackages.perl}/bin/perl"
|
|
|
|
substituteInPlace src/logtail2 --replace "/usr/bin/perl" "${perlPackages.perl}/bin/perl"
|
2012-08-25 11:14:40 +02:00
|
|
|
|
|
|
|
sed -i -e 's|! -f /usr/bin/lockfile|! -f ${lockfileProgs}/bin/lockfile|' \
|
|
|
|
-e 's|^\([ \t]*\)lockfile-|\1${lockfileProgs}/bin/lockfile-|' \
|
|
|
|
-e "s|/usr/sbin/logtail2|$out/sbin/logtail2|" \
|
2018-12-15 04:50:31 +01:00
|
|
|
-e 's|mime-construct|${perlPackages.mimeConstruct}/bin/mime-construct|' \
|
2012-08-25 11:14:40 +02:00
|
|
|
-e 's|\$(run-parts --list "\$dir")|"$dir"/*|' src/logcheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"SBINDIR=sbin"
|
|
|
|
"BINDIR=bin"
|
|
|
|
"SHAREDIR=share/logtail/detectrotate"
|
2018-12-15 04:50:31 +01:00
|
|
|
];
|
2012-08-25 11:14:40 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Mails anomalies in the system logfiles to the administrator";
|
2012-08-25 11:14:40 +02:00
|
|
|
longDescription = ''
|
|
|
|
Mails anomalies in the system logfiles to the administrator.
|
|
|
|
|
|
|
|
Logcheck helps spot problems and security violations in your logfiles automatically and will send the results to you by e-mail.
|
|
|
|
Logcheck was part of the Abacus Project of security tools, but this version has been rewritten.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://salsa.debian.org/debian/logcheck";
|
2017-03-01 03:10:30 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.bluescreen303 ];
|
2012-08-25 11:14:40 +02:00
|
|
|
};
|
|
|
|
}
|