<p>alealcon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24643">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">jenkins-build-common: adds support to the new variables for patchelf.<br><br>2 variables are added in order to increase the flexibility of the add_rpath function.<br>patchelf_rpath_extra_args: adds more arguments to the rpath patch. For example "--force-rpath"<br>patchelf_rpath_dir: path to the libraries. This path is appended to the default '$ORIGIN/../lib/'<br><br>This commit add the jenkins-build-srslte-bbu.sh script, that builds the given repository filling the information for the 2 newly added variables.<br><br>Change-Id: I9f510112c63e7598add8c00f8573e34cac1b6064<br>---<br>M contrib/jenkins-build-common.sh<br>A contrib/jenkins-build-srslte-bbu.sh<br>2 files changed, 33 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/43/24643/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh</span><br><span>index 9d59ca7..2d7dfae 100644</span><br><span>--- a/contrib/jenkins-build-common.sh</span><br><span>+++ b/contrib/jenkins-build-common.sh</span><br><span>@@ -204,11 +204,22 @@</span><br><span>        #</span><br><span>    # Add an rpath relative to the binary and library if the directory</span><br><span>   # exists.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  rpath_args='--set-rpath'</span><br><span style="color: hsl(120, 100%, 40%);">+  rpath_dir='$ORIGIN/../lib/'</span><br><span style="color: hsl(120, 100%, 40%);">+  if [ -n "$patchelf_rapth_extra_args" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+    rpath_args="$patchelf_rapth_extra_args $rpath_args"</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%);">+  if [ -n "$patchelf_rpath_dir" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+    rpath_dir="$rpath_dir:$patchelf_rpath_dir"</span><br><span style="color: hsl(120, 100%, 40%);">+  fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     if [ -d bin/ ]; then</span><br><span style="color: hsl(0, 100%, 40%);">-            find bin -depth -type f -exec patchelf --set-rpath '$ORIGIN/../lib/' {} \;</span><br><span style="color: hsl(120, 100%, 40%);">+            find bin -depth -type f -exec patchelf $rpath_args $rpath_dir {} \;</span><br><span>  fi</span><br><span>   if [ -d sbin/ ]; then</span><br><span style="color: hsl(0, 100%, 40%);">-           find sbin -depth -type f -exec patchelf --set-rpath '$ORIGIN/../lib/' {} \;</span><br><span style="color: hsl(120, 100%, 40%);">+           find sbin -depth -type f -exec patchelf $rpath_args $rpath_dir {} \;</span><br><span>         fi</span><br><span>   if [ -d lib/ ]; then</span><br><span>                 find lib -depth -type f -name "lib*.so.*" -exec patchelf --set-rpath '$ORIGIN/' {} \;</span><br><span>diff --git a/contrib/jenkins-build-srslte-bbu.sh b/contrib/jenkins-build-srslte-bbu.sh</span><br><span>new file mode 100755</span><br><span>index 0000000..48ae622</span><br><span>--- /dev/null</span><br><span>+++ b/contrib/jenkins-build-srslte-bbu.sh</span><br><span>@@ -0,0 +1,20 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/bin/sh</span><br><span style="color: hsl(120, 100%, 40%);">+set -e -x</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ -z "$trial_binaries" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+  trial_binaries="srsue srsenb srsepc"</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%);">+export patchelf_rpath_dir="/mnt/nfs/bdlibs"</span><br><span style="color: hsl(120, 100%, 40%);">+export patchelf_rapth_extra_args="--force-rpath"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+base="$PWD"</span><br><span style="color: hsl(120, 100%, 40%);">+name="srslte"</span><br><span style="color: hsl(120, 100%, 40%);">+git_url="${git_url:-https://github.com/srsLTE}"</span><br><span style="color: hsl(120, 100%, 40%);">+project_name="${project_name:-srsLTE}"</span><br><span style="color: hsl(120, 100%, 40%);">+. "$(dirname "$0")/jenkins-build-common.sh"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#TODO: make sure libconfig, zeroMQ is installed</span><br><span style="color: hsl(120, 100%, 40%);">+build_repo $project_name $configure_opts</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+create_bin_tgz "$trial_binaries"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24643">change 24643</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-gsm-tester/+/24643"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-tester </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9f510112c63e7598add8c00f8573e34cac1b6064 </div>
<div style="display:none"> Gerrit-Change-Number: 24643 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: alealcon <alejandro.leal@srs.io> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>