Change in osmo-ci[master]: limesuite WIP

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Oct 5 10:05:04 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11239


Change subject: limesuite WIP
......................................................................

limesuite WIP

Change-Id: I786c6f4ad4b4e43d1692c1588d2ad2194d0b25a4
---
M scripts/osmocom-latest-packages.sh
1 file changed, 109 insertions(+), 54 deletions(-)



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

diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index ac5a2dd..f983d05 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -4,55 +4,87 @@
 # apt install git-buildpackage osc git
 
 set -e
+set -x
 
 # OBS project name
 PROJ=network:osmocom:latest
 
 DT=$(date +%Y%m%d)
 TOP=$(pwd)
+DEBSRCDIR="$TOP/debsrc"
 
 if ! which osc >/dev/null 2>/dev/null ; then
   echo "osc binary not found"
   exit 1
 fi
 
-# start with a checkout of the project
-if [ -d $PROJ ]; then
-	(cd $PROJ && osc up)
-else
-	osc co $PROJ
-fi
+prepare() {
+  # start with a checkout of the project
+  if [ -d $PROJ ]; then
+    (cd $PROJ && osc up)
+  else
+    osc co $PROJ
+  fi
+  [ -d "$DEBSRCDIR" ] && rm -rf "$DEBSRCDIR"
+  mkdir "$DEBSRCDIR"
+}
+
+get_last_tag() {
+  project="$1"
+  if [ "$project" = "limesuite" ]; then
+    ver_regexp="^v[0-9]*.[0-9]*.[0-9]*$"
+  else
+    ver_regexp="^[0-9]*.[0-9]*.[0-9]*$"
+  fi
+  VER=$(git -C "${TOP}/${project}" tag -l --sort=v:refname | grep "$ver_regexp" | tail -n 1)
+  echo "${VER}"
+}
+
+checkout() {
+  project=$1
+  gitbpargs=""
+  echo
+  echo "====> Checking out $project"
+  cd "$TOP"
+  if [ "$project" = "limesuite" ]; then
+     [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite" "$project"
+  else
+    [ -d "$project" ] || git clone "git://git.osmocom.org/$project"
+  fi
+  cd "$project"
+  git fetch
+  VER=$(get_last_tag "$project")
+  git checkout -f -B "$VER" "refs/tags/$VER"
+}
 
 build() {
   project=$1
-  output=$2
+  gitbpargs="$2"
+  output="$DEBSRCDIR/$project"
   echo
   echo "====> Building $project"
-  cd "$TOP"
-  [ -d "$1" ] || git clone "git://git.osmocom.org/$1"
-  cd "$1"
-  git fetch
-  VER=$(git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 1)
+  cd "$TOP/$project"
+  VER=$(get_last_tag "$project")
   git checkout -f -B "$VER" "refs/tags/$VER"
   if [ -x ./git-version-gen ]; then
     ./git-version-gen . > .tarball-version 2>/dev/null
     gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \
-		     "--git-debian-branch=$VER" --git-ignore-new \
+		     "--git-debian-branch=$VER" --git-ignore-new $gitbpargs \
 		     --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/'
   else
     gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \
-		     "--git-debian-branch=$VER" --git-ignore-new
+		     "--git-debian-branch=$VER" --git-ignore-new $gitbpargs
   fi
 
-  if [ ! -d "$TOP/$PROJ/$1" ] ; then
+  if [ ! -d "$TOP/$PROJ/$project" ] ; then
     # creating a new package is different from using old ones
-    mkdir "$TOP/$PROJ/$1"
-    mv "$output/"*.dsc "$TOP/$PROJ/$1/"
-    mv "$output/"*.tar* "$TOP/$PROJ/$1/"
+    mkdir "$TOP/$PROJ/$project"
+    mv "$output/"*.dsc "$TOP/$PROJ/$project/"
+    mv "$output/"*.tar* "$TOP/$PROJ/$project/"
     cd "$TOP/$PROJ"
-    osc add "$1"
+    osc add "$project"
   else
-    cd "$TOP/$PROJ/$1"
+    cd "$TOP/$PROJ/$project"
 
     # update OBS only if the filename doesn't match
     file=$(cd "$output/" ; ls ./*.dsc)
@@ -66,40 +98,63 @@
   cd "$TOP"
 }
 
-PACKAGES="
-	libosmocore
-	libosmo-sccp
-	libosmo-abis
-	libosmo-netif
-	libsmpp34
-	libasn1c
-	libgtpnl
-	libusrp
-	osmo-iuh
-	osmo-ggsn
-	osmo-sgsn
-	openbsc
-	osmo-pcap
-	osmo-trx
-	osmo-sip-connector
-	osmo-bts
-	osmo-pcu
-	osmo-hlr
-	osmo-mgw
-	osmo-msc
-	osmo-bsc
-	simtrace2
-	"
-# add those two once they have tagged any versions that include the 'debian' sub-dir
-	#rtl-sdr
-	#osmo-fl2k
+# add those two once they have tagged any versions that include the 'debian' sub-dir:
+#rtl-sdr
+#osmo-fl2k
 
-[ -d "$TOP/debsrc" ] && rm -rf "$TOP/debsrc"
-mkdir "$TOP/debsrc"
+build_osmocom() {
+  prepare
 
-for p in $PACKAGES; do
-	build "$p" "$TOP/debsrc/$p"
-done
+  checkout limesuite
+  checkout libosmocore
+  checkout libosmo-sccp
+  checkout libosmo-abis
+  checkout libosmo-netif
+  checkout libsmpp34
+  checkout libasn1c
+  checkout libgtpnl
+  checkout libusrp
+  checkout osmo-iuh
+  checkout osmo-ggsn
+  checkout osmo-sgsn
+  checkout openbsc
+  checkout osmo-pcap
+  checkout osmo-trx
+  checkout osmo-sip-connector
+  checkout osmo-bts
+  checkout osmo-pcu
+  checkout osmo-hlr
+  checkout osmo-mgw
+  checkout osmo-msc
+  checkout osmo-bsc
+  checkout simtrace2
 
-cd "$TOP/$PROJ"
-osc ci -m "Latest Tagged versions of $DT"
+  build limesuite --git-upstream-tree="$(get_last_tag limesuite)"
+  build libosmocore
+  build libosmo-sccp
+  build libosmo-abis
+  build libosmo-netif
+  build libsmpp34
+  build libasn1c
+  build libgtpnl
+  build libusrp
+  build osmo-iuh
+  build osmo-ggsn
+  build osmo-sgsn
+  build openbsc
+  build osmo-pcap
+  build osmo-trx
+  build osmo-sip-connector
+  build osmo-bts
+  build osmo-pcu
+  build osmo-hlr
+  build osmo-mgw
+  build osmo-msc
+  build osmo-bsc
+  build simtrace2
+
+  cd "$TOP/$PROJ"
+  osc ci -m "Latest Tagged versions of $DT"
+}
+
+build_osmocom

-- 
To view, visit https://gerrit.osmocom.org/11239
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I786c6f4ad4b4e43d1692c1588d2ad2194d0b25a4
Gerrit-Change-Number: 11239
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181005/eb757794/attachment.htm>


More information about the gerrit-log mailing list