[Fedora-packaging] RPM conditional based on installed library?

Vít Ondruch vondruch at redhat.com
Thu Dec 12 11:03:55 UTC 2013


You can feed %files section with file list, e.g.

%files -f myfiles

You can prepare the myfiles filelist by whatever means suitable for your 
case.


Vít


Dne 11.12.2013 17:03, John Dennis napsal(a):
> I'm not sure how to solve the following problem and I'm looking for advice.
>
> I've got a package which uses a configure script (autotools) which
> decides what loadable modules it will build based on what's available
> from the installed libraries [1]. This changes what will appear in the
> %files section. I control what's in the %files via an RPM variable I set
> based on %{?rhel} and %{%fedora} tests.
>
> But basing the conditional on the rhel or fedora version is fragile
> because updates have changed what's available in the library. I'd prefer
> to base the conditional on the library contents just like the configure
> script does. But I'm not really sure how to go about this. I don't
> believe there is any mechanism which would allow me to interrogate the
> contents of config.status from the %build stage which would allow me to
> conditionalize the contents of %files (or is there?).
>
> I suppose I could perform a test equivalent to the one used by configure
> by running a shell command early in the spec file (akin to what we
> currently do to determine the Python library path, etc.)
>
> Are there examples of solving this problem cleanly? Suggestions? Comments?
>
> [1] For the curious the issue is the availability of elliptic curve
> crypto features, something which seems to keep changing and my spec file
> breaks whenever it does.
>



More information about the packaging mailing list