Sync from SUSE:ALP:Source:Standard:1.0 findutils revision 6a394b6c64a9a307123e021ada4457cb

This commit is contained in:
Adrian Schröter 2025-03-14 12:45:19 +01:00
parent 6393f8a919
commit 3e402d8e3f
4 changed files with 81 additions and 14 deletions

View File

@ -0,0 +1,56 @@
Index: findutils-4.9.0/find/ftsfind.c
===================================================================
--- findutils-4.9.0.orig/find/ftsfind.c
+++ findutils-4.9.0/find/ftsfind.c
@@ -190,27 +190,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:
*
@@ -220,7 +199,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)
@@ -243,12 +222,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
===================================================================
--- doc/find.texi.orig
+++ doc/find.texi
--- a/doc/find.texi.orig
+++ b/doc/find.texi
@@ -1608,6 +1608,10 @@ them.
There are two ways to avoid searching certain filesystems. One way is
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
Index: find/defs.h
===================================================================
--- find/defs.h.orig
+++ find/defs.h
--- a/find/defs.h.orig
+++ b/find/defs.h
@@ -562,6 +562,9 @@ struct options
/* If true, don't cross filesystem boundaries. */
bool stay_on_filesystem;
@ -38,8 +38,8 @@ Index: find/defs.h
*/
Index: find/find.1
===================================================================
--- find/find.1.orig
+++ find/find.1
--- a/find/find.1.orig
+++ b/find/find.1
@@ -638,6 +638,9 @@ to stat them; this gives a significant i
.IP "\-version, \-\-version"
Print the \fBfind\fR version number and exit.
@ -52,8 +52,8 @@ Index: find/find.1
Index: find/ftsfind.c
===================================================================
--- find/ftsfind.c.orig
+++ find/ftsfind.c
--- a/find/ftsfind.c.orig
+++ b/find/ftsfind.c
@@ -435,6 +435,12 @@ consider_visiting (FTS *p, FTSENT *ent)
}
}
@ -69,8 +69,8 @@ Index: find/ftsfind.c
/* this is the preorder visit, but user said -depth */
Index: find/parser.c
===================================================================
--- find/parser.c.orig
+++ find/parser.c
--- a/find/parser.c.orig
+++ b/find/parser.c
@@ -139,6 +139,7 @@ static bool parse_used (const s
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);
@ -106,8 +106,8 @@ Index: find/parser.c
options.ignore_readdir_race = true;
Index: find/util.c
===================================================================
--- find/util.c.orig
+++ find/util.c
--- a/find/util.c.orig
+++ b/find/util.c
@@ -183,7 +183,8 @@ Positional options (always true):\n\
HTL (_("\n\
Normal options (always true, specified before other expressions):\n\

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Feb 4 08:54:35 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)
-------------------------------------------------------------------
Tue Dec 27 10:36:38 UTC 2022 - Ludwig Nussel <lnussel@suse.com>

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
# adds a new option -xautofs to find to not descend into directories on autofs file systems
Patch0: findutils-xautofs.patch
# https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=e5d6eb919b9
Patch1: findutils-avoid-crash-system-loop.patch
BuildRequires: automake
@ -65,8 +67,7 @@ useful for finding things on your system.
%lang_package
%prep
%setup -q
%patch0
%autosetup -p1
%build
%if 0%{?qemu_user_space_build}