2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, lockfileProgs, perlPackages }:
|
2012-08-25 09:14:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "logcheck";
|
2021-04-30 19:49:55 +00:00
|
|
|
version = "1.3.23";
|
2017-03-01 02:10:30 +00:00
|
|
|
_name = "logcheck_${version}";
|
2012-08-25 09:14:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-01 02:10:30 +00:00
|
|
|
url = "mirror://debian/pool/main/l/logcheck/${_name}.tar.xz";
|
2021-04-30 19:49:55 +00:00
|
|
|
sha256 = "sha256-ohiLpUn/9EEsggdLJxiE/2bSXz/bKkGRboF85naFWyk=";
|
2012-08-25 09:14:40 +00:00
|
|
|
};
|
|
|
|
|
2017-06-16 11:48:04 +00:00
|
|
|
prePatch = ''
|
2017-06-17 09:38:50 +00:00
|
|
|
# do not set sticky bit in nix store.
|
2017-06-16 11:48:04 +00:00
|
|
|
substituteInPlace Makefile --replace 2750 0750
|
|
|
|
'';
|
|
|
|
|
2012-08-25 09:14:40 +00: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 09:14:40 +00: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 09:14:40 +00: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 09:14:40 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Mails anomalies in the system logfiles to the administrator";
|
2012-08-25 09:14:40 +00: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 01:11:51 +00:00
|
|
|
homepage = "https://salsa.debian.org/debian/logcheck";
|
2021-04-30 23:06:50 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2017-03-01 02:10:30 +00:00
|
|
|
maintainers = [ maintainers.bluescreen303 ];
|
2012-08-25 09:14:40 +00:00
|
|
|
};
|
|
|
|
}
|