uninative-tarball.xz - reproducibility fix
PATCH 1/1 uninative-tarball.xz - reproducibility fix
added --clamp-mtime --mtime to the tar command
see:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15148
--- meta/classes-recipe/populate_sdk_base.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-recipe/populate_sdk_base.bbclass +2 -1
@@ -86,7 +86,7 @@ python () { d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDK_ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .') else: d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native') - d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') + d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} ${SDKTAROPTS_ADDON} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') } SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
@@ -286,6 +286,7 @@ python check_sdk_sysroots() { } SDKTAROPTS = "--owner=root --group=root" +SDKTAROPTS_ADDON ?= "--clamp-mtime --mtime=@${SOURCE_DATE_EPOCH}" fakeroot archive_sdk() { # Package it up
Signature · 1 line
2.17.1
Quoted 24 lines · Robert Berger
added --clamp-mtime --mtime to the tar command
see:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15148Signed-off-by Robert Berger <[email protected]>--- meta/classes-recipe/populate_sdk_base.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes-recipe/populate_sdk_base.bbclass +1
-1@@ -86,7 +86,7 @@ python () { d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDK_ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .') else: d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native') - d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') + d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} ${SDKTAROPTS_ADDON} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') } SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
meta/classes-recipe/populate_sdk_base.bbclass python check_sdk_sysroots() { · line 290
Quoted 5 lines
meta/classes-recipe/populate_sdk_base.bbclass +1
-0@@ -286,6 +286,7 @@ python check_sdk_sysroots() { } SDKTAROPTS = "--owner=root --group=root" +SDKTAROPTS_ADDON ?= "--clamp-mtime --mtime=@${SOURCE_DATE_EPOCH}"
Thanks, looks good. I did wonder if we could just put this in SDKTAROPTS though? Do we really need to add a new variable?
Cheers,
Richard
Hi,
Not sure my previous reply made it to the list.
So I try it again here.
Quoted 27 lines · Richard Purdie
Quoted 26 lines · Robert Berger
added --clamp-mtime --mtime to the tar command
see:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15148Signed-off-by Robert Berger <[email protected]>--- meta/classes-recipe/populate_sdk_base.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes-recipe/populate_sdk_base.bbclass +1
-1@@ -86,7 +86,7 @@ python () { d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDK_ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .') else: d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native') - d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') + d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} ${SDKTAROPTS_ADDON} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}') } SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"@@ -286,6 +286,7 @@ python check_sdk_sysroots() { }
Quoted 6 lines
meta/classes-recipe/populate_sdk_base.bbclass python check_sdk_sysroots() { · line 290
Quoted 3 lines
meta/classes-recipe/populate_sdk_base.bbclass +1
-0SDKTAROPTS = "--owner=root --group=root" +SDKTAROPTS_ADDON ?= "--clamp-mtime --mtime=@${SOURCE_DATE_EPOCH}"Thanks, looks good. I did wonder if we could just put this in SDKTAROPTS though? Do we really need to add a new variable?
Functionality-wise it's fine to add it to SDKTAROPTS. The default value I added would give people the chance to experiment with different options as well.
If you want me to "hard code" it I'll create a v2.
Just let me know.
Quoted 5 lines
Cheers,
Richard
Regards,
Robert
Signature · 11 lines
Robert Berger Embedded Software Evangelist Reliable Embedded Systems Consulting Training Engineering URL: https://www.reliableembeddedsystems.com Schedule a web meeting: https://calendly.com/reliableembeddedsystems/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
Quoted 12 lines · Robert Berger
Hi,
My comments are inline
Quoted 6 lines · Richard Purdie
Quoted 2 lines
+SDKTAROPTS_ADDON ?= "--clamp-mtime --mtime=@${SOURCE_DATE_EPOCH}"
Thanks, looks good. I did wonder if we could just put this in SDKTAROPTS though? Do we really need to add a new variable?
Quoted 7 lines
Functionality-wise it's fine to add it to SDKTAROPTS. The default value I added would give people the chance to experiment with different options as well.
If you want me to "hard code" it I'll create a v2.
Just let me know.
Lets just add to the existing variable, I don't think we need another one for this.
Cheers,
Richard