* [gentoo-commits] repo/gentoo:master commit in: app-admin/logcheck/, app-admin/logcheck/files/
@ 2023-07-27 5:58 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-07-27 5:58 UTC (permalink / raw
To: gentoo-commits
commit: f93cfe38c170346e48fe1a20b25a92d677cdbd5a
Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sun Jul 23 14:28:44 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 27 05:57:52 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f93cfe38
app-admin/logcheck: new package, add 1.4.3
Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-admin/logcheck/Manifest | 1 +
app-admin/logcheck/files/logcheck.cron | 11 ++++
app-admin/logcheck/files/logcheck.service | 11 ++++
app-admin/logcheck/files/logcheck.timer | 8 +++
app-admin/logcheck/files/logcheck.tmpfiles | 2 +
app-admin/logcheck/logcheck-1.4.3.ebuild | 86 ++++++++++++++++++++++++++++++
app-admin/logcheck/metadata.xml | 36 +++++++++++++
7 files changed, 155 insertions(+)
diff --git a/app-admin/logcheck/Manifest b/app-admin/logcheck/Manifest
new file mode 100644
index 000000000000..91a93a36c6bc
--- /dev/null
+++ b/app-admin/logcheck/Manifest
@@ -0,0 +1 @@
+DIST logcheck-1.4.3.tar.gz 168176 BLAKE2B f319a644afa0de5533e37b288456f35bdc47daa6c76c413dc916d05f162b24467f70d73bba97eb9cdbc162973e9495daa48263d9f04a2f0151f7ddc5b66a6a37 SHA512 c853493d693dd44f477561596be4de1ad74c4b4380f83f86d6204e0de59c7edccdc4c8d6ec53a96f6eefa4d1995910e9e395c7573b0e2ee8f75d632abb104e09
diff --git a/app-admin/logcheck/files/logcheck.cron b/app-admin/logcheck/files/logcheck.cron
new file mode 100644
index 000000000000..091e1bd895b7
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.cron
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# To enable sync via cron, execute "sudo -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
+sudo -u logcheck nice -n10 /usr/sbin/logcheck
diff --git a/app-admin/logcheck/files/logcheck.service b/app-admin/logcheck/files/logcheck.service
new file mode 100644
index 000000000000..8d5cd4ac467c
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Mails anomalies in the system logfiles to the administrator
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/logcheck
+SyslogIdentifier=logcheck
+User=logcheck
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/logcheck/files/logcheck.timer b/app-admin/logcheck/files/logcheck.timer
new file mode 100644
index 000000000000..db5fc229a16e
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.timer
@@ -0,0 +1,8 @@
+[Unit]
+Description=Mails anomalies in the system logfiles to the administrator
+
+[Timer]
+OnCalendar=hourly
+
+[Install]
+WantedBy=timers.target
diff --git a/app-admin/logcheck/files/logcheck.tmpfiles b/app-admin/logcheck/files/logcheck.tmpfiles
new file mode 100644
index 000000000000..7d358900103a
--- /dev/null
+++ b/app-admin/logcheck/files/logcheck.tmpfiles
@@ -0,0 +1,2 @@
+# logcheck lock directory
+d /var/lock/logcheck 0755 logcheck logcheck -
diff --git a/app-admin/logcheck/logcheck-1.4.3.ebuild b/app-admin/logcheck/logcheck-1.4.3.ebuild
new file mode 100644
index 000000000000..2465085e8381
--- /dev/null
+++ b/app-admin/logcheck/logcheck-1.4.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2023 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
+"
+
+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
+
+ # 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
+}
+
+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}.cron ${PN}
+ DOC_CONTENTS="${DOC_CONTENTS}\n
+ \n
+ Read /etc/cron.hourly/logcheck.cron to activate hourly cron-based check!"
+ 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
+}
diff --git a/app-admin/logcheck/metadata.xml b/app-admin/logcheck/metadata.xml
new file mode 100644
index 000000000000..4ef48a7a9e21
--- /dev/null
+++ b/app-admin/logcheck/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>foti.giuseppe@gmail.com</email>
+ <name>Giuseppe Foti</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Logcheck is a simple utility which is designed to allow a system administrator to view the logfiles which are produced upon hosts under their control.
+ It does this by mailing summaries of the logfiles to them, after first filtering out "normal" entries.
+ Normal entries are entries which match one of the many included regular expression files contain in the database.
+ </longdescription>
+ <use>
+ <flag name="cron">Adds file to enable hourly cron job to run logcheck"</flag>
+ </use>
+ <upstream>
+ <maintainer status="active">
+ <name>Mathias Gibbens</name>
+ <email>gibmat@debian.org</email>
+ </maintainer>
+ <maintainer status="active">
+ <name>Jose M Calhariz</name>
+ <email>calhariz@debian.org</email>
+ </maintainer>
+ <maintainer status="active">
+ <name>Debian logcheck Team</name>
+ <email>logcheck@packages.debian.org</email>
+ </maintainer>
+ <bugs-to>https://bugs.debian.org/logcheck</bugs-to>
+ <changelog>https://metadata.ftp-master.debian.org/changelogs/main/l/logcheck/unstable_changelog</changelog>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/logcheck/, app-admin/logcheck/files/
@ 2024-03-14 22:31 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-03-14 22:31 UTC (permalink / raw
To: gentoo-commits
commit: a7e46cf410679edc1d2ebbed70a90456bd8f3547
Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 22:08:06 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 22:31:03 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7e46cf4
app-admin/logcheck: fix typo in files/logcheck-r3.cron
Closes: https://bugs.gentoo.org/926764
Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35760
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-admin/logcheck/files/{logcheck-r3.cron => logcheck-r4.cron} | 2 +-
.../logcheck/{logcheck-1.4.3-r3.ebuild => logcheck-1.4.3-r4.ebuild} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app-admin/logcheck/files/logcheck-r3.cron b/app-admin/logcheck/files/logcheck-r4.cron
similarity index 82%
rename from app-admin/logcheck/files/logcheck-r3.cron
rename to app-admin/logcheck/files/logcheck-r4.cron
index 2ae64f767871..1a8809ffe154 100644
--- a/app-admin/logcheck/files/logcheck-r3.cron
+++ b/app-admin/logcheck/files/logcheck-r4.cron
@@ -8,4 +8,4 @@ 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 "$@"
+/sbin/runuser -u logcheck -- nice -n10 /usr/sbin/logcheck "$@"
diff --git a/app-admin/logcheck/logcheck-1.4.3-r3.ebuild b/app-admin/logcheck/logcheck-1.4.3-r4.ebuild
similarity index 98%
rename from app-admin/logcheck/logcheck-1.4.3-r3.ebuild
rename to app-admin/logcheck/logcheck-1.4.3-r4.ebuild
index 7e6a9a120e1c..0cd2197b813f 100644
--- a/app-admin/logcheck/logcheck-1.4.3-r3.ebuild
+++ b/app-admin/logcheck/logcheck-1.4.3-r4.ebuild
@@ -67,7 +67,7 @@ src_install() {
if use cron; then
exeinto /etc/cron.hourly
- newexe "${FILESDIR}"/"${PN}"-r3.cron ${PN}
+ newexe "${FILESDIR}"/"${PN}"-r4.cron ${PN}
insinto /etc/cron.d
newins "${FILESDIR}"/${PN}.cron.d ${PN}
DOC_CONTENTS="${DOC_CONTENTS}\n
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/logcheck/, app-admin/logcheck/files/
@ 2024-10-06 8:33 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-10-06 8:33 UTC (permalink / raw
To: gentoo-commits
commit: 16f51eb30eafaf765b9d2a03c6bd7837b6e3073e
Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Wed Oct 2 21:25:01 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 6 08:32:51 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16f51eb3
app-admin/logcheck: add sys-apps/debianutils to RDEPEND
Closes: https://bugs.gentoo.org/930785
Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38854
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-admin/logcheck/files/{logcheck-r4.cron => logcheck-r5.cron} | 0
.../logcheck/{logcheck-1.4.3-r4.ebuild => logcheck-1.4.3-r5.ebuild} | 3 ++-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app-admin/logcheck/files/logcheck-r4.cron b/app-admin/logcheck/files/logcheck-r5.cron
similarity index 100%
rename from app-admin/logcheck/files/logcheck-r4.cron
rename to app-admin/logcheck/files/logcheck-r5.cron
diff --git a/app-admin/logcheck/logcheck-1.4.3-r4.ebuild b/app-admin/logcheck/logcheck-1.4.3-r5.ebuild
similarity index 97%
rename from app-admin/logcheck/logcheck-1.4.3-r4.ebuild
rename to app-admin/logcheck/logcheck-1.4.3-r5.ebuild
index 0cd2197b813f..66580814a200 100644
--- a/app-admin/logcheck/logcheck-1.4.3-r4.ebuild
+++ b/app-admin/logcheck/logcheck-1.4.3-r5.ebuild
@@ -28,6 +28,7 @@ RDEPEND="
app-misc/lockfile-progs
dev-lang/perl
dev-perl/mime-construct
+ sys-apps/debianutils
virtual/mailx
cron? ( sys-apps/util-linux )
"
@@ -67,7 +68,7 @@ src_install() {
if use cron; then
exeinto /etc/cron.hourly
- newexe "${FILESDIR}"/"${PN}"-r4.cron ${PN}
+ newexe "${FILESDIR}"/"${PN}"-r5.cron ${PN}
insinto /etc/cron.d
newins "${FILESDIR}"/${PN}.cron.d ${PN}
DOC_CONTENTS="${DOC_CONTENTS}\n
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-06 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06 8:33 [gentoo-commits] repo/gentoo:master commit in: app-admin/logcheck/, app-admin/logcheck/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-03-14 22:31 Sam James
2023-07-27 5:58 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox