Building .RPM, restricting newer version to be installed

Issues related to applications and software problems and general support
Post Reply
manoaratefy
Posts: 2
Joined: 2014/03/07 14:16:52

Building .RPM, restricting newer version to be installed

Post by manoaratefy » 2022/06/13 13:02:22

Good morning,

I'm trying to build some .RPM on my own repository for internal use (some nginx modules unavailable in EPEL & other public repo). Currently, I have to provide specific version of package which depend on very specific version of another package: nginx-module-ndk-1.20.2+0.3.1 have nginx-1.20.2 as dependancy for example, not newer version, not older version.

But since nginx-1.22.0 is available on other repositories, dnf/yum update is broken:

Code: Select all

Last metadata expiration check: 0:31:48 ago on Mon Jun 13 14:26:01 2022.
Error:
 Problem: package nginx-module-ndk-1:1.20.2+0.3.1-1.el8.x86_64 requires nginx = 1:1.20.2, but none of the providers can be installed
  - cannot install both nginx-1:1.22.0-1.el8.ngx.x86_64 and nginx-1:1.20.2-1.el8.ngx.x86_64
  - cannot install the best update candidate for package nginx-module-ndk-1:1.20.2+0.3.1-1.el8.x86_64
  - cannot install the best update candidate for package nginx-1:1.20.2-1.el8.ngx.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
On my RPM spec file, I put "Requires: nginx = 1:1.20.2". Is there any supplementary thing to put on nginx-module-ndk RPM spec file to keep dnf/yum not trying to update "nginx" to the 1.22.0 and leading to this error?

Thanks in advance.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Building .RPM, restricting newer version to be installed

Post by TrevorH » 2022/06/13 19:17:48

To override RPMs provided as part of a module please see https://wiki.centos.org/TipsAndTricks/3pModules
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

manoaratefy
Posts: 2
Joined: 2014/03/07 14:16:52

Re: Building .RPM, restricting newer version to be installed

Post by manoaratefy » 2022/06/15 07:54:10

Hello,

I already have module_hotfixes=true on the nginx.org repository. I tried to add same on my own repo, the same error happens.

Post Reply