git: 9410ef41aea5 - main - security/rkhunter: use sha256 instead of sha256sum

Stefan Eßer se at FreeBSD.org
Sat Jul 17 21:25:00 UTC 2021


The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9410ef41aea53511b785e86dad115ab73b2397c9

commit 9410ef41aea53511b785e86dad115ab73b2397c9
Author:     Stefan Eßer <se at FreeBSD.org>
AuthorDate: 2021-07-17 21:17:14 +0000
Commit:     Stefan Eßer <se at FreeBSD.org>
CommitDate: 2021-07-17 21:17:14 +0000

    security/rkhunter: use sha256 instead of sha256sum
    
    Coreutils compatible versions of the hash commands have been added
    to 14-CURRENT and 13-STABLE. These were preferred by rkhunter, when
    found, but without adjustment of the position of the hash in the
    generated output.
    
    Instead of trying to adjust for different positions of the hash,
    this patch removes the preference for sha256sum over sha256 and
    restores the behavior this script had before sha256sum has been
    made available in recent FreeBSD versions.
    
    Tested by:      Łukasz Wąsikowski (maintainer)
---
 security/rkhunter/Makefile                   |  1 +
 security/rkhunter/files/patch-files_rkhunter | 18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/security/rkhunter/Makefile b/security/rkhunter/Makefile
index 20d1c88990e5..c16e2468c56b 100644
--- a/security/rkhunter/Makefile
+++ b/security/rkhunter/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	rkhunter
 PORTVERSION=	1.4.6
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	SF
 
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,6 +1,20 @@
---- 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


More information about the dev-commits-ports-main mailing list