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 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 couchdbci docker containers
build.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>/.
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:
Then, buildx will pick the node based on --platform. Use
BUILDKIT_PROGRESS=auto for a less noisy buildx progress view.
Building packages for a release
Prerequisites
Linux running Docker with buildx.
User must be able of running docker buildx build.
For non-x86_64 packages, need either qemu binfmt_misc handlers,
or buildx builders with native nodes (see above).
Enough free disk space on the builder to download all of the Docker
images + build CouchDB. Build layers stay in the builder’s
cache. But can use docker buildx prune to clean up if needed.
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.
Packages will be placed in the pkgs/couch subdirectory.
Uploading the packages
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
Upload Dev Packages
couch-dev-deb and couch-dev-rpm are dev repos which can be used
for pre-release or testing of packages.
CouchDB Packaging support repo
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:
.debfiles, as used by Debian, Ubuntu, and derivatives.rpmfiles, as used by CentOS, RedHat, and derivativessnapcraftfiles, as used by the Ubuntu Snappy package managerUsage
On a system with all necessary build-time dependencies:
SpiderMonkey 1.8.5
rpms
debs
CouchDB
rpms or debs from
masterbranch:rpms or debs from a release tarball:
Building inside the
couchdbcidocker containersbuild.shruns the package build as adocker buildx buildwith anapache/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 topkgs/couch/<os>-<codename>/.From a downloaded CouchDB tarball:
Directly from the Apache source CDN:
For another architecture:
The build is run on with buildx. With the
defaultbuilder a foreign arch is run under qemu (needsbinfmt_mischandlers on the host (for exampledocker run --privileged --rm tonistiigi/binfmt --install arm64). To build natively use an arch specific set of builders. One node per arch. For example:Then,
buildxwill pick the node based on--platform. UseBUILDKIT_PROGRESS=autofor a less noisy buildx progress view.Building packages for a release
Prerequisites
docker buildx build.binfmt_mischandlers, or buildx builders with native nodes (see above).docker buildx pruneto clean up if needed.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:
or
Packages will be placed in the
pkgs/couchsubdirectory.Uploading the packages
If you have Apache credentials (set your
BINARY_CREDSenvironment variable appropriately), after building all CouchDB packages above, and signing the rpms with the appropriate GPG key using therpmsign --addsign <file.rpm>command, simply run:Upload Dev Packages
couch-dev-debandcouch-dev-rpmare dev repos which can be used for pre-release or testing of packages.To upload packages to the dev repository:
To upload only a subset of packages, edit build.sh temporary to remove some of these variables:
Install Dev Packages
Deb Packages
RPM Packages
RHEL/AlmaLinux/RockyLinux 8
As root or under
sudoRHEL/AlmaLinux/RockyLinux 9
As root or under
sudoRHEL/AlmaLinux/RockyLinux 10
As root or under
sudoEnable Nouveau
To try out Nouveau:
Use
COUCHDB_NOUVEAU_ENABLE=1when installing the couchdb package. That enables thenouveauconfig settingInstall Java 11+:
Start the service:
Snap packages
See README-SNAP.md.
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.