From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout01.t-online.de (mailout01.t-online.de [194.25.134.80]) by sourceware.org (Postfix) with ESMTPS id 275DA3858C53 for ; Thu, 24 Aug 2023 06:36:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 275DA3858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=t-online.de Received: from fwd89.aul.t-online.de (fwd89.aul.t-online.de [10.223.144.115]) by mailout01.t-online.de (Postfix) with SMTP id 862211F263 for ; Thu, 24 Aug 2023 08:36:15 +0200 (CEST) Received: from [192.168.2.101] ([79.230.164.114]) by fwd89.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1qZ3wx-1WC4h60; Thu, 24 Aug 2023 08:36:11 +0200 Subject: Re: [PATCH cygport] Add initial support for SOURCE_DATE_EPOCH To: cygwin-apps@cygwin.com References: <2aa9ce84-9cab-8c77-f1fd-c7c9142af233@Shaw.ca> <87lee1550c.fsf@Otto.invalid> From: Christian Franke Message-ID: Date: Thu, 24 Aug 2023 08:36:09 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.16 MIME-Version: 1.0 In-Reply-To: <87lee1550c.fsf@Otto.invalid> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TOI-EXPURGATEID: 150726::1692858971-A1FE19BF-021877BD/0/0 CLEAN NORMAL X-TOI-MSGID: 3decdc20-8274-49a7-a548-38dc9b01f7ad X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: ASSI via Cygwin-apps wrote: > Christian Franke via Cygwin-apps writes: >> If binutils, gzip and tar also would support this, the patch would be >> empty :-) > GZip has -n though ... For gzip I decided to keep the timestamp and use (the GNU version of) touch instead. > and GNU tar --mtime and --clamp-mtime, so why not use > that? Already done: +    if [ -n "${SOURCE_DATE_EPOCH}" ] +    then +        # Ensure reproducible sort order and last modification times <= SOURCE_DATE_EPOCH +        TAR_SOURCE_DATE_OPTS="--sort=name --mtime=@${SOURCE_DATE_EPOCH} --clamp-mtime" +    fi :-) -- Regards, Christian