forked from pool/findutils
Accepting request 280066 from home:bernhard-voelker:branches:Base:System
- findutils-oldfind-fix-dotdot-skipping.patch: Add upstream patch to fix 'oldfind' which skipped all files starting with ".." (e.g. "..file"). - findutils.spec: Add BuildRequires:dejagnu - otherwise only a very limited set of the tests was run by 'make check'. OBS-URL: https://build.opensuse.org/request/show/280066 OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=58
This commit is contained in:
parent
590c1438c7
commit
8ab91647aa
100
findutils-oldfind-fix-dotdot-skipping.patch
Normal file
100
findutils-oldfind-fix-dotdot-skipping.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
Upstream patch to fix a problem in oldfind(1) skipping files starting with "..".
|
||||||
|
http://lists.gnu.org/archive/html/findutils-patches/2014-12/msg00004.html
|
||||||
|
|
||||||
|
2 patches squashed together:
|
||||||
|
- the fix by Phil Miller in find/find.c,
|
||||||
|
- the test for it by Bernhard Voelker.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
From 286a2ff1d1bb71837c72d44c88da8ba3827906d4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Phil Miller <mille121@illinois.edu>
|
||||||
|
Date: Mon, 29 Dec 2014 16:27:49 -0600
|
||||||
|
Subject: [PATCH] oldfind: Don't skip names matching ..*
|
||||||
|
|
||||||
|
Prevent errors like the following:
|
||||||
|
|
||||||
|
$ mkdir test
|
||||||
|
$ touch test/..test
|
||||||
|
$ oldfind test
|
||||||
|
test
|
||||||
|
|
||||||
|
Note that the file "test/..test" was not listed.
|
||||||
|
|
||||||
|
* find/find.c (process_dir): When skipping a directory's self and
|
||||||
|
parent entries, don't also skip other entries that happen to begin
|
||||||
|
with "..".
|
||||||
|
|
||||||
|
Copyright-paperwork-exempt: yes
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
From bebee334524bc7c23ebc2db27f97094989a7de5d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bernhard Voelker <mail@bernhard-voelker.de>
|
||||||
|
Date: Tue, 30 Dec 2014 14:38:56 +0100
|
||||||
|
Subject: [PATCH] tests: add test for the previously fixed regression
|
||||||
|
|
||||||
|
* find/testsuite/find.posix/dotdotfiles.exp: Add test to verify
|
||||||
|
oldfind(1) does not skip directory entries starting with "..".
|
||||||
|
* find/testsuite/find.posix/dotdotfiles.xo: Add expected output
|
||||||
|
for the above test.
|
||||||
|
* find/testsuite/Makefile.am (EXTRA_DIST_XO, EXTRA_DIST_EXP):
|
||||||
|
Mention the above new test files.
|
||||||
|
---
|
||||||
|
find/find.c | 4 +++-
|
||||||
|
find/testsuite/Makefile.am | 2 ++
|
||||||
|
find/testsuite/find.posix/dotdotfiles.exp | 7 +++++++
|
||||||
|
find/testsuite/find.posix/dotdotfiles.xo | 2 ++
|
||||||
|
5 files changed, 16 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: find/find.c
|
||||||
|
===================================================================
|
||||||
|
--- find/find.c.orig
|
||||||
|
+++ find/find.c
|
||||||
|
@@ -1441,7 +1441,9 @@ process_dir (char *pathname, char *name,
|
||||||
|
namep = dp->d_name;
|
||||||
|
/* Skip "", ".", and "..". "" is returned by at least one buggy
|
||||||
|
implementation: Solaris 2.4 readdir on NFS file systems. */
|
||||||
|
- if (!namep[0] || (namep[0] == '.' && (namep[1] == '.' || namep[1] == 0)))
|
||||||
|
+ if (!namep[0] ||
|
||||||
|
+ (namep[0] == '.' && (namep[1] == 0 ||
|
||||||
|
+ (namep[1] == '.' && namep[2] == 0))))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: find/testsuite/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- find/testsuite/Makefile.am.orig
|
||||||
|
+++ find/testsuite/Makefile.am
|
||||||
|
@@ -73,6 +73,7 @@ find.gnu/quit.xo \
|
||||||
|
find.gnu/xtype.xo \
|
||||||
|
find.posix/and.xo \
|
||||||
|
find.posix/depth1.xo \
|
||||||
|
+find.posix/dotdotfiles.xo \
|
||||||
|
find.posix/exec-nogaps.xo \
|
||||||
|
find.posix/exec-one.xo \
|
||||||
|
find.posix/files-not-expressions1.xo \
|
||||||
|
@@ -189,6 +190,7 @@ find.gnu/xtype.exp \
|
||||||
|
find.posix/and.exp \
|
||||||
|
find.posix/bracket-depth.exp \
|
||||||
|
find.posix/depth1.exp \
|
||||||
|
+find.posix/dotdotfiles.exp \
|
||||||
|
find.posix/empty-parens.exp \
|
||||||
|
find.posix/exec-nogaps.exp \
|
||||||
|
find.posix/exec-one.exp \
|
||||||
|
Index: find/testsuite/find.posix/dotdotfiles.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ find/testsuite/find.posix/dotdotfiles.exp
|
||||||
|
@@ -0,0 +1,7 @@
|
||||||
|
+# Test entries starting with "..", e.g. "..tmp".
|
||||||
|
+# Commit v4.5.10-95-ga29e61b introduced a regression
|
||||||
|
+# which made oldfind(1) skip such entries.
|
||||||
|
+exec rm -rf tmp
|
||||||
|
+exec mkdir tmp tmp/..tmp
|
||||||
|
+find_start p {tmp}
|
||||||
|
+exec rm -rf tmp
|
||||||
|
Index: find/testsuite/find.posix/dotdotfiles.xo
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ find/testsuite/find.posix/dotdotfiles.xo
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+tmp
|
||||||
|
+tmp/..tmp
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 6 16:44:55 UTC 2015 - mail@bernhard-voelker.de
|
||||||
|
|
||||||
|
- findutils-oldfind-fix-dotdot-skipping.patch: Add upstream patch
|
||||||
|
to fix 'oldfind' which skipped all files starting with ".."
|
||||||
|
(e.g. "..file").
|
||||||
|
- findutils.spec: Add BuildRequires:dejagnu - otherwise only a
|
||||||
|
very limited set of the tests was run by 'make check'.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 3 22:56:51 UTC 2014 - mail@bernhard-voelker.de
|
Sun Aug 3 22:56:51 UTC 2014 - mail@bernhard-voelker.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package findutils
|
# spec file for package findutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -28,7 +28,12 @@ Source: http://alpha.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
|
|||||||
Patch0: findutils-4.4.2-xautofs.patch
|
Patch0: findutils-4.4.2-xautofs.patch
|
||||||
# Fix imported gnulib long double math tests for little-endian PowerPC
|
# Fix imported gnulib long double math tests for little-endian PowerPC
|
||||||
Patch1: findutils-gnulib-ppc64le.patch
|
Patch1: findutils-gnulib-ppc64le.patch
|
||||||
|
# Upstream patch to fix a problem in oldfind(1) skipping files starting with "..".
|
||||||
|
Patch2: findutils-oldfind-fix-dotdot-skipping.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
# BuildRequire dejagnu for 'runtest' to execute all tests.
|
||||||
|
BuildRequires: dejagnu
|
||||||
%if 0%{?suse_version} > 1100
|
%if 0%{?suse_version} > 1100
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
%endif
|
%endif
|
||||||
@ -56,6 +61,7 @@ useful for finding things on your system.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0
|
||||||
%patch1
|
%patch1
|
||||||
|
%patch2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?qemu_user_space_build}
|
%if 0%{?qemu_user_space_build}
|
||||||
|
Loading…
Reference in New Issue
Block a user