app-antivirus/clamav-unofficial-sigs: new version 5.6.2.
authorMichael Orlitzky <mjo@gentoo.org>
Fri, 17 Aug 2018 21:17:05 +0000 (17:17 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Fri, 17 Aug 2018 21:28:32 +0000 (17:28 -0400)
Closes: https://bugs.gentoo.org/663552
Package-Manager: Portage-2.3.40, Repoman-2.3.9

app-antivirus/clamav-unofficial-sigs/Manifest
app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.2.ebuild [moved from app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.1.ebuild with 69% similarity]

index 7577334bb1167e10c666fbff1eb62aa41b4bea2a..7b61422eb31326245d02aca7ebd09d614ba99e90 100644 (file)
@@ -1,2 +1,2 @@
 DIST clamav-unofficial-sigs-3.7.2.tar.gz 38549 BLAKE2B 2f00e9adf5f54e2b38c602da56a2daeb70618123ab4e59a74804885252f3cad2c23f7b9b10f4ec664c6977bca849947b83d0fc69f76669dbae58ebff54c6755b SHA512 ee07bf521cca229bc85acb887c8e520149955732797a9d220e24f09cb9e89f9bd189ad77dc781c03c60bdaaec2bfa91a6c96cf7a0b689759cddf3ff231b8b0a4
-DIST clamav-unofficial-sigs-5.6.1.tar.gz 51024 BLAKE2B 6c1da70c0ef93738533e69902ea8dc418ed76004361bf10199a7a661bd54cbcbcd3cfd4b32d5f592155ff354e4f8330fd2a92ab06b6b7c05211224bc1892d86a SHA512 a3660abe301e96104393d337ff2b7f73324241bb921d71626e4a6ea4cec39709ce76dbb9432fd048c66441f0acbb1b92fa561397669ffdca98f463d7da8e7402
+DIST clamav-unofficial-sigs-5.6.2.tar.gz 50931 BLAKE2B 6fea42f8f76ae5344c2b96c9203d2b09e755573d03f2b9d3d9ee2a488150fbb6f598e052b730daf12c551920a71fd8daad1dc10002fca12fa4a74554cf7d445e SHA512 79978db065a22d778490d0a2673f5a0bb7ab73e42de64563e7d26ac23459f7e5b2e73b0548e1ea6483e3c5f43eed65cdbc6814037cc0c46a339366a0150e5427
similarity index 69%
rename from app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.1.ebuild
rename to app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.2.ebuild
index eb77bf7756beccf01c2463fed7969f886152f3f9..f87f76fff1a625b6ca25f7710324d8f3dc805fb9 100644 (file)
@@ -1,7 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
+
+inherit user
 
 DESCRIPTION="Download and install third-party clamav signatures"
 HOMEPAGE="https://github.com/extremeshok/${PN}"
@@ -12,9 +14,6 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-# We need its user/group.
-DEPEND="app-antivirus/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.
@@ -28,9 +27,10 @@ src_install() {
        dosbin "${PN}.sh"
 
        # The script's working directory (set in the conf file). By default,
-       # it runs as clamav/clamav.
-       diropts -m 0755 -o clamav -g clamav
-       dodir "/var/lib/${PN}"
+       # 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"
@@ -43,6 +43,15 @@ src_install() {
        dodoc README.md
 }
 
+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."
@@ -53,8 +62,4 @@ pkg_postinst() {
        elog ''
        elog '  http://sanesecurity.com/usage/signatures/'
        elog ''
-       ewarn 'The configuration file has moved in the 5.x version!'
-       ewarn "You should migrate your config from /etc/${PN}.conf to"
-       ewarn "/etc/${PN}/master.conf"
-       ewarn ''
 }