[opensuse-buildservice] Shared spec vs duplicated spec's

Hi Group, I raised this on the IRC channel so apologies if you've seen this. I have a project's src.rpm that I'd like to move onto the OBS, and this has raised some issues.... The current src.rpm uses lots of --build "option n" switches. Some of these are accommodated by OBS since they are distro specific builds. Others however relate to building different components. My Question is how to 'map' this to OBS? Do I setup one package per 'component', and so have many duplicates of the src.spec file? Or, is it possible for several projects to share a common spec file and build specific components by passing in some parameters? Appreciate any suggestions or better yet if you can point to a project that uses such a 'shared-spec' setup :) Regards Mark --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On 2008-07-11 20:09:30 +1000, Mark V wrote:
I raised this on the IRC channel so apologies if you've seen this.
I have a project's src.rpm that I'd like to move onto the OBS, and this has raised some issues.... The current src.rpm uses lots of --build "option n" switches. Some of these are accommodated by OBS since they are distro specific builds. Others however relate to building different components.
My Question is how to 'map' this to OBS?
Do I setup one package per 'component', and so have many duplicates of the src.spec file? Or, is it possible for several projects to share a common spec file and build specific components by passing in some parameters? Appreciate any suggestions or better yet if you can point to a project that uses such a 'shared-spec' setup :)
what project and package? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Friday 11 July 2008 14:52:28 Marcus Rueckert wrote:
On 2008-07-11 20:09:30 +1000, Mark V wrote:
I raised this on the IRC channel so apologies if you've seen this.
I have a project's src.rpm that I'd like to move onto the OBS, and this has raised some issues.... The current src.rpm uses lots of --build "option n" switches. Some of these are accommodated by OBS since they are distro specific builds. Others however relate to building different components.
My Question is how to 'map' this to OBS?
I think, you can create a project config and define rpm macro settings based on the build target repo. osc meta prjconf -e <project> And add Macros: %if "%_repository" == "openSUSE_10.3" %macro_name 1 %endif for example. -- 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

That works now? The last time I tried using %if in Macros it just thought I was trying to define it as a macro. On Fri, 2008-07-11 at 14:58 +0200, Adrian Schröter wrote:
On Friday 11 July 2008 14:52:28 Marcus Rueckert wrote:
On 2008-07-11 20:09:30 +1000, Mark V wrote:
I raised this on the IRC channel so apologies if you've seen this.
I have a project's src.rpm that I'd like to move onto the OBS, and this has raised some issues.... The current src.rpm uses lots of --build "option n" switches. Some of these are accommodated by OBS since they are distro specific builds. Others however relate to building different components.
My Question is how to 'map' this to OBS?
I think, you can create a project config and define rpm macro settings based on the build target repo.
osc meta prjconf -e <project>
And add
Macros: %if "%_repository" == "openSUSE_10.3" %macro_name 1 %endif
for example.
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Fri, Jul 11, 2008 at 10:58 PM, Adrian Schröter <adrian@suse.de> wrote:
On Friday 11 July 2008 14:52:28 Marcus Rueckert wrote:
On 2008-07-11 20:09:30 +1000, Mark V wrote:
I raised this on the IRC channel so apologies if you've seen this.
I have a project's src.rpm that I'd like to move onto the OBS, and this has raised some issues.... The current src.rpm uses lots of --build "option n" switches. Some of these are accommodated by OBS since they are distro specific builds. Others however relate to building different components.
My Question is how to 'map' this to OBS?
I think, you can create a project config and define rpm macro settings based on the build target repo.
osc meta prjconf -e <project>
And add
Macros: %if "%_repository" == "openSUSE_10.3" %macro_name 1 %endif
for example.
Ok that sounds interesting, if it works (see Luke's post). I'm new to OBS and packaging in general. Is this possible to set using the web interface? Unless I'm mistaken, one problem is that I'd need to set a repository for each component (I'd like to keep the packages to 3 but it could be a larger number depending on how 'atomic' people want things) - or is it possible to define a macro after matching the package name using a regular expression? Appreciate the suggestions Regards Mark
--
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
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Fri, Jul 11, 2008 at 10:52 PM, Marcus Rueckert <darix@opensu.se> wrote:
On 2008-07-11 20:09:30 +1000, Mark V wrote:
I raised this on the IRC channel so apologies if you've seen this.
I have a project's src.rpm that I'd like to move onto the OBS, and this has raised some issues.... The current src.rpm uses lots of --build "option n" switches. Some of these are accommodated by OBS since they are distro specific builds. Others however relate to building different components.
My Question is how to 'map' this to OBS?
Do I setup one package per 'component', and so have many duplicates of the src.spec file? Or, is it possible for several projects to share a common spec file and build specific components by passing in some parameters? Appreciate any suggestions or better yet if you can point to a project that uses such a 'shared-spec' setup :)
what project and package?
The project is Bacula, and the src.rpm is here: http://sourceforge.net/project/showfiles.php?group_id=50727&package_id=76408 If you look at the list of contributed rpms generated from this: http://sourceforge.net/project/showfiles.php?group_id=50727&package_id=21371... You'll see that component (and distro) rpms are built using, for example: --define "build_bat 1" Now I see how the OBS accommodates the distro specific builds, so all the, --define "build_centos5 1", type parameters become redundant. What I'd like to avoid is having N copies of the spec file for the N components. Its beginning to sound like this sort of shared spec functionality isn't, yet, supported. Correct? Regards Mark
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (4)
-
Adrian Schröter
-
Luke Imhoff
-
Marcus Rueckert
-
Mark V