Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59061 - app-antivirus/clamav-0.75.1: problems with touch & chmod
Summary: app-antivirus/clamav-0.75.1: problems with touch & chmod
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 58960
  Show dependency tree
 
Reported: 2004-08-01 03:59 UTC by Ioannis Aslanidis (RETIRED)
Modified: 2005-02-16 04:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ioannis Aslanidis (RETIRED) gentoo-dev 2004-08-01 03:59:12 UTC
I just updated from clamav 0.75 to 0.75.1 and there seems to be a missing file or a bad argument:

# /etc/init.d/clamd restart
 * Stopping clamd...                                                      [ ok ]
 * Stopping freshclam...                                                  [ ok ]
touch: cannot touch `': No such file or directory
chown: invalid argument: `'
 * Starting clamd...                                                      [ ok ]
 * Starting freshclam...                                                  [ ok ]


Reproducible: Always
Steps to Reproduce:
1. /etc/init.d/clamd restart



Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040619-r0,
2.6.7-gentoo-r11)
=================================================================
System uname: 2.6.7-gentoo-r11 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.5.1
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -fomit-frame-pointer -funroll-loops -pipe -fforce-addr
-fforce-mem -fmove-all-movables"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -fomit-frame-pointer -funroll-loops -pipe -fforce-addr
-fforce-mem -fmove-all-movables"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache distcc fixpackages sandbox usersandbox"
GENTOO_MIRRORS="http://ftp.caliu.info/pub/gentoo/
http://ftp.ntua.gr/pub/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa apache2 apm arts audiofile avi berkdb bindist cdr crypt
cups curl directfb divx4linux dvd dvdr encode esd ethereal fastcgi fbcon flac
flash foomaticdb freetype gd gdbm ggi gif gmp gnome gphoto2 gpm gstreamer gtk
gtk2 icq imagemagick imlib ipv6 java jikes jpeg junit kde lcms ldap libg++
libwww linguas_el linguas_es mad memlimit mikmod mmx motif mozilla mpeg msn
ncurses nls nocd oggvorbis opengl oss pam pdflib perl pic png ppds python qt
quicktime readline samba sdl slang spell sse ssl svg svga szip tcltk tcpd tetex
tiff truetype ttf unicode usb video_cards_nvidia videos wmf x86 xml xml2 xmms xv
xvid zlib"
Comment 1 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-08-01 04:01:28 UTC
The problem is with the variable ${FRESHCLAM_LOG}:

        if [ "${START_FRESHCLAM}" = "yes" ]; then
                if [ -n "${FRESHCLAM_LOG}" ]; then
                        if [ ! -f "${FRESHCLAM_LOG}" ]; then
                                touch "${FRESHCLAM_LOG}"
                                chown clamav:clamav "${FRESHCLAM_LOG}"
                        fi
                        FRESHCLAM_OPTS="${FRESHCLAM_OPTS} -l ${FRESHCLAM_LOG}"
                fi
                ebegin "Starting freshclam"
                start-stop-daemon --start --quiet \
                 --exec /usr/bin/freshclam -- ${FRESHCLAM_OPTS} 
                eend $? "Failed to start freshclam"
        fi

My /etc/conf.d/clamd has the following lines:

# Config file for /etc/init.d/clamd

START_CLAMD=yes
CLAMD_OPTS=""
CLAMD_LOG=""

START_FRESHCLAM=yes
FRESHCLAM_OPTS="-d -c 2"
FRESHCLAM_LOG="/var/log/clam-update.log"
Comment 2 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-08-01 04:03:01 UTC
It seems the problem is with the variable ${CLAMD_LOG} instead, as it is empty in my /etc/conf.d/clamd... 


I advise checking first that the variable is not an empty string...



        if [ "${START_CLAMD}" = "yes" ]; then
                if [ -S "/tmp/clamd" ]; then
                        rm -f /tmp/clamd
                fi
                if [ -n "$CLAMD_LOG}" -a ! -f "${CLAMD_LOG}" ]; then
                        touch "${CLAMD_LOG}"
                        chown clamav:clamav "${CLAMD_LOG}"
                        CLAMD_OPTS="${CLAMD_OPTS}${CLAMD_LOG}"
                fi
                ebegin "Starting clamd"
                start-stop-daemon --start --quiet \
                        --exec /usr/sbin/clamd -- ${CLAMD_OPTS}
                eend $? "Failed to start clamd"
        fi
Comment 3 Mathias Gug 2004-08-03 11:12:45 UTC
See bug 58978 for a patch to fix this : http://bugs.gentoo.org/attachment.cgi?id=36697&action=view
Comment 4 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-08-03 11:49:21 UTC
Thanks that did solve the problem :)

Additionally, I'd like to ask you to add the following in the stop script:

killall freshclam
killall clamd

as it seems that stopping the daemon (/etc/init.d/clamd stop) does not terminate those processes.

Try doing "/etc/init.d/clamd restart" twice and you'll see what I mean.
Comment 5 Thomas Raschbacher gentoo-dev 2004-10-08 11:52:11 UTC
this is already fixed in the current tree .. please check if it works for you now ..
Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-10-08 12:46:20 UTC
Yes, it does work.
Comment 7 Andrej Kacian (RETIRED) gentoo-dev 2005-02-16 04:38:26 UTC
Cleaning up