BuildRequires: cmake(GTest)
and BuildRequires: gtest-devel
are not equivalent. Right now they happen to both install the same package. That may or may not change in the future. The name cmake(GTest)
satisfies the requirement for cmake’s find_package(GTest)
. The additional provides make the lives of package maintainers easier. They don’t need to locate the right package for a cmake requirement. The system can figure out the right RPM package for the maintainer.
RPMs provide additional names to decouple the package name from its content. A lot of provides, requires, and build requires are automatically injected by RPM macros and the build system. The cmake
and pkgconfig
provides are not in in gtest.spec. They are added by the RPM build system.
$ dnf repoquery --provides gtest-devel
cmake(GTest) = 1.13.0
cmake(gtest) = 1.13.0
gtest-devel = 1.13.0-3.fc39
gtest-devel(x86-32) = 1.13.0-3.fc39
gtest-devel(x86-64) = 1.13.0-3.fc39
pkgconfig(gtest) = 1.13.0
pkgconfig(gtest_main) = 1.13.0
Right now the output of the tool is RPM specific and only useful on RPM based distros (Fedora, RHEL, OpenSUSE, CentOS). I’m not familiar enough with other Linux distros to assess their needs. I’m open to extend the tool if there is a use case in the Python packaging ecosystem. The main use case are wheels that link to system libraries. The information from the tool lets us automatically install RPMs and detect ABI conflicts.