<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/18394">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">OBS: add debian10 specific patch for limesuite<br><br>Add a patch to replace libwxgtk3.0-dev with libwxgtk3.0-gtk3-dev in<br>debian/control. Adjust OBS scripts to apply such patches from this<br>repository if they exist here, and fall back to the project's<br>repository (osmo-trx, osmo-gsm-manuals patches are there).<br><br>Related: OS#4562<br>Change-Id: I8dfb60e999bf9f61e6cd11983dba033a4c6107ad<br>---<br>M README.adoc<br>A obs-patches/limesuite/build-for-debian10.patch<br>M scripts/common-obs.sh<br>M scripts/common.sh<br>M scripts/osmocom-latest-packages.sh<br>M scripts/osmocom-nightly-packages.sh<br>6 files changed, 54 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/94/18394/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/README.adoc b/README.adoc</span><br><span>index 786be0d..bd4ef2a 100644</span><br><span>--- a/README.adoc</span><br><span>+++ b/README.adoc</span><br><span>@@ -13,6 +13,11 @@</span><br><span> osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of</span><br><span> $HOME/osmo-ci/scripts.</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+obs-patches: patches to build projects for various debian distributions, e.g.</span><br><span style="color: hsl(120, 100%, 40%);">+a patch for limesuite that fixes the libwxgtk3.0-dev => libwxgtk3.0-gtk3-dev</span><br><span style="color: hsl(120, 100%, 40%);">+rename in control/debian for debian10. Used by osmo_obs_distro_specific_patch()</span><br><span style="color: hsl(120, 100%, 40%);">+in scripts/common-obs.sh.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> _docker_playground: Clone of docker-playground.git, so the scripts can build</span><br><span> required docker images. This dir gets created on demand by scripts/common.sh,</span><br><span> and automatically fetched and reset to "origin/master" (override with</span><br><span>diff --git a/obs-patches/limesuite/build-for-debian10.patch b/obs-patches/limesuite/build-for-debian10.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..2387b08</span><br><span>--- /dev/null</span><br><span>+++ b/obs-patches/limesuite/build-for-debian10.patch</span><br><span>@@ -0,0 +1,13 @@</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/debian/control b/debian/control</span><br><span style="color: hsl(120, 100%, 40%);">+index c25b7c97..375ab95b 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/debian/control</span><br><span>++++ b/debian/control</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -6,7 +6,7 @@ Build-Depends:</span><br><span style="color: hsl(120, 100%, 40%);">+     debhelper (>= 9.0.0),</span><br><span style="color: hsl(120, 100%, 40%);">+     cmake (>= 3.1.3),</span><br><span style="color: hsl(120, 100%, 40%);">+     libusb-1.0-0-dev,</span><br><span style="color: hsl(120, 100%, 40%);">+-    libwxgtk3.0-dev,</span><br><span style="color: hsl(120, 100%, 40%);">++    libwxgtk3.0-gtk3-dev,</span><br><span style="color: hsl(120, 100%, 40%);">+     libsoapysdr-dev,</span><br><span style="color: hsl(120, 100%, 40%);">+     freeglut3-dev,</span><br><span style="color: hsl(120, 100%, 40%);">+     libfltk1.3-dev,</span><br><span>diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh</span><br><span>index df8ea75..f9d3a58 100644</span><br><span>--- a/scripts/common-obs.sh</span><br><span>+++ b/scripts/common-obs.sh</span><br><span>@@ -121,13 +121,36 @@</span><br><span>     osc add "$name.spec"</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# Get the path to a distribution specific patch, either from osmo-ci.git or from the project repository.</span><br><span style="color: hsl(120, 100%, 40%);">+# $PWD must be the project repository dir.</span><br><span style="color: hsl(120, 100%, 40%);">+# $1: distribution name (e.g. "debian8")</span><br><span style="color: hsl(120, 100%, 40%);">+# $2: project repository (e.g. "osmo-trx", "limesuite")</span><br><span style="color: hsl(120, 100%, 40%);">+osmo_obs_distro_specific_patch() {</span><br><span style="color: hsl(120, 100%, 40%);">+    local distro="$1"</span><br><span style="color: hsl(120, 100%, 40%);">+   local repo="$2"</span><br><span style="color: hsl(120, 100%, 40%);">+     local ret</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   ret="$OSMO_CI_DIR/obs-patches/$repo/build-for-$distro.patch"</span><br><span style="color: hsl(120, 100%, 40%);">+        if [ -e "$ret" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+              echo "$ret"</span><br><span style="color: hsl(120, 100%, 40%);">+         return</span><br><span style="color: hsl(120, 100%, 40%);">+        fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  ret="debian/patches/build-for-$distro.patch"</span><br><span style="color: hsl(120, 100%, 40%);">+        if [ -e "$ret" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+              echo "$ret"</span><br><span style="color: hsl(120, 100%, 40%);">+         return</span><br><span style="color: hsl(120, 100%, 40%);">+        fi</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # Copy an already checked out repository dir and apply a distribution specific patch.</span><br><span> # $PWD must be where all repositories are checked out in subdirs.</span><br><span> # $1: distribution name (e.g. "debian8")</span><br><span style="color: hsl(0, 100%, 40%);">-# $2: Osmocom repository (e.g. "osmo-trx")</span><br><span style="color: hsl(120, 100%, 40%);">+# $2: project repository (e.g. "osmo-trx", "limesuite")</span><br><span> osmo_obs_checkout_copy() {</span><br><span>   local distro="$1"</span><br><span>  local repo="$2"</span><br><span style="color: hsl(120, 100%, 40%);">+     local patch</span><br><span> </span><br><span>      echo</span><br><span>         echo "====> Checking out $repo-$distro"</span><br><span>@@ -135,6 +158,7 @@</span><br><span>   # Verify distro name for consistency</span><br><span>         local distros="</span><br><span>                 debian8</span><br><span style="color: hsl(120, 100%, 40%);">+               debian10</span><br><span>     "</span><br><span>       local found=0</span><br><span>        local distro_i</span><br><span>@@ -157,7 +181,12 @@</span><br><span>        cd "$repo-$distro"</span><br><span> </span><br><span>     # Commit patch</span><br><span style="color: hsl(0, 100%, 40%);">-  patch -p1 < "debian/patches/build-for-$distro.patch"</span><br><span style="color: hsl(120, 100%, 40%);">+     patch="$(osmo_obs_distro_specific_patch "$distro" "$repo")"</span><br><span style="color: hsl(120, 100%, 40%);">+     if [ -z "$patch" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+            echo "ERROR: no patch found for distro=$distro, repo=$repo"</span><br><span style="color: hsl(120, 100%, 40%);">+         exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+        fi</span><br><span style="color: hsl(120, 100%, 40%);">+    patch -p1 < "$patch"</span><br><span>    git commit --amend --no-edit debian/</span><br><span>         cd ..</span><br><span> }</span><br><span>diff --git a/scripts/common.sh b/scripts/common.sh</span><br><span>index 917962e..8dd00a1 100644</span><br><span>--- a/scripts/common.sh</span><br><span>+++ b/scripts/common.sh</span><br><span>@@ -1,5 +1,6 @@</span><br><span> #!/bin/sh</span><br><span> # Various functions and variables used in multiple osmo-ci shell scripts</span><br><span style="color: hsl(120, 100%, 40%);">+OSMO_CI_DIR="$(realpath "$(dirname "$0")/..")"</span><br><span> OSMO_GIT_URL="https://git.osmocom.org"</span><br><span> OSMO_GIT_URL_GERRIT="https://gerrit.osmocom.org"</span><br><span> </span><br><span>diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh</span><br><span>index 8bf4fb2..d836af2 100755</span><br><span>--- a/scripts/osmocom-latest-packages.sh</span><br><span>+++ b/scripts/osmocom-latest-packages.sh</span><br><span>@@ -156,9 +156,11 @@</span><br><span> </span><br><span>   cd "$TOP"</span><br><span>   osmo_obs_checkout_copy debian8 osmo-gsm-manuals</span><br><span style="color: hsl(120, 100%, 40%);">+  osmo_obs_checkout_copy debian10 limesuite</span><br><span> </span><br><span>   build osmocom-latest</span><br><span>   build limesuite --git-upstream-tree="$(get_last_tag limesuite)"</span><br><span style="color: hsl(120, 100%, 40%);">+  build limesuite-debian10 --git-upstream-tree="$(get_last_tag limesuite)"</span><br><span>   build osmo-gsm-manuals</span><br><span>   build osmo-gsm-manuals-debian8</span><br><span>   build libosmocore</span><br><span>diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh</span><br><span>index ca4b253..f6bd4e6 100755</span><br><span>--- a/scripts/osmocom-nightly-packages.sh</span><br><span>+++ b/scripts/osmocom-nightly-packages.sh</span><br><span>@@ -214,9 +214,11 @@</span><br><span>   cd "$REPO"</span><br><span>   osmo_obs_checkout_copy debian8 osmo-gsm-manuals</span><br><span>   osmo_obs_checkout_copy debian8 osmo-trx</span><br><span style="color: hsl(120, 100%, 40%);">+  osmo_obs_checkout_copy debian10 limesuite</span><br><span> </span><br><span>   build osmocom-nightly</span><br><span>   build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)"</span><br><span style="color: hsl(120, 100%, 40%);">+  build limesuite-debian10 no_commit --git-upstream-tree="$(get_last_tag limesuite)"</span><br><span>   build osmo-gsm-manuals</span><br><span>   build osmo-gsm-manuals-debian8</span><br><span>   build libosmocore</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ci/+/18394">change 18394</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ci/+/18394"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8dfb60e999bf9f61e6cd11983dba033a4c6107ad </div>
<div style="display:none"> Gerrit-Change-Number: 18394 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>