1

I cannot use zstd for rpm-build compression because I need to install the rpm that i build on a centos 8 machine, which does not have zstd supported, and I'm unable to install anything new on that machine with yum. Is there any way for me to configure rpm-build on fedora 31 to use xz compression instead of zstd??

1 Answer 1

0
dnf install mock

And then:

mock -r epel-8-x86_64 your-package.src.rpm

And you have a package with xz payload. And build against RHEL 8 libraries.

This way you can build for any target on any distribution.

3
  • thanks for replying, but when i try to use that, it gives me this error: ERROR: File is not an srpm: mypackage.rpm
    – legs
    Commented Apr 14, 2020 at 20:30
  • I'm building the rpm from several jars in a java maven project. Is there a way to configure the java maven stuff to use mock?
    – legs
    Commented Apr 14, 2020 at 20:41
  • foo.src.rpm is the package with sources. foo.rpm contains compiled artifacts. See rpm-packaging-guide.github.io/#building-rpms You need to have the foo.src.rpm
    – msuchy
    Commented Apr 15, 2020 at 7:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .