osmith submitted this change.
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&component=main
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(-)
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)
To view, visit change 40887. To unsubscribe, or for help writing mail filters, visit settings.