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/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHolger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/10970 )
Change subject: build: Add overload to clone repo and build in subdirectory
......................................................................
build: Add overload to clone repo and build in subdirectory
To build osmo-nitb we need to clone "openbsc" and then enter the
"openbsc" sub-directory. For building "mobile" and "virt_phy" of
OsmocomBB we will need to do something similar. Instead of added
more hardcoded paths, add a variant that allows to specify the
source directory.
Change-Id: I67fbd54296f2c68316bf8e89cfeb37d147193d53
---
M contrib/jenkins-build-common.sh
M contrib/jenkins-build-osmo-nitb.sh
2 files changed, 14 insertions(+), 9 deletions(-)
Approvals:
Harald Welte: Looks good to me, but someone else must approve
Pau Espin Pedrol: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh
index 731bf58..c2ffbb4 100644
--- a/contrib/jenkins-build-common.sh
+++ b/contrib/jenkins-build-common.sh
@@ -12,6 +12,7 @@
# build_repo libosmocore --configure --opts
# build_repo libosmo-foo special_branch --configure --opts
# build_repo osmo-bar
+# build_repo_dir openbsc ./openbsc
#
# create_bin_tgz
#--------------
@@ -98,11 +99,19 @@
build_repo() {
# usage: build_repo <name> [<branch>] [--configure-opts [...]]
+ dir="$1"
+ shift
+ build_repo_dir "${dir}" "./" $@
+}
+
+build_repo_dir() {
+ # usage: build_repo_dir <name> <dir> [<branch>] [--configure-opts [...]]
dep="$1"
+ dir="$2"
branch="master"
- if [ -z "$(echo "$2" | grep '^-')" ]; then
+ if [ -z "$(echo "$3" | grep '^-')" ]; then
# second arg does not start with a dash, it's empty or a branch
- branch="$2"
+ branch="$3"
if [ -n "$branch" ]; then
# we had a branch arg, need to shift once more to get config options
shift
@@ -111,6 +120,7 @@
fi
fi
shift
+ shift
configure_opts="$@"
set +x; echo "
@@ -122,12 +132,7 @@
have_repo "$dep" "$branch"
- cd "$dep"
-
- # special shim: we know the openbsc.git needs to be built in the openbsc/ subdir.
- if [ "$dep" = "openbsc" ]; then
- cd openbsc
- fi
+ cd "$dep/${dir}"
set +x; echo; echo; set -x
autoreconf -fi
diff --git a/contrib/jenkins-build-osmo-nitb.sh b/contrib/jenkins-build-osmo-nitb.sh
index 1e3ecc6..4f81fa8 100755
--- a/contrib/jenkins-build-osmo-nitb.sh
+++ b/contrib/jenkins-build-osmo-nitb.sh
@@ -10,6 +10,6 @@
build_repo openggsn
build_repo libsmpp34
build_repo libosmo-sccp
-build_repo openbsc --enable-smpp --enable-osmo-bsc --enable-nat
+build_repo_dir openbsc openbsc --enable-smpp --enable-osmo-bsc --enable-nat
create_bin_tgz "osmo-nitb osmo-bsc_mgcp"
--
To view, visit https://gerrit.osmocom.org/10970
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I67fbd54296f2c68316bf8e89cfeb37d147193d53
Gerrit-Change-Number: 10970
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180918/d43fe950/attachment.htm>