Bug 12719 - Support reproducible build for kernel modules tarball
Summary: Support reproducible build for kernel modules tarball
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 6.2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-04-27 13:32 UTC by Juro Bystricky
Modified: 2026-10-01 15:48 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2018-04-27 13:32:53 UTC
The goal of this enhancement is to build reproducible modules-qemux86.tgz tarballs for:

$ MACHINE=qemux86 bitbake core-image-minimal


The resulting tarballs of this build are placed in the folder <builddir>/tmp/deploy/images/qemux86

Repeating the build in a different folder will place the tarballs in:
<builddir-different>/tmp/deploy/images/qemux86

The build is deemed reproducible if the tarballs are binary identical.
This is rather simple, replacing the line in kernel.bbclass:

tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib

with:

sde=$(get_sde)
tar -I "gzip -9n" --sort=name --clamp-mtime --mtime=@$sde -cvf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib

But we should wait until we resolve:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=12707

(Otherwise we would need to do some run-time checks for supported "tar" command line arguments)
Comment 1 Richard Purdie 2020-05-07 08:08:56 UTC
I believe we now have the minimum tar version needed at least.
Comment 2 Randy MacLeod 2023-10-24 14:24:20 UTC
Bulk move from 4.99 or 0.00 to 5.99