diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-04 11:22:48 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-11 18:41:37 +0100 |
commit | 4a4d5f78a6962dda5f63e9891825c80a8a87bf66 (patch) | |
tree | 3ec2eb32a0c4365d8212c81d842f06b3ae08ab28 /meta | |
parent | 543e83e85269f35612867957a445319546f3c73a (diff) | |
download | poky-4a4d5f78a6962dda5f63e9891825c80a8a87bf66.tar.gz |
package_rpm: use zstd instead of xz
zstd has similar time and space performance in compression but is
vastly faster in decompression, which benefits rootfs creation
(especially when installing very large packages) and on-target
package installation.
Also, ensure ZSTD_THREADS doesn't change sstate checksums. The
detailed explanation is in the commit making similar change for
XZ_THREADS.
(From OE-Core rev: e72c0b94554a9bc293844ec2bddb0c04ea19791d)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 4 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 1c62d8283b..e738806fd7 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -684,8 +684,8 @@ python do_package_rpm () { | |||
684 | cmd = cmd + " --define '_use_internal_dependency_generator 0'" | 684 | cmd = cmd + " --define '_use_internal_dependency_generator 0'" |
685 | cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'" | 685 | cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'" |
686 | cmd = cmd + " --define '_build_id_links none'" | 686 | cmd = cmd + " --define '_build_id_links none'" |
687 | cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS")) | 687 | cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS")) |
688 | cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS")) | 688 | cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS")) |
689 | cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" | 689 | cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" |
690 | cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'" | 690 | cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'" |
691 | cmd = cmd + " --define '_buildhost reproducible'" | 691 | cmd = cmd + " --define '_buildhost reproducible'" |
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index f3ff5b776b..030d29b097 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -816,6 +816,10 @@ XZ_THREADS[vardepvalue] = "1" | |||
816 | XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}" | 816 | XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}" |
817 | XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS" | 817 | XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS" |
818 | 818 | ||
819 | # Default parallelism for zstd | ||
820 | ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}" | ||
821 | ZSTD_THREADS[vardepvalue] = "1" | ||
822 | |||
819 | # Limit the number of threads that OpenMP libraries will use. Otherwise they | 823 | # Limit the number of threads that OpenMP libraries will use. Otherwise they |
820 | # may fallback to using all CPUs | 824 | # may fallback to using all CPUs |
821 | export OMP_NUM_THREADS = "${BB_NUMBER_THREADS}" | 825 | export OMP_NUM_THREADS = "${BB_NUMBER_THREADS}" |