diff --git a/security/rkhunter/Makefile b/security/rkhunter/Makefile index 20d1c88990e5..c16e2468c56b 100644 --- a/security/rkhunter/Makefile +++ b/security/rkhunter/Makefile @@ -1,55 +1,56 @@ # Created by: Radim Kolar PORTNAME= rkhunter PORTVERSION= 1.4.6 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF MAINTAINER= lukasz@wasikowski.net COMMENT= Rootkit detection tool LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/files/LICENSE OPTIONS_DEFINE= LSOF NMAP DOCS OPTIONS_DEFAULT=LSOF RUN_DEPENDS+= p5-Digest-SHA1>=0:security/p5-Digest-SHA1 USES= perl5 shebangfix SHEBANG_FILES= files/check_modules.pl files/filehashsha.pl \ files/stat.pl NO_ARCH= yes NO_BUILD= yes SUB_FILES= 415.${PORTNAME} PORTDOCS= ACKNOWLEDGMENTS CHANGELOG FAQ LICENSE README LSOF_RUN_DEPENDS= lsof:sysutils/lsof NMAP_RUN_DEPENDS= nmap:security/nmap post-patch: @${REINPLACE_CMD} -i '' -e 's|{SHAREDIR}/man/man8|{PREFIX}/man/man8|g' \ ${WRKSRC}/installer.sh @${REINPLACE_CMD} -i '' -e 's|RKHPREFIX|${PREFIX}|g' \ ${WRKSRC}/files/${PORTNAME}.conf do-install: cd ${WRKSRC} && ./installer.sh --layout custom ${STAGEDIR}${PREFIX} --install ${INSTALL_MAN} ${WRKSRC}/files/${PORTNAME}.8 \ ${STAGEDIR}${MAN8PREFIX}/man/man8 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/security ${INSTALL_SCRIPT} ${WRKDIR}/415.${PORTNAME} ${STAGEDIR}${PREFIX}/etc/periodic/security @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/files/|} ${STAGEDIR}${DOCSDIR} @${REINPLACE_CMD} -i '' -e 's|${STAGEDIR}||g' \ ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf ${INSTALL_DATA} ${WRKSRC}/files/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample ${INSTALL_DATA} -m 640 ${WRKSRC}/files/programs_bad.dat ${STAGEDIR}${PREFIX}/var/lib/${PORTNAME}/db/programs_bad.dat.sample ${INSTALL_DATA} -m 640 ${WRKSRC}/files/mirrors.dat ${STAGEDIR}${PREFIX}/var/lib/${PORTNAME}/db/mirrors.dat.sample .for f in cn de en tr tr.utf8 zh zh.utf8 ja ${INSTALL_DATA} -m 640 ${WRKSRC}/files/i18n/${f} ${STAGEDIR}${PREFIX}/var/lib/${PORTNAME}/db/i18n/${f}.sample .endfor .include diff --git a/security/rkhunter/files/patch-files_rkhunter b/security/rkhunter/files/patch-files_rkhunter index bd70c3a276f4..616c589ae112 100644 --- a/security/rkhunter/files/patch-files_rkhunter +++ b/security/rkhunter/files/patch-files_rkhunter @@ -1,21 +1,35 @@ ---- files/rkhunter.orig 2014-03-12 20:54:55 UTC +--- files/rkhunter.orig 2018-02-24 23:08:27 UTC +++ files/rkhunter -@@ -7275,6 +7275,9 @@ download_file() { +@@ -4750,7 +4750,12 @@ get_sha_hash_function() { + return + fi + +- HFUNC=`find_cmd sha${SHA_SIZE}sum` ++ case ${OPERATING_SYSTEM} in ++ FreeBSD) ++ HFUNC=`find_cmd sha${SHA_SIZE}` ;; ++ *) ++ HFUNC=`find_cmd sha${SHA_SIZE}sum` ;; ++ esac + + if [ -z "${HFUNC}" ]; then + HFUNC=`find_cmd sha${SHA_SIZE}` +@@ -7522,6 +7527,9 @@ download_file() { rm -f "${OUTPUT_FILE}" >/dev/null 2>&1 case "${RKHWEBCMD_BASE}" in + fetch) + CMD="${RKHWEBCMD} ${RKHWEBCMD_OPTS} -q -o \"${OUTPUT_FILE}\" ${MIRROR}${URL} 2>/dev/null" + ;; wget) CMD="${RKHWEBCMD} ${RKHWEBCMD_OPTS} -q -O \"${OUTPUT_FILE}\" ${MIRROR}${URL} 2>/dev/null" ;; @@ -18557,7 +18560,7 @@ REQCMDS="awk cat chmod chown cp cut date egrep grep he # List of commands used to download files from the web. This list is # used by the '--update' and '--versioncheck' options. Preferred commands # are listed first. This can be overridden by the config file. -WEBCMDLIST="wget curl elinks links lynx bget GET" +WEBCMDLIST="fetch wget curl elinks links lynx bget GET" RKHWEBCMD="" RKHWEBCMD_OPTS=""