summaryrefslogtreecommitdiff
path: root/app-antivirus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-21 07:00:13 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-21 07:00:13 +0000
commit3faa6ebe0068b432ee5a9390c47ceca068ea7fe9 (patch)
treec571245b455a9a5dd80022270c5ac943532620b9 /app-antivirus
parentee93fbc2bb111cf895ae00cc1877c68f0eafaf2a (diff)
gentoo auto-resync : 21:03:2024 - 07:00:13
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/Manifest.gzbin881 -> 881 bytes
-rw-r--r--app-antivirus/fangfrisch/Manifest5
-rw-r--r--app-antivirus/fangfrisch/fangfrisch-1.9.0.ebuild78
-rw-r--r--app-antivirus/fangfrisch/files/fangfrisch-has-news.sh82
-rw-r--r--app-antivirus/fangfrisch/files/fangfrisch.conf7
5 files changed, 171 insertions, 1 deletions
diff --git a/app-antivirus/Manifest.gz b/app-antivirus/Manifest.gz
index 02f12ca5e318..faf2bf9e8fb2 100644
--- a/app-antivirus/Manifest.gz
+++ b/app-antivirus/Manifest.gz
Binary files differ
diff --git a/app-antivirus/fangfrisch/Manifest b/app-antivirus/fangfrisch/Manifest
index db37b7e90ed1..d4274f04dfc3 100644
--- a/app-antivirus/fangfrisch/Manifest
+++ b/app-antivirus/fangfrisch/Manifest
@@ -1,7 +1,10 @@
-AUX fangfrisch.conf 512 BLAKE2B 1b1cd87fbf2095f8d6839fef2175b70cdf1c8d72bcfa8eb06e9abe5e88150f3d4414a64679d775f1fef4378a940334c6c1567f387dbf6ce7f8bb40f6070f31c0 SHA512 e3fff2b24a6bd05a709472e9b7b5416732807171539d31c9f2129e8b7c2ef2b5f047a7090818a2aae77941169030e7785be7a6cded1220f8a130e9e60ea05ce6
+AUX fangfrisch-has-news.sh 1857 BLAKE2B 2694e866b7517be0cc3377cad602a306bcfb62720ffa502bb0bf2aa9d9e85c550fc0cb65c19720cc50eb43042def295ac9346447a7f25a077fa6375580a3cd17 SHA512 9bb661c812d13220ecb0f8cda75243ee89b544b375472feba02c53afe1c7743dce1283b5320870cd733421435b8d1497d784eca4e6bba3283eef26b375dd578c
+AUX fangfrisch.conf 736 BLAKE2B a03bb594d233a1a5f7ee39055ce50a8987bc7f023d131c0a3e9a46fa72bfc8ee7e41158fb6b4348551117042b29915f31de3becddecffc20b8850124fbae96a1 SHA512 71c4ef04f42e668785f623385f550c921b03436165a85534eb012e7922043bc28f84aef30b6eecbe0fe62f4b0f100ff2f951f19db3ca4f55e0dea0c891dee38b
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.6.1.gh.tar.gz 113497 BLAKE2B a37b5b29b31a1d0166112b8939e691acc1721a91bda9e364a90c0c8d4ea7b7d3e1a24b8849c9ef4f0632996ed7bbdfc7985ab04c44c8ca4d57df21294867fd32 SHA512 a16b39b6520d80f69c561bc2d56fef28acaca35a9da214be920cdd907f76d3d6674ed4aa1290ad11a9364ede11472594d7e331ecd21924fe23e005ef9501d4ac
+DIST fangfrisch-1.9.0.gh.tar.gz 127572 BLAKE2B c05c68f904a6e7c7d9f9c5b82bb63366f86653cd13a94276108f52e9c523280320c8aa55ba94ecf079ba938a77e11ca7dc557f4c8fd1b1c7f37179c087dd8605 SHA512 08cc36f20884fedb553de905b8faafce99fcef80e3bce7c0b264691b1a8d83b91a582c095b684f6f7a6af77fd4ed0405fa771a74bbeee3f1b255ff74a161d37e
EBUILD fangfrisch-1.6.1.ebuild 1991 BLAKE2B 3d7b7ff401ceaf6fc2c9da3ffa3d68ae1ae11a616a747d52dcd2e59d97aab173ea3bb07b6142f7a795a70fec78b0b41075b0fdee10ebd1bcf217b817f766c130 SHA512 487495ea175f963c2aeda77710e4211afcc6444994a3f09876a5aecce66f123635117954a7ad1e4c9da661f77b3e3c1fad83b83459e932137b39f45376fda975
+EBUILD fangfrisch-1.9.0.ebuild 2081 BLAKE2B baa700cbb227c46c382502d3524d03aa5110ac967e6de205b9bdb1084c914125cf4ef1e5357126a162e72928bfcbe43b0b77808c8785eae2b933294e94430a31 SHA512 1b5e984df8e9287c4f92f0cec2114cbbc18623a68de08608d944fd7f1c6c57a70c476ed46fc7c1bbec982d4a01d0085bb1cb373d79ff61e47c0167f6b67b26f8
MISC metadata.xml 692 BLAKE2B 3896ef038265830e10720cde6131e2809084ea45302fee78ab5bba304cd56d5732b708e92119b37fa041d5a9bbd72ded926913a1ba7e4cc93ee7f2f310a53f19 SHA512 ac7bf47c11d46a81f1a81df4572b9592a5b12867db6797b7def523f73cde8b2f541e5dc8e59ff59b2b3e2cf7ba0fdc0ff5e7270913dd9b7bc718fa3e1b010771
diff --git a/app-antivirus/fangfrisch/fangfrisch-1.9.0.ebuild b/app-antivirus/fangfrisch/fangfrisch-1.9.0.ebuild
new file mode 100644
index 000000000000..ce305afaca14
--- /dev/null
+++ b/app-antivirus/fangfrisch/fangfrisch-1.9.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+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}.gh.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.
+
+### Updating from a previous release:
+
+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.4.0[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+ sed -i -e '/SQLAlchemy/d' setup.cfg || die
+ # Mitigate build system warnings, see
+ # https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages
+ cat >>setup.cfg <<EOT
+[options.packages.find]
+exclude =
+ tests
+ tests.*
+EOT
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ insinto /etc
+ doins "${FILESDIR}/${PN}.conf"
+ insinto /etc/cron.d
+ newins "${FILESDIR}/${PN}.cron" "${PN}"
+ exeinto /etc
+ doexe "${FILESDIR}/${PN}-has-news.sh"
+ 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-has-news.sh b/app-antivirus/fangfrisch/files/fangfrisch-has-news.sh
new file mode 100644
index 000000000000..7a018d911d32
--- /dev/null
+++ b/app-antivirus/fangfrisch/files/fangfrisch-has-news.sh
@@ -0,0 +1,82 @@
+#!/usr/bin/env bash
+# vim: ts=4 sw=4 noet ft=sh
+#
+# Example script to process Fangfrisch News.
+
+declare -r MAILFROM="noreply"
+declare -r MAILTO="alice@example.com"
+declare -r SUBJECT="Fangfrisch News are available"
+
+# Pick one of the following options and uncomment the 'declare'
+# statements. Otherwise, the script will not run otherwise.
+
+# Option 1: Mutt
+#declare -r MAILAPP="mutt"
+#declare -r MAILAPP_OPT=( "-s" "$SUBJECT" "$MAILTO" )
+
+# Option 2: sendmail
+#declare -r MAILAPP="sendmail"
+#declare -r MAILAPP_OPT=( "-t" )
+#export PATH="$PATH:/usr/sbin"
+
+# Option 3: swaks
+#declare -r MAILAPP="swaks"
+#declare -r MAILAPP_OPT=( "-d" "-" "-f" "$MAILFROM" "-t" "$MAILTO" )
+
+### No changes required below this line ###
+
+set -euo pipefail
+
+die() {
+ echo >&2 "$@"
+ exit 1
+}
+
+usage() {
+ die "Usage: $(basename "$0") {directory}"
+}
+
+gen_header() {
+ cat <<EOT
+From: Fangfrisch News <$MAILFROM>
+To: $MAILTO
+Subject: $SUBJECT
+
+EOT
+# Mail header must end with an empty line!
+}
+
+declare -a NEWSITEMS=()
+
+report_news() {
+ local dir=$1 ni
+ [ -d "$dir" ] || die "$dir is not a directory"
+ while IFS= read -r -d '' ni; do
+ if [ ${#NEWSITEMS[*]} -eq 0 ] && [ "$MAILAPP" != mutt ]; then
+ # Mutt does not need the header, others do.
+ gen_header
+ fi
+ NEWSITEMS+=( "$ni" )
+ echo -e "\n### $(basename "$ni"):\n"
+ cat "$ni"
+ done < <(find "$dir" -maxdepth 1 -type f -name "fangfrisch*.txt" -print0)
+}
+
+main() {
+ local t
+ [ -n "$MAILAPP" ] || die "MAILAPP is undefined, exiting."
+ if tty -s; then
+ # Running in a terminal session
+ t=$(mktemp)
+ # shellcheck disable=SC2064
+ trap "rm $t" EXIT
+ report_news "$@" | tee "$t" || exit 1
+ [ ! -s "$t" ] || "$MAILAPP" "${MAILAPP_OPT[@]}" >/dev/null <"$t"
+ else
+ report_news "$@" 2>&1 | "$MAILAPP" "${MAILAPP_OPT[@]}" >/dev/null
+ [ ${#NEWSITEMS[*]} -eq 0 ] || rm -v "${NEWSITEMS[@]}"
+ fi
+}
+
+[ $# -ge 1 ] || usage
+main "$@"
diff --git a/app-antivirus/fangfrisch/files/fangfrisch.conf b/app-antivirus/fangfrisch/files/fangfrisch.conf
index ded86b9cc981..0fbc71ec16dc 100644
--- a/app-antivirus/fangfrisch/files/fangfrisch.conf
+++ b/app-antivirus/fangfrisch/files/fangfrisch.conf
@@ -7,6 +7,13 @@ log_method = syslog
log_target = /dev/log
on_update_exec = clamdscan --reload
+[fangfrischnews]
+enabled = yes
+# Uncomment/adapt the following to trigger a script in case of news.
+# The bundled example script needs to be manually modified before
+# it can be used!
+# script = /etc/fangfrisch-has-news.sh
+
[malwarepatrol]
enabled = yes
# Replace with your personal Malwarepatrol receipt