From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B8FAB138350 for ; Sat, 18 Jan 2020 04:11:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F357E0839; Sat, 18 Jan 2020 04:11:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5E282E0839 for ; Sat, 18 Jan 2020 04:11:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AF3F634E1FA for ; Sat, 18 Jan 2020 04:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A8332D7 for ; Sat, 18 Jan 2020 04:11:12 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1579320322.a5c5aa4366ccfb41880c22450b50fc131fc5cde5.mjo@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav-unofficial-sigs/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r2.ebuild app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r3.ebuild X-VCS-Directories: app-antivirus/clamav-unofficial-sigs/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: a5c5aa4366ccfb41880c22450b50fc131fc5cde5 X-VCS-Branch: master Date: Sat, 18 Jan 2020 04:11:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b6e382aa-23b8-4461-9e26-6012c5c42ea6 X-Archives-Hash: ecd951ebe3f090ead0ad65aebdc00138 commit: a5c5aa4366ccfb41880c22450b50fc131fc5cde5 Author: Michael Orlitzky gentoo org> AuthorDate: Fri Jan 17 18:50:27 2020 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Sat Jan 18 04:05:22 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5c5aa43 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 gentoo.org> ...uild => clamav-unofficial-sigs-6.0.1-r3.ebuild} | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) 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-r3.ebuild similarity index 75% rename from app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r2.ebuild rename to app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-6.0.1-r3.ebuild index 694d3dc7418..88d2fd74ec5 100644 --- 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-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit user systemd +inherit systemd DESCRIPTION="Download and install third-party clamav signatures" HOMEPAGE="https://github.com/extremeshok/clamav-unofficial-sigs" @@ -14,6 +14,12 @@ 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. @@ -26,12 +32,6 @@ RDEPEND="${DEPEND} 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" @@ -57,15 +57,12 @@ src_install() { # 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}" + # 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() {