Return-Path: X-Original-To: apmail-avro-commits-archive@www.apache.org Delivered-To: apmail-avro-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9EDF510473 for ; Mon, 12 Jan 2015 12:11:55 +0000 (UTC) Received: (qmail 81205 invoked by uid 500); 12 Jan 2015 12:11:57 -0000 Delivered-To: apmail-avro-commits-archive@avro.apache.org Received: (qmail 81142 invoked by uid 500); 12 Jan 2015 12:11:56 -0000 Mailing-List: contact commits-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list commits@avro.apache.org Received: (qmail 81132 invoked by uid 99); 12 Jan 2015 12:11:56 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2015 12:11:56 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 6F6FEAC0163; Mon, 12 Jan 2015 12:11:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1651069 - in /avro/trunk: BUILD.txt CHANGES.txt build.sh share/docker/ share/docker/Dockerfile share/rat-excludes.txt Date: Mon, 12 Jan 2015 12:11:56 -0000 To: commits@avro.apache.org From: tomwhite@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150112121156.6F6FEAC0163@hades.apache.org> Author: tomwhite Date: Mon Jan 12 12:11:55 2015 New Revision: 1651069 URL: http://svn.apache.org/r1651069 Log: AVRO-1537. Make it easier to set up a multi-language build environment. Added: avro/trunk/share/docker/ avro/trunk/share/docker/Dockerfile Modified: avro/trunk/BUILD.txt avro/trunk/CHANGES.txt avro/trunk/build.sh avro/trunk/share/rat-excludes.txt Modified: avro/trunk/BUILD.txt URL: http://svn.apache.org/viewvc/avro/trunk/BUILD.txt?rev=1651069&r1=1651068&r2=1651069&view=diff ============================================================================== --- avro/trunk/BUILD.txt (original) +++ avro/trunk/BUILD.txt Mon Jan 12 12:11:55 2015 @@ -21,9 +21,25 @@ The following packages must be installed - Apache Forrest 0.8 (for documentation) - md5sum, sha1sum, used by top-level dist target +To simplify this, you can run a Docker container with all the above +dependencies installed by installing docker.io and typing: + + ./build.sh docker + +When this completes you will be in a shell running in the +container. Building the image the first time may take a while (20 +minutes or more) since dependencies must be downloaded and +installed. However subsequent invocations are much faster as the +cached image is used. + +The working directory in the container is mounted from your host. This +allows you to access the files in your Avro development tree from the +Docker container. + BUILDING -Once the requirements are installed, build.sh can be used as follows: +Once the requirements are installed (or from the Docker container), +build.sh can be used as follows: './build.sh test' runs tests for all languages './build.sh dist' creates all release distribution files in dist/ Modified: avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1651069&r1=1651068&r2=1651069&view=diff ============================================================================== --- avro/trunk/CHANGES.txt (original) +++ avro/trunk/CHANGES.txt Mon Jan 12 12:11:55 2015 @@ -36,6 +36,10 @@ Trunk (not yet released) field sub-builders, permitting easier creation of nested, optional structures. (Niels Basjes via cutting) + AVRO-1537. Make it easier to set up a multi-language build environment. + Support for running a Docker container with all build dependencies. + (tomwhite) + OPTIMIZATIONS IMPROVEMENTS Modified: avro/trunk/build.sh URL: http://svn.apache.org/viewvc/avro/trunk/build.sh?rev=1651069&r1=1651068&r2=1651069&view=diff ============================================================================== --- avro/trunk/build.sh (original) +++ avro/trunk/build.sh Mon Jan 12 12:11:55 2015 @@ -22,7 +22,7 @@ cd `dirname "$0"` # connect to root VERSION=`cat share/VERSION.txt` function usage { - echo "Usage: $0 {test|dist|sign|clean}" + echo "Usage: $0 {test|dist|sign|clean|docker}" exit 1 } @@ -172,6 +172,35 @@ case "$target" in (cd lang/perl; [ -f Makefile ] && make clean) ;; + docker) + docker build -t avro-build share/docker + if [ "$(uname -s)" == "Linux" ]; then + USER_NAME=${SUDO_USER:=$USER} + USER_ID=$(id -u $USER_NAME) + GROUP_ID=$(id -g $USER_NAME) + else # boot2docker uid and gid + USER_NAME=$USER + USER_ID=1000 + GROUP_ID=50 + fi + docker build -t avro-build-${USER_NAME} - < build.properties + +# Install Perl modules +RUN curl -L http://cpanmin.us | perl - --self-upgrade # non-interactive cpan +RUN cpanm install Module::Install Module::Install::ReadmeFromPod \ + Module::Install::Repository \ + Math::BigInt JSON::XS Try::Tiny Regexp::Common Encode \ + IO::String Object::Tiny Compress::Zlib Test::More \ + Test::Exception Test::Pod + +# Install Ruby modules +RUN gem install echoe yajl-ruby multi_json + +# Install global Node modules +RUN npm install -g grunt-cli Modified: avro/trunk/share/rat-excludes.txt URL: http://svn.apache.org/viewvc/avro/trunk/share/rat-excludes.txt?rev=1651069&r1=1651068&r2=1651069&view=diff ============================================================================== --- avro/trunk/share/rat-excludes.txt (original) +++ avro/trunk/share/rat-excludes.txt Mon Jan 12 12:11:55 2015 @@ -8,6 +8,7 @@ **/*.js **/*.la **/*.m4 +**/*.md **/*.md5 **/*.pom **/*.properties