Re: RPM conditional based on installed library?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 11, 2013 at 11:03:00AM -0500, John Dennis wrote:
> 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.
> 
This would be an anti-goal of rpm.  rpm tries to create reproducible builds.
Basing off what features are provided at buildtime defeats this.  You are
correct in seeing that this is somewhat at odds with the philosophy of
autotools (which is to detect features that can be built at buildtime) but
that doesn't make either tool wrong; they're just designed with different
goals in mind.

There are ways for some packages to work around this.  Many configure
scripts allow you to explicitly choose to enable or disable features that
configure can detect.  So your package may have something like
  ./configure --without-elliptic-curve

which can be used to always build without elliptic curve support.  Turning
that flag on in the stable Fedora releases may be the best thing for you to
do here (while suffering through the changes in rawhide until the feature
becomes always buildable).

-Toshio

Attachment: pgpvutxQRDSzu.pgp
Description: PGP signature

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux