opkg-build: differentiate between compressorargs and zipargs
PATCH 1/1 opkg-build: differentiate between compressorargs and zipargs
control.tar.gz is always compressed with gzip.
If data.tar is compressed by a compressor other than gzip, control.tar.gz may end up compressed with timestamp in the compressed image header. This would result in packages that are not binary reproducible.
[YOCTO #11242]
--- opkg-build | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
opkg-build +9 -9
@@ -149,7 +149,8 @@ outer=ar noclean=0 opkext=0 compressor=gzip -compressorargs="-9n" +zipargs="-9n" +compressorargs="" # Determine if tar supports the --format argument by checking the help output. #
@@ -223,13 +224,12 @@ done cext=$(compressor_ext $compressor) +# pgzip requires -T to avoid timestamps on the gzip archive +if gzip --help 2>&1 | grep -- "-T" > /dev/null; then + zipargs="-9nT" +fi if [ $compressor = "gzip" ] ; then - # pgzip requires -T to avoid timestamps on the gzip archive - if gzip --help 2>&1 | grep -- "-T" > /dev/null; then - compressorargs="-9nT" - fi -else - compressorargs="" + compressorargs=$zipargs fi shift $(($OPTIND - 1))
@@ -281,7 +281,7 @@ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)" echo $CONTROL > $tmp_dir/tarX ( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) -( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $compressorargs > $tmp_dir/control.tar.gz ) +( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) rm $tmp_dir/tarX echo "2.0" > $tmp_dir/debian-binary
@@ -296,7 +296,7 @@ rm -f $pkg_file if [ "$outer" = "ar" ] ; then ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) else - ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $compressorargs > $pkg_file ) + ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file ) fi rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
Signature · 1 line
2.7.4
✗ patchtest: failure for opkg-build: differentiate between compressorargs and zipargs
== Series Details ==
Series: opkg-build: differentiate between compressorargs and zipargs
Revision: 1
URL : https://patchwork.openembedded.org/series/10851/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at a0988c3374)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe