Ubuntu Forums Archive Viewer

backported clamav-freshclam uses unavailable functions

Archived thread 108152 from Bug Reports / Support. Markdown source: Bug_Reports__Support/thread_108152_backported_clamav-freshclam_uses_unavailable_funct.md

Original URL About this archive
#1

Version 0.87.1-1~breezy1 of /etc/init.d/clamav-frashclam uses the function "log_daemon_msg", which is not in /lib/lsb/init-functions in breezy.

As a result of this, I got this mail from cron.daily script: /etc/cron.daily/logrotate: /etc/init.d/clamav-freshclam: line 195: log_daemon_msg: command not found

#2

Yes. I got the same error, but I seen somewhere that removing clamav en clamscan and then reïnstalling clamscan should do the trick ...

I can't try it myself at the moment (no internet connection to my ubuntu box atm), but I'm giving that a try in a week or 2. I'll let you know if that does the trick.

#3

Tried and it still complains about log_daemon_msg.

#4

Tried and it still complains about log_daemon_msg. I downloaded the new /lib/lsb/init-functions and did cut-and-paste of that function into my existing file!

Here is what I attached to the end of my file (seems to work ok for me):

Sample usage:

log_daemon_msg "Starting GNOME Login Manager" "gdm"

#

On Debian, would output "Starting GNOME Login Manager: gdm"

On Ubuntu, would output " * Starting GNOME Login Manager..."

#

If the second argument is omitted, logging suitable for use with

log_progress_msg() is used:

#

log_daemon_msg "Starting remote filesystem services"

#

On Debian, would output "Starting remote filesystem services:"

On Ubuntu, would output " * Starting remote filesystem services..."

log_daemon_msg () { if [ -z "$1" ]; then return 1 fi

if [ -z "$2" ]; then echo -n "$1:" return fi

echo -n "$1: $2" }

#5

I won't challenge this workaround. However, the package still needs to be fixed. The fix is as simple as replcing all log_daemon_msg with something else, or removing them.

#6

I won't challenge this workaround. However, the package still needs to be fixed. The fix is as simple as replacing all log_daemon_msg with something else, or removing them. No, the ClamAV package is using the currently recommended functions in this lsb module, such as log_daemon_msg.

The problem is that the lsb package currently used in Breezy has not been updated to the current version - where ClamAV now needs it to be.

The ClamAV people have followed the instructions (as they should) to use the current version of lsb, Ubuntu haven't (yet).

#7

Where can I download the new /lib/lsb/init-functions?

I'm having the same problems with the log_daemon_msg. I tried uninstalling clamAV and I was pleasantly surprised when freshclam informed me that clamd had been informed. However, on shutting down ubuntu, the log_daemon_msg message was present again.

#8

Hello,

Well, I went through this problem :

1st get the dapper source of clamav (in /usr/local/src for me), build-deps and build-essential

2nd get the debian package to get the init.d files that will be compliant with the breezy

$ cd /usr/local/src ; mkdir debian ; cd debian
$ mkdir clamd ; cd clamd; wget http://ftp2.de.debian.org/debian-volatile/pool/volatile/main/c/clamav/clamav-daemon_0.88-0volatile1_i386.deb
$ cd ..; mkdir freshclam; cd freshclam ; wget http://ftp2.de.debian.org/debian-volatile/pool/volatile/main/c/clamav/clamav-freshclam_0.88-0volatile1_i386.deb

3rd extract the packages without installing them :

_Example for freshclam_

$ cd freshclam
$ ar -x clamav-freshclam_0.88-0volatile1_i386.deb
$ tar xvzf data.tar.gz

Then change the files in the source :

$ cd freshclam
$ ar -x clamav-freshclam_0.88-0volatile1_i386.deb
$ tar xvzf data.tar.gz

4th copy the file at the right place

_Note_ : if you look at the files in the source directory, you'll see that the /etc/init.d/clamav-freshclam will be generated using the debian/clamav-freshclam.init.in and COMMON-FUNCTIONS from the file common-functions.

So I used to comment the line in the debian/rules that is doing this job (line 81) and did a copy of the debian init file as debian/clamav-freshclam.init (hope it is clear enough).

This is much more simple with the clamav-daemon init file, you just need to replace the debian/clamav-daemon.init with the good one.

The only thing I would need now is a way to avoid these files to be deleted at the debian/rules clean.

#9

Well, this is really a packaging bug, and should be treated as such. clamav-freshclam depends on new functions in /lib/lsb/init-functions, and these can be found in e.g. the lsb-base package from Debian Testing (http://packages.debian.org/).

I will report it as a bug.

;)Frode

#10

Take a look at the Ubunt Bugs database

;)Frode