Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Missing Package - ClamAV (Read 2385 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

[SOLVED] Missing Package - ClamAV

Not a crisis item...low priority at best.

ClamAV package installs but there is no package which handles open-rc management of the ClamAV daemon clamd.

I can find is Alpine Linux's version of the open-rc init.d file HERE
Funtoo's version of the open-rc init.d is HERE

Could someone more familiar with packaging and open-rc pull this onto their plate, please?

Re: Missing Package - ClamAV

Reply #1
ClamAV package installs but there is no package which handles open-rc management of the ClamAV daemon clamd.

I can find is Alpine Linux's version of the open-rc init.d file HERE
Funtoo's version of the open-rc init.d is HERE
Have you tried either of them? I could package it after our repo freeze is over, but I've never run clamav and can't really test.

[EDIT] There's also the gentoo repository which might be of interest.

Re: Missing Package - ClamAV

Reply #2
Have you tried either of them? I could package it after our repo freeze is over, but I've never run clamav and can't really test.

[EDIT] There's also the gentoo repository which might be of interest.

I didn't think of looking at gentoo because of their stance on systemd/open-rc being a little too tolerant. I cited the funtoo reference as project is headed by same person who started gentoo. Daniel Robbins (BDFL of gentoo/funtoo) has explicitly stated systemd will never touch funtoo. So, naturally I looked at the funtoo repositories for code for a open-rc solution. There's quite a bit of cross-over between the two projects but funtoo is focused on open-rc only. The catch being compile locally, like gentoo.

I haven't been feeling very experimental WRT testing new services. My system "feels" fragile as it is at the moment. However, missing an open-rc service for anti-virus seemed important to speak up about.

Re: Missing Package - ClamAV

Reply #3
I haven't been feeling very experimental WRT testing new services. My system "feels" fragile as it is at the moment. However, missing an open-rc service for anti-virus seemed important to speak up about.
You don't have to create any packages; just copy the init script in /etc/init.d, chmod +x it, copy the conf file in /etc/conf.d and tweak them (if needed, usually, only the shebang needs to be changed to "#!/usr/bin/openrc-run") until clamav start/stops successfully. Then post them here for packaging.

Re: Missing Package - ClamAV

Reply #4
I can't remember where I stole my rc script from but this is the one I use pretty successfully:

Code: [Select]
#!/bin/sh
# clamav        Script to start/stop clamd.
#
# chkconfig:    - 63 38
# description:  clamav antivirus daemon.
#
# processname: clamd
# pidfile: /var/run/clamav/clamd.pid
#
# Source function library
#. /etc/rc.d/init.d/functions

# Get network config
#. /etc/sysconfig/network

###########################################################################
# CONFIGURATION

# Most configuration options are found in the clamd.conf file
# The location of configuration file
config=/etc/clamav/clamd.conf

# The prefix clamd was installed to
prefix=/usr/bin

###########################################################################
# SCRIPT

RETVAL=0

start() {
       echo -n $"Starting Clamav: "
       /usr/bin/clamd
       RETVAL1=$?
       echo
       [ $RETVAL1 -eq 0 ] && touch /var/lock/clamd
       return $RETVAL1
}

stop() {
       echo -n $"Stopping Clamav: "
       killall clamd
       RETVAL=$?
       echo
       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
       return $RETVAL
}

restart() {
       stop
       start
}

case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
# status)
#       status clamd
#       ;;
 restart)
       restart
       ;;
 *)
#        echo $"Usage: $0 {start|stop|status|restart}"
        echo $"Usage: $0 {start|stop|restart}"

        exit 1

esac
exit $?
OS: Artix x86_64
Host: Predator PH517-61 V1.07
CPU: AMD Ryzen 7 2700 (16) @ 3.2GHz [112.4°F]
GPU: AMD ATI Radeon RX Vega 56/64
Memory: 1129MiB / 64390MiB

package clamav-openrc

Reply #5
Hello,

I can't find a "clamav-openrc" package, only "clamav-runit" and "clamav-s6".
maybe it's missing.. (?) 

many thanks if someone could add it.




Re: [SOLVED] Missing Package - ClamAV

Reply #9
I'm wondering why the package has acpid-openrc dependency?