public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - Florian's improved fingerprinting hash algorithm from upstream
@ 2026-11-23 9:25 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:25 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 18c8687d6993231b9b71fe81aa963d98edd70672
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date : 2008-10-28T14:24:04+00:00
Stats : +32/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/18c8687d6993231b9b71fe81aa963d98edd70672?branch=pmatilai-v6
Log:
- Florian's improved fingerprinting hash algorithm from upstream
---
diff --git a/rpm-4.6.0-rc1-fp-hash.patch b/rpm-4.6.0-rc1-fp-hash.patch
new file mode 100644
index 0000000..2bb750f
--- /dev/null
+++ b/rpm-4.6.0-rc1-fp-hash.patch
@@ -0,0 +1,26 @@
+diff --git a/lib/fprint.c b/lib/fprint.c
+index d31a694..b763a38 100644
+--- a/lib/fprint.c
++++ b/lib/fprint.c
+@@ -183,16 +183,13 @@ unsigned int fpHashFunction(const void * key)
+ {
+ const fingerPrint * fp = key;
+ unsigned int hash = 0;
+- char ch;
+- const char * chptr;
++ int j;
+
+- ch = 0;
+- chptr = fp->baseName;
+- while (*chptr != '\0') ch ^= *chptr++;
++ hash = hashFunctionString(fp->baseName);
++ if (fp->subDir) hash ^= hashFunctionString(fp->subDir);
+
+- hash |= ((unsigned)ch) << 24;
+- hash |= (((((unsigned)fp->entry->dev) >> 8) ^ fp->entry->dev) & 0xFF) << 16;
+- hash |= fp->entry->ino & 0xFFFF;
++ hash ^= ((unsigned)fp->entry->dev);
++ for (j=0; j<4; j++) hash ^= ((fp->entry->ino >> (8*j)) & 0xFF) << ((3-j)*8);
+
+ return hash;
+ }
diff --git a/rpm.spec b/rpm.spec
index 0f3dcf4..b2d80dd 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -18,7 +18,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 0.%{snapver}.5
+Release: 0.%{snapver}.6
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -37,6 +37,7 @@ Patch200: rpm-4.6.0-rc1-permit-tab.patch
Patch201: rpm-4.6.0-rc1-skip-equal-nevr.patch
Patch202: rpm-4.6.0-rc1-noarch-subpkg.patch
Patch203: rpm-4.6.0-rc1-defaultdocdir.patch
+Patch204: rpm-4.6.0-rc1-fp-hash.patch
# These are not yet upstream
Patch300: rpm-4.5.90-posttrans.patch
@@ -174,6 +175,7 @@ that will manipulate RPM packages and databases.
%patch201 -p1 -b .skip-equal-nevr
%patch202 -p1 -b .noarch-subpkg
%patch203 -p1 -b .defaultdocdir
+%patch204 -p1 -b .fp-hash
# needs a bit of upstream love first...
#%patch300 -p1 -b .posttrans
@@ -364,6 +366,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Tue Oct 28 2008 Panu Matilainen <pmatilai@redhat.com>
+- Florian's improved fingerprinting hash algorithm from upstream
+
* Sat Oct 25 2008 Panu Matilainen <pmatilai@redhat.com>
- Make noarch sub-packages actually work
- Fix defaultdocdir logic in installplatform to avoid hardwiring mandir
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:25 [rpms/rpm] pmatilai-v6: - Florian's improved fingerprinting hash algorithm from upstream Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox