osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/43255?usp=email )
Change subject: OBS: switch PyHSS source to upstream
......................................................................
OBS: switch PyHSS source to upstream
I have upstreamed all Osmocom specific changes to PyHSS proper and they
are now in the 2.0.0 release:
https://github.com/nickvsnetworking/pyhss/releases/tag/2.0.0
The pyhss_download_deps.sh has been reworked and now lives upstream too:
https://github.com/nickvsnetworking/pyhss/blob/master/debian/pyhss_download…
Change-Id: I1a536988dc4da162b978b7f34c668e3fb3085eaa
---
D scripts/obs/data/pyhss_download_deps.sh
M scripts/obs/lib/config.py
M scripts/obs/lib/srcpkg.py
3 files changed, 2 insertions(+), 102 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/55/43255/1
diff --git a/scripts/obs/data/pyhss_download_deps.sh b/scripts/obs/data/pyhss_download_deps.sh
deleted file mode 100644
index b8b2b64..0000000
--- a/scripts/obs/data/pyhss_download_deps.sh
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/sh -e
-# Copyright 2025 sysmocom - s.f.m.c. GmbH
-# SPDX-License-Identifier: GPL-3.0-or-later
-# This script downloads all dependencies of PyHSS from the python package
-# index, either as binary package for all python versions and CPU architectures
-# we care about, or as source package depending on what is available.
-
-check_cwd() {
- if ! [ -e services/hssService.py ]; then
- echo "ERROR: run this script from the PyHSS directory"
- exit 1
- fi
- if [ -d debian/deps ]; then
- echo "ERROR: debian/deps exists already!"
- exit 1
- fi
-}
-
-download_deps() {
- local srcpkgs=_temp/requirements-source.txt
- local binpkgs=_temp/requirements-binary.txt
- local py_ver
- local python_versions="
- 3.11
- 3.12
- 3.13
- 3.14
- "
- # See e.g. https://pypi.org/project/SQLAlchemy/#files
- local platform
- local platforms="
- manylinux_2_17_aarch64
- manylinux_2_17_x86_64
- "
-
- rm -rf _temp
- mkdir _temp
-
- while IFS= read -r line; do
- case "$line" in
- # These packages are only available as sources
- mongo*|pymongo*|mysqlclient*|pysctp*|pycryptodome=*)
- echo "$line" >>"$srcpkgs"
- ;;
- # The rest is available as binary packages. This is
- # preferred as dependencies for building some of these
- # are not always available in the target distributions
- # (e.g. pydantic-core is written in rust and tooling
- # for building python + rust is not in debian 12).
- *)
- echo "$line" >>"$binpkgs"
- ;;
- esac
- done < "requirements.txt"
-
- # Build system dependencies must also be installed as we will build
- # offline with --no-index and pip won't use system libraries:
- # https://github.com/pypa/pip/issues/5696
- echo "setuptools" >>"$binpkgs"
- echo "wheel" >>"$binpkgs"
- echo "hatchling" >>"$binpkgs"
-
- echo ":: Downloading source packages"
- pip download \
- --dest debian/deps \
- --no-binary=:all: \
- -r "$srcpkgs"
-
- for py_ver in $python_versions; do
- for platform in $platforms; do
- echo ":: Downloading binary packages (python $py_ver, platform $platform)"
- local binpkgs_extra=""
-
- # Redis depends on async-timeout, which has been upstreamed
- # into Python 3.11+. This means "pip download" may not download
- # it if it runs with a more recent python version, but older
- # distros (debian 12) will need it.
- if [ "$py_ver" = "3.11" ]; then
- binpkgs_extra="async-timeout"
- fi
-
- pip download \
- --dest debian/deps \
- --python-version "$py_ver" \
- --platform "$platform" \
- --only-binary=:all: \
- -r "$binpkgs" \
- $binpkgs_extra
- done
- done
-
- rm -r _temp
-}
-
-check_cwd
-download_deps
-
-echo ":: Success"
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py
index b1384fd..5b37adb 100644
--- a/scripts/obs/lib/config.py
+++ b/scripts/obs/lib/config.py
@@ -112,13 +112,12 @@
"rtl-sdr": "https://gitea.osmocom.org/sdr/rtl-sdr",
"strongswan-epdg": "https://gitea.osmocom.org/ims-volte-vowifi/strongswan-epdg",
"libosmo-sccp-legacy": "https://gitea.osmocom.org/osmocom/libosmo-sccp-legacy",
- "pyhss": "https://gitea.osmocom.org/osmocom/pyhss",
+ "pyhss": "https://github.com/nickvsnetworking/pyhss",
}
git_branch_default = "master"
git_branch_other = {
"open5gs": "main",
- "pyhss": "osmocom/master",
}
def tag_pattern(prefix: str = '',
@@ -133,7 +132,6 @@
"gapk": tag_pattern('v', c=r'(\.\d+)?'),
"open5gs": tag_pattern('v'),
"osmo-fl2k": tag_pattern('v'),
- "pyhss": tag_pattern(suffix='-osmocom\\d+'),
"rtl-sdr": tag_pattern('v'),
"strongswan-epdg": tag_pattern('osmo-epdg-', c=r'\.[0-9a-z]+'),
"wireshark": tag_pattern('v', c=r'\.[0-9a-z]+'),
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 8ed50df..40c1883 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -149,7 +149,7 @@
def prepare_project_pyhss():
repo_path = lib.git.get_repo_path("pyhss")
- script = os.path.join(lib.ci_obs_dir, "data/pyhss_download_deps.sh")
+ script = "debian/pyhss_download_deps.sh"
lib.run_cmd(["sh", "-e", script], cwd=repo_path)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/43255?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I1a536988dc4da162b978b7f34c668e3fb3085eaa
Gerrit-Change-Number: 43255
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/43243?usp=email )
Change subject: jenkins-gerrit/comment_generate: fix 0 jobs msg
......................................................................
jenkins-gerrit/comment_generate: fix 0 jobs msg
Check if there are no failed jobs as well before printing the "zero
jobs, internal script error?" message.
Fixes: f30fab1c ("jenkins-gerrit/comment_generate: fail on 0 passed")
Change-Id: I7289ce30492a84dedeac12bfc967d7c578f13790
---
M scripts/jenkins-gerrit/comment_generate.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/scripts/jenkins-gerrit/comment_generate.py b/scripts/jenkins-gerrit/comment_generate.py
index 1b3bfcd..e3c1c50 100755
--- a/scripts/jenkins-gerrit/comment_generate.py
+++ b/scripts/jenkins-gerrit/comment_generate.py
@@ -212,8 +212,8 @@
summary += f"{len(jobs['passed'])} passed:\n"
summary += get_jobs_list_str(jobs["passed"])
- if not jobs['passed']:
- summary += "Zero jobs passed, internal script error?\n"
+ if not jobs["passed"] and not jobs["failed"]:
+ summary += "Zero jobs passed or failed, internal script error?\n"
if "build" in pipeline and "deb" in pipeline and "rpm" in pipeline and \
not pipeline["build"]["passed"] and pipeline["deb"]["passed"] \
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/43243?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I7289ce30492a84dedeac12bfc967d7c578f13790
Gerrit-Change-Number: 43243
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/43254?usp=email )
Change subject: ts_102_221: support EF.ARR record decoding for DF, not just EF
......................................................................
ts_102_221: support EF.ARR record decoding for DF, not just EF
Sadly, the EF.ARR interpretation, specifically that of the AM_DO
depends on whether the rule is for a DF or EF. As we don't know this,
allow the user to specify what kind of decode they would like, at least
in the file-specific read_arr_record + read_arr_records command.
Change-Id: I05e629e8b7dc705730d7039d2d0170ee24f8f844
---
M pySim/ts_102_221.py
1 file changed, 28 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/43254/1
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index e38483d..7a36146 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from bidict import bidict
+import copy
from construct import Select, Const, Bit, Struct, Int16ub, FlagsEnum, GreedyString, ValidationError
from construct import Optional as COptional, Computed
@@ -732,36 +733,55 @@
raise ValueError
return by_mode
+ @staticmethod
+ def __get_do_sequence(decode_for_df : bool = False):
+ if decode_for_df:
+ return DataObjectSequence('arr', sequence=[AM_DO_DF, SC_DO])
+ else:
+ return DataObjectSequence('arr', sequence=[AM_DO_EF, SC_DO])
+
def _decode_record_bin(self, raw_bin_data, **kwargs):
- # we can only guess if we should decode for EF or DF here :(
- arr_seq = DataObjectSequence('arr', sequence=[AM_DO_EF, SC_DO])
+ # we can only guess if we should decode for EF or DF here, but our caller may
+ # be able to pass us a hint:
+ arr_seq = self.__get_do_sequence(kwargs.get('decode_for_df', False))
dec = arr_seq.decode_multi(raw_bin_data)
# we cannot pass the result through flatten() here, as we don't have a related
# 'un-flattening' decoder, and hence would be unable to encode :(
return dec[0]
def _encode_record_bin(self, in_json, **kwargs):
- # we can only guess if we should decode for EF or DF here :(
- arr_seq = DataObjectSequence('arr', sequence=[AM_DO_EF, SC_DO])
+ # we can only guess if we should decode for EF or DF here, but our caller may
+ # be able to pass us a hint:
+ arr_seq = self.__get_do_sequence(kwargs.get('encode_for_df', False))
return arr_seq.encode_multi(in_json)
@with_default_category('File-Specific Commands')
class AddlShellCommands(CommandSet):
- @cmd2.with_argparser(LinFixedEF.ShellCommands.read_rec_dec_parser)
+ read_arr_argparser = copy.copy(LinFixedEF.ShellCommands.read_rec_dec_parser)
+ read_arr_argparser.add_argument('--decode-for-df', action='store_true')
+
+ @cmd2.with_argparser(read_arr_argparser)
def do_read_arr_record(self, opts):
"""Read one EF.ARR record in flattened, human-friendly form."""
- (data, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
+ (hexdata, _sw) = self._cmd.lchan.read_record(opts.RECORD_NR)
+ data = self._cmd.lchan.selected_file._decode_record_bin(h2b(hexdata),
+ decode_for_df = opts.decode_for_df)
data = self._cmd.lchan.selected_file.flatten(data)
self._cmd.poutput_json(data, opts.oneline)
- @cmd2.with_argparser(LinFixedEF.ShellCommands.read_recs_dec_parser)
+ read_arrs_argparser = copy.copy(LinFixedEF.ShellCommands.read_recs_dec_parser)
+ read_arrs_argparser.add_argument('--decode-for-df', action='store_true')
+
+ @cmd2.with_argparser(read_arrs_argparser)
def do_read_arr_records(self, opts):
"""Read + decode all EF.ARR records in flattened, human-friendly form."""
num_of_rec = self._cmd.lchan.selected_file_num_of_rec()
# collect all results in list so they are rendered as JSON list when printing
data_list = []
for recnr in range(1, 1 + num_of_rec):
- (data, _sw) = self._cmd.lchan.read_record_dec(recnr)
+ (hexdata, _sw) = self._cmd.lchan.read_record(recnr)
+ data = self._cmd.lchan.selected_file._decode_record_bin(h2b(hexdata),
+ decode_for_df = opts.decode_for_df)
data = self._cmd.lchan.selected_file.flatten(data)
data_list.append(data)
self._cmd.poutput_json(data_list, opts.oneline)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43254?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I05e629e8b7dc705730d7039d2d0170ee24f8f844
Gerrit-Change-Number: 43254
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter, laforge.
pespin has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-msc/+/43237?usp=email )
Change subject: sgs_iface: clean up code in function decode_mme_name
......................................................................
Patch Set 6:
(1 comment)
File src/libmsc/sgs_iface.c:
https://gerrit.osmocom.org/c/osmo-msc/+/43237/comment/fce6d46d_ac1ce802?usp… :
PS6, Line 192: osmo_apn_to_str(mme_name, mme_name_enc, mme_name_enc_len);
if we end up here, does it makes sense to previously have checked "if (mme_name_enc_len >= mme_name_len)" in line 176? I mean, there's some decoding happening here, not just a memcpy, so it could still be valid in that case...
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43237?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I9aec8300f15264b68ac8e7805e93e621b12cafb2
Gerrit-Change-Number: 43237
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 14 Aug 2026 19:51:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/43237?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: sgs_iface: clean up code in function decode_mme_name
......................................................................
sgs_iface: clean up code in function decode_mme_name
The function decode_mme_name is a bit hard to read and also has
some minor problems we can optimize.
- Do not call TLVP_LEN each time we need the length of the
TLV IE. Call it once and keep the value in a variable.
- mme_name_enc holds the value part of the TLV IE, we can
use this variable instead of calling TLVP_VAL all all
the time.
- When we have copied the value part of the TLV IE using
memset, let's ensure that the string is terminated.
- Add/fix spec references and improve comments so that it
is more clear how the decoding actually works.
Related: OS#7058
Change-Id: I9aec8300f15264b68ac8e7805e93e621b12cafb2
---
M src/libmsc/sgs_iface.c
1 file changed, 17 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/43237/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43237?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I9aec8300f15264b68ac8e7805e93e621b12cafb2
Gerrit-Change-Number: 43237
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>