diff options
author | Andrej Kacian <ticho@gentoo.org> | 2007-03-08 16:59:35 +0000 |
---|---|---|
committer | Andrej Kacian <ticho@gentoo.org> | 2007-03-08 16:59:35 +0000 |
commit | 2931de8522583e5f95d23f3b12e21c535ce3b30c (patch) | |
tree | 16415ba8748e55a5c9645e003ef0f9d105f2390a /app-antivirus/clamav/files | |
parent | dont reset /bin/sh ... let users change it if they want (diff) | |
download | gentoo-2-2931de8522583e5f95d23f3b12e21c535ce3b30c.tar.gz gentoo-2-2931de8522583e5f95d23f3b12e21c535ce3b30c.tar.bz2 gentoo-2-2931de8522583e5f95d23f3b12e21c535ce3b30c.zip |
Wait for clamd socket if clamav-milter is started with --external argument. Patch provided by Dean C Bullock <dean at bullock.net>, bug #169561. Apply patch to allow building without NLS. Patch by Ned Ludd <solar at gentoo.org>, bug #167829.
(Portage version: 2.1.2.1)
Diffstat (limited to 'app-antivirus/clamav/files')
-rw-r--r-- | app-antivirus/clamav/files/clamav-0.90-nls.patch | 55 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamd.rc | 21 | ||||
-rw-r--r-- | app-antivirus/clamav/files/digest-clamav-0.90.1-r1 | 3 |
3 files changed, 78 insertions, 1 deletions
diff --git a/app-antivirus/clamav/files/clamav-0.90-nls.patch b/app-antivirus/clamav/files/clamav-0.90-nls.patch new file mode 100644 index 000000000000..a2535c241178 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-0.90-nls.patch @@ -0,0 +1,55 @@ +diff -bur clamav-0.90.1-orig/clamav-milter/clamav-milter.c clamav-0.90.1/clamav-milter/clamav-milter.c +--- clamav-0.90.1-orig/clamav-milter/clamav-milter.c 2007-03-07 17:56:53.000000000 +0100 ++++ clamav-0.90.1/clamav-milter/clamav-milter.c 2007-03-07 18:00:05.000000000 +0100 +@@ -108,7 +108,7 @@ + #endif + #endif + +-#ifdef C_LINUX ++#if defined(C_LINUX) && defined(ENABLE_NLS) + #include <sys/sendfile.h> /* FIXME: use sendfile on BSD not Linux */ + #include <libintl.h> + #include <locale.h> +diff -bur clamav-0.90.1-orig/configure.in clamav-0.90.1/configure.in +--- clamav-0.90.1-orig/configure.in 2007-03-07 17:56:53.000000000 +0100 ++++ clamav-0.90.1/configure.in 2007-03-07 17:57:30.000000000 +0100 +@@ -160,6 +160,15 @@ + AC_CHECK_HEADER(dlfcn.h,[LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ldl" ; AC_DEFINE(HAVE_NCORE,1,Support for NodalCore acceleration)], AC_MSG_WARN([****** NodalCore support disabled (no support for dlopen)])) + fi + ++AC_ARG_ENABLE(nls, ++ AC_HELP_STRING([--disable-nls], [disable nls support]), ++ [want_nls=$enableval], [want_nls=yes] ++) ++ ++if test $want_nls = yes; then ++ CPPFLAGS="$CPPFLAGS -DENABLE_NLS" ++fi ++ + AC_ARG_ENABLE(dns, + AC_HELP_STRING([--disable-dns], [disable support for database verification through DNS]), + [want_dns=$enableval], [want_dns=yes] +diff -bur clamav-0.90.1-orig/shared/getopt.c clamav-0.90.1/shared/getopt.c +--- clamav-0.90.1-orig/shared/getopt.c 2007-03-07 17:56:53.000000000 +0100 ++++ clamav-0.90.1/shared/getopt.c 2007-03-07 18:00:25.000000000 +0100 +@@ -82,7 +82,7 @@ + + #ifndef _ + /* This is for other GNU distributions with internationalized messages. */ +-# if defined HAVE_LIBINTL_H || defined _LIBC ++# if (defined(HAVE_LIBINTL_H) || defined(_LIBC)) && defined(ENABLE_NLS) + # include <libintl.h> + # ifndef _ + # define _(msgid) gettext (msgid) +diff -bur clamav-0.90.1-orig/shared/output.c clamav-0.90.1/shared/output.c +--- clamav-0.90.1-orig/shared/output.c 2007-03-07 17:56:53.000000000 +0100 ++++ clamav-0.90.1/shared/output.c 2007-03-07 17:57:30.000000000 +0100 +@@ -61,7 +61,7 @@ + pthread_mutex_t logg_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif + +-#ifdef C_LINUX ++#if defined(C_LINUX) && defined(ENABLE_NLS) + #include <libintl.h> + #include <locale.h> + diff --git a/app-antivirus/clamav/files/clamd.rc b/app-antivirus/clamav/files/clamd.rc index f6a3fc0f0db2..098f92f4474b 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.8 2005/11/09 16:40:05 ticho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.9 2007/03/08 16:59:35 ticho Exp $ depend() { use net @@ -45,6 +45,25 @@ start() { chown ${clamav_user} ${logfile} fi + if [[ ${MILTER_OPTS} == *--external* ]]; then + local clamd_socket_wait_count=0 + local clamd_socket_wait_max=10 + local clamd_socket_wait_result=-1 + ebegin "Waiting for clamd to create ${clamd_socket}" + while [[ clamd_socket_wait < clamd_socket_wait_max ]]; do + if [ -S "${clamd_socket:-/tmp/clamd}" ]; then + clamd_socket_wait_result=0 + break + else + echo -n " ." + let clamd_socket_wait++ + sleep 1 + fi + done + echo + eend $clamd_socket_wait_result "Timeout waiting for ${clamd_socket}" + fi + ebegin "Starting clamav-milter" start-stop-daemon --start --quiet \ --exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET} diff --git a/app-antivirus/clamav/files/digest-clamav-0.90.1-r1 b/app-antivirus/clamav/files/digest-clamav-0.90.1-r1 new file mode 100644 index 000000000000..fe2fc17efcc2 --- /dev/null +++ b/app-antivirus/clamav/files/digest-clamav-0.90.1-r1 @@ -0,0 +1,3 @@ +MD5 cd11c05b5476262eaea4fa3bd7dc25bf clamav-0.90.1.tar.gz 11643310 +RMD160 1fd343d6510fea337a676e32bb1e4e404da4bd6d clamav-0.90.1.tar.gz 11643310 +SHA256 08a0255b4f6bdc4312eea6c118e79ecf684aed10640b45037d9dc5890c7687be clamav-0.90.1.tar.gz 11643310 |