Artix Linux Forum

Artix Linux => Package management => Topic started by: scottfurry on 28 November 2018, 23:14:25

Title: [SOLVED] Missing Package - ClamAV
Post by: scottfurry on 28 November 2018, 23:14:25
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 (https://pkgs.alpinelinux.org/package/edge/main/x86/clamav-daemon-openrc)
Funtoo's version of the open-rc init.d is HERE (https://github.com/funtoo/nokit/blob/master/app-antivirus/clamav/files/clamd.initd-r6)

Could someone more familiar with packaging and open-rc pull this onto their plate, please?
Title: Re: Missing Package - ClamAV
Post by: nous on 09 December 2018, 01:04:10
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 (https://pkgs.alpinelinux.org/package/edge/main/x86/clamav-daemon-openrc)
Funtoo's version of the open-rc init.d is HERE (https://github.com/funtoo/nokit/blob/master/app-antivirus/clamav/files/clamd.initd-r6)
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 (https://gitweb.gentoo.org/repo/gentoo.git/tree/app-antivirus/clamav/files) which might be of interest.
Title: Re: Missing Package - ClamAV
Post by: scottfurry on 10 December 2018, 00:18:34
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 (https://gitweb.gentoo.org/repo/gentoo.git/tree/app-antivirus/clamav/files) 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.
Title: Re: Missing Package - ClamAV
Post by: nous on 10 December 2018, 13:41:37
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.
Title: Re: Missing Package - ClamAV
Post by: psy0nic on 13 December 2018, 18:06:13
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 $?
Title: package clamav-openrc
Post by: xyxy on 05 February 2020, 19:56:26
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.
Title: Re: Missing Package - ClamAV
Post by: linuxergr on 18 March 2020, 05:12:41
Hi to all,

I had the same issue, with you.

Created an AUR package about it.

https://aur.archlinux.org/packages/clamav-openrc/

Project's page is  https://gitlab.com//linuxer.gr/clamav-opernrc


Regards   :)
Title: Re: package clamav-openrc
Post by: linuxergr on 18 March 2020, 05:15:57
Hi,

I had the same issue, with you.

Created an AUR package about it.

https://aur.archlinux.org/packages/clamav-openrc/

Project's page is  https://gitlab.com//linuxer.gr/clamav-opernrc


Regards   :)
Title: Re: Missing Package - ClamAV
Post by: nous on 19 March 2020, 16:50:16
Added to [galaxy], thanks.
Title: Re: [SOLVED] Missing Package - ClamAV
Post by: odinis on 14 January 2021, 16:45:53
I'm wondering why the package has acpid-openrc dependency?
Title: Re: [SOLVED] Missing Package - ClamAV
Post by: linuxer on 14 January 2021, 17:22:16
I'm wondering why the package has acpid-openrc dependency?

That was my bad, it should have been  openrc as a dependency, at the time I created it on AUR.