[opensuse-buildservice] Spec-File Question
Hello everyone! I have started working with osb a month ago and I really love it! Well done! I have a specific question, maybe someone can answer it: I want two build two versions of an executable file and provide this file via different rpms (At the end three packages shouldresult: package, package-cgi-withfeature, package-cgi-withoutfeature). Is there any way to handle such things within _one_ spec file? I can configure/make the package twice and copy the resulting file somewhere, but I don't know a way to bring it back to it's position in the filesystem before I enter the related %file section. Best regards, Johannes Weberhofer -- |--------------------------------- | weberhofer GmbH | Johannes Weberhofer | information technologies | Austria, 1080 Wien, Blindengasse 52/3 |----------------------------------------------------------->> --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Johannes Weberhofer, Weberhofer GmbH wrote:
I want two build two versions of an executable file and provide this file via different rpms Is there any way to handle such things within _one_ spec file?
No. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michal Marek escribió:
Johannes Weberhofer, Weberhofer GmbH wrote:
I want two build two versions of an executable file and provide this file via different rpms Is there any way to handle such things within _one_ spec file?
No.
Yeah, not "as is" however if you use a different --program-suffix for each different binary, and then you supply some hack with update-alternatives in %post & %preun it may work. I wont tell ya how though ;-P because ..you will be doing it wrong ! ;-) -- "A computer is like an Old Testament god, with a lot of rules and no mercy. " Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
On Donnerstag 04 September 2008 10:53:31 Johannes Weberhofer, Weberhofer GmbH wrote:
Hello everyone!
I have started working with osb a month ago and I really love it! Well done!
I have a specific question, maybe someone can answer it:
I want two build two versions of an executable file and provide this file via different rpms (At the end three packages shouldresult: package, package-cgi-withfeature, package-cgi-withoutfeature).
Is there any way to handle such things within _one_ spec file? I can configure/make the package twice and copy the resulting file somewhere, but I don't know a way to bring it back to it's position in the filesystem before I enter the related %file section.
hm, you can via two repositories. Having something like %if %_repository = "openSUSE_Factory_1" Name: small %else Name: big %endif I am unsure, without looking in the code, if we have a macro for the package name, which hosts the source. This would be more helpfull for you, since you would be able to solve this via a source link. We need anyway to find a new name for the "package" of the OBS workspace, because it gets confused with source or binary packages. And it does not fit for images or QA data ... bye adrian -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
When specs doe not support this, I think the easiest way is to create another package in the obs (using a _link) and create another spec-file _or_ - maybe better - renaming the binaries and createing links in the %pre and %post scripts. Johannes BTW: In my opinion it would be good when replying to a mail on the list would reply to the list and not to the originator; it would ensure that answers will always be posted to the list. Adrian Schröter schrieb:
On Donnerstag 04 September 2008 10:53:31 Johannes Weberhofer, Weberhofer GmbH wrote:
Hello everyone!
I have started working with osb a month ago and I really love it! Well done!
I have a specific question, maybe someone can answer it:
I want two build two versions of an executable file and provide this file via different rpms (At the end three packages shouldresult: package, package-cgi-withfeature, package-cgi-withoutfeature).
Is there any way to handle such things within _one_ spec file? I can configure/make the package twice and copy the resulting file somewhere, but I don't know a way to bring it back to it's position in the filesystem before I enter the related %file section.
hm, you can via two repositories. Having something like
%if %_repository = "openSUSE_Factory_1" Name: small %else Name: big %endif
I am unsure, without looking in the code, if we have a macro for the package name, which hosts the source. This would be more helpfull for you, since you would be able to solve this via a source link.
We need anyway to find a new name for the "package" of the OBS workspace, because it gets confused with source or binary packages. And it does not fit for images or QA data ...
bye adrian
-- |--------------------------------- | weberhofer GmbH | Johannes Weberhofer | information technologies | Austria, 1080 Wien, Blindengasse 52/3 | | Firmenbuch: 225566s, Handelsgericht Wien | UID: ATU55277701 | | phone : +43 (0)1 5454421 0 | email: office@weberhofer.at | fax : +43 (0)1 5454421 19 | web : http://weberhofer.at | mobile: +43 (0)699 11998315 |----------------------------------------------------------->> --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
* Johannes Weberhofer, Weberhofer GmbH [2008-09-04 11:52]:
BTW: In my opinion it would be good when replying to a mail on the list would reply to the list and not to the originator; it would ensure that answers will always be posted to the list.
And in other's opinion it is not good because you accidentally reply to the list then if you want to write something only to the author. We had that discussion many times ago. Bernhard -- Bernhard Walle, SUSE Linux Products GmbH, Architecture Development --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Thu, Sep 04, 2008 at 11:52:02AM +0200, Johannes Weberhofer, Weberhofer GmbH wrote: [ 8< ]
BTW: In my opinion it would be good when replying to a mail on the list would reply to the list and not to the originator; it would ensure that answers will always be posted to the list.
"Reply-To" Munging Still Considered Harmful http://marc.merlins.org/netrants/reply-to-still-harmful.html Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SuSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
On Donnerstag 04 September 2008 11:07:16 Adrian Schröter wrote:
On Donnerstag 04 September 2008 10:53:31 Johannes Weberhofer, Weberhofer GmbH
wrote:
Hello everyone!
I have started working with osb a month ago and I really love it! Well done!
I have a specific question, maybe someone can answer it:
I want two build two versions of an executable file and provide this file via different rpms (At the end three packages shouldresult: package, package-cgi-withfeature, package-cgi-withoutfeature).
Is there any way to handle such things within _one_ spec file? I can configure/make the package twice and copy the resulting file somewhere, but I don't know a way to bring it back to it's position in the filesystem before I enter the related %file section.
hm, you can via two repositories. Having something like
Actually it works also with a source link: %if %{?small_build:1}0 Name: small %else Name: big %endif Than create another virtual package in the same project with a source link. The source _link file should look like: <link project="myproject" package="theotherpackage"> <patches> <topadd>%define %small_build 1</topadd> </patches> </link> So the second build will get the macro defined. You need to create the source link only once and can work only on the spec file in the other package. bye adrian -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Is this feature and others which can be defined in the _link file and in the xml describing the repository documented somewhere in detail? Johannes Adrian Schröter schrieb:
On Donnerstag 04 September 2008 11:07:16 Adrian Schröter wrote:
On Donnerstag 04 September 2008 10:53:31 Johannes Weberhofer, Weberhofer GmbH
wrote:
Hello everyone!
I have started working with osb a month ago and I really love it! Well done!
I have a specific question, maybe someone can answer it:
I want two build two versions of an executable file and provide this file via different rpms (At the end three packages shouldresult: package, package-cgi-withfeature, package-cgi-withoutfeature).
Is there any way to handle such things within _one_ spec file? I can configure/make the package twice and copy the resulting file somewhere, but I don't know a way to bring it back to it's position in the filesystem before I enter the related %file section. hm, you can via two repositories. Having something like
Actually it works also with a source link:
%if %{?small_build:1}0 Name: small %else Name: big %endif
Than create another virtual package in the same project with a source link. The source _link file should look like:
<link project="myproject" package="theotherpackage"> <patches> <topadd>%define %small_build 1</topadd> </patches> </link>
So the second build will get the macro defined. You need to create the source link only once and can work only on the spec file in the other package.
bye adrian
-- |--------------------------------- | weberhofer GmbH | Johannes Weberhofer | information technologies | Austria, 1080 Wien, Blindengasse 52/3 | | Firmenbuch: 225566s, Handelsgericht Wien | UID: ATU55277701 | | phone : +43 (0)1 5454421 0 | email: office@weberhofer.at | fax : +43 (0)1 5454421 19 | web : http://weberhofer.at | mobile: +43 (0)699 11998315 |----------------------------------------------------------->> --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Donnerstag 04 September 2008 16:25:32 Johannes Weberhofer, Weberhofer GmbH wrote:
Is this feature and others which can be defined in the _link file and in the xml describing the repository documented somewhere in detail?
It is partly explained here: http://en.opensuse.org/Build_Service/Tips_and_Tricks#_link_and__aggregate Just added a link to official docu to the side bar, but informations about the _link handling is missing there :/ bye adrian
Johannes
Adrian Schröter schrieb:
On Donnerstag 04 September 2008 11:07:16 Adrian Schröter wrote:
On Donnerstag 04 September 2008 10:53:31 Johannes Weberhofer, Weberhofer GmbH
wrote:
Hello everyone!
I have started working with osb a month ago and I really love it! Well done!
I have a specific question, maybe someone can answer it:
I want two build two versions of an executable file and provide this file via different rpms (At the end three packages shouldresult: package, package-cgi-withfeature, package-cgi-withoutfeature).
Is there any way to handle such things within _one_ spec file? I can configure/make the package twice and copy the resulting file somewhere, but I don't know a way to bring it back to it's position in the filesystem before I enter the related %file section.
hm, you can via two repositories. Having something like
Actually it works also with a source link:
%if %{?small_build:1}0 Name: small %else Name: big %endif
Than create another virtual package in the same project with a source link. The source _link file should look like:
<link project="myproject" package="theotherpackage"> <patches> <topadd>%define %small_build 1</topadd> </patches> </link>
So the second build will get the macro defined. You need to create the source link only once and can work only on the spec file in the other package.
bye adrian
-- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (6)
-
Adrian Schröter
-
Bernhard Walle
-
Cristian Rodríguez
-
Johannes Weberhofer, Weberhofer GmbH
-
Lars Müller
-
Michal Marek