Change in osmo-ci[master]: OBS: add debian10 specific patch for limesuite

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Fri May 22 09:56:26 UTC 2020


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/18394 )


Change subject: OBS: add debian10 specific patch for limesuite
......................................................................

OBS: add debian10 specific patch for limesuite

Add a patch to replace libwxgtk3.0-dev with libwxgtk3.0-gtk3-dev in
debian/control. Adjust OBS scripts to apply such patches from this
repository if they exist here, and fall back to the project's
repository (osmo-trx, osmo-gsm-manuals patches are there).

Related: OS#4562
Change-Id: I8dfb60e999bf9f61e6cd11983dba033a4c6107ad
---
M README.adoc
A obs-patches/limesuite/build-for-debian10.patch
M scripts/common-obs.sh
M scripts/common.sh
M scripts/osmocom-latest-packages.sh
M scripts/osmocom-nightly-packages.sh
6 files changed, 54 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/94/18394/1

diff --git a/README.adoc b/README.adoc
index 786be0d..bd4ef2a 100644
--- a/README.adoc
+++ b/README.adoc
@@ -13,6 +13,11 @@
 osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of
 $HOME/osmo-ci/scripts.
 
+obs-patches: patches to build projects for various debian distributions, e.g.
+a patch for limesuite that fixes the libwxgtk3.0-dev => libwxgtk3.0-gtk3-dev
+rename in control/debian for debian10. Used by osmo_obs_distro_specific_patch()
+in scripts/common-obs.sh.
+
 _docker_playground: Clone of docker-playground.git, so the scripts can build
 required docker images. This dir gets created on demand by scripts/common.sh,
 and automatically fetched and reset to "origin/master" (override with
diff --git a/obs-patches/limesuite/build-for-debian10.patch b/obs-patches/limesuite/build-for-debian10.patch
new file mode 100644
index 0000000..2387b08
--- /dev/null
+++ b/obs-patches/limesuite/build-for-debian10.patch
@@ -0,0 +1,13 @@
+diff --git a/debian/control b/debian/control
+index c25b7c97..375ab95b 100644
+--- a/debian/control
++++ b/debian/control
+@@ -6,7 +6,7 @@ Build-Depends:
+     debhelper (>= 9.0.0),
+     cmake (>= 3.1.3),
+     libusb-1.0-0-dev,
+-    libwxgtk3.0-dev,
++    libwxgtk3.0-gtk3-dev,
+     libsoapysdr-dev,
+     freeglut3-dev,
+     libfltk1.3-dev,
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index df8ea75..f9d3a58 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -121,13 +121,36 @@
 	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 [ -e "$ret" ]; then
+		echo "$ret"
+		return
+	fi
+
+	ret="debian/patches/build-for-$distro.patch"
+	if [ -e "$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 @@
 	# Verify distro name for consistency
 	local distros="
 		debian8
+		debian10
 	"
 	local found=0
 	local distro_i
@@ -157,7 +181,12 @@
 	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 @@
 
   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 @@
   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

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/18394
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I8dfb60e999bf9f61e6cd11983dba033a4c6107ad
Gerrit-Change-Number: 18394
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200522/107d8cce/attachment.htm>


More information about the gerrit-log mailing list