[opensuse-buildservice] system-wide prjconf?
Hi, I trying to clearly mark my local builds, currently with Release: <CI_CNT>.<B_CNT>.SEIFE in select project configs. Now I want to do this for all projects in my OBS instance. Is there a global prjconf I could edit, or is it necessary to hack the code (which would probably be Build.pm in the obs-build package)? I looked at the backend code, but how the prjconf stuff is constructed and inherited is beyond my understanding ;-) Best regards, -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, Jan 31, 2018 at 5:32 AM, Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
Hi,
I trying to clearly mark my local builds, currently with
Release: <CI_CNT>.<B_CNT>.SEIFE
in select project configs. Now I want to do this for all projects in my OBS instance. Is there a global prjconf I could edit, or is it necessary to hack the code (which would probably be Build.pm in the obs-build package)?
I looked at the backend code, but how the prjconf stuff is constructed and inherited is beyond my understanding ;-)
It's something I've wanted as well, mainly so I can enforce across all builds everywhere in my local OBS: Release: <CI_CNT>.<B_CNT>%%{?dist} -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
same here +1 Am 31.01.2018 um 11:32 schrieb Stefan Seyfried:
Release: <CI_CNT>.<B_CNT>.SEIFE Release: <CI_CNT>.<B_CNT>.SIT
-- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
On 31.01.2018 14:50, Christian wrote:
same here +1
Am 31.01.2018 um 11:32 schrieb Stefan Seyfried:
Release: <CI_CNT>.<B_CNT>.SEIFE Release: <CI_CNT>.<B_CNT>.SIT
How are you doing it? which file / config do I need to edit? -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 31.01.2018 um 15:23 schrieb Stefan Seyfried:
How are you doing it? which file / config do I need to edit?
Sorry for misunderstanding. I am longing for this feature, too. AFAIK it is not available yet and I am not aware of ruby code to write a patch ... Cheers -- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
On 31.01.2018 16:18, Christian wrote:
Am 31.01.2018 um 15:23 schrieb Stefan Seyfried:
How are you doing it? which file / config do I need to edit?
Sorry for misunderstanding. I am longing for this feature, too. AFAIK it is not available yet and I am not aware of ruby code to write a patch ...
No ruby needed -- it's all in the backend (perl) ;-) -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 31.01.2018 11:32, Stefan Seyfried wrote:
Hi,
I trying to clearly mark my local builds, currently with
Release: <CI_CNT>.<B_CNT>.SEIFE
in select project configs. Now I want to do this for all projects in my OBS instance. Is there a global prjconf I could edit, or is it necessary to hack the code (which would probably be Build.pm in the obs-build package)?
I looked at the backend code, but how the prjconf stuff is constructed and inherited is beyond my understanding ;-)
ok, it's not that bad after all. src/backend/bs_srcserver, looks like the place to be. 2245 if ($BSConfig::extramacros) { 2246 for (sort keys %{$BSConfig::extramacros}) { 2247 $macros .= $BSConfig::extramacros->{$_} if $projid =~ /$_/; 2248 } 2249 } 2250 if ($BSConfig::extraconfig) { 2251 my $extraconfig = ''; 2252 for (sort keys %{$BSConfig::extraconfig}) { 2253 $extraconfig .= $BSConfig::extraconfig->{$_} if $projid =~ /$_/; 2254 } 2255 $config .= "\n$extraconfig" if $extraconfig; 2256 } 2257 $config .= "\nMacros:\n$macros" if $macros ne ''; 2258 return $config; so $BSConfig::extraconfig might work. But it gets appended at the end and so individual projects can no longer override it on their own... Is there any chance to get something like this for adding "default" stuff at the top of the config? $BSConfig::extradefaults maybe? Should I create a patch? ok. Another stupid question: Why do we have this code copy-pasted 2 times? # git grep extraconfig|cat src/backend/BSRepServer/ProjPacks.pm: my $extraconfig = ''; src/backend/BSRepServer/ProjPacks.pm: if ($BSConfig::extraconfig) { src/backend/BSRepServer/ProjPacks.pm: for (sort keys %{$BSConfig::extraconfig}) { src/backend/BSRepServer/ProjPacks.pm: $extraconfig .= $BSConfig::extraconfig->{$_} if $projid =~ /$_/; src/backend/BSRepServer/ProjPacks.pm: $config .= "\n$extraconfig" if $extraconfig; src/backend/BSSched/ProjPacks.pm: my $extraconfig = ''; src/backend/BSSched/ProjPacks.pm: if ($BSConfig::extraconfig) { src/backend/BSSched/ProjPacks.pm: for (sort keys %{$BSConfig::extraconfig}) { src/backend/BSSched/ProjPacks.pm: $extraconfig .= $BSConfig::extraconfig->{$_} if $projid =~ /$_/; src/backend/BSSched/ProjPacks.pm: $config .= "\n$extraconfig" if $extraconfig; src/backend/bs_srcserver: if ($BSConfig::extraconfig) { src/backend/bs_srcserver: my $extraconfig = ''; src/backend/bs_srcserver: for (sort keys %{$BSConfig::extraconfig}) { src/backend/bs_srcserver: $extraconfig .= $BSConfig::extraconfig->{$_} if $projid =~ /$_/; src/backend/bs_srcserver: $config .= "\n$extraconfig" if $extraconfig; -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Christian
-
Neal Gompa
-
Stefan Seyfried