osmith submitted this change.
OBS: add update_obs_eclipse_titan.sh
Add a script to easily update the eclipse-titan package from a git
repository. This replaces the previous workflow of downloading the
previous source package, modifying it, and re-uploading it. With the git
repository, it is easier to see which patches are included, and it is
easier to modify the packaging (e.g. add new patches to fix build with
latest gcc), and easier to upgrade the eclipse-titan version.
I've done this change because it failed to build with the most recent
GCC in Debian Unstable. Backporting Vadim's patch from upstream fixes
it.
Related: https://gitlab.eclipse.org/eclipse/titan/titan.core/-/commit/b5d3d5bf4f0e2c27cda60555351b2feb93561d6b
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Upgrading_eclipse-titan_in_the_Osmocom_OBS
Change-Id: Ieb1945d5cf4abf8ae2201f49ea7dce8eb343167e
---
A scripts/obs/update_obs_eclipse_titan.sh
1 file changed, 62 insertions(+), 0 deletions(-)
diff --git a/scripts/obs/update_obs_eclipse_titan.sh b/scripts/obs/update_obs_eclipse_titan.sh
new file mode 100755
index 0000000..6efb7c6
--- /dev/null
+++ b/scripts/obs/update_obs_eclipse_titan.sh
@@ -0,0 +1,40 @@
+#!/bin/sh -e
+# https://osmocom.org/projects/cellular-infrastructure/wiki/Upgrading_eclipse-titan_in_the_Osmocom_OBS
+DIR="$(realpath "$(dirname "$0")")"
+PROJ="$1"
+GIT_URL="https://gitea.osmocom.org/osmith/titan.core"
+CHECKOUT="osmocom/9.0.0"
+
+prepare_git_repo() {
+ cd "$DIR"
+ if ! [ -d _cache/eclipse-titan ]; then
+ mkdir -p _cache
+ git -C _cache clone "$GIT_URL" eclipse-titan
+ fi
+
+ cd _cache/eclipse-titan
+ git fetch
+ git clean -fdx
+ git checkout -f -B "$CHECKOUT"
+ git reset --hard origin/"$CHECKOUT"
+}
+
+update_obs_project() {
+ cd "$DIR"
+ ./update_obs_project.py \
+ --apiurl https://obs.osmocom.org \
+ --docker \
+ --allow-unknown-package \
+ --git-skip-checkout \
+ --git-skip-fetch \
+ --version-append "~osmocom" \
+ "$PROJ" \
+ eclipse-titan
+}
+
+set -x
+prepare_git_repo
+
+if [ -n "$PROJ" ]; then
+ update_obs_project
+fi
To view, visit change 36932. To unsubscribe, or for help writing mail filters, visit settings.