diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
commit | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch) | |
tree | 66e860a5099bcad013f1cf667255dc372a7c11b3 /app-admin/sagan | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'app-admin/sagan')
-rw-r--r-- | app-admin/sagan/Manifest | 4 | ||||
-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-r4.ebuild (renamed from app-admin/sagan/sagan-2.0.1-r2.ebuild) | 42 |
4 files changed, 52 insertions, 8 deletions
diff --git a/app-admin/sagan/Manifest b/app-admin/sagan/Manifest index 57fa8d10fee9..9b4086b3e747 100644 --- a/app-admin/sagan/Manifest +++ b/app-admin/sagan/Manifest @@ -2,9 +2,11 @@ AUX sagan-1.0.0-liblognorm-json-c.patch 2472 BLAKE2B dc04f9949709523c3516d7b9693 AUX sagan.confd 239 BLAKE2B 2ca76c1bd5bdb7b29f007a4d93602f020f76b10d6e4313e138e09b49de0b0c6796bc729f32e88831881bdcd52637bfb3a8e42481d89a09648a2833a000570ace SHA512 7ee746984d3bb3361e3155860d54e307f9b94b9e3f98c09c29b4259cd37d7aefe969b5b942c04048328ec23265a2689b22403c32e3552b8062201aca2ef3ac34 AUX sagan.init 432 BLAKE2B 561344909a8f6610504f91bf72ba6fa89ac03fdacacd3189372f466b690b3421c3f1a8ce4750b747c53613c75f9b61696ec7b3c490597eb0eca36ebece23a26e SHA512 c5ec82e48ac33785a0e63deb6b2079e97a2f9b5f96682ccbf646b4deae5782cbceb5756b17fdff7af8cafd4e561e298d842c4c4f4aa5229ccc58f5f0fc06e6f7 AUX sagan.init-r1 424 BLAKE2B e6fdd676e772d2abfca02215026a95321edecb41fcbeec3aa45afe15abd667e323ec2f21375d41c692b9648017002c0b410d551034dcbd3f060f5bb1e2f95026 SHA512 341754a9b18fa4b4082a852cec2eaa5ea78be33eb9d8cdef5b7ec61a9d67d3b264b2c6a2aef030bd85d3644539447345c88fd23ebe99145e40f990f565706809 +AUX sagan.logrotate 239 BLAKE2B d3feae0843f34cc66ae930b694924a5a79ad580356c338e5f7473530a4fdd3bbadf4a849c749481dd281940b7116f4778bec55436b966df5ffdea0fc26ae9c2f SHA512 20111f2d1131c58fbd2b11e9c0946e53f100a09042d1c2e7a0204647523afe581da5f3777ce215e7da37d9ed9fa99663e31733d7d4df0cff31ebaea37a816b2e AUX sagan.service 277 BLAKE2B 524e83a05a0a7e8f83585add01f3365f573dbb0d1dc773ab68b42078267cad1d45f3cf872dfdf2048f8639d1c6edfdf94d5b7c31d7f5760f86430e7b84db6ee4 SHA512 ba8efb9e7f42f15789d63bc7ae0a4c77391ae14c1bb44924634f9fb63c8f2b44d920bce564d60e10816f605c3e6ef572438ca637c9853a350d551462a502a723 +AUX sagan.tmpfiles 32 BLAKE2B c00a177b7ea9df47a878783f3372f6d9709ea50e6c8bdde81f7d84bd01ecae1b084cf26ac4d5eeb891034fad29fc67802c557d495d312deb4fb3425a112bfe2f SHA512 7c65575415eaabdad9864f9af14042def57d9de24b4306037f78eda00b4c4d7de5a3b4849a316ee7519a239db2848cf94fb862a23c4b126575d200903389df22 DIST sagan-1.0.0RC3.tar.gz 285207 BLAKE2B 7322ffc73a8e86f07ef106b04feb9140ba94a51b9e286ef0c0b0d3fa609e8e03cef4c75e1d32502c1b70a4c078d8601d2a1c58058137bb793c8a52cecc4be20b SHA512 29388a339b290bb4de2359c0c54b9e1d43ef207b223a499a1a4faa36de4d9590a777a796dd773948e995d052b71f3ef47ca5bad5c133116c4dbb53b4fe336123 DIST sagan-2.0.1.tar.gz 487936 BLAKE2B 84a137bb0001c6758979d17cf67442262f732f7d49ce397183c0c226d6135e2c3cd8362452ef6b893e75a9cf5e874256d88f740b94df0dfa39587fc771ad4f8d SHA512 0cc288b67f641346bb0dbfcac2682c8c2b09e3e508b94dd5b2d5a81c2a80c7989f1d54725041210511877bd6b2338e8b0fdcae01f7084d39d48abef073d1fe64 EBUILD sagan-1.0.0_rc3-r1.ebuild 2237 BLAKE2B d911a530d495310f1e98294063d5a181cd391fde4c5385f0f79c206c75caf735d3a1edb7f14c9cee86d8248b601dcadc7c229dce09f010e06e8e15bb55fc892a SHA512 c26f4a6bdb8c8f51b4b98e202f25351e202ad57f350ad7eda2d6982dc109aebfaa06bdd10cd4818fbb1f8ae12b7a1efba5b962cb67de0a130937fbaf2cd4ba6d -EBUILD sagan-2.0.1-r2.ebuild 2422 BLAKE2B 0509f1784c9be4175dcf87f837e13b5c990353cfa408eb540e139a0286f8ac76138a332a1cc6923d6069dfe1e25f3c9964d858fcc47220714368b21eefb0f253 SHA512 1a27436452ef3c9615dce99af235832b2c477afe6a2348f545d73c4a2c703c39532cc0d59bc2959c700724a67e404330aa2e12d40954aa20e3afb5b9e03600c0 +EBUILD sagan-2.0.1-r4.ebuild 3219 BLAKE2B 2fa76b99db74c9b4e74ad01f8b0dcf40d186c55cd8345910045b67723db4d84403e765e28312c0ff2ceb708a2a3713f4ab0dd6e91e20bb8a74a96c18fbde1a02 SHA512 e31b945927f06265217a76c3f597f9e15d841602c3eb1e5bfa53afdeb3ff57e8032f91042a4cd9a9ed5efa020ad0f9b5bf0c35aaee903ae399447127f0024bfe MISC metadata.xml 805 BLAKE2B fe11cb2f2a1d73d2c8da9ef9df8abe1974e4e8ac95a0c91e3eca63828a3db2f8872c43961af2b279a942e299c1b2bc7a1ecd781b3051d92775339b2653c27ee0 SHA512 9a85b9166631c8522f4939876af5a9094f1637659d1ffce0c72707415a9433e0075cc240e2222e101640e21e9fc6f514c37d347915831254edf8e08e7239042d 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-r4.ebuild index bc1c370afaac..6cd0b6adfd46 100644 --- a/app-admin/sagan/sagan-2.0.1-r2.ebuild +++ b/app-admin/sagan/sagan-2.0.1-r4.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,27 +74,55 @@ 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 + diropts -g sagan -o sagan -m 750 + # bug #775902 + keepdir /var/sagan/{,fifo} + keepdir /var/log/sagan/{,stats} - dodir /var/log/sagan - - keepdir /var/log/sagan + fowners sagan:sagan /var/log/sagan/{,stats} touch "${ED}"/var/log/sagan/sagan.log || die - chown sagan.sagan "${ED}"/var/log/sagan/sagan.log || die + fowners sagan:sagan /var/log/sagan/sagan.log || die newinitd "${FILESDIR}"/sagan.init-r1 sagan 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_preinst() { + # bug #775902 revealed that we need 750 on /var/log/sagan or e.g. + # logrotate will fail. Let's inform the user to fix up permissions + # in such a case. + # (fperms won't modify the live filesystem.) + HAD_BROKEN_PERMS=0 + + if has_version "<app-admin/sagan-2.0.1-r4" ; then + HAD_BROKEN_PERMS=1 + fi +} + pkg_postinst() { + tmpfiles_process sagan.conf + + if [[ "${HAD_BROKEN_PERMS}" -eq 1 ]] ; then + ewarn "Please fix the permissions on ${EPREFIX}/var/log/sagan:" + ewarn "e.g. chmod 750 ${EPREFIX}/var/log/sagan" + ewarn "See bug #775902" + fi + 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'" |