summaryrefslogtreecommitdiff
path: root/app-antivirus/fangfrisch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /app-antivirus/fangfrisch
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'app-antivirus/fangfrisch')
-rw-r--r--app-antivirus/fangfrisch/Manifest3
-rw-r--r--app-antivirus/fangfrisch/fangfrisch-1.5.0-r1.ebuild71
-rw-r--r--app-antivirus/fangfrisch/files/fangfrisch.service14
-rw-r--r--app-antivirus/fangfrisch/files/fangfrisch.timer12
4 files changed, 100 insertions, 0 deletions
diff --git a/app-antivirus/fangfrisch/Manifest b/app-antivirus/fangfrisch/Manifest
index 9433ec449fbf..6af2d3216f9b 100644
--- a/app-antivirus/fangfrisch/Manifest
+++ b/app-antivirus/fangfrisch/Manifest
@@ -1,5 +1,8 @@
AUX fangfrisch.conf 512 BLAKE2B 1b1cd87fbf2095f8d6839fef2175b70cdf1c8d72bcfa8eb06e9abe5e88150f3d4414a64679d775f1fef4378a940334c6c1567f387dbf6ce7f8bb40f6070f31c0 SHA512 e3fff2b24a6bd05a709472e9b7b5416732807171539d31c9f2129e8b7c2ef2b5f047a7090818a2aae77941169030e7785be7a6cded1220f8a130e9e60ea05ce6
AUX fangfrisch.cron 170 BLAKE2B b2b3572bb468942eecc006749710900bb19e29d40ad444a4b1ee1575f2d4eda77e2b4c66f6ab75208bbb28c48f0d26075b2d0517982cd62d0f082aa657ff82f2 SHA512 46ba3a9bbdc93896387e9ca3a2fef1bbae6711b3680baa0afddf41c83b537e62d9425fe93d7d7befc60dd8a89aa4c70f9947b596594d5ca93024acec1f9bf454
+AUX fangfrisch.service 347 BLAKE2B d7c36538bc8c96bd9f31cbfbba5e26572557cd87567b7c0aec1e6d4d6041194531a8da3ca831ba11f7df3558754e4bd965e03a5ae06ed8cadb9617b28028dbcf SHA512 e296b4c2f81754650845ed9ad9bd655cc81c2e59843508da5eca07d808a50a9bad5a3972f4f55ef4b97652d5f2f0c8d4e3b0cc63c7e38cc27074801e98961bcc
+AUX fangfrisch.timer 212 BLAKE2B debdcfa78e9583aa490be4e6c91834e134e1680b0f0f1284046f5ac611fa77878e0258f92e4f99ae2c4616b57a6a240b6be797c2e36308a218983e51dbf20848 SHA512 1e5d5cf39bddd7527350ef5f2fa7b1e3018ca32b3f0b2d0df4d31184eef11c811b1c0111f547b4174e1a550ffeee73f5c7215da8c381edb0cccf71887c77f8ff
DIST fangfrisch-1.5.0.tar.gz 115352 BLAKE2B 2c8ed5484255e336a960285f4eb13180691b2e4da0260f6ed2d1308575f5104cb79602c6c5bda93d2889dfdf24817748560376c9e13e6071810d9246b6120724 SHA512 cb15933d0cacc0912e7f1f103a213e277905a40ff4f7fe818c60d28c2ce92377aaea77b413f55f0ae8701e41eb35bcb2c3b3e04c624a6a57533ca621f93e00f5
+EBUILD fangfrisch-1.5.0-r1.ebuild 2099 BLAKE2B 8f3749d7ccf04f4c81b1fceda6e60f656aa5b4022741896a18f0dae1a57c2f5d17526bdd77f6598297a747ab960a1ebdf22c29b7aa54bf83024d885056919786 SHA512 e7aa0fe417a26c5f23c7781c66e5e9dd9d45b6e2ebc23d8c1c52a1a5aa2d861ecc0b904a4f55fefcce5e57b8b0dae01ca45a7e0b07205771ccf15620b2bf6656
EBUILD fangfrisch-1.5.0.ebuild 1941 BLAKE2B 66e519a27a2fc38a46cb0469c41016e6484bfc2e5c0b0a30ee83133a6d574a404d8db99bb40dd3351f8a14e98ca1fcdf0692f9bd62d5a579dffb6652b12082c0 SHA512 6723fb3247fa18f78dadf909295f27ef7c5c06211a9bb2d15e48c9a3791c027d9ae709bfe4efeee04d008d685349d83d42470654473fa4429d5e1f05d6483808
MISC metadata.xml 920 BLAKE2B 879f3328bdda86673c3adcd3915c8031c39cf4b40b4c8a57bcaa9933c20c237066a83f5a8aad46df25701b85a06996d1b49132c3f9a938bd53abd5a1849ce759 SHA512 c7008978e3a919ddd3f2890cb4f29c23eebabccbd27f078b56749715862db3e604ca8b677af8c2b233d554f3089ff9c40b80a3bd49eebfb5c4c2a7db6d8436fe
diff --git a/app-antivirus/fangfrisch/fangfrisch-1.5.0-r1.ebuild b/app-antivirus/fangfrisch/fangfrisch-1.5.0-r1.ebuild
new file mode 100644
index 000000000000..7f825da973c9
--- /dev/null
+++ b/app-antivirus/fangfrisch/fangfrisch-1.5.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit distutils-r1 readme.gentoo-r1 systemd
+
+DESCRIPTION="Update and verify unofficial Clam Anti-Virus signatures"
+HOMEPAGE="https://github.com/rseichter/fangfrisch https://pypi.org/project/fangfrisch/"
+SRC_URI="https://github.com/rseichter/fangfrisch/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+MY_CONF="/etc/${PN}.conf"
+MY_DBDIR="/var/lib/${PN}"
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="See https://rseichter.github.io/fangfrisch/ for the official
+documentation.
+
+### Fresh installations:
+
+Modify ${MY_CONF} according to your preferences.
+Assuming you place the database into ${MY_DBDIR}
+(recommended), execute the following commands in a root shell:
+
+mkdir -m 0770 ${MY_DBDIR}
+chgrp clamav ${MY_DBDIR}
+sudo -u clamav -- fangfrisch -c ${MY_CONF} initdb
+
+You can now enable /etc/cron.d/${PN} for periodic updates.
+
+### Alternative: Updating from release 1.0.1:
+
+Either create a fresh database or manually delete all existing
+database tables, then run the initdb command as shown above."
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=dev-python/requests-2.22.0[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.3.11[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+python_prepare_all() {
+ sed -i -e '/SQLAlchemy/d' setup.py || die
+ # Due to the nature of Fangfrisch, most tests require network
+ # connectivity and/or access keys to download signature files.
+ # Also, my own CI reports show that the tests are successful,
+ # so instead of a pick-and-choose approach, the complete tests
+ # directory is removed in this ebuild. --RS
+ if [ -d tests ]; then
+ rm -r tests || die
+ fi
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ insinto /etc
+ doins "${FILESDIR}/${PN}.conf"
+ insinto /etc/cron.d
+ newins "${FILESDIR}/${PN}.cron" ${PN}
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_dounit "${FILESDIR}/${PN}.timer"
+ distutils-r1_python_install_all
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ FORCE_PRINT_ELOG=1 readme.gentoo_print_elog
+}
diff --git a/app-antivirus/fangfrisch/files/fangfrisch.service b/app-antivirus/fangfrisch/files/fangfrisch.service
new file mode 100644
index 000000000000..5b22decaa627
--- /dev/null
+++ b/app-antivirus/fangfrisch/files/fangfrisch.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Download unofficial ClamAV virus definition files
+ConditionPathExists=/var/lib/fangfrisch/db.sqlite
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=clamav
+WorkingDirectory=/var/lib/fangfrisch
+ExecStart=/usr/bin/fangfrisch -c /etc/fangfrisch.conf refresh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/fangfrisch/files/fangfrisch.timer b/app-antivirus/fangfrisch/files/fangfrisch.timer
new file mode 100644
index 000000000000..c63323e3c7d4
--- /dev/null
+++ b/app-antivirus/fangfrisch/files/fangfrisch.timer
@@ -0,0 +1,12 @@
+[Unit]
+Description=Periodically run Fangfrisch
+Requires=fangfrisch.service
+
+[Timer]
+OnCalendar=*:00,10,20,30,40,50
+Persistent=true
+RandomizedDelaySec=10s
+Unit=fangfrisch.service
+
+[Install]
+WantedBy=timers.target