| |
@@ -17,6 +17,9 @@
|
| |
* *MUST:* Packages must not provide RPM dependency information when that information is not global in nature, or are otherwise handled (e.g. through a virtual provides system). e.g. a plugin package containing a binary shared library must not "provide" that library unless it is accessible through the system library paths.
|
| |
* *MUST:* When filtering automatically generated RPM dependency information, the filtering system implemented by Fedora must be used, except where there is a compelling reason to deviate from it.
|
| |
|
| |
+ WARNING: *Depracated Old Style Dependency Generators*:
|
| |
+ Please note that the "old style dependency generators", also known as "the external dependency generators", are deprecated by RPM. Therefore any occurence of the old macros `+%filter_provides_in+`, `+%filter_requires_in+`, `+%filter_from_provides+`, `+%filter_from_requires+` together with `+%filter_setup+` MUST be replaced by their modern alternatives `+%__requires_exclude+`, `+%__requires_exclude_from+`, `+%__provides_exclude+`, `+%__provides_exclude_from+`.
|
| |
+
|
| |
== Usage
|
| |
|
| |
=== Location of macro invocation
|
| |
@@ -47,12 +50,6 @@
|
| |
%global __provides_exclude_from ^(.%{libdir}/%{name}/*\\.so|%{_datadir}/myapp/.*)$
|
| |
....
|
| |
|
| |
- Note that this macro replaces the `+%filter_provides_in+` macro from the old filtering guidelines but it does not do the same thing. In particular:
|
| |
-
|
| |
- * The old macro could be invoked multiple times. This one will only use the regex defined last.
|
| |
- * The old macro advised against anchoring the beginning of the regex (Using `+^+`). This macro recommends anchoring as it doesn't suffer from the compatibility problems of the old one.
|
| |
- * With the old macro it was common to specify a directory name to match everything in a directory recursively. With the new macro you may need to specify `+.*+` because you should be anchoring your regular expressions.
|
| |
-
|
| |
=== Filtering provides and requires after scanning
|
| |
|
| |
In addition to preventing rpm from scanning files and directories for automatic dependency generation you can also tell rpm to discard a discovered dependency before it records the dependency in the rpm metadata. Use `+__requires_exclude+` and `+__provides_exclude+` for this. These macros should be defined as regular expressions. If an entry that rpm's automatic dependency generator created matches the regular expression then it will be filtered out of the requires or provides. For example:
|
| |
@@ -66,8 +63,6 @@
|
| |
%global __requires_exclude ^/usr/bin/python$
|
| |
....
|
| |
|
| |
- These macros serves a similar purpose to the old `+%filter_from_provides+` macro but it has a different implementation. In particular, that macro took sed expressions whereas this one needs a regular expression.
|
| |
-
|
| |
=== Simplified macros for common cases
|
| |
|
| |
In some cases, the filtering of extraneous `+Provides:+` is fairly generic to all packages which provide similar things. There are simple macros that setup filters correctly for those cases so that you can do the filtering with one line. If you need to filter a bit more than the simple macro provides, you still have the option to use the macros listed above.
|
| |
The "old style dependency generators", also known as "the external dependency generators", are deprecated by RPM [1]. Therefore any occurrence of the old macros
%filter_provides_in
,%filter_requires_in
,%filter_from_provides
,%filter_from_requires
together with%filter_setup
MUST be replaced by their modern alternatives%__requires_exclude
,%__requires_exclude_from
,%__provides_exclude
,%__provides_exclude_from
.