Compare commits
No commits in common. "c8s" and "c8-beta" have entirely different histories.
1
.findutils.metadata
Normal file
1
.findutils.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
f18e8aaee3f3d4173a1f598001003be8706d28b0 SOURCES/findutils-4.6.0.tar.gz
|
||||||
@ -1 +0,0 @@
|
|||||||
1
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
/findutils-4.*.*.tar.gz
|
SOURCES/findutils-4.6.0.tar.gz
|
||||||
|
|||||||
@ -1,19 +1,19 @@
|
|||||||
From cd653102f401f91748c3f038be4d38ddacc2d7db Mon Sep 17 00:00:00 2001
|
From 17e470dc1acca4824b70328d733d5f99c12d0d65 Mon Sep 17 00:00:00 2001
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
Date: Wed, 3 Jul 2024 10:22:49 +0200
|
Date: Wed, 11 May 2011 16:46:45 +0200
|
||||||
Subject: [PATCH] findutils-4.4.2-xautofs.patch
|
Subject: [PATCH 3/4] findutils-4.4.2-xautofs.patch
|
||||||
|
|
||||||
---
|
---
|
||||||
doc/find.texi | 4 ++++
|
doc/find.texi | 4 ++++
|
||||||
find/defs.h | 3 +++
|
find/defs.h | 3 +++
|
||||||
find/find.1 | 3 +++
|
find/find.1 | 3 +++
|
||||||
find/ftsfind.c | 11 +++++++++--
|
find/ftsfind.c | 6 ++++++
|
||||||
find/parser.c | 11 ++++++++++-
|
find/parser.c | 11 ++++++++++-
|
||||||
find/util.c | 1 +
|
find/util.c | 1 +
|
||||||
6 files changed, 30 insertions(+), 3 deletions(-)
|
6 files changed, 27 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
diff --git a/doc/find.texi b/doc/find.texi
|
diff --git a/doc/find.texi b/doc/find.texi
|
||||||
index b32db8c..1691d2d 100644
|
index c584298..9731b71 100644
|
||||||
--- a/doc/find.texi
|
--- a/doc/find.texi
|
||||||
+++ b/doc/find.texi
|
+++ b/doc/find.texi
|
||||||
@@ -1446,6 +1446,10 @@ them.
|
@@ -1446,6 +1446,10 @@ them.
|
||||||
@ -28,7 +28,7 @@ index b32db8c..1691d2d 100644
|
|||||||
@deffnx Option -mount
|
@deffnx Option -mount
|
||||||
Don't descend directories on other filesystems. These options are
|
Don't descend directories on other filesystems. These options are
|
||||||
diff --git a/find/defs.h b/find/defs.h
|
diff --git a/find/defs.h b/find/defs.h
|
||||||
index ba0b855..7e6d4bb 100644
|
index 11d1d00..f95ce72 100644
|
||||||
--- a/find/defs.h
|
--- a/find/defs.h
|
||||||
+++ b/find/defs.h
|
+++ b/find/defs.h
|
||||||
@@ -557,6 +557,9 @@ struct options
|
@@ -557,6 +557,9 @@ struct options
|
||||||
@ -42,7 +42,7 @@ index ba0b855..7e6d4bb 100644
|
|||||||
* no longer exists by the time we get around to processing it.
|
* no longer exists by the time we get around to processing it.
|
||||||
*/
|
*/
|
||||||
diff --git a/find/find.1 b/find/find.1
|
diff --git a/find/find.1 b/find/find.1
|
||||||
index 7b141b8..a36a0bc 100644
|
index e851f82..a4799ff 100644
|
||||||
--- a/find/find.1
|
--- a/find/find.1
|
||||||
+++ b/find/find.1
|
+++ b/find/find.1
|
||||||
@@ -520,6 +520,9 @@ to stat them; this gives a significant increase in search speed.
|
@@ -520,6 +520,9 @@ to stat them; this gives a significant increase in search speed.
|
||||||
@ -56,27 +56,15 @@ index 7b141b8..a36a0bc 100644
|
|||||||
Don't descend directories on other filesystems.
|
Don't descend directories on other filesystems.
|
||||||
|
|
||||||
diff --git a/find/ftsfind.c b/find/ftsfind.c
|
diff --git a/find/ftsfind.c b/find/ftsfind.c
|
||||||
index 414327b..6620bdb 100644
|
index 9fdb8ef..bd7cc37 100644
|
||||||
--- a/find/ftsfind.c
|
--- a/find/ftsfind.c
|
||||||
+++ b/find/ftsfind.c
|
+++ b/find/ftsfind.c
|
||||||
@@ -331,8 +331,8 @@ show_outstanding_execdirs (FILE *fp)
|
@@ -485,6 +485,12 @@ consider_visiting (FTS *p, FTSENT *ent)
|
||||||
static void
|
|
||||||
consider_visiting (FTS *p, FTSENT *ent)
|
|
||||||
{
|
|
||||||
- struct stat statbuf;
|
|
||||||
- mode_t mode;
|
|
||||||
+ struct stat statbuf = {0};
|
|
||||||
+ mode_t mode = 0;
|
|
||||||
int ignore, isdir;
|
|
||||||
|
|
||||||
if (options.debug_options & DebugSearch)
|
|
||||||
@@ -485,6 +485,13 @@ consider_visiting (FTS *p, FTSENT *ent)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (options.bypass_autofs
|
+ if (options.bypass_autofs &&
|
||||||
+ && 0 == get_statinfo (ent->fts_path, ent->fts_name, &statbuf)
|
+ 0 == strcmp ("autofs", filesystem_type (&statbuf, ent->fts_name)))
|
||||||
+ && 0 == strcmp ("autofs", filesystem_type (&statbuf, ent->fts_name)))
|
|
||||||
+ {
|
+ {
|
||||||
+ fts_set(p, ent, FTS_SKIP); /* descend no further */
|
+ fts_set(p, ent, FTS_SKIP); /* descend no further */
|
||||||
+ }
|
+ }
|
||||||
@ -85,7 +73,7 @@ index 414327b..6620bdb 100644
|
|||||||
{
|
{
|
||||||
/* this is the preorder visit, but user said -depth */
|
/* this is the preorder visit, but user said -depth */
|
||||||
diff --git a/find/parser.c b/find/parser.c
|
diff --git a/find/parser.c b/find/parser.c
|
||||||
index b57cdda..91e914a 100644
|
index 52a1ef6..995aec3 100644
|
||||||
--- a/find/parser.c
|
--- a/find/parser.c
|
||||||
+++ b/find/parser.c
|
+++ b/find/parser.c
|
||||||
@@ -146,6 +146,7 @@ static bool parse_user (const struct parser_table*, char *argv[], int *
|
@@ -146,6 +146,7 @@ static bool parse_user (const struct parser_table*, char *argv[], int *
|
||||||
@ -113,22 +101,22 @@ index b57cdda..91e914a 100644
|
|||||||
puts (_("\
|
puts (_("\
|
||||||
tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\
|
tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\
|
||||||
-cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n\
|
-cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n\
|
||||||
@@ -2682,6 +2684,13 @@ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
|
@@ -2683,6 +2685,13 @@ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||||
return parse_noop (entry, argv, arg_ptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+static bool
|
static bool
|
||||||
+parse_xautofs (const struct parser_table* entry, char **argv, int *arg_ptr)
|
+parse_xautofs (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||||
+{
|
+{
|
||||||
+ options.bypass_autofs = true;
|
+ options.bypass_autofs = true;
|
||||||
+ return parse_noop (entry, argv, arg_ptr);
|
+ return parse_noop (entry, argv, arg_ptr);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
static bool
|
+static bool
|
||||||
parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr)
|
parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||||
{
|
{
|
||||||
|
options.ignore_readdir_race = true;
|
||||||
diff --git a/find/util.c b/find/util.c
|
diff --git a/find/util.c b/find/util.c
|
||||||
index 5ffe140..3448a67 100644
|
index 8577396..4d45f84 100644
|
||||||
--- a/find/util.c
|
--- a/find/util.c
|
||||||
+++ b/find/util.c
|
+++ b/find/util.c
|
||||||
@@ -1017,6 +1017,7 @@ set_option_defaults (struct options *p)
|
@@ -1017,6 +1017,7 @@ set_option_defaults (struct options *p)
|
||||||
@ -140,5 +128,5 @@ index 5ffe140..3448a67 100644
|
|||||||
|
|
||||||
if (p->posixly_correct)
|
if (p->posixly_correct)
|
||||||
--
|
--
|
||||||
2.45.2
|
1.7.4.4
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Summary: The GNU versions of find utilities (find and xargs)
|
Summary: The GNU versions of find utilities (find and xargs)
|
||||||
Name: findutils
|
Name: findutils
|
||||||
Version: 4.6.0
|
Version: 4.6.0
|
||||||
Release: 24%{?dist}
|
Release: 22%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
@ -55,9 +55,6 @@ Patch14: findutils-4.6.0-ignore_readdir_race-symlink_loop.patch
|
|||||||
# manpage of find is incomplete regarding printf options (#1882695)
|
# manpage of find is incomplete regarding printf options (#1882695)
|
||||||
Patch15: findutils-4.6.0-improve-printf-Ak-description.patch
|
Patch15: findutils-4.6.0-improve-printf-Ak-description.patch
|
||||||
|
|
||||||
# simplify leaf optimization for XFS (RHEL-109249)
|
|
||||||
Patch16: findutils-4.6.0-leaf-opt-xfs.patch
|
|
||||||
|
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
Conflicts: filesystem < 3
|
Conflicts: filesystem < 3
|
||||||
@ -159,12 +156,6 @@ fi
|
|||||||
%{_infodir}/find-maint.info.gz
|
%{_infodir}/find-maint.info.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Sep 03 2025 Lukáš Zaoral <lzaoral@redhat.com> - 1:4.6.0-24
|
|
||||||
- simplify leaf optimization for XFS (RHEL-109249)
|
|
||||||
|
|
||||||
* Thu Jul 04 2024 Lukáš Zaoral <lzaoral@redhat.com> - 1:4.6.0-23
|
|
||||||
- fix autofs patch when stat was not performed (RHEL-45720)
|
|
||||||
|
|
||||||
* Mon Aug 21 2023 Lukáš Zaoral <lzaoral@redhat.com> - 1:4.6.0-22
|
* Mon Aug 21 2023 Lukáš Zaoral <lzaoral@redhat.com> - 1:4.6.0-22
|
||||||
- improve description of printf options in find manpage (#1882695)
|
- improve description of printf options in find manpage (#1882695)
|
||||||
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
srpm $1
|
|
||||||
mcd $BUILDDIR/$1
|
|
||||||
sed -i~ -e "s,locate/Makefile locate/testsuite/Makefile ,," $SRC/${1}-*/configure
|
|
||||||
FINDLIBS="-lselinux -ldl" $SRC/${1}-*/configure $TCONFIGARGS
|
|
||||||
sed -i~ -e "s/ locate / /" Makefile
|
|
||||||
notparallel
|
|
||||||
test -d tools/gnulib/lib && make $J V=1 -C tools/gnulib/lib
|
|
||||||
make $J V=1
|
|
||||||
make $J install DESTDIR=${ROOTFS}
|
|
||||||
@ -1,164 +0,0 @@
|
|||||||
From b9f9ed14bda93ecb407129b69e6476813c250046 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Wed, 15 Apr 2020 20:50:32 -0700
|
|
||||||
Subject: [PATCH] fts: remove NOSTAT_LEAF_OPTIMIZATION
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
It caused ‘find’ and ‘du’ to dump core, and it was useful
|
|
||||||
only for obsolescent Linux filesystems anyway. Problem reported in:
|
|
||||||
https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html
|
|
||||||
Quite possibly there is still a serious underlying fts bug with
|
|
||||||
tight-loop-check and mutating file systems, but if so this patch
|
|
||||||
should cause the bug to be triggered less often.
|
|
||||||
* lib/fts.c (enum leaf_optimization): Remove
|
|
||||||
NOSTAT_LEAF_OPTIMIZATION, as it’s problematic.
|
|
||||||
(S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed.
|
|
||||||
(leaf_optimization): Remove special cases for ReiserFS and XFS.
|
|
||||||
(fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code.
|
|
||||||
* lib/fts_.h (struct _ftsent.fts_n_dirs_remaining):
|
|
||||||
Remove. All uses removed.
|
|
||||||
|
|
||||||
Upstream-commit: 47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d
|
|
||||||
Signed-off-by: Lukáš Zaoral <lzaoral@redhat.com>
|
|
||||||
---
|
|
||||||
gl/lib/fts.c | 56 ++++++++-------------------------------------------
|
|
||||||
gl/lib/fts_.h | 5 -----
|
|
||||||
2 files changed, 8 insertions(+), 53 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gl/lib/fts.c b/gl/lib/fts.c
|
|
||||||
index ed3f815..1886ab2 100644
|
|
||||||
--- a/gl/lib/fts.c
|
|
||||||
+++ b/gl/lib/fts.c
|
|
||||||
@@ -470,7 +470,6 @@ fts_open (char * const *argv,
|
|
||||||
if ((parent = fts_alloc(sp, "", 0)) == NULL)
|
|
||||||
goto mem2;
|
|
||||||
parent->fts_level = FTS_ROOTPARENTLEVEL;
|
|
||||||
- parent->fts_n_dirs_remaining = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The classic fts implementation would call fts_stat with
|
|
||||||
@@ -658,9 +657,8 @@ fts_close (FTS *sp)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Minimum link count of a traditional Unix directory. When leaf
|
|
||||||
- optimization is OK and MIN_DIR_NLINK <= st_nlink, then st_nlink is
|
|
||||||
- an upper bound on the number of subdirectories (counting "." and
|
|
||||||
- ".."). */
|
|
||||||
+ optimization is OK and a directory's st_nlink == MIN_DIR_NLINK,
|
|
||||||
+ then the directory has no subdirectories. */
|
|
||||||
enum { MIN_DIR_NLINK = 2 };
|
|
||||||
|
|
||||||
/* Whether leaf optimization is OK for a directory. */
|
|
||||||
@@ -669,12 +667,8 @@ enum leaf_optimization
|
|
||||||
/* st_nlink is not reliable for this directory's subdirectories. */
|
|
||||||
NO_LEAF_OPTIMIZATION,
|
|
||||||
|
|
||||||
- /* Leaf optimization is OK, but is not useful for avoiding stat calls. */
|
|
||||||
- OK_LEAF_OPTIMIZATION,
|
|
||||||
-
|
|
||||||
- /* Leaf optimization is not only OK: it is useful for avoiding
|
|
||||||
- stat calls, because dirent.d_type does not work. */
|
|
||||||
- NOSTAT_LEAF_OPTIMIZATION
|
|
||||||
+ /* st_nlink == 2 means the directory lacks subdirectories. */
|
|
||||||
+ OK_LEAF_OPTIMIZATION
|
|
||||||
};
|
|
||||||
|
|
||||||
#if defined __linux__ \
|
|
||||||
@@ -687,9 +681,7 @@ enum leaf_optimization
|
|
||||||
# define S_MAGIC_CIFS 0xFF534D42
|
|
||||||
# define S_MAGIC_NFS 0x6969
|
|
||||||
# define S_MAGIC_PROC 0x9FA0
|
|
||||||
-# define S_MAGIC_REISERFS 0x52654973
|
|
||||||
# define S_MAGIC_TMPFS 0x1021994
|
|
||||||
-# define S_MAGIC_XFS 0x58465342
|
|
||||||
|
|
||||||
# ifdef HAVE___FSWORD_T
|
|
||||||
typedef __fsword_t fsword;
|
|
||||||
@@ -810,23 +802,15 @@ dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Given an FTS entry P for a directory with descriptor DIR_FD,
|
|
||||||
- return true if it is both useful and valid to apply leaf optimization.
|
|
||||||
- The optimization is useful only for file systems that lack usable
|
|
||||||
- dirent.d_type info. The optimization is valid if an st_nlink value
|
|
||||||
- of at least MIN_DIR_NLINK is an upper bound on the number of
|
|
||||||
- subdirectories of D, counting "." and ".." as subdirectories.
|
|
||||||
+ return whether it is valid to apply leaf optimization.
|
|
||||||
+ The optimization is valid if a directory's st_nlink value equal
|
|
||||||
+ to MIN_DIR_NLINK means the directory has no subdirectories.
|
|
||||||
DIR_FD is negative if unavailable. */
|
|
||||||
static enum leaf_optimization
|
|
||||||
leaf_optimization (FTSENT const *p, int dir_fd)
|
|
||||||
{
|
|
||||||
switch (filesystem_type (p, dir_fd))
|
|
||||||
{
|
|
||||||
- /* List here the file system types that may lack usable dirent.d_type
|
|
||||||
- info, yet for which the optimization does apply. */
|
|
||||||
- case S_MAGIC_REISERFS:
|
|
||||||
- case S_MAGIC_XFS: /* XFS lacked it until 2013-08-22 commit. */
|
|
||||||
- return NOSTAT_LEAF_OPTIMIZATION;
|
|
||||||
-
|
|
||||||
case 0:
|
|
||||||
/* Leaf optimization is unsafe if the file system type is unknown. */
|
|
||||||
FALLTHROUGH;
|
|
||||||
@@ -1051,26 +1035,7 @@ check_for_dir:
|
|
||||||
if (p->fts_info == FTS_NSOK)
|
|
||||||
{
|
|
||||||
if (p->fts_statp->st_size == FTS_STAT_REQUIRED)
|
|
||||||
- {
|
|
||||||
- FTSENT *parent = p->fts_parent;
|
|
||||||
- if (parent->fts_n_dirs_remaining == 0
|
|
||||||
- && ISSET(FTS_NOSTAT)
|
|
||||||
- && ISSET(FTS_PHYSICAL)
|
|
||||||
- && (leaf_optimization (parent, sp->fts_cwd_fd)
|
|
||||||
- == NOSTAT_LEAF_OPTIMIZATION))
|
|
||||||
- {
|
|
||||||
- /* nothing more needed */
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- p->fts_info = fts_stat(sp, p, false);
|
|
||||||
- if (S_ISDIR(p->fts_statp->st_mode)
|
|
||||||
- && p->fts_level != FTS_ROOTLEVEL
|
|
||||||
- && 0 < parent->fts_n_dirs_remaining
|
|
||||||
- && parent->fts_n_dirs_remaining != (nlink_t) -1)
|
|
||||||
- parent->fts_n_dirs_remaining--;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ p->fts_info = fts_stat(sp, p, false);
|
|
||||||
else
|
|
||||||
fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED);
|
|
||||||
}
|
|
||||||
@@ -1851,11 +1816,6 @@ err: memset(sbp, 0, sizeof(struct stat));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (S_ISDIR(sbp->st_mode)) {
|
|
||||||
- p->fts_n_dirs_remaining
|
|
||||||
- = ((sbp->st_nlink < MIN_DIR_NLINK
|
|
||||||
- || p->fts_level <= FTS_ROOTLEVEL)
|
|
||||||
- ? -1
|
|
||||||
- : sbp->st_nlink - (ISSET (FTS_SEEDOT) ? 0 : MIN_DIR_NLINK));
|
|
||||||
if (ISDOT(p->fts_name)) {
|
|
||||||
/* Command-line "." and ".." are real directories. */
|
|
||||||
return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT);
|
|
||||||
diff --git a/gl/lib/fts_.h b/gl/lib/fts_.h
|
|
||||||
index 9603946..be12f6d 100644
|
|
||||||
--- a/gl/lib/fts_.h
|
|
||||||
+++ b/gl/lib/fts_.h
|
|
||||||
@@ -227,11 +227,6 @@ typedef struct _ftsent {
|
|
||||||
|
|
||||||
size_t fts_namelen; /* strlen(fts_name) */
|
|
||||||
|
|
||||||
- /* If not (nlink_t) -1, an upper bound on the number of
|
|
||||||
- remaining subdirectories of interest. If this becomes
|
|
||||||
- zero, some work can be avoided. */
|
|
||||||
- nlink_t fts_n_dirs_remaining;
|
|
||||||
-
|
|
||||||
# define FTS_D 1 /* preorder directory */
|
|
||||||
# define FTS_DC 2 /* directory that causes cycles */
|
|
||||||
# define FTS_DEFAULT 3 /* none of the above */
|
|
||||||
--
|
|
||||||
2.51.0
|
|
||||||
|
|
||||||
Binary file not shown.
@ -1,11 +0,0 @@
|
|||||||
summary: Internal gating tests plan
|
|
||||||
discover:
|
|
||||||
- name: Internal gating tests
|
|
||||||
how: fmf
|
|
||||||
filter: 'tier: 1,2,3 & tag: -rhel-buildroot'
|
|
||||||
url: https://pkgs.devel.redhat.com/git/tests/findutils
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
adjust:
|
|
||||||
enabled: false
|
|
||||||
when: distro == centos-stream or distro == fedora
|
|
||||||
Loading…
Reference in New Issue
Block a user