View | Details | Raw Unified | Return to bug 209894 | Differences between
and this patch

Collapse All | Expand All

(-)clamav-unofficial-sigs/Makefile (-11 / +3 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/security/clamav-unofficial-sigs/Makefile 412381 2016-04-02 05:55:08Z pi $
2
# $FreeBSD: head/security/clamav-unofficial-sigs/Makefile 412381 2016-04-02 05:55:08Z pi $
3
3
4
PORTNAME=	clamav-unofficial-sigs
4
PORTNAME=	clamav-unofficial-sigs
5
PORTVERSION=	5.0.5
5
PORTVERSION=	5.3.2
6
CATEGORIES=	security
6
CATEGORIES=	security
7
7
8
MAINTAINER=	sf@maxempire.com
8
MAINTAINER=	sf@maxempire.com
Lines 14-20 Link Here
14
RUN_DEPENDS=	clamscan:security/clamav \
14
RUN_DEPENDS=	clamscan:security/clamav \
15
		rsync:net/rsync \
15
		rsync:net/rsync \
16
		curl:ftp/curl \
16
		curl:ftp/curl \
17
		gpg:security/gnupg \
17
		gpg:security/gnupg1 \
18
		bash:shells/bash
18
		bash:shells/bash
19
19
20
USE_GITHUB=	yes
20
USE_GITHUB=	yes
Lines 29-40 Link Here
29
29
30
OPTIONS_DEFINE=	DOCS EXAMPLES
30
OPTIONS_DEFINE=	DOCS EXAMPLES
31
31
32
post-patch:
33
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/clamav-unofficial-sigs.sh ${WRKSRC}/cron.d/clamav-unofficial-sigs
34
35
do-install:
32
do-install:
36
	${INSTALL_SCRIPT} ${WRKSRC}/clamav-unofficial-sigs.sh ${STAGEDIR}${PREFIX}/bin
33
	${INSTALL_SCRIPT} ${WRKSRC}/clamav-unofficial-sigs.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
37
	${INSTALL_MAN} ${WRKSRC}/clamav-unofficial-sigs.8 ${STAGEDIR}${MANPREFIX}/man/man8
38
34
39
	@${MKDIR} ${STAGEDIR}${ETCDIR}
35
	@${MKDIR} ${STAGEDIR}${ETCDIR}
40
	${INSTALL_DATA} ${WRKSRC}/config/master.conf ${STAGEDIR}${ETCDIR}/master.conf.sample
36
	${INSTALL_DATA} ${WRKSRC}/config/master.conf ${STAGEDIR}${ETCDIR}/master.conf.sample
Lines 44-51 Link Here
44
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
40
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
45
	(cd ${WRKSRC} && ${INSTALL_DATA} INSTALL LICENSE README.md ${STAGEDIR}${DOCSDIR})
41
	(cd ${WRKSRC} && ${INSTALL_DATA} INSTALL LICENSE README.md ${STAGEDIR}${DOCSDIR})
46
42
47
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
48
	${INSTALL_DATA} ${WRKSRC}/cron.d/clamav-unofficial-sigs ${STAGEDIR}${EXAMPLESDIR}/clamav-unofficial-sigs-cron
49
	${INSTALL_DATA} ${WRKSRC}/logrotate.d/clamav-unofficial-sigs ${STAGEDIR}${EXAMPLESDIR}/clamav-unofficial-sigs-logrotate
50
51
.include <bsd.port.mk>
43
.include <bsd.port.mk>
(-)clamav-unofficial-sigs/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1464700719
1
TIMESTAMP = 1464704949
2
SHA256 (extremeshok-clamav-unofficial-sigs-5.0.5_GH0.tar.gz) = 2aeba3f281511f5acc1d79b5f3460440cd579c75ae23b28d1dabde8321a87570
2
SHA256 (extremeshok-clamav-unofficial-sigs-5.3.2_GH0.tar.gz) = 3abe1c22133d879318cebc18d3224a820ea1747524425d4a2efd337749596589
3
SIZE (extremeshok-clamav-unofficial-sigs-5.0.5_GH0.tar.gz) = 34027
3
SIZE (extremeshok-clamav-unofficial-sigs-5.3.2_GH0.tar.gz) = 113714
(-)clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh (-38 / +27 lines)
Lines 1-45 Link Here
1
--- clamav-unofficial-sigs.sh.orig	2016-04-02 05:47:26 UTC
1
--- clamav-unofficial-sigs.sh.orig	2016-05-23 23:38:56 UTC
2
+++ clamav-unofficial-sigs.sh
2
+++ clamav-unofficial-sigs.sh
3
@@ -187,7 +187,7 @@ script_version_date="02 April 2016"
3
@@ -1151,7 +1151,7 @@ minimum_required_config_version="65"
4
 minimum_required_config_version="56"
4
 minimum_yara_clamav_version="0.99"
5
 
5
 
6
 #default config files
6
 #default config files
7
-config_dir="/etc/clamav-unofficial-sigs"
7
-config_dir="/etc/clamav-unofficial-sigs"
8
+config_dir="%%PREFIX%%/etc/clamav-unofficial-sigs"
8
+config_dir="/usr/local/etc/clamav-unofficial-sigs"
9
 config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf")
9
 config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf")
10
 
10
 
11
 #Initialise 
11
 #Initialise 
12
@@ -627,6 +627,8 @@ make_signature_database_from_ascii_file 
12
@@ -1879,20 +1879,11 @@ if [ "$sanesecurity_enabled" == "yes" ] 
13
 #Remove the clamav-unofficial-sigs script
13
         xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "="
14
 remove_script () {
14
         xshok_pretty_echo_and_log "Checking for Sanesecurity updates..."
15
 	echo ""
15
 
16
+	pkg_mgr="FreeBSD ports"
16
-        sanesecurity_mirror_ips=$(dig +ignore +short "$sanesecurity_url")
17
+	pkg_rm="pkg delete"
17
-        #add fallback to host if dig returns no records
18
 	if [ -n "$pkg_mgr" -a -n "$pkg_rm" ] ; then
18
-        if [ "$(xshok_array_count  "$sanesecurity_mirror_ips")" -lt 1 ] ; then
19
 		echo "  This script (clamav-unofficial-sigs) was installed on the system"
19
-          sanesecurity_mirror_ips=$(host -t A "$sanesecurity_url" | sed -n '/has address/{s/.*address \([^ ]*\).*/\1/;p;}')
20
 		echo "  via '$pkg_mgr', use '$pkg_rm' to remove the script"
20
-        fi
21
@@ -1175,22 +1177,13 @@ if [ "$sanesecurity_enabled" == "yes" ] 
21
+        sanesecurity_mirror_ips=`host $sanesecurity_url | sed 's/.*\s//'`
22
 		db_file=""
22
 
23
 		xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "="
23
         if [ "$(xshok_array_count  "$sanesecurity_mirror_ips")" -ge "1" ] ; then
24
 
24
           for sanesecurity_mirror_ip in $sanesecurity_mirror_ips ; do
25
-		sanesecurity_mirror_ips=`dig +ignore +short $sanesecurity_url`
25
-            sanesecurity_mirror_name=""
26
-		#add fallback to host if dig returns no records
26
-            sanesecurity_mirror_name=$(dig +short -x "$sanesecurity_mirror_ip" | command sed 's/\.$//')
27
-		if [ `xshok_array_count  "$sanesecurity_mirror_ips"` -lt 1 ] ; then
27
-            #add fallback to host if dig returns no records
28
-			sanesecurity_mirror_ips=`host -t A "$sanesecurity_url" | sed -n '/has address/{s/.*address \([^ ]*\).*/\1/;p}'`
28
-            if [ "$sanesecurity_mirror_name" == "" ] ; then
29
-		fi
29
-              sanesecurity_mirror_name=$(host "$sanesecurity_mirror_ip" | sed -n '/name pointer/{s/.*pointer \([^ ]*\).*\.$/\1/;p;}')
30
+		sanesecurity_mirror_ips=`host $sanesecurity_url | sed 's/.*\s//'`
30
-            fi
31
 
31
+            sanesecurity_mirror_name=`host $sanesecurity_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'`
32
 		if [ `xshok_array_count  "$sanesecurity_mirror_ips"` -ge "1" ] ; then
32
             sanesecurity_mirror_site_info="$sanesecurity_mirror_name $sanesecurity_mirror_ip"
33
 
33
             xshok_pretty_echo_and_log "Sanesecurity mirror site used: $sanesecurity_mirror_site_info"
34
 
34
             $rsync_bin $rsync_output_level $no_motd --files-from="$sanesecurity_include_dbs" -ctuz $connect_timeout --timeout="$rsync_max_time" "rsync://$sanesecurity_mirror_ip/sanesecurity" "$work_dir_sanesecurity" 2>/dev/null
35
 		for sanesecurity_mirror_ip in $sanesecurity_mirror_ips ; do
36
-			sanesecurity_mirror_name=""
37
-			sanesecurity_mirror_name=`dig +short -x $sanesecurity_mirror_ip | command sed 's/\.$//'`
38
-			#add fallback to host if dig returns no records
39
-			if [ "$sanesecurity_mirror_name" == "" ] ; then
40
-				sanesecurity_mirror_name=`host "$sanesecurity_mirror_ip" | sed -n '/name pointer/{s/.*pointer \([^ ]*\).*/\1/;p}'`
41
-			fi
42
+			sanesecurity_mirror_name=`host $sanesecurity_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'`
43
 			sanesecurity_mirror_site_info="$sanesecurity_mirror_name $sanesecurity_mirror_ip"
44
 			xshok_pretty_echo_and_log "Sanesecurity mirror site used: $sanesecurity_mirror_site_info"
45
 			$rsync_bin $rsync_output_level $no_motd --files-from=$sanesecurity_include_dbs -ctuz $connect_timeout --timeout="$rsync_max_time" --stats rsync://$sanesecurity_mirror_ip/sanesecurity $sanesecurity_dir 2>/dev/null
(-)clamav-unofficial-sigs/files/patch-config_os.freebsd.conf (-10 / +5 lines)
Lines 1-16 Link Here
1
--- config/os.freebsd.conf.orig	2016-04-01 23:10:24 UTC
1
--- config/os.freebsd.conf.orig	2016-05-23 23:38:56 UTC
2
+++ config/os.freebsd.conf
2
+++ config/os.freebsd.conf
3
@@ -32,13 +32,8 @@ clamd_pid="/var/run/clamav/clamd.pid"
3
@@ -35,6 +35,8 @@ work_dir="/var/db/clamav-unofficial-sigs
4
 
4
 
5
 work_dir="/var/db/clamav-unofficial-sigs"
5
 log_file_path="/var/log/clamav"
6
 
6
 
7
-log_file_path="/var/log/clamav"
7
+logging_enabled="no"
8
-
8
+
9
 clamd_restart_opt="service clamav-clamd reload"
9
 clamd_restart_opt="service clamav-clamd reload"
10
 
10
 
11
 #clamd_socket="/var/run/clamav/clamd.sock"
11
 #clamd_socket="/var/run/clamav/clamd.sock"
12
 
13
-pkg_mgr="FreeBSD ports"
14
-pkg_rm="pkg remove"
15
-
16
 # https://eXtremeSHOK.com ######################################################
(-)clamav-unofficial-sigs/pkg-plist (-4 / +2 lines)
Lines 1-10 Link Here
1
bin/clamav-unofficial-sigs.sh
1
bin/clamav-unofficial-sigs
2
@sample %%ETCDIR%%/master.conf.sample
2
@sample %%ETCDIR%%/master.conf.sample
3
@sample %%ETCDIR%%/os.conf.sample
3
@sample %%ETCDIR%%/os.conf.sample
4
@sample %%ETCDIR%%/user.conf.sample
4
@sample %%ETCDIR%%/user.conf.sample
5
man/man8/clamav-unofficial-sigs.8.gz
6
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
5
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
7
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
6
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
8
%%PORTDOCS%%%%DOCSDIR%%/README.md
7
%%PORTDOCS%%%%DOCSDIR%%/README.md
9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-cron
8
10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-logrotate

Return to bug 209894