From: "Moessbauer, Felix" <felix.moessbauer@siemens.com>
To: "Schild, Henning" <henning.schild@siemens.com>
Cc: "Bovensiepen, Daniel (bovi)" <daniel.bovensiepen@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Kiszka, Jan" <jan.kiszka@siemens.com>,
"venkata.pyla@toshiba-tsip.com" <venkata.pyla@toshiba-tsip.com>
Subject: Re: [PATCH 10/11] deb_add_changelog: use SOURCE_DATE_EPOCH
Date: Wed, 11 Jan 2023 09:06:00 +0000 [thread overview]
Message-ID: <c1e6ed5d67e68ccb2a0d55978a0ae7903ef3e27a.camel@siemens.com> (raw)
In-Reply-To: <20230111094919.29be3fbf@md1za8fc.ad001.siemens.net>
On Wed, 2023-01-11 at 09:49 +0100, Henning Schild wrote:
> Am Wed, 11 Jan 2023 04:11:39 +0000
> schrieb Felix Moessbauer <felix.moessbauer@siemens.com>:
>
> > In case the SOURCE_DATE_EPOCH bb variable is set, use that value
> > both for the auto-generated changelog as well as when appending to
> > an existing changelog.
> >
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> > meta/classes/debianize.bbclass | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/classes/debianize.bbclass
> > b/meta/classes/debianize.bbclass index a6694a0..3d5d934 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=3600
> > + timestamp=${@ d.getVar('SOURCE_DATE_EPOCH', True) or '3600'
> > }
> > if [ -f ${S}/debian/changelog ]; then
> > if [ ! -f ${WORKDIR}/changelog.orig ]; then
> > cp ${S}/debian/changelog
> > ${WORKDIR}/changelog.orig @@ -23,9 +23,11 @@ deb_add_changelog() {
> > if [ -s ${WORKDIR}/changelog.orig ]; then
> > orig_version=$(dpkg-parsechangelog -l
> > ${WORKDIR}/changelog.orig -S Version) changelog_v=$(echo
> > "${changelog_v}" | sed 's/<orig-version>/'${orig_version}'/')
> > - orig_date=$(dpkg-parsechangelog -l
> > ${WORKDIR}/changelog.orig -S Date)
> > - orig_seconds=$(date --date="${orig_date}"
> > +'%s')
> > - timestamp=$(expr ${orig_seconds} + 42)
> > + if [ -z "${SOURCE_DATE_EPOCH}" ]; then
> > + orig_date=$(dpkg-parsechangelog -l
> > ${WORKDIR}/changelog.orig -S Date)
> > + orig_seconds=$(date
> > --date="${orig_date}" +'%s')
> > + timestamp=$(expr ${orig_seconds} +
> > 42)
>
> What would happen if we prepended an entry older than orig-date? I
> hope
> this would trigger some sort of warning or maybe even package build
> failure.
Valid point.
Actually, this works perfectly fine. But I'm not sure if this is
undefined behavior or actually allowed by Debian standards.
>
> I still think the images SOURCE_DATE_EPOCH should not be used for
> individual components. The value of doing so remains unclear, while
> it
> is very risky to use global scope variables to construct package
> content. Correct me if i am wrong, but without this patch everything
> will be reproducible just fine.
The value is indeed very little and probably it will need more
fundamental discussions about auto-generated parts. Let's drop this
patch for now, so we can integrate the rest in a timely manner.
Felix
>
> Henning
>
> > + fi
> > fi
> > fi
> >
>
next prev parent reply other threads:[~2023-01-11 9:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 4:11 [PATCH 00/11] Make rootfs build reproducible Felix Moessbauer
2023-01-11 4:11 ` [PATCH 01/11] fix rebuild of rootfs_finalize task Felix Moessbauer
2023-01-11 4:11 ` [PATCH 02/11] image.bbclass: fix non-reproducible file time-stamps inside rootfs Felix Moessbauer
2023-01-11 4:11 ` [PATCH 03/11] rootfs postprocess: clean python cache Felix Moessbauer
2023-01-11 8:06 ` Henning Schild
2023-01-11 8:23 ` Moessbauer, Felix
2023-01-11 12:47 ` Henning Schild
2023-01-11 13:18 ` Moessbauer, Felix
2023-01-11 13:23 ` Jan Kiszka
2023-01-11 4:11 ` [PATCH 04/11] remove non-portable ldconfig aux-cache Felix Moessbauer
2023-01-11 8:19 ` Henning Schild
2023-01-11 8:31 ` Moessbauer, Felix
2023-01-11 12:52 ` Henning Schild
2023-01-11 4:11 ` [PATCH 05/11] generate deterministic clear-text password hash Felix Moessbauer
2023-01-11 8:21 ` Henning Schild
2023-01-11 4:11 ` [PATCH 06/11] update debian initramfs in deterministic mode Felix Moessbauer
2023-01-11 8:23 ` Henning Schild
2023-01-11 8:39 ` Moessbauer, Felix
2023-01-11 12:55 ` Henning Schild
2023-01-11 4:11 ` [PATCH 07/11] create custom " Felix Moessbauer
2023-01-11 4:11 ` [PATCH 08/11] make deb_add_changelog idempotent Felix Moessbauer
2023-01-11 4:11 ` [PATCH 09/11] deb_add_changelog: set timestamp to valid epoch Felix Moessbauer
2023-01-11 4:11 ` [PATCH 10/11] deb_add_changelog: use SOURCE_DATE_EPOCH Felix Moessbauer
2023-01-11 8:49 ` Henning Schild
2023-01-11 9:06 ` Moessbauer, Felix [this message]
2023-01-11 4:11 ` [PATCH 11/11] make custom linux-image bit-by-bit reproducible Felix Moessbauer
2023-01-11 6:51 ` [PATCH 00/11] Make rootfs build reproducible Jan Kiszka
2023-01-11 9:04 ` Venkata.Pyla
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=c1e6ed5d67e68ccb2a0d55978a0ae7903ef3e27a.camel@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=daniel.bovensiepen@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