On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote: > Fedora's minimal build root contains perl. There is a reasonable request > <https://bugzilla.redhat.com/show_bug.cgi?id=1158860> to > remove the perl in order to minimize the build root. (The x86_64 F25 build > root occupies 527 MB now, 20 MB of that are perl packages.) > I removed perl from the minimal build root today. This is effective since rpm-build-4.13.0-0.rc1.40.fc25 reached build root. Because perl is not in the build root for creating source packages, spec constructions like: %if %(perl ...) BuildRequires: ... Requires: ... %endif will not work. rpmbuild will complain about invalid condition expression (because it will be empty). If you use it for controlling run-time dependencies, simply build-require "perl" and change the condition so that it always returns a valid expreesion, e.g.: %if 0%(perl ...) Requires: ... %endif If you use it for controlling build-time dependencies, you are out of luck and you have to change the condition to depend on Fedora release: %if 0%{?fedora} >= ... BuildRequires: ... %endif Although perl-libs provides some useful RPM symbols (perl(:VERSION) etc.), querying RPM database from rpm-build is considered harmful and you should not do that. I was thinking about exporting them as SRPM macros, but I'm not fully persuaded it's worth doing it. Especially because it would impose keeping perl-srpm-macros in synchronization to perl-libs. I can imagine the perl version could be handy. Any opinions? -- Petr
Attachment:
signature.asc
Description: PGP signature
-- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://lists.fedoraproject.org/admin/lists/perl-devel@xxxxxxxxxxxxxxxxxxxxxxx