summaryrefslogtreecommitdiff
path: root/app-antivirus/skyldav
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-antivirus/skyldav
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-antivirus/skyldav')
-rw-r--r--app-antivirus/skyldav/Manifest10
-rw-r--r--app-antivirus/skyldav/files/skyldav-conf.patch21
-rw-r--r--app-antivirus/skyldav/files/skyldav-examples.patch11
-rw-r--r--app-antivirus/skyldav/files/skyldav.confd10
-rwxr-xr-xapp-antivirus/skyldav/files/skyldav.initd25
-rw-r--r--app-antivirus/skyldav/files/skyldav.service-r115
-rw-r--r--app-antivirus/skyldav/files/skyldav.service.conf3
-rw-r--r--app-antivirus/skyldav/files/skyldav.tmpfilesd2
-rw-r--r--app-antivirus/skyldav/metadata.xml9
-rw-r--r--app-antivirus/skyldav/skyldav-0.7.ebuild107
10 files changed, 213 insertions, 0 deletions
diff --git a/app-antivirus/skyldav/Manifest b/app-antivirus/skyldav/Manifest
new file mode 100644
index 000000000000..82aca6bccbff
--- /dev/null
+++ b/app-antivirus/skyldav/Manifest
@@ -0,0 +1,10 @@
+AUX skyldav-conf.patch 1090 BLAKE2B e2ac14033975155b746cff793d3c819335dade60845840e1144e5f7e20c0eb6b01b63b3beff64787c15d211dc01b17de35b1aa8e4bccc1bb43121e5482792bf4 SHA512 5e628905f5e638889da761a5ce4e9e1c1a5e4c52a40ee2da0ceceb4706140e9836d37bcf8d5bc78da0fd74be4dc40032300a0d9584ecb431fe71583091ba3c4e
+AUX skyldav-examples.patch 349 BLAKE2B e83f1f34070b0a51302500558e5a3bcc2c1b95a15d6bbcab0fef10822a30487c9c92471dc987b24f05b46a5df57abbc1d183416870fa9f2d32aa525752148520 SHA512 b31e227825f5ea695ff8b957e95611d63f7157959fc610edb23c90b6bec69739f6e11288fcc9f19043492cf749c8aa5f8bafe875638e996e58731b354bcc6618
+AUX skyldav.confd 301 BLAKE2B 5e7f0491068c1372d3282b7059856df0cce2b1f4c4da0520c1087fc7fb31abb5a7a128095d0d79b89ca63f26fb0225252cb680ec99f4691d13480432b99aaf56 SHA512 1b1e1d803761c0ca94937bde03d31831bdd82bac36e374db4fba089fbd44dbe4fef8a9d9aecdd503f12aeb6aba641d48cdc8e27b74d82a8061ba34b915194c0c
+AUX skyldav.initd 743 BLAKE2B de1a4a1e917ea2c7615e83ace90bc2dea3de35c7e9d84c0cf2597195a8905330f125f2fd34e2a51a629c3246de793d9347e0d599f8043bf691bda72022ed91f3 SHA512 485ef14b7636fc9514388d66525d03dae460cdb20814335684ef47a6217d035d235a900d219b54e5ea6867ed4339797bdc1f03ba02b8547429445ea28918a6ad
+AUX skyldav.service-r1 392 BLAKE2B 1974b11c727682257616cc969bb7b083a5132a9ca29566cb3d3621b3bf66895614e20ebeca2a2b7cfddb270863a7bee639690f1c1afb2185da35c22265e5fb34 SHA512 40da1fc4925076396a4fe75449bae3231d75cfaa4dc8cd5f1b2d7518804a78d37d7d4e87c371d58191b2cc20273b86dc93a79c24b867ab6ef493a2ebb5d9b5a7
+AUX skyldav.service.conf 78 BLAKE2B 6d5186d46317621673679120006d1a050778b32cdb434646caeb9e4574cb491068b16ea87cae0b4cf668c391f7c27af7cdde922fa4ba199e1dadc9c857978739 SHA512 04089de87d2c842cd9f9103cd81ea999b55239c616a731107fd7d8f40fffdc7bd6bcb168cb322a00bece72e3422ed423782f0377bb63e89731b776df145e63cc
+AUX skyldav.tmpfilesd 108 BLAKE2B f8bb5ff422d6e6df52ea74a3613704dccf89950c2af8ddc9f09784e31f622fa48015493442f71c3f3759d32d70ba6a093b9fd6ece312299c2e794d9ac7cbf183 SHA512 a30f18083dbdd613d735fc632b43a45bdb61a63a91fef4306afe379cf1dc398974caa72b11d0cff4e62765c5c8ea43212a9e366a95ca902d53f04248527d8e83
+DIST skyldav-0.7.tar.gz 244444 BLAKE2B 7c5e6448a1a3ab83904d01844e9054471666ca3c7f32bc89c3fb56caf02711ade4adf0d7ea73738f21e4c3db1936b8382d7c12d992ea6576dffc3537dbc8e774 SHA512 008988ca7ab24ea8b77377e7a639ddc0a26149eab41af1d429cf8f870320617feda01ec2c9403493a3bb0bd5cd0c8cad94701bcb6c28993f2d9739e1a1b36c0b
+EBUILD skyldav-0.7.ebuild 3188 BLAKE2B 09f8a580d183fe0f5731826bdc898dcf105625603749ff32a2086dad9b1f6b7e7c4631be1965dd0d52ebff6a6b0d3cfdd9a996026ca7f33081e1a6e624cf0eb9 SHA512 b9b829dc59fda88c932bcdd8d937ac679fd492e0a0cf405ae9ad1f3268651495a988223b60a9eeeac13cd66f2d3b80b98088a03d1c110fdab412c4d00d09ee76
+MISC metadata.xml 252 BLAKE2B ca9754e5d76596bdfa9cdbc03f9799c1e503d3d38eebebfcd675fc60a260419def2249c4fa3c6f9b48f649f8537112ffe029434a034f7999e59e76de027bf840 SHA512 7991a37df1b8c67753596c9dc6dcbc13903d9fcfe8dc50166eb2885fffa2b2f1acf42d2c7dea05b07ea6a0b9f2afa3deb4265c85b3bbce7b970538c013dd57d3
diff --git a/app-antivirus/skyldav/files/skyldav-conf.patch b/app-antivirus/skyldav/files/skyldav-conf.patch
new file mode 100644
index 000000000000..ed5b2058f6a6
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav-conf.patch
@@ -0,0 +1,21 @@
+diff -urN skyldav-0.7.orig/examples/etc/skyldav.conf skyldav-0.7/examples/etc/skyldav.conf
+--- skyldav-0.7.orig/examples/etc/skyldav.conf 2016-06-12 18:39:51.000000000 +0200
++++ skyldav-0.7/examples/etc/skyldav.conf 2017-02-21 15:12:06.875945224 +0100
+@@ -22,6 +22,9 @@
+
+ # Directories that shall not be scanned (including subdirectories)
+ # EXCLUDE_PATH = /var/noscan, /opt/noscan
++#
++# Exclude various portage directories for performance reasons
++EXCLUDE_PATH = /usr/portage, /var/cache/edb, /var/db/pkg, /var/tmp/portage, /var/tmp/binpkgs, /var/log/portage
+
+ # File systems that are local, virus scan results may be cached.
+ # LOCAL_FS = ext3, ext4, iso9660, tmpfs, vfat
+@@ -31,6 +34,7 @@
+ # File systems that shall not be marked for virus scan.
+ # Cifs uses a background daemon which causes problems when scanned.
+ # Exclusion of fuse file systems is hard coded.
++# Do not exclude devtmpfs and configfs, as userspace could write malware onto them!
+ # NOMARK_FS = proc, sysfs
+ NOMARK_FS = proc, sysfs, devpts, debugfs, securityfs, cgroup, rpc_pipefs
+ NOMARK_FS = mqueue, autofs, cifs
diff --git a/app-antivirus/skyldav/files/skyldav-examples.patch b/app-antivirus/skyldav/files/skyldav-examples.patch
new file mode 100644
index 000000000000..b62e78cc9698
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav-examples.patch
@@ -0,0 +1,11 @@
+diff -urN skyldav-0.7.orig/Makefile.am skyldav-0.7/Makefile.am
+--- skyldav-0.7.orig/Makefile.am 2016-06-12 18:39:51.000000000 +0200
++++ skyldav-0.7/Makefile.am 2017-02-21 15:11:35.709518793 +0100
+@@ -9,7 +9,6 @@
+ rm -rf doc/doxygen
+
+ install-data-local: \
+- install-skyldav-examples \
+ install-skyldav-conf \
+ install-skyldavnotify-desktop
+
diff --git a/app-antivirus/skyldav/files/skyldav.confd b/app-antivirus/skyldav/files/skyldav.confd
new file mode 100644
index 000000000000..87829b658ebe
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/skyldav
+
+# Options to pass to the skyldav daemon.
+# Option -d for daemonizing is always passed!
+# See the skyldav(1) man page for more info.
+
+#SKYLDAV_OPTS="-m 1"
diff --git a/app-antivirus/skyldav/files/skyldav.initd b/app-antivirus/skyldav/files/skyldav.initd
new file mode 100755
index 000000000000..539cd4f083cd
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SKYLDAV_BIN="/usr/sbin/skyldav"
+SKYLDAV_OPTS="${SKYLDAV_OPTS:--m 2}"
+SKYLDAV_CONFIGFILE="/etc/skyldav.conf"
+SKYLDAV_PIDFILE_DIR="${SKYLDAV_PIDFILE_DIR:-/var/run/${RC_SVCNAME}}"
+SKYLDAV_PIDFILE="${SKYLDAV_PIDFILE:-${SKYLDAV_PIDFILE_DIR}/${RC_SVCNAME}.pid}"
+
+name="${SKYLDAV_BIN##*/}"
+command="${SKYLDAV_BIN}"
+command_args="-d ${SKYLDAV_OPTS}"
+pidfile="${SKYLDAV_PIDFILE}"
+description="Skyld AV is an anti-virus on-access scanner based upon Clam AV and fanotify"
+required_files="${SKYLDAV_CONFIG}"
+
+depend() {
+ use logger
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o root:root "${SKYLDAV_PIDFILE_DIR}"
+}
diff --git a/app-antivirus/skyldav/files/skyldav.service-r1 b/app-antivirus/skyldav/files/skyldav.service-r1
new file mode 100644
index 000000000000..decd788a9f83
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.service-r1
@@ -0,0 +1,15 @@
+[Unit]
+Description=SkyldAV anti-virus on-access scanning daemon based upon Clam AV and fanotify
+Requires=local-fs.target clamd.service
+After=local-fs.target clamd.service
+Before=multi-user.target
+
+[Service]
+Type=simple
+Environment="SKYLDAV_MESSAGE_LEVEL=2"
+ExecStart=/usr/sbin/skyldav -d -m ${SKYLDAV_MESSAGE_LEVEL}
+#KillMode=process
+#KillSignal=SIGTERM
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/skyldav/files/skyldav.service.conf b/app-antivirus/skyldav/files/skyldav.service.conf
new file mode 100644
index 000000000000..79c23a3ff05d
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.service.conf
@@ -0,0 +1,3 @@
+[Service]
+# skyldav message level (-m)
+#Environment="SKYLDAV_MESSAGE_LEVEL=1"
diff --git a/app-antivirus/skyldav/files/skyldav.tmpfilesd b/app-antivirus/skyldav/files/skyldav.tmpfilesd
new file mode 100644
index 000000000000..a4f7cdc47423
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.tmpfilesd
@@ -0,0 +1,2 @@
+# skyldav runtime directory for skyldav.pid and log (used by skyldavnotify)
+d /run/skyldav 0755 root root -
diff --git a/app-antivirus/skyldav/metadata.xml b/app-antivirus/skyldav/metadata.xml
new file mode 100644
index 000000000000..260112f35a3d
--- /dev/null
+++ b/app-antivirus/skyldav/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">xypron/skyldav</remote-id>
+ </upstream>
+</pkgmetadata>
+
diff --git a/app-antivirus/skyldav/skyldav-0.7.ebuild b/app-antivirus/skyldav/skyldav-0.7.ebuild
new file mode 100644
index 000000000000..0a0ef09e08fb
--- /dev/null
+++ b/app-antivirus/skyldav/skyldav-0.7.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic linux-info linux-mod autotools-utils readme.gentoo-r1 systemd
+
+DESCRIPTION="Skyld AV: on-access scanning daemon for ClamAV using fanotify"
+HOMEPAGE="http://xypron.github.io/skyldav/"
+
+## github release tarball
+MY_PV=${PV/_rc/rc}
+MY_P="${PN}-${MY_PV}"
+SRC_URI="https://github.com/xypron/skyldav/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+## selfmade tarball
+#MY_PVR=${PVR/_rc/rc}
+#MY_P="${PN}-${MY_PVR}"
+#SRC_URI="https://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${MY_P}.tar.gz"
+
+## github commit tarball
+#MY_GIT_COMMIT="49bdb5e710b5a77c38ceb87da6015afb7009f1f9"
+#MY_P="xypron-${PN}-${MY_GIT_COMMIT:0:7}"
+#SRC_URI="https://github.com/xypron/${PN}/tarball/${MY_GIT_COMMIT} -> ${PF}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="Apache-2.0"
+IUSE="libnotify systemd"
+
+RDEPEND=">=app-antivirus/clamav-0.97.8
+ sys-apps/util-linux
+ sys-libs/libcap
+ libnotify? (
+ media-libs/libcanberra[gtk]
+ x11-libs/libnotify
+ x11-libs/gtk+:2
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/autoconf-archive"
+
+## autotools-utils.eclass settings
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+DOCS=( AUTHORS NEWS README )
+PATCHES=(
+ "${FILESDIR}/${PN}-examples.patch"
+ "${FILESDIR}/${PN}-conf.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ kernel_is ge 3 8 0 || die "Linux 3.8.0 or newer recommended"
+ CONFIG_CHECK="FANOTIFY FANOTIFY_ACCESS_PERMISSIONS"
+ check_extra_config
+
+ ## define contents for README.gentoo
+ if use systemd; then
+ DOC_CONTENTS='Skyld AV provides a systemd service.'$'\n'
+ DOC_CONTENTS+='Please edit the systemd service config file to match your needs:'$'\n'
+ DOC_CONTENTS+='/etc/systemd/system/skyldav.service.d/00gentoo.conf'$'\n'
+ DOC_CONTENTS+='# systemctl daemon-reload'$'\n'
+ DOC_CONTENTS+='# systemctl restart skyldav.service'$'\n'
+ DOC_CONTENTS+='Example for enabling the Skyld AV service:'$'\n'
+ DOC_CONTENTS+='# systemctl enable skyldav.service'$'\n'
+ else
+ DOC_CONTENTS='Skyld AV provides an init script for OpenRC.'$'\n'
+ DOC_CONTENTS+='Please edit the init script config file to match your needs:'$'\n'
+ DOC_CONTENTS+='/etc/conf.d/skyldav'$'\n'
+ DOC_CONTENTS+='Example for enabling the Skyld AV init script:'$'\n'
+ DOC_CONTENTS+='# rc-update add skyldav default'$'\n'
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with libnotify notification)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ ## install systemd service or OpenRC init scripts
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/skyldav.service-r1" skyldav.service
+ systemd_install_serviced "${FILESDIR}"/skyldav.service.conf
+ systemd_newtmpfilesd "${FILESDIR}"/skyldav.tmpfilesd skyldav.conf
+ else
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ fi
+
+ ## create README.gentoo from ${DOC_CONTENTS}
+ DISABLE_AUTOFORMATTING=1 readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ ## workaround for /usr/lib/tmpfiles.d/skyldav.conf
+ ## not getting processed until the next reboot
+ if use systemd; then
+ install -d -m 0755 -o root -g root /run/skyldav
+ fi
+}