#591 Description of filtering macros in Packaging:AutoProvidesAndRequiresFiltering#Perl is outdated
Closed: accepted 7 years ago Opened 8 years ago by zbyszek.

%{?perl_default_filter}
looks like this now:
{{{
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir}
%global __requires_exclude_from %{?__requires_exclude_from:%__requires_exclude_from|}^%{_docdir}
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\(VMS|^perl\(Win32|^perl\(DB\)|^perl\(UNIVERSAL\)
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\(VMS|^perl\(Win3
}}}

so the advice "If you want to use both %perl_default_filter and customized %__provides_exclude or %__requires_exclude macros be sure to use %perl_default_filter first" is not optimal: actually doing it the other way around, and defining own exludes first is simpler and less error prone.

[https://bugzilla.redhat.com/show_bug.cgi?id=1288731#c19]


Do you have a diff you'd prefer for the policy?

No, but I can write one if that would help.

It definitely would.

I agree that the current guidelines are wrong (they do not agree with reality and they do no work). However the draft is also not perfect:

First, I would remove the perl_default_filter definition completely. If somebody is interested about the implementation, he can look into the macro file. The guidelines should only mention that perl_default_filter amends filter values.

Second, the draft's custom filter is flawed in exactly the same way as current guidelines' perl_default_filter definition is---it does not append, it redefines. You can never know what macro or implicitly installed macro file will modify the filter values. I recommend this form:

{{{
%global __provides_exclude_from %{?_provides_exclude_from:%_provides_exclude_from|}%{_libexecdir}/autoinst
}}}

Yes, it's ugly, but it works. Universally. And you do not have to care about ordering.

Finally, this not specific for Perl. Thus the text should be moved out of Perl section.

Current guidelines do work, they are just a bit inaccurate.

The documented way to use _ _{provides,requires}_exclude* macros is to simply define them to whatever value you want. Looking at current spec files, majority of uses is just like that, including the example in the section just below the one we are discussing here. I don't want to go into the business of changing that.

Finally, this not specific for Perl. Thus the text should be moved out of Perl section.

Perl packages seem to require this more often than others, so it's practical to keep this example here.

I don't disagree with various things you say, but they would require touching various places in the guidelines, which is outside of the scope of this ticket which was intended to be a simple correction.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2016-01-21/fpc.2016-01-21-17.00.txt):

  • Ticket #591 Description of filtering macros in Perl is outdated (geppetto,
    17:26:18)
  • Had enough to pass, and seems better than what we have but tabling
    until we have a final change for perl. (geppetto, 18:08:13)

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2016-02-18/fpc.2016-02-18-17.00.txt):

  • Ticket #591 Description of filtering macros in Perl is outdated (geppetto,
    18:00:46)
  • ACTION: Still need final change for perl. (geppetto, 18:01:14)

Metadata Update from @ppisar:
- Issue assigned to tibbs

7 years ago

I'm kind of lost as to what is still needed here. I have this weird feeling it's waiting on me to do something, but after all this time I've completely forgotten what that might be.

Metadata Update from @tibbs:
- Issue close_status updated to: None

7 years ago

The short version is that this was about changing https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Perl to recommend setting own filter first and including %perl_default_filter second. The hasn't happened, the guidelines still recommend the reverse and more complicated order.

Sadly I think the short version is also incomplete.

From the short version, I'm thinking that you would just like for these two lines to be switched in one example:

%{?perl_default_filter}
%global __requires_exclude perl\\(VMS|perl\\(Win32|my_additional_pattern

But the draft you provided goes beyond that, and there's also some disagreement about it. I actually like the draft because it removes some needless verbosity and leaves a clearer document. (That draft is https://fedoraproject.org/w/index.php?title=User%3AZbyszek%2FFilteringDraft&diff=latest&oldid=432675.)

However, you also say that it's incomplete and a proper fix would require more changes outside of this one guideline page. However, you don't say what those changes would be.

So I see three things going on at once, and I'm not sure what we're supposed to do.

  • Switch two lines in one example.
  • Implement the draft linked above.
  • Wait for some more complete draft, or at least a description of what would need to change.

Metadata Update from @tibbs:
- Issue tagged with: meeting

7 years ago

After they are switched, there's no need to cater to previous definition. So after the switch you have:

%global __requires_exclude my_additional_pattern
%{?perl_default_filter}

I'm asking for:
1. the switch
2. dropping of the advice about copy&paste since it's not needed after the switch
3. dropping of obsolete stuff (Fedora <= 20)

I could prepare a draft, but I feel that whatever I do, the committee will want to redo it in their own way, so I don't think that'd actually help with anything. But if you think otherwise, I'll update / prepare a new draft.

That's basically just a cleanup and switching two lines around to reflect reality. There was no objection at yesterday's meeting, so I'm just going to take care of it.

Metadata Update from @tibbs:
- Issue untagged with: meeting
- Issue tagged with: writeup

7 years ago

Written up. Announcement text:

The Dependency Filtering guideline page was cleaned up a bit to remove outdated information about Perl filtering.
https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
https://pagure.io/packaging-committee/issue/591

Metadata Update from @tibbs:
- Issue untagged with: writeup
- Issue tagged with: announce

7 years ago

Metadata Update from @tibbs:
- Issue untagged with: announce
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

7 years ago

Login to comment on this ticket.

Metadata