diff --git a/deprecated-md4-function.patch b/deprecated-md4-function.patch new file mode 100644 index 0000000..ab40ce3 --- /dev/null +++ b/deprecated-md4-function.patch @@ -0,0 +1,58 @@ +From 5f9eb49ab02822c3f8dd9012b41dd74ec1e2cb17 Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Fri, 10 Feb 2023 14:50:01 +0800 +Subject: [PATCH] deprecated md4 function + +--- + test/test.js | 35 ----------------------------------- + 1 file changed, 35 deletions(-) + +diff --git a/test/test.js b/test/test.js +index 4c99a4d..51c40bc 100644 +--- a/test/test.js ++++ b/test/test.js +@@ -33,41 +33,6 @@ describe('hash_file module', function(){ + fs.unlink(filePath, done) + }) + +- describe('md4', function() { +- it('should generate a md4 hash without error', function(done){ +- console.time('md4') +- hash_file(filePath, 'md4', function(err, hash) { +- console.timeEnd('md4') +- assert.ok(!err, err) +- assert.ok(hash) +- assert.equal(32, hash.length) +- done() +- }) +- }) +- it('should generate the same md4 hash multiple times for the same file', function(done) { +- hash_file(filePath, 'md4', function(err, hash_first) { +- assert.ok(!err, err) +- hash_file(filePath, 'md4', function(err, hash_second) { +- assert.ok(!err, err) +- assert.equal(hash_first, hash_second) +- done() +- }) +- }) +- }) +- it('should generate a different hash for a modified file', function(done) { +- hash_file(filePath, 'md4', function(err, hash_first) { +- assert.ok(!err, err) +- fs.writeFile(filePath, 'md4 data', function(err) { +- assert.ok(!err, err) +- hash_file(filePath, 'md4', function(err, hash_second) { +- assert.ok(!err, err) +- assert.notEqual(hash_first, hash_second) +- done() +- }) +- }) +- }) +- }) +- }) + describe('md5', function() { + it('should generate a md5 hash without error', function(done){ + console.time('md5') +-- +2.27.0 + diff --git a/nodejs-hash_file.spec b/nodejs-hash_file.spec index 4c3adab..393fc6a 100644 --- a/nodejs-hash_file.spec +++ b/nodejs-hash_file.spec @@ -2,11 +2,12 @@ %global srcname hash_file Name: nodejs-%{srcname} Version: 0.1.1 -Release: 1 +Release: 2 Summary: A simple utility for getting a hash of a file License: MIT URL: https://github.com/timoxley/hash_file Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz +Patch1: deprecated-md4-function.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging @@ -18,6 +19,7 @@ BuildRequires: npm(mocha) %prep %setup -q -n package +%patch1 -p1 rm -rf node_modules/ %build @@ -38,5 +40,8 @@ mocha -t 60000 ./test/test.js %{nodejs_sitelib}/%{srcname} %changelog +* Fri Feb 10 2023 Ge Wang - 0.1.1-2 +- Deprected md4 function due to openssl updated to verson 3.0.8 + * Thu Aug 20 2020 wangxiao - 0.1.1-1 - Package init