Browse Source

Merge pull request #4113 from lucize/clamupdate

clamav: update to 0.99.2
lilik-openwrt-22.03
Hannu Nyman 8 years ago
committed by GitHub
parent
commit
15b1d7a522
6 changed files with 22 additions and 14 deletions
  1. +7
    -7
      net/clamav/Makefile
  2. +1
    -0
      net/clamav/files/clamav.config
  3. +6
    -3
      net/clamav/files/clamav.init
  4. +1
    -0
      net/clamav/files/freshclam.config
  5. +6
    -3
      net/clamav/files/freshclam.init
  6. +1
    -1
      net/clamav/patches/001-compile.patch

+ 7
- 7
net/clamav/Makefile View File

@ -8,15 +8,16 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=clamav PKG_NAME:=clamav
PKG_VERSION:=0.98.7
PKG_VERSION:=0.99.2
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
Lucian Cristian <lucian.cristian@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 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_HASH:=167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_INSTALL:=1
@ -26,7 +27,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/clamav/Default define Package/clamav/Default
SECTION:=net SECTION:=net
DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl
DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl +libltdl +libpcre +USE_MUSL:musl-fts
CATEGORY:=Network CATEGORY:=Network
SUBMENU:=Web Servers/Proxies SUBMENU:=Web Servers/Proxies
TITLE:=ClamAV TITLE:=ClamAV
@ -58,7 +59,7 @@ endef
CONFIGURE_VARS += \ CONFIGURE_VARS += \
INCLUDES="" \ INCLUDES="" \
CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
LIBS="-lpthread" \
$(if $(CONFIG_USE_MUSL),LIBS="-lpthread -lfts",LIBS="-lpthread") \
define Build/Configure define Build/Configure
$(call Build/Configure/Default, \ $(call Build/Configure/Default, \
@ -67,7 +68,6 @@ define Build/Configure
--exec-prefix=/usr/ \ --exec-prefix=/usr/ \
--disable-xml \ --disable-xml \
--disable-bzip2 \ --disable-bzip2 \
--enable-ltdl-install \
--with-user nobody \ --with-user nobody \
--with-group nogroup \ --with-group nogroup \
) )


+ 1
- 0
net/clamav/files/clamav.config View File

@ -32,3 +32,4 @@ config clamav 'clamav'
option LocalSocket '/var/run/clamav/clamd.sock' option LocalSocket '/var/run/clamav/clamd.sock'
option User 'nobody' option User 'nobody'
option ExitOnOOM 'yes' option ExitOnOOM 'yes'
option DatabaseDirectory '/usr/share/clamav'

+ 6
- 3
net/clamav/files/clamav.init View File

@ -42,7 +42,8 @@ validate_clamav_section() {
'MaxFileSize:string' \ 'MaxFileSize:string' \
'LocalSocket:string' \ 'LocalSocket:string' \
'User:string' \ 'User:string' \
'ExitOnOOM:string'
'ExitOnOOM:string' \
'DatabaseDirectory:string'
} }
start_service() { start_service() {
@ -50,14 +51,15 @@ start_service() {
StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \ StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \
FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \ FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \
ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \ ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \
ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User
ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User \
DatabaseDirectory
validate_clamav_section clamav || { validate_clamav_section clamav || {
echo "validation failed" echo "validation failed"
return 1 return 1
} }
mkdir -p /usr/share/clamav
mkdir -p $DatabaseDirectory
mkdir -p /etc/clamav/ mkdir -p /etc/clamav/
mkdir -p /var/run/clamav/ mkdir -p /var/run/clamav/
chmod a+rw /var/run/clamav chmod a+rw /var/run/clamav
@ -97,6 +99,7 @@ start_service() {
echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE
echo "User " $User >> $CLAMD_CONFIGFILE echo "User " $User >> $CLAMD_CONFIGFILE
echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE
echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE
procd_open_instance procd_open_instance
procd_set_param command $PROG -c $CLAMD_CONFIGFILE procd_set_param command $PROG -c $CLAMD_CONFIGFILE


+ 1
- 0
net/clamav/files/freshclam.config View File

@ -5,3 +5,4 @@ config freshclam 'freshclam'
option NotifyClamd '/etc/clamav/clamd.conf' option NotifyClamd '/etc/clamav/clamd.conf'
option DatabaseOwner 'root' option DatabaseOwner 'root'
option CompressLocalDatabase 'yes' option CompressLocalDatabase 'yes'
option DatabaseDirectory '/usr/share/clamav'

+ 6
- 3
net/clamav/files/freshclam.init View File

@ -15,11 +15,13 @@ validate_freshclam_section() {
'DatabaseMirror:string' \ 'DatabaseMirror:string' \
'NotifyClamd:string' \ 'NotifyClamd:string' \
'DatabaseOwner:string' \ 'DatabaseOwner:string' \
'CompressLocalDatabase:string:'
'CompressLocalDatabase:string' \
'DatabaseDirectory:string:'
} }
start_service() { start_service() {
local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror
local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror \
DatabaseDirectory
validate_freshclam_section freshclam || { validate_freshclam_section freshclam || {
echo "validation failed" echo "validation failed"
@ -28,7 +30,7 @@ start_service() {
[ -f /tmp/freshclam.pid ] && echo "already running" && return 0 [ -f /tmp/freshclam.pid ] && echo "already running" && return 0
mkdir -p /usr/share/clamav
mkdir -p $DatabaseDirectory
mkdir -p /etc/clamav mkdir -p /etc/clamav
touch /tmp/freshclam.log touch /tmp/freshclam.log
touch /tmp/freshclam.pid touch /tmp/freshclam.pid
@ -41,6 +43,7 @@ start_service() {
echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE
echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE
echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE
echo "DatabaseDirectory " $DatabaseDirectory >> $FRESHCLAM_CONFIGFILE
procd_open_instance procd_open_instance
procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings


+ 1
- 1
net/clamav/patches/001-compile.patch View File

@ -1,6 +1,6 @@
--- a/clamdscan/proto.c --- a/clamdscan/proto.c
+++ b/clamdscan/proto.c +++ b/clamdscan/proto.c
@@ -55,6 +55,7 @@
@@ -59,6 +59,7 @@
#include "shared/misc.h" #include "shared/misc.h"
#include "shared/clamdcom.h" #include "shared/clamdcom.h"


Loading…
Cancel
Save