clamav: update to 0.99.2
authorLucian Cristian <lucian.cristian@gmail.com>
Sun, 5 Mar 2017 19:21:00 +0000 (21:21 +0200)
committerLucian Cristian <lucian.cristian@gmail.com>
Mon, 6 Mar 2017 12:46:24 +0000 (14:46 +0200)
added option DatabaseDirectory
update depends on musl-fts libraries

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
net/clamav/Makefile
net/clamav/files/clamav.config
net/clamav/files/clamav.init
net/clamav/files/freshclam.config
net/clamav/files/freshclam.init
net/clamav/patches/001-compile.patch

index 3f3edab564093bfd29b4179093dbbc359c910d92..180c4b3ea89d4e7077ab231e0787d5c260cfb369 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=clamav
-PKG_VERSION:=0.98.7
+PKG_VERSION:=0.99.2
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/
-PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067
+PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
+PKG_MD5SUM:=61b51a04619aeafd965892a53f86d192
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define Package/clamav/Default
   SECTION:=net
-  DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl
+  DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl +libltdl +libpcre +musl-fts
   CATEGORY:=Network
   SUBMENU:=Web Servers/Proxies
   TITLE:=ClamAV
@@ -58,7 +58,7 @@ endef
 CONFIGURE_VARS += \
        INCLUDES="" \
        CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
-       LIBS="-lpthread" \
+       LIBS="-lpthread -lfts" \
 
 define Build/Configure
        $(call Build/Configure/Default, \
@@ -67,7 +67,6 @@ define Build/Configure
                --exec-prefix=/usr/ \
                --disable-xml \
                --disable-bzip2 \
-               --enable-ltdl-install \
                --with-user nobody \
                --with-group nogroup \
        )
index 1543caa718831134a013b44c00d599e0016c7f9a..26d941ea17e652bc1b0e499617bded5a141c7f09 100644 (file)
@@ -32,3 +32,4 @@ config clamav 'clamav'
        option LocalSocket '/var/run/clamav/clamd.sock'
        option User 'nobody'
        option ExitOnOOM 'yes'
+       option DatabaseDirectory '/usr/share/clamav'
index b2a89501962865d010d30618656595e43fb557b8..a02468e0737aebd12281155f588944c65edf0ba9 100644 (file)
@@ -42,7 +42,8 @@ validate_clamav_section() {
                'MaxFileSize:string' \
                'LocalSocket:string' \
                'User:string' \
-               'ExitOnOOM:string'
+               'ExitOnOOM:string' \
+               'DatabaseDirectory:string'
 }
 
 start_service() {
@@ -50,14 +51,15 @@ start_service() {
                StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \
                FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \
                ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \
-               ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User
+               ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User \
+               DatabaseDirectory
 
        validate_clamav_section clamav || {
                echo "validation failed"
                return 1
        }
 
-       mkdir -p /usr/share/clamav
+       mkdir -p $DatabaseDirectory
        mkdir -p /etc/clamav/
        mkdir -p /var/run/clamav/
        chmod a+rw /var/run/clamav
@@ -97,6 +99,7 @@ start_service() {
        echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE
        echo "User " $User >> $CLAMD_CONFIGFILE
        echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE
+       echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE
 
        procd_open_instance
        procd_set_param command $PROG -c $CLAMD_CONFIGFILE
index 827e8dd959121047d276c8a15057f4a40d6a0228..ccce09a41758a5b421927d3d494a72412855d091 100644 (file)
@@ -5,3 +5,4 @@ config freshclam 'freshclam'
        option NotifyClamd '/etc/clamav/clamd.conf'
        option DatabaseOwner 'root'
        option CompressLocalDatabase 'yes'
+       option DatabaseDirectory '/usr/share/clamav'
index 37b276729843857a76245a4f72482ddf790ba05e..9504b7ffaae7654f1d1a7b4b87bf19cffbf99998 100644 (file)
@@ -15,11 +15,13 @@ validate_freshclam_section() {
                'DatabaseMirror:string' \
                'NotifyClamd:string' \
                'DatabaseOwner:string' \
-               'CompressLocalDatabase:string:'
+               'CompressLocalDatabase:string' \
+               'DatabaseDirectory:string:'
 }
 
 start_service() {
-       local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror
+       local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror \
+       DatabaseDirectory
 
        validate_freshclam_section freshclam || {
                echo "validation failed"
@@ -28,7 +30,7 @@ start_service() {
 
        [ -f /tmp/freshclam.pid ] && echo "already running" && return 0
 
-       mkdir -p /usr/share/clamav
+       mkdir -p $DatabaseDirectory
        mkdir -p /etc/clamav
        touch /tmp/freshclam.log
        touch /tmp/freshclam.pid
@@ -41,6 +43,7 @@ start_service() {
        echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE
        echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE
        echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE
+       echo "DatabaseDirectory " $DatabaseDirectory >> $FRESHCLAM_CONFIGFILE
 
        procd_open_instance
        procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings
index 3992257089b354e31d4e574b0e514f7353ca072e..096d9cb9c55193e24a8308d4adb78e0f55c2a968 100644 (file)
@@ -1,6 +1,6 @@
 --- a/clamdscan/proto.c
 +++ b/clamdscan/proto.c
-@@ -55,6 +55,7 @@
+@@ -59,6 +59,7 @@
  #include "shared/misc.h"
  #include "shared/clamdcom.h"