Questions about dependency specification & build requirements for OMLx packaging

Hi all,

Context

I’ve reviewing the RPM Packaging Guide for Fedora on the OM Wiki Create, maintain, and update packages page, as I prepare to create my first package (zathura-pdf-poppler, link to upstream) for the distribution’s repositories.

Questions

So far, I have a couple of questions:

  1. Dependency Naming: When specifying dependencies with BuildRequires, should I use the exact package names from the OpenMandriva repositories?

    • For example, the upstream README lists girara as a dependency, but on my system, the package available is girara-i18n.noarch.

    • Should I write:

      • BuildRequires: girara
      • or BuildRequires: girara-i18n
      • or something else?
  2. Build Tools: The Fedora RPM Guide examples use gcc and make as BuildRequires for building C programs, which makes sense.

    • Would this also apply to ninja and meson when building projects like zathura-pdf-poppler?
      • Based on the upstream instructions (build steps), it seems we need meson and ninja.

Thanks in advance for your guidance! I may follow up with additional questions later.

1 Like

You should use pkgconfig() or cmake() when possible. It makes the spec file easier to maintain and portable to other rpm based distros. You can find out what is specified for the name using that and the given name from the following site:

https://openmandriva.pkgs.org

Please support that site if you can. They work with us to make sure we know some things are broken with the package info from our repos, as well.

Specifying a compiler is not necessary. Most package building frameworks should have the base tools needed to compile things with C/C++ source code.

New packages should also use declarative builds:

This is really just a top level view of the capabilities and you should ask in the Cooker channel for more info about it. Packagers should be active in that channel.

1 Like

Specifying a compiler is not necessary. Most package building frameworks should have the base tools needed to compile things with C/C++ source code.

In this context, are we referring to “compiler” as ninja, and meson? I know GCC is a compiler for C code, so that helps. I was looking up ninja and meson, and all the info I’m finding that I’m understanding is that they’re pieces of software known as build systems. What is a “build system”, anyway (or is it even important to know the distinction in this case)? I’ve looked it up and also plugged my question into an LLM, but I’m afraid I’m not exactly understanding what the output means in a high-level way. All I get is something like “a build system is a more comprehensive automation tool that orchestrates the entire process of transforming source code into a final, usable software product”. Like, what is the difference between a build system and a compiler?

No, I mean gcc, llvm, etc… Mostly because it may not be gcc that every distro uses, like us. Our primary toolchain is llvm based.

Build systems are things like CMake, Meson, and some others. ninja-build is a more optimized make-style builder that is normally bolted onto a build system.

1 Like

That was really a bad idea, anyway. AI is not meant to help us.

But, I digress…

Build systems can use compilers to build code with a builder app. All a build system does is create a project hierarchy and framework to handle how your source code is laid out and how to deliver it once it has been built. The compiler takes source code and turns it into either machine code, or an intermediate language (IL).

So, are we saying here that, because every OMLx install by default already has llvm pre-installed, that we wouldn’t need to specify a compiler in the BuildRequires fields within the spec file?
However, in the case of for the specific package I’m putting into an RPM, we’d still need the other pieces of software (such as build systems) listed in the BuildRequiresthat is needed to build it listed in the spec?

BuildRequires only matter when the package is created. llvm is not needed for an average user or the package.

This takes reviewing the source code to determine. Many times they will include the dependencies for building in their README’s. In the case of CMake, you can tell because the sources will contain a file called CMakeLists.txt in some or all of the directories, including the root.

1 Like

You should use pkgconfig() or cmake() when possible. It makes the spec file easier to maintain and portable to other rpm based distros. You can find out what is specified for the name using that and the given name from the following site:

https://openmandriva.pkgs.org

Okay, so I’m liking this bit here so far. I’m a bit confused about what exactly pkgconfig() and cmake() is. To elaborate, I’m looked pkgconfig() up and read the Fedora documentation article BuildRequires: pkgconfig(foo) vs. foo-devel.

From what I’m picking up, in our case it works like a function with a parameter, where we plug in a value name of the dependency within the parenthesis to make the RPM “portable” between RPM-based distributions. So in the case of Z-PDF-P and girara, we could plug in something like:

  • BuildRequires: pkgconfig(girara)

Instead of:

  • BuildRequires: girara-i18n

If this is the case, where would the value of girara come in from the distribution as the “parameter value”? Like how would “girara” be found if the package is named differently between two different distros which might name the package differently? Or, am I misunderstanding how pkgconfig build dependencies work?

For clarity:

https://openmandriva.pkgs.org/cooker/openmandriva-main-release-x86_64/lib64girara-gtk3-devel-0.4.5-1-omv2590.x86_64.rpm.html

Under “Provides:”

pkgconfig(girara-gtk3)

For your specific package name:

https://openmandriva.pkgs.org/cooker/openmandriva-main-release-x86_64/girara-i18n-0.4.5-1-omv2590.noarch.rpm.html

Provides:

girara-i18n

It would be important to verify what is actually needed. You will very rarely need internationalization during the build process.

https://openmandriva.pkgs.org/cooker/openmandriva-main-release-x86_64/lib64girara-gtk3-devel-0.4.5-1-omv2590.x86_64.rpm.html

Under “Provides:”

pkgconfig(girara-gtk3)

For your specific package name:

https://openmandriva.pkgs.org/cooker/openmandriva-main-release-x86_64/girara-i18n-0.4.5-1-omv2590.noarch.rpm.html

Provides:

girara-i18n

Huh, I noticed that in both examples, both packages “Provides” itself. What’s up with that?

Provides are what other packages look for as dependencies later on.

1 Like

Provides are what other packages look for as dependencies later on.

Okay, I think I understand what you mean.

Would it be like how yt-dlp would “Provide” (look for) ffmpeg as a dependency to run in certain operations?

Other way around. pkgconfig(ffmpeg) or the like is a Provide that yt-dlp can look for to satisfy that dependency.

Those are referred to as just Requires.

Other way around. pkgconfig(ffmpeg) or the like is a Provide that yt-dlp can look for to satisfy that dependency.

I might need to think about this for a while. I am trying to wrap my head around this concept and it’s just not sticking. :laughing:

Those are referred to as just Requires.

Okay, yes I noticed this. I was looking at https://openmandriva.pkgs.org/cooker/openmandriva-main-release-x86_64/yt-dlp-2025.11.12-1-omv2590.noarch.rpm.html and noticed that ffmpeg was listed as a Requires. Thanks for the clarification!

Look at it from the perspective of the package itself. It is “providing” software, with the name of itself and other points of reference to make finding the package simpler when it comes to using it to satisfy the build dependencies of another package (the BuildRequires).

Another thing I would suggest before you delve into packaging specific things, is to check our Issues page for good first issue tags with package update or package request tags.

I’m a bit confused about Creating a spec file | Create, maintain and update packages | OpenMandriva wiki. From what I understand, the process deviates from Fedora because we’re using abb & v* on OpenMandriva Lx, instead of rpmbuild, rpmdev-newspec, & rpmdev-setuptree.

Is the typical sequence of steps here that we:

  1. Generate a .spec with a v* program (such as vs).
  2. Grab the .tar.gz file of the software project from upstream
  3. Uncompress said the .tar.gz file
  4. Put our .spec file into the unzipped project directory
  5. Navigate into the unzipped project directory
  6. Then run abb build, no other wording or options or anything else, to see if it completes without error?

I use the rpmbuild stuff for local builds because I was learning packaging with PCLOS before I landed here. I’m sure I make it harder on myself than I have to, but it’s still possible to do that. I also attach my build tree as a repo so I can just use dnf as normal.

1 Like

Thee `abb build` command will download whatever you listed as the source URL.

1: `v* {name}`

2: `cd abf/{name}`

3: `abb build`

You don’t need to manually download or extract the tarball, abb build does it for you.

1 Like