From a5c5aa4366ccfb41880c22450b50fc131fc5cde5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 17 Jan 2020 13:50:27 -0500 Subject: app-antivirus/clamav-unofficial-sigs: new revision with GLEP81 accounts. Closes: https://bugs.gentoo.org/701222 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Michael Orlitzky --- .../clamav-unofficial-sigs-6.0.1-r2.ebuild | 81 ---------------------- .../clamav-unofficial-sigs-6.0.1-r3.ebuild | 78 +++++++++++++++++++++ 2 files changed, 78 insertions(+), 81 deletions(-) delete mode 100644 app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r2.ebuild create mode 100644 app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r3.ebuild (limited to 'app-antivirus/clamav-unofficial-sigs') diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r2.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r2.ebuild deleted file mode 100644 index 694d3dc7418e..000000000000 --- a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r2.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit user systemd - -DESCRIPTION="Download and install third-party clamav signatures" -HOMEPAGE="https://github.com/extremeshok/clamav-unofficial-sigs" -SRC_URI="https://github.com/extremeshok/clamav-unofficial-sigs/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="cron" - -# The script relies on either net-misc/socat, or Perl's -# IO::Socket::UNIX. We already depend on Perl, and Gentoo's Perl ships -# with IO::Socket::UNIX, so we can leave out net-misc/socat here. -RDEPEND="${DEPEND} - app-crypt/gnupg - dev-lang/perl - net-dns/bind-tools - || ( net-misc/wget net-misc/curl )" - -src_install() { - dosbin "${PN}.sh" - - # The script's working directory (set in the conf file). By default, - # it runs as clamav/clamav. We set the owner/group later, in - # pkg_preinst, after the user/group is sure to exist (because we - # create them otherwise). - keepdir "/var/lib/${PN}" - - insinto /etc/logrotate.d - doins "${FILESDIR}/${PN}.logrotate" - - insinto "/etc/${PN}" - doins config/{master,user}.conf - newins config/os.gentoo.conf os.conf - - doman "${FILESDIR}/${PN}.8" - dodoc README.md - - if use cron; then - # Beware, this directory is not completely standard. However, - # we need this to run as "clamav" with a non-default shell and - # home directory (bug 694054), and this seems like the most - # reliable way to accomplish that. - insinto "/etc/cron.d" - newins "${FILESDIR}/${PN}.crond" "${PN}" - else - dodoc "${FILESDIR}/${PN}.crond" - fi - - # Install the systemd service and timer unconditionally, because - # the timer is disabled by default (and won't annoy people until - # after they've configured the script). - systemd_dounit "${FILESDIR}/${PN}".{service,timer} -} - -pkg_preinst() { - # Should agree with app-antivirus/clamav. We don't actually need - # clamav to function, so it isn't one of our dependencies, and - # that's why we might need to create its user ourselves. - enewgroup clamav - enewuser clamav -1 -1 /dev/null clamav - fowners clamav:clamav "/var/lib/${PN}" -} - -pkg_postinst() { - elog '' - elog "You will need to select databases in /etc/${PN}/master.conf." - elog "For details, please see the ${PN}(8) manual page." - elog '' - elog 'An up-to-date description of the available Sanesecurity' - elog 'databases is available at,' - elog '' - elog ' http://sanesecurity.com/usage/signatures/' - elog '' -} diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r3.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r3.ebuild new file mode 100644 index 000000000000..88d2fd74ec5d --- /dev/null +++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd + +DESCRIPTION="Download and install third-party clamav signatures" +HOMEPAGE="https://github.com/extremeshok/clamav-unofficial-sigs" +SRC_URI="https://github.com/extremeshok/clamav-unofficial-sigs/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cron" + +# Require acct-{user,group}/clamav at build time so that we can set +# the permissions on /var/lib/${PN} in src_install rather than in +# pkg_postinst; calling "chown" on the live filesystem scares me. +DEPEND="acct-group/clamav + acct-user/clamav" + +# The script relies on either net-misc/socat, or Perl's +# IO::Socket::UNIX. We already depend on Perl, and Gentoo's Perl ships +# with IO::Socket::UNIX, so we can leave out net-misc/socat here. +RDEPEND="${DEPEND} + app-crypt/gnupg + dev-lang/perl + net-dns/bind-tools + || ( net-misc/wget net-misc/curl )" + +src_install() { + dosbin "${PN}.sh" + + insinto /etc/logrotate.d + doins "${FILESDIR}/${PN}.logrotate" + + insinto "/etc/${PN}" + doins config/{master,user}.conf + newins config/os.gentoo.conf os.conf + + doman "${FILESDIR}/${PN}.8" + dodoc README.md + + if use cron; then + # Beware, this directory is not completely standard. However, + # we need this to run as "clamav" with a non-default shell and + # home directory (bug 694054), and this seems like the most + # reliable way to accomplish that. + insinto "/etc/cron.d" + newins "${FILESDIR}/${PN}.crond" "${PN}" + else + dodoc "${FILESDIR}/${PN}.crond" + fi + + # Install the systemd service and timer unconditionally, because + # the timer is disabled by default (and won't annoy people until + # after they've configured the script). + systemd_dounit "${FILESDIR}/${PN}".{service,timer} + + # The script's working directory, as set in the configuration + # file. By default, the script runs as clamav:clamav because + # it needs write access to the clamav databases. + diropts -o clamav -g clamav + keepdir "/var/lib/${PN}" +} + +pkg_postinst() { + elog '' + elog "You will need to select databases in /etc/${PN}/master.conf." + elog "For details, please see the ${PN}(8) manual page." + elog '' + elog 'An up-to-date description of the available Sanesecurity' + elog 'databases is available at,' + elog '' + elog ' http://sanesecurity.com/usage/signatures/' + elog '' +} -- cgit v1.2.3-65-gdbad