Compare commits
10 Commits
1ed169c25c
...
9d8142e92f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d8142e92f | ||
|
|
7f61253c68 | ||
|
|
f785e28e5b | ||
|
|
91d6d2bcf7 | ||
|
|
49478f87c1 | ||
|
|
16feab6326 | ||
|
|
c82d18cddd | ||
|
|
5e233df07a | ||
|
|
ddbf825f40 | ||
|
|
0af74ce409 |
@ -0,0 +1,41 @@
|
||||
From 9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksey <rhash.admin@gmail.com>
|
||||
Date: Sun, 31 Oct 2021 02:49:04 +0300
|
||||
Subject: [PATCH] Fix install-gmo target to recompile gmo files only if needed
|
||||
|
||||
---
|
||||
Makefile | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6031e43..c127379 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -293,7 +293,7 @@ clean-bindings:
|
||||
|
||||
clean-local:
|
||||
rm -f *.o $(RHASH_SHARED) $(RHASH_STATIC)
|
||||
- rm -f po/*.gmo po/*.po~
|
||||
+ rm -f po/*.gmo po/*.po~ po/compile-gmo.tag
|
||||
|
||||
distclean: clean-local
|
||||
rm -f config.log config.mak $(SPECFILE) $(LIBRHASH_PC)
|
||||
@@ -309,11 +309,14 @@ update-po:
|
||||
msgmerge -U $$f po/rhash.pot; \
|
||||
done
|
||||
|
||||
-compile-gmo:
|
||||
+po/compile-gmo.tag: $(I18N_FILES)
|
||||
for f in $(I18N_FILES); do \
|
||||
g=`basename $$f .po`; \
|
||||
msgfmt -o po/$$g.gmo $$f; \
|
||||
done
|
||||
+ touch $@
|
||||
+
|
||||
+compile-gmo: po/compile-gmo.tag
|
||||
|
||||
install-gmo: compile-gmo
|
||||
for f in $(I18N_FILES); do \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
From 5796c94b1eba4fb7407868555e630b409340b78e Mon Sep 17 00:00:00 2001
|
||||
From: Aleksey <rhash.admin@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 21:23:34 +0300
|
||||
Subject: [PATCH] fix incorrect total message in check-embedded mode
|
||||
|
||||
---
|
||||
hash_check.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hash_check.c b/hash_check.c
|
||||
index 0c0ed84..0ed88ce 100644
|
||||
--- a/hash_check.c
|
||||
+++ b/hash_check.c
|
||||
@@ -1147,7 +1147,7 @@ static int check_embedded_crc32(file_t* file)
|
||||
log_error_file_t(&rhash_data.out_file);
|
||||
res = -2;
|
||||
} else if (!rhash_data.stop_flags) {
|
||||
- if (res >= 0)
|
||||
+ if (res == 0)
|
||||
rhash_data.ok++;
|
||||
else if (res == -1 && errno == ENOENT)
|
||||
rhash_data.miss++;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
26
Fix-bug-with-hash-options-in-check-mode.patch
Normal file
26
Fix-bug-with-hash-options-in-check-mode.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 79a1a0b3d267893c40ac31192b20e20969a3a79c Mon Sep 17 00:00:00 2001
|
||||
From: Aleksey <rhash.admin@gmail.com>
|
||||
Date: Sun, 12 Dec 2021 16:27:55 +0300
|
||||
Subject: [PATCH] Fix bug with hash options in --check mode
|
||||
|
||||
---
|
||||
hash_check.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hash_check.c b/hash_check.c
|
||||
index 4cffdc6..4d44d0d 100644
|
||||
--- a/hash_check.c
|
||||
+++ b/hash_check.c
|
||||
@@ -1262,7 +1262,8 @@ static void set_parser_flags_by_file_extension(struct hash_parser_ext* parser)
|
||||
struct file_ext ext;
|
||||
if (!extract_uppercase_file_ext(&ext, parser->hash_file))
|
||||
return;
|
||||
- parser->expected_hash_mask = bsd_hash_name_to_id(ext.buffer, ext.length);
|
||||
+ if (!parser->expected_hash_mask)
|
||||
+ parser->expected_hash_mask = bsd_hash_name_to_id(ext.buffer, ext.length);
|
||||
if (ext.length == 3 && memcmp(ext.buffer, "SFV", 3) == 0)
|
||||
parser->is_sfv = 1;
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
39
RHash-1.4.2-sw.patch
Executable file
39
RHash-1.4.2-sw.patch
Executable file
@ -0,0 +1,39 @@
|
||||
diff -Naur RHash-1.4.2.org/configure RHash-1.4.2.sw/configure
|
||||
--- RHash-1.4.2.org/configure 2022-02-25 19:11:47.060000000 +0000
|
||||
+++ RHash-1.4.2.sw/configure 2022-02-25 19:19:40.480000000 +0000
|
||||
@@ -402,6 +402,7 @@
|
||||
ia64) HOST_ARCH=ia64 ;;
|
||||
macppc|ppc*|Power*) HOST_ARCH=ppc ;;
|
||||
alpha) HOST_ARCH=alpha ;;
|
||||
+ sw_64) HOST_ARCH=sw_64 ;;
|
||||
sun4*|sparc*) HOST_ARCH=sparc ;;
|
||||
parisc*|hppa*|9000*) HOST_ARCH=hppa ;;
|
||||
aarch64*) HOST_ARCH=aarch64 ;;
|
||||
diff -Naur RHash-1.4.2.org/librhash/byte_order.h RHash-1.4.2.sw/librhash/byte_order.h
|
||||
--- RHash-1.4.2.org/librhash/byte_order.h 2022-02-25 19:11:47.060000000 +0000
|
||||
+++ RHash-1.4.2.sw/librhash/byte_order.h 2022-02-25 19:18:16.820000000 +0000
|
||||
@@ -60,7 +60,7 @@
|
||||
/* try detecting endianness by CPU */
|
||||
#ifdef RHASH_BYTE_ORDER
|
||||
#elif defined(CPU_IA32) || defined(CPU_X64) || defined(__ia64) || defined(__ia64__) || \
|
||||
- defined(__alpha__) || defined(_M_ALPHA) || defined(vax) || defined(MIPSEL) || \
|
||||
+ defined(__alpha__) || defined(_M_ALPHA) || defined(__sw_64__) || defined(_M_SW_64) || defined(vax) || defined(MIPSEL) || \
|
||||
defined(_ARM_) || defined(__arm__)
|
||||
# define RHASH_BYTE_ORDER RHASH_BYTE_ORDER_LE
|
||||
#elif defined(__sparc) || defined(__sparc__) || defined(sparc) || \
|
||||
diff -Naur RHash-1.4.2.org/librhash/test_hashes.h RHash-1.4.2.sw/librhash/test_hashes.h
|
||||
--- RHash-1.4.2.org/librhash/test_hashes.h 2022-02-25 19:11:47.070000000 +0000
|
||||
+++ RHash-1.4.2.sw/librhash/test_hashes.h 2022-02-25 19:19:15.490000000 +0000
|
||||
@@ -89,6 +89,12 @@
|
||||
#ifdef __ia64__
|
||||
" __ia64__"
|
||||
#endif
|
||||
+#ifdef __sw_64__
|
||||
+ " __sw_64__"
|
||||
+#endif
|
||||
+#ifdef _M_SW_64
|
||||
+ " _M_SW_64"
|
||||
+#endif
|
||||
#ifdef __alpha__
|
||||
" __alpha__"
|
||||
#endif
|
||||
28
rhash.spec
28
rhash.spec
@ -1,11 +1,17 @@
|
||||
Name: rhash
|
||||
Version: 1.4.2
|
||||
Release: 1
|
||||
Release: 5
|
||||
Summary: Great utility for computing hash sums
|
||||
License: MIT
|
||||
URL: https://github.com/rhash/RHash
|
||||
Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{version}.tar.gz
|
||||
|
||||
#References: https://github.com/rhash/RHash/commit/79a1a0b3d267893c40ac31192b20e20969a3a79c
|
||||
Patch0: Fix-bug-with-hash-options-in-check-mode.patch
|
||||
Patch1: RHash-1.4.2-sw.patch
|
||||
Patch2: 0001-fix-incorrect-total-message-in-check-embedded-mode.patch
|
||||
Patch3: 0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
@ -30,7 +36,13 @@ Summary: Documentation for rhash
|
||||
Documentation for rhash
|
||||
|
||||
%prep
|
||||
%autosetup -n RHash-%{version}
|
||||
%setup -n RHash-%{version}
|
||||
%patch0 -p1
|
||||
%ifarch sw_64
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
sed -i -e '/^INSTALL_SHARED/s/644/755/' librhash/Makefile
|
||||
|
||||
%build
|
||||
@ -63,6 +75,18 @@ make test-shared
|
||||
%{_mandir}/man1/*.1*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 6 2023 caofei <caofei@xfusion.com> - 1.4.2-5
|
||||
- Fix install-gmo target to recompile gmo files only if needed
|
||||
|
||||
* Fri Jan 6 2023 caofei<caofei@xfusion.com> - 1.4.2-4
|
||||
- fix incorrect total message in check-embedded mode
|
||||
|
||||
* Tue Oct 25 2022 wuzx<wuzx1226@qq.com> - 1.4.2-3
|
||||
- Add sw64 architecture
|
||||
|
||||
* Fri Oct 21 2022 zhangruifang <zhangruifang1@h-partners.com> - 1.4.2-2
|
||||
- Fix bug with hash options in check mode
|
||||
|
||||
* Tue Nov 30 2021 zoulin <zoulin13@huawei.com> - 1.4.2-1
|
||||
- Upgrade to 1.4.2
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user