Sync from SUSE:SLFO:Main findutils revision bcb71a67702e067592583602871fc325

This commit is contained in:
Adrian Schröter 2025-02-07 18:26:12 +01:00
parent 4c71c37765
commit 06ef5d2f14
4 changed files with 81 additions and 13 deletions

View File

@ -0,0 +1,56 @@
Index: findutils-4.10.0/find/ftsfind.c
===================================================================
--- findutils-4.10.0.orig/find/ftsfind.c
+++ findutils-4.10.0/find/ftsfind.c
@@ -188,27 +188,6 @@ visit (FTS *p, FTSENT *ent, struct stat
}
}
-static const char*
-partial_quotearg_n (int n, char *s, size_t len, enum quoting_style style)
-{
- if (0 == len)
- {
- return quotearg_n_style (n, style, "");
- }
- else
- {
- char saved;
- const char *result;
-
- saved = s[len];
- s[len] = 0;
- result = quotearg_n_style (n, style, s);
- s[len] = saved;
- return result;
- }
-}
-
-
/* We've detected a file system loop. This is caused by one of
* two things:
*
@@ -218,7 +197,7 @@ partial_quotearg_n (int n, char *s, size
*
* 2. We have hit a real cycle in the directory hierarchy. In this
* case, we issue a diagnostic message (POSIX requires this) and we
- * skip that directory entry.
+ * will skip that directory entry.
*/
static void
issue_loop_warning (FTSENT * ent)
@@ -241,12 +220,8 @@ issue_loop_warning (FTSENT * ent)
*/
error (0, 0,
_("File system loop detected; "
- "%s is part of the same file system loop as %s."),
- safely_quote_err_filename (0, ent->fts_path),
- partial_quotearg_n (1,
- ent->fts_cycle->fts_path,
- ent->fts_cycle->fts_pathlen,
- options.err_quoting_style));
+ "the following directory is part of the cycle: %s"),
+ safely_quote_err_filename (0, ent->fts_path));
}
}

View File

@ -9,8 +9,8 @@
Index: doc/find.texi Index: doc/find.texi
=================================================================== ===================================================================
--- doc/find.texi.orig --- a/doc/find.texi.orig
+++ doc/find.texi +++ b/doc/find.texi
@@ -1607,6 +1607,10 @@ them. @@ -1607,6 +1607,10 @@ them.
There are two ways to avoid searching certain filesystems. One way is There are two ways to avoid searching certain filesystems. One way is
to tell @code{find} to only search one filesystem: to tell @code{find} to only search one filesystem:
@ -24,8 +24,8 @@ Index: doc/find.texi
Don't descend directories on other filesystems. These options are Don't descend directories on other filesystems. These options are
Index: find/defs.h Index: find/defs.h
=================================================================== ===================================================================
--- find/defs.h.orig --- a/find/defs.h.orig
+++ find/defs.h +++ b/find/defs.h
@@ -557,6 +557,9 @@ struct options @@ -557,6 +557,9 @@ struct options
/* If true, don't cross filesystem boundaries. */ /* If true, don't cross filesystem boundaries. */
bool stay_on_filesystem; bool stay_on_filesystem;
@ -38,8 +38,8 @@ Index: find/defs.h
*/ */
Index: find/find.1 Index: find/find.1
=================================================================== ===================================================================
--- find/find.1.orig --- a/find/find.1.orig
+++ find/find.1 +++ b/find/find.1
@@ -654,6 +654,9 @@ to stat them; this gives a significant i @@ -654,6 +654,9 @@ to stat them; this gives a significant i
.IP "\-version, \-\-version" .IP "\-version, \-\-version"
Print the \fBfind\fR version number and exit. Print the \fBfind\fR version number and exit.
@ -52,8 +52,8 @@ Index: find/find.1
Index: find/ftsfind.c Index: find/ftsfind.c
=================================================================== ===================================================================
--- find/ftsfind.c.orig --- a/find/ftsfind.c.orig
+++ find/ftsfind.c +++ b/find/ftsfind.c
@@ -433,6 +433,12 @@ consider_visiting (FTS *p, FTSENT *ent) @@ -433,6 +433,12 @@ consider_visiting (FTS *p, FTSENT *ent)
} }
} }
@ -69,8 +69,8 @@ Index: find/ftsfind.c
/* this is the preorder visit, but user said -depth */ /* this is the preorder visit, but user said -depth */
Index: find/parser.c Index: find/parser.c
=================================================================== ===================================================================
--- find/parser.c.orig --- a/find/parser.c.orig
+++ find/parser.c +++ b/find/parser.c
@@ -150,6 +150,7 @@ static bool parse_used (const s @@ -150,6 +150,7 @@ static bool parse_used (const s
static bool parse_user (const struct parser_table*, char *argv[], int *arg_ptr); static bool parse_user (const struct parser_table*, char *argv[], int *arg_ptr);
static bool parse_wholename (const struct parser_table*, char *argv[], int *arg_ptr); static bool parse_wholename (const struct parser_table*, char *argv[], int *arg_ptr);
@ -106,8 +106,8 @@ Index: find/parser.c
options.ignore_readdir_race = true; options.ignore_readdir_race = true;
Index: find/util.c Index: find/util.c
=================================================================== ===================================================================
--- find/util.c.orig --- a/find/util.c.orig
+++ find/util.c +++ b/find/util.c
@@ -181,7 +181,8 @@ Positional options (always true):\n\ @@ -181,7 +181,8 @@ Positional options (always true):\n\
HTL (_("\n\ HTL (_("\n\
Normal options (always true, specified before other expressions):\n\ Normal options (always true, specified before other expressions):\n\

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Feb 4 08:43:24 UTC 2025 - pgajdos@suse.com
- do not crash when file system loop was encountered [bsc#1231472]
- added patches
fix https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=e5d6eb919b9
+ findutils-avoid-crash-system-loop.patch
- modified patches
% findutils-xautofs.patch (p1)
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jun 1 20:37:18 UTC 2024 - Bernhard Voelker <mail@bernhard-voelker.de> Sat Jun 1 20:37:18 UTC 2024 - Bernhard Voelker <mail@bernhard-voelker.de>

View File

@ -41,6 +41,8 @@ Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring
# adds a new option -xautofs to find to not descend into directories on autofs file systems # adds a new option -xautofs to find to not descend into directories on autofs file systems
Patch0: findutils-xautofs.patch Patch0: findutils-xautofs.patch
# https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=e5d6eb919b9
Patch1: findutils-avoid-crash-system-loop.patch
BuildRequires: automake BuildRequires: automake
@ -65,7 +67,7 @@ useful for finding things on your system.
%lang_package %lang_package
%prep %prep
%autosetup -p0 %autosetup -p1
%build %build
%configure \ %configure \