app-antivirus/fangfrisch: New package
authorRalph Seichter <github@seichter.de>
Sat, 22 Feb 2020 13:19:52 +0000 (14:19 +0100)
committerAndreas K. Huettel <dilfridge@gentoo.org>
Sat, 7 Mar 2020 21:47:40 +0000 (22:47 +0100)
Update and verify unofficial Clam Anti-Virus signatures.
Designed as a secure and easy-to-configure replacement for
clamav-unofficial-sigs.

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Ralph Seichter <gentoo@seichter.de>
Closes: https://github.com/gentoo/gentoo/pull/14740
Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>
app-antivirus/fangfrisch/Manifest [new file with mode: 0644]
app-antivirus/fangfrisch/fangfrisch-1.0.1.ebuild [new file with mode: 0644]
app-antivirus/fangfrisch/files/fangfrisch.conf [new file with mode: 0644]
app-antivirus/fangfrisch/files/fangfrisch.cron [new file with mode: 0644]
app-antivirus/fangfrisch/metadata.xml [new file with mode: 0644]

diff --git a/app-antivirus/fangfrisch/Manifest b/app-antivirus/fangfrisch/Manifest
new file mode 100644 (file)
index 0000000..1986a4e
--- /dev/null
@@ -0,0 +1 @@
+DIST fangfrisch-1.0.1.tar.gz 93770 BLAKE2B 00334a8ede062a6cb62305b3881eb520ab13a1acb77e1adf9f5c3158b73760f2867e9326d1985b8eeba89232c7af5a7841f42e27a389d2eb7c4226d964b5a416 SHA512 c1ec85f58a24ccbce701cd7695a94ed0fadadae8cd384590fa801003b6f77417f95e9656a51c59f09ca30589f855c2a5a03f8445e689c3ba8b39a044b0c38d98
diff --git a/app-antivirus/fangfrisch/fangfrisch-1.0.1.ebuild b/app-antivirus/fangfrisch/fangfrisch-1.0.1.ebuild
new file mode 100644 (file)
index 0000000..3348a1f
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit distutils-r1 readme.gentoo-r1
+
+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"
+DOC_CONTENTS="
+Before enabling /etc/cron.d/${PN} you need to configure Fangfrisch and
+manually run the 'initdb' command once.
+
+See https://rseichter.github.io/fangfrisch/ for more information.
+"
+
+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}"
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+       sed -i -e '/SQLAlchemy/d' setup.py || die
+       distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+       insinto /etc
+       doins "${FILESDIR}/${PN}.conf"
+       insinto /etc/cron.d
+       newins "${FILESDIR}/${PN}.cron" ${PN}
+       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.conf b/app-antivirus/fangfrisch/files/fangfrisch.conf
new file mode 100644 (file)
index 0000000..d1641f5
--- /dev/null
@@ -0,0 +1,22 @@
+# See https://rseichter.github.io/fangfrisch/ for detailed documentation
+
+[DEFAULT]
+db_url = sqlite:////var/lib/fangfrisch/db.sqlite
+local_directory = /var/lib/clamav
+on_update_exec = clamdscan --reload
+
+[malwarepatrol]
+enabled = yes
+# Replace with your personal Malwarepatrol receipt
+receipt = abcd1234
+
+[sanesecurity]
+enabled = yes
+
+[securiteinfo]
+enabled = yes
+# Replace with your personal SecuriteInfo customer ID
+customer_id = abcdef123456
+
+[urlhaus]
+enabled = yes
diff --git a/app-antivirus/fangfrisch/files/fangfrisch.cron b/app-antivirus/fangfrisch/files/fangfrisch.cron
new file mode 100644 (file)
index 0000000..55595c8
--- /dev/null
@@ -0,0 +1,4 @@
+# HOME=/var/lib/fangfrisch
+# LOG_LEVEL=WARNING
+# minute hour day-of-month month day-of-week user command
+# */10 * * * * clamav fangfrisch -c /etc/fangfrisch.conf refresh
diff --git a/app-antivirus/fangfrisch/metadata.xml b/app-antivirus/fangfrisch/metadata.xml
new file mode 100644 (file)
index 0000000..86c7e98
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>gentoo@seichter.de</email>
+               <name>Ralph Seichter</name>
+       </maintainer>
+       <maintainer type="person">
+               <email>dilfridge@gentoo.org</email>
+               <name>Andreas K. Huettel</name>
+       </maintainer>
+       <longdescription lang="en">
+               Fangfrisch (German for "freshly caught") is a sibling of the
+               Clam Anti-Virus freshclam utility. It allows downloading virus
+               definition files that are not official ClamAV canon, e.g. from
+               Sanesecurity, URLhaus and others. Fangfrisch was designed with
+               security in mind, to be run by an unprivileged user only.
+       </longdescription>
+       <upstream>
+               <remote-id type="github">rseichter/fangfrisch</remote-id>
+               <remote-id type="pypi">fangfrisch</remote-id>
+       </upstream>
+</pkgmetadata>