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: - fix recursion of directories with trailing slash in file list (#722474)
Date: Mon, 23 Nov 2026 09:27:17 GMT [thread overview]
Message-ID: <179542603783.1.6658398558844063068.rpms-rpm-c81abc1f8e4a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : c81abc1f8e4a45bb0d75e47391069b84d6ca4664
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2011-07-19T11:22:49+03:00
Stats : +50/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/c81abc1f8e4a45bb0d75e47391069b84d6ca4664?branch=pmatilai-v6
Log:
- fix recursion of directories with trailing slash in file list (#722474)
---
diff --git a/rpm-4.9.1-recurse-dir.patch b/rpm-4.9.1-recurse-dir.patch
new file mode 100644
index 0000000..48482ab
--- /dev/null
+++ b/rpm-4.9.1-recurse-dir.patch
@@ -0,0 +1,43 @@
+commit 27c56c58209ee7c890f34429e030bfdb39105084
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Mon Jun 27 12:41:39 2011 +0300
+
+ Remove ugly isDir recurse prevention hack on build
+
+ - We know if we're already fts-walking by the way addFile() gets called,
+ dont corrupt fl->isDir for no good reason.
+ (cherry picked from commit aedbf1d63f94cee312b283503c8deb1ede1895a1)
+
+diff --git a/build/files.c b/build/files.c
+index b4b893a..edba92a 100644
+--- a/build/files.c
++++ b/build/files.c
+@@ -1394,8 +1394,8 @@ static rpmRC addFile(FileList fl, const char * diskPath,
+ }
+ }
+
+- if ((! fl->isDir) && S_ISDIR(statp->st_mode)) {
+-/* FIX: fl->buildRoot may be NULL */
++ /* Don't recurse into explicit %dir, don't double-recurse from fts */
++ if ((fl->isDir != 1) && (statp == &statbuf) && S_ISDIR(statp->st_mode)) {
+ return recurseDir(fl, diskPath);
+ }
+
+@@ -1529,8 +1529,6 @@ static rpmRC recurseDir(FileList fl, const char * diskPath)
+ int myFtsOpts = (FTS_COMFOLLOW | FTS_NOCHDIR | FTS_PHYSICAL);
+ rpmRC rc = RPMRC_FAIL;
+
+- fl->isDir = 1; /* Keep it from following myftw() again */
+-
+ ftsSet[0] = (char *) diskPath;
+ ftsSet[1] = NULL;
+ ftsp = Fts_open(ftsSet, myFtsOpts, NULL);
+@@ -1563,8 +1561,6 @@ static rpmRC recurseDir(FileList fl, const char * diskPath)
+ }
+ (void) Fts_close(ftsp);
+
+- fl->isDir = 0;
+-
+ return rc;
+ }
+
diff --git a/rpm.spec b/rpm.spec
index cdb8da9..0864776 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.9.x/%{name}-%{srcver}.tar.bz2
@@ -40,6 +40,7 @@ Patch3: rpm-4.8.0-no-man-dirs.patch
Patch4: rpm-4.8.1-use-gpg2.patch
# Patches already in upstream
+Patch200: rpm-4.9.1-recurse-dir.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -207,6 +208,8 @@ packages on a system.
%patch3 -p1 -b .no-man-dirs
%patch4 -p1 -b .use-gpg2
+%patch200 -p1 -b .recurse-dir
+
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
%patch303 -p1 -b .debuginfo-allnames
@@ -423,6 +426,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Tue Jul 19 2011 Panu Matilainen <pmatilai@redhat.com> - 4.9.1-2
+- fix recursion of directories with trailing slash in file list (#722474)
+
* Fri Jul 15 2011 Panu Matilainen <pmatilai@redhat.com> - 4.9.1-1
- update to 4.9.1 (http://rpm.org/wiki/Releases/4.9.1)
- drop no longer needed patches
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=179542603783.1.6658398558844063068.rpms-rpm-c81abc1f8e4a@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