aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/common-obs.sh33
-rw-r--r--scripts/common.sh1
-rwxr-xr-xscripts/osmocom-latest-packages.sh2
-rwxr-xr-xscripts/osmocom-nightly-packages.sh2
4 files changed, 36 insertions, 2 deletions
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index 3d86865..137887b 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -121,13 +121,36 @@ osmo_obs_add_rpm_spec() {
osc add "$name.spec"
}
+# Get the path to a distribution specific patch, either from osmo-ci.git or from the project repository.
+# $PWD must be the project repository dir.
+# $1: distribution name (e.g. "debian8")
+# $2: project repository (e.g. "osmo-trx", "limesuite")
+osmo_obs_distro_specific_patch() {
+ local distro="$1"
+ local repo="$2"
+ local ret
+
+ ret="$OSMO_CI_DIR/obs-patches/$repo/build-for-$distro.patch"
+ if [ -f "$ret" ]; then
+ echo "$ret"
+ return
+ fi
+
+ ret="debian/patches/build-for-$distro.patch"
+ if [ -f "$ret" ]; then
+ echo "$ret"
+ return
+ fi
+}
+
# Copy an already checked out repository dir and apply a distribution specific patch.
# $PWD must be where all repositories are checked out in subdirs.
# $1: distribution name (e.g. "debian8")
-# $2: Osmocom repository (e.g. "osmo-trx")
+# $2: project repository (e.g. "osmo-trx", "limesuite")
osmo_obs_checkout_copy() {
local distro="$1"
local repo="$2"
+ local patch
echo
echo "====> Checking out $repo-$distro"
@@ -135,6 +158,7 @@ osmo_obs_checkout_copy() {
# Verify distro name for consistency
local distros="
debian8
+ debian10
"
local found=0
local distro_i
@@ -157,7 +181,12 @@ osmo_obs_checkout_copy() {
cd "$repo-$distro"
# Commit patch
- patch -p1 < "debian/patches/build-for-$distro.patch"
+ patch="$(osmo_obs_distro_specific_patch "$distro" "$repo")"
+ if [ -z "$patch" ]; then
+ echo "ERROR: no patch found for distro=$distro, repo=$repo"
+ exit 1
+ fi
+ patch -p1 < "$patch"
git commit --amend --no-edit debian/
cd ..
}
diff --git a/scripts/common.sh b/scripts/common.sh
index 917962e..8dd00a1 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -1,5 +1,6 @@
#!/bin/sh
# Various functions and variables used in multiple osmo-ci shell scripts
+OSMO_CI_DIR="$(realpath "$(dirname "$0")/..")"
OSMO_GIT_URL="https://git.osmocom.org"
OSMO_GIT_URL_GERRIT="https://gerrit.osmocom.org"
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index 8bf4fb2..d836af2 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -156,9 +156,11 @@ build_osmocom() {
cd "$TOP"
osmo_obs_checkout_copy debian8 osmo-gsm-manuals
+ osmo_obs_checkout_copy debian10 limesuite
build osmocom-latest
build limesuite --git-upstream-tree="$(get_last_tag limesuite)"
+ build limesuite-debian10 --git-upstream-tree="$(get_last_tag limesuite)"
build osmo-gsm-manuals
build osmo-gsm-manuals-debian8
build libosmocore
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
index ca4b253..f6bd4e6 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -214,9 +214,11 @@ build_osmocom() {
cd "$REPO"
osmo_obs_checkout_copy debian8 osmo-gsm-manuals
osmo_obs_checkout_copy debian8 osmo-trx
+ osmo_obs_checkout_copy debian10 limesuite
build osmocom-nightly
build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)"
+ build limesuite-debian10 no_commit --git-upstream-tree="$(get_last_tag limesuite)"
build osmo-gsm-manuals
build osmo-gsm-manuals-debian8
build libosmocore