diff options
author | Andrej Kacian <ticho@gentoo.org> | 2008-02-29 23:46:46 +0000 |
---|---|---|
committer | Andrej Kacian <ticho@gentoo.org> | 2008-02-29 23:46:46 +0000 |
commit | 46dd5d7d8b97d362f6d70c4bfa84563111d8374e (patch) | |
tree | 82477a32578715b01b3b9715609aebcfe4c1fab5 /app-antivirus | |
parent | Version bump (diff) | |
download | historical-46dd5d7d8b97d362f6d70c4bfa84563111d8374e.tar.gz historical-46dd5d7d8b97d362f6d70c4bfa84563111d8374e.tar.bz2 historical-46dd5d7d8b97d362f6d70c4bfa84563111d8374e.zip |
Add support for setting process niceness in conf.d file. Suggestion by Jens Weibler <gentoo-bugzilla at jensthebrain de>, bug #211397.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'app-antivirus')
-rw-r--r-- | app-antivirus/clamav/ChangeLog | 9 | ||||
-rw-r--r-- | app-antivirus/clamav/Manifest | 13 | ||||
-rw-r--r-- | app-antivirus/clamav/clamav-0.92.1-r1.ebuild | 141 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamd.conf | 2 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamd.rc | 6 |
5 files changed, 162 insertions, 9 deletions
diff --git a/app-antivirus/clamav/ChangeLog b/app-antivirus/clamav/ChangeLog index a9a2ebeb0e83..9f0b29c89832 100644 --- a/app-antivirus/clamav/ChangeLog +++ b/app-antivirus/clamav/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-antivirus/clamav # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.281 2008/02/23 22:37:23 ticho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.282 2008/02/29 23:46:46 ticho Exp $ + +*clamav-0.92.1-r1 (29 Feb 2008) + + 29 Feb 2008; Andrej Kacian <ticho@gentoo.org> files/clamd.conf, + files/clamd.rc, +clamav-0.92.1-r1.ebuild: + Add support for setting process niceness in conf.d file. Suggestion by Jens + Weibler <gentoo-bugzilla at jensthebrain de>, bug #211397. 23 Feb 2008; Andrej Kacian <ticho@gentoo.org> clamav-0.92.1.ebuild: Enable AllowSupplementaryGroups option by default for better integration diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index 0cd1618a56e5..0f672e53528e 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -8,21 +8,22 @@ AUX clamav-0.91.2-CVE-2007-6336.patch 1002 RMD160 dd72433cba5bea2b163a09d82fc5c4 AUX clamav-0.91.2-CVE-2007-6337.patch 891 RMD160 491e27ad67741a04891e522ec2f4f7ba25f91381 SHA1 e02199c35043a1811a077e7fb6a7044dd820d12b SHA256 d6552c8990fc82fd8072b0e331ec7c1bf4ef7f3899d2edf7a2b9991bd6f2337a AUX clamav-milter.README.gentoo 1124 RMD160 4fb1e2d9b444874838bcea1071969ca6862fb15b SHA1 0b9b86a0e7732eaaf7f880859265754f7a4efd3a SHA256 5e7b142b68964bc3463b077e5698fa77cace45ea9612258b1e1849cee944dd11 AUX clamav.logrotate 355 RMD160 f59cd8ce96da8210aa858ee59ee3b6940e3253a6 SHA1 5fbd9364997400681d5a93cb50cac8a0f188e56f SHA256 ab91f784d5098d2162be9277e3a006bdb392d9d89975838ad4ac7dfd8b418170 -AUX clamd.conf 193 RMD160 abebb5e1607e6819859b51e1a41b583c8266c6df SHA1 5b27737aecf3bd90277988fc60526ede7d4be636 SHA256 cd867dc66af694282584fa2cfd40a662ac2a7c25d6f2288b9afdc657a07226e3 -AUX clamd.rc 3565 RMD160 704da4f51a69f01524ca68ebe379736c9b0597ce SHA1 d087a49aa492e46e059ddde8b70dc7df8e19d020 SHA256 50ca2c25f796bb3554b5aa08f9e1bbe043ced62f58f2295f6cf33403d7c23dd8 +AUX clamd.conf 234 RMD160 b517b05e587637cbdd443f7ca3625d582e32722f SHA1 564b1e2f6cf85567f69f2e20cbc942967fa6304b SHA256 17bf4fe3596dc5b145e4163d85181e2edcaa214df3cf9072d852ba0e7a569891 +AUX clamd.rc 3686 RMD160 0298ad54c13bb2c9d2e667270546308dbc581d7d SHA1 22299bf3a4812afbf45b792c55bc31c552fe12df SHA256 0f68262e6c55883d2f32cfdbbfeb33f64fc9c4bf019f59ae6b7bc864fa2d346c DIST clamav-0.91.2.tar.gz 13394538 RMD160 9e181a7a4fd08377ff47663aed27f8cc97249a21 SHA1 f18007c3045a1d78967adad805c6934d46ca6419 SHA256 dac9de86dff5ef4c9a6e4962da24988e1aa74948a21b7fb7b7fed17867ddf2a0 DIST clamav-0.92.1.tar.gz 15284752 RMD160 5cf4b36a665dba6be366e94d02b6c8112048d647 SHA1 6ee4fa5a1c5f71eecc99beb17bc5f3c5a3b580ec SHA256 e08a63adb3eda3dfc190d7a8b3fa55c881b1632583fbdf67327d3767d6966581 DIST clamav-0.92.tar.gz 14300798 RMD160 37f0450b9b3c6fc863f94811ae372ece1677d791 SHA1 b6573acd9a7bb6bf3bd4b39a0102ce0be764c5bc SHA256 d3c8c1e2e0025a354663b330d69c8848c7a5c9d7248204c69362c2924366025e EBUILD clamav-0.91.2-r1.ebuild 4378 RMD160 0e6be1ff7e473b515e2362f1de934866d3fba12f SHA1 e3b13d2e1545a1d9bb37848d17f835628330f288 SHA256 adef8794ef1de7dabaf2ab1ad18886fc5a353ca2ba53dc56355846ea212c4d50 EBUILD clamav-0.91.2.ebuild 4235 RMD160 1b50e9d66a1f75306ae8117ff8e2cb2ed86df1d4 SHA1 ba43a4bf6031fda6f254e5f56a76e663e00825ee SHA256 c0427934b1d9dfcdae76d6bfbcd3edc2ae385b18d4e33abfe9f2db45aabc55a0 +EBUILD clamav-0.92.1-r1.ebuild 4270 RMD160 b336c4e7bd8d6f4db47870acde83010b8c723b1f SHA1 45553748226c45c8d7dc4d0652c37823b31a8f3f SHA256 a87f065e3871d429b389c2ca20dfdfd4a0870de4b492d6c094f118bc5cac4a03 EBUILD clamav-0.92.1.ebuild 4238 RMD160 984692c8f0655fc8937df0f2a43850d5e5abecfa SHA1 607c0124ff5f7a9171299bf1f447d55c14a706cf SHA256 08d2a538a130bf27ac0c06901bb7e0f3dea9335a7c2c84ebd9115808283cf0b2 EBUILD clamav-0.92.ebuild 4109 RMD160 87289f95ba172c645c8afa967e09a6aa04fb0403 SHA1 aa06e152e7119cf6ded5aeea320d67f6e3591dee SHA256 676ed0507dcb0f743fa87027ec2daff4343d9a7ec4c1dcd08662150bc7266928 -MISC ChangeLog 42736 RMD160 80610f1045ae5ae54c64496ad5ff854db6488fb9 SHA1 7ba3a3c65e50d6d80593bcd1100f6cae3e6e3820 SHA256 96a4f810f94527143a7c0960f09634254edf2cd84b0cfae1c495168d38469346 +MISC ChangeLog 43019 RMD160 73e4e909011211e1a55bf5aef8cb2579bb849cef SHA1 6673c8eb4038ac04a163202f6c19f673472134f3 SHA256 447db7ef7d71e6afdd610abaf9deb2fffdea5893a27fe800d246af02c6aebb55 MISC metadata.xml 184 RMD160 c37bff1fc1cd7139c91dae9b0fa5082e1d81f153 SHA1 cc0a188d9ad2411e78747326c62dd046bd5413c8 SHA256 d51011aa837db802ef539a1321a4af0a4a00879d475b92fd58f3c01df7320b58 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) -iD8DBQFHwKAxQlM6RnzZP+IRAktmAKCV8ddrE124tDi1F7EBjGrNWH4Q4QCeKBAz -5t3MjUvOmvB/UnE3HnNCjSQ= -=fU1t +iD8DBQFHyJlzQlM6RnzZP+IRAtBWAJ9gb2/XQv00MLYG2lXwkHC+25LPhgCdGCuY +xP1QgZ26iFqYQOv+dwI0iuo= +=bAEf -----END PGP SIGNATURE----- diff --git a/app-antivirus/clamav/clamav-0.92.1-r1.ebuild b/app-antivirus/clamav/clamav-0.92.1-r1.ebuild new file mode 100644 index 000000000000..2df688d52d62 --- /dev/null +++ b/app-antivirus/clamav/clamav-0.92.1-r1.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.92.1-r1.ebuild,v 1.1 2008/02/29 23:46:46 ticho Exp $ + +inherit autotools eutils flag-o-matic fixheadtails multilib + +DESCRIPTION="Clam Anti-Virus Scanner" +HOMEPAGE="http://www.clamav.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="bzip2 crypt mailwrapper milter nls selinux" + +DEPEND="virtual/libc + bzip2? ( app-arch/bzip2 ) + crypt? ( >=dev-libs/gmp-4.1.2 ) + milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) ) + nls? ( sys-devel/gettext ) + dev-libs/gmp + >=sys-libs/zlib-1.2.1-r3 + >=sys-apps/sed-4" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-clamav ) + sys-apps/grep" +PROVIDE="virtual/antivirus" + +pkg_setup() { + if use milter; then + if [ ! -e /usr/$(get_libdir)/libmilter.a ] ; then + ewarn "In order to enable milter support, clamav needs sendmail with enabled milter" + ewarn "USE flag, or mail-filter/libmilter package." + fi + fi + + enewgroup clamav + enewuser clamav -1 -1 /dev/null clamav +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-0.90-nls.patch + eautoreconf +} + +src_compile() { + has_version =sys-libs/glibc-2.2* && filter-lfs-flags + + local myconf + + # we depend on fixed zlib, so we can disable this check to prevent redundant + # warning (bug #61749) + myconf="${myconf} --disable-zlib-vcheck" + # use id utility instead of /etc/passwd parsing (bug #72540) + myconf="${myconf} --enable-id-check" + use milter && { + myconf="${myconf} --enable-milter" + use mailwrapper && \ + myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail" + } + + ht_fix_file configure + econf ${myconf} \ + $(use_enable bzip2) \ + $(use_enable nls) \ + --disable-experimental \ + --with-dbdir=/var/lib/clamav || die + emake || die +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc AUTHORS BUGS NEWS README ChangeLog FAQ + newconfd "${FILESDIR}"/clamd.conf clamd + newinitd "${FILESDIR}"/clamd.rc clamd + dodoc "${FILESDIR}"/clamav-milter.README.gentoo + + dodir /var/run/clamav + keepdir /var/run/clamav + fowners clamav:clamav /var/run/clamav + dodir /var/log/clamav + keepdir /var/log/clamav + fowners clamav:clamav /var/log/clamav + + # Change /etc/clamd.conf to be usable out of the box + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \ + -e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \ + -e "s:.*\(User\) .*:\1 clamav:" \ + -e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \ + -e "s:^\#\(LogTime\).*:\1 yes:" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + "${D}"/etc/clamd.conf + + # Do the same for /etc/freshclam.conf + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \ + -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ + -e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \ + -e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:" \ + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + "${D}"/etc/freshclam.conf + + if use milter ; then + echo " +START_MILTER=no +MILTER_NICELEVEL=19" \ + >> "${D}"/etc/conf.d/clamd + echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \ + >>"${D}"/etc/conf.d/clamd + echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \ + >>"${D}"/etc/conf.d/clamd + fi + + diropts "" + dodir /etc/logrotate.d + insopts -m0644 + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} +} + +pkg_postinst() { + echo + if use milter ; then + elog "For simple instructions how to setup the clamav-milter" + elog "read /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz" + echo + fi + ewarn "WARNING: In 0.92.1, the logic in the scanner limits have been reworked. This" + ewarn "results in different command line options to clamscan, different config" + ewarn "options to clamd and, overall, a different behaviour." + echo + ewarn "The soname for libclamav has changed in clamav-0.92." + ewarn "If you have upgraded from that or earlier version, it is recommended to run:" + ewarn "\trevdep-rebuild --library libclamav.so.2" + ewarn "This will fix linking errors caused by this change." + echo +} diff --git a/app-antivirus/clamav/files/clamd.conf b/app-antivirus/clamav/files/clamd.conf index e50660bfabbb..ee055138074c 100644 --- a/app-antivirus/clamav/files/clamd.conf +++ b/app-antivirus/clamav/files/clamd.conf @@ -5,3 +5,5 @@ START_CLAMD=yes START_FRESHCLAM=yes +CLAMD_NICELEVEL=3 +FRESHCLAM_NICELEVEL=19 diff --git a/app-antivirus/clamav/files/clamd.rc b/app-antivirus/clamav/files/clamd.rc index 265b909d4c83..149808920ca9 100644 --- a/app-antivirus/clamav/files/clamd.rc +++ b/app-antivirus/clamav/files/clamd.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.15 2007/04/13 20:56:34 ticho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.16 2008/02/29 23:46:46 ticho Exp $ opts="logfix" @@ -21,14 +21,15 @@ start() { fi ebegin "Starting clamd" start-stop-daemon --start --quiet \ + --nicelevel ${CLAMD_NICELEVEL:-0} \ --exec /usr/sbin/clamd eend $? "Failed to start clamd" fi if [ "${START_FRESHCLAM}" = "yes" ]; then ebegin "Starting freshclam" - start-stop-daemon --start --quiet \ + --nicelevel ${FRESHCLAM_NICELEVEL:-0} \ --exec /usr/bin/freshclam -- -d retcode=$? if [ ${retcode} = 1 ]; then @@ -86,6 +87,7 @@ start() { ebegin "Starting clamav-milter" start-stop-daemon --start --quiet \ + --nicelevel ${MILTER_NICELEVEL:-0} \ --exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET} eend $? "Failed to start clamav-milter" fi |