Compare commits

..

1 Commits
rawhide ... f20

Author SHA1 Message Date
Kamil Dudka 3c31bf012f remove left over files from the repository 2014-07-16 12:21:00 +02:00
21 changed files with 726 additions and 941 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
/findutils-4.*.*.tar.?z
findutils-4.5.9.tar.gz
/findutils-4.5.10.tar.gz
/findutils-4.5.11.tar.gz

View File

@ -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}

View File

@ -0,0 +1,117 @@
From dc92679e2c363f8c0d659fa428c138684455a6bd Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 11 May 2011 16:46:13 +0200
Subject: [PATCH 1/4] findutils-4.4.0-no-locate.patch
---
Makefile.am | 2 +-
configure.ac | 2 --
doc/find.texi | 24 ++++++++----------------
3 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c7f8f39..0dacb93 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,7 @@ DISTCLEANFILES = tool-versions.txt
# "tests" is the gnulib unit test dir.
-SUBDIRS = gl tests build-aux lib find xargs locate doc po m4
+SUBDIRS = gl tests build-aux lib find xargs doc po m4
ACLOCAL_AMFLAGS = -I gl/m4 -I m4
diff --git a/configure.ac b/configure.ac
index f31dd37..431f0ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,8 +244,6 @@ find/testsuite/Makefile
gl/Makefile
gl/lib/Makefile
lib/Makefile
-locate/Makefile
-locate/testsuite/Makefile
m4/Makefile
po/Makefile.in
po/Makefile
diff --git a/doc/find.texi b/doc/find.texi
index 1f278de..c584298 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -7,7 +7,6 @@
@c %**end of header
@include version.texi
-@include ../locate/dblocation.texi
@iftex
@finalout
@@ -571,8 +570,7 @@ the databases are updated, and the directories for which they contain
entries.
Here is how to select which file name databases @code{locate}
-searches. The default is system-dependent. At the time this document
-was generated, the default was @file{@value{LOCATE_DB}}.
+searches. The default is system-dependent.
@table @code
@item --database=@var{path}
@@ -2840,13 +2838,9 @@ thrashing the network.
directories are indexed by each database file.
The default location for the locate database depends on how findutils
-is built, but the findutils installation accompanying this manual uses
-the default location @file{@value{LOCATE_DB}}.
-
-If no database exists at @file{@value{LOCATE_DB}} but the user did not
-specify where to look (by using @samp{-d} or setting
-@code{LOCATE_PATH}), then @code{locate} will also check for a
-``secure'' database in @file{/var/lib/slocate/slocate.db}.
+is built. If user did not specify where to look (by using @samp{-d}
+or setting @code{LOCATE_PATH}), then @code{locate} will also check for
+a ``secure'' database in @file{/var/lib/slocate/slocate.db}.
@node Database Formats
@section Database Formats
@@ -3389,8 +3383,7 @@ present.
@item --database=@var{path}
@itemx -d @var{path}
-Instead of searching the default @code{locate} database
-@file{@value{LOCATE_DB}}, @code{locate} searches the file
+@code{locate} searches the file
name databases in @var{path}, which is a colon-separated list of
database file names. You can also use the environment variable
@code{LOCATE_PATH} to set the list of database files to search. The
@@ -3575,8 +3568,7 @@ The environment variable @code{PRUNEFS} also sets this value. Default
is @file{nfs NFS proc}.
@item --output=@var{dbfile}
-The database file to build. The default is system-dependent, but
-when this document was formatted it was @file{@value{LOCATE_DB}}.
+The database file to build.
@item --localuser=@var{user}
The user to search the non-network directories as, using @code{su}.
@@ -5583,7 +5575,7 @@ why @code{xargs} is confused by your operating system).
@section Error Messages From @code{locate}
@table @samp
-@item warning: database @file{@value{LOCATE_DB}} is more than 8 days old
+@item warning: database @file{LOCATE_DB} is more than 8 days old
The @code{locate} program relies on a database which is periodically
built by the @code{updatedb} program. That hasn't happened in a long
time. To fix this problem, run @code{updatedb} manually. This can
@@ -5591,7 +5583,7 @@ often happen on systems that are generally not left on, so the
periodic ``cron'' task which normally does this doesn't get a chance
to run.
-@item locate database @file{@value{LOCATE_DB}} is corrupt or invalid
+@item locate database @file{LOCATE_DB} is corrupt or invalid
This should not happen. Re-run @code{updatedb}. If that works, but
@code{locate} still produces this error, run @code{locate --version}
and @code{updatedb --version}. These should produce the same output.
--
1.7.4.4

View File

@ -1,22 +1,22 @@
From 17e470dc1acca4824b70328d733d5f99c12d0d65 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
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 ++++
find/defs.h | 3 +++
find/find.1 | 3 +++
find/ftsfind.c | 6 ++++++
find/parser.c | 9 +++++++++
find/util.c | 3 ++-
find/parser.c | 11 ++++++++++-
find/util.c | 1 +
6 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/doc/find.texi b/doc/find.texi
index c584298..9731b71 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -1606,6 +1606,10 @@ them.
@@ -1439,6 +1439,10 @@ them.
There are two ways to avoid searching certain filesystems. One way is
to tell @code{find} to only search one filesystem:
@ -31,7 +31,7 @@ diff --git a/find/defs.h b/find/defs.h
index 11d1d00..f95ce72 100644
--- a/find/defs.h
+++ b/find/defs.h
@@ -562,6 +562,9 @@ struct options
@@ -557,6 +557,9 @@ struct options
/* If true, don't cross filesystem boundaries. */
bool stay_on_filesystem;
@ -45,9 +45,9 @@ diff --git a/find/find.1 b/find/find.1
index e851f82..a4799ff 100644
--- a/find/find.1
+++ b/find/find.1
@@ -638,6 +638,9 @@ to stat them; this gives a significant increase in search speed.
.IP "\-version, \-\-version"
Print the \fBfind\fR version number and exit.
@@ -460,6 +460,9 @@ if standard input is a tty, and to
.B \-nowarn
otherwise.
+.IP \-xautofs
+Don't descend directories on autofs filesystems.
@ -59,7 +59,7 @@ diff --git a/find/ftsfind.c b/find/ftsfind.c
index 9fdb8ef..bd7cc37 100644
--- a/find/ftsfind.c
+++ b/find/ftsfind.c
@@ -435,6 +435,12 @@ consider_visiting (FTS *p, FTSENT *ent)
@@ -485,6 +485,12 @@ consider_visiting (FTS *p, FTSENT *ent)
}
}
@ -76,50 +76,50 @@ diff --git a/find/parser.c b/find/parser.c
index 52a1ef6..995aec3 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -139,6 +139,7 @@ static bool parse_used (const struct parser_table*, char *argv[], int *
static bool parse_user (const struct parser_table*, char *argv[], int *arg_ptr);
@@ -146,6 +146,7 @@ static bool parse_user (const struct parser_table*, char *argv[], int *
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);
@@ -304,6 +305,7 @@ static struct parser_table const parse_table[] =
PARSE_TEST_NP ("wholename", wholename), /* GNU, replaced -path, but now -path is standardized since POSIX 2008 */
@@ -306,6 +307,7 @@ static struct parser_table const parse_table[] =
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.
@@ -2607,6 +2609,13 @@ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
return parse_noop (entry, argv, arg_ptr);
@@ -1230,7 +1232,7 @@ operators (decreasing precedence; -and is implicit where no others are given):\n
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 -xautofs -xdev -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\
@@ -2799,6 +2801,13 @@ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
}
+static bool
static bool
+parse_xautofs (const struct parser_table* entry, char **argv, int *arg_ptr)
+{
+ options.bypass_autofs = true;
+ return parse_noop (entry, argv, arg_ptr);
+}
+
static bool
+static bool
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
index 8577396..4d45f84 100644
--- a/find/util.c
+++ b/find/util.c
@@ -183,7 +183,7 @@ Positional options (always true):\n\
HTL (_("\n\
Normal options (always true, specified before other expressions):\n\
-depth -files0-from FILE -maxdepth LEVELS -mindepth LEVELS\n\
- -mount -noleaf -xdev -ignore_readdir_race -noignore_readdir_race\n"));
+ -mount -noleaf -xautofs -xdev -ignore_readdir_race -noignore_readdir_race\n"));
HTL (_("\n\
Tests (N can be +N or -N or N):\n\
-amin N -anewer FILE -atime N -cmin N -cnewer FILE -context CONTEXT\n\
@@ -1028,6 +1028,7 @@ set_option_defaults (struct options *p)
@@ -1010,6 +1010,7 @@ set_option_defaults (struct options *p)
p->full_days = false;
p->stay_on_filesystem = false;

View File

@ -0,0 +1,366 @@
From 8171b840e74641733d33af53664b811699eb7eab Mon Sep 17 00:00:00 2001
From: James Youngman <jay@gnu.org>
Date: Mon, 22 Apr 2013 21:49:40 +0100
Subject: [PATCH 1/3] Fix documentation typo.
* doc/find.texi (Mode Bits): Fix typo "it set" -> "is set".
[upstream commit 2957a7ae5581cf2e5b36f2c23781317a7bf2e901]
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
doc/find.texi | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/find.texi b/doc/find.texi
index a44e5d5..94d0081 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -1183,7 +1183,7 @@ if @var{mode} exactly matches the file mode bits.
A @var{pmode} that starts with @samp{+} but which is not valid (for
example @samp{+a+x}) is an error if the POSIXLY_CORRECT environment
-variable it set. Otherwise this is treated as if the initial
+variable is set. Otherwise this is treated as if the initial
@samp{+} were a @samp{/}, for backward compatibility.
A @var{pmode} that starts with @samp{-} matches if
--
1.7.1
From cf50a86bea92033c42c1f3e539b666444cacb8eb Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 21 Apr 2013 00:14:18 -0700
Subject: [PATCH 2/3] Remove support for obsolete -perm +MODE syntax.
Also, do not reject -perm /MODE merely because of POSIXLY_CORRECT.
Problem reported in <https://savannah.gnu.org/bugs/?38474>.
* NEWS:
* doc/find.texi (Mode Bits): Document this.
(Environment Variables): POSIXLY_CORRECT does not affect -perm.
* find/parser.c (parse_help): Mention /MODE, not +MODE.
(non_posix_mode): Remove.
(parse_perm): Remove support for -perm +MODE.
Do not reject -perm /MODE merely because POSIXLY_CORRECT is set;
POSIXLY_CORRECT is not supposed to be for pedantic checking.
[upstream commit 90f0c5d24153ad3327edd6f2249fc95a5cfb72e0]
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
NEWS | 9 ++++++++
doc/find.texi | 11 +--------
find/find.1 | 38 ++++++++++++---------------------
find/parser.c | 63 ++++++++++----------------------------------------------
4 files changed, 37 insertions(+), 84 deletions(-)
diff --git a/NEWS b/NEWS
index 184722a..7de91e8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,15 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
* Major changes in release 4.5.11, 2013-02-02
+** Functional Changes to find
+
+The GNU extension "find ... -perm /MODE" is no longer disabled when
+the POSIXLY_CORRECT environment variable is set.
+
+The obsolete GNU extension "find ... -perm +MODE", which was withdrawn
+in release 4.2.21 in 2005 due to compatibility problems, has been
+completely removed. Use "find ... -perm /MODE" instead.
+
** Documentation Changes
The Texinfo manual and the find manual pafe now explain why two find
diff --git a/doc/find.texi b/doc/find.texi
index 94d0081..1ad3af5 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -1180,11 +1180,8 @@ optionally prefixed by @samp{-} or @samp{/}.
A @var{pmode} that starts with neither @samp{-} nor @samp{/} matches
if @var{mode} exactly matches the file mode bits.
-
-A @var{pmode} that starts with @samp{+} but which is not valid (for
-example @samp{+a+x}) is an error if the POSIXLY_CORRECT environment
-variable is set. Otherwise this is treated as if the initial
-@samp{+} were a @samp{/}, for backward compatibility.
+(To avoid confusion with an obsolete GNU extension, @var{mode}
+must not start with a @samp{+} immediately followed by an octal digit.)
A @var{pmode} that starts with @samp{-} matches if
@emph{all} the file mode bits set in @var{mode} are set for the file;
@@ -3944,10 +3941,6 @@ Setting this variable also turns off warning messages (that is, implies
the output for @samp{-ok}, all messages printed on stderr are
diagnostics and must result in a non-zero exit status.
-Arguments to @samp{-perm} beginning with @samp{+} are treated
-differently when POSIXLY_CORRECT is set. See
-@ref{Mode Bits,-perm,File Mode Bits}.
-
When POSIXLY_CORRECT is set, the response to the prompt made by the
@code{-ok} action is interpreted according to the system's message
catalogue, as opposed to according to @code{find}'s own message
diff --git a/find/find.1 b/find/find.1
index 34a4cba..071b7fe 100644
--- a/find/find.1
+++ b/find/find.1
@@ -804,25 +804,9 @@ with the behaviour of
.BR \-000 ).
.IP "\-perm +\fImode\fR"
-Deprecated, old way of searching for files with any of the permission
-bits in \fImode\fR set. You should use
-.B \-perm \fI/mode\fR
-instead. Trying to use the `+' syntax with symbolic modes will yield
-surprising results. For example, `+u+x' is a valid symbolic mode
-(equivalent to +u,+x, i.e. 0111) and will therefore not be evaluated
-as
-.B \-perm +\fImode\fR
-but instead as the exact mode specifier
-.B \-perm \fImode\fR
-and so it matches files with exact permissions 0111 instead of files with any
-execute bit set. If you found this paragraph confusing, you're not
-alone - just use
-.B \-perm /\fImode\fR.
-This form of the
-.B \-perm
-test is deprecated because the POSIX specification requires the
-interpretation of a leading `+' as being part of a symbolic mode, and
-so we switched to using `/' instead.
+This is no longer supported (and has been deprecated since 2005). Use
+.B "\-perm /\fImode\fR"
+instead.
.IP \-readable
Matches files which are readable. This takes into account access
@@ -2046,11 +2030,6 @@ As of findutils-4.2.2, shell metacharacters (`*', `?' or `[]' for
example) used in filename patterns will match a leading `.', because
IEEE POSIX interpretation 126 requires this.
.P
-The syntax
-\.B \-perm +MODE
-was deprecated in findutils-4.2.21, in favour of
-\.B \-perm
-.BR /MODE .
As of findutils-4.3.3,
.B \-perm /000
now matches all files instead of none.
@@ -2098,6 +2077,17 @@ Feature Added in Also occurs in
\-ipath 3.8
\-iregex 3.8
.TE
+.P
+The syntax
+\.B \-perm +MODE
+was removed in findutils-4.5.12, in favour of
+\.B \-perm
+.BR /MODE .
+The
+.B +MODE
+syntax had been deprecated since findutils-4.2.21
+which was released in 2005.
+.P
.SH "NON-BUGS"
.nf
.B $ find . \-name *.c \-print
diff --git a/find/parser.c b/find/parser.c
index d15c0e0..19747cd 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -1239,7 +1239,7 @@ tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\
-ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex PATTERN\n\
-links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE"));
puts (_("\
- -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n\
+ -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n\
-readable -writable -executable\n\
-wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\
-used N -user NAME -xtype [bcdpfls]"));
@@ -1944,17 +1944,6 @@ parse_iwholename (const struct parser_table* entry, char **argv, int *arg_ptr)
return insert_path_check (entry, argv, arg_ptr, "iwholename", pred_ipath);
}
-static void
-non_posix_mode (const char *mode)
-{
- if (options.posixly_correct)
- {
- error (EXIT_FAILURE, 0,
- _("Mode %s is not valid when POSIXLY_CORRECT is on."),
- quotearg_n_style (0, options.err_quoting_style, mode));
- }
-}
-
static bool
parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
@@ -1964,7 +1953,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
int mode_start = 0;
bool havekind = false;
enum permissions_type kind = PERM_EXACT;
- struct mode_change *change = NULL;
+ struct mode_change *change;
struct predicate *our_pred;
const char *perm_expr;
@@ -1980,38 +1969,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
rate = 0.2;
break;
- case '+':
- change = mode_compile (perm_expr);
- if (NULL == change)
- {
- /* Most likely the caller is an old script that is still
- * using the obsolete GNU syntax '-perm +MODE'. This old
- * syntax was withdrawn in favor of '-perm /MODE' because
- * it is incompatible with POSIX in some cases, but we
- * still support uses of it that are not incompatible with
- * POSIX.
- *
- * Example: POSIXLY_CORRECT=y find -perm +a+x
- */
- non_posix_mode (perm_expr);
-
- /* support the previous behaviour. */
- mode_start = 1;
- kind = PERM_ANY;
- rate = 0.3;
- }
- else
- {
- /* This is a POSIX-compatible usage */
- mode_start = 0;
- kind = PERM_EXACT;
- rate = 0.1;
- }
- havekind = true;
- break;
-
case '/': /* GNU extension */
- non_posix_mode (perm_expr);
mode_start = 1;
kind = PERM_ANY;
havekind = true;
@@ -2029,13 +1987,16 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
break;
}
- if (NULL == change)
- {
- change = mode_compile (perm_expr + mode_start);
- if (NULL == change)
- error (EXIT_FAILURE, 0, _("invalid mode %s"),
- quotearg_n_style (0, options.err_quoting_style, perm_expr));
- }
+ change = mode_compile (perm_expr + mode_start);
+
+ /* Reject invalid modes, or modes of the form +NUMERICMODE.
+ The latter were formerly accepted as a GNU extension, but that
+ extension was incompatible with how GNU 'chmod' treats these modes now,
+ and it would be confusing if 'find' continued to support it. */
+ if (NULL == change
+ || (perm_expr[0] == '+' && '0' <= perm_expr[1] && perm_expr[1] < '8'))
+ error (EXIT_FAILURE, 0, _("invalid mode %s"),
+ quotearg_n_style (0, options.err_quoting_style, perm_expr));
perm_val[0] = mode_adjust (0, false, 0, change, NULL);
perm_val[1] = mode_adjust (0, true, 0, change, NULL);
free (change);
--
1.7.1
From e9ebac18d364958f9872aa981a79ed97492a1b15 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 22 Apr 2013 15:15:53 -0700
Subject: [PATCH 3/3] More removal of support for -perm +MODE.
* find/parser.c (parse_perm): Remove no-longer-needed local var
and associated code. Reported by Eric Blake in
<http://savannah.gnu.org/bugs/?38474#comment9>.
[upstream commit 3d13be5654b42ef126cb19c84a9469634c005b7f]
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
find/parser.c | 26 +-------------------------
1 files changed, 1 insertions(+), 25 deletions(-)
diff --git a/find/parser.c b/find/parser.c
index 19747cd..3c2c771 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -1951,7 +1951,6 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
mode_t perm_val[2];
float rate;
int mode_start = 0;
- bool havekind = false;
enum permissions_type kind = PERM_EXACT;
struct mode_change *change;
struct predicate *our_pred;
@@ -1965,14 +1964,12 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
case '-':
mode_start = 1;
kind = PERM_AT_LEAST;
- havekind = true;
rate = 0.2;
break;
case '/': /* GNU extension */
mode_start = 1;
kind = PERM_ANY;
- havekind = true;
rate = 0.3;
break;
@@ -1982,7 +1979,6 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
*/
mode_start = 0;
kind = PERM_EXACT;
- havekind = true;
rate = 0.01;
break;
}
@@ -2020,7 +2016,6 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
perm_expr);
kind = PERM_AT_LEAST;
- havekind = true;
/* The "magic" number below is just the fraction of files on my
* own system that "-type l -xtype l" fails for (i.e. unbroken symlinks).
@@ -2031,26 +2026,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
our_pred = insert_primary (entry, perm_expr);
our_pred->est_success_rate = rate;
- if (havekind)
- {
- our_pred->args.perm.kind = kind;
- }
- else
- {
-
- switch (perm_expr[0])
- {
- case '-':
- our_pred->args.perm.kind = PERM_AT_LEAST;
- break;
- case '+':
- our_pred->args.perm.kind = PERM_ANY;
- break;
- default:
- our_pred->args.perm.kind = PERM_EXACT;
- break;
- }
- }
+ our_pred->args.perm.kind = kind;
memcpy (our_pred->args.perm.val, perm_val, sizeof perm_val);
return true;
}
--
1.7.1

BIN
findutils-4.5.11.tar.gz.sig Normal file

Binary file not shown.

View File

@ -1,26 +0,0 @@
From 690d4bd9f29a805999a3ce4651dac9585ccc9917 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 11 May 2011 16:46:57 +0200
Subject: [PATCH] findutils-4.5.7-warnings.patch
---
xargs/xargs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xargs/xargs.c b/xargs/xargs.c
index 5e373f2..c0a8676 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -1346,7 +1346,8 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
* utility if we run it, for POSIX compliance on the
* handling of exit values.
*/
- write (fd[1], &errno, sizeof (int));
+ int sink = write (fd[1], &errno, sizeof (int));
+ (void) sink;
}
close (fd[1]);
--
1.7.1

View File

@ -1,173 +0,0 @@
From 3e5e311d23ac0a5bd5930ddb4094f7555b886329 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Sat, 19 Dec 2015 22:56:40 +0100
Subject: [PATCH 1/2] Revert "Don't include dblocation.texi from original spot,
symlink it."
This reverts commit f59d88e456553dfe0b5185caf75e4041285fd595.
---
doc/Makefile.am | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f6f7443..6fbf57b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -16,11 +16,9 @@ AM_CFLAGS = $(WARN_CFLAGS)
info_TEXINFOS = find.texi find-maint.texi
find_TEXINFOS = perm.texi parse-datetime.texi regexprops.texi fdl.texi
-BUILT_SOURCES = dblocation.texi
-nodist_find_TEXINFOS = dblocation.texi
find_maint_TEXINFOS = fdl.texi
MOSTLYCLEANFILES = find.cps
-CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz dblocation.texi \
+CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz \
find_mono.html findutils.texi_html_node.tar.gz \
find-info.tar.gz find.texi.tar.gz \
find.txt tmp-doc-install find_mono.html.gz
@@ -73,9 +71,6 @@ findutils.texi_html_node.tar.gz: find.html
tar zcf $@ find.html
-dblocation.texi: ../locate/dblocation.texi
- $(LN_S) ../locate/dblocation.texi $@
-
find-info.tar.gz:
$(MKDIR_P) tmp-doc-install/info
$(MAKE) $(AM_MAKEFLAGS) \
--
2.5.0
From d5473caa86f689ebcadacc593f5a71781c99e829 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 11 May 2011 16:46:13 +0200
Subject: [PATCH 2/2] findutils-4.4.0-no-locate.patch
---
Makefile.am | 2 +-
configure.ac | 2 --
doc/find.texi | 24 ++++++++----------------
tests/local.mk | 2 +-
4 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index af82d54..6ad453b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,7 @@ DISTCLEANFILES = tool-versions.txt
# "gnulib-tests" is the gnulib unit test dir.
-SUBDIRS = gl build-aux lib find xargs locate doc po m4 gnulib-tests
+SUBDIRS = gl build-aux lib find xargs doc po m4 gnulib-tests
ALL_RECURSIVE_TARGETS =
diff --git a/configure.ac b/configure.ac
index ce0e768..521e665 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,8 +309,6 @@ find/testsuite/Makefile
gl/Makefile
gl/lib/Makefile
lib/Makefile
-locate/Makefile
-locate/testsuite/Makefile
m4/Makefile
po/Makefile.in
po/Makefile
diff --git a/doc/find.texi b/doc/find.texi
index c2714dd..01367a4 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -7,7 +7,6 @@
@c @setchapternewpage odd
@c %**end of header
-@include dblocation.texi
@iftex
@finalout
@@ -661,8 +660,7 @@ the databases are updated, and the directories for which they contain
entries.
Here is how to select which file name databases @code{locate}
-searches. The default is system-dependent. At the time this document
-was generated, the default was @file{@value{LOCATE_DB}}.
+searches. The default is system-dependent.
@table @code
@item --database=@var{path}
@@ -3112,13 +3110,9 @@ thrashing the network.
directories are indexed by each database file.
The default location for the locate database depends on how findutils
-is built, but the findutils installation accompanying this manual uses
-the default location @file{@value{LOCATE_DB}}.
-
-If no database exists at @file{@value{LOCATE_DB}} but the user did not
-specify where to look (by using @samp{-d} or setting
-@env{LOCATE_PATH}), then @code{locate} will also check for a
-``secure'' database in @file{/var/lib/slocate/slocate.db}.
+is built. If user did not specify where to look (by using @samp{-d}
+or setting @code{LOCATE_PATH}), then @code{locate} will also check for
+a ``secure'' database in @file{/var/lib/slocate/slocate.db}.
@node Database Formats
@section Database Formats
@@ -3627,8 +3621,7 @@ present.
@item --database=@var{path}
@itemx -d @var{path}
-Instead of searching the default @code{locate} database
-@file{@value{LOCATE_DB}}, @code{locate} searches the file
+@code{locate} searches the file
name databases in @var{path}, which is a colon-separated list of
database file names. You can also use the environment variable
@env{LOCATE_PATH} to set the list of database files to search. The
@@ -3803,8 +3796,7 @@ The environment variable @env{PRUNEFS} also sets this value. Default
is @file{nfs NFS proc}.
@item --output=@var{dbfile}
-The database file to build. The default is system-dependent, but
-when this document was formatted it was @file{@value{LOCATE_DB}}.
+The database file to build.
@item --localuser=@var{user}
The user to search the non-network directories as, using @code{su}.
@@ -5828,7 +5820,7 @@ See the manual of the system call @code{dup2(2)}.
@section Error Messages From @code{locate}
@table @samp
-@item warning: database @file{@value{LOCATE_DB}} is more than 8 days old
+@item warning: database @file{LOCATE_DB} is more than 8 days old
The @code{locate} program relies on a database which is periodically
built by the @code{updatedb} program. That hasn't happened in a long
time. To fix this problem, run @code{updatedb} manually. This can
@@ -5836,7 +5828,7 @@ often happen on systems that are generally not left on, so the
periodic ``cron'' task which normally does this doesn't get a chance
to run.
-@item locate database @file{@value{LOCATE_DB}} is corrupt or invalid
+@item locate database @file{LOCATE_DB} is corrupt or invalid
This should not happen. Re-run @code{updatedb}. If that works, but
@code{locate} still produces this error, run @code{locate --version}
and @code{updatedb --version}. These should produce the same output.
diff --git a/tests/local.mk b/tests/local.mk
index 7e52a04..ae08a56 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -15,7 +15,7 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
-built_programs = find xargs frcode locate updatedb
+built_programs = find xargs
# Indirections required so that we'll still be able to know the
# complete list of our tests even if the user overrides TESTS
--
2.5.0

View File

@ -0,0 +1,166 @@
From 1b7065f25457fea9f9ee7100437b12815b92a38c Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 11 May 2011 16:46:57 +0200
Subject: [PATCH 4/4] findutils-4.5.7-warnings.patch
---
find/Makefile.am | 2 +-
find/defs.h | 2 +-
find/exec.c | 2 +-
find/find.c | 14 +-------------
find/pred.c | 2 +-
lib/Makefile.am | 2 +-
xargs/Makefile.am | 2 +-
xargs/xargs.c | 5 +++--
8 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/find/Makefile.am b/find/Makefile.am
index 0795b87..f1068bf 100644
--- a/find/Makefile.am
+++ b/find/Makefile.am
@@ -36,7 +36,7 @@ endif
# We don't just include man_MANS in EXTRA_DIST because while the value of
# man_MANS is not always the same, we want to distribute all of those files.
EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1
-INCLUDES = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS)
# gnulib advises we link against <first> because we use <second>:
# $(GETHOSTNAME_LIB) uname
diff --git a/find/defs.h b/find/defs.h
index 366edab..f25b700 100644
--- a/find/defs.h
+++ b/find/defs.h
@@ -258,7 +258,7 @@ struct predicate
/* Only used for debugging, but defined unconditionally so individual
modules can be compiled with -DDEBUG. */
- char *p_name;
+ const char *p_name;
/* The type of this node. There are two kinds. The first is real
predicates ("primaries") such as -perm, -print, or -exec. The
diff --git a/find/exec.c b/find/exec.c
index aa69fe3..f731d82 100644
--- a/find/exec.c
+++ b/find/exec.c
@@ -324,7 +324,7 @@ launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
}
}
- if (bc_args_exceed_testing_limit (argv))
+ if (bc_args_exceed_testing_limit ((const char **) argv))
errno = E2BIG;
else
execvp (argv[0], argv);
diff --git a/find/find.c b/find/find.c
index 5d287b5..00a2a6c 100644
--- a/find/find.c
+++ b/find/find.c
@@ -528,6 +528,7 @@ wd_sanity_check (const char *thing_to_stat,
#ifdef STAT_MOUNTPOINTS
isfatal = dirchange_is_fatal (specific_what,isfatal,silent,newinfo);
#else
+ (void) silent;
isfatal = RETRY_IF_SANITY_CHECK_FAILS;
#endif
}
@@ -1302,7 +1303,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp,
{
int subdirs_left; /* Number of unexamined subdirs in PATHNAME. */
bool subdirs_unreliable; /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */
- unsigned int idx; /* Which entry are we on? */
struct stat stat_buf;
size_t dircount = 0u;
DIR *dirp;
@@ -1519,7 +1519,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp,
if (strcmp (name, "."))
{
enum SafeChdirStatus status;
- struct dir_id did;
/* We could go back and do the next command-line arg
instead, maybe using longjmp. */
@@ -1555,17 +1554,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp,
"%s", safely_quote_err_filename (0, pathname));
return;
}
-
- if (dir_curr > 0)
- {
- did.dev = dir_ids[dir_curr-1].dev;
- did.ino = dir_ids[dir_curr-1].ino;
- }
- else
- {
- did.dev = starting_stat_buf.st_dev;
- did.ino = starting_stat_buf.st_ino;
- }
}
free (cur_path);
diff --git a/find/pred.c b/find/pred.c
index 88dacd9..e9c9a49 100644
--- a/find/pred.c
+++ b/find/pred.c
@@ -1216,7 +1216,7 @@ pred_context (const char *pathname, struct stat *stat_buf,
Return BUF. */
static char *
-blank_rtrim (char *str, char *buf)
+blank_rtrim (const char *str, char *buf)
{
int i;
diff --git a/lib/Makefile.am b/lib/Makefile.am
index bbb4dc2..eba43d2 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -28,7 +28,7 @@ DISTCLEANFILES =
MAINTAINERCLEANFILES =
-INCLUDES = -I../gl/lib -I$(top_srcdir)/gl/lib
+AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/gl/lib
LDADD = ../gl/lib/libgnulib.a $(LIBINTL)
libfind_a_SOURCES += printquoted.h listfile.h \
diff --git a/xargs/Makefile.am b/xargs/Makefile.am
index d34f87a..1cfe3e4 100644
--- a/xargs/Makefile.am
+++ b/xargs/Makefile.am
@@ -3,7 +3,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
localedir = $(datadir)/locale
bin_PROGRAMS = xargs
man_MANS = xargs.1
-INCLUDES = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
+AM_CPPFLAGS = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
EXTRA_DIST = $(man_MANS)
SUBDIRS = . testsuite
diff --git a/xargs/xargs.c b/xargs/xargs.c
index 3cc1832..35f6822 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -1208,7 +1208,7 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
prep_child_for_exec ();
- if (bc_args_exceed_testing_limit (argv))
+ if (bc_args_exceed_testing_limit ((const char **) argv))
errno = E2BIG;
else
execvp (argv[0], argv);
@@ -1226,7 +1226,8 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
* utility if we run it, for POSIX compliance on the
* handling of exit values.
*/
- write (fd[1], &errno, sizeof (int));
+ int sink = write (fd[1], &errno, sizeof (int));
+ (void) sink;
}
close (fd[1]);
--
1.7.4.4

View File

@ -1,122 +0,0 @@
From 547e7145f335dc07144f35eaacc520475068852e Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Fri, 30 Aug 2019 10:22:22 +0200
Subject: [PATCH 1/3] Revert "fts: cleanup after FTS_NOATIME removal"
This reverts commit dce8759f0f0236a860a3e68b63c5e99cc6f168f9.
---
gl/lib/fts_.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gl/lib/fts_.h b/gl/lib/fts_.h
index fb5558f..0122262 100644
--- a/gl/lib/fts_.h
+++ b/gl/lib/fts_.h
@@ -149,14 +149,16 @@ typedef struct {
dirent.d_type data. */
# define FTS_DEFER_STAT 0x0400
+/* 0x0800 unused, was non-working FTS_NOATIME */
+
/* Use this flag to disable stripping of trailing slashes
from input path names during fts_open initialization. */
-# define FTS_VERBATIM 0x0800
+# define FTS_VERBATIM 0x1000
-# define FTS_OPTIONMASK 0x0fff /* valid user option mask */
+# define FTS_OPTIONMASK 0x1fff /* valid user option mask */
-# define FTS_NAMEONLY 0x1000 /* (private) child names only */
-# define FTS_STOP 0x2000 /* (private) unrecoverable error */
+# define FTS_NAMEONLY 0x2000 /* (private) child names only */
+# define FTS_STOP 0x4000 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
/* Map a directory's device number to a boolean. The boolean is
--
2.20.1
From 1328926a705fdb4728c1f255dd368de928736d39 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Fri, 25 Sep 2015 16:09:39 +0200
Subject: [PATCH 2/3] fts: introduce the FTS_NOLEAF flag
The flag is needed to implement the -noleaf option of find.
* lib/fts.c (link_count_optimize_ok): Implement the FTS_NOLEAF flag.
* lib/fts_.h (FTS_NOLEAF): New macro, shifted conflicting constants.
---
gl/lib/fts.c | 4 ++++
gl/lib/fts_.h | 12 +++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/gl/lib/fts.c b/gl/lib/fts.c
index d2d404f..808466f 100644
--- a/gl/lib/fts.c
+++ b/gl/lib/fts.c
@@ -706,6 +706,10 @@ filesystem_type (FTSENT const *p, int fd)
struct dev_type *ent;
struct statfs fs_buf;
+ if (ISSET(FTS_NOLEAF))
+ /* leaf optimization explicitly disabled by the FTS_NOLEAF flag */
+ return 0;
+
/* If we're not in CWDFD mode, don't bother with this optimization,
since the caller is not serious about performance. */
if (!ISSET (FTS_CWDFD))
diff --git a/gl/lib/fts_.h b/gl/lib/fts_.h
index 63d4b74..f1d519b 100644
--- a/gl/lib/fts_.h
+++ b/gl/lib/fts_.h
@@ -155,10 +155,16 @@ typedef struct {
from input path names during fts_open initialization. */
# define FTS_VERBATIM 0x1000
-# define FTS_OPTIONMASK 0x1fff /* valid user option mask */
+ /* Disable leaf optimization (which eliminates stat() calls during traversal,
+ based on the count of nested directories stored in stat.st_nlink of each
+ directory). Note that the optimization is by default enabled only for
+ selected file systems, and only if the FTS_CWDFD flag is set. */
+# define FTS_NOLEAF 0x2000
-# define FTS_NAMEONLY 0x2000 /* (private) child names only */
-# define FTS_STOP 0x4000 /* (private) unrecoverable error */
+# define FTS_OPTIONMASK 0x3fff /* valid user option mask */
+
+# define FTS_NAMEONLY 0x4000 /* (private) child names only */
+# define FTS_STOP 0x8000 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
/* Map a directory's device number to a boolean. The boolean is
--
2.5.0
From c186934e6e37ddadf7511abb9b1045192757618e Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Fri, 25 Sep 2015 19:13:15 +0200
Subject: [PATCH 3/3] ftsfind: propagate the -noleaf option to FTS
* find/ftsfind.c (find): Propagate the -noleaf option to FTS.
---
find/ftsfind.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/find/ftsfind.c b/find/ftsfind.c
index 5159470..e34b672 100644
--- a/find/ftsfind.c
+++ b/find/ftsfind.c
@@ -509,6 +509,9 @@ find (char *arg)
if (options.stay_on_filesystem)
ftsoptions |= FTS_XDEV;
+ if (options.no_leaf_check)
+ ftsoptions |= FTS_NOLEAF;
+
p = fts_open (arglist, ftsoptions, NULL);
if (NULL == p)
{
--
2.5.0

View File

@ -1,29 +0,0 @@
From 129f23ce758620fade812baab811379ce8454048 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Fri, 27 Jan 2017 11:44:41 +0100
Subject: [PATCH] test-lock: disable the rwlock test
It hangs indefinitely if the system rwlock implementation does not
prevent writer starvation (and glibc does not implement it).
Bug: http://www.mail-archive.com/bug-gnulib@gnu.org/msg33017.html
---
gnulib-tests/test-lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnulib-tests/test-lock.c b/gnulib-tests/test-lock.c
index a992f64..fd9c014 100644
--- a/gnulib-tests/test-lock.c
+++ b/gnulib-tests/test-lock.c
@@ -42,7 +42,7 @@
Uncomment some of these, to verify that all tests crash if no locking
is enabled. */
#define DO_TEST_LOCK 1
-#define DO_TEST_RWLOCK 1
+#define DO_TEST_RWLOCK 0
#define DO_TEST_RECURSIVE_LOCK 1
#define DO_TEST_ONCE 1
--
2.7.4

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEpRidtpwRZNMwApNmRlAu95aRcZUFAmH50AcACgkQRlAu95aR
cZU/DQgAjt38b5+7CREWR7rk9y/NRvc+xAg7wMfwjt90cAycjRZ7hMVviB7R+MhO
1rrV+4UkKCYzBzks5FIhN00IwmXoe0VPeH17ATtSB6c70rBNwHE7CWcGz2cnqHBQ
CzPBy3hXEq7YY1kq7bfZCkTTEnxve9eKrgoczj/NpxvxoRkLmXzzKd0ChvHLlYJl
m0GrPAl81eUF2vYIo5/9F28AR2mfCv1cwzsb1Ch3WEXqZB2tcIKsocrO4AVVpkmD
o1pmPZa1FTKPI4YdBOlOuWUYkf6rD7WEKTcFmXrafkPlzhY4HJyN35XslAllJg6w
81EbRarQvxrVDuxoS0jnx0oMvV7jxg==
=hp30
-----END PGP SIGNATURE-----

View File

@ -1,38 +1,37 @@
Summary: The GNU versions of find utilities (find and xargs)
Name: findutils
Version: 4.9.0
Release: 2%{?dist}
Version: 4.5.11
Release: 4%{?dist}
Epoch: 1
License: GPLv3+
URL: https://www.gnu.org/software/findutils/
Source0: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.xz
Group: Applications/File
URL: http://www.gnu.org/software/findutils/
Source0: ftp://alpha.gnu.org/gnu/findutils/%{name}-%{version}.tar.gz
# do not build locate
Patch1: findutils-4.5.15-no-locate.patch
Patch1: findutils-4.4.0-no-locate.patch
# add -xautofs option to not descend into directories on autofs file systems
Patch2: findutils-4.4.2-xautofs.patch
# add a new option -xautofs to find to not descend into directories on autofs
# file systems
Patch3: findutils-4.4.2-xautofs.patch
# eliminate compile-time warnings
Patch3: findutils-4.5.13-warnings.patch
Patch4: findutils-4.5.7-warnings.patch
# test-lock: disable the rwlock test
Patch4: findutils-4.6.0-test-lock.patch
# implement the -noleaf option of find (#1252549)
Patch5: findutils-4.6.0-leaf-opt.patch
# remove support for obsolete -perm +MODE syntax (#982503)
Patch5: findutils-4.5.11-perm-mode.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Conflicts: filesystem < 3
Provides: /bin/find
Provides: bundled(gnulib)
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: automake
BuildRequires: dejagnu
BuildRequires: gettext-devel
BuildRequires: gcc
BuildRequires: git
BuildRequires: libselinux-devel
BuildRequires: make
BuildRequires: texinfo
%description
@ -47,246 +46,58 @@ You should install findutils because it includes tools that are very
useful for finding things on your system.
%prep
%autosetup -N -S git
%setup -q
rm -rf locate
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
# drop the source code of locate
git rm -q -r locate
git commit -q -m "drop the source code of locate"
# remove ignored files from git and mark them as ignored
tee -a .gitignore << EOF
*~
Makefile.in
/aclocal.m4
/autom4te.cache
/build
/configure
/doc/find.info*
/doc/stamp-vti
/doc/version.texi
EOF
git rm -q -r --cached .
git add --all .
git commit -m "remove ignored files from git"
# apply all patches
%autopatch
# needed because of findutils-4.5.15-no-locate.patch
autoreconf -fiv
git add --all .
git commit -q -m "after invocation of autoreconf"
# needed because of findutils-4.4.0-no-locate.patch
autoreconf -iv
%build
# disable -flto on ppc64le to make test-float pass (#1789115)
%ifarch ppc64le
export CFLAGS="$RPM_OPT_FLAGS -fno-lto"
%endif
mkdir build
cd build
%global _configure ../configure
%configure
%make_build
# uncomment to turn off optimizations
#find -name Makefile | xargs sed -i 's/-O2/-O0/'
make %{?_smp_mflags}
%check
make %{?_smp_mflags} check -C build V=1
make check
%install
%make_install -C build
make install DESTDIR=$RPM_BUILD_ROOT
rm -f %{buildroot}%{_infodir}/dir
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%find_lang %{name}
%post
if [ -f %{_infodir}/find.info.gz ]; then
/sbin/install-info %{_infodir}/find.info.gz %{_infodir}/dir || :
fi
%preun
if [ $1 = 0 ]; then
if [ -f %{_infodir}/find.info.gz ]; then
/sbin/install-info --delete %{_infodir}/find.info.gz %{_infodir}/dir || :
fi
fi
%files -f %{name}.lang
%license COPYING
%doc AUTHORS NEWS README THANKS TODO
%doc AUTHORS COPYING NEWS README THANKS TODO ChangeLog
%{_bindir}/find
%{_bindir}/oldfind
%{_bindir}/xargs
%{_mandir}/man1/find.1*
%{_mandir}/man1/oldfind.1*
%{_mandir}/man1/xargs.1*
%{_infodir}/find.info*
%{_infodir}/find-maint.info.*
%{_infodir}/find-maint.info.gz
%changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Feb 02 2022 Kamil Dudka <kdudka@redhat.com> - 1:4.9.0-1
- new upstream release
* Mon Jan 24 2022 Kamil Dudka <kdudka@redhat.com> - 1:4.8.0-6
- make findutils build on 32bit x86
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue May 25 2021 Florian Weimer <fweimer@redhat.com> - 1:4.8.0-3
- Rebuild with new binutils to fix ppc64le corruption (#1960730)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 09 2021 Kamil Dudka <kdudka@redhat.com> - 1:4.8.0-1
- new upstream release
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 24 2020 Kamil Dudka <kdudka@redhat.com> - 1:4.7.0-6
- disable -flto on ppc64le to make test-float pass (#1789115)
- do not compile with -D__SUPPORT_SNAN__ (#1294016)
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 1:4.7.0-5
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Fri Apr 17 2020 Kamil Dudka <kdudka@redhat.com> - 1:4.7.0-4
- simplify leaf optimization for XFS (#1823247)
* Tue Feb 11 2020 Kamil Dudka <kdudka@redhat.com> - 1:4.7.0-3
- make upstream test-suite work with root privileges (#1799064)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Aug 30 2019 Kamil Dudka <kdudka@redhat.com> - 1:4.7.0-1
- new upstream release
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 1:4.6.0-23
- Remove hardcoded gzip suffix from GNU info pages
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Nov 05 2018 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-21
- fix programming mistakes detected by static analysis
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Apr 20 2018 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-19
- fix crash caused by mistakenly enabled leaf optimization (#1558249)
* Tue Mar 06 2018 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-18
- fix build failure with glibc-2.28
* Mon Feb 19 2018 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-17
- add explicit BR for the gcc compiler
* Mon Feb 12 2018 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-16
- import gnulib's FTS module from upstream commit 281b825e (#1544429)
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Mar 02 2017 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-12
- drop ppc64le workaround no longer needed (#1417753)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 30 2017 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-10
- avoid using broken memcmp() code that gcc generates on ppc64le (#1417753)
* Fri Jan 27 2017 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-9
- add explicit BR for git as we use it in %%prep
* Fri Sep 16 2016 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-8
- disable leaf optimization for NFS (#1299169)
* Fri Jun 24 2016 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-7
- bump release to preserve upgrade path f24 -> f25
* Fri Jun 17 2016 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-6
- use %%autosetup to create a git repo in %%prep
- use out of source build
- avoid SIGSEGV in case the internal -noop option is used (#1346471)
* Tue May 31 2016 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-5
- make sure that find -exec + passes all arguments (upstream bug #48030)
* Mon Apr 18 2016 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-4
- clarify exit status handling of -exec cmd {} + in find(1) man page (#1325049)
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jan 06 2016 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-2
- prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016)
- prevent mbrtowc tests from failing (#1294016)
* Tue Dec 29 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.6.0-1
- new upstream release
- drop oldfind(1) no longer supported by upstream
* Fri Dec 25 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.5.16-1
- new upstream release
* Mon Dec 21 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.5.15-2
- enable leaf optimization for XFS and NFS (#1252549)
* Sat Dec 19 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.5.15-1
- new upstream release
* Tue Jul 07 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.5.14-7
- make the test-suite ready for Perl 5.22 (#1239501)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.5.14-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Mar 18 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.5.14-5
- make the test-suite ready for Python 3
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1:4.5.14-4
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Mon Feb 16 2015 Kamil Dudka <kdudka@redhat.com> - 1:4.5.14-3
- fix a crash triggered by recursive bind mount (#1188498)
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.5.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Mon Jul 21 2014 Kamil Dudka <kdudka@redhat.com> - 1:4.5.14-1
- new upstream release
* Wed Jul 16 2014 Kamil Dudka <kdudka@redhat.com> - 1:4.5.13-1
- new upstream release
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 1:4.5.12-6
- fix license handling
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.5.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Jun 02 2014 Kamil Dudka <kdudka@redhat.com> 1:4.5.12-4
- eliminate failure of gnulib tests on little-endian PowerPC (#1083145)
* Sat May 31 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1:4.5.12-3
- drop ChangeLog, the NEWS file contains details back to 1993 to satisfy even
the most bored sysadmin
* Mon Sep 23 2013 Kamil Dudka <kdudka@redhat.com> - 1:4.5.12-2
- silence GCC warnings
* Mon Sep 23 2013 Kamil Dudka <kdudka@redhat.com> - 1:4.5.12-1
- new upstream release
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.5.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (findutils-4.9.0.tar.xz) = ba4844f4403de0148ad14b46a3dbefd5a721f6257c864bf41a6789b11705408524751c627420b15a52af95564d8e5b52f0978474f640a62ab86a41d20cf14be9
05307c7b283873d6da03fd6ada36895a findutils-4.5.11.tar.gz

View File

@ -1,63 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/findutils/Sanity/smoke
# Description: Smoke test for find and xargs.
# Author: Branislav Nater <bnater@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/findutils/Sanity/smoke
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Branislav Nater <bnater@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Smoke test for find and xargs." >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: findutils" >> $(METADATA)
@echo "Requires: findutils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -1,3 +0,0 @@
PURPOSE of /CoreOS/findutils/Sanity/smoke
Description: Smoke test for find and xargs.
Author: Branislav Nater <bnater@redhat.com>

View File

@ -1,64 +0,0 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/findutils/Sanity/smoke
# Description: Smoke test for find and xargs.
# Author: Branislav Nater <bnater@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/lib/beakerlib/beakerlib.sh || exit 1
PACKAGE="findutils"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "touch \"file with spaces\"" 0
rlRun "mkdir dir" 0
rlRun "touch dir/file1" 0
rlPhaseEnd
rlGetTestState && {
rlPhaseStartTest
rlRun "find . -name \"file*\" -type f | tee output | wc -l > wcout" 0
cat output
rlAssertGrep 2 wcout
rlRun "find $TmpDir -mindepth 1 -type d | tee output | wc -l > wcout" 0
cat output
rlAssertGrep 1 wcout
rlRun "find $TmpDir -name \"file*\" -print0 | xargs -0 ls -l | tee output | wc -l > wcout" 0
cat output
rlAssertGrep 2 wcout
rlPhaseEnd
}
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd
rlJournalPrintText

View File

@ -1,14 +0,0 @@
---
# Tests which will run in all contexts
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
- container
- atomic
tests:
- smoke
- xautofs
required_packages:
- autofs # autofs required for xautofs test

View File

@ -1,65 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/findutils/Sanity/options/xautofs
# Description: Check xautofs option
# Author: Petr Splichal <psplicha@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/findutils/Sanity/options/xautofs
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Branislav Nater <bnater@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Check xautofs option" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: findutils" >> $(METADATA)
@echo "Requires: autofs findutils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 485672 529391" >> $(METADATA)
@echo "Releases: -RHEL3 -RHEL4" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -1,8 +0,0 @@
PURPOSE of /CoreOS/findutils/Sanity/options/xautofs
Description: Check xautofs option
Author: Petr Splichal <psplicha@redhat.com>
Bug summary: [RFE] Modify find to be able to skip direct mapped autofs mounts
Bugzilla link: None
Check that the new -xautofs option works as expected: make sure
find does not descend into directories on autofs filesystems.

View File

@ -1,90 +0,0 @@
#!/bin/bash
# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/findutils/Sanity/options/xautofs
# Description: Check xautofs option
# Author: Petr Splichal <psplicha@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/share/rhts-library/rhtslib.sh
PACKAGE="findutils"
MasterConf="/etc/auto.master"
DirectConf="/etc/auto.direct"
MountDir="/mnt/findutils"
AutomountDir="$MountDir/etc"
RegularDir="$MountDir/regular/directory/master"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm "autofs"
rlRun "set -o pipefail"
# create dirs & back up
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "mkdir -p $RegularDir" 0 "Creating regular directory"
rlRun "rlFileBackup $MasterConf"
# set up autofs
rlRun "echo '/- /etc/auto.direct' > $MasterConf" \
0 "Setting up autofs master map"
rlRun "echo '$AutomountDir localhost:/etc' > $DirectConf" \
0 "Setting up autofs direct map"
# RHEL-7 is using xfs
rlIsRHEL 4 5 6 && fs="ext[34]" || fs="xfs"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "Without -xautofs option"
rlRun "rlServiceStart autofs" 0 "Starting autofs"
rlAssertNotGrep "$AutomountDir.*$fs" "/proc/mounts"
rlRun "find $MountDir -noleaf -name '*master*' | tee filelist"
rlAssertGrep "$RegularDir" "filelist"
rlAssertGrep "$MountDir$MasterConf" "filelist"
rlAssertGrep "$AutomountDir.*$fs" "/proc/mounts"
rlPhaseEnd
rlPhaseStartTest "With -xautofs option"
rlRun "rlServiceStart autofs" 0 "Starting autofs"
rlAssertNotGrep "$AutomountDir.*$fs" "/proc/mounts"
rlRun "find $MountDir -xautofs -noleaf -name '*master*' | tee filelist"
rlAssertGrep "$RegularDir" "filelist"
rlAssertNotGrep "$MountDir$MasterConf" "filelist"
rlAssertNotGrep "$AutomountDir.*$fs" "/proc/mounts"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rlFileRestore"
rlRun "rlServiceRestore autofs"
rlRun "rm -r $TmpDir $DirectConf $MountDir" 0 "Removing tmp files"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd