How do I turn off the perl-specific parts of find-requires when building an RPM?

1

rpmbuild will scan Perl modules to find Perl dependencies, but it doesn't understand optional modules and its generated Perl module requirement list will often be wrong. How can I turn this feature off just for Perl dependencies, but leave the rest of the automatic features on? I've tried AutoReqProv: no but that appears to turn off all automatic dependency and provides scanning.

This is on CentOS 5.8 using RPM 4.4.2.3.

Schwern

Posted 2012-12-12T07:42:57.733

Reputation: 1 978

Answers

2

If you want to exclude specific file or dir from scan path for dependencies, try something like this:

%filter_requires_in %{_datarootdir}/%{name}/extra
%filter_setup

You can use following macros:

  • %filter_from_requires
  • %filter_requires_in

These are all macros from 'redhat-rpm-config' RPM package. For more information take a look in a file:

/usr/lib/rpm/redhat/macros

Jakov Sosic

Posted 2012-12-12T07:42:57.733

Reputation: 121

1

/usr/lib/rpm/macros.perl

There are all global macros defined, you could define them to something that does nothing. Otherwise it will be most likely in the generic macros in the same directory.

drahnr

Posted 2012-12-12T07:42:57.733

Reputation: 300

Thanks, I will give that a shot next time I build that rpm. – Schwern – 2013-01-16T04:01:09.603