FreeBSD Bugzilla – Attachment 168770 Details for
Bug 208326
[UPDATE] security/clamav-unofficial-sigs - update to new version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
clamav-unofficial-sigs 5.0.3 (eXtremeSHOK fork)
clamav-unofficial-sigs-5.0.3.diff (text/plain), 14.95 KB, created by
Lukasz Wasikowski
on 2016-03-29 22:20:38 UTC
(
hide
)
Description:
clamav-unofficial-sigs 5.0.3 (eXtremeSHOK fork)
Filename:
MIME Type:
Creator:
Lukasz Wasikowski
Created:
2016-03-29 22:20:38 UTC
Size:
14.95 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 412139) >+++ Makefile (working copy) >@@ -2,49 +2,50 @@ > # $FreeBSD$ > > PORTNAME= clamav-unofficial-sigs >-PORTVERSION= 3.7.2 >-PORTREVISION= 2 >+PORTVERSION= 5.0.3 > CATEGORIES= security >-MASTER_SITES= SF/unofficial-sigs/ > >-MAINTAINER= sf@maxempire.com >+MAINTAINER= lukasz@wasikowski.net > COMMENT= Update script for third-party ClamAV databases > >+LICENSE= BSD3CLAUSE >+ > RUN_DEPENDS= clamscan:${PORTSDIR}/security/clamav \ > rsync:${PORTSDIR}/net/rsync \ > curl:${PORTSDIR}/ftp/curl \ >- gpg:${PORTSDIR}/security/gnupg >+ gpg:${PORTSDIR}/security/gnupg \ >+ bash:${PORTSDIR}/shells/bash > >-USES= perl5 >+USE_GITHUB= yes >+USES= perl5 shebangfix > USE_PERL5= run > NO_BUILD= yes >+SHEBANG_FILES= clamav-unofficial-sigs.sh > >+GH_ACCOUNT= extremeshok >+ > SUB_FILES= pkg-message > >-SED_CONF= -e 's|%%CLAM_DBS%%|/var/db/clamav|g' \ >- -e 's|%%CLAMD_PID%%|/var/run/clamav/clamd.pid|g' \ >- -e 's|%%CLAMD_SOCKET%%|/var/run/clamav/clamd.sock|g' \ >- -e 's|%%START_CLAMD%%|${PREFIX}/etc/rc.d/clamav-clamd start|g' \ >- -e 's|%%WORK_DIR%%|/var/db/clamav-unofficial-sigs|g' >- > OPTIONS_DEFINE= DOCS EXAMPLES > > post-patch: >- @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/clamav-unofficial-sigs.sh >- @${REINPLACE_CMD} ${SED_CONF} ${WRKSRC}/clamav-unofficial-sigs.conf >- @${REINPLACE_CMD} ${SED_CONF} ${WRKSRC}/clamd-status.sh >+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/clamav-unofficial-sigs.sh ${WRKSRC}/cron.d/clamav-unofficial-sigs > > do-install: > ${INSTALL_SCRIPT} ${WRKSRC}/clamav-unofficial-sigs.sh ${STAGEDIR}${PREFIX}/bin > ${INSTALL_MAN} ${WRKSRC}/clamav-unofficial-sigs.8 ${STAGEDIR}${MANPREFIX}/man/man8 >- ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs.conf ${STAGEDIR}${PREFIX}/etc/clamav-unofficial-sigs.conf.sample > >+ @${MKDIR} ${STAGEDIR}${ETCDIR} >+ >+ ${INSTALL_DATA} ${WRKSRC}/config/master.conf ${STAGEDIR}${ETCDIR}/master.conf.sample >+ ${INSTALL_DATA} ${WRKSRC}/config/os.freebsd.conf ${STAGEDIR}${ETCDIR}/os.conf.sample >+ ${INSTALL_DATA} ${WRKSRC}/config/user.conf ${STAGEDIR}${ETCDIR}/user.conf.sample >+ > @${MKDIR} ${STAGEDIR}${DOCSDIR} >- (cd ${WRKSRC} && ${INSTALL_DATA} CHANGELOG INSTALL LICENSE README ${STAGEDIR}${DOCSDIR}) >+ (cd ${WRKSRC} && ${INSTALL_DATA} INSTALL LICENSE README.md ${STAGEDIR}${DOCSDIR}) > > @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} >- ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs-cron ${STAGEDIR}${EXAMPLESDIR} >- ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs-logrotate ${STAGEDIR}${EXAMPLESDIR} >- ${INSTALL_SCRIPT} ${WRKSRC}/clamd-status.sh ${STAGEDIR}${EXAMPLESDIR} >+ ${INSTALL_DATA} ${WRKSRC}/cron.d/clamav-unofficial-sigs ${STAGEDIR}${EXAMPLESDIR}/clamav-unofficial-sigs-cron >+ ${INSTALL_DATA} ${WRKSRC}/logrotate.d/clamav-unofficial-sigs ${STAGEDIR}${EXAMPLESDIR}/clamav-unofficial-sigs-logrotate > > .include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 412139) >+++ distinfo (working copy) >@@ -1,2 +1,2 @@ >-SHA256 (clamav-unofficial-sigs-3.7.2.tar.gz) = 96e98e6e4434c5950fa9831c6a43236fed7eabae44beded16171305cf3f9bdb9 >-SIZE (clamav-unofficial-sigs-3.7.2.tar.gz) = 38549 >+SHA256 (extremeshok-clamav-unofficial-sigs-5.0.3_GH0.tar.gz) = 7883df89cb1e4fda9213021b2bef2a399541bb3b72564a48d9ff724984caafe5 >+SIZE (extremeshok-clamav-unofficial-sigs-5.0.3_GH0.tar.gz) = 31085 >Index: files/patch-clamav-unofficial-sigs.conf >=================================================================== >--- files/patch-clamav-unofficial-sigs.conf (revision 412139) >+++ files/patch-clamav-unofficial-sigs.conf (nonexistent) >@@ -1,53 +0,0 @@ >---- clamav-unofficial-sigs.conf 2013-08-27 18:08:25.000000000 +0200 >-+++ clamav-unofficial-sigs.conf.patched 2013-09-04 16:19:11.000000000 +0200 >-@@ -50,10 +50,10 @@ >- >- # Set path to ClamAV database files location. If unsure, check >- # your clamd.conf file for the "DatabaseDirectory" path setting. >--clam_dbs="/var/lib/clamav" >-+clam_dbs="%%CLAM_DBS%%" >- >- # Set path to clamd.pid file (see clamd.conf for path location). >--clamd_pid="/var/run/clamd.pid" >-+clamd_pid="%%CLAMD_PID%%" >- >- # To enable "ham" (non-spam) directory scanning and removal of >- # signatures that trigger on ham messages, uncomment the following >-@@ -84,7 +84,7 @@ >- # the script will still run). You will also need to set the correct >- # path to your clamd socket file (if unsure of the path, check the >- # "LocalSocket" setting in your clamd.conf file for socket location). >--#clamd_socket="/var/run/clamd.socket" >-+#clamd_socket="%%CLAMD_SOCKET%%" >- >- # If you would like to attempt to restart ClamD if detected not running, >- # uncomment the next 2 lines. Confirm the path to the "clamd_lock" file >-@@ -94,8 +94,8 @@ >- # NOTE: these 2 variables are dependant on the "clamd_socket" variable >- # shown above - if not enabled, then the following 2 variables will be >- # ignored, whether enabled or not. >--#clamd_lock="/var/lock/subsys/clamd" >--#start_clamd="service clamd start" >-+#clamd_lock="" >-+#start_clamd="%%START_CLAMD%%" >- >- # Enable or disable download time randomization. This allows the script to >- # be executed via cron, but the actual database file checking will pause >-@@ -227,7 +227,7 @@ >- # Set working directory paths (edit to meet your own needs). If these >- # directories do not exist, the script will attempt to create them. >- # Top level working directory path: >--work_dir="/usr/unofficial-dbs" #Top level working directory >-+work_dir="%%WORK_DIR%%" #Top level working directory >- # Sub-directory names: >- ss_dir="$work_dir/ss-dbs" # Sanesecurity sub-directory >- si_dir="$work_dir/si-dbs" # SecuriteInfo sub-directory >-@@ -252,7 +252,7 @@ >- comment_silence="no" # Default is "no" to report script comments >- >- # Log update information to '$log_file_path/$log_file_name'. >--enable_logging="yes" >-+enable_logging="no" >- log_file_path="/var/log" >- log_file_name="clamav-unofficial-sigs.log" >- > >Property changes on: files/patch-clamav-unofficial-sigs.conf >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-clamav-unofficial-sigs.sh >=================================================================== >--- files/patch-clamav-unofficial-sigs.sh (revision 412139) >+++ files/patch-clamav-unofficial-sigs.sh (working copy) >@@ -1,32 +1,29 @@ >---- clamav-unofficial-sigs.sh 2013-08-27 18:08:25.000000000 +0200 >-+++ clamav-unofficial-sigs.sh.patched 2014-12-06 23:55:50.000000000 +0100 >-@@ -16,7 +16,7 @@ >- # # >- ################################################################################ >+--- clamav-unofficial-sigs.sh.orig 2016-03-27 09:47:03 UTC >++++ clamav-unofficial-sigs.sh >+@@ -157,7 +157,7 @@ minimum_required_config_version="55" >+ version_date="27 March 2016" > >--default_config="/etc/clamav-unofficial-sigs.conf" >-+default_config="%%PREFIX%%/etc/clamav-unofficial-sigs.conf" >+ #default config files >+-config_dir="/etc/clamav-unofficial-sigs" >++config_dir="%%PREFIX%%/etc/clamav-unofficial-sigs" >+ config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf") > >- version="v3.7.2 (updated 2013-08-25)" >- output_ver=" >-@@ -418,6 +418,8 @@ >- exit >- ;; >- r) no_default_config >-+ pkg_mgr="FreeBSD ports" >-+ pkg_rm="pkg_delete" >- if [ -n "$pkg_mgr" -a -n "$pkg_rm" ] >- then >- echo " This script (clamav-unofficial-sigs) was installed on the system" >-@@ -1016,9 +1018,9 @@ >- comment "======================================================================" >- comment "Sanesecurity Database & GPG Signature File Updates" >- comment "======================================================================" >-- ss_mirror_ips=`dig +ignore +short $ss_url` >-+ ss_mirror_ips=`host $ss_url | sed 's/.*\s//'` >- for ss_mirror_ip in $ss_mirror_ips ; do >-- ss_mirror_name=`dig +short -x $ss_mirror_ip | sed 's/\.$//'` >-+ ss_mirror_name=`host $ss_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'` >- ss_mirror_site_info="$ss_mirror_name $ss_mirror_ip" >- comment "" >- comment "Sanesecurity mirror site used: $ss_mirror_site_info" >+ >+@@ -530,6 +530,8 @@ make_signature_database_from_ascii_file >+ #Remove the clamav-unofficial-sigs script >+ remove_script () { >+ echo "" >++ pkg_mgr="FreeBSD ports" >++ pkg_rm="pkg remove" >+ if [ -n "$pkg_mgr" -a -n "$pkg_rm" ] ; then >+ echo " This script (clamav-unofficial-sigs) was installed on the system" >+ echo " via '$pkg_mgr', use '$pkg_rm' to remove the script" >+@@ -801,7 +803,7 @@ while true; do >+ -g | --gpg-verify ) gpg_verify_specific_sanesecurity_database_file; exit; break ;; >+ -i | --information ) output_system_configuration_information; exit; break ;; >+ -m | --make-database ) make_signature_database_from_ascii_file; exit; break ;; >+- -r | --remove-script ) make_signature_database_from_ascii_file; exit; break ;; >++ -r | --remove-script ) remove_script; exit; break ;; >+ -t | --test-database ) clamscan_integrity_test_specific_database_file; exit; break ;; >+ -o | --output-triggered ) output_signatures_triggered_during_ham_directory_scan; exit; break ;; >+ -w | --whitelist ) add_signature_whitelist_entry; exit; break ;; >Index: files/patch-clamd-status.sh >=================================================================== >--- files/patch-clamd-status.sh (revision 412139) >+++ files/patch-clamd-status.sh (nonexistent) >@@ -1,31 +0,0 @@ >---- clamd-status.sh 2013-08-27 18:08:25.000000000 +0200 >-+++ clamd-status.sh.patched 2013-09-04 16:09:58.000000000 +0200 >-@@ -24,7 +24,7 @@ >- export PATH >- >- # Set path to clamd.pid file (see clamd.conf for path location). >--clamd_pid="/var/run/clamav/clamd.pid" >-+clamd_pid="%%CLAMD_PID%%" >- >- # If running clamd in "LocalSocket" mode (*NOT* in TCP/IP mode), and >- # either "SOcket Cat" (socat) or the "IO::Socket::UNIX" perl module >-@@ -34,7 +34,7 @@ >- # the script will still run). You will also need to set the correct >- # path to your clamd socket file (if unsure of the path, check the >- # "LocalSocket" setting in your clamd.conf file for socket location). >--clamd_socket="/var/run/clamav/clamd.sock" >-+clamd_socket="%%CLAMD_SOCKET%%" >- >- # If you would like to attemtp to restart ClamD if detected not running, >- # uncomment the next 2 lines. Confirm the path to the "clamd_lock" file >-@@ -44,8 +44,8 @@ >- # NOTE: these 2 variables are dependant on the "clamd_socket" variable >- # shown above - if not enabled, then the following 2 variables will be >- # ignored, whether enabled or not. >--clamd_lock="/var/lock/subsys/clamd" >--start_clamd="service clamd start" >-+clamd_lock="" >-+start_clamd="%%START_CLAMD%%" >- >- # To only report issues, set the following variable to "yes". >- only_report_issues="yes" > >Property changes on: files/patch-clamd-status.sh >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-cron.d_clamav-unofficial-sigs >=================================================================== >--- files/patch-cron.d_clamav-unofficial-sigs (nonexistent) >+++ files/patch-cron.d_clamav-unofficial-sigs (working copy) >@@ -0,0 +1,8 @@ >+--- cron.d/clamav-unofficial-sigs.orig 2016-03-26 00:54:25 UTC >++++ cron.d/clamav-unofficial-sigs >+@@ -22,4 +22,4 @@ >+ # 60 - 600 seconds. Adjust the cron start time, user account to run the >+ # script under, and path information shown below to meet your own needs. >+ >+-45 * * * * root /bin/bash /usr/local/bin/clamav-unofficial-sigs.sh > /dev/null >++45 * * * * root %%PREFIX%%/bin/bash %%PREFIX%%/bin/clamav-unofficial-sigs.sh > /dev/null > >Property changes on: files/patch-cron.d_clamav-unofficial-sigs >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-logrotate.d_clamav-unofficial-sigs >=================================================================== >--- files/patch-logrotate.d_clamav-unofficial-sigs (nonexistent) >+++ files/patch-logrotate.d_clamav-unofficial-sigs (working copy) >@@ -0,0 +1,21 @@ >+--- logrotate.d/clamav-unofficial-sigs.orig 2016-03-26 00:57:47 UTC >++++ logrotate.d/clamav-unofficial-sigs >+@@ -14,14 +14,14 @@ >+ # >+ ################## >+ >+-/var/log/clamav-unofficial-sigs/clamav-unofficial-sigs.log { >++/var/log/clamav/clamav-unofficial-sigs.log { >+ weekly >+ rotate 4 >+ missingok >+ notifempty >+ compress >+ # Redhat / CentOS 6 >+- create 0644 clam clam >+-# Debian / Ubuntu >+-# create 0644 clamav clamav >++# create 0644 clam clam >++# Debian / Ubuntu / FreeBSD >++ create 0644 clamav clamav >+ } > >Property changes on: files/patch-logrotate.d_clamav-unofficial-sigs >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/pkg-message.in >=================================================================== >--- files/pkg-message.in (revision 412139) >+++ files/pkg-message.in (working copy) >@@ -3,13 +3,18 @@ > In order to start using clamav-unofficial-sigs, you need to configure > it first. A sample configuration file has been installed to: > >-%%PREFIX%%/etc/clamav-unofficial-sigs.conf.sample >+%%ETCDIR%%/user.conf.sample > >-Modify it according to your needs and copy to: >+Copy it to: > >-%%PREFIX%%/etc/clamav-unofficial-sigs.conf >+%%ETCDIR%%/user.conf > >+and modify it according to your needs. Don't forget to uncomment >+user_configuration_complete="yes" >+ > To run the script periodically by cron, you also need to add it to >-your crontab. >+your crontab. Example crontab and logrotate files are in: > >+%%EXAMPLESDIR%% >+ > ********************************************************************** >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 412139) >+++ pkg-plist (working copy) >@@ -1,10 +1,10 @@ > bin/clamav-unofficial-sigs.sh >-etc/clamav-unofficial-sigs.conf.sample >+@sample %%ETCDIR%%/master.conf.sample >+@sample %%ETCDIR%%/os.conf.sample >+@sample %%ETCDIR%%/user.conf.sample > man/man8/clamav-unofficial-sigs.8.gz >-%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG > %%PORTDOCS%%%%DOCSDIR%%/INSTALL > %%PORTDOCS%%%%DOCSDIR%%/LICENSE >-%%PORTDOCS%%%%DOCSDIR%%/README >+%%PORTDOCS%%%%DOCSDIR%%/README.md > %%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-cron > %%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-logrotate >-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamd-status.sh
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208326
:
168684
|
168770
|
168771
|
168772
|
168799
|
168812
|
168813
|
168816
|
168828