single RPM for all distros?

Tim Mooney Tim.Mooney at ndsu.edu
Wed Jun 1 15:56:48 UTC 2016


In regard to: RE: single RPM for all distros?, Heyman, Jerrold said (at...:

> Yes, the original request was for a binary RPM.
> Specifically, we are leveraging libfuse
> SLES packages as libfuse2, RHEL packages as fuse-libs, Mageia as lib64fuse2, ...
> A single way to write the 'Requires:' directive would be my holy grail.

If those 3 distributions don't provide the same SONAME for the
library/libraries you're linking against, then short of using a shim
and loading the libraries under different names, there is no one Requires
that's going to make your application work.

If they *do* provide the necessary library or libraries, with each
distribution having the same SONAME for the corresponding library,
then it's likely pointless to even specify Requires.  You may want
to specify BuildRequires so the right packages (per distro) are pulled
in at build time, but in this case you wouldn't need Requires.

Do this: on each distribution and version you care about supporting, run

 	rpm -q --provides <whatever the distro calls the fuse package here>

e.g. on RHEL it would be

 	rpm -q --provides fuse-libs

Then respond with the output, broken out by distro & version, so we can
see what's provided by each of the distro/version combos you care about.
That will make it clear whether what you're trying to do is even possible.

Tim


>> -----Original Message-----
>> From: Rpm-list [mailto:rpm-list-bounces at lists.rpm.org] On Behalf Of Stuart D. Gathman
>> Sent: Wednesday, June 01, 2016 10:12 AM
>> To: General discussion about the RPM package manager
>> Subject: Re: single RPM for all distros?
>>
>> On Wed, 1 Jun 2016, Daniel Letai wrote:
>>
>>> if find-requires provides the correct libs, you might use 'Autoreq:
>>> yes' and it would work.
>>> See http://www.rpm.org/max-rpm-snapshot/s1-rpm-depend-auto-depend.html
>>>
>>> On rhel, find-requires path is at
>>> /usr/lib/rpm/find-requires
>>>
>>>
>>> Otherwise, you can write conditional anything, e.g.,
>>>
>>> %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %ifarch %{arm}
>>> Requires: glibc >= 2.16
>>> %endif
>>> %endif
>>
>> Those provide for a single SRPM that compiles on multiple distros.
>> That is good, and standard practice, but I think the OP was asking if there was a way for a single *binary* RPM to
>> install on multiple distros.  Of course there is, but what I've seen from proprietary vendors has been rather ugly -
>> usually a combination of static linking and lengthy %pre/%post scripts that make me afraid to install the package.
>>
>>> On 04/29/2016 05:00 PM, Heyman, Jerrold wrote:
>>>
>>>       I'm pretty sure I know the answer, but is there a way to have a
>>>       single product RPM that can be installed on multiple distros?
>>
>> --
>>  	      Stuart D. Gathman <stuart at gathman.org> "Confutatis maledictis, flamis acribus addictis" -
>> background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>

-- 
Tim Mooney                                             Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, Quentin Burdick Building                  701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


More information about the Rpm-list mailing list