From: Jan Kiszka <jan.kiszka@siemens.com>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
isar-users@googlegroups.com,
Henning Schild <henning.schild@siemens.com>
Subject: Re: [PATCH v2] debianize: use date of the most recent file instead of "now"
Date: Tue, 12 Mar 2019 06:26:46 +0100 [thread overview]
Message-ID: <32273766-b305-f232-7b48-bf7e7f5fbecb@siemens.com> (raw)
In-Reply-To: <1552163202-1450-1-git-send-email-Cedric_Hombourger@mentor.com>
On 09.03.19 21:26, Cedric Hombourger wrote:
> The changelog generated by Isar would use the current date/time
> causing each build to be different. Use the date/time of the
> most recent file to achieve reproducible builds (assuming files
> contained in the payload have the same contents and timestamps).
> In the event where the package is not shipping any files, Isar
> will default to the current date/time.
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/classes/debianize.bbclass | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
> index 510aebd..ad3a98e 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -6,7 +6,12 @@
> CHANGELOG_V ?= "${PV}"
>
> deb_add_changelog() {
> - date=$( LANG=C date -R )
> + timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1)
> + if [ -n "${timestamp}" ]; then
> + date=$(LANG=C date -R -d @${timestamp})
> + else
> + date=$(LANG=C date -R)
> + fi
> cat <<EOF > ${S}/debian/changelog
> ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
>
>
Patch looks good.
In fact, I received a similar remark regarding the changelog we embedded into
custom u-boots, and the same should apply to kernel modules as well. Maybe we
should switch those recipes to changelog generation via debianize to benefit
from this here.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2019-03-12 5:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 9:03 [PATCH] dpkg-raw: " Cedric Hombourger
2019-02-27 10:00 ` Henning Schild
2019-03-09 20:26 ` [PATCH v2] debianize: " Cedric Hombourger
2019-03-12 5:26 ` Jan Kiszka [this message]
2019-03-12 7:40 ` cedric_hombourger
2019-03-15 4:49 ` Maxim Yu. Osipov
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=32273766-b305-f232-7b48-bf7e7f5fbecb@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=Cedric_Hombourger@mentor.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/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