Refactor pkg build process to not rely on couchdb-ci (#39)

11 files changed
tree: 72a44b15a0e9104e10e3f2412769b5950552d8ec
  1. .github/
  2. bin/
  3. debian/
  4. js/
  5. lintian-profiles/
  6. pkgs/
  7. repo/
  8. rpm/
  9. snap/
  10. .gitignore
  11. .travis.yml
  12. build.sh
  13. LICENSE
  14. Makefile
  15. README.md
README.md

CouchDB Packaging support repo

The main purpose of this repository is to provide packaging support files for Apache CouchDB and its SpiderMoneky 1.8.5 dependency, for a number of well-known and used packaging formats, namely:

  • .deb files, as used by Debian, Ubuntu, and derivatives
  • .rpm files, as used by CentOS, RedHat, and derivatives
  • snapcraft files, as used by the Ubuntu Snappy package manager

Usage

On a system with all necessary build-time dependencies:

SpiderMonkey 1.8.5

rpms

make couch-js-rpms

debs

make couch-js-debs PLATFORM=$(lsb_release -cs)

CouchDB

rpms or debs from master branch:

cd .. && git clone https://github.com/apache/couchdb
cd couchdb-pkg && make build-couch $(lsb_release -cs) PLATFORM=$(lsb_release -cs)

rpms or debs from a release tarball:

make copy-couch $(lsb_release -cs) COUCHTARBALL=path/to/couchdb-#.#.#.tar.gz PLATFORM=$(lsb_release -cs)

Building inside the couchdbdev docker containers

You must first pull down the image or images you need from Docker Hub, or build the images using the apache/couchdb-ci repository. Example:

docker pull couchdbdev/<osname>-<codename>-erlang-<erlang-version>

A full list of supported environments is at https://hub.docker.com/u/couchdbdev/ .

SpiderMonkey 1.8.5

./build.sh js <os>-<codename>    # for example, debian-stretch, ubuntu-bionic or centos-7.

CouchDB

./build.sh couch <os>-<codename> path/to/couchdb-#.#.#.tar.gz

or, if you want to build directly from the Apache distribution repository,

./build.sh couch <os>-<codename> https://dist.apache.org/repos/dist/release/couchdb/source/#.#.#/apache-couchdb-#.#.#.tar.gz

Building packages for a release

Prerequisites

  1. Linux running Docker
  2. The current user must be capable of running docker run.
  3. 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:

$ ./build.sh couch-all path/to/apache-couchdb-VERSION.tar.gz

or

$ ./build.sh couch-all http://url/to/apache-couchdb-VERSION.tar.gz

Packages will be placed in the pkgs/couch subdirectory.

A similar js-all target exists, should the SpiderMonkey packages need to be regenerated.

Uploading the packages

If you have Apache Bintray credentials (set your BINTRAY_USER and BINTRAY_API_KEY environment variables appropriately), after building all CouchDB packages above, simply run:

./build.sh couch-upload-all

Or, for the SpiderMonkey packages:

./build.sh js-upload-all

Building snaps

Prerequisites

  1. Ubuntu 16.04
  2. sudo apt install snapd snapcraft

How to do it

  1. Edit snap/snapcraft.yaml to point to the correct tag (e.g. 2.3.0)
  2. snapcraft

Feedback, Issues, Contributing

General feedback is welcome at our user or developer mailing lists.

Apache CouchDB has a CONTRIBUTING file with details on how to get started with issue reporting or contributing to the upkeep of this project.