From 3361f626e0ca0bad99cfd8c3122d67211c2c6217 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sat, 12 Jul 2014 10:50:31 -0400 Subject: [PATCH 1/6] fix license handling --- findutils.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/findutils.spec b/findutils.spec index 7ea0d78..4fe4e8f 100644 --- a/findutils.spec +++ b/findutils.spec @@ -1,7 +1,7 @@ Summary: The GNU versions of find utilities (find and xargs) Name: findutils Version: 4.5.12 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 License: GPLv3+ Group: Applications/File @@ -87,7 +87,9 @@ if [ $1 = 0 ]; then fi %files -f %{name}.lang -%doc AUTHORS COPYING NEWS README THANKS TODO +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc AUTHORS NEWS README THANKS TODO %{_bindir}/find %{_bindir}/oldfind %{_bindir}/xargs @@ -98,6 +100,9 @@ fi %{_infodir}/find-maint.info.gz %changelog +* Sat Jul 12 2014 Tom Callaway - 1:4.5.12-6 +- fix license handling + * Sat Jun 07 2014 Fedora Release Engineering - 1:4.5.12-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 078307fcf61df70ab7a77c8af3c3880012c6ed3a Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 16 Jul 2014 11:55:50 +0200 Subject: [PATCH 2/6] remove left over files from the repository --- findutils-4.5.10-automake.patch | 26 -------------------------- findutils-4.5.10-gets.patch | 29 ----------------------------- findutils-4.5.9.tar.gz.sig | Bin 152 -> 0 bytes 3 files changed, 55 deletions(-) delete mode 100644 findutils-4.5.10-automake.patch delete mode 100644 findutils-4.5.10-gets.patch delete mode 100644 findutils-4.5.9.tar.gz.sig diff --git a/findutils-4.5.10-automake.patch b/findutils-4.5.10-automake.patch deleted file mode 100644 index 50e29c2..0000000 --- a/findutils-4.5.10-automake.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4a848a5e9bda989f9fd31ab4b388e6849ea6381e Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Tue, 28 Aug 2012 16:54:15 +0200 -Subject: [PATCH] configure.ac: do not use the AM_C_PROTOTYPES macro - -It was removed in Automake 1.12. ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 704b5ea..038a3d8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -77,7 +77,7 @@ AC_PROG_CPP - dnl for gnulib - gl_EARLY - --AM_C_PROTOTYPES -+dnl AM_C_PROTOTYPES - - AC_PROG_INSTALL - AC_PROG_RANLIB --- -1.7.1 - diff --git a/findutils-4.5.10-gets.patch b/findutils-4.5.10-gets.patch deleted file mode 100644 index 24eecc3..0000000 --- a/findutils-4.5.10-gets.patch +++ /dev/null @@ -1,29 +0,0 @@ -From fe7079ab7e5794b9222af5e56c6f25b424ca72f3 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Tue, 28 Aug 2012 17:24:21 +0200 -Subject: [PATCH] gnulib: do not require gets() to be declared - ---- - gnulib/lib/stdio.in.h | 6 ------ - 1 files changed, 0 insertions(+), 6 deletions(-) - -diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h -index 57e93ba..b1e5bb6 100644 ---- a/gnulib/lib/stdio.in.h -+++ b/gnulib/lib/stdio.in.h -@@ -175,12 +175,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); - #endif - --/* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ --#undef gets --_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -- - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) --- -1.7.1 - diff --git a/findutils-4.5.9.tar.gz.sig b/findutils-4.5.9.tar.gz.sig deleted file mode 100644 index 12cc6eedda37b3c3559c0c1a5e13e6eb5b67376d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 152 zcmV;J0B8S+0F?s;0882cf}vY-S!AhRw=ARCDrTSmH2?C3qC2R;sIu(cs7EsynU6VS(_ady|$H}3?yjwmuSKt6k zoE~~^=Px!>L$104;C Date: Sat, 16 Aug 2014 12:26:25 +0000 Subject: [PATCH 3/6] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- findutils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/findutils.spec b/findutils.spec index 4fe4e8f..36c43a2 100644 --- a/findutils.spec +++ b/findutils.spec @@ -1,7 +1,7 @@ Summary: The GNU versions of find utilities (find and xargs) Name: findutils Version: 4.5.12 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 License: GPLv3+ Group: Applications/File @@ -100,6 +100,9 @@ fi %{_infodir}/find-maint.info.gz %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1:4.5.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jul 12 2014 Tom Callaway - 1:4.5.12-6 - fix license handling From 5fb1704fa9edfda7f784fe0b06e165adfd3e6160 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 11 Feb 2015 16:06:21 +0100 Subject: [PATCH 4/6] Resolve: #1188498 - fix a crash triggered by recursive bind mount --- findutils-4.5.12-fts-cycle.patch | 40 ++++++++++++++++++++++++++++++++ findutils.spec | 5 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 findutils-4.5.12-fts-cycle.patch diff --git a/findutils-4.5.12-fts-cycle.patch b/findutils-4.5.12-fts-cycle.patch new file mode 100644 index 0000000..b67c36b --- /dev/null +++ b/findutils-4.5.12-fts-cycle.patch @@ -0,0 +1,40 @@ +From 8ec378f9a0211e98179a8230da2eda20782d0a11 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Wed, 11 Feb 2015 13:48:12 +0100 +Subject: [PATCH] fts: fix a crash triggered by recursive bind mount + +Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498 +* lib/fts.c (fts_read): Avoid removing the original hash table item +when leaving a directory that caused a cycle, and preserve the FTS_DC +flag. +--- + gl/lib/fts.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/gl/lib/fts.c b/gl/lib/fts.c +index 9c38c4f..9b97fe3 100644 +--- a/gl/lib/fts.c ++++ b/gl/lib/fts.c +@@ -1091,9 +1091,16 @@ cd_dot_dot: + p->fts_errno = errno; + SET(FTS_STOP); + } +- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; +- if (p->fts_errno == 0) +- LEAVE_DIR (sp, p, "3"); ++ ++ /* If the directory causes a cycle, preserve the FTS_DC flag and keep ++ * the corresponding dev/ino pair in the hash table. It is going to be ++ * removed when leaving the original directory. ++ */ ++ if (p->fts_info != FTS_DC) { ++ p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; ++ if (p->fts_errno == 0) ++ LEAVE_DIR (sp, p, "3"); ++ } + return ISSET(FTS_STOP) ? NULL : p; + } + +-- +2.1.0 + diff --git a/findutils.spec b/findutils.spec index 36c43a2..ea53ca0 100644 --- a/findutils.spec +++ b/findutils.spec @@ -1,7 +1,7 @@ Summary: The GNU versions of find utilities (find and xargs) Name: findutils Version: 4.5.12 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 License: GPLv3+ Group: Applications/File @@ -11,6 +11,8 @@ Source0: ftp://alpha.gnu.org/gnu/findutils/%{name}-%{version}.tar.gz # do not build locate Patch1: findutils-4.4.0-no-locate.patch +Patch2: findutils-4.5.12-fts-cycle.patch + # add a new option -xautofs to find to not descend into directories on autofs # file systems Patch3: findutils-4.4.2-xautofs.patch @@ -49,6 +51,7 @@ useful for finding things on your system. %setup -q rm -rf locate %patch1 -p1 +%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 From 619ad1aa6fe116b1dfaa693e5b0236eaf9cf4a35 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 16 Feb 2015 14:37:40 +0100 Subject: [PATCH 5/6] Related: #1188498 - fixup the previous commit ... pushed too early by mistake --- ...fts-cycle.patch => findutils-4.5.14-fts-cycle.patch | 10 +++++++--- findutils.spec | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) rename findutils-4.5.12-fts-cycle.patch => findutils-4.5.14-fts-cycle.patch (77%) diff --git a/findutils-4.5.12-fts-cycle.patch b/findutils-4.5.14-fts-cycle.patch similarity index 77% rename from findutils-4.5.12-fts-cycle.patch rename to findutils-4.5.14-fts-cycle.patch index b67c36b..2eb73cd 100644 --- a/findutils-4.5.12-fts-cycle.patch +++ b/findutils-4.5.14-fts-cycle.patch @@ -1,18 +1,22 @@ -From 8ec378f9a0211e98179a8230da2eda20782d0a11 Mon Sep 17 00:00:00 2001 +From bf4d8abd7ae3624a13967275dcbaea19f6b6ceb5 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 11 Feb 2015 13:48:12 +0100 -Subject: [PATCH] fts: fix a crash triggered by recursive bind mount +Subject: [PATCH] fts: avoid crash when a cycle is added while traversing +This could be triggered by auto-mounting a recursive bind mount. Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498 * lib/fts.c (fts_read): Avoid removing the original hash table item when leaving a directory that caused a cycle, and preserve the FTS_DC flag. + +Bug: https://bugzilla.redhat.com/1188498 +Bug: http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/34867 --- gl/lib/fts.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gl/lib/fts.c b/gl/lib/fts.c -index 9c38c4f..9b97fe3 100644 +index 500e92c..f76c015 100644 --- a/gl/lib/fts.c +++ b/gl/lib/fts.c @@ -1091,9 +1091,16 @@ cd_dot_dot: diff --git a/findutils.spec b/findutils.spec index ea53ca0..ea900c6 100644 --- a/findutils.spec +++ b/findutils.spec @@ -11,7 +11,8 @@ Source0: ftp://alpha.gnu.org/gnu/findutils/%{name}-%{version}.tar.gz # do not build locate Patch1: findutils-4.4.0-no-locate.patch -Patch2: findutils-4.5.12-fts-cycle.patch +# fix a crash triggered by recursive bind mount (#1188498) +Patch2: findutils-4.5.14-fts-cycle.patch # add a new option -xautofs to find to not descend into directories on autofs # file systems @@ -103,6 +104,9 @@ fi %{_infodir}/find-maint.info.gz %changelog +* Mon Feb 16 2015 Kamil Dudka - 1:4.5.12-8 +- fix a crash triggered by recursive bind mount (#1188498) + * Sat Aug 16 2014 Fedora Release Engineering - 1:4.5.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From e7c818db3d3f5784bf77e9b8ae8e5d830f02c762 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Thu, 11 Jun 2015 15:34:25 +0200 Subject: [PATCH 6/6] Adding STAGE1 bootstrap recipe --- STAGE1-findutils | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 STAGE1-findutils diff --git a/STAGE1-findutils b/STAGE1-findutils new file mode 100644 index 0000000..c3f338d --- /dev/null +++ b/STAGE1-findutils @@ -0,0 +1,9 @@ +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}