English
To filter this out, we could use:
%global __provides_exclude_from ^%{_libdir}/purple-2/.*\\.so$
Private Libraries
At this time, filtering of private libraries is non-trivial. This is because the symbols you want to filter from the private libraries are usually required by the public applications that the package ships. In order to filter, you need to find out what symbols RPM is extracting for the private library and then remove those in both `+%__provides_exclude+` and `+%__requires_exclude+`.
As an example, pretend you are packaging an application foo that creates `+%{_libdir}/foo/libprivate.so+` that you want to filter and `+%{_bindir}/foobar+` that requires that private library. You could:
First build the RPM: `+$ rpmbuild -ba foo.spec+`
then determine what provides rpm decided for the private library: `+$ rpm -qp foo-1.0-1.x86_64.rpm+`:
libprivate.so()(64bit)
foo = 1.0-1.fc19
foo(x86-64) = 1.0-1.fc19
See that `+libprivate.so()(64bit)+` appears to be the only symbol that RPM extracted for this package. Note that on 32bit, the provides will be `+libprivate.so+` so your regex needs to capture both.
Add the excludes to the spec file for both requires and provides:
[...]
%global _privatelibs libprivate[.]so.*
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$
[...]
You can take a look at a https://lists.fedoraproject.org/pipermail/devel/2012-June/169190.html[more complex example] on the mailing list. This can be a pain to maintain if the upstream changes the names of its private libraries but it is the only way to deal with this at present. There may be a better means in https://lists.osuosl.org/pipermail/rpm-maint/2013-January/003349.html[the future] but there are no solid plans on when those might be coded as of yet..
Arch-specific extensions to scripting languages
e.g. to ensure an arch-specific `perl-*` package won't provide or require things that it shouldn't, we could use an invocation as such:
# we don't want to provide private Perl extension libs
%{?perl_default_filter}
`+%{_docdir}+` filtering
By policy, nothing under `+%{_docdir}+` is allowed to either "provide" or "require" anything. We can prevent this from happening by preventing anything under `+%{_docdir}+` from being scanned:
# we don't want to either provide or require anything from _docdir, per policy
%global __provides_exclude_from ^%{_docdir}/.*$
%global __requires_exclude_from ^%{_docdir}/.*$
Additional Information
Additional information about RPM's dependency generator can be found here: https://rpm-software-management.github.io/rpm/manual/dependency_generators.html