Checking out packaging sources from Base:System in CI without OBS account
Hi, I'm trying to build actual packages in systemd's CI for testing purposes instead of running meson install (see https://github.com/systemd/systemd/pull/31345). This requires checking out the packaging sources for each supported distribution (Arch, CentOS, Fedora, Ubuntu, Debian, OpenSUSE) in our CI. This is working great for every distribution except OpenSUSE. Getting the sources from OBS seems to require an OBS account which I really want to avoid. I was pointed to https://code.opensuse.org/ which mirrors the sources from OpenSUSE:Factory but this can lag behind Base:System quite a bit and it takes quite a while for my changes contributed to systemd in Base:System to end up in OpenSUSE:Factory. Would it be possible to mirror Base:System to code.opensuse.org as well as separate branches for each package? Or is there another solution that doesn't require everyone that wants to test a new upstream feature on OpenSUSE to register for an OBS account? Cheers, Daan De Meyer
On Wed, Mar 6, 2024 at 5:19 AM Daan De Meyer <daan.j.demeyer@gmail.com> wrote:
Hi,
I'm trying to build actual packages in systemd's CI for testing purposes instead of running meson install (see https://github.com/systemd/systemd/pull/31345). This requires checking out the packaging sources for each supported distribution (Arch, CentOS, Fedora, Ubuntu, Debian, OpenSUSE) in our CI. This is working great for every distribution except OpenSUSE. Getting the sources from OBS seems to require an OBS account which I really want to avoid. I was pointed to https://code.opensuse.org/ which mirrors the sources from OpenSUSE:Factory but this can lag behind Base:System quite a bit and it takes quite a while for my changes contributed to systemd in Base:System to end up in OpenSUSE:Factory.
Would it be possible to mirror Base:System to code.opensuse.org as well as separate branches for each package? Or is there another solution that doesn't require everyone that wants to test a new upstream feature on OpenSUSE to register for an OBS account?
It shouldn't be lagging from openSUSE:Factory in the first place. I'm pretty sure there's a bot that forces submissions to Factory if things sit for too long not submitted. So if there's lag, then we have a problem in general. -- 真実はいつも一つ!/ Always, there's only one truth!
Hi Daan, Daan De Meyer <daan.j.demeyer@gmail.com> writes:
Hi,
I'm trying to build actual packages in systemd's CI for testing purposes instead of running meson install (see https://github.com/systemd/systemd/pull/31345). This requires checking out the packaging sources for each supported distribution (Arch, CentOS, Fedora, Ubuntu, Debian, OpenSUSE) in our CI. This is working great for every distribution except OpenSUSE. Getting the sources from OBS seems to require an OBS account which I really want to avoid. I was pointed to https://code.opensuse.org/ which mirrors the sources from OpenSUSE:Factory but this can lag behind Base:System quite a bit and it takes quite a while for my changes contributed to systemd in Base:System to end up in OpenSUSE:Factory.
Would it be possible to mirror Base:System to code.opensuse.org as well as separate branches for each package? Or is there another solution that doesn't require everyone that wants to test a new upstream feature on OpenSUSE to register for an OBS account?
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself). Cheers, Dan -- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Frankenstr. 146 90461 Nürnberg Germany www.suse.com Geschäftsführer: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB 36809, AG Nürnberg)
Hi Dan,
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself).
https://src.opensuse.org/rpm/systemd does not seem to have a branch containing the changes from https://build.opensuse.org/package/show/Base:System/systemd. Can you show me how to use the public API route with osc? Cheers, Daan On Wed, 6 Mar 2024 at 14:28, Dan Čermák <dcermak@suse.com> wrote:
Hi Daan,
Daan De Meyer <daan.j.demeyer@gmail.com> writes:
Hi,
I'm trying to build actual packages in systemd's CI for testing purposes instead of running meson install (see https://github.com/systemd/systemd/pull/31345). This requires checking out the packaging sources for each supported distribution (Arch, CentOS, Fedora, Ubuntu, Debian, OpenSUSE) in our CI. This is working great for every distribution except OpenSUSE. Getting the sources from OBS seems to require an OBS account which I really want to avoid. I was pointed to https://code.opensuse.org/ which mirrors the sources from OpenSUSE:Factory but this can lag behind Base:System quite a bit and it takes quite a while for my changes contributed to systemd in Base:System to end up in OpenSUSE:Factory.
Would it be possible to mirror Base:System to code.opensuse.org as well as separate branches for each package? Or is there another solution that doesn't require everyone that wants to test a new upstream feature on OpenSUSE to register for an OBS account?
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself).
Cheers,
Dan
-- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Frankenstr. 146 90461 Nürnberg Germany
www.suse.com Geschäftsführer: Ivo Totev, Andrew McDonald, Werner Knoblich (HRB 36809, AG Nürnberg)
On Wed, Mar 6, 2024 at 8:40 AM Daan De Meyer <daan.j.demeyer@gmail.com> wrote:
Hi Dan,
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself).
https://src.opensuse.org/rpm/systemd does not seem to have a branch containing the changes from https://build.opensuse.org/package/show/Base:System/systemd. Can you show me how to use the public API route with osc?
You can't. However, you can do it manually with curl or wget. curl "https://api.opensuse.org/public/source/Base:System/systemd?rev=latest Then curl the files in the returned list with "?rev=<num>" per the returned data above. -- 真実はいつも一つ!/ Always, there's only one truth!
On Wednesday 2024-03-06 14:56, Neal Gompa wrote:
On Wed, Mar 6, 2024 at 8:40 AM Daan De Meyer <daan.j.demeyer@gmail.com> wrote:
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself).
https://src.opensuse.org/rpm/systemd does not seem to have a branch containing the changes from https://build.opensuse.org/package/show/Base:System/systemd. Can you show me how to use the public API route with osc?
You can't.
Well technically you can, methinks: If you have a personal instance of OBS and in that use the openSUSE.org: interconnect (<remoteurl>), that uses anonymous access with api.opensuse.org. That functionality is just not exposed with osc.
Hi Daan, Daan De Meyer <daan.j.demeyer@gmail.com> writes:
Hi Dan,
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself).
https://src.opensuse.org/rpm/systemd does not seem to have a branch containing the changes from https://build.opensuse.org/package/show/Base:System/systemd. Can you show me how to use the public API route with osc?
osc does not support the public route, but my own (and very badly documented) API wrapper does[1]. However, it's just an API wrapper and no ready built solution. But it shouldn't be too hard, you first have to create an instance of the Osc class with public=True[2]. Then use the `fetch_all_files` function to obtain the files from the package[3]. At last, write the obtained files to disk: --8<---------------cut here---------------start------------->8--- from py_obs.osc import Osc from py_obs.project import fetch_all_files import asyncio osc = Osc(public=True) loop = asyncio.get_event_loop() files = loop.run_until_complete((fetch_all_files(osc, "Base:System", "systemd"))) for fname, contents in files.items(): with open(fname, "w") as f: f.write(contents) --8<---------------cut here---------------end--------------->8--- (should work 🤞) Hope this helps, Dan Footnotes: [1] https://github.com/dcermak/py-obs [2] https://github.com/dcermak/py-obs/blob/f27e8182f0840bd857721aeddfab526600c8f... [3] https://github.com/dcermak/py-obs/blob/f27e8182f0840bd857721aeddfab526600c8f...
participants (4)
-
Daan De Meyer
-
Dan Čermák
-
Jan Engelhardt
-
Neal Gompa