* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/notus-scanner/files/, net-analyzer/notus-scanner/
@ 2024-09-14 10:09 Florian Schmaus
0 siblings, 0 replies; only message in thread
From: Florian Schmaus @ 2024-09-14 10:09 UTC (permalink / raw
To: gentoo-commits
commit: 0a122a0f71c4bd314bd97f712d1aba6d360d47bb
Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sat Sep 7 21:36:36 2024 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Sep 14 09:57:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a122a0f
net-analyzer/notus-scanner: Adds a check on log's dir owner and the logfile to logrotate
Closes: https://bugs.gentoo.org/937564
Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
net-analyzer/notus-scanner/files/notus-scanner.logrotate | 13 +++++++++++++
...nner-22.6.3-r1.ebuild => notus-scanner-22.6.3-r3.ebuild} | 12 +++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/net-analyzer/notus-scanner/files/notus-scanner.logrotate b/net-analyzer/notus-scanner/files/notus-scanner.logrotate
new file mode 100644
index 000000000000..195611c2959e
--- /dev/null
+++ b/net-analyzer/notus-scanner/files/notus-scanner.logrotate
@@ -0,0 +1,13 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# Daemon ignore HUP so we use 'copytruncate' instead of 'create'
+# with safe file size to prevent losing log entries.
+
+/var/log/gvm/notus-scanner.log {
+ compress
+ missingok
+ notifempty
+ sharedscripts
+ copytruncate
+ maxsize 10M
+}
diff --git a/net-analyzer/notus-scanner/notus-scanner-22.6.3-r1.ebuild b/net-analyzer/notus-scanner/notus-scanner-22.6.3-r3.ebuild
similarity index 87%
rename from net-analyzer/notus-scanner/notus-scanner-22.6.3-r1.ebuild
rename to net-analyzer/notus-scanner/notus-scanner-22.6.3-r3.ebuild
index 9ac39d6372b9..3e9f94355696 100644
--- a/net-analyzer/notus-scanner/notus-scanner-22.6.3-r1.ebuild
+++ b/net-analyzer/notus-scanner/notus-scanner-22.6.3-r3.ebuild
@@ -20,7 +20,7 @@ DEPEND="
net-libs/paho-mqtt-c
>=dev-python/psutil-5.9[${PYTHON_USEDEP}]
>=dev-python/python-gnupg-0.5.1[${PYTHON_USEDEP}]
- <dev-python/packaging-24.1[${PYTHON_USEDEP}]
+ <dev-python/packaging-24.2[${PYTHON_USEDEP}]
>=dev-python/paho-mqtt-1.5.1[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
<dev-python/tomli-3[${PYTHON_USEDEP}]
@@ -69,6 +69,16 @@ python_install() {
fowners -R gvm:gvm /var/lib/notus
fi
+ # Adding notus-scanner.log to logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+
+ # Set proper permissions on required files/directories
+ keepdir /var/log/gvm
+ if ! use prefix; then
+ fowners -R gvm:gvm /var/log/gvm
+ fi
+
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
systemd_dounit config/${PN}.service
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-14 10:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 10:09 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/notus-scanner/files/, net-analyzer/notus-scanner/ Florian Schmaus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox