[OE-core] [PATCH 1/2] package_rpm.bbclass: use multithreaded xz compression

Mark Hatle mark.hatle at windriver.com
Thu Jun 1 17:11:16 UTC 2017


On 6/1/17 10:15 AM, Alexander Kanavin wrote:
> RPM's default is single-threaded gz; the change greatly helps with
> both buildtimes (when there is a small number of large-sized packages)
> and disk space taken by resulting rpms.

If you wnable XZ here, you need to make sure XZ compression is enabled within
rpm itself.  (I know how that worked in rpm5, not sure how rpm4 does it -- it
may be enable that the binary be present to call out to.)

Similarly to XZ, you can use pigz or other parallel compression tools to do
similar with other schemes.

Finally I have not investigated parallel XZ, but in some cases the resulting
compressed file is different depending on compression artifacts due to
parallelization.  (The compressed file is different, not the uncompressed content.)

This can be a concern to some who want fully reproducible builds (from source).
So we need to make sure we have a way to disable this type of parallelization
--if-- it causes a problem with different contents.

(Note the fact RPM package metadata changes each time a new RPM is constructed,
this is far -less- of a concern to me.. but something to be aware of.)

--Mark

> Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
> ---
>  meta/classes/package_rpm.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index a844c4d4360..dc241975c3b 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -644,6 +644,8 @@ python do_package_rpm () {
>      cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
>      cmd = cmd + " --define '_use_internal_dependency_generator 0'"
>      cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
> +    cmd = cmd + " --define '_binary_payload w6T.xzdio'"
> +    cmd = cmd + " --define '_source_payload w6T.xzdio'"
>      if perfiledeps:
>          cmd = cmd + " --define '__find_requires " + outdepends + "'"
>          cmd = cmd + " --define '__find_provides " + outprovides + "'"
> 




More information about the Openembedded-core mailing list