osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/32227 )
Change subject: obs: add --conflict-pkgname arg
......................................................................
obs: add --conflict-pkgname arg
Prepare to create new feeds for the rhizomatica/testing and
rhizomatica/production branches, which will be based on osmocom:latest.
They will have osmocom-latest as conflict package even though their
feed name is not latest.
Related: OS#5981
Change-Id: I58e33bb003e2a4af9e9a7b53e5f79a91c3b541eb
---
M scripts/obs/lib/__init__.py
M scripts/obs/lib/metapkg.py
M scripts/obs/lib/srcpkg.py
3 files changed, 20 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/27/32227/1
diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py
index 9682b19..842dd41 100644
--- a/scripts/obs/lib/__init__.py
+++ b/scripts/obs/lib/__init__.py
@@ -60,6 +60,9 @@
" 20YYqX packages to ensure they are not mixed"
" from different build dates (ABI compatibility"
" is only on latest).")
+ parser.add_argument("-p", "--conflict-pkgname", nargs="?",
+ help="name of the meta-package to depend on (default:"
+ " osmocom-$feed)")
parser.add_argument("-v", "--verbose", action="store_true",
help="always print shell commands and their output,"
" instead of only printing them on error")
diff --git a/scripts/obs/lib/metapkg.py b/scripts/obs/lib/metapkg.py
index 847a56b..38ed930 100644
--- a/scripts/obs/lib/metapkg.py
+++ b/scripts/obs/lib/metapkg.py
@@ -87,7 +87,7 @@
def build():
feed = lib.args.feed
- pkgname = f"osmocom-{feed}"
+ pkgname = lib.args.conflict_pkgname or f"osmocom-{feed}"
conflict_version = lib.args.conflict_version
version = conflict_version if conflict_version else "1.0.0"
print(f"{pkgname}: generating meta package {version}")
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index a58ae15..2751005 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -157,7 +157,7 @@
write_tarball_version(project, version_epoch)
if project in lib.config.projects_osmocom:
- metapkg = f"osmocom-{feed}"
+ metapkg = lib.args.conflict_pkgname or f"osmocom-{feed}"
lib.debian.control_add_depend(project, metapkg, conflict_version)
if has_rpm_spec:
lib.rpm_spec.add_depend(project, metapkg, conflict_version)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/32227
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I58e33bb003e2a4af9e9a7b53e5f79a91c3b541eb
Gerrit-Change-Number: 32227
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/32228 )
Change subject: obs: update_obs_project: add --delete arg
......................................................................
obs: update_obs_project: add --delete arg
Add a new argument to delete packages from OBS if the git branch does
not exist anymore, but the packages still exists in OBS.
Related: OS#5981
Change-Id: Ib5ccf93a5a0cf8981fc35976bb9e0d3a29721b8d
---
M scripts/obs/lib/git.py
M scripts/obs/lib/osc.py
M scripts/obs/update_obs_project.py
3 files changed, 56 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/28/32228/1
diff --git a/scripts/obs/lib/git.py b/scripts/obs/lib/git.py
index 15cb276..0194f77 100644
--- a/scripts/obs/lib/git.py
+++ b/scripts/obs/lib/git.py
@@ -90,7 +90,7 @@
return ret.output.rstrip()
-def get_head_remote(project, branch):
+def get_head_remote(project, branch, branch_missing_ok=True):
if not branch:
branch = get_default_branch(project)
repo_url = get_repo_url(project)
@@ -99,7 +99,13 @@
ls_remote = lib.run_cmd(["git", "ls-remote", repo_url, f"heads/{branch}"])
ret = ls_remote.output.split("\t")[0]
+
+ # If the branch is missing from the remote, git ls-remote exits with 0 and
+ # the output is empty
if not ret:
+ if branch_missing_ok:
+ print(f"{project}: branch not found: {branch}")
+ return None
lib.exit_error_cmd(ls_remote, "failed to find head commit for"
f" {project} in output")
diff --git a/scripts/obs/lib/osc.py b/scripts/obs/lib/osc.py
index c2f6ad4..c9040ec 100644
--- a/scripts/obs/lib/osc.py
+++ b/scripts/obs/lib/osc.py
@@ -142,3 +142,9 @@
run_osc(["commit", "-m", f"upgrade to {version}"], cwd=path_temp_osc_pkg)
remove_temp_osc()
+
+
+def delete_package(package, commit_msg):
+ print(f"{package}: removing from OBS ({commit_msg})")
+ run_osc(["rdelete", "-m", commit_msg, lib.args.obs_project,
+ os.path.basename(package)])
diff --git a/scripts/obs/update_obs_project.py b/scripts/obs/update_obs_project.py
index da796ad..8c4da5e 100755
--- a/scripts/obs/update_obs_project.py
+++ b/scripts/obs/update_obs_project.py
@@ -14,6 +14,7 @@
srcpkgs_built = {} # dict of pkgname: version
srcpkgs_skipped = [] # list of pkgnames
+srcpkgs_deleted = [] # list of pkgnames
srcpkgs_failed_build = [] # list of pkgnames
srcpkgs_failed_upload = [] # list of pkgnames
srcpkgs_updated = [] # list of pkgnames
@@ -51,6 +52,14 @@
srcpkgs_failed_build += [package]
+def delete_srcpkg(package):
+ global srcpkgs_deleted
+ branch = lib.args.git_branch
+
+ lib.osc.delete_package(package, f"branch {branch} does not exist anymore")
+ srcpkgs_deleted += [package]
+
+
def is_up_to_date(obs_version, git_latest_version):
if obs_version == git_latest_version:
return True
@@ -66,6 +75,7 @@
global srcpkgs_skipped
feed = lib.args.feed
branch = lib.args.git_branch
+ delete = lib.args.delete
if feed in ["master", "latest"]:
""" Check if we can skip this package by comparing the OBS version with
@@ -75,12 +85,17 @@
latest_version = conflict_version if conflict_version else "1.0.0"
else:
if feed == "master":
- latest_version = lib.git.get_head_remote(package, branch)
+ latest_version = lib.git.get_head_remote(package, branch,
+ branch_missing_ok=delete)
else:
latest_version = lib.git.get_latest_tag_remote(package)
if latest_version is None:
- print(f"{package}: skipping (no git tag found)")
+ if delete and os.path.basename(package) in pkgs_remote:
+ delete_srcpkg(package)
+ return
+
+ print(f"{package}: skipping (no git tag/branch found)")
srcpkgs_skipped += [package]
return
@@ -164,6 +179,7 @@
print(f"Skipped: {len(srcpkgs_skipped)}")
print(f"Failed (srcpkg build): {len(srcpkgs_failed_build)}")
print(f"Failed (srcpkg upload): {len(srcpkgs_failed_upload)}")
+ print(f"Deleted: {len(srcpkgs_deleted)}")
if not srcpkgs_failed_build and not srcpkgs_failed_upload:
exit(0)
@@ -178,6 +194,14 @@
exit(1)
+def validate_args(args):
+ # Only with feed=master we check the current commit of a branch on a remote
+ # git repository before trying to update/delete a package from OBS
+ if args.delete and args.feed != "master":
+ print("ERROR: --delete can only be used with --feed=master")
+ exit(1)
+
+
def main():
parser = argparse.ArgumentParser(
description="Generate source packages and upload them to OBS.")
@@ -188,12 +212,16 @@
dest="skip_up_to_date", action="store_false",
help="for latest feed, build and upload packages even"
" if the version did not change")
+ parser.add_argument("--delete", action="store_true",
+ help="remove packages from OBS if the git branch (-b)"
+ " does not exist anymore")
parser.add_argument("obs_project",
help="OBS project, e.g. home:osmith:nightly")
parser.add_argument("package", nargs="*",
help="package name, e.g. libosmocore or open5gs,"
" default is all packages")
args = parser.parse_args()
+ validate_args(args)
lib.set_args(args)
packages = parse_packages(args.package)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/32228
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib5ccf93a5a0cf8981fc35976bb9e0d3a29721b8d
Gerrit-Change-Number: 32228
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/32229 )
Change subject: obs: update_obs_project: add ALL_OSMOCOM_PACKAGES
......................................................................
obs: update_obs_project: add ALL_OSMOCOM_PACKAGES
Add this alias to use all Osmocom packages, but no the misc packages
that would also be selected if not specifying the packages argument at
all (limesuite, neocon, open5gs).
This will be used for building packages from the rhizomatica branches,
so we don't check the git repositories of these misc projects for the
git branches.
Related: OS#5981
Change-Id: I4265f43408bc21ac8765449d6766381c75cafe86
---
M scripts/obs/update_obs_project.py
1 file changed, 24 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/29/32229/1
diff --git a/scripts/obs/update_obs_project.py b/scripts/obs/update_obs_project.py
index 8c4da5e..599e5cd 100755
--- a/scripts/obs/update_obs_project.py
+++ b/scripts/obs/update_obs_project.py
@@ -24,7 +24,10 @@
ret = []
if packages_arg:
for package in packages_arg:
- ret += [lib.set_proper_package_name(package)]
+ if package == "ALL_OSMOCOM_PACKAGES":
+ ret += lib.config.projects_osmocom
+ else:
+ ret += [lib.set_proper_package_name(package)]
return ret
# Default to all
@@ -218,8 +221,8 @@
parser.add_argument("obs_project",
help="OBS project, e.g. home:osmith:nightly")
parser.add_argument("package", nargs="*",
- help="package name, e.g. libosmocore or open5gs,"
- " default is all packages")
+ help="package name, e.g. libosmocore or open5gs or"
+ " ALL_OSMOCOM_PACKAGES, default is all packages")
args = parser.parse_args()
validate_args(args)
lib.set_args(args)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/32229
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I4265f43408bc21ac8765449d6766381c75cafe86
Gerrit-Change-Number: 32229
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32224 )
Change subject: Rearrange declaration of struct gsm_bts_gprs_nsvc
......................................................................
Rearrange declaration of struct gsm_bts_gprs_nsvc
Move it together with the other similar objects like gprs_nse and
gprs_cell.
Move the "mo" field to the start of the struct, similar to the other
types.
Change-Id: I5dc020a6bab8c94ab831b6ca506bc5cb681d07a3
---
M include/osmo-bts/bts.h
1 file changed, 26 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/32224/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index c5a0709..03a29e4 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -72,18 +72,6 @@
#define bts_internal_flag_set(bts, flag) \
bts->flags |= (typeof(bts->flags)) flag
-struct gsm_bts_gprs_nsvc {
- struct gsm_bts *bts;
- /* data read via VTY config file, to configure the BTS
- * via OML from BSC */
- int id;
- uint16_t nsvci;
- struct osmo_sockaddr local; /* on the BTS */
- struct osmo_sockaddr remote; /* on the SGSN */
-
- struct gsm_abis_mo mo;
-};
-
struct gprs_rlc_cfg {
uint16_t parameter[_NUM_RLC_PAR];
struct {
@@ -136,6 +124,18 @@
struct gsm_abis_mo mo;
};
+/* GPRS NSVC; ip.access specific NM Object */
+struct gsm_bts_gprs_nsvc {
+ struct gsm_abis_mo mo;
+ struct gsm_bts *bts;
+ /* data read via VTY config file, to configure the BTS
+ * via OML from BSC */
+ int id;
+ uint16_t nsvci;
+ struct osmo_sockaddr local; /* on the BTS */
+ struct osmo_sockaddr remote; /* on the SGSN */
+};
+
/* GPRS NSE; ip.access specific NM Object */
struct gsm_gprs_nse {
struct gsm_abis_mo mo;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32224
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I5dc020a6bab8c94ab831b6ca506bc5cb681d07a3
Gerrit-Change-Number: 32224
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/32222
to look at the new patch set (#2).
Change subject: Introduce NM FSM for GPRS Cell object
......................................................................
Introduce NM FSM for GPRS Cell object
Change-Id: I5fd1d17da09a5f0eee3d69fcb4788c106a240e21
Related: OS#5994
---
M include/osmo-bts/bts.h
M include/osmo-bts/nm_common_fsm.h
M src/common/Makefile.am
M src/common/bts.c
A src/common/nm_gprs_cell_fsm.c
M src/common/nm_gprs_nse_fsm.c
M src/common/oml.c
M src/osmo-bts-lc15/oml.c
M src/osmo-bts-oc2g/oml.c
M src/osmo-bts-octphy/l1_oml.c
M src/osmo-bts-omldummy/bts_model.c
M src/osmo-bts-sysmo/oml.c
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-virtual/bts_model.c
14 files changed, 330 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/32222/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32222
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I5fd1d17da09a5f0eee3d69fcb4788c106a240e21
Gerrit-Change-Number: 32222
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: neels, laforge, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32043 )
Change subject: logging: add 'logging timezone (localtime|utc)'
......................................................................
Patch Set 2:
(1 comment)
File src/core/logging.c:
https://gerrit.osmocom.org/c/libosmocore/+/32043/comment/54e4c407_f9b070fa
PS1, Line 874: target->timezone = timezone;
> The bool vs enum aspect doesn't really affect the aspect raised by pespin, does it? […]
I don't really understand why you are even thinking about asserting or removing timestamps during logging when you can simply have a VTY command fail to set a given timestamp format when you try to set it, as per what I proposed.
I see nothing wrong with having a function returning a "rc" while others don't, specially when there's an existing case which shows that the function may fail (because system may not support it).
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32043
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7f868b47bf8f8dfcf85e735f490ae69b18111af4
Gerrit-Change-Number: 32043
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Apr 2023 14:42:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment