From 649e20fe8f1ed9e6b387d97e72727349615fa8c6 Mon Sep 17 00:00:00 2001 From: Wolfram Schlich Date: Mon, 1 Feb 2016 07:36:18 +0100 Subject: app-antivirus/skyldav: make skyldav service being started before skyldavnotify in X sessions (multi-user.target) Package-Manager: portage-2.2.27 --- app-antivirus/skyldav/files/skyldav.service | 14 ---- app-antivirus/skyldav/files/skyldav.service-r1 | 15 ++++ app-antivirus/skyldav/skyldav-0.5-r1.ebuild | 109 +++++++++++++++++++++++++ app-antivirus/skyldav/skyldav-0.5.ebuild | 109 ------------------------- 4 files changed, 124 insertions(+), 123 deletions(-) delete mode 100644 app-antivirus/skyldav/files/skyldav.service create mode 100644 app-antivirus/skyldav/files/skyldav.service-r1 create mode 100644 app-antivirus/skyldav/skyldav-0.5-r1.ebuild delete mode 100644 app-antivirus/skyldav/skyldav-0.5.ebuild diff --git a/app-antivirus/skyldav/files/skyldav.service b/app-antivirus/skyldav/files/skyldav.service deleted file mode 100644 index 8d8ee5e..0000000 --- a/app-antivirus/skyldav/files/skyldav.service +++ /dev/null @@ -1,14 +0,0 @@ -[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 - -[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-r1 b/app-antivirus/skyldav/files/skyldav.service-r1 new file mode 100644 index 0000000..decd788 --- /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/skyldav-0.5-r1.ebuild b/app-antivirus/skyldav/skyldav-0.5-r1.ebuild new file mode 100644 index 0000000..3175fc8 --- /dev/null +++ b/app-antivirus/skyldav/skyldav-0.5-r1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="http://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}/${P}-syslog.patch" + "${FILESDIR}/${P}-examples.patch" + "${FILESDIR}/${P}-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='SkyldAV 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 SkyldAV service:'$'\n' + DOC_CONTENTS+='# systemctl enable skyldav.service'$'\n' + else + DOC_CONTENTS='SkyldAV 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 SkyldAV 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 +} diff --git a/app-antivirus/skyldav/skyldav-0.5.ebuild b/app-antivirus/skyldav/skyldav-0.5.ebuild deleted file mode 100644 index ddefa93..0000000 --- a/app-antivirus/skyldav/skyldav-0.5.ebuild +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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="http://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}/${P}-syslog.patch" - "${FILESDIR}/${P}-examples.patch" - "${FILESDIR}/${P}-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='SkyldAV 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 SkyldAV service:'$'\n' - DOC_CONTENTS+='# systemctl enable skyldav.service'$'\n' - else - DOC_CONTENTS='SkyldAV 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 SkyldAV 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_dounit "${FILESDIR}/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 -} -- cgit v1.2.3-65-gdbad