Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 73880200CE0 for ; Thu, 27 Jul 2017 07:46:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 703E816A380; Thu, 27 Jul 2017 05:46:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B5D7516A381 for ; Thu, 27 Jul 2017 07:46:42 +0200 (CEST) Received: (qmail 20843 invoked by uid 500); 27 Jul 2017 05:46:41 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 19677 invoked by uid 99); 27 Jul 2017 05:46:41 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2017 05:46:41 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 80DF581658; Thu, 27 Jul 2017 05:46:38 +0000 (UTC) Date: Thu, 27 Jul 2017 05:46:38 +0000 To: "commits@couchdb.apache.org" Subject: [couchdb-pkg] branch master updated: Add script to build all packages for a release MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <150113439881.31641.18326519719130609287@gitbox.apache.org> From: wohali@apache.org Reply-To: "commits@couchdb.apache.org" X-Git-Host: gitbox.apache.org X-Git-Repo: couchdb-pkg X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 34bfa2f8c30a7f5f48a8d34c08d3659fc9bb38eb X-Git-Newrev: e6a707c77b11d93dbd0fe857c242a267c9cc9c9c X-Git-Rev: e6a707c77b11d93dbd0fe857c242a267c9cc9c9c X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Thu, 27 Jul 2017 05:46:43 -0000 This is an automated email from the ASF dual-hosted git repository. wohali pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git The following commit(s) were added to refs/heads/master by this push: new e6a707c Add script to build all packages for a release e6a707c is described below commit e6a707c77b11d93dbd0fe857c242a267c9cc9c9c Author: Joan Touzet AuthorDate: Wed Jul 26 22:46:27 2017 -0700 Add script to build all packages for a release --- .gitignore | 2 ++ Makefile | 16 ++++++++++++++++ README.md | 26 ++++++++++++++++++++++++++ make-releases.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+) diff --git a/.gitignore b/.gitignore index c4c095f..23c2c82 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ rpm/SRPMS repo/db repo/dists repo/pool +pkgs/ +couchdb/ diff --git a/Makefile b/Makefile index 554925a..8724e07 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,15 @@ get-couch: mkdir -p $(COUCHDIR) git clone https://github.com/apache/couchdb +download-couch: + mkdir -p $(COUCHDIR) + cd $(COUCHDIR) && curl -O $(URL) && tar xfz *.tar.gz + +copy-couch: + mkdir -p $(COUCHDIR) + cp $(COUCHTARBALL) $(COUCHDIR) + cd $(COUCHDIR) && tar xfz *.tar.gz + build-couch: cd $(COUCHDIR) && make dist @@ -107,3 +116,10 @@ install-js185: rm-js185-rpms: rm -f ../rpmbuild/RPMS/x86_64/js* + +# ###################################### +copy-pkgs: + mkdir -p pkgs/$(PLATFORM) + -cp ../rpmbuild/RPMS/x86_64/*.rpm pkgs/$(PLATFORM) + -cp ../couchdb/*deb pkgs/$(PLATFORM) + -chmod -R a+rwx pkgs/$(PLATFORM) diff --git a/README.md b/README.md index e7c1c4a..863dd2e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,32 @@ $ cd .. && git clone https://github.com/apache/couchdb $ cd couchdb-pkg && make build-couch $(lsb_release -cs) PLATFORM=$(lsb_release -cs) ``` +# Building packages for a release + +## Prerequisites + +1. Linux running Docker +1. The current user must be capable of running `docker run`. +1. Enough free disk space to download all of the Docker images + build + CouchDB. + +## Running the package build + +You can either build packages from a local CouchDB dist tarball (the output +of `make dist`), or from a URL of a published CouchDB dist tarball (such +as the ones on https://couchdb.apache.org/). The package's version number +will be derived from the filename of the CouchDB dist tarball. + +Run: + + $ ./make-packages path/to/apache-couchdb-VERSION.tar.gz + +or + + $ ./make-pacakges http://url/to/apache-couchdb-VERSION.tar.gz + +Packages will be placed in the `pkgs/` subdirectory. + # Feedback, Issues, Contributing General feedback is welcome at our [user][1] or [developer][2] mailing lists. diff --git a/make-releases.sh b/make-releases.sh new file mode 100755 index 0000000..e61780a --- /dev/null +++ b/make-releases.sh @@ -0,0 +1,57 @@ +#!/bin/bash +IMAGES=( + centos-6-erlang-18.3 centos6 \ + centos-7-erlang-18.3 centos7 \ + debian-8-erlang-18.3 jessie \ + ubuntu-14.04-erlang-18.3 trusty \ + ubuntu-16.04-erlang-18.3 xenial +) + +usage() { + echo $0 takes exactly one argument, either: + echo ' - path/to/couchdb-VERSION.tar.gz or' + echo ' - http://url/to/couchdb-VERSION.tar.gz' + echo + exit +} + +if [ $# -ne "1" ] +then + usage +fi + +ARG=$1 + +if [ -f ${ARG} ] +then + # file + cp ${ARG} . 2>/dev/null || true + FILE=$(basename ${ARG}) +else + if [[ ${ARG} =~ ^http.*$ ]] + then + # url + # thank you, advanced bash scripting guide + curl -O ${ARG} + FILE=${ARG##*/} + else + usage + fi +fi + +echo Using ${FILE} to build packages... +chmod 777 ${FILE} + +mkdir -p pkgs && chmod 777 pkgs + +image_count=${#IMAGES[@]} +index=0 + +while [ "$index" -lt "$image_count" ] +do + img=${IMAGES[$index]} + ((index++)) + plat=${IMAGES[$index]} + ((index++)) + docker run -it -w /tmp/couchdb-pkg -v $(readlink -f .):/tmp/couchdb-pkg couchdbdev/$img make copy-couch $plat copy-pkgs PLATFORM=$plat COUCHTARBALL=${FILE} +done -- To stop receiving notification emails like this one, please contact ['"commits@couchdb.apache.org" '].