wok-6.x rev 24406

updated clamav and clamav-dev (0.102.3 -> 0.104.2)
author Hans-G?nter Theisgen
date Wed Feb 09 13:44:54 2022 +0100 (2022-02-09)
parents c9fa368eb94f
children 061d49c68c42
files clamav-dev/receipt clamav/description.txt clamav/receipt clamav/stuff/daemon-clamd
line diff
     1.1 --- a/clamav-dev/receipt	Wed Feb 09 08:02:34 2022 +0100
     1.2 +++ b/clamav-dev/receipt	Wed Feb 09 13:44:54 2022 +0100
     1.3 @@ -1,25 +1,22 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="clamav-dev"
     1.7 -VERSION="0.102.3"
     1.8 +VERSION="0.104.2"
     1.9  CATEGORY="development"
    1.10  TAGS="antivirus"
    1.11 -SHORT_DESC="Clamav dev files."
    1.12 +SHORT_DESC="Clamav - development files."
    1.13  MAINTAINER="erjo@slitaz.org"
    1.14  LICENSE="GPL2"
    1.15 -WEB_SITE="http://www.clamav.net/"
    1.16 +WEB_SITE="https://www.clamav.net/"
    1.17  
    1.18 +DEPENDS="clamav pkg-config"
    1.19  WANTED="clamav"
    1.20 -DEPENDS="clamav pkg-config"
    1.21  
    1.22 -# Rules to gen a SliTaz package suitable for Tazpkg. 
    1.23 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.24  genpkg_rules()
    1.25  {
    1.26 -	mkdir -p $fs/usr/lib \
    1.27 -		$fs/usr/bin
    1.28 -	
    1.29 -	cp -a $install/usr/include $fs/usr
    1.30 -	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
    1.31 -	cp -a $install/usr/lib/*.*a $fs/usr/lib
    1.32 -	cp -a $install/usr/bin/clamav-config $fs/usr/bin
    1.33 +	cook_copy_folders	include
    1.34 +	cook_copy_folders	pkgconfig
    1.35 +	cook_copy_files		*.*a
    1.36 +	cook_copy_files		clamav-config
    1.37  }
     2.1 --- a/clamav/description.txt	Wed Feb 09 08:02:34 2022 +0100
     2.2 +++ b/clamav/description.txt	Wed Feb 09 13:44:54 2022 +0100
     2.3 @@ -1,7 +1,9 @@
     2.4 -ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, 
     2.5 -viruses, malware and other malicious threats. It is the de facto standard for 
     2.6 -mail gateway scanning. It provides a high performance mutli-threaded scanning 
     2.7 -daemon, command line utilities for on demand file scanning, and an intelligent 
     2.8 -tool for automatic signature updates. The core ClamAV library provides numerous 
     2.9 -file format detection mechanisms, file unpacking support, archive support, and 
    2.10 -multiple signature languages for detecting threats. 
    2.11 +ClamAV is an open source (GPL) antivirus engine designed for detecting
    2.12 +Trojans, viruses, malware and other malicious threats.
    2.13 +It is the de facto standard for mail gateway scanning. It provides a high
    2.14 +performance mutli-threaded scanning daemon, command line utilities for
    2.15 +on demand file scanning, and an intelligent tool for automatic signature
    2.16 +updates.
    2.17 +The core ClamAV library provides numerous file format detection mechanisms,
    2.18 +file unpacking support, archive support, and multiple signature languages
    2.19 +for detecting threats. 
     3.1 --- a/clamav/receipt	Wed Feb 09 08:02:34 2022 +0100
     3.2 +++ b/clamav/receipt	Wed Feb 09 13:44:54 2022 +0100
     3.3 @@ -1,61 +1,80 @@
     3.4  # SliTaz package receipt.
     3.5  
     3.6  PACKAGE="clamav"
     3.7 -VERSION="0.102.3"
     3.8 +VERSION="0.104.2"
     3.9  CATEGORY="security"
    3.10  TAGS="antivirus"
    3.11  SHORT_DESC="Antivirus."
    3.12  MAINTAINER="paul@slitaz.org"
    3.13  LICENSE="GPL2"
    3.14 -WEB_SITE="http://www.clamav.net/"
    3.15 +WEB_SITE="https://www.clamav.net/"
    3.16  
    3.17  TARBALL="$PACKAGE-$VERSION.tar.gz"
    3.18  WGET_URL="${WEB_SITE}downloads/production/$TARBALL"
    3.19  
    3.20 -DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libltdl libssl"
    3.21 -BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev openssl-dev bash curl-dev libjson-c-dev"
    3.22 +DEPENDS="bzip2 gmp libcurl libjson-c libltdl libssl libxml2 ncurses 
    3.23 +	pcre2 slitaz-base-files zlib"
    3.24 +BUILD_DEPENDS="bzip2-dev check-dev cmake curl-dev gmp-dev libjson-c-dev
    3.25 +	libxml2-dev ncurses-dev openssl-dev pcre2-dev zlib-dev"
    3.26  
    3.27  # Rules to configure and make the package.
    3.28  compile_rules()
    3.29  {
    3.30 -	export LDFLAGS="$LDFLAGS -ltinfo"
    3.31 +#	export LDFLAGS="$LDFLAGS -ltinfo"
    3.32  	# Have to create clamav user/group to be able to compile
    3.33 -	adduser -s /bin/false -H -D -u 64 clamav
    3.34 +#	adduser -s /bin/false -H -D -u 64 clamav
    3.35  
    3.36 -	./configure \
    3.37 -		--prefix=/usr \
    3.38 -		--sysconfdir=/etc/clamav \
    3.39 -		--with-dbdir=/var/lib/clamav \
    3.40 -		--with-iconv=no \
    3.41 -		--disable-zlib-vcheck \
    3.42 -		$CONFIGURE_ARGS &&
    3.43 +#	./configure \
    3.44 +#		--prefix=/usr \
    3.45 +#		--sysconfdir=/etc/clamav \
    3.46 +#		--with-dbdir=/var/lib/clamav \
    3.47 +#		--with-iconv=no \
    3.48 +#		--disable-zlib-vcheck \
    3.49 +#		$CONFIGURE_ARGS &&
    3.50 +
    3.51 +	mkdir	_build &&
    3.52 +	cd	_build &&
    3.53 +	cmake	..					\
    3.54 +		-D CMAKE_INSTALL_PREFIX=/usr		\
    3.55 +		-D APP_CONFIG_DIRECTORY=/etc/clamav	\
    3.56 +	 	-D DATABASE_DIRECTORY=/var/lib/clamav	\
    3.57 +		-D ENABLE_MILTER=OFF			\
    3.58 +		-D ENABLE_STATIC_LIB=ON &&
    3.59  	make &&
    3.60 -	make DESTDIR=$DESTDIR install
    3.61 +	make install
    3.62  }
    3.63  
    3.64  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.65  genpkg_rules()
    3.66  {
    3.67 -	mkdir -p $fs/usr/lib $fs/etc/init.d $fs/var/lib/clamav \
    3.68 -		$fs/var/log/clamav $fs/run/clamav
    3.69 -	cp -a $install/usr/bin $fs/usr
    3.70 -	rm -f $fs/usr/bin/clamav-config
    3.71 -	cp -a $install/usr/sbin $fs/usr
    3.72 -	cp -a $install/etc $fs
    3.73 -	mv $fs/etc/clamav/clamd.conf* $fs/etc/clamav/clamd.conf
    3.74 -	mv $fs/etc/clamav/freshclam.conf* $fs/etc/clamav/freshclam.conf
    3.75 -	# Copy only shared lib (.so)
    3.76 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
    3.77 -	# Copy daemon from /$stuff
    3.78 -	cp $stuff/daemon-clamd $fs/etc/init.d/clamd
    3.79 +	mkdir -p $fs/etc/clamav
    3.80 +	mkdir -p $fs/etc/init.d
    3.81 +	mkdir -p $fs/run/clamav
    3.82 +	mkdir -p $fs/usr/lib
    3.83 +	mkdir -p $fs/var/lib/clamav
    3.84 +	mkdir -p $fs/var/log/clamav
    3.85  
    3.86 -	# Customize config
    3.87 -	sed -i -e "s/^Example/#Example/" \
    3.88 +	cp -a $install/etc/clamav/clamd.conf* \
    3.89 +					$fs/etc/clamav/clamd.conf
    3.90 +	cp -a $install/etc/clamav/freshclam.conf* \
    3.91 +					$fs/etc/clamav/freshclam.conf
    3.92 +
    3.93 +	# Copy daemon from $stuff
    3.94 +	cp $stuff/daemon-clamd		$fs/etc/init.d/clamd
    3.95 +
    3.96 +	cp -a $install/usr/bin		$fs/usr
    3.97 +	rm -f				$fs/usr/bin/clamav-config
    3.98 +	cp -a $install/usr/sbin		$fs/usr
    3.99 +
   3.100 +	# Copy only shared libraries (.so)
   3.101 +	cp -a $install/usr/lib/*.so*	$fs/usr/lib
   3.102 +
   3.103 +	# Customize configuration file
   3.104 +	sed -i	-e "s/^Example/#Example/" \
   3.105  		-e "s|^#LogFile /tmp/clamd.log|LogFile /var/log/clamav/clamav.log|" \
   3.106  		-e "s|^#PidFile.*|PidFile /run/clamav/clamd.pid|" \
   3.107  		-e "s|^#LocalSocket /tmp/clamd.socket|LocalSocket /run/clamav/clamd-socket|" \
   3.108  		$fs/etc/clamav/clamd.conf
   3.109 -		
   3.110  }
   3.111  
   3.112  post_install()
   3.113 @@ -64,14 +83,20 @@
   3.114  	local group=clamav
   3.115  
   3.116  	# Enable freshclam update
   3.117 -	echo; action 'Enabling freshclam update...'
   3.118 +	echo
   3.119 +	action 'Enabling freshclam update...'
   3.120  	cd "$1/etc/clamav"
   3.121 -	sed -i 's/^Example/#Example/' freshclam.conf
   3.122 +	sed -i 's/^Example/#Example/'	freshclam.conf
   3.123  	status
   3.124 +	[ "$quiet" ] || cat <<EOT
   3.125 +Before starting clamd for the first time,
   3.126 +create signature database with freshclam."
   3.127 +EOT
   3.128  
   3.129  	# adduser clamav if needed
   3.130 -	if ! grep -q "${user}:" "$1/etc/passwd"; then
   3.131 -		action 'Adding user/group $user...'
   3.132 +	if ! grep -q "${user}:" "$1/etc/passwd"
   3.133 +	  then
   3.134 +		action 'Adding user and group $user...'
   3.135  		chroot "$1/" addgroup -S $group
   3.136  		chroot "$1/" adduser -s /bin/false -S -D -H -G $group $user
   3.137  		status
   3.138 @@ -80,12 +105,13 @@
   3.139  	# Enable daily.cvd updates (sometimes needed for new version)
   3.140  	#chown -R ${user}:${group} "$1/var/lib/clamav"
   3.141  
   3.142 -	# Fix perms
   3.143 -	chroot "$1/" chown -R ${user}.${group} /var/log/clamav \
   3.144 -		/run/clamav /var/lib/clamav
   3.145 +	# Fix permissions
   3.146 +	chroot "$1/" chown -R ${user}.${group}	/run/clamav
   3.147 +	chroot "$1/" chown -R ${user}.${group}	/var/lib/clamav
   3.148 +	chroot "$1/" chown -R ${user}.${group}	/var/log/clamav
   3.149  }
   3.150  
   3.151 -# Del user clamav when pkg is removed.
   3.152 +# Delete user clamav when package is removed.
   3.153  post_remove()
   3.154  {
   3.155  	chroot "$1/" deluser clamav
     4.1 --- a/clamav/stuff/daemon-clamd	Wed Feb 09 08:02:34 2022 +0100
     4.2 +++ b/clamav/stuff/daemon-clamd	Wed Feb 09 13:44:54 2022 +0100
     4.3 @@ -1,8 +1,8 @@
     4.4  #!/bin/sh
     4.5 -# /etc/init.d/daemon-name: Start, stop and restart daemon
     4.6 +# /etc/init.d/clamd: Start, stop and restart clamd
     4.7  # on SliTaz, at boot time or with the command line.
     4.8  #
     4.9 -# To start daemon at boot time, just put the right name in the $RUN_DAEMONS
    4.10 +# To start clamd at boot time, just put clamd in the $RUN_DAEMONS
    4.11  # variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
    4.12  #
    4.13  . /etc/init.d/rc.functions