From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQle8-0005cf-UY for ptxdist@pengutronix.de; Tue, 21 Apr 2020 07:40:36 +0200 Received: from mol by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jQle8-0003Z7-M3 for ptxdist@pengutronix.de; Tue, 21 Apr 2020 07:40:36 +0200 Date: Tue, 21 Apr 2020 07:40:36 +0200 From: Michael Olbrich Message-ID: <20200421054036.GJ2081@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] reproducible timestamps in ipkg package List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Mon, Apr 20, 2020 at 02:16:30PM -0400, Jon Ringle wrote: > On Mon, Apr 20, 2020 at 12:28 PM Jon Ringle wrote: > > > I am having an issue where the timestamps for the files in the ipkg have > > the current timestamp instead of the reproducible timestamp coming from > > SOURCE_DATE_EPOCH. > > I added a debug log message to ptxd_install_fixup_timestamps() found in > > scripts/lib/ptxd_make_xpkg_pkg.sh to show the timestamp being used: > > > > ptxd_install_fixup_timestamps() { > > local timestamp="@${SOURCE_DATE_EPOCH}" > > local touch_args > > if touch --help | grep -q -- --no-dereference &> /dev/null; then > > touch_args="--no-dereference" > > fi > > > > echo "ptxd_install_fixup_timestamps ${timestamp} ($(date > > --date=${timestamp}))" > > find "${1}" -print0 | xargs -0 touch ${touch_args} -c -d "${timestamp}" > > } > > > > I am currently using ptxdist-2019.11.0, and I get the expected result when > > directly printing SOURCE_DATE_EPOCH: > > $ ptxdist print SOURCE_DATE_EPOCH > > 1572566400 > > $ date --date=@$(ptxdist print SOURCE_DATE_EPOCH) > > Fri Nov 1 00:00:00 UTC 2019 > > > > However, the debug output I added to ptxd_install_fixup_timestamps() > > produces this output that corresponds to the current datetime: > > ptxd_install_fixup_timestamps @1587399767 (Mon Apr 20 16:22:47 UTC 2020) > > > > > Ok... I found that this behavior is being caused by this code in > ptxd_make_world_init(): > > # > # check if we shall use a local work-in-progress tree instead > # of the configured URL. > # > # If a link in local_src/