public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - account for intentionally skipped files when verifying hardlinks (#864622)
Date: Mon, 23 Nov 2026 09:27:57 GMT	[thread overview]
Message-ID: <179542607785.1.4607636132879633952.rpms-rpm-240842c0b06a@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 240842c0b06a1e73de36342a3d110686be8d747f
Author : Panu Matilainen <pmatilai@redhat.com>
Date   : 2012-10-10T10:41:57+03:00
Stats  : +39/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/240842c0b06a1e73de36342a3d110686be8d747f?branch=pmatilai-v6

Log:
- account for intentionally skipped files when verifying hardlinks (#864622)

---
diff --git a/rpm-4.10.1-skipped-hardlinks.patch b/rpm-4.10.1-skipped-hardlinks.patch
new file mode 100644
index 0000000..567480d
--- /dev/null
+++ b/rpm-4.10.1-skipped-hardlinks.patch
@@ -0,0 +1,32 @@
+commit df4eed5debcdc9209e1f5e66d17230861a55a7fc
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Wed Oct 10 10:37:34 2012 +0300
+
+    Filter out skipped files on hardlink checking (RhBug:864622)
+    
+    - Legitimately skipped files (links) must not cause install-errors.
+      This has always been broken, but the errors were completely ignored
+      on install prior to rpm 4.10.
+    - Backported from commit eeea54c76b130da3769ae10f7db2c2fcfb5c57be
+
+diff --git a/lib/fsm.c b/lib/fsm.c
+index e4ffcaf..4840708 100644
+--- a/lib/fsm.c
++++ b/lib/fsm.c
+@@ -1964,12 +1964,14 @@ static int fsmStage(FSM_t fsm, fileStage stage)
+ 	    fsm->links = fsm->li->next;
+ 	    fsm->li->next = NULL;
+ 	    if (fsm->goal == FSM_PKGINSTALL && fsm->li->linksLeft) {
++		rpmfs fs = rpmteGetFileStates(fsmGetTe(fsm));
+ 		for (nlink_t i = 0 ; i < fsm->li->linksLeft; i++) {
+-		    if (fsm->li->filex[i] < 0)
++		    int ix = fsm->li->filex[i];
++		    if (ix < 0 || XFA_SKIPPING(rpmfsGetAction(fs, ix)))
+ 			continue;
+ 		    rc = CPIOERR_MISSING_HARDLINK;
+ 		    if (fsm->failedFile && *fsm->failedFile == NULL) {
+-			fsm->ix = fsm->li->filex[i];
++			fsm->ix = ix;
+ 			if (!fsmMapPath(fsm)) {
+ 	    		    /* Out-of-sync hardlinks handled as sub-state */
+ 			    *fsm->failedFile = fsm->path;

diff --git a/rpm.spec b/rpm.spec
index 39f6c04..79b216c 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}1%{?dist}
+Release: %{?snapver:0.%{snapver}.}2%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.10.x/%{name}-%{srcver}.tar.bz2
@@ -45,6 +45,7 @@ Patch5: rpm-4.9.90-armhfp.patch
 Patch6: rpm-4.9.0-armhfp-logic.patch
 
 # Patches already in upstream
+Patch100: rpm-4.10.1-skipped-hardlinks.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -218,6 +219,8 @@ packages on a system.
 %patch3 -p1 -b .no-man-dirs
 %patch4 -p1 -b .use-gpg2
 
+%patch100 -p1 -b .skipped-hardlinks
+
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
 %patch304 -p1 -b .ldflags
@@ -448,6 +451,9 @@ exit 0
 %doc COPYING doc/librpm/html/*
 
 %changelog
+* Wed Oct 10 2012 Panu Matilainen <pmatilai@redhat.com> - 4.10.1-2
+- account for intentionally skipped files when verifying hardlinks (#864622)
+
 * Wed Oct 03 2012 Panu Matilainen <pmatilai@redhat.com> - 4.10.1-1
 - update to 4.10.1 ((http://rpm.org/wiki/Releases/4.10.1)
 

                 reply	other threads:[~2026-11-23  9:27 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=179542607785.1.4607636132879633952.rpms-rpm-240842c0b06a@fedoraproject.org \
    --to=pmatilai@redhat.com \
    --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