rpm-software-management / mock

Mock is a tool for a reproducible build of RPM packages.
GNU General Public License v2.0
384 stars 235 forks source link

Fedora 31 zstd RPMs and repos cannot be handled on older operating systems #390

Closed nkadel closed 5 years ago

nkadel commented 5 years ago

Short description of the problem

Fedora 31 now publishes their RPMs with zstd compression. Older RPMs cannot handle this format, and mock is completely useless to compile Fedora 31 packages on older operating sytems.

Output of rpm -q mock

mock-1.4.20-0.el8.noarch

Steps to reproduce issue

  1. Install mock and mock-core configs on CentOS 7 or CentOS 8
  2. Run "mock init fedora-30-x86_64

Do not forget to mention full commandline with the mock command you executed.

Any additional notes

This is a basic Fedora RPM problem which the community warned Fedora about with the Fedora 31 release. But it breaks mock compilation for all future Fedora releases. The only fixes are to write RPM package uncompression into mock itself, replacing rpm, yum, and dnf based package installaiton, or to get the libraries backported into older operating system releases of RPM.

I don't have a great solution, but thought I'd better make the nature of the issue clear.

Consider adding output of mock --debug-config this can help developers to reproduce the issue.

xsuchy commented 5 years ago

To build F31+ packages on older platform you need to enable bootstrap and Container image for Bootstrap https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.20#container-image-for-bootstrap

nkadel commented 4 years ago

This workaround is order sensitive. The "config_opts['bootstrap_image'] " entry has to be explicitly listed first.

xsuchy commented 4 years ago

@nkadel first than what? The configs are read 'en bloc'. So it should not be order sensitive.

nkadel commented 4 years ago

In this order works.

config_opts['bootstrap_image'] = 'fedora:31' config_opts['use_bootstrap_image'] = True config_opts['use_bootstrap_container'] = True

Putting in the bootstrap_image last among these three in the /etc/moick/templates/fedora-31.tpl does not work. from some startled exploration of patching fedora-31.tpl.

praiskup commented 4 years ago

Can you try with latest mock from devel [1] branch? Because of jinja pre-evaluation, there used to be ordering glitches ... but now the order really shouldn't matter. [1] https://copr.fedorainfracloud.org/coprs/g/mock/mock/

nkadel commented 4 years ago

With the latest “devel” branch, the necessary image settings for fedora31 are no longer order sensitive. I assume therefore that this will be fixed with the next tagged release.