Topic: mock / epel-8 / remi

Hi,

I'm trying to use mock to target epel-8-x86_64 + remi. Mock works great for building this package for Fedora 34 & 35. So far I created this mock config file:

include('templates/centos-8.tpl')
include('templates/epel-8.tpl')

config_opts['root'] = 'epel-8-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['module_enable'] = ['php:7.4']

config_opts['dnf.conf'] += """

[remi]
name=Remi's RPM repository for Enterprise Linux 8 - $basearch
mirrorlist=LINK
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///usr/share/distribution-gpg-keys/remi/RPM-GPG-KEY-remi2018

[remi-modular]
name=Remi's Modular repository for Enterprise Linux 8 - $basearch
mirrorlist=LINK
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///usr/share/distribution-gpg-keys/remi/RPM-GPG-KEY-remi2018

[remi-safe]
name=Safe Remi's RPM repository for Enterprise Linux 8 - $basearch
mirrorlist=LINK
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///usr/share/distribution-gpg-keys/remi/RPM-GPG-KEY-remi2018
"""


The problem is during package build there are some version conflicts, probably due to modular stuff:

Error:
Problem: conflicting requests
  - package php-sodium-7.2.34-4.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-7.2.34-6.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-7.3.28-1.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-7.3.29-1.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-7.4.20-1.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-7.4.21-1.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-8.0.7-1.el8.remi.x86_64 is filtered out by modular filtering
  - package php-sodium-8.0.8-1.el8.remi.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)


Do you have any idea how to fix this? Does it require changes to the spec file? Can this php:7.4 module be somehow "forced" also for dependencies that are installed? I'd prefer to not modify the spec file though to keep it uniform and simple.

The spec file of the package I am trying to build: https://git.sr.ht/~fkooman/php-oauth2-s … erver.spec

Thanks!

Re: mock / epel-8 / remi

EPEL buildsystem, and mock configuration are totally broken (for modules)

I use some proper mock configuration files which are module aware
These are public, see the el8*.cfg file in
https://git.remirepo.net/cgit/tools/mock.git/tree/

Else you can try using the flat repo way using (for ex)
https://rpms.remirepo.net/enterprise/8/php74/x86_64/
And disabling remi-modular.

But I haven't test it.

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: mock / epel-8 / remi

Thanks!

Neither works for me. Your mock example files point to a local directory it seems. Do you also have one that can be used directly with your repositories? Or would just changing the mock files to point to your server be enough?

Re: mock / epel-8 / remi

> Or would just changing the mock files to point to your server be enough?

Should be enough.
(I only use local mirror, or mounted RHEL iso, as this is much faster)

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: mock / epel-8 / remi

Notice that this configuration files are the ones I used to build package "for" my repository, so contains lot of macro which are specific for this usage (%dist, %vendor, ...)

So, in all case, lot of changes are needed.
Only there for transparency

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: mock / epel-8 / remi

Thanks! I'll look into that and also update the repository links to point to Rocky Linux at the same time.

Re: mock / epel-8 / remi

I managed to get it working! I'm sure it can be tweaked and simplied a lot still. The trick seems to be to enable the php:remi-7.4 module.

See: https://gist.github.com/fkooman/c8cb3b4 … f72945dae8

Sorry for not copy/pasting here, but it doesn't accept > 1 link and the mock config file is full of "links".

Re: mock / epel-8 / remi

Or on top of CentOS / EPEL, much simpler! https://gist.github.com/fkooman/b20087a … 5d9603373c

Re: mock / epel-8 / remi

smile

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

10

Re: mock / epel-8 / remi

As could be useful for other, I saved your file in my git
https://git.remirepo.net/cgit/tools/moc … 1a08d0f0bf

Perhaps mays worth to be added in the remi-release package...

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

11

Re: mock / epel-8 / remi

Notice: this configuration only works in simple cases, where only the "php" module is needed

It won't work for more complex cases, ex trying to build php-pecl-redis5 which requires "redis" (from another module) for its test suite.

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: mock / epel-8 / remi

Yes, that is enough for me for now, but perhaps if I ever need additional modules that should be easy to add to my local builder config. I'm just so stubborn to want to build software on EL8 and to actually also run the (unit) tests while building the RPM on the exact target we'll deploy on as an extra QA step to avoid issues in production as much as possible smile

Thanks for your work on all things EL and PHP! smile