summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Foti <foti.giuseppe@gmail.com>2023-09-25 12:02:26 +0200
committerFlorian Schmaus <flow@gentoo.org>2023-09-25 12:15:34 +0200
commit0d2d88f34936fb54005c8dcf0dbe8eb1aaebf3d3 (patch)
tree4cdb03f4c5406dcd55967193647baa0fb59fdf16 /net-analyzer/greenbone-feed-sync
parentdev-games/godot: add 3.5.3 (diff)
downloadgentoo-0d2d88f34936fb54005c8dcf0dbe8eb1aaebf3d3.tar.gz
gentoo-0d2d88f34936fb54005c8dcf0dbe8eb1aaebf3d3.tar.bz2
gentoo-0d2d88f34936fb54005c8dcf0dbe8eb1aaebf3d3.zip
net-analyzer/greenbone-feed-sync: add 23.8.0
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/33047 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-analyzer/greenbone-feed-sync')
-rw-r--r--net-analyzer/greenbone-feed-sync/Manifest1
-rw-r--r--net-analyzer/greenbone-feed-sync/greenbone-feed-sync-23.8.0.ebuild67
2 files changed, 68 insertions, 0 deletions
diff --git a/net-analyzer/greenbone-feed-sync/Manifest b/net-analyzer/greenbone-feed-sync/Manifest
index 4d52a242dac8..be45e9d47652 100644
--- a/net-analyzer/greenbone-feed-sync/Manifest
+++ b/net-analyzer/greenbone-feed-sync/Manifest
@@ -1 +1,2 @@
DIST greenbone-feed-sync-23.7.0.tar.gz 62500 BLAKE2B ff59b9d60159062d8dd1383368ccd54c946297d052d6b66c6cee8e61a1f2a7bdbf5d5a73d1442ae6bba68eda132c5eb0151bd13fbe963d0ac10de4885b8b9ec6 SHA512 b2357e400e1b8fccf64815ef80fb9800d06260d946a2aca946c887101a90833407c54f6e9b022fbb418fb08bfd5bc4a007a1b340f6deed143bb822ed1118fc64
+DIST greenbone-feed-sync-23.8.0.tar.gz 63822 BLAKE2B 01aa2f9dbea50049a6681cfe0c1335fd5de9f789fd2bd059410b56cdc8cff81211943fa56b8fd0f38ab58b91ed06516404ac9a5479724fedd75d0b10f7b627aa SHA512 36937bd9db10a40382ef2fedbe47a7acb5b7d4c7be41eb16e999e00757b40f54b614c75387acf997d10061b15b07b5bc3562d218109089a752496a4f346ae6be
diff --git a/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-23.8.0.ebuild b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-23.8.0.ebuild
new file mode 100644
index 000000000000..91fee4225921
--- /dev/null
+++ b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-23.8.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+DISTUTILS_USE_PEP517=poetry
+inherit distutils-r1 systemd
+
+DESCRIPTION="New script for syncing the Greenbone Community Feed"
+HOMEPAGE="https://github.com/greenbone/greenbone-feed-sync"
+SRC_URI="https://github.com/greenbone/greenbone-feed-sync/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-3+"
+KEYWORDS="~amd64 ~x86"
+IUSE="cron"
+RESTRICT="test"
+
+DEPEND="
+ acct-user/gvm
+ net-misc/rsync
+ >=net-analyzer/gvmd-22.5.0
+ dev-python/tomli[${PYTHON_USEDEP}]
+ dev-python/rich[${PYTHON_USEDEP}]
+"
+
+RDEPEND="
+ ${DEPEND}
+ cron? ( virtual/cron )
+"
+
+python_install() {
+ distutils-r1_python_install
+
+ #greenbone-feed-sync should not be run as root to avoid changing file permissions
+ insinto /etc/sudoers.d
+ newins - greenbone-feed-sync <<-EOF
+ gvm ALL = NOPASSWD: /usr/bin/greenbone-feed-sync
+EOF
+
+ if use cron; then
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/${PN}.cron ${PN}
+ fi
+
+ systemd_dounit "${FILESDIR}/${PN}.timer" "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ return
+ fi
+
+ if use cron; then
+ elog
+ elog "Edit ${EROOT}/etc/cron.weekly/greenbone-feed-sync to activate daily feed update!"
+ elog
+ fi
+
+ if systemd_is_booted; then
+ elog
+ elog "To enable the systemd timer, run the following command:"
+ elog " systemctl enable --now greenbone-feed-sync.timer"
+ elog
+ fi
+}