SHA256
1
0
forked from pool/findutils
findutils/findutils-4.4.2-xautofs.patch
Marcus Meissner 987ed52315 Accepting request 200285 from home:bernhard-voelker:branches:Base:System
- Remove patches:
  - findutils-4.5.10-use_proc_mounts.patch:
    /etc/mtab is a link to /proc/self/mounts nowadays.
  - findutils-4.5.10-prune_unknown.patch:
    merge patch into findutils-4.4.2-updatedb.patch.
  - findutils-4.5.10-updatedb_ignore_nfsv4.patch:
    fixed upstream.
  - findutils-stdio.in.patch:
    fixed upstream (in included gnulib).
  - findutils-init_stat_buf.patch:
    fixed upstream.

- Refresh other patches:
  - findutils-4.4.2-updatedb.patch:
    refresh with changes from the above, removed patch.
  - findutils-4.4.2-xautofs.patch:
    refresh, and added -xautofs in find's usage text.

- Adapt findutils.spec:
  - Version bump.
  - Remove above removed patches.
  - Add BuildRequires for makeinfo.
  - configure call: remove --enable-d_type-optimization
    option because turned on by default since 4.2.15.
  - Do not remove oldfind's man page in %install.
  - Add oldfind's binary and man page in %files.

- Update to 4.5.12
  See /usr/share/doc/packages/findutils/NEWS,
  section "Major changes in release 4.5.12, 2013-09-22"

- Update to 4.5.11 (2013-02-02)
  See /usr/share/doc/packages/findutils/NEWS,
  section "Major changes in release 4.5.11, 2013-02-02"

OBS-URL: https://build.opensuse.org/request/show/200285
OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=46
2013-09-25 14:15:56 +00:00

128 lines
4.7 KiB
Diff

---
doc/find.texi | 4 ++++
find/defs.h | 3 +++
find/find.1 | 3 +++
find/ftsfind.c | 6 ++++++
find/parser.c | 14 +++++++++++++-
find/util.c | 1 +
6 files changed, 30 insertions(+), 1 deletion(-)
Index: doc/find.texi
===================================================================
--- doc/find.texi.orig
+++ doc/find.texi
@@ -1438,6 +1438,10 @@ them.
There are two ways to avoid searching certain filesystems. One way is
to tell @code{find} to only search one filesystem:
+@deffn Option -xautofs
+Don't descend directories on autofs filesystems.
+@end deffn
+
@deffn Option -xdev
@deffnx Option -mount
Don't descend directories on other filesystems. These options are
Index: find/defs.h
===================================================================
--- find/defs.h.orig
+++ find/defs.h
@@ -557,6 +557,9 @@ struct options
/* If true, don't cross filesystem boundaries. */
bool stay_on_filesystem;
+ /* If true, don't descend directores on autofs filesystems */
+ bool bypass_autofs;
+
/* If true, we ignore the problem where we find that a directory entry
* no longer exists by the time we get around to processing it.
*/
Index: find/find.1
===================================================================
--- find/find.1.orig
+++ find/find.1
@@ -461,6 +461,9 @@ if standard input is a tty, and to
.B \-nowarn
otherwise.
+.IP \-xautofs
+Don't descend directories on autofs filesystems.
+
.IP \-xdev
Don't descend directories on other filesystems.
Index: find/ftsfind.c
===================================================================
--- find/ftsfind.c.orig
+++ find/ftsfind.c
@@ -485,6 +485,12 @@ consider_visiting (FTS *p, FTSENT *ent)
}
}
+ if (options.bypass_autofs &&
+ 0 == strcmp ("autofs", filesystem_type (&statbuf, ent->fts_name)))
+ {
+ fts_set(p, ent, FTS_SKIP); /* descend no further */
+ }
+
if ( (ent->fts_info == FTS_D) && !options.do_dir_first )
{
/* this is the preorder visit, but user said -depth */
Index: find/parser.c
===================================================================
--- find/parser.c.orig
+++ find/parser.c
@@ -146,6 +146,7 @@ static bool parse_user (const s
static bool parse_version (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_xdev (const struct parser_table*, char *argv[], int *arg_ptr);
+static bool parse_xautofs (const struct parser_table*, char *argv[], int *arg_ptr);
static bool parse_ignore_race (const struct parser_table*, char *argv[], int *arg_ptr);
static bool parse_noignore_race (const struct parser_table*, char *argv[], int *arg_ptr);
static bool parse_warn (const struct parser_table*, char *argv[], int *arg_ptr);
@@ -306,6 +307,7 @@ static struct parser_table const parse_t
PARSE_TEST_NP ("wholename", wholename), /* GNU, replaced -path, but anyway -path will soon be in POSIX */
{ARG_TEST, "writable", parse_accesscheck, pred_writable}, /* GNU, 4.3.0+ */
PARSE_OPTION ("xdev", xdev), /* POSIX */
+ PARSE_OPTION ("xautofs", xautofs),
PARSE_TEST ("xtype", xtype), /* GNU */
#ifdef UNIMPLEMENTED_UNIX
/* It's pretty ugly for find to know about archive formats.
@@ -1230,7 +1232,7 @@ operators (decreasing precedence; -and i
positional options (always true): -daystart -follow -regextype\n\n\
normal options (always true, specified before other expressions):\n\
-depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n\
- --version -xdev -ignore_readdir_race -noignore_readdir_race\n"));
+ --version -xdev -xautofs -ignore_readdir_race -noignore_readdir_race\n"));
puts (_("\
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\
@@ -2736,6 +2738,16 @@ parse_xdev (const struct parser_table* e
}
static bool
+parse_xautofs(const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+ (void) argv;
+ (void) arg_ptr;
+ (void) entry;
+ options.bypass_autofs = true;
+ return true;
+}
+
+static bool
parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr)
{
options.ignore_readdir_race = true;
Index: find/util.c
===================================================================
--- find/util.c.orig
+++ find/util.c
@@ -1010,6 +1010,7 @@ set_option_defaults (struct options *p)
p->full_days = false;
p->stay_on_filesystem = false;
+ p->bypass_autofs = false;
p->ignore_readdir_race = false;
if (p->posixly_correct)