From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: MIME-Version: 1.0 From: Jon Ringle Date: Mon, 20 Apr 2020 12:28:10 -0400 Message-ID: Subject: [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: multipart/mixed; boundary="===============0021102245==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.com --===============0021102245== Content-Type: multipart/alternative; boundary="0000000000002f731c05a3bb639d" --0000000000002f731c05a3bb639d Content-Type: text/plain; charset="UTF-8" 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) -Jon --0000000000002f731c05a3bb639d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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_inst= all_fixup_timestamps() found in scripts/lib/ptxd_make_xpkg_pkg.sh to show t= he timestamp being used:

ptxd_install_fixup_timest= amps() {
=C2=A0 =C2=A0 local timestamp=3D"@${SOURCE_DATE_EPOCH}&quo= t;
=C2=A0 =C2=A0 local touch_args
=C2=A0 =C2=A0 if touch --help | gre= p -q -- --no-dereference &> /dev/null; then
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 touch_args=3D"--no-dereference"
=C2=A0 =C2=A0 fi
=C2=A0 =C2=A0 echo "ptxd_install_fixup_timestamps ${timestamp} ($(dat= e --date=3D${timestamp}))"
=C2=A0 =C2=A0 find "${1}" -pri= nt0 | xargs -0 touch ${touch_args} -c -d "${timestamp}"
}
<= /div>

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=3D@$(ptxd= ist print SOURCE_DATE_EPOCH)
Fri Nov =C2=A01 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)

-Jon
--0000000000002f731c05a3bb639d-- --===============0021102245== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de --===============0021102245==--