mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Jon Ringle <jon@ringle.org>
To: ptxdist@pengutronix.com
Subject: [ptxdist] reproducible timestamps in ipkg package
Date: Mon, 20 Apr 2020 12:28:10 -0400	[thread overview]
Message-ID: <CAMwGMjx7mF3MOA5-ZPGC=F3SY44ORTmiFd57sn=+SEA7+S=ygw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1130 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1404 bytes --]

[-- Attachment #2: Type: text/plain, Size: 92 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2020-04-20 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 16:28 Jon Ringle [this message]
2020-04-20 18:16 ` Jon Ringle
2020-04-21  5:40   ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMwGMjx7mF3MOA5-ZPGC=F3SY44ORTmiFd57sn=+SEA7+S=ygw@mail.gmail.com' \
    --to=jon@ringle.org \
    --cc=ptxdist@pengutronix.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox