Bug 1031051 - Modification of pkgconfig provides breaks RPM dependency generators
Summary: Modification of pkgconfig provides breaks RPM dependency generators
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: scl-utils
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1023625
Blocks: 1031072
TreeView+ depends on / blocked
 
Reported: 2013-11-15 14:31 UTC by Vít Ondruch
Modified: 2017-12-12 10:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1031072 (view as bug list)
Environment:
Last Closed: 2017-12-12 10:23:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Vít Ondruch 2013-11-15 14:31:16 UTC
With older RPM version, we used to use:

# filter pkgconfig Provides
%{?scl:%filter_from_provides s|pkgconfig(|%{?scl_prefix}pkgconfig(|g}
%{?scl:%filter_setup}

to modify pkgconfig provides to be collection specific. With recent RPM version, this breaks and "warning: Ignoring invalid regex ^%{_scl_prefix}/.*$" messages are reported in build log. This is apparently the same issue as reported in bug 982212.

Is there possible to find some solution, how to generate pkgconfig provides (and possibly others) in a systematic way?

Please note that bug 1023625 should be fixed prior this one.

Comment 4 Bohuslav "Slavek" Kabrda 2013-11-15 15:17:34 UTC
IMO the best available solution for this is currently using the same approach as %scl_package_override does:

- There should be a macro, let's say %scl_utils_override, that would be called just before %scl_package_override (e.g. inside the %scl_package invocation).
- This macro would redefine all the problematic generator macros, like %__pkgconfig_{provides,requires}, ...
- scl-utils-build would carry modified versions of scripts behind the original generator macros

This way, the generator macros would get redefined when %scl_package is called, that means in specfile. Hence this definition would replace any former definitions and the generators from scl-utils-build would be used.
Also, doing this would only modify scl builds; normal builds would still work as expected, as %scl_package (and %scl_package_override with it) wouldn't be called.

Comment 5 Jan Zeleny 2013-11-19 14:41:37 UTC
So here is the deal:
1. The %filter_* macros invoke an external scanner that doesn't process macros
2. The %filter_* macros can cause some nasty side effects
3. The %filter_* macros should not be used

Now for the solution (basically Slavek's proposal):
1. scl-utils can bring its own copy of pkgconfig dependency generator
2. scl-utils can redefine the pkgconfig macros so the right generator is invoked

But:
1. This can't scale for all possible generators (I can offer pkgconfig for now)
2. The override will be generic, it won't be possible to customize it further

Any thoughts?

Comment 6 Bohuslav "Slavek" Kabrda 2013-11-20 07:16:58 UTC
(In reply to Jan Zeleny from comment #5)
> But:
> 2. The override will be generic, it won't be possible to customize it further

But if you use %scl_utils_override (or whatever it'll be called) _before_ %scl_package_override, then %scl_package_override will still be able to override it, right? So we won't get any customization, but at least we'll be able to redefine the behaviour in collections if we need.

If you put %scl_utils_override after %scl_package_override, then we won't be able to redefine behaviour of scl-utils generators (maybe it's obvious, but I find it worth noting).

> Any thoughts?

Comment 7 Jan Zeleny 2013-11-20 07:56:53 UTC
(In reply to Bohuslav "Slavek" Kabrda from comment #6)
> (In reply to Jan Zeleny from comment #5)
> > But:
> > 2. The override will be generic, it won't be possible to customize it further
> 
> But if you use %scl_utils_override (or whatever it'll be called) _before_
> %scl_package_override, then %scl_package_override will still be able to
> override it, right? So we won't get any customization, but at least we'll be
> able to redefine the behaviour in collections if we need.

a) right, but you'd need to carry your own dependency generator script, scl-utils can't do that for you. If that's ok with you, I don't have a problem with that.


> If you put %scl_utils_override after %scl_package_override, then we won't be
> able to redefine behaviour of scl-utils generators (maybe it's obvious, but
> I find it worth noting).

b) sure but I wonder why would you need second override macro? I was going to put everything in the scl_package directly, is there any specific reason why would you separate it?

Comment 8 Bohuslav "Slavek" Kabrda 2013-11-20 12:31:31 UTC
(In reply to Jan Zeleny from comment #7)
> (In reply to Bohuslav "Slavek" Kabrda from comment #6)
> > (In reply to Jan Zeleny from comment #5)
> > > But:
> > > 2. The override will be generic, it won't be possible to customize it further
> > 
> > But if you use %scl_utils_override (or whatever it'll be called) _before_
> > %scl_package_override, then %scl_package_override will still be able to
> > override it, right? So we won't get any customization, but at least we'll be
> > able to redefine the behaviour in collections if we need.
> 
> a) right, but you'd need to carry your own dependency generator script,
> scl-utils can't do that for you. If that's ok with you, I don't have a
> problem with that.
> 
> > If you put %scl_utils_override after %scl_package_override, then we won't be
> > able to redefine behaviour of scl-utils generators (maybe it's obvious, but
> > I find it worth noting).
> 
> b) sure but I wonder why would you need second override macro? I was going
> to put everything in the scl_package directly, is there any specific reason
> why would you separate it?

In RH-built collections we shouldn't need that and putting everything into scl_package would do the job. I would however advise to make this a separate macro invoked like

%{?scl_utils_override:%scl_utils_override}

Since someone (customers) may want to turn it off completely for some reason. I think that making things more customizable this way won't cost us anything, but may save someone a lot of time.

Comment 9 Jan Zeleny 2013-11-20 13:09:01 UTC
I will take that into consideration, thanks for making your case here.

Comment 10 Jan Zeleny 2014-04-08 11:56:05 UTC
Upstream ticket:
https://fedorahosted.org/SoftwareCollections/ticket/16

Comment 12 Jaroslav Reznik 2015-03-03 16:56:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 13 Fedora Admin XMLRPC Client 2016-05-30 14:58:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 14 Fedora End Of Life 2016-07-19 10:35:57 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 15 Vít Ondruch 2016-07-19 11:58:40 UTC
I don't think this was resolved ...

Comment 16 Jan Kurik 2016-07-26 04:34:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 18 Fedora Admin XMLRPC Client 2016-10-12 08:02:49 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 19 Fedora End Of Life 2017-11-16 19:53:54 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 20 Fedora End Of Life 2017-12-12 10:23:47 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.