From patchwork Fri May 19 12:09:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Huemer X-Patchwork-Id: 764644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3wTn0n6m7xz9s5j for ; Fri, 19 May 2017 22:09:29 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id CD50334CC7; Fri, 19 May 2017 12:09:19 +0000 (UTC) Authentication-Results: lists.osmocom.org; dmarc=none header.from=xx.vu X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=81.7.3.51; helo=yade.chaostreff.at; envelope-from=alexander.huemer@xx.vu; receiver=openbsc@lists.osmocom.org Authentication-Results: lists.osmocom.org; dmarc=none header.from=xx.vu Received: from yade.chaostreff.at (yade.chaostreff.at [81.7.3.51]) by lists.osmocom.org (Postfix) with ESMTP id 1CCD234CB7 for ; Fri, 19 May 2017 12:09:13 +0000 (UTC) Received: by yade.chaostreff.at (Postfix, from userid 1001) id 7C457101DDE; Fri, 19 May 2017 14:09:13 +0200 (CEST) Date: Fri, 19 May 2017 14:09:13 +0200 From: Alexander Huemer To: openbsc@lists.osmocom.org Subject: Re: Proposal: Usage of stow in jenkins build scripts Message-ID: <20170519120913.GA12444@yade.chaostreff.at> Mail-Followup-To: openbsc@lists.osmocom.org References: <20170515193957.GA2859@yade.chaostreff.at> <20170515201803.GB7018@my.box> <20170515202518.GB2859@yade.chaostreff.at> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170515202518.GB2859@yade.chaostreff.at> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Hi! On Mon, May 15, 2017 at 10:25:18PM +0200, Alexander Huemer wrote: > On Mon, May 15, 2017 at 10:18:03PM +0200, Neels Hofmeyr wrote: > > The attached patch below indeed looks like errors in our build. Can you please > > push this as a patch to gerrit? > > Will do. I just pushed patch set 2 to gerrit. Patch set 1 got Code-Review+2 and Verified+1. Patch set 2 got a broken pipe for --enable-smpp --enable-iu, not sure if that is really caused by the patch. > > And you are meaning to say: if we used stow in our jenkins builds, we would > > catch these errors and fail builds if new ones are introduced, right? > > That is the intention, yes, although stow is a convenience layer, not > strictly required. > > > What role exactly does stow play here -- do I get the same when I install to > > separate '--prefix'es and then add all those prefixes to the PKG_CONFIG_PATH > > and LD_LIBRARY_PATH? > > Yes, the effect would be the same. Stow just makes all of that much more > convenient and straight-forward, as you end up with just one location > where (symlinks to) libs and so forth have to be searched. stow takes > care of that. > > > The jenkins build scripts for each project are included in the contrib/ dir of > > each git tree, using scripts found in the osmo-ci.git (also on gerrit). Feel > > free to go ahead and submit patches that use stow, e.g. for the openbsc.git > > build to begin with. If it improves our build by catching CFLAGS omissions I'll > > happily merge it. I can also install packages that you need for this on the > > build slaves. > > I will take a look into that as well. I created a patch for osmo-ci, but cannot do a $ git push gerrit HEAD:refs/for/master Lack of permissions? For now the patch is attached to this email. On my local machine the following worked then: $ cd ~/src/telco/osmo/openbsc $ MAKE=make PARALLEL_MAKE="-j$(nproc)" \ PATH="$PATH:$HOME/src/telco/osmo/osmo-ci/scripts" ./contrib/jenkins.sh [...] make[1]: Leaving directory '/home/blackbit/src/telco/osmo/openbsc/openbsc/openbsc-0.15.0.770-71124-dirty/_build/sub' if test -d "openbsc-0.15.0.770-71124-dirty"; then find "openbsc-0.15.0.770-71124-dirty" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "openbsc-0.15.0.770-71124-dirty" || { sleep 5 && rm -rf "openbsc-0.15.0.770-71124-dirty"; }; else :; fi ================================================================ openbsc-0.15.0.770-71124-dirty archives ready for distribution: openbsc-0.15.0.770-71124-dirty.tar.gz openbsc-0.15.0.770-71124-dirty.tar.bz2 ================================================================ $ ls deps/install/stow/ libosmo-abis libosmocore libosmo-netif libosmo-sccp libsmpp34 openggsn $ Kind regards, -Alex From ffe080ba4554a2bc442e3109638dc45f1d215836 Mon Sep 17 00:00:00 2001 From: Alexander Huemer Date: Fri, 19 May 2017 13:32:06 +0200 Subject: [PATCH] Use stow for dependency management --- scripts/osmo-build-dep.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/osmo-build-dep.sh b/scripts/osmo-build-dep.sh index 2a107ed..cdfbc45 100755 --- a/scripts/osmo-build-dep.sh +++ b/scripts/osmo-build-dep.sh @@ -48,6 +48,9 @@ if [ -n "$branch" ]; then fi git rev-parse HEAD # log current HEAD +mkdir -p "$inst/stow" + autoreconf --install --force -./configure --prefix="$inst" $cfg +./configure --prefix="$inst/stow/$project" $cfg $MAKE $PARALLEL_MAKE install +STOW_DIR="$inst/stow" stow --restow $project -- 2.11.0