Skip to content

linux-nilrt: drop "nocheckout" option to get correct source timestamps#623

Merged
amstewart merged 1 commit intoni:nilrt/master/kirkstonefrom
bstreiff:dev/bstreiff/kirkstone/drop-nocheckout
Sep 20, 2023
Merged

linux-nilrt: drop "nocheckout" option to get correct source timestamps#623
amstewart merged 1 commit intoni:nilrt/master/kirkstonefrom
bstreiff:dev/bstreiff/kirkstone/drop-nocheckout

Conversation

@bstreiff
Copy link
Contributor

@bstreiff bstreiff commented Sep 19, 2023

kernel builds with "nocheckout=1" behave incorrectly with reproducible builds; the observed behavior is that we get:

  • do_unpack happens; the git/.git directory is created, and HEAD points to the same commit as nilrt/master/4.14, but it's not actually checked out (no files are present). This is itself kind of weird, since the current default branch for linux.git on GitHub is nilrt/master/6.1.
  • create_source_date_epoch_stamp happens and now the SOURCE_DATE_EPOCH is latched on this commit
  • do_kernel_checkout happens after this and that's what puts us on the correct branch (which is what we build)

As a result, the SOURCE_DATE_EPOCH we get is for a completely different branch.

There doesn't seem to be any reason for why we set "nocheckout=1" at all other than "that's what we started with" (and no other recipes used in nilrt use "nocheckout=1") so take the easy solution and drop it.

Natinst-AzDO-ID: 2523534


Tested with bitbake linux-nilrt and then inspecting $NILRT_ROOT/build/tmp-glibc/work/x64-nilrt-linux/linux-nilrt/6.1+gitAUTOINC+3494faaf50-r0/deploy-source-date-epoch/__source_date_epoch.txt; it now reads 1694704634, which is Thu 14 Sep 2023 10:17:14 AM CDT, which matches the commit time of ni/linux@3494faaf50f2.

@amstewart amstewart self-requested a review September 19, 2023 20:54
Copy link
Contributor

@amstewart amstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you add the AZDO item link and a testing section?

@amstewart
Copy link
Contributor

Also. I'll only merge this into the master branch, since I don't think its really needed for 23.8. Let me know if you disagree.

kernel builds with "nocheckout=1" behave incorrectly with reproducible
builds; the observed behavior is that we get:

- do_unpack happens; the git/.git directory is created, and HEAD points
  to the same commit as nilrt/master/4.14, but it's not actually checked
  out (no files are present). This is itself kind of weird, since the
  current default branch for linux.git on GitHub is nilrt/master/6.1.
- create_source_date_epoch_stamp happens and now the SOURCE_DATE_EPOCH
  is latched on this commit
- do_kernel_checkout happens after this and that's what puts us on the
  correct branch (which is what we build)

As a result, the SOURCE_DATE_EPOCH we get is for a completely different
branch.

There doesn't seem to be any reason for why we set "nocheckout=1" at
all other than "that's what we started with" (and no other recipes used
in nilrt use "nocheckout=1") so take the easy solution and drop it.

Natinst-AzDO-ID: 2523534
Signed-off-by: Brenda Streiff <brenda.streiff@ni.com>
@amstewart amstewart merged commit 3d7f320 into ni:nilrt/master/kirkstone Sep 20, 2023
pratheekshasn pushed a commit to pratheekshasn/meta-nilrt that referenced this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants