3

I've recently discovered software collections and understand how they allow me to install multiple versions of software by introducing a namespace for each collection. On Enterprise Linux, this is neat because I'll be able to keep the the regular stability of my system, while now being able to easily update certain versions of software as they are updated (not just security updates, but features too!)

I'd like my system's main webserver to be httpd 2.4. The version available from centos-sclo-rh software collection is currently 2.4.12, while the version available from base is only 2.4.6. So I installed httpd from that SCL and enabled it:

> scl enable httpd24-httpd bash

And then enabled and started the service using systemctl

> systemctl enable httpd24-httpd
> systemctl start http24-httpd

So I would expect my system should understand that I now have a webserver installed. However, when I try to install phpmyadmin from epel, it still wants to install the standard httpd package from base as a dependency.

Looking in to a bit of the mechanics of rpms, I've just learned that packages can have a Provides line in their spec file listing virtual packages like webserver, and indeed the src rpm for httpd has a Provides: webserver line. I'm guessing that the httpd24-httpd package I obtained from the SCL doesn't have that descriptor.

How can I get my system to recognize the installed and enabled httpd from the SCL provides the webserver virtual package so that it doesn't want to install the httpd package from base to fulfill the webserver virtual dependency?

1

As suggested by @Michael Hampton, I reached out to the SCL group as it maintains the httpd24-httpd package (and many others). Here's the response I got from Joe Orton:

SCLs are not expected to be compatible at package level with system packages by definition. Packages which depend on "webserver" typically want to drop a config file into /etc/httpd/conf.d, as you've found, and that doesn't work with the SCL httpd24.

You could in theory bridge the gap between packages which require "webserver" and httpd24: own /etc/httpd/conf.d, drop a file in /opt/rh/.../conf.d/ which has an IncludeOptional for that directory, and provide "webserver". Not sure I'd recommend it, but it should be possible to get working with some hacking.

In this particular case, I value the ease of system maintainability over the smaller installed-software footprint resulting from not needing both httpd and httpd24-httpd installed; so I installed both and am fine with that. If you really don't want to have those two packages installed at the same time, then Joe has suggested a possible way forward you can consider.

  • While Joe sometimes misses the boat on dependencies ('apache' vs 'httpd' anyone? Thanks Joe), he does have a point about a virtual dependency thing to glue the packages in. I've done this in the past - probably for Joe's httpd mess - and it mostly works out. But keep in mind you're putting a square peg (phpmyadmin) into a round hole: you will run into other issues, either with mixing the two install roots and versions, or from the technical debt incurred from your workarounds. Tread carefully and really assess the value of 6 point releases. – user2066657 Jun 28 '18 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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