summaryrefslogtreecommitdiff
path: root/app-admin/logcheck
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/logcheck')
-rw-r--r--app-admin/logcheck/Manifest3
-rw-r--r--app-admin/logcheck/files/logcheck-r3.cron11
-rw-r--r--app-admin/logcheck/files/logcheck.cron.d1
-rw-r--r--app-admin/logcheck/logcheck-1.4.3-r3.ebuild99
4 files changed, 114 insertions, 0 deletions
diff --git a/app-admin/logcheck/Manifest b/app-admin/logcheck/Manifest
index ec1dd8326668..deb106ea5cc1 100644
--- a/app-admin/logcheck/Manifest
+++ b/app-admin/logcheck/Manifest
@@ -1,7 +1,10 @@
+AUX logcheck-r3.cron 353 BLAKE2B ad9e0ad6017787830c4414cc7e5133d38e1ea334a8ab090038d2aa636eb1c20c1f823e70c5f59fd013ecad4e66c8f0283498a2389d5589356d0674a840b45977 SHA512 c1d75f2cc2d0fd8e0db3e190653276dfd84093a755aa2b6bd1a73d08652f9696ca15aa6265337eede5f29b8353742857dc4904bbfae2a6a7591af2a26ebc389d
AUX logcheck.cron 334 BLAKE2B d7c2fbaf80f841af46080d0855d64ac3bcf649930cd8e715d02109b35022326c3a0ce6c966c0d406163324a7abe51c7b3a1b9701136d8bd83889d9b040608a7b SHA512 9e8b70d3c0e04e060af08d1c1497930d56fe0044b0bfbceeeb0a5b43e14d9bbd5e737591a2d47a1993f0430a2533ba3e3e49167922151e89d6e3f4b74f13ca15
+AUX logcheck.cron.d 47 BLAKE2B 2a8f0c8ba851038d4f2162ea4afbada31c57da397a30ad26bb29e2fa0d335edb6fb3ecf4a88a6028aada63ef2867eeb1454f3adde9bd5137ea70f31792a22b24 SHA512 f97a28de107afb899c0762949ee09a6840544fa6f83381e52ed905554c408c80270ab2620cf74c67a0a1cec14515f2d8e2a7dd1ff302c8add64b174aa8898482
AUX logcheck.service 210 BLAKE2B 9a523099c54580b141b17933bb833f386ed49ed5534374db6ceb6dd1d50762a4b1beb598f5e8674da4574e69504a46aee7f889196510aeaf46b3e7a1c38f6b33 SHA512 4590ed0d08b2fd695382a9236f186de07216013ed7e1be1a417d3c4ea59180b840d8bf5cba7ea321d61ffe7254699213ec13aabb6426bcd320dc9890c7d824f2
AUX logcheck.timer 140 BLAKE2B eef8f5fb279b417c4ecbbd849a4e01aabf77744deab5fdd574cab6728b8d09046f38f269486e2119bc151b5ace042fce9917f216d30960df92aeee5fb875b48d SHA512 3b1eb31ea97c12021c562813ae94d595f56699ca26d47b04cd0b4ccd67afd17fe977d34958e66a21da69416d24900c4be292a175a66f68f65bba134e7bec21d7
AUX logcheck.tmpfiles 72 BLAKE2B 025613bfed9705108c89566cb298ea4ae9754bc8c3d34d5aded2fad7fb74c20d437bb1e83cc4aa6f816a8e0035fab26ec6a307922cd1852b6f45af3c2d6c0b21 SHA512 738ae50af504709931fe7e4bdbf4024f095e489bd674d83a63565a07eea4f13945ff8d303d432eb891a1af74ed3711e88e0fce06d846de49e8c1eb7f4911f31d
DIST logcheck-1.4.3.tar.gz 168176 BLAKE2B f319a644afa0de5533e37b288456f35bdc47daa6c76c413dc916d05f162b24467f70d73bba97eb9cdbc162973e9495daa48263d9f04a2f0151f7ddc5b66a6a37 SHA512 c853493d693dd44f477561596be4de1ad74c4b4380f83f86d6204e0de59c7edccdc4c8d6ec53a96f6eefa4d1995910e9e395c7573b0e2ee8f75d632abb104e09
EBUILD logcheck-1.4.3-r2.ebuild 2408 BLAKE2B 39206de6d101724fd662fa332f7c5c1ce03c3372e8471c3a14408d62d7d291a5736bd815fc98156bcef7b282e6a68b9078197a3a5d09fc6fab4c984f7aa06ed6 SHA512 d93f3db062b16d9c6aeaf8c513f6b07533eac707597eb627c1a1f46558988e5a3b0eac12d9b6ca314e78cddc1ad88339046900e6bdb1c5e1152de3e0577c03ea
+EBUILD logcheck-1.4.3-r3.ebuild 2575 BLAKE2B 31733361c20091130f9397d109c8addaee79bf3037f6813a30fbac5edd2e26a4ca0a3004cc0dbb5b4e1101760d0975642a2caf91a754d0aa046032a478e4454b SHA512 7e912ed2c9d2a0a5b8224a76301b3ff892bc474b025bdaa720ee46bf1d8923ab765363910a0eefb3024f78685d5813fc9223cb3990fdc29319f39aedc27323ca
MISC metadata.xml 1473 BLAKE2B 2604b73278294910db47dbf0731553125548286e2dd82bc3d733564a67f6fef6d522d2ad0be50104778d09fc20751dcc1532fd929157e23d409b999df376084e SHA512 b25aaaf6aedddf70c9d3c098f72f50b5beca2d7e1044627b76d762df69c4b0494b2e72c8a5647323afcbc0abbac8478331004808841d5d42590bb0657d1d732b
diff --git a/app-admin/logcheck/files/logcheck-r3.cron b/app-admin/logcheck/files/logcheck-r3.cron
new file mode 100644
index 000000000000..2ae64f767871
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck-r3.cron
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# To enable sync via cron, execute "runuser -u logcheck touch /etc/logcheck/cron-logcheck-enabled"
+if [[ ! -f /etc/logcheck/cron-logcheck-enabled ]]; then
+ exit
+fi
+if [ ! -d /var/lock/logcheck ]; then
+ mkdir -p /var/lock/logcheck
+ chown logcheck:logcheck /var/lock/logcheck
+fi
+/sbin/runuser -u logcheck --nice -n10 /usr/sbin/logcheck "$@"
diff --git a/app-admin/logcheck/files/logcheck.cron.d b/app-admin/logcheck/files/logcheck.cron.d
new file mode 100644
index 000000000000..bd95c1a95b5c
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.cron.d
@@ -0,0 +1 @@
+@reboot sleep 60; /etc/cron.hourly/logcheck -R
diff --git a/app-admin/logcheck/logcheck-1.4.3-r3.ebuild b/app-admin/logcheck/logcheck-1.4.3-r3.ebuild
new file mode 100644
index 000000000000..7e6a9a120e1c
--- /dev/null
+++ b/app-admin/logcheck/logcheck-1.4.3-r3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2024 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
+ 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)\/var\/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}"-r3.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
+}