Barry Wark
Barry Wark

Reputation: 107764

Specifying RPM dependency as "one of the following"

I am developing an RPM spec file for an in-house package. The package depends on libuuid, which is available as the libuuid package on Fedora, but there is no libuuid package for CentOS 5 in the standard RPM repositories. We can satisfy the dependency on CentOS with the e2fsprogs-devel development RPM (e2fsprogs-devel installs libuuid and the associated headers). I would like to specify that our RPM depends on libuuid, such that the libuuid package is installed on Fedora during installation of our RPM, but e2fsprogs-devel is installed during installation on CentOS. Is there a way to specify a dependency as "one of libuuid or e2fsprogs-devel, in that order" in an RPM spec file?

Upvotes: 1

Views: 1373

Answers (2)

reichhart
reichhart

Reputation: 889

You may directly specify files as a requirement but this is ugly. Also don't use %dist for distinguishing.

You should just rely on the build process. If one specific file is located in different packages depending on the distro then you should just (re-) build the package on every distro you wish to support (AutoReq/AutoReqProv must not be disabled).

Upvotes: 2

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799310

No. Use the Dist Tag to distinguish between Fedora and one of its derivatives.

Upvotes: 1

Related Questions