The main purpose of this repository is to provide packaging support files for Apache CouchDB and its SpiderMonkey 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 derivativessnapcraft files, as used by the Ubuntu Snappy package managermake couch-js-rpms
make couch-js-debs PLATFORM=$(lsb_release -cs)
master branch:cd .. && git clone https://github.com/apache/couchdb cd couchdb-pkg && make build-couch $(lsb_release -cs) PLATFORM=$(lsb_release -cs)
make copy-couch $(lsb_release -cs) COUCHTARBALL=path/to/couchdb-#.#.#.tar.gz PLATFORM=$(lsb_release -cs)
couchdbci docker containersbuild.sh runs the package build as a docker buildx build with an apache/couchdbci-<os>:<codename>-erlang-<version> image from DockerHub. Those are built in the apache/couchdb-ci repo. The image is pulled automatically and the resulting packages are written to pkgs/couch/<os>-<codename>/.
From a downloaded CouchDB tarball:
ERLANGVERSION=<erlang-version> ./build.sh couch <os>-<codename> path/to/couchdb-#.#.#.tar.gz
Directly from the Apache source CDN:
./build.sh couch <os>-<codename> https://dist.apache.org/repos/dist/release/couchdb/source/#.#.#/apache-couchdb-#.#.#.tar.gz
For another architecture:
CONTAINERARCH=arm64 ./build.sh couch <os>-<codename> path/to/couchdb-#.#.#.tar.gz
The build is run on with buildx. With the default builder a foreign arch is run under qemu (needs binfmt_misc handlers on the host (for example docker run --privileged --rm tonistiigi/binfmt --install arm64). To build natively use an arch specific set of builders. One node per arch. For example:
docker buildx create --name multiarch --use ssh://my-amd64-host docker buildx create --name multiarch --append ssh://my-arm64-host
Then, buildx will pick the node based on --platform. Use BUILDKIT_PROGRESS=auto for a less noisy buildx progress view.
docker buildx build.binfmt_misc handlers, or buildx builders with native nodes (see above).docker buildx prune to clean up if needed.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.
If you have Apache credentials (set your BINARY_CREDS environment variable appropriately), after building all CouchDB packages above, and signing the rpms with the appropriate GPG key using the rpmsign --addsign <file.rpm> command, simply run:
./build.sh couch-upload-all
couch-dev-deb and couch-dev-rpm are dev repos which can be used for pre-release or testing of packages.
To upload packages to the dev repository:
./build.sh couch-dev-upload-all path/to/apache-couchdb-VERSION.tar.gz
To upload only a subset of packages, edit build.sh temporary to remove some of these variables:
DEBIANS="..." UBUNTUS="..." CENTOSES="..." XPLAT_BASES="..." XPLAT_ARCHES="..."
sudo apt update && sudo apt install -y curl apt-transport-https gnupg
curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
source /etc/os-release
echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couch-dev-deb/ ${VERSION_CODENAME} main" \
| sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null
As root or under sudo
dnf install -y yum-utils yum-config-manager --add-repo https://apache.jfrog.io/artifactory/couchdb/couchdev.repo dnf install -y couchdb
As root or under sudo
dnf install -y yum-utils yum-config-manager --add-repo https://apache.jfrog.io/artifactory/couchdb/couchdev.repo dnf config-manager --set-enabled crb dnf install epel-release epel-next-release dnf install -y mozjs78 dnf install -y couchdb
As root or under sudo
dnf install -y yum-utils yum-config-manager --add-repo https://apache.jfrog.io/artifactory/couchdb/couchdev.repo dnf install -y couchdb
To try out Nouveau:
Use COUCHDB_NOUVEAU_ENABLE=1 when installing the couchdb package. That enables the nouveau config setting
Install Java 11+:
sudo dnf install java-21-openjdk-headless
sudo service start couchdb
See README-SNAP.md.
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.