public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, henning.schild@siemens.com,
	venkata.pyla@toshiba-tsip.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 2/3] deb_add_changelog: set timestamp to valid epoch
Date: Mon,  9 Jan 2023 05:14:27 +0000	[thread overview]
Message-ID: <20230109051428.450854-3-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20230109051428.450854-1-felix.moessbauer@siemens.com>

A changelog date of 0 (unix timestamp) is not considered a valid
timestamp for the SOURCE_DATE_EPOCH. By that, the debhelper scripts
set the SOURCE_DATE_EPOCH variable to the current time of the build,
breaking reproducability. By that, we get an inconsistency between the
debian changelog timestamp and the timestamp that the build tools encode
into the binary and the file timestamps.

Without having support to control the SOURCE_DATE_EPOCH variable
externally via bitbake, this always led to non-reproducible packages.
To fix this, we simply set the default timestamp to 1h later.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/debianize.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 34347b5..3531421 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -14,7 +14,7 @@ MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
 
 deb_add_changelog() {
 	changelog_v="${CHANGELOG_V}"
-	timestamp=0
+	timestamp=3600
 	# we have a changelog and that is not autogenerated
 	# (when autogenerated, changelog.orig is empty)
 	if [ -f ${S}/debian/changelog ] && [ -s ${WORKDIR}/changelog.orig ]; then
-- 
2.34.1


  parent reply	other threads:[~2023-01-09  5:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09  5:14 [PATCH 0/3] Fix reproducability issues in deb_add_changelog Felix Moessbauer
2023-01-09  5:14 ` [PATCH 1/3] make deb_add_changelog idempotent Felix Moessbauer
2023-01-09  9:19   ` Henning Schild
2023-01-09 10:42     ` Moessbauer, Felix
2023-01-09  5:14 ` Felix Moessbauer [this message]
2023-01-09  5:14 ` [PATCH 3/3] deb_add_changelog: use SOURCE_DATE_EPOCH Felix Moessbauer
2023-01-09  5:34   ` Jan Kiszka
2023-01-09  9:25   ` Henning Schild
2023-01-09 10:24     ` Moessbauer, Felix
2023-01-09 10:30     ` Jan Kiszka
2023-01-09  9:28 ` [PATCH 0/3] Fix reproducability issues in deb_add_changelog Henning Schild
2023-01-09 10:33   ` Moessbauer, Felix

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=20230109051428.450854-3-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=venkata.pyla@toshiba-tsip.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