osmith submitted this change.
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_deps.sh
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(-)
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 change 43255. To unsubscribe, or for help writing mail filters, visit settings.