From owner-dev-commits-ports-all@freebsd.org Sat Jul 17 21:25:00 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B24865C1C6; Sat, 17 Jul 2021 21:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GS1ND1bfDz559H; Sat, 17 Jul 2021 21:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DCE617D89; Sat, 17 Jul 2021 21:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16HLP0Es095471; Sat, 17 Jul 2021 21:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16HLP02H095470; Sat, 17 Jul 2021 21:25:00 GMT (envelope-from git) Date: Sat, 17 Jul 2021 21:25:00 GMT Message-Id: <202107172125.16HLP02H095470@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 9410ef41aea5 - main - security/rkhunter: use sha256 instead of sha256sum MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9410ef41aea53511b785e86dad115ab73b2397c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2021 21:25:00 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=9410ef41aea53511b785e86dad115ab73b2397c9 commit 9410ef41aea53511b785e86dad115ab73b2397c9 Author: Stefan Eßer AuthorDate: 2021-07-17 21:17:14 +0000 Commit: Stefan Eßer 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