2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, lockfileProgs, perlPackages }:
|
2012-08-25 10:14:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "logcheck";
|
2019-03-27 22:08:02 +00:00
|
|
|
version = "1.3.20";
|
2017-03-01 02:10:30 +00:00
|
|
|
_name = "logcheck_${version}";
|
2012-08-25 10:14:40 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-01 02:10:30 +00:00
|
|
|
url = "mirror://debian/pool/main/l/logcheck/${_name}.tar.xz";
|
2019-03-27 22:08:02 +00:00
|
|
|
sha256 = "1rmkvxhcwr9gb6z4dlgr6rrx5l70hshlxdggs6qx0w1ljcmx1dlz";
|
2012-08-25 10:14:40 +01:00
|
|
|
};
|
|
|
|
|
2017-06-16 12:48:04 +01:00
|
|
|
prePatch = ''
|
2017-06-17 10:38:50 +01:00
|
|
|
# do not set sticky bit in nix store.
|
2017-06-16 12:48:04 +01:00
|
|
|
substituteInPlace Makefile --replace 2750 0750
|
|
|
|
'';
|
|
|
|
|
2012-08-25 10:14:40 +01:00
|
|
|
preConfigure = ''
|
2018-12-15 03:50:31 +00: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 10:14:40 +01: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 03:50:31 +00:00
|
|
|
-e 's|mime-construct|${perlPackages.mimeConstruct}/bin/mime-construct|' \
|
2012-08-25 10:14:40 +01:00
|
|
|
-e 's|\$(run-parts --list "\$dir")|"$dir"/*|' src/logcheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"SBINDIR=sbin"
|
|
|
|
"BINDIR=bin"
|
|
|
|
"SHAREDIR=share/logtail/detectrotate"
|
2018-12-15 03:50:31 +00:00
|
|
|
];
|
2012-08-25 10:14:40 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Mails anomalies in the system logfiles to the administrator";
|
2012-08-25 10:14:40 +01: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 02:11:51 +01:00
|
|
|
homepage = "https://salsa.debian.org/debian/logcheck";
|
2017-03-01 02:10:30 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.bluescreen303 ];
|
2012-08-25 10:14:40 +01:00
|
|
|
};
|
|
|
|
}
|