[opensuse-buildservice] local obs question

Hi, before using a local obs I was building packages with "build". There I was able to use inside specfile: Release: 1.CS Is there a possibility to use this with obs ? Thanks Chris --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Thu, Jul 31, 2008 at 08:32:28AM +0000, Christian wrote:
before using a local obs I was building packages with "build". There I was able to use inside specfile:
Release: 1.CS
Is there a possibility to use this with obs ?
Yes. Actually, you have multiple possiblities: 1) use the build service automatic numbering a) specify a scheme for all packages of a project by putting a "Release: schema" line in your project config The default schema is "<CI_CNT>.<B_CNT>" b) modify the scheme in some way in the package You can do this by using the string <RELEASE> in the specfile, e.g. if you use Release: <RELEASE>.CS the build service will subsititute <RELEASE> with the scheme defined in the project. using <CI_CNT> and <B_CNT> here isn't implemented yet. 2) turn off automatic numbering Set the release scheme to the empty string in the project config, i.e. add a Release: line Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Hi Michael, Michael Schroeder schrieb:
Yes. Actually, you have multiple possiblities:
1) use the build service automatic numbering
a) specify a scheme for all packages of a project by putting a "Release: schema" line in your project config The default schema is "<CI_CNT>.<B_CNT>"
not sure which file you're thinking about. /srv/obs/projects/SUSE:SLE-10.conf ?
b) modify the scheme in some way in the package You can do this by using the string <RELEASE> in the specfile, e.g. if you use Release: <RELEASE>.CS the build service will subsititute <RELEASE> with the scheme defined in the project. using <CI_CNT> and <B_CNT> here isn't implemented yet.
This works. great. Will this work too ? %if 0%{?opensuse_bs} Release: <RELEASE>.CS %else Release: 4.CS %endif
2) turn off automatic numbering Set the release scheme to the empty string in the project config, i.e. add a Release: line
Cheers, Michael.
Cheers Chris --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Thu, Jul 31, 2008 at 12:29:13PM +0000, Christian wrote:
Michael Schroeder schrieb:
Yes. Actually, you have multiple possiblities:
1) use the build service automatic numbering
a) specify a scheme for all packages of a project by putting a "Release: schema" line in your project config The default schema is "<CI_CNT>.<B_CNT>"
not sure which file you're thinking about. /srv/obs/projects/SUSE:SLE-10.conf ?
Yes, exactly.
b) modify the scheme in some way in the package You can do this by using the string <RELEASE> in the specfile, e.g. if you use Release: <RELEASE>.CS the build service will subsititute <RELEASE> with the scheme defined in the project. using <CI_CNT> and <B_CNT> here isn't implemented yet.
This works. great. Will this work too ?
%if 0%{?opensuse_bs} Release: <RELEASE>.CS %else Release: 4.CS %endif
Yep, that should work as well. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Hi Michael, Michael Schroeder schrieb:
not sure which file you're thinking about. /srv/obs/projects/SUSE:SLE-10.conf ?
Yes, exactly. added at the end of /srv/obs/projects/SUSE:SLE-10.conf
Release: <RELEASE>.CS no success. and tried: Release: <CN_CNT>.<B_CNT>.CS no success. tried restarting obs-server and obs-worker, but no success. What am I doing wrong ? Can you provide me with an example ? Cheers Chris --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

osc meta prjconf <obs_project_name> -e At the top of the prjconf before the Macros: section (if you have one): Release: %%{?release_prefix}<CI_CNT>.<B_CNT>%%{?release_suffix} Then in the spec do: %define release_suffix .CS The double % in the Release line definition are needed because it's processed twice. The %{?<var>} form means only include the variable if it's defined. On Thu, 2008-07-31 at 13:38 +0000, Christian wrote:
Hi Michael,
Michael Schroeder schrieb:
not sure which file you're thinking about. /srv/obs/projects/SUSE:SLE-10.conf ?
Yes, exactly. added at the end of /srv/obs/projects/SUSE:SLE-10.conf
Release: <RELEASE>.CS
no success.
and tried:
Release: <CN_CNT>.<B_CNT>.CS
no success.
tried restarting obs-server and obs-worker, but no success. What am I doing wrong ? Can you provide me with an example ?
Cheers Chris --------------------------------------------------------------------- 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

Hi Luke, Luke Imhoff schrieb:
osc meta prjconf <obs_project_name> -e
At the top of the prjconf before the Macros: section (if you have one):
Release: %%{?release_prefix}<CI_CNT>.<B_CNT>%%{?release_suffix}
Then in the spec do:
%define release_suffix .CS
The double % in the Release line definition are needed because it's processed twice. The %{?<var>} form means only include the variable if it's defined There is a much easier way, if you want to do this inside spec-file only Just read complete thread.
Release: PREFIX.<RELEASE>.SUFFIX Cheers Chris --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

I actually do a bunch of more stuff with %{release_suffix} in the Macros section of my projects to handle the release versioning scheme my company came up with, so it's not as simple as I made it in my response. On Thu, 2008-07-31 at 15:29 +0000, Christian wrote:
Hi Luke,
Luke Imhoff schrieb:
osc meta prjconf <obs_project_name> -e
At the top of the prjconf before the Macros: section (if you have one):
Release: %%{?release_prefix}<CI_CNT>.<B_CNT>%%{?release_suffix}
Then in the spec do:
%define release_suffix .CS
The double % in the Release line definition are needed because it's processed twice. The %{?<var>} form means only include the variable if it's defined There is a much easier way, if you want to do this inside spec-file only Just read complete thread.
Release: PREFIX.<RELEASE>.SUFFIX
Cheers Chris --------------------------------------------------------------------- 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 Thu, Jul 31, 2008 at 01:38:24PM +0000, Christian wrote:
Hi Michael,
Michael Schroeder schrieb:
not sure which file you're thinking about. /srv/obs/projects/SUSE:SLE-10.conf ?
Yes, exactly. added at the end of /srv/obs/projects/SUSE:SLE-10.conf
Release: <RELEASE>.CS
Hopefully not really at the end, the end of the file contains the macro definitios. You have to insert it before the "Macros:" line.
no success.
and tried:
Release: <CN_CNT>.<B_CNT>.CS
That's better, <RELEASE> makes no sense in the config. Cheers, Michael -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Hi Michael, Michael Schroeder schrieb:
Hopefully not really at the end, the end of the file contains the macro definitios. You have to insert it before the "Macros:" line.
no success.
and tried:
Release: <CN_CNT>.<B_CNT>.CS
That's better, <RELEASE> makes no sense in the config.
Thanks, now it works. great.
Cheers, Michael
Cheers Chris --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Christian
-
Luke Imhoff
-
Michael Schroeder