Ticket #189 (assigned defect)

Opened 22 months ago

Last modified 12 months ago

Filtering Guidelines outdated

Reported by: leamas Owned by: spot
Priority: minor Milestone:
Component: Guideline Draft Version:
Keywords: Meeting Cc:
Blocked By: Blocking:

Description

The filtering guidelines at http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering is outdated. They recommend mechanisms that shouldn't really be used, and has limitations on what packages which can be filtered causing packagers to make all sorts of walk-arounds (I actually considered creating two packages from same source...)

See thread on fedora-devel: http://lists.fedoraproject.org/pipermail/devel/2012-June/169174.html

I suggest that the Filtering section is updated. Until this is done, please insert a warning about current state.

Attachments

filtering.patch (1.7 KB) - added by leamas 17 months ago.
Simple patch to remove limitations on what can be filtered

Change History

comment:1 Changed 22 months ago by toshio

We can't get this rolling until someone who knows how the new filtering works submits a draft.

comment:2 Changed 22 months ago by toshio

  • Component changed from Clarification to Guideline Draft

comment:3 Changed 18 months ago by toshio

comment:4 Changed 18 months ago by leamas

Personal docs on how to filter private libs: https://fedoraproject.org/wiki/User:Leamas

Changed 17 months ago by leamas

Simple patch to remove limitations on what can be filtered

comment:5 Changed 17 months ago by leamas

This is now almost half a year old. I suggest applying the attached patch which removes a very confusing part which is plain wrong; this is obvious looking at the email thread. This will not make the guidelines up to date, certainly not, but will remove the single most outdated part IMHO.

comment:6 Changed 14 months ago by toshio

Started on a draft: https://fedoraproject.org/wiki/User:Toshio/AutoProvidesAndRequiresFilteringDraft

Unfortunately, there's somethings that need to be finished.

  • Have panu or the rpm-team review the draft to make sure it's accurate (in particular, I removed the rpm coloring warning because I think this method of doing things won't interfere with that but we need to check).
  • Someone needs to change the perl_default_filter to use these macros instead -- or leave it out of the new guidelines. Otherwise, the perl_default_filter would affect rpm coloring whereas none of the rest of the guidelines would.

comment:7 Changed 14 months ago by leamas

Some notes in the Discussion tab for Toshio's draft

comment:8 Changed 14 months ago by toshio

I've moved the request out to the proper place in the draft (Talk pages are failure for a drafting process... they're really only applicable to the wikipedia workflow where a document needs to be polished for the viewer at all times and so the discussion about it needs to happen at another place).

Reading the discussion, I think that at present the guidelines could point to the caveats to filtering a private library but can't really make a recommendation for implementing that's easy to use:

Use provides_exclude and requires_exclude with the same list because the automatic dependency generator is going to find the same symbols in provides and requires. Generating the list is an exercise for the packager.

Someone could probably write something that generates the list of provides that the files matched by a regular expression would have created and then exclude those from both provides and requires. However, that's out of scope for the guidelines... we'd point to it once written but not write the code to implement it into the guidelines page.

comment:9 Changed 14 months ago by leamas

Agreed. Since it's not possible to write a GL which is easy to use one has to write one which is hard to use (sigh). Still much better than no advice at all, though. In particular, I agree that the (current) solutions to generate the list of libs to exclude are to complicated to be in the GL.

After all, this should really be a RPM bug ticket IMHO.

comment:10 Changed 14 months ago by toshio

Okay, new version of the Draft: https://fedoraproject.org/wiki/User:Toshio/AutoProvidesAndRequiresFilteringDraft

I'll ping panu to see if he can give it a quick look for obvious errors.

Just a note that I just found tibbs's earlier work in this ticket: https://fedorahosted.org/fpc/ticket/76

I'm going through and trying to figure out what things should be added/changed in the draft (mention of the regex standard being used, more detailed instructions on adding to perl_default_filter, and more information about escaping look like things we should incorporate.)

comment:11 Changed 14 months ago by toshio

  • Keywords Meeting added

comment:12 Changed 14 months ago by toshio

Draft updated and email sent to panu.

comment:13 Changed 14 months ago by toshio

In his reply, Panu mentions that the perl macros and the method of overriding them look "fishy". I think he's saying that they're a bit complex and it's hard to evaluate how the rpm spec file parser and the regular expression engine are going to interact with the attempt to expand and then add to the previously defined macros. He recommends we test that if we leave it in.

He also pointed at this email showing that the ternary expression in the perl macros are being mis-typed a lot, leading to errors that the packagers aren't currently seeing:

http://lists.rpm.org/pipermail/rpm-list/2013-January/001359.html

comment:14 Changed 14 months ago by toshio

I've updated the perl strategy for overriding the default macro due to Panu's comments. Instead of using iarnell's ternary expression to expand the current macro I've switched to a copy and paste strategy with an explanation of why. https://fedoraproject.org/wiki/User:Toshio/AutoProvidesAndRequiresFilteringDraft#Perl

comment:15 Changed 14 months ago by toshio

Current vote on filtering update is (+1: 4, 0:0, -1:0) will continue vote in ticket.

Lacking votes from: tibbs (favorable in meeting but needed to leave before we voted), spot, Rathann, racor, rdieter

comment:16 Changed 13 months ago by spot

+1 for this from me.

comment:17 Changed 13 months ago by toshio

We've reached +5 so this passes. I'll write it up in the Guidelines.

comment:18 Changed 13 months ago by toshio

Guidelines written up.

Announcement text:

https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering

The autoprovides and requires filtering guidelines have (finally!) been updated to take advantage of features in rpm-4.9.x. Packagers making use of filtering, for instance compiled extensions to scripting languages from being provided as though they were a shared library, should take a look at the guidelines and update their spec files accordingly. This includes packages which are overriding the %perl_default_filter macro as the previous ways of overriding that macro have lead to quite a few silent bugs http://lists.rpm.org/pipermail/rpm-list/2013-January/001359.html .

The new guidelines work on all Fedora versions but EPEL6 and below will need to follow different formulas: https://fedoraproject.org/wiki/EPEL:Packaging#Provides_and_Requires_Filtering

The previous method of filtering autoprovides and requires will continue to limp along but it has many known caveats so packagers are encouraged to update their packages at their earliest convenience.

comment:19 Changed 12 months ago by spot

  • Status changed from new to assigned
  • Owner set to spot
Note: See TracTickets for help on using tickets.