From 869d990d162ef892a0e0061d281084cfb0330252 Mon Sep 17 00:00:00 2001 From: law Date: Thu, 21 May 2015 13:53:45 +0300 Subject: [PATCH] Change conftest.file name to satisfy sanity check when building with frozen time --- automake-1.14.1-improve-sanity-check.patch | 56 ++++++++++++++++++++++ automake.spec | 4 ++ 2 files changed, 60 insertions(+) create mode 100644 automake-1.14.1-improve-sanity-check.patch diff --git a/automake-1.14.1-improve-sanity-check.patch b/automake-1.14.1-improve-sanity-check.patch new file mode 100644 index 0000000..0b510d3 --- /dev/null +++ b/automake-1.14.1-improve-sanity-check.patch @@ -0,0 +1,56 @@ +diff -ru automake-1.14.1/m4/sanity.m4 automake-1.14.1.new/m4/sanity.m4 +--- automake-1.14.1/m4/sanity.m4 2013-07-22 02:25:27.000000000 +0400 ++++ automake-1.14.1.new/m4/sanity.m4 2013-07-22 02:25:27.000000000 +0400 +@@ -31,14 +31,14 @@ + if ( + am_has_slept=no + for am_try in 1 2; do +- echo "timestamp, slept: $am_has_slept" > conftest.file +- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` ++ echo "timestamp, slept: $am_has_slept" > !conftest.file ++ set X `ls -Lt "$srcdir/configure" !conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. +- set X `ls -t "$srcdir/configure" conftest.file` ++ set X `ls -t "$srcdir/configure" !conftest.file` + fi +- if test "$[*]" != "X $srcdir/configure conftest.file" \ +- && test "$[*]" != "X conftest.file $srcdir/configure"; then ++ if test "$[*]" != "X $srcdir/configure !conftest.file" \ ++ && test "$[*]" != "X !conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a +@@ -47,14 +47,14 @@ + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi +- if test "$[2]" = conftest.file || test $am_try -eq 2; then ++ if test "$[2]" = !conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done +- test "$[2]" = conftest.file ++ test "$[2]" = !conftest.file + ) + then + # Ok. +@@ -67,7 +67,7 @@ + # If we didn't sleep, we still need to ensure time stamps of config.status and + # generated files are strictly newer. + am_sleep_pid= +-if grep 'slept: no' conftest.file >/dev/null 2>&1; then ++if grep 'slept: no' !conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! + fi +@@ -78,5 +78,5 @@ + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +-rm -f conftest.file ++rm -f !conftest.file + ]) diff --git a/automake.spec b/automake.spec index c5923a1..f23d8d1 100644 --- a/automake.spec +++ b/automake.spec @@ -21,6 +21,8 @@ Patch0: automake-1.13.1-automatically-fix-old-files.patch # ~> Downstream # ~> http://lists.gnu.org/archive/html/bug-automake/2013-07/msg00022.html Patch1: automake-1.13.4-hash-order-workaround.patch +# Change conftest.file name to satisfy sanity check when building with frozen time +Patch2: automake-1.14.1-improve-sanity-check.patch BuildRequires: autoconf BuildRequires: texinfo # tests need these @@ -91,6 +93,8 @@ fi %prep %setup -q %apply_patches +# Restore date changed in Patch2 +touch -r m4/init.m4 m4/sanity.m4 %build # (abondrov) config* don't understand noarch-unknown-linux-gnu arch