aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmish2020-02-22 22:17:54 +0530
committerAmish2020-02-22 22:17:54 +0530
commit44feae5e4a6e0b2e0053d056b284fa21cd64e7b5 (patch)
tree6aa8fb17dbb04025e68e75a8078577e1d1446bb2
downloadaur-44feae5e4a6e0b2e0053d056b284fa21cd64e7b5.tar.gz
Initial release 1.0.0
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD45
-rw-r--r--fangfrisch.conf10
-rw-r--r--fangfrisch.install6
-rw-r--r--fangfrisch.service12
-rw-r--r--fangfrisch.timer12
-rw-r--r--fangfrisch.tmpfiles1
8 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a9582f53016d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = python-fangfrisch
+ pkgdesc = Freshclam like utility that allows downloading unofficial virus definition files
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://rseichter.github.io/fangfrisch/
+ install = fangfrisch.install
+ arch = any
+ license = GPL
+ makedepends = python-setuptools
+ depends = clamav
+ depends = python
+ depends = python-sqlalchemy
+ provides = clamav-unofficial-sigs
+ conflicts = clamav-unofficial-sigs
+ replaces = clamav-unofficial-sigs
+ backup = etc/fangfrisch/fangfrisch.conf
+ source = https://files.pythonhosted.org/packages/source/f/fangfrisch/fangfrisch-1.0.0.tar.gz
+ source = fangfrisch.conf
+ source = fangfrisch.service
+ source = fangfrisch.timer
+ source = fangfrisch.tmpfiles
+ sha512sums = 0e5ef64ea2a5a01874d54be09378c377b33c340760b4800a390cbc08ef071a60c8c619c01c1f00248d2435a986a6d33b14da9998368a38416f875d7cdd1b1620
+ sha512sums = df3148c4fd26f2e4f85c4e60acce8d8fdfb7408dc0c33c80ef26d0c9f481e00043f44f3f8a5d4b2db3342e47eddf8d1a1bf1f136b52e8782d0384e8afe5bfccd
+ sha512sums = 810fd48296fdac2b141ac8a9da02a9c133f3ae0b62177c62e72b03aab0c86b2c062f53ab070d4c5e8cbb7a6bfa6f9879225c46f604d9a0914deb0f0798a86f03
+ sha512sums = 5f17b94c2a86ed468ac12f84bd258b915cfaa1858cada3e59293489447c634c6401921d654000d87f8eca970bfba8a9506aced100902771d98efc7d4cdb27cb5
+ sha512sums = f421c4f2618422957cd203bf8f50bae1e5656d6208774244092987c07427ca86bf587884510c9180a0cb554200fdc996b0fad382671c913e6729b215b6f8e651
+
+pkgname = python-fangfrisch
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..51c511b8e99e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src
+pkg
+*x86_64.pkg.tar.xz
+*any.pkg.tar.xz
+fangfrisch-*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a29a37b3c30c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Amish <contact at via dot aur>
+pkgname=python-fangfrisch
+_name=${pkgname#python-}
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Freshclam like utility that allows downloading unofficial virus definition files"
+arch=('any')
+license=('GPL')
+url="https://rseichter.github.io/fangfrisch/"
+conflicts=('clamav-unofficial-sigs')
+provides=('clamav-unofficial-sigs')
+replaces=('clamav-unofficial-sigs')
+depends=('clamav' 'python' 'python-sqlalchemy')
+makedepends=('python-setuptools')
+#checkdepends=('python-pytest-runner')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
+ "${_name}.conf"
+ "${_name}.service"
+ "${_name}.timer"
+ "${_name}.tmpfiles")
+sha512sums=('0e5ef64ea2a5a01874d54be09378c377b33c340760b4800a390cbc08ef071a60c8c619c01c1f00248d2435a986a6d33b14da9998368a38416f875d7cdd1b1620'
+ 'df3148c4fd26f2e4f85c4e60acce8d8fdfb7408dc0c33c80ef26d0c9f481e00043f44f3f8a5d4b2db3342e47eddf8d1a1bf1f136b52e8782d0384e8afe5bfccd'
+ '810fd48296fdac2b141ac8a9da02a9c133f3ae0b62177c62e72b03aab0c86b2c062f53ab070d4c5e8cbb7a6bfa6f9879225c46f604d9a0914deb0f0798a86f03'
+ '5f17b94c2a86ed468ac12f84bd258b915cfaa1858cada3e59293489447c634c6401921d654000d87f8eca970bfba8a9506aced100902771d98efc7d4cdb27cb5'
+ 'f421c4f2618422957cd203bf8f50bae1e5656d6208774244092987c07427ca86bf587884510c9180a0cb554200fdc996b0fad382671c913e6729b215b6f8e651')
+backup=('etc/fangfrisch/fangfrisch.conf')
+install=fangfrisch.install
+
+build() {
+ cd $_name-$pkgver
+ python setup.py build
+}
+
+#check() {
+# cd $_name-$pkgver
+# python setup.py pytest
+#}
+
+package() {
+ cd $_name-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm644 -t "${pkgdir}/etc/fangfrisch" "${srcdir}/${_name}.conf"
+ install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" "${srcdir}/${_name}".{service,timer}
+ install -Dm644 "${srcdir}/${_name}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${_name}.conf"
+}
diff --git a/fangfrisch.conf b/fangfrisch.conf
new file mode 100644
index 000000000000..0ceaad80bf4d
--- /dev/null
+++ b/fangfrisch.conf
@@ -0,0 +1,10 @@
+[DEFAULT]
+db_url = sqlite:////var/lib/fangfrisch/db.sqlite
+local_directory = /var/lib/clamav
+on_update_exec = clamdscan --reload
+
+[sanesecurity]
+enabled = yes
+
+[urlhaus]
+enabled = yes
diff --git a/fangfrisch.install b/fangfrisch.install
new file mode 100644
index 000000000000..8ff297b71de4
--- /dev/null
+++ b/fangfrisch.install
@@ -0,0 +1,6 @@
+post_install() {
+ echo 'NOTE: Create database structure by running:'
+ echo ' sudo -u clamav /usr/bin/fangfrisch --conf /etc/fangfrisch/fangfrisch.conf initdb'
+ echo
+ echo 'NOTE: Enable fangfrisch.timer for regular automatic updates.'
+}
diff --git a/fangfrisch.service b/fangfrisch.service
new file mode 100644
index 000000000000..5fa7361dcd13
--- /dev/null
+++ b/fangfrisch.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Download unofficial clamav virus definition files
+ConditionPathExists=/var/lib/fangfrisch/db.sqlite
+
+[Service]
+Type=simple
+User=clamav
+WorkingDirectory=/var/lib/fangfrisch
+ExecStart=/usr/bin/fangfrisch --conf /etc/fangfrisch/fangfrisch.conf refresh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/fangfrisch.timer b/fangfrisch.timer
new file mode 100644
index 000000000000..a6e0e3e12198
--- /dev/null
+++ b/fangfrisch.timer
@@ -0,0 +1,12 @@
+[Unit]
+Description=Download unofficial clamav virus definition files
+Requires=fangfrisch.service
+
+[Timer]
+OnCalendar=hourly
+Unit=fangfrisch.service
+RandomizedDelaySec=10m
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/fangfrisch.tmpfiles b/fangfrisch.tmpfiles
new file mode 100644
index 000000000000..60b481d464fd
--- /dev/null
+++ b/fangfrisch.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/fangfrisch 0700 clamav clamav -