commit:     3ad9fc84678925ef3ba06623dfc34503d4276874
Author:     Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sun Jul 30 10:14:59 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jul 31 09:12:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ad9fc84

net-analyzer/ospd-openvas: add ospd-opevas.log to logrotate

Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32102
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-analyzer/ospd-openvas/files/ospd-openvas.logrotate      | 13 +++++++++++++
 ...-openvas-22.5.3.ebuild => ospd-openvas-22.5.3-r1.ebuild} |  3 +++
 2 files changed, 16 insertions(+)

diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.logrotate 
b/net-analyzer/ospd-openvas/files/ospd-openvas.logrotate
new file mode 100644
index 000000000000..7fed1aa23437
--- /dev/null
+++ b/net-analyzer/ospd-openvas/files/ospd-openvas.logrotate
@@ -0,0 +1,13 @@
+# Copyright 1999-2023 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/ospd-openvas.log {
+       compress
+       missingok
+       notifempty
+       sharedscripts
+       copytruncate
+       maxsize 10M
+}

diff --git a/net-analyzer/ospd-openvas/ospd-openvas-22.5.3.ebuild 
b/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild
similarity index 95%
rename from net-analyzer/ospd-openvas/ospd-openvas-22.5.3.ebuild
rename to net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild
index 5aa80f75d415..f7a5adb87543 100644
--- a/net-analyzer/ospd-openvas/ospd-openvas-22.5.3.ebuild
+++ b/net-analyzer/ospd-openvas/ospd-openvas-22.5.3-r1.ebuild
@@ -68,6 +68,9 @@ python_install() {
                        ${PN}.service
        fi
 
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/ospd-openvas.logrotate" ospd-openvas
+
        # OSPD OpenVAS attempts to call openvas via sudo as network security
        # scanning often requires priviliged operations.
        insinto /etc/sudoers.d

Reply via email to