Subject: Re: [bug-diffutils] bug#24121: new snapshot available: diffutils-3.3.52-e974

From: Jim Meyering <[email-masked]>
Date: Mon, 1 Aug 2016 09:25:06 -0700

On Sun, Jul 31, 2016 at 8:38 PM, Assaf Gordon <[email-masked]> wrote:
> Hello,
>
>> On Jul 31, 2016, at 21:15, Jim Meyering <[email-masked]> wrote:
>>
>> Here's a new snapshot:
>> [...]
>> http://meyering.net/diff/diffutils-3.3.52-e974.tar.xz
>>
>> Changes in diffutils since 3.3.50-0353:
>>
>> Jim Meyering (2):
>>      tests: colors: fix a portability problem and work around a shell bug
>>      maint: remove gl/lib/reg*.c.diff; no longer needed
>
> With this update, no more failures on the tested gnu/linux system, but few failures on others (BSDs, Mac OS X, AIX, OpenSolaris).
>
> For BSD/Mac OS X/AIX, it seems the 'color' test uses 'touch --date' which is a gnu extension and is not available.
> Perhaps that leads to other failures.

Here's a patch for that GNU-ism:
From df14e616b3d497c611edb04d6071b09565f65434 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Mon, 1 Aug 2016 09:23:03 -0700
Subject: [PATCH] tests/colors: fix portability problem with touch --date

* tests/colors (epoch): Don't use GNU touch's --date=$epoch option.
Use the portable -t 197001010000.00.
Reported by Assaf Gordon in https://debbugs.gnu.org/24121#8
---
 tests/colors | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/colors b/tests/colors
index 881ef5a..3ad2206 100755
--- a/tests/colors
+++ b/tests/colors
@@ -11,7 +11,8 @@ echo a > a
 echo b > b

 epoch='1970-01-01 00:00:00'
-touch --date="$epoch" a b
+touch -t 197001010000.00 a b
+
 e=$(printf '\033')
 tab=$(printf '\t')

-- 
2.8.0-rc2