Building two conflicting binaries from the same source

2022-11-03 Thread Bojan Smojver via devel
This may be a trivial question, but my friend Google is not showing me any obvious answers, so I will ask here at my own peril. Say one needs to configure and build the same source with two (or more) different sets of options that generate different binary RPMs, but which have files in exactly

Re: Building two conflicting binaries from the same source

2022-11-03 Thread Bojan Smojver via devel
PS. I am aware of the alternatives approach, but looking to see whether there is something that rpm specs have natively for this. -- Bojan 4 Nov 2022 7:31:14 am Bojan Smojver : This may be a trivial question, but my friend Google is not showing me any

Re: Building two conflicting binaries from the same source

2022-11-03 Thread Artur Frenszek-Iwicki
Hello, Bojan. The only way I know is to utilise the "RemovePathPostfixes" tag for this, e.g: > %package gtk3 > RemovePathPostfixes: .gtk3 > > %package qt > RemovePathPostfixes: .qt > > %files gtk3 > %{_bindir}/%{name}.gtk3 > > %files qt5 > %{_bindir}/%{name}.qt5 Then, you just need to rename th

Re: Building two conflicting binaries from the same source

2022-11-03 Thread Bojan Smojver via devel
Cool, thank you! I think this is exactly what I was looking for (unsuccessfully). -- Bojan ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.

Re: Building two conflicting binaries from the same source

2022-11-03 Thread Florian Weimer
* Bojan Smojver via devel: > Sure, it is easy enough to configure/build repeatedly and stash the > results into non-conflicting paths of buildroot, but how does one then > package this in %files sections into exactly the same paths? See tests/data/SPECS/test-subpackages-pathpostfixes.spec in the

Re: Building two conflicting binaries from the same source

2022-11-03 Thread Bojan Smojver via devel
Thank you! -- Bojan 4 Nov 2022 8:48:25 am Florian Weimer : * Bojan Smojver via devel: > Sure, it is easy enough to configure/build repeatedly and stash the > results into non-conflicting paths of buildroot, but how does one then > package this in %files

Re: Building two conflicting binaries from the same source

2022-11-03 Thread Benson Muite
Collections can also help manage this: https://www.softwarecollections.org/en/ On 11/4/22 01:21, Bojan Smojver via devel wrote: Thank you! -- Bojan 4 Nov 2022 8:48:25 am Florian Weimer : * Bojan Smojver via devel: Sure, it is easy enough to configur

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Vitaly Zaitsev via devel
On 03/11/2022 22:14, Bojan Smojver via devel wrote: PS. I am aware of the alternatives approach, but looking to see whether there is something that rpm specs have natively for this. You can't use alternatives on immutable Fedora versions. -- Sincerely, Vitaly Zaitsev (vit...@easycoding.org)

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Vitaly Zaitsev via devel
On 03/11/2022 21:31, Bojan Smojver via devel wrote: Say one needs to configure and build the same source with two (or more) different sets of options that generate different binary RPMs, but which have files in exactly the same place. This is to support different hardware. The end result would

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Hans de Goede
Hi, On 11/3/22 21:31, Bojan Smojver via devel wrote: > This may be a trivial question, but my friend Google is not showing me any > obvious answers, so I will ask here at my own peril. > > Say one needs to configure and build the same source with two (or more) > different sets of options that g

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Hans de Goede
Hi Again, On 11/3/22 21:31, Bojan Smojver via devel wrote: > This may be a trivial question, but my friend Google is not showing me any > obvious answers, so I will ask here at my own peril. > > Say one needs to configure and build the same source with two (or more) > different sets of options

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Bojan Smojver via devel
It was for packaging xorgxrdp with glamor support. Submitted to bodhi now, so all good. -- Bojan 4 Nov 2022 7:38:17 pm Hans de Goede : Hi, On 11/3/22 21:31, Bojan Smojver via devel wrote: > This may be a trivial question, but my friend Google is not sh

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Bojan Smojver via devel
binaries from the same source Date: 04/11/22 19:45:43 Maybe the rpath tricks + making the actual lib (or binary) a link to /run/foo and then have a udev rule create /run/foo to point to the right version depending on the hw it is running on might be useful for you too

Re: Building two conflicting binaries from the same source

2022-11-04 Thread Petr Menšík
I think the need to find such attempts is a clear indication there is something wrong with the design of current implementation. If there are binaries with different build results, I think some code should be refactored out of the binary itself. The common parts can remain, but hardware specif

Re: Building two conflicting binaries from the same source

2022-11-08 Thread Richard W.M. Jones
On Fri, Nov 04, 2022 at 01:44:41PM +0100, Petr Menšík wrote: > If there are binaries with different build results, I think some > code should be refactored out of the binary itself. The common parts > can remain, but hardware specific parts should be moved to > dynamically loaded *.so files. The co

Re: Building two conflicting binaries from the same source

2022-11-08 Thread Simon Farnsworth via devel
On Tuesday, 8 November 2022 09:43:40 GMT Richard W.M. Jones wrote: > On Fri, Nov 04, 2022 at 01:44:41PM +0100, Petr Menšík wrote: > > > If there are binaries with different build results, I think some > > code should be refactored out of the binary itself. The common parts > > can remain, but hard