Topic: The -scldevel and -build packages conflict with each other

I'm creating a third-party PHP extension.  This extension will be deployed using an RPM package.  I'm trying to ensure that I only need to use one spec file, that will generate multiple RPMs for each PHP version (e.g. php 5.4, 5.5, and 5.6).

In doing so, I'm attempting to install all PHP (and devel) packages at the same time.

However, I've noticed that the various PHP versions lay down the same files, as well as define the same macros.

For example:

  • php54-scldevel-1.1-6.el6.x86_64 and php55-scldevel-1.1-6.el6.x86_64 both lay down the /etc/rpm/macros.php-scldevel file.

  • php54-build and php55-build define the same macros (e.g. %global php_pdo_api  %php55_php_pdo_api)

Is this intentional?  If so, why would this not be a problem?

Re: The -scldevel and -build packages conflict with each other

Yes this is intentional and by design.

- php54-build is needed to build package in php54 SCL (and a package is only in 1 SCL)
- php54-scldevel is used to build package in another SCL which depend on 1 php SCL (foo-build requires phpxx-build)

> I'm trying to ensure that I only need to use one spec file, that will generate multiple RPMs for each PHP version (e.g. php 5.4, 5.5, and 5.6).

Doesn't seems the best solution, you need to be aware of each existing SCL, and only use the macro provided by phpxx-php-devel (ex php55_php_pdo_api). A new SCL imply to change the spec.

Simpler to have a single spec, and rebuild it once per PHP version / SCL, this is the solution I use for packages in my repository (and which is used in RHSCL).

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: The -scldevel and -build packages conflict with each other

So, if I understand correctly, an SCL should contain only 1 version of a piece of software?

For example, 1 SCL should contain PHP 5.4 + anything that depends on it.  A different SCL should contain PHP 5.5 + anything that depends on that.
Both PHP 5.4 and 5.5 should NOT be in the same SCL.

Re: The -scldevel and -build packages conflict with each other

Right.

> Both PHP 5.4 and 5.5 should NOT be in the same SCL.

There is 1 SCL per PHP version, php54, php55, php56 (or rh-php56) and php70

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi