share
Unix & LinuxHow do you configure rpm-build on fedora 31 to use xz and NOT zstd?
[+1] [1] legs
[2020-04-14 19:27:31]
[ fedora rpm rpmbuild ]
[ https://unix.stackexchange.com/questions/580077/how-do-you-configure-rpm-build-on-fedora-31-to-use-xz-and-not-zstd ]

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??

[0] [2020-04-14 19:54:31] msuchy
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.


thanks for replying, but when i try to use that, it gives me this error: ERROR: File is not an srpm: mypackage.rpm - legs
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
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
1