1

Goal is to identify a package version across distros RPM based Fedora, CentOS, RedHat etc. Can I rely on upstream version to be same on all the distros? If yes then how can I retrieve (RPM or DEB) upstream version number from command line?


Can't post this as an aswer -->

These dependencies that are listed in rpm -qp -requires .rpm are virtual packages if automatic dependencies is specified in .spec file. These virtual packages are NOT library soname but rather just virtual package names (even though they look like soname).

e.g. on Fedora 27, this works

$ rpm -q --whatprovides "libQt5Core.so.5()(64bit)"        
qt5-qtbase-5.9.2-5.fc27.x86_64   

but this doesn't

$ rpm -q --whatprovides libQt5Core.so.5
no package provides libQt5Core.so.5
$ rpm -q --whatprovides libQt5Core
no package provides libQt5Core
$ rpm -q --whatprovides Qt5Core
no package provides Qt5Core

If your own .rpm itself bundles the libraries (i.e. provides these virtual packages) then RPM will not complain if these virtual packages are not installed on the system since they are supplied with your package.

closed as too broad by Michael Homer, Kiwy, Thomas Dickey, Jeff Schaller, Christopher Mar 12 '18 at 18:09

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    No, and no. – Michael Homer Mar 12 '18 at 4:53
  • 3
    Here is a good example of why you can't, but I'm sure we've got the opposite question around somewhere (if only I can find it). – Michael Homer Mar 12 '18 at 4:56
  • 1
    @MichaelHomer+ the most commonly annoying example is RedHat httpd = Debian apache2 . – dave_thompson_085 Mar 12 '18 at 7:28
  • Reading between the lines it sounds like their might be some other actual goal? Like seeing which is the most recent package across distros, or something else? – pbhj Mar 12 '18 at 8:37
  • @pbhj You are right. I want to generate RPM package with manual dependencies and but dont know what version and name to use because this RPM package should be usable across CentOS, Fedora, RedHat and couple of other RPM based distros. – PnotNP Mar 12 '18 at 18:06
1

You cannot depend on (all) Linux distributions using the same upstream version of a particular package at any one time as each distribution has its own development cycle.

While you will see a lot of commonality in package names across distributions, there is no guarantee. As a rule of thumb, package names will be mostly the same across a distribution and any derived downstream distributions. Think Debian and Ubuntu for example, or Redhat and CentOS.

  • This. The apache2 webserver package in Debian can be gotten with apt-get install apache2 whereas in RedHat et al it would be yum install httpd. Been so long since I used slackware I'm not sure what that package name would be.... – ivanivan Mar 12 '18 at 18:59
  • 1
    Since i'm creating one Deb and one RPM package, is it safe to assume that name specified in DEB will be same across all debian based distros? And the same assumption for RPM based distros? It seems from your response that answer would be no. – PnotNP Mar 12 '18 at 21:10
  • @PnotNP. Somewhat safe for the major distributions if no dependencies but no guarantees. If you have dependencies, you will probably have to do a package per major distribution. – fpmurphy Mar 13 '18 at 2:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.