commit:     20506fc271fb085875d06d350c8980646168e4a8
Author:     Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Wed Feb 28 22:29:23 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Feb 29 08:23:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20506fc2

net-analyzer/greenbone-feed-sync: add 24.1.1

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

 net-analyzer/greenbone-feed-sync/Manifest          |  1 +
 .../greenbone-feed-sync-24.1.1.ebuild              | 70 ++++++++++++++++++++++
 2 files changed, 71 insertions(+)

diff --git a/net-analyzer/greenbone-feed-sync/Manifest 
b/net-analyzer/greenbone-feed-sync/Manifest
index e516e8f26691..231c9f429725 100644
--- a/net-analyzer/greenbone-feed-sync/Manifest
+++ b/net-analyzer/greenbone-feed-sync/Manifest
@@ -1 +1,2 @@
 DIST greenbone-feed-sync-23.10.0.tar.gz 63001 BLAKE2B 
5566cef8649e578cb498f0a5bc1e41f237a3702698b2012f3a62d8f5f647e6b1e3253c7d92e4a9fc82ad7991de8010b94ba8c1194a820511c49e5f5262e471ff
 SHA512 
fe5864c4e650f17a072cd6e4153779ea33ad8f0ac28e92114b40c465a04b70791b603ccbe82934dcdad13fce2003e2d9786cec75854efecf8aefa74c7ce178f4
+DIST greenbone-feed-sync-24.1.1.tar.gz 58806 BLAKE2B 
01229e630584fc04a6c1806f06d6769cdf76adfdff7b8b97032dff908c7de41cb928a902a43da2407e03643e0f7a868cbad148e6fd1680b4c91eb7b953c6cf20
 SHA512 
bb8d7c2917fe5096dc1041df832a7880a2760dff049e139e6a9d453c4e24ff04557be3c4f52a785496f67820d0c7bc256f7bfd23617a4734e263b0bc725ae039

diff --git a/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.1.1.ebuild 
b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.1.1.ebuild
new file mode 100644
index 000000000000..fefd8988d4cf
--- /dev/null
+++ b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.1.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} pypy3)
+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"
+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-13.2.0[${PYTHON_USEDEP}]
+       >=dev-python/shtab-1.6.5[${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
+       fperms 0750 /etc/sudoers.d
+       fperms 0440 /etc/sudoers.d/greenbone-feed-sync
+
+       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
+}

Reply via email to