1

I have an RPM package that depends on many other packages, so installing it will install everything I need - quite a normal approach. But one of the packages depends on custom nginx build (general nginx + some extra modules) from 3rd-part repo, which is not supported anymore. The bad part of it is that maintainer named that custom nginx package with some 'custom' name, not just 'nginx' but 'my-nginx').

As I do not use any of the nginx modules I'd better to use nginx.org's nginx package, but of course I can not install 'nginx' as it conflicts with 'my-nginx'. I can only do that by 'force' install.

Is there any way for me to have nginx as 'my-nginx' so dependency won't be break and system can be updated without complaining on broken packages?

Thank you!

Alexander
  • 774
  • 2
  • 11
  • 20
  • You need to either make your own my-nginx build or rebuild the depending package. – Florin Asăvoaie Apr 06 '16 at 09:22
  • Any way of exclude package from list of dependencies? The original package used to update sometime, so to have it updated I have 2 options: somehow 'mask' or 'exclude' my-nginx on system level so update won't complain if it is not there, or build my own nginx, name it my-nginx, and install. But the nginx used to update too, so I'd better use exclude if it is possible (I don't know how). – Alexander Apr 06 '16 at 09:35
  • You cannot exclude from dependencies. You could make use of the skip dependencies flag but that would skip ALL dependency checking, not only for that package. – Florin Asăvoaie Apr 06 '16 at 17:39

1 Answers1

2

It's actually easy with rpmrebuild.

yum install epel-release
yum install rpmrebuild

Then:

rpmrebuild --edit-spec --package /path/to/your/bad.rpm

Then edit the autogenerated spec file by renaming package/dependencies as desired. After saving, you will have the new .rpm file based on your edits.

Danila Vershinin
  • 5,286
  • 5
  • 17
  • 21