Is there a way to list the packages on Fedora RPM based on the core language the package is written in?

Among all the packages available on Fedora RPM, is there any way to filter projects based on the primary language they are written in?
For example,
package x : java
package y: python
package z: C

1 Like

There isn’t a direct way, but one can inspect the capabilities required by a package to get some idea of the language that it is written in, or provides bindings for.

For example:

$ rpm -q --requires fpaste
/usr/bin/python3
python3
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1

This tells us that fpaste requires python3. nest, on the other hand is C++:

$ rpm -q --requires nest
/usr/bin/sh
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.4)(64bit)
..
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.8)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
libstdc++.so.6(GLIBCXX_3.4.26)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)

but, as the nest maintainer I know that nest also provides python bindings in a different sub-package, which is named python3-nest for simplicity:

$ rpm -q --requires python3-nest
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libmodels.so()(64bit)
libnest.so()(64bit)
libnestkernel.so()(64bit)
libpy3neurosim.so.0()(64bit)
libpython3.7m.so.1.0()(64bit)
librandom.so()(64bit)
libsli.so()(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libtopology.so()(64bit)
nest = 2.18.0-7.fc31
nest-common = 2.18.0-7.fc31
python(abi) = 3.7
python3dist(numpy)
python3dist(scipy)
...

For languages that have clear module eco-systems, the guidelines provide clear naming. So all python packages would be python3-*, all R packages would be R-*, all ocaml packages would be ocaml-* and so on. However, if they are applications and not modules, this naming scheme isn’t required. You can read more in the packaging guidelines here:

The best way would be to look at upstream websites, or the spec files used to generate the rpms at https://src.fedoraproject.org

More information on RPMs here:

4 Likes