Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: daniel.turull@ericsson.com, openembedded-core@lists.openembedded.org
Cc: JPEWhacker@gmail.com, mathieu.dubois-briand@bootlin.com
Subject: Re: [OE-core] [PATCH v3 2/3] create-spdx-3.0: record component release date in SPDX output
Date: Mon, 28 Sep 2026 21:59:46 +0100	[thread overview]
Message-ID: <6720cb7aa4c91cc51bc72b47e48ed78b6a6d421b.camel@linuxfoundation.org> (raw)
In-Reply-To: <20260928190400.3908822-3-daniel.turull@ericsson.com>

On Mon, 2026-09-28 at 21:03 +0200, Daniel Turull via lists.openembedded.org wrote:
> From: Daniel Turull <daniel.turull@ericsson.com>
> 
> Record each recipe's release date in the releaseTime property of its
> software_Package object, using the SOURCE_DATE_EPOCH already computed
> for reproducible builds.
> 
> Accuracy depends on how SOURCE_DATE_EPOCH was derived: exact for
> git-tagged recipes, best-effort for tarball/http(s) sources. Some
> Python sdists (e.g. cryptography, hypothesis, maturin) normalize all
> file mtimes to a fixed placeholder, so their releaseTime reflects
> packaging-tool behavior, not the real release date.
> 
> Tested with oe-selftest -r spdx, and with `bitbake world
> --runall=do_create_spdx`: 1011/1150 recipes got a releaseTime (range
> 1998-12-30 to 2026-09-17), 139 correctly had none.
> 
> AI-Generated: Uses Kiro with Claude Sonnet 5
> Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
> ---
> v2:
> - Dropped all options per Joshua's feedback; read SDE_FILE directly.
> - Dropped the redundant else: delattr(recipe, "releaseTime") branch.
> - Selftest compares against SDE_FILE content directly instead of
>   SOURCE_DATE_EPOCH, which can diverge from it.
> - Fixed a leak: recipes with no git checkout and no fetched source
>   had SDE_FILE holding only SOURCE_DATE_EPOCH_FALLBACK, showing a
>   bogus 2011-04-05T23:00:00Z releaseTime instead of none.
> v3:
> - Also run after do_unpack: do_deploy_source_date_epoch's setscene
>   shortcut can skip it, leaving SOURCE_DATE_EPOCH unset.
> - get_release_date() reads SOURCE_DATE_EPOCH again instead of
>   SDE_FILE, now that they're guaranteed equivalent.
> - test_release_date_source_date_epoch: switched to tar (base-files
>   has S == UNPACKDIR and never gets a real SOURCE_DATE_EPOCH).
> - Added test_release_date_omitted_for_fallback_value.
> ---
>  meta/classes/create-spdx-3.0.bbclass |  2 +-
>  meta/lib/oe/spdx30_tasks.py          | 19 ++++++++++++++
>  meta/lib/oeqa/selftest/cases/spdx.py | 39 ++++++++++++++++++++++++++++
>  3 files changed, 59 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/create-spdx-3.0.bbclass b/meta/classes/create-spdx-3.0.bbclass
> index 56fd01fd53..2b1465b5a6 100644
> --- a/meta/classes/create-spdx-3.0.bbclass
> +++ b/meta/classes/create-spdx-3.0.bbclass
> @@ -192,7 +192,7 @@ python do_create_recipe_spdx() {
>      import oe.spdx30_tasks
>      oe.spdx30_tasks.create_recipe_spdx(d)
>  }
> -addtask do_create_recipe_spdx
> +addtask do_create_recipe_spdx after do_unpack do_deploy_source_date_epoch
>  
>  SSTATETASKS += "do_create_recipe_spdx"
>  do_create_recipe_spdx[sstate-inputdirs] = "${SPDXRECIPEDEPLOY}"

I'm not really very happy about this part of the change. The "recipe"
SPDX data was meant to be the data which can be obtained from the
recipe without fetching the sources. This changes that and adds a
fetch/unpack requirement. At this point it may as well be merged with
other SPDX data that being generated "later" in the build as the
"recipe" only data is losing it's meaning?

Cheers,

Richard


  reply	other threads:[~2026-09-28 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 19:03 [PATCH v3 0/3] spdx: add support to include releaseTime daniel.turull
2026-09-28 19:03 ` [PATCH v3 1/3] classes/base: exclude __CACHED_SOURCE_DATE_EPOCH from task hash daniel.turull
2026-09-29 14:53   ` Joshua Watt
2026-09-28 19:03 ` [PATCH v3 2/3] create-spdx-3.0: record component release date in SPDX output daniel.turull
2026-09-28 20:59   ` Richard Purdie [this message]
2026-09-29  4:54     ` [OE-core] " Daniel Turull
2026-09-28 19:04 ` [PATCH v3 3/3] scripts/contrib: add spdx-release-date-report.py daniel.turull
2026-09-29  6:16 ` [OE-core] [PATCH v3 0/3] spdx: add support to include releaseTime Yoann Congal
2026-09-29  6:36   ` Daniel Turull

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=6720cb7aa4c91cc51bc72b47e48ed78b6a6d421b.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=JPEWhacker@gmail.com \
    --cc=daniel.turull@ericsson.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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