Push only selected repositories to mirrors?
Hello all, we're running a private OBS instance (version 2.10) and I'm looking for an easy solution to push only *selected* repositories to another server. I found $stageserver in BSConfig.pm, but IIUC this will publish *all* repositories? Thanks and regards -- Till -- Dipl.-Inform. Till Dörges doerges@pre-sense.de PRESENSE Technologies GmbH Nagelsweg 41, D-20097 HH Geschäftsführer/Managing Director AG Hamburg, HRB 107844 Till Dörges USt-IdNr.: DE263765024
It just publishes the projects/packages where you set the "Publish" flag (look at the repositories tab) Em dom., 14 de jan. de 2024 19:05, Till Dörges <doerges@pre-sense.de> escreveu:
Hello all,
we're running a private OBS instance (version 2.10) and I'm looking for an easy solution to push only *selected* repositories to another server.
I found $stageserver in BSConfig.pm, but IIUC this will publish *all* repositories?
Thanks and regards -- Till -- Dipl.-Inform. Till Dörges doerges@pre-sense.de
PRESENSE Technologies GmbH Nagelsweg 41, D-20097 HH Geschäftsführer/Managing Director AG Hamburg, HRB 107844 Till Dörges USt-IdNr.: DE263765024
On 15.01.24 00:21, Erico Mendonca wrote:
It just publishes the projects/packages where you set the "Publish" flag (look at the repositories tab)
Thanks for the quick response. I guess what I meant was "a subset of the repos that are set to publish". ;-) The scenario is that only a repo subset (as defined above) should additionally be made available in another place in the infrastructure. Thanks and regards -- Till
Em dom., 14 de jan. de 2024 19:05, Till Dörges <doerges@pre-sense.de <mailto:doerges@pre-sense.de>> escreveu:
Hello all,
we're running a private OBS instance (version 2.10) and I'm looking for an easy solution to push only *selected* repositories to another server.
I found $stageserver in BSConfig.pm, but IIUC this will publish *all* repositories?
Thanks and regards -- Till -- Dipl.-Inform. Till Dörges doerges@pre-sense.de
PRESENSE Technologies GmbH Nagelsweg 41, D-20097 HH Geschäftsführer/Managing Director AG Hamburg, HRB 107844 Till Dörges USt-IdNr.: DE263765024
Hi Till, On Mon, 2024-01-15 at 07:58 +0100, Till Dörges wrote:
On 15.01.24 00:21, Erico Mendonca wrote:
It just publishes the projects/packages where you set the "Publish" flag (look at the repositories tab)
Thanks for the quick response.
I guess what I meant was "a subset of the repos that are set to publish". ;-)
The scenario is that only a repo subset (as defined above) should additionally be made available in another place in the infrastructure.
We do something like that on Packman's PMBS. This stems from our more-or-less legacy way of publishing with our own publishing web site and following distribution to mirrors. We publish only 4 projects, and of these just the latest repositories for the supported releases. This is done via the $BSConfig::publishedhook hook. Example code, to be placed in BSConfig.pm: ==== our $publish_script = '/srv/obs/bin/my_own_publish_script'; our $publishedhook = { }; { my @all_dists = qw(openSUSE_Leap_15.4 openSUSE_Leap_15.5 openSUSE_Leap_15.6 Factory SLE_12 SLE_15 openSUSE_Tumbleweed openSUSE_Slowroll); foreach my $repo (qw(Essentials Extra Games Multimedia)) { foreach my $dist (@all_dists) { $publishedhook->{$repo.'/'.$dist} = $publish_script; } } } ==== /srv/obs/bin/my_own_publish_script is an executable script, which takes two arguments: project/repository location_of_external_repo like this: /srv/obs/bin/my_own_publish_script Essentials/openSUSE_Tumbleweed \ /srv/obs/repos/Essentials/openSUSE_Tumbleweed You can for instance call rsync to do the copying. Fill your publishedhook with the repos you want to separately publish to your desired location and restart obspublisher. Upon publishing of a repo obspublisher produces the regular external repo, runs createrepo and calls the hook. Greetings, Stefan -- Stefan Botter zu Hause Bremen
participants (3)
-
Erico Mendonca
-
Stefan Botter
-
Till Dörges