osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/43955?usp=email )
Change subject: OBS: add the Osmocom titan.core repository URL ......................................................................
OBS: add the Osmocom titan.core repository URL
I'm reworking the documentation for upgrading the eclipse packages, as the previous documentation has become inaccurate and doesn't cover the "optdir" packages yet that we use to have multiple versions installed at the same time. Extend the OBS scripts to use https://gitea.osmocom.org/ttcn3/titan.core as URL if the package name starts with "eclipse-titan", so it can be updated in the future with the following command after updating the git repository:
$ ./update_obs_project.py \ -d \ -a \ -f master \ -b osmocom/11.2.1-optdir \ osmocom:nightly \ eclipse-titan-optdir-11.2.1
The git repository is needed, because we have the debian packaging there and may want to add additional, Osmocom-specific fixes on top.
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Upgrading_eclipse-... Change-Id: Ida79ab2604e5053bdd7a11594ebb413e87cffda9 --- M scripts/obs/lib/config.py M scripts/obs/lib/git.py 2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/55/43955/1
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py index 60d641b..13ee47b 100644 --- a/scripts/obs/lib/config.py +++ b/scripts/obs/lib/config.py @@ -105,6 +105,7 @@
git_url_default = "https://gerrit.osmocom.org" # /project gets appended git_url_other = { + "eclipse-titan*": "https://gitea.osmocom.org/ttcn3/titan.core", "libosmo-dsp": "https://gitea.osmocom.org/sdr/libosmo-dsp", "libosmo-sccp-legacy": "https://gitea.osmocom.org/osmocom/libosmo-sccp-legacy", "neocon": "https://github.com/laf0rge/neocon", diff --git a/scripts/obs/lib/git.py b/scripts/obs/lib/git.py index 0194f77..007c6ab 100644 --- a/scripts/obs/lib/git.py +++ b/scripts/obs/lib/git.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later # Copyright 2022 sysmocom - s.f.m.c. GmbH info@sysmocom.de +import fnmatch import os import re import lib.config @@ -11,8 +12,9 @@
def get_repo_url(project): - if project in lib.config.git_url_other: - return lib.config.git_url_other[project] + for pattern, url in lib.config.git_url_other.items(): + if fnmatch.fnmatch(project, pattern): + return url return f"{lib.config.git_url_default}/{project}"