app-admin/logcheck: add 1.4.7

Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45234
Closes: https://github.com/gentoo/gentoo/pull/45234
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Giuseppe Foti
2026-01-02 17:49:48 +01:00
committed by Florian Schmaus
parent 6cb9f508d3
commit a092f24bda
2 changed files with 101 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST logcheck-1.4.3.tar.gz 168176 BLAKE2B f319a644afa0de5533e37b288456f35bdc47daa6c76c413dc916d05f162b24467f70d73bba97eb9cdbc162973e9495daa48263d9f04a2f0151f7ddc5b66a6a37 SHA512 c853493d693dd44f477561596be4de1ad74c4b4380f83f86d6204e0de59c7edccdc4c8d6ec53a96f6eefa4d1995910e9e395c7573b0e2ee8f75d632abb104e09
DIST logcheck-1.4.7.tar.gz 174088 BLAKE2B a60607789ffb8e77c2c58a92c3c6a25f541e2344f4d067dc5401e17f6b7da2a8df71026f51f51e41089e65be7c9706c2d7c178ded2d29ee14f40e32ddd66eba7 SHA512 40136a008d279f9cd7383b2cbd2e6a277c6672304579fc7ffe2924935a314102778855d7c660316e6e3cb37ccb5e19bd2374c81f10adc241c1e254d61b743f68

View File

@@ -0,0 +1,100 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit readme.gentoo-r1 systemd tmpfiles
DESCRIPTION="Mails anomalies in the system logfiles to the administrator"
HOMEPAGE="https://logcheck.org/"
SRC_URI="https://salsa.debian.org/debian/logcheck/-/archive/debian/${PV}/logcheck-debian-${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-debian-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="cron systemd"
# Test (emake system-test) requires access to system logs
RESTRICT="test"
DEPEND="
acct-group/logcheck
acct-user/logcheck[systemd?]
"
RDEPEND="
${DEPEND}
!app-admin/logsentry
app-misc/lockfile-progs
dev-lang/perl
dev-perl/mime-construct
sys-apps/debianutils
virtual/mailx
cron? ( sys-apps/util-linux )
"
DOC_CONTENTS="
Please read the guide at https://wiki.gentoo.org/wiki/Logcheck
for installation instructions.
"
src_prepare() {
default
# Set version from PV, without using dpkg
sed -i -e "s/^VERSION=unknown/VERSION=\"${PV}\"/" "${S}/src/logcheck" || die
# QA-fix remove call to non existent command | Bug: #911281
sed -i "/dpkg-parsechangelog/d" "${S}/Makefile" || die
# Add /var/log/messages to checked logs
echo "/var/log/messages" >> "${S}/etc/logcheck.logfiles.d/syslog.logfiles" || die
# QA-fix Remove install of empty dirs to be created at runtime
sed -i "/install -d \$(DESTDIR)\/run\/lock\/logcheck/d" "${S}/Makefile" || die
# Comment systemd journal check if systemd use flag is not set | Bug: #913857
if ! use systemd; then
sed -i -e "s/^journal/#journal/" "${S}/etc/logcheck.logfiles.d/journal.logfiles" || die
fi
}
src_install() {
default
keepdir /var/lib/logcheck
dodoc docs/README.*
doman docs/logtail.8 docs/logtail2.8
if use cron; then
exeinto /etc/cron.hourly
newexe "${FILESDIR}"/"${PN}"-r5.cron ${PN}
insinto /etc/cron.d
newins "${FILESDIR}"/${PN}.cron.d ${PN}
DOC_CONTENTS="${DOC_CONTENTS}\n
\n
Read /etc/cron.hourly/logcheck.cron to activate hourly cron-based check!\n
\n
To send mail after reboot you should enable the cronjob in /etc/cron.d/logcheck."
fi
if use systemd; then
DOC_CONTENTS="${DOC_CONTENTS}\n
\n
To enable the systemd timer, run the following command:\n
systemctl enable --now logcheck.timer"
fi
systemd_dounit "${FILESDIR}/${PN}."{service,timer}
newtmpfiles "${FILESDIR}/logcheck.tmpfiles" logcheck.conf
readme.gentoo_create_doc
fowners -R logcheck:logcheck /etc/logcheck /var/lib/logcheck
}
pkg_postinst() {
tmpfiles_process logcheck.conf
readme.gentoo_print_elog
}