6 votes

What is the RPM equivalent to `dpkg --compare-versions ...`?

On rpm >= 4.16.0: $ rpm --eval "%{lua:print(rpm.vercmp('1.2-1', '2.0-1'))}" -1 (rpm >= 4.7.0 compares only parts, not full Epoch:Version-Release strings) For OpenSUSE, there is also ...
bhdnx's user avatar
  • 281
5 votes
Accepted

List files only in rpm package

It would appear that rpm has no builtin option to suppress directories in the file list output. However, you can use the --queryformat option (without -l) to print file modes and file names for each ...
AdminBee's user avatar
  • 22.8k
5 votes
Accepted

RHAOS packages on RHEL

RHAOS refers to Red Hat Atomic OpenShift. Those packages are specifically designed for use on OpenShift nodes. While they may work on regular RHEL nodes, it is recommended to use regular RHEL packages ...
Stephen Kitt's user avatar
4 votes

Can't run RPM due to calling hook fsm_file_prepare in selinux plugin on Oracle Linux 9.3

I hit this problem on Oracle Linux 8.9 server, due to an unpublished Oracle bug which requires a manual workaround. Oracle Support Document 3002168.1 - Oracle Linux 8: The dnf install/update Commands ...
Matt Christian's user avatar
4 votes

How to check the source code of an rpm fusion package?

You can browse https://rpmfusion.org/ , e.g. Open: Fedora -> 39 -> Updates -> Free -> Source -> qmplay2 and then you'll see: qmplay2-23.10.22-1.fc39.src [1.5 MiB] Changelog by Martin ...
Artem S. Tashkinov's user avatar
3 votes

How to check the source code of an rpm fusion package?

First you need to find out what is the name of the source package which can be different from the installed package name (usually because one source package provides multiple packages). For xorg-x11-...
Vojtech Trefny's user avatar
3 votes

List files only in rpm package

There are a couple of options to restrict the output: -c, --configfiles List only configuration files (implies -l). -d, --docfiles List only documentation files (implies -l). But nothing for all ...
muru's user avatar
  • 72.9k
3 votes

Centos install exim 4.94 dependency error

You say you are installing onto CentOS 7, but the exim-4.94-2.eln102.x86_64.rpm package you have looks to have been built for CentOS 8 due to the requirement for libc.so.6(GLIBC_2.28)(64bit). You ...
GracefulRestart's user avatar
3 votes
Accepted

How to "grep" a rpm?

rpm -qf will tell you what package owns a file. e.g. % rpm -qf /bin/sh bash-4.2.46-35.el7_9.x86_64 % rpm -qf /bin/vim vim-enhanced-7.4.629-8.el7_9.x86_64 If a package isn't installed, then you can ...
Stephen Harris's user avatar
2 votes
Accepted

rpmbuild: handle naming differences of packages in different distributions

In this case you should be able to use pkgconfig(cryptopp). Packages that use pkg-config can use this syntax in both Fedora and SUSE, but this is a special case with pkgconfig, in other cases you'll ...
Vojtech Trefny's user avatar
2 votes

How to create a global variable in RPM spec file

The macros in the SPEC file are set during rpmbuild time. I.e. when you are creating the rpm package. During the build time they are expanded and cannot be altered later - e.g., during installation. ...
msuchy's user avatar
  • 1,470
2 votes
Accepted

How does RPM determine whether a symbol is needed and present?

When a new rpm is built, the rpmbuild command checks by default all the dependencies of the binaries that belong to this rpm (using a dependency generator). It usually has some helper script1 such as ...
aviro's user avatar
  • 5,542
2 votes

List files only in rpm package

libarchive as used by bsdtar, bsdcpio and many graphical archive extractors supports RPM files, so you could for instance use bsdtar to convert the RPM to tar format on the fly and use star to filter ...
Stéphane Chazelas's user avatar
1 vote
Accepted

How can I know which not installed RPM package contains a not installed command?

Either of these should work: zypper search --provides tlmgr cnf tlmgr dnf whatprovides tlmgr
Artem S. Tashkinov's user avatar
1 vote
Accepted

RHEL9: List dependencies of a "rpm" package with "dnf": I wish to see the Repo package name

You might try adding --resolve. Example on Fedora 38: $ dnf repoquery --arch x86_64 --resolve --requires java-17-openjdk-devel alternatives-0:1.25-1.fc38.x86_64 bash-0:5.2.21-1.fc38.x86_64 glibc-0:2....
meuh's user avatar
  • 51.5k
1 vote

distribute userspace and kernel component in one RPM

yes, RPM doesn't care about what's in a package. However, it's against RHEL/fedora/Alma/Rocky Linux packaging guidelines. Whether you care is a different story. I'd like to provide this as 1 package ...
Marcus Müller's user avatar
1 vote

Can I recreate a corrupted RPM database?

In case of: error: rpmdb: damaged header #5904 retrieved -- skipping. Try: mkdir /var/lib/rpm/old/ mv /var/lib/rpm/__db* /var/lib/rpm/old/ rm -f /var/lib/rpm/__db* restorecon -Rv /...
Gabriele Pigozzo's user avatar
1 vote

How to "grep" a rpm?

The very first command in your question with any variation of *bin/<file> gives exactly what you are asking for: yum provides *bin/vim yum provides /bin/vim yum provides /usr/bin/vim vim-...
Nasir Riley's user avatar
  • 11.4k
1 vote

Creating RPM for 3rd party software with local site configuration

I would create a separate thirdpartysoftware-config-yourcompany RPM package that contains only the config files and depends on the main RPM package via Requires: thirdpartysoftware, versioned as ...
Rathann's user avatar
  • 46
1 vote
Accepted

Do .rpm files installed with rpm get update notices from dnf check-update?

dnf will check the repos for packages to be updated. If you install alone rpm dnf have no information when there is new version. And to avoid warnings/problems with rpm database use command: dnf ...
Romeo Ninov's user avatar
  • 17.5k
1 vote

Spec file for rpmbuild to build gdb9 on ec2

Well, you want to build an RPM! I'd like the rpm to be something that it's the only this required, but I'm not sure if it's a good idea Well, what components does the software you install need to ...
Marcus Müller's user avatar
1 vote
Accepted

Trying to build a source rpm getting: error: Architecture is not included: x86_64

Expand the macros behind the spec file with rpmspec -P ./podman.spec If you see something like Name: podman Epoch: 5 Version: 4.5.0 License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and ISC and ...
Evan Carroll's user avatar
  • 30.9k
1 vote

build rpm for python2 if python3 is not installed

There are two different approaches The first you've sort of outlined, but it requires forethought. Namely doing something like %if 0%{?rhel_version} < 800 Requires: policycoreutils-python %else ...
Valarauca's user avatar
  • 193
1 vote

RPM-based Linux: How can I remove a locally installed package?

I have just been through this process. The filename for the rpm package I installed was not the same as the package name. It is possible to find packages that have been installed using yum ...
rbncrthms's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible