diff options
author | Sam James <sam@gentoo.org> | 2021-03-13 09:39:55 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-13 09:42:46 +0000 |
commit | 44a0380c0bbc890785601f8824cd969d2d9de402 (patch) | |
tree | f6cc514a696610a477221cb3c70854c5caf5c91a /app-admin/sagan | |
parent | sci-libs/symengine: add 0.7.0 (diff) | |
download | gentoo-44a0380c0bbc890785601f8824cd969d2d9de402.tar.gz gentoo-44a0380c0bbc890785601f8824cd969d2d9de402.tar.bz2 gentoo-44a0380c0bbc890785601f8824cd969d2d9de402.zip |
app-admin/sagan: install tmpfiles, logrotate
Closes: https://bugs.gentoo.org/775707
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin/sagan')
-rw-r--r-- | app-admin/sagan/files/sagan.logrotate | 13 | ||||
-rw-r--r-- | app-admin/sagan/files/sagan.tmpfiles | 1 | ||||
-rw-r--r-- | app-admin/sagan/sagan-2.0.1-r3.ebuild (renamed from app-admin/sagan/sagan-2.0.1-r2.ebuild) | 16 |
3 files changed, 25 insertions, 5 deletions
diff --git a/app-admin/sagan/files/sagan.logrotate b/app-admin/sagan/files/sagan.logrotate new file mode 100644 index 000000000000..2db6afd0ee0e --- /dev/null +++ b/app-admin/sagan/files/sagan.logrotate @@ -0,0 +1,13 @@ +/var/log/sagan/alert +/var/log/sagan/sagan.log +/var/log/sagan/sagan.stats +{ + compress + delaycompress + missingok + notifempty + sharedscripts + postrotate + /sbin/service sagan reload 2>/dev/null || true + endscript +} diff --git a/app-admin/sagan/files/sagan.tmpfiles b/app-admin/sagan/files/sagan.tmpfiles new file mode 100644 index 000000000000..e6ab42e8ca13 --- /dev/null +++ b/app-admin/sagan/files/sagan.tmpfiles @@ -0,0 +1 @@ +d /run/sagan 0750 sagan sagan - diff --git a/app-admin/sagan/sagan-2.0.1-r2.ebuild b/app-admin/sagan/sagan-2.0.1-r3.ebuild index bc1c370afaac..6632f1f5d4e4 100644 --- a/app-admin/sagan/sagan-2.0.1-r2.ebuild +++ b/app-admin/sagan/sagan-2.0.1-r3.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit autotools flag-o-matic systemd +inherit autotools flag-o-matic tmpfiles systemd DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system" HOMEPAGE="https://sagan.quadrantsec.com/" @@ -74,12 +74,12 @@ src_install() { rm -r "${ED}"/var/run/ || die # Fix paths in config file - sed -i -e "s:/usr/local/:${EPREFIX}/:" "${ED}"/etc/sagan.yaml || die + sed -i \ + -e "s:/usr/local/:${EPREFIX}/:" \ + -e "s:/var/run/sagan:${EPREFIX}/run/sagan:" \ + "${ED}"/etc/sagan.yaml || die diropts -g sagan -o sagan -m 775 - - dodir /var/log/sagan - keepdir /var/log/sagan touch "${ED}"/var/log/sagan/sagan.log || die @@ -89,12 +89,18 @@ src_install() { newconfd "${FILESDIR}"/sagan.confd sagan systemd_dounit "${FILESDIR}"/sagan.service + newtmpfiles "${FILESDIR}"/sagan.tmpfiles sagan.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}"/sagan.logrotate sagan docinto examples dodoc -r extra/* } pkg_postinst() { + tmpfiles_process sagan.conf + if use smtp; then ewarn "You have enabled smtp use flag. If you plan on using Sagan with" ewarn "email, create valid writable home directory for user 'sagan'" |