public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - Florian's improved fingerprinting hash algorithm from upstream
Date: Mon, 23 Nov 2026 09:25:15 GMT	[thread overview]
Message-ID: <179542591552.1.9396570381161281098.rpms-rpm-18c8687d6993@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-11-23  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542591552.1.9396570381161281098.rpms-rpm-18c8687d6993@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox