Accepting request 923326 from Base:System
OBS-URL: https://build.opensuse.org/request/show/923326 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/findutils?expand=0&rev=68
This commit is contained in:
commit
ccdf605a2d
@ -11,7 +11,7 @@ Index: doc/find.texi
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- doc/find.texi.orig
|
--- doc/find.texi.orig
|
||||||
+++ doc/find.texi
|
+++ doc/find.texi
|
||||||
@@ -1475,6 +1475,10 @@ them.
|
@@ -1519,6 +1519,10 @@ them.
|
||||||
There are two ways to avoid searching certain filesystems. One way is
|
There are two ways to avoid searching certain filesystems. One way is
|
||||||
to tell @code{find} to only search one filesystem:
|
to tell @code{find} to only search one filesystem:
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ Index: find/find.1
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- find/find.1.orig
|
--- find/find.1.orig
|
||||||
+++ find/find.1
|
+++ find/find.1
|
||||||
@@ -567,6 +567,9 @@ to stat them; this gives a significant i
|
@@ -576,6 +576,9 @@ to stat them; this gives a significant i
|
||||||
.IP "\-version, \-\-version"
|
.IP "\-version, \-\-version"
|
||||||
Print the \fBfind\fR version number and exit.
|
Print the \fBfind\fR version number and exit.
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ Index: find/ftsfind.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- find/ftsfind.c.orig
|
--- find/ftsfind.c.orig
|
||||||
+++ find/ftsfind.c
|
+++ find/ftsfind.c
|
||||||
@@ -479,6 +479,12 @@ consider_visiting (FTS *p, FTSENT *ent)
|
@@ -432,6 +432,12 @@ consider_visiting (FTS *p, FTSENT *ent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ Index: find/parser.c
|
|||||||
PARSE_TEST ("xtype", xtype), /* GNU */
|
PARSE_TEST ("xtype", xtype), /* GNU */
|
||||||
#ifdef UNIMPLEMENTED_UNIX
|
#ifdef UNIMPLEMENTED_UNIX
|
||||||
/* It's pretty ugly for find to know about archive formats.
|
/* It's pretty ugly for find to know about archive formats.
|
||||||
@@ -2604,6 +2606,16 @@ parse_xdev (const struct parser_table* e
|
@@ -2595,6 +2597,16 @@ parse_xdev (const struct parser_table* e
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 4 23:23:36 UTC 2021 - Bernhard Voelker <mail@bernhard-voelker.de>
|
||||||
|
|
||||||
|
- gnulib-port-year2038-to-glibc-2.34.patch: Add patch to avoid
|
||||||
|
build failure regarding 64-bit time_t on i586 with glibc-2.34.
|
||||||
|
- findutils.spec: Reference it, and add BR:automake and run 'autoreconf'.
|
||||||
|
While at it, remove obsolete condition for suse_version 1100.
|
||||||
|
- findutils-xautofs.patch: Refresh.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 19 10:33:38 UTC 2021 - Christian Vögl <christian.voegl@suse.com>
|
Mon Apr 19 10:33:38 UTC 2021 - Christian Vögl <christian.voegl@suse.com>
|
||||||
|
|
||||||
|
@ -41,14 +41,18 @@ Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
|||||||
Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring
|
Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring
|
||||||
# adds a new option -xautofs to find to not descend into directories on autofs file systems
|
# adds a new option -xautofs to find to not descend into directories on autofs file systems
|
||||||
Patch0: findutils-xautofs.patch
|
Patch0: findutils-xautofs.patch
|
||||||
|
|
||||||
|
# Upstream gnulib patch to avoid i586 build failure with glibc-2.34; remove with findutils>4.8.0.
|
||||||
|
# Requires installed automake and running 'autoreconf -fi' below.
|
||||||
|
Patch100: gnulib-port-year2038-to-glibc-2.34.patch
|
||||||
|
BuildRequires: automake
|
||||||
|
|
||||||
# BuildRequire dejagnu for 'runtest' to execute all tests.
|
# BuildRequire dejagnu for 'runtest' to execute all tests.
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
BuildRequires: makeinfo
|
BuildRequires: makeinfo
|
||||||
Provides: find = %{version}
|
Provides: find = %{version}
|
||||||
Obsoletes: find < %{version}
|
Obsoletes: find < %{version}
|
||||||
%if 0%{?suse_version} > 1100
|
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The findutils package contains programs which will help you locate
|
The findutils package contains programs which will help you locate
|
||||||
@ -66,8 +70,12 @@ useful for finding things on your system.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0
|
||||||
|
%patch100
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# Patch100 requires to refresh 'configure'; remove with findutils>4.8.0.
|
||||||
|
AUTOPOINT=true autoreconf -fi
|
||||||
|
|
||||||
%if 0%{?qemu_user_space_build}
|
%if 0%{?qemu_user_space_build}
|
||||||
# this is a workaround for a qemu-user bug, we hit. A qemu patch is being discussed, but for now ...
|
# this is a workaround for a qemu-user bug, we hit. A qemu patch is being discussed, but for now ...
|
||||||
export DEFAULT_ARG_SIZE="(31u * 1024u)"
|
export DEFAULT_ARG_SIZE="(31u * 1024u)"
|
||||||
|
241
gnulib-port-year2038-to-glibc-2.34.patch
Normal file
241
gnulib-port-year2038-to-glibc-2.34.patch
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
Upstream gnulib patches regarding the 'year2038' module.
|
||||||
|
|
||||||
|
Port the gnulib module year2038 to glibc-2.34.
|
||||||
|
|
||||||
|
Avoid the following build error regarding 64-bit time_t on i586 with glibc-2.34:
|
||||||
|
|
||||||
|
[ 166s] checking for 64-bit time_t... no
|
||||||
|
[ 166s] configure: error: in `/home/abuild/rpmbuild/BUILD/findutils-4.8.0':
|
||||||
|
[ 166s] configure: error: This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS="-m64" LDFLAGS="-m64"'. To build with a 32-bit time_t anyway (not recommended), configure with 'TIME_T_32_BIT_OK=yes'.
|
||||||
|
|
||||||
|
This patch squashes the M4 changes (no doc etc.) of the following upstream
|
||||||
|
gnulib commits related to the 'year2038' module:
|
||||||
|
|
||||||
|
* https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=dc09dc088848
|
||||||
|
* https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=7dd2562058aa
|
||||||
|
* https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=784f55e5c59a
|
||||||
|
* https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=7c6538cf0584
|
||||||
|
* https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=edb4fbdc9596
|
||||||
|
|
||||||
|
This patch changes m4 files in gnulib and therefore requires
|
||||||
|
'autoreconf -fi' to be run.
|
||||||
|
---
|
||||||
|
gl/m4/largefile.m4 | 28 ++-
|
||||||
|
gl/m4/year2038.m4 | 106 +++++++++++---
|
||||||
|
4 files changed, 440 insertions(+), 76 deletions(-)
|
||||||
|
|
||||||
|
Index: gl/m4/year2038.m4
|
||||||
|
===================================================================
|
||||||
|
--- gl/m4/year2038.m4.orig
|
||||||
|
+++ gl/m4/year2038.m4
|
||||||
|
@@ -1,11 +1,11 @@
|
||||||
|
-# year2038.m4 serial 3
|
||||||
|
+# year2038.m4 serial 7
|
||||||
|
dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
-dnl Attempt to ensure that 'time_t' is a 64-bit type
|
||||||
|
-dnl and that the functions time(), stat(), etc. return 64-bit times.
|
||||||
|
+dnl Attempt to ensure that 'time_t' can go past the year 2038 and that
|
||||||
|
+dnl the functions 'time', 'stat', etc. work with post-2038 timestamps.
|
||||||
|
|
||||||
|
AC_DEFUN([gl_YEAR2038_EARLY],
|
||||||
|
[
|
||||||
|
@@ -18,13 +18,31 @@ AC_DEFUN([gl_YEAR2038_EARLY],
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
-AC_DEFUN([gl_YEAR2038],
|
||||||
|
+# gl_YEAR2038_TEST_INCLUDES
|
||||||
|
+# -------------------------
|
||||||
|
+AC_DEFUN([gl_YEAR2038_TEST_INCLUDES],
|
||||||
|
+[[
|
||||||
|
+ #include <time.h>
|
||||||
|
+ /* Check that time_t can represent 2**32 - 1 correctly. */
|
||||||
|
+ #define LARGE_TIME_T \\
|
||||||
|
+ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
|
||||||
|
+ int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
|
||||||
|
+ && LARGE_TIME_T % 65537 == 0)
|
||||||
|
+ ? 1 : -1];
|
||||||
|
+]])
|
||||||
|
+
|
||||||
|
+# gl_YEAR2038_BODY(REQUIRE-YEAR2038-SAFE)
|
||||||
|
+-----------------------------------------
|
||||||
|
+AC_DEFUN([gl_YEAR2038_BODY],
|
||||||
|
[
|
||||||
|
+ AC_ARG_ENABLE([year2038],
|
||||||
|
+ [ --disable-year2038 omit support for timestamps past the year 2038])
|
||||||
|
+ AS_IF([test "$enable_year2038" != no],
|
||||||
|
+ [
|
||||||
|
dnl On many systems, time_t is already a 64-bit type.
|
||||||
|
dnl On those systems where time_t is still 32-bit, it requires kernel
|
||||||
|
- dnl and libc support to make it 64-bit. For glibc on Linux/x86, this
|
||||||
|
- dnl is work in progress; see
|
||||||
|
- dnl <https://sourceware.org/glibc/wiki/Y2038ProofnessDesign>.
|
||||||
|
+ dnl and libc support to make it 64-bit. For glibc 2.34 and later on Linux,
|
||||||
|
+ dnl defining _TIME_BITS=64 and _FILE_OFFSET_BITS=64 is needed on x86 and ARM.
|
||||||
|
dnl
|
||||||
|
dnl On native Windows, the system include files define types __time32_t
|
||||||
|
dnl and __time64_t. By default, time_t is an alias of
|
||||||
|
@@ -34,16 +52,31 @@ AC_DEFUN([gl_YEAR2038],
|
||||||
|
dnl alias of __time64_t.
|
||||||
|
dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of
|
||||||
|
dnl __time32_t.
|
||||||
|
- AC_CACHE_CHECK([for 64-bit time_t], [gl_cv_type_time_t_64],
|
||||||
|
+ AC_CACHE_CHECK([for time_t past the year 2038], [gl_cv_type_time_t_y2038],
|
||||||
|
[AC_COMPILE_IFELSE(
|
||||||
|
- [AC_LANG_PROGRAM(
|
||||||
|
- [[#include <time.h>
|
||||||
|
- int verify_time_t_size[sizeof (time_t) >= 8 ? 1 : -1];
|
||||||
|
- ]],
|
||||||
|
- [[]])],
|
||||||
|
- [gl_cv_type_time_t_64=yes], [gl_cv_type_time_t_64=no])
|
||||||
|
+ [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])],
|
||||||
|
+ [gl_cv_type_time_t_y2038=yes], [gl_cv_type_time_t_y2038=no])
|
||||||
|
])
|
||||||
|
- if test $gl_cv_type_time_t_64 = no; then
|
||||||
|
+ if test "$gl_cv_type_time_t_y2038" = no; then
|
||||||
|
+ AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=64],
|
||||||
|
+ [gl_cv_type_time_t_bits_macro],
|
||||||
|
+ [AC_COMPILE_IFELSE(
|
||||||
|
+ [AC_LANG_SOURCE([[#define _TIME_BITS 64
|
||||||
|
+ #define _FILE_OFFSET_BITS 64
|
||||||
|
+ ]gl_YEAR2038_TEST_INCLUDES])],
|
||||||
|
+ [gl_cv_type_time_t_bits_macro=yes],
|
||||||
|
+ [gl_cv_type_time_t_bits_macro=no])
|
||||||
|
+ ])
|
||||||
|
+ if test "$gl_cv_type_time_t_bits_macro" = yes; then
|
||||||
|
+ AC_DEFINE([_TIME_BITS], [64],
|
||||||
|
+ [Number of bits in a timestamp, on hosts where this is settable.])
|
||||||
|
+ dnl AC_SYS_LARGFILE also defines this; it's OK if we do too.
|
||||||
|
+ AC_DEFINE([_FILE_OFFSET_BITS], [64],
|
||||||
|
+ [Number of bits in a file offset, on hosts where this is settable.])
|
||||||
|
+ gl_cv_type_time_t_y2038=yes
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
+ if test $gl_cv_type_time_t_y2038 = no; then
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_SOURCE(
|
||||||
|
[[#ifdef _USE_32BIT_TIME_T
|
||||||
|
@@ -52,19 +85,40 @@ AC_DEFUN([gl_YEAR2038],
|
||||||
|
error fail
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
- [AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.])],
|
||||||
|
- [# If TIME_T_32_BIT_OK is "no" (the default) and not cross-compiling
|
||||||
|
- # and 'touch' works with a large timestamp, then evidently 64-bit time_t
|
||||||
|
+ [AC_MSG_FAILURE(
|
||||||
|
+ [The 'time_t' type stops working after January 2038.
|
||||||
|
+ Remove _USE_32BIT_TIME_T from the compiler flags.])],
|
||||||
|
+ [# If not cross-compiling and $1 says we should check,
|
||||||
|
+ # and 'touch' works with a large timestamp, then evidently wider time_t
|
||||||
|
# is desired and supported, so fail and ask the builder to fix the
|
||||||
|
# problem. Otherwise, just warn the builder.
|
||||||
|
- if test "${TIME_T_32_BIT_OK-no}" = no \
|
||||||
|
- && test $cross_compiling = no \
|
||||||
|
- && TZ=UTC0 touch -t 210602070628.16 conftest.time 2>/dev/null; then
|
||||||
|
- rm -f conftest.time
|
||||||
|
- AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS="-m64" LDFLAGS="-m64"'. To build with a 32-bit time_t anyway (not recommended), configure with 'TIME_T_32_BIT_OK=yes'.])
|
||||||
|
- else
|
||||||
|
- AC_MSG_WARN([This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS="-m64" LDFLAGS="-m64"'?])
|
||||||
|
+ m4_ifval([$1],
|
||||||
|
+ [if test $cross_compiling = no \
|
||||||
|
+ && TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null; then
|
||||||
|
+ case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in
|
||||||
|
+ *'Feb 7 2106'* | *'Feb 7 17:10'*)
|
||||||
|
+ AC_MSG_FAILURE(
|
||||||
|
+ [The 'time_t' type stops working after January 2038,
|
||||||
|
+ and your system appears to support a wider 'time_t'.
|
||||||
|
+ Try configuring with 'CC="${CC} -m64"'.
|
||||||
|
+ To build with a 32-bit time_t anyway (not recommended),
|
||||||
|
+ configure with '--disable-year2038'.]);;
|
||||||
|
+ esac
|
||||||
|
+ rm -f conftest.time
|
||||||
|
+ fi])
|
||||||
|
+ if test "$gl_warned_about_y2038" != yes; then
|
||||||
|
+ AC_MSG_WARN(
|
||||||
|
+ [The 'time_t' type stops working after January 2038,
|
||||||
|
+ and this package needs a wider 'time_t' type
|
||||||
|
+ if there is any way to access timestamps after that.
|
||||||
|
+ Configure with 'CC="${CC} -m64"' perhaps?])
|
||||||
|
+ gl_warned_about_y2038=yes
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
- fi
|
||||||
|
+ fi])
|
||||||
|
+])
|
||||||
|
+
|
||||||
|
+AC_DEFUN([gl_YEAR2038],
|
||||||
|
+[
|
||||||
|
+ gl_YEAR2038_BODY([require-year2038-safe])
|
||||||
|
])
|
||||||
|
Index: gl/m4/largefile.m4
|
||||||
|
===================================================================
|
||||||
|
--- gl/m4/largefile.m4.orig
|
||||||
|
+++ gl/m4/largefile.m4
|
||||||
|
@@ -22,7 +22,8 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
-# The following implementation works around a problem in autoconf <= 2.69;
|
||||||
|
+# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+
|
||||||
|
+# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69:
|
||||||
|
# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
|
||||||
|
# or configures them incorrectly in some cases.
|
||||||
|
m4_version_prereq([2.70], [], [
|
||||||
|
@@ -40,6 +41,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUD
|
||||||
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
|
? 1 : -1]];[]dnl
|
||||||
|
])
|
||||||
|
+])# m4_version_prereq 2.70
|
||||||
|
|
||||||
|
|
||||||
|
# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
|
||||||
|
@@ -54,7 +56,8 @@ m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE
|
||||||
|
[AC_LANG_PROGRAM([$5], [$6])],
|
||||||
|
[$3=no; break])
|
||||||
|
m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
|
||||||
|
- [AC_LANG_PROGRAM([#define $1 $2
|
||||||
|
+ [AC_LANG_PROGRAM([#undef $1
|
||||||
|
+#define $1 $2
|
||||||
|
$5], [$6])],
|
||||||
|
[$3=$2; break])
|
||||||
|
$3=unknown
|
||||||
|
@@ -80,9 +83,8 @@ rm -rf conftest*[]dnl
|
||||||
|
AC_DEFUN([AC_SYS_LARGEFILE],
|
||||||
|
[AC_ARG_ENABLE(largefile,
|
||||||
|
[ --disable-largefile omit support for large files])
|
||||||
|
-if test "$enable_largefile" != no; then
|
||||||
|
-
|
||||||
|
- AC_CACHE_CHECK([for special C compiler options needed for large files],
|
||||||
|
+AS_IF([test "$enable_largefile" != no],
|
||||||
|
+ [AC_CACHE_CHECK([for special C compiler options needed for large files],
|
||||||
|
ac_cv_sys_largefile_CC,
|
||||||
|
[ac_cv_sys_largefile_CC=no
|
||||||
|
if test "$GCC" != yes; then
|
||||||
|
@@ -107,15 +109,15 @@ if test "$enable_largefile" != no; then
|
||||||
|
ac_cv_sys_file_offset_bits,
|
||||||
|
[Number of bits in a file offset, on hosts where this is settable.],
|
||||||
|
[_AC_SYS_LARGEFILE_TEST_INCLUDES])
|
||||||
|
- if test $ac_cv_sys_file_offset_bits = unknown; then
|
||||||
|
- _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
|
||||||
|
- ac_cv_sys_large_files,
|
||||||
|
- [Define for large files, on AIX-style hosts.],
|
||||||
|
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
|
||||||
|
- fi
|
||||||
|
-fi
|
||||||
|
+ AS_CASE([$ac_cv_sys_file_offset_bits],
|
||||||
|
+ [unknown],
|
||||||
|
+ [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
|
||||||
|
+ [ac_cv_sys_large_files],
|
||||||
|
+ [Define for large files, on AIX-style hosts.],
|
||||||
|
+ [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
|
||||||
|
+ [64],
|
||||||
|
+ [gl_YEAR2038_BODY([])])])
|
||||||
|
])# AC_SYS_LARGEFILE
|
||||||
|
-])# m4_version_prereq 2.70
|
||||||
|
|
||||||
|
# Enable large files on systems where this is implemented by Gnulib, not by the
|
||||||
|
# system headers.
|
Loading…
Reference in New Issue
Block a user