osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/40887?usp=email )
Change subject: OBS: sync_obs_projects: support security.d.o ......................................................................
OBS: sync_obs_projects: support security.d.o
The Debian 13 meta config in the OpenSUSE OBS now lists security.debian.org. Adjust the script that syncs the config to support this URL too, rewrite it to HTTPS just like the other mirror URL.
Fix for: changing url to https: http://security.debian.org/debian-security?dist=trixie-security&componen... Traceback (most recent call last): File "/obs/sync_obs_projects.py", line 322, in <module> main() File "/obs/sync_obs_projects.py", line 312, in main rewrite_meta(project) File "/obs/sync_obs_projects.py", line 190, in rewrite_meta assert url.startswith("http://ftp.de.debian.org/debian"), \ AssertionError: unexpected mirror URL
Related: https://build.opensuse.org/projects/Debian:13/meta Change-Id: Iaf6a025376e398e26c5031b07fee6c1f64cbe047 --- M scripts/obs/sync_obs_projects.py 1 file changed, 8 insertions(+), 4 deletions(-)
Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/scripts/obs/sync_obs_projects.py b/scripts/obs/sync_obs_projects.py index 732fa02..bf6b0b7 100755 --- a/scripts/obs/sync_obs_projects.py +++ b/scripts/obs/sync_obs_projects.py @@ -187,10 +187,14 @@ for download in repository.findall(".download"): url = download.get("url") print(f" changing url to https: {url}") - assert url.startswith("http://ftp.de.debian.org/debian"), \ - "unexpected mirror URL" - download.set("url", url.replace("http://ftp.de.debian.org/debian", - "https://debian.inf.tu-dresden.de/debian")) + if url.startswith("http://ftp.de.debian.org/debian"): + download.set("url", url.replace("http://ftp.de.debian.org/debian", + "https://debian.inf.tu-dresden.de/debian")) + elif url.startswith("http://security.debian.org/debian-security"): + download.set("url", url.replace("http://security.debian.org/debian-security", + "https://debian.inf.tu-dresden.de/debian-security")) + else: + raise RuntimeError(f"Unexpected mirror URL: {url}") for pubkey in download.findall("pubkey"): download.remove(pubkey)