From 7f8da56ec779814ce89ac7645b1bf96bdc348c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Tue, 12 Sep 2023 06:21:53 +0200 Subject: [PATCH] fix find not obeying -ignore_readdir_race in symlink_loop --- ...4.9.0-ignore_readdir_race-symlink_loop.patch | 17 +++++++++++++++++ findutils.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 findutils-4.9.0-ignore_readdir_race-symlink_loop.patch diff --git a/findutils-4.9.0-ignore_readdir_race-symlink_loop.patch b/findutils-4.9.0-ignore_readdir_race-symlink_loop.patch new file mode 100644 index 0000000..f6ac52d --- /dev/null +++ b/findutils-4.9.0-ignore_readdir_race-symlink_loop.patch @@ -0,0 +1,17 @@ +# cherry picked from https://savannah.gnu.org/bugs/?45930 +diff --git a/find/ftsfind.c b/find/ftsfind.c +index 0d96c4ca..6aeac28c 100644 +--- a/find/ftsfind.c ++++ b/find/ftsfind.c +@@ -401,6 +401,10 @@ consider_visiting (FTS *p, FTSENT *ent) + } + else + { ++ /* Ignore unlink() error for vanished files. */ ++ if (ENOENT == ent->fts_errno && options.ignore_readdir_race) ++ return; ++ + nonfatal_target_file_error (ent->fts_errno, ent->fts_path); + /* Continue despite the error, as file name without stat info + * might be better than not even processing the file name. This + diff --git a/findutils.spec b/findutils.spec index 8117c50..723b6c2 100644 --- a/findutils.spec +++ b/findutils.spec @@ -1,7 +1,7 @@ Summary: The GNU versions of find utilities (find and xargs) Name: findutils Version: 4.9.0 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 License: GPL-3.0-or-later URL: https://www.gnu.org/software/findutils/ @@ -22,6 +22,9 @@ Patch4: findutils-4.6.0-test-lock.patch # implement the -noleaf option of find (#1252549) Patch5: findutils-4.6.0-leaf-opt.patch +# fix find not obeying -ignore_readdir_race in symlink_loop (#2232278) +Patch6: findutils-4.9.0-ignore_readdir_race-symlink_loop.patch + Conflicts: filesystem < 3 Provides: /bin/find Provides: bundled(gnulib) @@ -111,6 +114,9 @@ rm -f %{buildroot}%{_infodir}/dir %{_infodir}/find-maint.info.* %changelog +* Tue Sep 12 2023 Lukáš Zaoral - 1:4.9.0-6 +- fix find not obeying -ignore_readdir_race in symlink_loop (rhbz#2232278) + * Wed Jul 19 2023 Fedora Release Engineering - 1:4.9.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild