update to 4.4 [release 4.4-1mamba;Sun Jul 25 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 23:38:47 +01:00
parent b73bc3fcca
commit 6a93d74640
4 changed files with 145 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# hashdeep
md5deep computes the MD5, SHA-1, SHA-256, Tiger, or Whirlpool message digest for any number of files while optionally recursively digging through the directory structure.
Can also match input files against lists of known hashes in a variety of formats.

99
hashdeep.spec Normal file
View File

@ -0,0 +1,99 @@
#% define patchl 001
Name: hashdeep
Version: 4.4
Release: 1mamba
Summary: A set of programs to compute MD5, SHA-1, SHA-256 Tiger, Whirlpool message digests
Group: Applications/Security
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/jessek/hashdeep
Source: https://github.com/jessek/hashdeep.git/v%{version}/hashdeep-%{version}.tar.bz2
Patch0: md5deep-4.3-gcc-4.7.patch
Patch1: md5deep-4.4-glibc-2.38.patch
License: Public Domain
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
Provides: md5deep
Obsoletes: md5deep < 4.4
%description
md5deep computes the MD5, SHA-1, SHA-256, Tiger, or Whirlpool message digest for any number of files while optionally recursively digging through the directory structure.
Can also match input files against lists of known hashes in a variety of formats.
%debug_package
%prep
%setup -q -n hashdeep-%{version}
%patch 0 -p1
%patch 1 -p1 -b .glibc-2.38
./bootstrap.sh
%build
%configure
%make
#PREFIX=%{_prefix} MAN=%{_mandir}/man1
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
# \
# PREFIX=%{buildroot}%{_prefix} \
# MAN=%{buildroot}%{_mandir}/man1
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/hashdeep
%{_bindir}/md5deep
%{_bindir}/sha1deep
%{_bindir}/sha256deep
%{_bindir}/tigerdeep
%{_bindir}/whirlpooldeep
%{_mandir}/man1/hashdeep.1.*
%{_mandir}/man1/md5deep.*
%{_mandir}/man1/sha1deep.*
%{_mandir}/man1/sha256deep.*
%{_mandir}/man1/tigerdeep.*
%{_mandir}/man1/whirlpooldeep.*
%doc README
%changelog
* Sun Jul 25 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4-1mamba
- update to 4.4
* Sun Apr 14 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.3-2mamba
- added a patch to workaround a segfault with recent libstdc++6 when invoked with -e option
* Fri Dec 21 2012 Automatic Build System <autodist@mambasoft.it> 4.3-1mamba
- update to 4.3
* Tue Jul 26 2011 Automatic Build System <autodist@mambasoft.it> 3.9.2-1mamba
- automatic update by autodist
* Fri Jul 22 2011 Automatic Build System <autodist@mambasoft.it> 3.9.1-1mamba
- automatic update to 3.0.3.0 by autodist
* Tue Dec 21 2010 Automatic Build System <autodist@mambasoft.it> 3.7-1mamba
- automatic update by autodist
* Mon May 10 2010 Automatic Build System <autodist@mambasoft.it> 3.6-1mamba
- automatic update by autodist
* Mon Jul 13 2009 Automatic Build System <autodist@mambasoft.it> 3.4-1mamba
- update to 3.4
* Wed Dec 12 2007 Aleph0 <aleph0@openmamba.org> 2.0.1-001-1mamba
- update to 2.0.1-001
* Tue Oct 23 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0-1mamba
- update to 2.0
* Thu Sep 14 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.12-1qilnx
- package created by autospec

14
md5deep-4.3-gcc-4.7.patch Normal file
View File

@ -0,0 +1,14 @@
--- md5deep-4.3.patched/src/display.cpp 2013-04-14 18:22:37.512819799 +0200
+++ md5deep-4.3/src/display.cpp 2012-06-05 13:00:57.000000000 +0200
@@ -309,9 +309,9 @@
uint64_t min = seconds/60;
seconds -= min * 60;
- ss << mb_read << "MB of " << fdht->stat_megs() << "MB done, ";
char msg[64];
+ snprintf(msg,sizeof(msg),"%lluMB of %lluMB done, %02"PRIu64":%02"PRIu64":%02"PRIu64" left",
+ mb_read, fdht->stat_megs(), hour, min, seconds);
- snprintf(msg,sizeof(msg),"%02"PRIu64":%02"PRIu64":%02"PRIu64" left", hour, min, seconds);
ss << msg;
}
ss << "\r";

View File

@ -0,0 +1,29 @@
From 6ef69a26126ee4e69a25392fd456b8a66c51dffd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 15 Nov 2016 02:46:55 +0000
Subject: [PATCH] Fix errors found by clang
Fixes errors like
../../git/src/hash.cpp:282:19: error: ordered comparison between pointer and zero ('const unsigned char *' and 'int')
if(fdht->base>0){
~~~~~~~~~~^~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/hash.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hash.cpp b/src/hash.cpp
index 42161579f..52f419b0c 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -279,7 +279,7 @@ void file_data_hasher_t::hash()
MAP_FILE|
#endif
MAP_SHARED,fd,0);
- if(fdht->base>0){
+ if(fdht->base != (void *) -1){
/* mmap is successful, so set the bounds.
* if it is not successful, we default to reading the fd
*/