mirror of
https://git.yoctoproject.org/poky
synced 2026-03-25 10:02:22 +01:00
package_rpm: Allow compression mode override
Commit 4a4d5f78a6 ("package_rpm: use zstd
instead of xz") changed the rpm package compressor from 'xz' to 'zstd'
which results in decompression failure with BusyBox-provided 'rpm2cpio'
applet and 'rpm' applet when given the '-i' (Install package) option:
rpm2cpio: no gzip/bzip2/xz magic
Introduce a variable which makes it possible to use a different
compression mode, making it possible to override the default value for
example like
RPMBUILD_COMPMODE = "${@'w6T%d.xzdio' % int(d.getVar('XZ_THREADS'))}"
to enable rpm decompression without including the full rpm package in
the resulting root filesystem.
(From OE-Core rev: a40d9258148e28cbee2168c93179cd4c1232fb62)
(From OE-Core rev: ad4ea9f225b0dd6396088cc70b34f886c5fa62b4)
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
f35f1aaf22
commit
e46e74cd90
@@ -4,6 +4,7 @@ IMAGE_PKGTYPE ?= "rpm"
|
||||
|
||||
RPM="rpm"
|
||||
RPMBUILD="rpmbuild"
|
||||
RPMBUILD_COMPMODE ?= "${@'w19T%d.zstdio' % int(d.getVar('ZSTD_THREADS'))}"
|
||||
|
||||
PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
|
||||
|
||||
@@ -652,6 +653,7 @@ python do_package_rpm () {
|
||||
|
||||
# Setup the rpmbuild arguments...
|
||||
rpmbuild = d.getVar('RPMBUILD')
|
||||
rpmbuild_compmode = d.getVar('RPMBUILD_COMPMODE')
|
||||
targetsys = d.getVar('TARGET_SYS')
|
||||
targetvendor = d.getVar('HOST_VENDOR')
|
||||
|
||||
@@ -678,8 +680,8 @@ python do_package_rpm () {
|
||||
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
|
||||
cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
|
||||
cmd = cmd + " --define '_build_id_links none'"
|
||||
cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
|
||||
cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
|
||||
cmd = cmd + " --define '_source_payload %s'" % rpmbuild_compmode
|
||||
cmd = cmd + " --define '_binary_payload %s'" % rpmbuild_compmode
|
||||
cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
|
||||
cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
|
||||
cmd = cmd + " --define '_buildhost reproducible'"
|
||||
|
||||
Reference in New Issue
Block a user