0

I recently built a package of executables for Debian (actually, Ubuntu 18 and 20). A tarball of the core content was able to run on Fedora 34. So now I've been asked to create an RPM for it as well.

The Debian filename is something like:

mystuff-sfwrname-edu_21.05-0715.1234-u20_amd64.deb

This corresponds to the name _ version _ arch.deb syntax of Debian package filenames. The underscores are major separators; the minus signs don't really matter. (u20 indicates an Ubuntu 20.04 version; due to a libc issue, there is also a u18 version for Ubuntu 18.04.)

Coming the the RPM world, I find the syntax is: name-version-release.arch.rpm, where the minus signs and final period are significant. And yet there seem to be package names like openssh-clients-7.4p1-16.el7.x86_64 with minus signs in the name and periods before the architecture.

Can I then name my package as:

mystuff-sfwrname-edu-21.05-0715.1234.el7.x86-64.rpm

where:

  • name = mystuff-sfwrname-edu (with multiple minus signs)
  • version = 21.05
  • release = 0715.1234.el7
  • arch = x86_64

And if I presume the same RPM works on Fedora 34 as well as CentOS 7, would I just take out el7 or is there some other rule/practice that I'm unaware of?

  • Looks OK. ...... An "el7" package usually works with later Fedora versions. . ( CentOS 7 is based on Fedora 19 , CentOS 8 is based on Fedora 28.) ...... The el7 package can be installed with `# dnf install ./package.rpm` – Knud Larsen Jul 21 '21 at 01:25
  • @KnudLarsen Thanks for your insight. – Justin JRTI Jul 21 '21 at 21:15

1 Answers1

0

In short - yes, you can.

More information about version guidelines https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/

The .el7 is disttag. Usually written in spec as:

Release: 0715.1234%{?dist}

RPM itself does not care about it at all. It treats it as a simple string. just .el7 < .el8. So technically you can install packages from .el7 to RHEL8. But of course, sometimes it does not work as expected because of different paths on different platforms. You have to test it yourself.

msuchy
  • 5,162
  • 1
  • 14
  • 26