Giter Site home page Giter Site logo

apache / couchdb-pkg Goto Github PK

View Code? Open in Web Editor NEW
29.0 27.0 28.0 25.34 MB

Apache CouchDB Packaging support files

Home Page: https://github.com/apache/couchdb-pkg

License: Apache License 2.0

Shell 72.15% Makefile 27.85%
erlang network-client http cplusplus couchdb big-data cloud database network-server javascript apache

couchdb-pkg's Introduction

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:

  • .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. A full list of supported environments is at https://hub.docker.com/u/couchdbdev/ .

SpiderMonkey 1.8.5

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

CouchDB

From a downloaded CouchDB tarball:

docker pull couchdbdev/<osname>-<codename>-erlang-<erlang-version>
ERLANGVERSION=<erlang-version> ./build.sh couch <os>-<codename> path/to/couchdb-#.#.#.tar.gz

Directly from the Apache source CDN:

docker pull couchdbdev/<osname>-<codename>-erlang-<erlang-version>
./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 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

Or, for the SpiderMonkey packages:

./build.sh js-upload-all

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.

couchdb-pkg's People

Contributors

adrienverge avatar big-r81 avatar glynnbird avatar janl avatar kocolosk avatar kun-lu20 avatar lostnet avatar matthew-graves avatar mhall119 avatar nickva avatar rnewson avatar rolfn avatar sebastien-prudhomme avatar shadows-withal avatar sklassen avatar willholley avatar wohali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

couchdb-pkg's Issues

Fixes made for CVE-2022-24706 mitigation break automated installations

Fixes made for CVE-2022-24706 mitigation break automated installations in #92 break automated installations.

Expected Behavior

Expected automated installations of [email protected] to work without user interaction.

Current Behavior

Post-install scripts prompt for a cookie value.

Possible Solution

Instead of making the post install interactive it would be better to generate a random default cookie.
For Non-Cluster deployments doing this should work just fine.
For Clustered deployments the user would need to configure the cookie in some way to suit their needs. This would need to be included in the documentation most likely.

147 if %{__grep} -q "^-setcookie monster$" /opt/%{name}/etc/vm.args; then
148   echo "Please enter a cookie value for this installation: " >/dev/tty
149   if exec </dev/tty; then
150     read cookie;
151   fi
152   echo "Writing $cookie to vm.args..."
153   %{__sed} -i "s/^-setcookie monster.*$/-setcookie ${cookie}/" /opt/%{name}/etc/vm.args
154 elif %{__grep} -q "^[# ]*-setcookie$" /opt/%{name}/etc/vm.args; then
155   echo "Please enter a cookie value for this installation: " >/dev/tty
156   if exec </dev/tty; then
157     read cookie;
158   fi
159   echo "Writing $cookie to vm.args..."
160   %{__sed} -i "s/^[# ]*-setcookie.*$/-setcookie ${cookie}/" /opt/%{name}/etc/vm.args
161 fi

to read

 # generate something as a suitably random default for non cluster configurations 
148 cookie="$(echo $RANDOM | sha256sum | head -c 32)"  
149 if %{__grep} -q "^-setcookie monster$" /opt/%{name}/etc/vm.args; then
150   %{__sed} -i "s/^-setcookie monster.*$/-setcookie ${cookie}/" /opt/%{name}/etc/vm.args
151 elif %{__grep} -q "^[# ]*-setcookie$" /opt/%{name}/etc/vm.args; then
152   %{__sed} -i "s/^[# ]*-setcookie.*$/-setcookie ${cookie}/" /opt/%{name}/etc/vm.args
153 fi

Steps to Reproduce (for bugs)

  1. yum install [email protected]

Context

The company I work for uses CouchDB as its primary database for several of its dedicated server based products.
We provide out customer with an iso that includes CouchDB. In order to build these isos we need to be able to install couchdb in an automated manor. The changes made to the post-install scripts provided here make the install process unable to be fully automated.

Your Environment

  • Version used: 3.2.2
  • Browser Name and version: N/A
  • Operating System and version (desktop or mobile): RHEL7 Server, RHEL8 Server, CENTOS7 Server, ROCKY8 Server
  • Link to your project: https://asti-usa.com/voisus/index.html

RPM CouchDB init script always returns 0 for status

Expected Behavior

If CouchDB is not running, /etc/rc.d/init.d/couchdb status should return value other than 0

Current Behavior

If CouchDB is not running, /etc/rc.d/init.d/couchdb status returns 0

Possible Solution

In the "status" case of /etc/rc.d/init.d/couchdb, exit with the value returned by the status() function

path to certificates

I'm using Debian 12 and snap couchdb

What path do I use for "cert_file" in [ssl] ?

To be more specific:

I know where my cert and key files are (installed by Caddy) and I can certainly move or link them to anywhere in the filesystem. But it seems that snap-couchdb has a different view of the filesystem than I do. I've tried many permutations but consistently get enoent.

.deb packages for s390x cpu on Ubuntu jammy and lunar

Since s390x .deb package for Ubuntu focal has already been available (https://apache.jfrog.io/artifactory/couchdb-deb/pool/C/CouchDB/couchdb_3.3.2~focal_s390x.deb), could the community also consider to release s390x .deb packages on Ubuntu jammy and lunar? Thanks!

Expected Behavior

Release CouchDB s390x .deb packages on Ubuntu jammy and lunar.

Current Behavior

s390x .deb package is already available for Ubuntu focal since v3.3.2.

Possible Solution

Build s390x .deb package via qemu.

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used: v3.3.2
  • Browser Name and version:
  • Operating System and version (desktop or mobile): Ubuntu jammy and Ubuntu lunar
  • Link to your project:

enable_cors is written to httpd section instead of chttpd

Current Behavior

The CouchDB package creates the following file after the installation: /opt/couchdb/etc/local.d/10-admins.ini. This also configures to enable CORS by default using enable_cors = true. However the package writes this into the [httpd] section, whereas the documentation (https://docs.couchdb.org/en/latest/config/http.html#config-cors) states:

Changed in version 3.2: moved from [httpd] to [chttpd] section

root@couchdb:~# cat /opt/couchdb/etc/local.d/10-admins.ini

# Package-introduced administrative user
[admins]
redacted

[chttpd_auth]
secret = redacted

[couchdb]
uuid = redacted

[httpd]
enable_cors = true

[cors]
origins = *
credentials = true
headers = accept, authorization, content-type, origin, referer
methods = GET, PUT, POST, HEAD, DELETE

At the same time, origins = * and crecredentials = true don't work together as mentioned in the documentation:

You can’t set origins = * and credentials = true option at the same time

Maybe look into this at the same time.

Expected Behavior

[httpd] section should be called [chttpd] in /opt/couchdb/etc/local.d/10-admins.ini.

Possible Solution

Rename [httpd] section to [chttpd] in /opt/couchdb/etc/local.d/10-admins.ini.

Your Environment

  • Version used: 3.2.2-1~bullseye
  • Browser Name and version: N/A
  • Operating System and version (desktop or mobile): Debian Bullseye
  • Link to your project: N/A

Debian Bookworm packages please

Expected Behavior

Install CouchDB as per instructions without error.

Current Behavior

An error is thrown as there are no Bookworm packages.

Possible Solution

Create Bookworm packages.

Steps to Reproduce (for bugs)

  1. Install Debian Bookworm
  2. Follow installation instructions for CouchDB on Debian.

Context

My project has moved over to Debian Bookworm release. I have to maintain a system of Debian Bullseyes to keep CouchDB operating without needing magic sauce for installation. Instead I have to special case the underlying project OS.

CentOS 7 Install dependency error: Requires: mozjs60

Expected Behavior

Install on CentOS 7 to work.

Current Behavior

Went through installation on CentOS 7 machine.

Installed dependencies using http://docs.couchdb.org/en/latest/install/unix.html?highlight=re#redhat-based-fedora-centos-rhel-systems

When running:

$ sudo yum -y install epel-release && sudo yum -y install couchdb

Get:

Error: Package: couchdb-3.0.0-1.el7.x86_64 (bintray--apache-couchdb-rpm)
           Requires: mozjs60

Your Environment

  • Version used: 3.0
  • Operating System and version (desktop or mobile): CentOS 7 (3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux)

Cannot clean up installation after upgrade from 2.3.0 to 2.3.1

Upgraded from CouchDB 2.3.0 to CouchDB 2.3.1 on Debian 9.9

After installation the following error message appeared

apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up couchdb (2.3.1~stretch) ...
dpkg: error processing package couchdb (--configure):
subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
couchdb
E: Sub-process /usr/bin/dpkg returned an error code (1)

It appears that 2.3.1 is installed because if I check the CouchDB installation with curl localhost:5984, it returns....
{"couchdb":"Welcome","version":"2.3.1","git_sha":"c298091a4","uuid":"c89c514e09cd4f0491144e72c614af91","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}

This error is showing up in our sandbox environment and would like to get it addressed before we attempt to update our Production environment. Lest we risk torturing our customers with unknown problems......

What suggestions do you have to clear this error?

Nouveau packaging fails on PPC64LE

Currently (2024-06-13) nouveau packaging fails on PPC64LE.

Failing when running:

~/src/couchdb-pkg (nouveau)$ ./build.sh couch-all ./apache-couchdb-3.3.3-64bf1de.tar.gz

These are the combinations it fails on:

              ( ${base} == "centos-8" && ${arch} == "ppc64le" ) ||
              ( ${base} == "centos-9" && ${arch} == "ppc64le" ) ||
              ( ${base} == "debian-bullseye" && ${arch} == "ppc64le" ) ||
              ( ${base} == "debian-bookworm" && ${arch} == "ppc64le" ) ||
              ( ${base} == "ubuntu-focal" && ${arch} == "ppc64le" ) ||
              ( ${base} == "ubuntu-jammy" && ${arch} == "ppc64le" )

The first sign of trouble is the privilege violation (03) followed by a register dump and the Java linter fails for some reason. It doesn't fail on x86_64, arm64, and s390x so it seems likely related to the violation error.

WARN:  'escriptize' command does not apply to directory /home/jenkins/couchdb/apache-couchdb-3.3.3-64bf1de/rel
WARN:  'escriptize' command does not apply to directory /home/jenkins/couchdb/apache-couchdb-3.3.3-64bf1de
Unknown privilege violation (03)
NIP 000000401a3d43b0   LR 0000004002ace238 CTR 000000401a3d4380 XER 0000000000000000 CPU#1
MSR 9000000102806901 HID0 0000000000000000  HF 02806105 iidx 0 didx 0
TB 00050608 217361193125098
GPR00 ffffffbffd0464b0 0000004002fb9950 0000004002c33d00 0000004002fbab50
GPR04 0000000000000000 0000000000002000 0000000000000000 0000000000000000
GPR08 0000004002c93d00 0000004002c5717c 0000000000000001 0000000000000000
GPR12 000000401a3d4380 0000004002fc48e0 0000004001872000 0000004002dbe000
GPR16 00000040018bf410 000000401a3d43a4 000000401a3d43ac 000000401a3d43d0
GPR20 000000401a3d43d8 0000004002c64f08 00000000000003d8 0000004004025f10
GPR24 00000040040262e8 0000004002fb99b0 0000004004025f00 0000004004025ec0
GPR28 0000004002c57188 000000401a3d4380 0000004002c95c20 0000004002fb9950
CR 28004400  [ E  L  -  -  G  G  -  -  ]             RES 0000004002fbab50
Downloading https://services.gradle.org/distributions/gradle-8.6-bin.zip
............10%.............20%............30%.............40%.............50%............60%.............70%.............80%............90%.............100%

Welcome to Gradle 8.6!

Here are the highlights of this release:
 - Configurable encryption key for configuration cache
 - Build init improvements
 - Build authoring improvements

For more details see https://docs.gradle.org/8.6/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :spotlessInternalRegisterDependencies
> Task :spotlessJava
Step 'removeUnusedImports' found problem in 'src/main/java/org/apache/couchdb/nouveau/lucene9/Lucene9Index.java':
2:7: error: class, interface, or enum expected
com.google.googlejavaformat.java.FormatterException: 2:7: error: class, interface, or enum expected
	at com.google.googlejavaformat.java.FormatterException.fromJavacDiagnostics(FormatterException.java:51)
	at com.google.googlejavaformat.java.RemoveUnusedImports.parse(RemoveUnusedImports.java:264)
	at com.google.googlejavaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:218)
	at com.diffplug.spotless.glue.java.GoogleJavaFormatRemoveUnusedImporterFormatterFunc.apply(GoogleJavaFormatRemoveUnusedImporterFormatterFunc.java:38)
	at com.diffplug.spotless.FormatterFunc.apply(FormatterFunc.java:32)
	at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:82)
	at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:103)
	at com.diffplug.spotless.Formatter.compute(Formatter.java:246)
	at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:214)
	at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:190)
	at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:105)
	at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:89)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
	at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:45)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.execute(IncrementalTaskAction.java:26)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:247)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:232)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:215)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:198)
	at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:165)
	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
	at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)
	at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)
	at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:64)
	at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:42)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:189)
	at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
	at org.gradle.internal.Either$Right.fold(Either.java:175)
	at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:76)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:54)
	at [email protected]/java.util.Optional.orElseGet(Optional.java:369)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:106)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)
	at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)
	at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)
	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.executeWithNonEmptySources(AbstractSkipEmptyWorkStep.java:125)
	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:56)
	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:36)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
	at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:75)
	at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:41)
	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.lambda$execute$0(AssignMutableWorkspaceStep.java:35)
	at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:292)
	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:31)
	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:22)
	at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:40)
	at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)
	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:66)
	at [email protected]/java.util.Optional.orElseGet(Optional.java:369)
	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:66)
	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:38)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:36)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:26)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:61)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:145)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:134)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
	at org.gradle.execution.plan.DefaultPlanExecutor.process(DefaultPlanExecutor.java:116)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.executeWithServices(DefaultTaskExecutionGraph.java:138)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:123)
	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:35)
	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:51)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor$ExecuteTasks.call(BuildOperationFiringBuildWorkerExecutor.java:54)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor$ExecuteTasks.call(BuildOperationFiringBuildWorkerExecutor.java:43)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor.execute(BuildOperationFiringBuildWorkerExecutor.java:40)
	at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$executeTasks$10(DefaultBuildLifecycleController.java:313)
	at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
	at org.gradle.internal.model.StateTransitionController.lambda$tryTransition$8(StateTransitionController.java:177)
	at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
	at org.gradle.internal.model.StateTransitionController.tryTransition(StateTransitionController.java:177)
	at org.gradle.internal.build.DefaultBuildLifecycleController.executeTasks(DefaultBuildLifecycleController.java:304)
	at org.gradle.internal.build.DefaultBuildWorkGraphController$DefaultBuildWorkGraph.runWork(DefaultBuildWorkGraphController.java:220)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:264)
	at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:128)
	at org.gradle.composite.internal.DefaultBuildController.doRun(DefaultBuildController.java:181)
	at org.gradle.composite.internal.DefaultBuildController.access$000(DefaultBuildController.java:50)
	at org.gradle.composite.internal.DefaultBuildController$BuildOpRunnable.lambda$run$0(DefaultBuildController.java:198)
	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
	at org.gradle.composite.internal.DefaultBuildController$BuildOpRunnable.run(DefaultBuildController.java:198)
	at [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at [email protected]/java.lang.Thread.run(Thread.java:829)

> Task :spotlessJava FAILED

Snap package error for CouchDB 2.1.1

I have a problem trying to packaging a CouchDB snap, when the source-tag is changed to 2.1.1.
The compilation fails in Fauxton. An extract of the huge error list:

.......

ERROR in ./app/addons/fauxton/notifications/notifications.js
ESLintError: 
/home/felipe/snap/couchdb-pkg/parts/couchdb/build/src/fauxton/app/addons/fauxton/notifications/notifications.js
   29:3   error  'getStoreState' is not defined               no-undef
   45:3   error  'onChange' is not defined                    no-undef
   49:3   error  'getStyles' is not defined                   no-undef
   72:3   error  'getNotificationCenterPanel' is not defined  no-undef
   88:3   error  'state' is not defined                       no-undef

......

It seems to me that the version of nodejs is not correct, although I tried with diferent version and I could not make it work (probably coz of my lack of skill with snaps).

I'm working on an ubuntu 16.04 LTS machine.
In order to reproduce this change source-tag: 2.1.0 to 2.1.1.

Does someone know how to solve this?

Thanks,
Felipe

Add support for non-LTS Ubuntu releases

Migrated from apache/couchdb#2119 :

Release packages for Ubuntu 18.10 / 19.04, current 18.04 can't be used anymore as libcurl3 conflicts with libcurl4, which is a dependency of curl so you have to resort to unofficial snap builds

Having to resort to LTS versions just because of the DB engine is problematic for me, as I have to keep my applications current with the latest versions of Linux

@wohali 's response:

Current policy is only to support LTS builds. The reason is that CouchDB does not coexist well on machines running other processes, and since you need a dedicated server for that machine, you might as well run an LTS release.

We are a volunteer run project with limited computing resources. Running a full regression test and build on each new platform requires a large amount of infrastructure on our side, plus min. 1 hour of compute time per platform.

Adding non-LTS support is not likely in the near future, but we'll consider it.

weatherreport not working with debian package

Trying to use weatherreport in couchdb installation form deb package leads to errors

Expected Behavior

$ /opt/couchdb/bin/weatherreport --list
Available diagnostic checks:

  custodian            Shard safety/liveness checks
  disk                 Data directory permissions and atime
  internal_replication Check the number of pending internal replication jobs
  ioq                  Check the total number of active IOQ requests
  mem3_sync            Check there is a registered mem3_sync process
  membership           Cluster membership validity
  memory_use           Measure memory usage
  message_queues       Check for processes with large mailboxes
  node_stats           Check useful erlang statistics for diagnostics
  nodes_connected      Cluster node liveness
  process_calls        Check for large numbers of processes with the same current/initial call
  process_memory       Check for processes with high memory usage
  safe_to_rebuild      Check whether the node can safely be taken out of service
  search               Check the local search node is responsive
  tcp_queues           Measure the length of tcp queues in the kernel

Current Behavior

$ /opt/couchdb/bin/weatherreport --list
/usr/bin/env: 'escript': No such file or directory

$ /opt/couchdb/bin/weatherreport --etc /opt/couchdb/etc --list
/usr/bin/env: 'escript': No such file or directory

$ PATH=/opt/couchdb/bin:/opt/couchdb/erts-12.3.2.10/bin:$PATH
$ /opt/couchdb/bin/weatherreport --etc /opt/couchdb/etc --list
{"init terminating in do_boot",{'cannot get bootfile','no_dot_erlang.boot'}}
init terminating in do_boot ({cannot get bootfile,no_dot_erlang.boot})

Crash dump is being written to: erl_crash.dump...done

Possible Solution

Document instructions on how to use weatherreport

Steps to Reproduce (for bugs)

  1. Install couchdb from deb package on a fresh system
  2. Try to use weatherreport with above commands

Context

Your Environment

Couchdb 3.3.2 deb package on Debian 11 Buulseye

# cat /etc/debian_version 
11.8

# dpkg -l couchdb
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Architecture Description
+++-==============-==============-============-==================================
ii  couchdb        3.3.2~bullseye amd64        RESTful document oriented database


# curl -fsSL http://127.0.0.1:5984/ | jq .
{
  "couchdb": "Welcome",
  "version": "3.3.2",
  "git_sha": "11a234070",
  "uuid": "f3fd9691d6ac51fae969a4701fab4cc0",
  "features": [
    "access-ready",
    "partitioned",
    "pluggable-storage-engines",
    "reshard",
    "scheduler"
  ],
  "vendor": {
    "name": "The Apache Software Foundation"
  }
}

Error making couchdb 2.3.0 with Erlang 21.1.4

Expected Behavior

make release should not end with an error.

Current Behavior

  • make release
...
==> rel (generate)
=ERROR REPORT==== 26-Sep-1951::01:00:53.****** ===
File operation error: eacces. Target: /usr/lib64/erlang/lib/crypto-4.3.3/priv/obj/stw17j4b. Function: get_file.
ERROR: Failed to generate target from spec: "copy file /usr/lib64/erlang/lib/crypto-4.3.3/priv/obj/stw17j4b -> /home/niepra01/myapp/couchdb/apache-couchdb-2.3.0/rel/couchdb/lib/crypto-4.3.3/priv/obj/stw17j4b: no such file or directory\n"
ERROR: Unexpected error: rebar_abort
ERROR: generate failed while processing /home/niepra01/myapp/couchdb/apache-couchdb-2.3.0/rel: rebar_abort
make: *** [Makefile:348: release] Fehler 1

The file /usr/lib64/erlang/lib/crypto-4.3.3/priv/obj/stw17j4b exist on my system as part of "erlang-21.1.4" , but has zero length.

Possible Solution

???

Steps to Reproduce (for bugs)

  1. Get the source file: apache-couchdb-2.3.0.tar.gz
  2. tar xvzf apache-couchdb-2.3.0.tar.gz
  3. cd apache-couchdb-2.3.0/
  4. ./configure
  5. make release

Context

Your Environment

  • Version used: 2.3.0
  • Operating System and version (desktop or mobile): openSUSE Tumbleweed (20181211)
  • Erlang: Erlang/OTP 21 [erts-10.1.3]

How can I fix the problem? On an older system (Erlang 18) creation of couchdb binaries was successful.

openSUSE: Compilation problem (CouchDB 3.0.0, SpiderMonkey 60)

I tried to compile CouchDB 3.0.0 for openSUSE 15.1 in the following way:

sudo zypper install help2man libcurl-devel
make download-couch openSUSE \
URL=http://mirror.23media.de/apache/couchdb/source/3.0.0/apache-couchdb-3.0.0.tar.gz

This ends with a successful creation of the rpm file. Note: make openSUSE is the same as make centos7. In a next step I tried to use "SpiderMonkey 60":

sudo zypper install mozjs60 mozjs60-devel
make centos8

This ends with the following error:

/usr/include/mozjs-60/js-config.h:24:4: error: #error "SpiderMonkey was configured with --enable-debug, so DEBUG must be defined when including this header"
 #  error "SpiderMonkey was configured with --enable-debug, so DEBUG must be defined when including this header"
    ^~~~~
ERROR: compile failed while processing /home/nieprasc/myapps/couchdb/apache-couchdb-3.0.0/src/couch: rebar_abort
make[1]: *** [Makefile:125: couch] Error 1

What is the problem here? What can I do?

Thanks in advance.

Ubuntu 24.04 Noble Numbat packages

Ubuntu 24.04 Noble Numbat has been out since April 25, 2024. Do you plan to provide packages for Ubuntu 24.04?

Expected Behavior

Can install couchdb from packages on Ubuntu 24.04

Current Behavior

No package available for Ubuntu 24.04

Possible Solution

Build and ship packages for Ubuntu 24.04

Included `rebar` binary contains bug rendering failed builds on ARM64

couchdb-pkg [master]$ make build-couch $(lsb_release -cs) PLATFORM=$(lsb_release -cs)

cd ../couchdb && make dist
make[1]: Entering directory '/home/linaro/projects/docker-hub/couchdb'
==> config (compile)
Compiled src/config_sup.erl
Compiled src/config_notifier.erl
Compiled src/config_util.erl
Compiled src/config_listener.erl
Compiled src/config_writer.erl
Compiled src/config_app.erl
Compiled src/config_listener_mon.erl
Compiled src/config.erl
==> b64url (compile)
Compiled src/b64url.erl
Compiling /home/linaro/projects/docker-hub/couchdb/src/b64url/c_src/b64url.c
cc: error: unrecognized command line option ‘-m64’
ERROR: compile failed while processing /home/linaro/projects/docker-hub/couchdb/src/b64url: rebar_abort
Makefile:81: recipe for target 'couch' failed
make[1]: *** [couch] Error 1
make[1]: Leaving directory '/home/linaro/projects/docker-hub/couchdb'
Makefile:87: recipe for target 'build-couch' failed
make: *** [build-couch] Error 2

Pulling newer binary from HERE fixed the issue.

RPM needs to tag vm.args as a config file

I used yum update -y to update my system. This included an upgrade from CouchDB 2 to CouchDB 3, but the upgrade makes the database unusable. I am using a single CouchDB instance on RHEL7. The root database info and _session work, but accessing any database shows

error | "internal_server_error"
reason | "No DB shards could be opened."
ref | 2822102114

The logs also complain about a Failed to ensure auth ddoc _users/_design/_auth exists for reason: read_failure

Could it be related to the RPM upgrade overwriting the cluster settings in default.ini because I had not edited this config file?

CouchDB 3.0 setting:

[cluster]
q=2
n=3

CouchDB 2 setting:

[cluster]
q=8
n=3

Changing the setting back did not help, neither did reinstalling CouchDB 2.3.1

No way to pass environment variables with query server config

As of CouchDB 2.3 the only way to configure query servers and their parameters is to use environment variables (see https://docs.couchdb.org/en/main/config/query-servers.html).
A common usage is to reconfigure maximum memory allocation for the javascript server by using: COUCHDB_QUERY_SERVER_JAVASCRIPT="/usr/bin/couchjs -S 536870912 /usr/share/server/main.js"
(as explained at: https://docs.couchdb.org/en/main/config/query-servers.html)

Expected Behavior

There should be a way to pass environment variables while starting a snap service.

Current Behavior

Currently there is no way to pass an environment variable to a snap application. Hence there is no way to reconfigure or add query servers.

Possible Solution

An additional file in /var/snap/couchdb/9/etc/ that could hold the environment variables. It could be sourced upon startup.

Your Environment

  • Version used: 3.1.1, rev 9

Empty debian binary-i386 packages

Not sure, if this is the right place to submit the issue, please let me know otherwise.
Unable to install coucbdb using the steps listed at http://docs.couchdb.org/en/master/install/unix.html on Ubuntu Xenial.
Is this due to empty packages at https://apache.bintray.com/couchdb-deb/ for xenial (i386)?

Current Behavior

$ curl --head https://apache.bintray.com/couchdb-deb/dists/xenial/main/binary-i386/Packages
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 05 Mar 2018 19:01:05 GMT
Content-Type: inode/x-empty
Content-Length: 0
Connection: keep-alive
Last-Modified: Thu, 09 Nov 2017 18:25:00 GMT
Accept-Ranges: none
ETag: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Checksum-Sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709
X-Checksum-Sha2: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Where as for amd64 arch for xenial

curl --head https://apache.bintray.com/couchdb-deb/dists/stretch/main/binary-amd64/Packages
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 05 Mar 2018 19:01:30 GMT
Content-Type: text/plain
Content-Length: 2665
Connection: keep-alive
Last-Modified: Thu, 09 Nov 2017 18:24:58 GMT
Accept-Ranges: none
ETag: 7b263cc00dfc11f2f7afd05395b1bf02dba6d3134edeb4e89504357c17871b1f
X-Checksum-Sha1: 9b99b569c77ff387b53cb06277e5596e9ccbe4fe
X-Checksum-Sha2: 7b263cc00dfc11f2f7afd05395b1bf02dba6d3134edeb4e89504357c17871b1f

This is the same for all the other dists.

Your Environment

  • Version used: Ubuntu 16.04 Xenial
  • Operating System and version (desktop or mobile): VirtualBox on OSX El Capitan

Cannot upgrade couchdb 2.3.0 to 2.3.1 on Ubuntu~xenial

Expected Behavior

I would expect apt install couchdb to upgrade my 2.3.0 to 2.3.1 seamlessly, however dpkg fails to me.

Current Behavior

Having /var/lib/dpkg/info/couchdb.postinst starting with #!/bin/sh -x:

Setting up couchdb (2.3.1~xenial) ...
+ set -e
+ . /usr/share/debconf/confmodule
+ [ !  ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [  ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/couchdb.postinst configure 2.1.1-1~xenial
dpkg: error processing package couchdb (--configure):
 subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
 couchdb
E: Sub-process /usr/bin/dpkg returned an error code (1)

When running the offending command manually:

# exec /usr/share/debconf/frontend /var/lib/dpkg/info/couchdb.postinst configure 2.1.1-1~xenial

The SSH connection I've used to issue the command gets terminated.

Possible Solution

What I don't get is why the debconf/frontend executes postinst with "2.1.1-1~xenial" which is current version, not the one being installed.

Steps to Reproduce (for bugs)

Using this tutorial http://docs.couchdb.org/en/latest/install/unix.html#installation-using-the-apache-couchdb-convenience-binary-packages to install binary package on Ubuntu 18.

Context

Just trying to upgrade 2.3.0 to 2.3.1 to get rid of path traversal vulnerability.

Your Environment

  • Version used: 2.3.0/2.3.1
  • Browser Name and version: n/a
  • Operating System and version (desktop or mobile): Ubuntu 16.04 LTS Xenual Linux 4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Link to your project: https://github.com/suculent/thinx-device-api

Snap Package Update

What's the roadmap for CouchDB with Snap? Will it be updated to the newest version?

Use Snapd Native Configuration

Use Snapd Native Configuration

Expected Behavior

Couchdb should take advantage of snaps native configuration management. This is the expected behavior when installing a snap.

Current Behavior

Currently to configure the couchdb snap the user needs to edit /var/snap/couchdb/current/local.ini

Possible Solution

It's seems possible to read the configuration in rel/couchdb/bin/snap_run and write them to a file before the exec is done.

Context

This is just a nice to have. Editing the local.ini works.

Alpine Linux apk build

Alpine Linux Couchdb package that can be installed using the Alpine apk tool

Expected Behavior

Whilst in Alpine Linux, the apk tool would be used to install a copy of couchdb from a couchdb repository.

Current Behavior

There is no Alpine package. It must be built from source.

Possible Solution

An Alpine Linux APKBUILD file to produce an installable apk file. The file would be hosted by couchdb project much like rpms and debs.

Context

I use Alpine Linux for my CI processes. I use couchdb as part of the solution but its not available as an apk. I'd like a pre-built copy that can be installed by apk to make the CI build as quick as possible.

Your Environment

I have a beta version of couchdb 3.0.0 building for Alpine 3.11 (older versions of Alpine come with package version/dependency problems). I'd be interested to know if the couchdb project team wanted to take over it.

How to correctly specify install path for silent Windows install?

Expected Behavior

I just started using CouchDB and have a question regarding the installation on windows. I followed these instructions: https://docs.couchdb.org/en/stable/install/windows.html#installation-from-binaries and it worked perfectly.
Only thing I did was change the path from the one proposed by the installer (with spaces) to path without spaces.

Current Behavior

Then I tried the silent installation because this might be relevant for me in the future. Basically this also works except that it installs CouchDB to a path with spaces (The same path the installer would propose): D:/Program Files/Apache CouchDB

What irritates me here is that the installation instructions advises to not use spaces within the path, but the silent installation is doing that anyways. Is there a way to avoid that?

And also for my first minor tests CouchDB seems to work as expected, but I also don't want to run into trouble later on because of that.

Your Environment

  • Version used: 3.1.0
  • Browser Name and version: Chrome 78
  • Operating System and version (desktop or mobile): Windows10 1803

Suggestion: rpm for openSUSE

With the following patch against Makefile and rpm/SPECS/couchdb.spec it's possible to create a rpm file for openSUSE and after installing a working couchDB. Here is the content of the patch file opensuse-rpm.patch:

commit dfa40ac1fb9155538e8c2b13e238c1fe24ee1ca0
Author: Rolf Niepraschk <[email protected]>
Date:   Thu Dec 28 00:23:14 2017 +0100

    Changes for openSUSE

diff --git a/Makefile b/Makefile
index b99c464..c20e149 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,8 @@ centos6: make-rpmbuild centos
 
 centos7: make-rpmbuild centos rm-js185-rpms
 
+opensuse: centos7
+
 # ######################################
 get-couch:
 	mkdir -p $(COUCHDIR)
diff --git a/rpm/SPECS/couchdb.spec b/rpm/SPECS/couchdb.spec
index a2b11a9..f058011 100644
--- a/rpm/SPECS/couchdb.spec
+++ b/rpm/SPECS/couchdb.spec
@@ -33,8 +33,22 @@ ExclusiveArch: x86_64
 Exclusiveos:   linux
 Packager:      CouchDB Developers <[email protected]>
 
+%if 0%{?is_opensuse}
+BuildRequires: erlang >= %{erlang_version}
+BuildRequires: erlang-rebar
+BuildRequires: erlang-reltool
+BuildRequires: erlang-epmd
+BuildRequires: gcc-c++
+BuildRequires: js-devel
+BuildRequires: pkg-config
+Requires(pre): shadow
+Requires(pre): libmozjs185-1_0
+%else
 BuildRequires: esl-erlang = %{erlang_version}
 BuildRequires: gcc
+Requires(pre): shadow-utils
+Requires(post): js = 1:1.8.5
+%endif
 BuildRequires: git
 BuildRequires: help2man
 #BuildRequires: js-devel = 1:1.8.5
@@ -46,15 +60,16 @@ BuildRequires: python >= 2.6
 #BuildRequires: python-sphinx >= 1.5.3
 #BuildRequires: shunit2
 
-Requires(pre): shadow-utils
-
 Requires(post): curl
-Requires(post): js = 1:1.8.5
 Requires(post): libicu >= 4.2.1
 Requires(post): procps
 Requires(post): python-progressbar
 Requires(post): python-requests
 
+%if 0%{?is_opensuse}
+BuildRequires: systemd-rpm-macros
+%{?systemd_requires}
+%else
 %if 0%{?fedora} || 0%{?rhel} >= 7
 BuildRequires:		xfsprogs-devel
 %{?systemd_requires}
@@ -64,6 +79,7 @@ Requires(post):		chkconfig
 Requires(preun):	chkconfig, initscripts
 Requires(postun):	initscripts
 %endif
+%endif
 
 %description
 Apache CouchDB is a distributed, fault-tolerant and schema-free
@@ -89,39 +105,54 @@ languages and environments.
 %{__rm} -rf %{buildroot}
 
 %pre
+%if 0%{?is_opensuse}
+if ! /usr/bin/getent passwd couchdb > /dev/null; then /usr/sbin/useradd \
+  --system --home-dir /opt/couchdb --no-create-home \
+  --shell /bin/bash --comment "CouchDB Administrator" \
+  --user-group couchdb; fi
+%else
 if ! /usr/bin/getent passwd couchdb > /dev/null; then /usr/sbin/adduser \
   --system --home /opt/couchdb --no-create-home \
   --shell /bin/bash --comment "CouchDB Administrator" \
   --user-group couchdb; fi
+%endif
 
 %install
 %{__install} -d -m0755 %{buildroot}/opt
 %{__cp} -r rel/couchdb %{buildroot}/opt
 %{__install} -d -m0750 %{buildroot}/var/log/%{name}
+%if 0%{?is_opensuse}
+%{__install} -d -m0750 %{buildroot}%{_localstatedir}/lib/%{name}
+%else
 %{__install} -d -m0750 %{buildroot}%{_sharedstatedir}/%{name}
+%endif
 %{__install} -Dp -m0644 %{SOURCE3} %{buildroot}/opt/%{name}/etc/default.d/10-filelog.ini
 %{__install} -Dp -m0644 %{SOURCE5} %{buildroot}/etc/logrotate.d/%{name}
 /bin/find %{buildroot}/opt/%{name} -name *.ini -exec %{__chmod} 0640 {} \;
 
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?is_opensuse}
 %{__install} -Dp -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
 %else
 %{__install} -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}
 %endif
+%if 0%{?is_opensuse}
+%{__ln_s} -f -T %{_localstatedir}/lib/%{name} %{buildroot}/opt/%{name}/data
+%else
 %{__ln_s} -f -T %{_sharedstatedir}/%{name} %{buildroot}/opt/%{name}/data
+%endif
 %{__ln_s} -f -T /var/log/%{name} %{buildroot}/opt/%{name}/var/log/%{name}
 
 %post
 %{__chown} -R couchdb:couchdb /opt/%{name}
 %{__chmod} a+x /opt/%{name}/bin/*
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?is_opensuse}
 %systemd_post %{name}.service
 %else
 /sbin/chkconfig --add %{name} || :
 %endif
 
 %preun
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?is_opensuse}
 %systemd_preun %{name}.service
 %else
 # stop couchdb only when uninstalling
@@ -133,7 +164,7 @@ killall -u couchdb epmd
 %endif
 
 %postun
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?is_opensuse}
 %systemd_postun_with_restart %{name}.service
 %else
 # restart couchdb only when upgrading
@@ -144,11 +175,15 @@ fi
 
 %files
 %attr(0755, %{name}, %{name}) /opt/couchdb
+%if 0%{?is_opensuse}
+%attr(0755, %{name}, %{name}) %dir %{_localstatedir}/lib/%{name}
+%else
 %attr(0755, %{name}, %{name}) %dir %{_sharedstatedir}/%{name}
+%endif
 %attr(0755, %{name}, %{name}) %dir /var/log/%{name}
 %config(noreplace) /opt/couchdb/etc/local.ini
 %config /etc/logrotate.d/%{name}
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?is_opensuse}
 %{_unitdir}/%{name}.service
 %else
 %{_initrddir}/%{name}
@@ -156,6 +191,8 @@ fi
 
 
 %changelog
+* Mon Dec 25 2017 Rolf Niepraschk <[email protected]>
+- Changes for openSUSE
 * Tue May 2 2017 CouchDB Developers <[email protected]> 2.0.0-1
 - New upstream version
 - New sysvinit and systemd service files

The detail for rpm creation:

cd couchdb-pkg/
patch -p 1 < opensuse-rpm.patch
URL=https://www.apache.org/dist/couchdb/source/2.1.1/apache-couchdb-2.1.1.tar.gz \
  make download-couch opensuse

After compiling:

systemctl --system daemon-reload
systemctl enable couchdb.service
systemctl start couchdb.service

I tested the couchDB installation successfully on "Tumbleweed" (version "20171222") and "Leap 42.3".

It would be nice if my patches can be included in the project. Providing rpm's for openSUSE in the future would also be helpful.

Initscript (Ubuntu/debian) does not stop process

Expected Behavior

Running /etc/init.d/couchdb stop should stop couchdb process.

Current Behavior

running /etc/init.d/couchdb stop does not stop couchdb. If I remove the --quiet option in the stop/start script, I get No process in pidfile '14888' found running; none killed

Your Environment

  • Version used: 2.1.1
  • Browser Name and version:
  • Operating System and version (desktop or mobile): Ubuntu 14.10
  • Link to your project:

CouchDB failed to replicate over TLS due to outdated Erlang SSL version in package

Expected Behavior

A CouchDB installed via the apache repo can connect to https://replicate.npmjs.com/registry during replication

Current Behavior

CouchDB fails with Bad Record MAC due to bug in ssl module in Erlang < 21.2

We highly suspect this is the same bug as https://www.erlang.org/patches/otp-21.2.1#ssl-9.1.1
The bug in ssl module is fixed in Erlang OTP 21.2.1 and ssl-9.1.1.

But the packages erlang in this repo is still 20.3.8.25-1 with ssl-8.2.6.4
https://github.com/apache/couchdb-pkg/blob/main/.travis.yml#L15

Possible Solution

Update the packaged version of Erlang to 21+ or find a way to bump only the SSL module version.

Steps to Reproduce (for bugs)

  1. Run couchdb via docker
docker run -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -ti --rm couchdb:3.2.1
  1. Create registry db
curl -XPUT http://admin:password@localhost:5984/registry
  1. Setup replication from npm
curl -XPUT http://admin:password@localhost:5984/_replicator/npm-mirror -d '{"source":"https://replicate.npmjs.com/registry", "target":"http://admin:password@localhost:5984/registry", "continuous":true, "create_target": true, "user_ctx": {"name": "admin", "roles": ["_admin"]}}' -H "Content-Type: application/json"
  1. Observe log
TLS client: In state cipher received SERVER ALERT: Fatal - Bad Record MAC

Context

We are using CouchDB Docker image from https://github.com/apache/couchdb-docker to setup an npm registry mirror for internal use.

Suggested Quick Start method fails on multiple architectures

  • Firstly, the mozjs package for Ubuntu does not match the currently referenced one in the source
  • Secondly, there are issues with some of the included header files

couchdb [master]$ ./configure -c

==> configuring couchdb in rel/couchdb.config
==> updating dependencies
==> config (get-deps)
==> b64url (get-deps)
==> ets_lru (get-deps)
==> khash (get-deps)
==> snappy (get-deps)
==> ioq (get-deps)
==> bear (get-deps)
==> meck (get-deps)
==> folsom (get-deps)
==> triq (get-deps)
==> hyper (get-deps)
==> ibrowse (get-deps)
==> jiffy (get-deps)
==> mochiweb (get-deps)
==> bcrypt (get-deps)
==> couch_epi (get-deps)
==> couch_log (get-deps)
==> chttpd (get-deps)
==> couch (get-deps)
==> couch_index (get-deps)
==> couch_mrview (get-deps)
==> couch_replicator (get-deps)
==> couch_plugins (get-deps)
==> couch_event (get-deps)
==> couch_stats (get-deps)
==> couch_peruser (get-deps)
==> couch_tests (get-deps)
==> ddoc_cache (get-deps)
==> fabric (get-deps)
==> global_changes (get-deps)
==> mango (get-deps)
==> mem3 (get-deps)
==> rexi (get-deps)
==> setup (get-deps)
==> rel (get-deps)
==> couchdb (get-deps)
==> couchdb (update-deps)
Updating config from {git,"https://github.com/apache/couchdb-config.git",
                          {tag,"1.0.3"}}
Updating b64url from {git,"https://github.com/apache/couchdb-b64url.git",
                          {tag,"1.0.1"}}
Updating ets_lru from {git,"https://github.com/apache/couchdb-ets-lru.git",
                           {tag,"1.0.0"}}
Updating khash from {git,"https://github.com/apache/couchdb-khash.git",
                         {tag,"1.0.1"}}
Updating snappy from {git,"https://github.com/apache/couchdb-snappy.git",
                          {tag,"CouchDB-1.0.1"}}
Updating ioq from {git,"https://github.com/apache/couchdb-ioq.git",
                       {tag,"1.0.1"}}
Updating docs from {git,"https://github.com/apache/couchdb-documentation",
                        {tag,"2.1.0"}}
Updating fauxton from {git,"https://github.com/apache/couchdb-fauxton",
                           {tag,"v1.1.15"}}
Updating folsom from {git,"https://github.com/apache/couchdb-folsom.git",
                          {tag,"CouchDB-0.8.2"}}
Updating hyper from {git,"https://github.com/apache/couchdb-hyper.git",
                         {tag,"CouchDB-2.2.0-3"}}
Updating ibrowse from {git,"https://github.com/apache/couchdb-ibrowse.git",
                           {tag,"CouchDB-4.0.1"}}
Updating jiffy from {git,"https://github.com/apache/couchdb-jiffy.git",
                         {tag,"CouchDB-0.14.11-2"}}
Updating mochiweb from {git,"https://github.com/apache/couchdb-mochiweb.git",
                            {tag,"v2.17.0"}}
Updating meck from {git,"https://github.com/apache/couchdb-meck.git",
                        {tag,"0.8.8"}}
Updating bcrypt from {git,"https://github.com/apache/couchdb-erlang-bcrypt",
                          {tag,"1.0.2"}}
Updating triq from {git,"https://github.com/apache/couchdb-triq.git",
                        {tag,"v1.2.0"}}
Updating bear from {git,"https://github.com/apache/couchdb-bear.git",
                        "008f48aff819126e281d5ccae80a258bf9bf9c30"}
You have configured Apache CouchDB, time to relax. Relax.

couchdb [master]$ cd ../couchdb-pkg/

couchdb-pkg [master]$ make build-couch $(lsb_release -cs) PLATFORM=$(lsb_release -cs)

cd ../couchdb && make dist
make[1]: Entering directory '/home/lee/projects/linaro/docker-hub/couchdb'
==> config (compile)
==> b64url (compile)
==> ets_lru (compile)
==> khash (compile)
==> snappy (compile)
==> ioq (compile)
==> bear (compile)
==> meck (compile)
==> folsom (compile)
==> triq (compile)
==> hyper (compile)
==> ibrowse (compile)
==> jiffy (compile)
==> mochiweb (compile)
==> bcrypt (compile)
make[2]: Entering directory '/home/lee/projects/linaro/docker-hub/couchdb/src/bcrypt/c_src'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/lee/projects/linaro/docker-hub/couchdb/src/bcrypt/c_src'
==> couch_epi (compile)
==> couch_log (compile)
==> chttpd (compile)
==> couch (compile)
Compiling /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c
/home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c:18:10: fatal error: jsapi.h: No such file or directory
 #include <jsapi.h>
          ^~~~~~~~~
compilation terminated.
ERROR: compile failed while processing /home/lee/projects/linaro/docker-hub/couchdb/src/couch: rebar_abort
Makefile:81: recipe for target 'couch' failed
make[1]: *** [couch] Error 1
make[1]: Leaving directory '/home/lee/projects/linaro/docker-hub/couchdb'
Makefile:87: recipe for target 'build-couch' failed
make: *** [build-couch] Error 2

couchdb-pkg [master]$ sudo apt install libmozjs-52-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libmozjs-52-dev is already the newest version (52.8.1-0ubuntu0.18.04.1).
The following packages were automatically installed and are no longer required:
  extlinux libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-system1.62.0
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 220 not to upgrade.

couchdb-pkg [master]$ cemacs ../couchdb/src/couch/rebar.config.script

couchdb-pkg [master]$ git diff

diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script
index 498ce3a82..f95c610c0 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/rebar.config.script
@@ -102,8 +102,8 @@ CompareSrc = ["priv/couch_ejson_compare/*.c"],
 
 BaseSpecs = [
         %% couchjs
-        {"darwin", CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", JS_CFLAGS ++ " -DXP_UNIX -I/usr/local/include/js"}, {"LDFLAGS", JS_LDFLAGS ++ " -L/usr/local/lib"}]}]},
-        {"linux",  CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", JS_CFLAGS ++ " -DXP_UNIX -I/usr/include/js"}, {"LDFLAGS", JS_LDFLAGS ++ " -lm"}]}]},
+        {"darwin", CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", JS_CFLAGS ++ " -DXP_UNIX -I/usr/local/include/"}, {"LDFLAGS", JS_LDFLAGS ++ " -L/usr/local/lib"}]}]},
+        {"linux",  CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", JS_CFLAGS ++ " -DXP_UNIX -I/usr/include/mozjs-52"}, {"LDFLAGS", JS_LDFLAGS ++ " -lm"}]}]},
         {"bsd",   CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", JS_CFLAGS ++ " -DXP_UNIX -I/usr/local/include/js"}, {"LDFLAGS", JS_LDFLAGS ++ " -L/usr/local/lib -lm"}]}]},
         {"win32",  CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", JS_CFLAGS ++ " /DXP_WIN /IC:\\relax\\js-1.8.5\\js\\src"}, {"LDFLAGS", JS_LDFLAGS}]}]},
         % ICU

lee@dell:~/projects/linaro/docker-hub/couchdb-pkg [master]$ make build-couch $(lsb_release -cs) PLATFORM=$(lsb_release -cs)

cd ../couchdb && make dist
make[1]: Entering directory '/home/lee/projects/linaro/docker-hub/couchdb'
==> config (compile)
==> b64url (compile)
==> ets_lru (compile)
==> khash (compile)
==> snappy (compile)
==> ioq (compile)
==> bear (compile)
==> meck (compile)
==> folsom (compile)
==> triq (compile)
==> hyper (compile)
==> ibrowse (compile)
==> jiffy (compile)
==> mochiweb (compile)
==> bcrypt (compile)
make[2]: Entering directory '/home/lee/projects/linaro/docker-hub/couchdb/src/bcrypt/c_src'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/lee/projects/linaro/docker-hub/couchdb/src/bcrypt/c_src'
==> couch_epi (compile)
==> couch_log (compile)
==> chttpd (compile)
==> couch (compile)
Compiling /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c
In file included from /usr/include/mozjs-52/mozilla/Move.h:12:0,
                 from /usr/include/mozjs-52/mozilla/AlreadyAddRefed.h:14,
                 from /usr/include/mozjs-52/jsapi.h:12,
                 from /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c:18:
/usr/include/mozjs-52/mozilla/TypeTraits.h:22:1: error: unknown type name ‘namespace’
 namespace mozilla {
 ^~~~~~~~~
/usr/include/mozjs-52/mozilla/TypeTraits.h:22:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
 namespace mozilla {
                   ^
In file included from /usr/include/mozjs-52/mozilla/AlreadyAddRefed.h:14:0,
                 from /usr/include/mozjs-52/jsapi.h:12,
                 from /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c:18:
/usr/include/mozjs-52/mozilla/Move.h:14:1: error: unknown type name ‘namespace’
 namespace mozilla {
 ^~~~~~~~~
/usr/include/mozjs-52/mozilla/Move.h:14:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
 namespace mozilla {
                   ^
In file included from /usr/include/mozjs-52/jsapi.h:12:0,
                 from /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c:18:
/usr/include/mozjs-52/mozilla/AlreadyAddRefed.h:16:1: error: unknown type name ‘namespace’
 namespace mozilla {
 ^~~~~~~~~
/usr/include/mozjs-52/mozilla/AlreadyAddRefed.h:16:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
 namespace mozilla {
                   ^
/usr/include/mozjs-52/mozilla/AlreadyAddRefed.h:31:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
 template<class T>
         ^
In file included from /usr/include/mozjs-52/mozilla/FloatingPoint.h:14:0,
                 from /usr/include/mozjs-52/jsapi.h:13,
                 from /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c:18:
/usr/include/mozjs-52/mozilla/Casting.h:17:1: error: unknown type name ‘namespace’
 namespace mozilla {
 ^~~~~~~~~
/usr/include/mozjs-52/mozilla/Casting.h:17:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
 namespace mozilla {
                   ^
In file included from /usr/include/mozjs-52/mozilla/FloatingPoint.h:15:0,
                 from /usr/include/mozjs-52/jsapi.h:13,
                 from /home/lee/projects/linaro/docker-hub/couchdb/src/couch/priv/couch_js/http.c:18:
/usr/include/mozjs-52/mozilla/MathAlgorithms.h:15:10: fatal error: cmath: No such file or directory
 #include <cmath>
          ^~~~~~~
compilation terminated.
ERROR: compile failed while processing /home/lee/projects/linaro/docker-hub/couchdb/src/couch: rebar_abort
Makefile:81: recipe for target 'couch' failed
make[1]: *** [couch] Error 1
make[1]: Leaving directory '/home/lee/projects/linaro/docker-hub/couchdb'
Makefile:87: recipe for target 'build-couch' failed
make: *** [build-couch] Error 2

HTTP GET request to http://127.0.0.1:15984/_utils/ returns 404

A snap refresh over the last 48 hours caused Fauxton to fall over again.

HTTP GET request to http://127.0.0.1:15984/_utils/ returns 404

This is a duplicate of issue raised in CouchDB

apache/couchdb#3333

I'm raising it here with an alternative solution to the snap packaging.

Current Behavior

Occasionally, something in the snap process seems to corrupt the working path of Erlang and Fauxton html assets can not be loaded.

CouchDB otherwise works fine as DB files are absolute path in the local.ini.

curl -I http://127.0.0.1:15984/_utils/
HTTP/1.1 404 Object Not Found

Possible Solution

A now tested solution is to fixed --prefix when running ./configure this removed the relative path from CouchDB.

Password prompt during install references the admin party, which is over

I'm brand new to couchdb, and got really confused by the language and behavior of the interactive config screen for the password.

Expected Behavior

When installing couchdb 3.0 or greater, the configuration screen that prompts for a password should

  • Either not mention admin party mode, or explicitly state that it is not available anymore
  • Require the user to enter a non-blank password to proceed interactively with the installation.

Current Behavior

When installing couchdb 3.x, the config screen tells the user that not configuring an admin account is a valid configuration state called "admin party mode," and allows them to configure it improperly --- by entering a blank password.

My Environment

Ubuntu 20, couchdb v3.3.3

deb https://apache.jfrog.io/artifactory/couchdb-deb/ focal main

Can't create views on Ubuntu 17.10

I have done a snap install of couchdb 2.0.0 (sudo snap install couchdb). After installation, the verify fails on the "Create View" step saying "OS process timed out". I cannot create any view document in any test database too.

I have read "Can't create views on Ubuntu #6" and executed the following commands and still cannot resolve the problem.

sudo service apparmor stop
sudo update-rc.d -f apparmor remove
sudo apt-get remove apparmor apparmor-utils
sudo apt-get install snapd

Expected Behavior

Verify should complete successfully and I should be able to create view.

Current Behavior

image

Possible Solution

Steps to Reproduce (for bugs)

1.sudo snap install couchdb
2.sudo service apparmor stop
3.sudo update-rc.d -f apparmor remove
4.sudo apt-get remove apparmor apparmor-utils
5.sudo apt-get install snapd
6.sudo snap remove couchdb
7.sudo snap install couchdb

Context

Your Environment

  • Version used: Fauxton on Apache CouchDB v. 2.0.0
  • Browser Name and version: Google Chrome Version 63.0.3239.84 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile):Ubuntu 17.10
  • Link to your project:

Unattended installation appears to ignore nodename setting

I am trying to do an unattended installation of couchdb. I have set the node name debconf value in my cloud init:

- echo "couchdb couchdb/nodename string couchdb@couchdb-1-2" | debconf-set-selections

and confirmed it was set.

Expected Behavior

The couchdb installation vm.args file will specify the node name couchdb@couchdb-1-2

Current Behavior

The couchdb installation vm.args file will specify the node name [email protected]

Possible Solution

No idea. I'm deeply out of my element here :)

Context

This issue is my most likely candidate for the reason I am unable to configure a cluster based on what I have read.

I'm running the following commands from the coordination node. (i'll throw the pwd away)

ssh -t [email protected] "curl -X POST -H \"Content-Type: application/json\" http://127.0.0.1:5984/_cluster_setup -d '{\"action\": \"enable_cluster\", \"bind_address\":\"0.0.0.0\", \"username\": \"admin\", \"password\":\"6zlYkUJnDO7S\", \"node_count\":\"3\", \"singlenode\": false }'"
ssh -t [email protected] "curl -X POST -H \"Content-Type: application/json\" http://127.0.0.1:5984/_cluster_setup -d '{\"action\": \"enable_cluster\", \"bind_address\":\"0.0.0.0\", \"username\": \"admin\", \"password\":\"6zlYkUJnDO7S\", \"node_count\":\"3\", \"singlenode\": false }'"

curl -X POST -H "Content-Type: application/json" http://admin:[email protected]:5984/_cluster_setup -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "admin", "password":"6zlYkUJnDO7S", "port": 5984, "node_count": "3", "remote_node": "10.0.1.11", "remote_current_user": "admin", "remote_current_password": "6zlYkUJnDO7S" }'
curl -X POST -H "Content-Type: application/json" http://admin:[email protected]:5984/_cluster_setup -d '{"action": "add_node", "host":"10.0.1.11", "port": 5984, "username": "admin", "password":"6zlYkUJnDO7S"}'

curl -X POST -H "Content-Type: application/json" http://admin:[email protected]:5984/_cluster_setup -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "admin", "password":"6zlYkUJnDO7S", "port": 5984, "node_count": "3", "remote_node": "10.0.1.12", "remote_current_user": "admin", "remote_current_password": "6zlYkUJnDO7S" }'
curl -X POST -H "Content-Type: application/json" http://admin:[email protected]:5984/_cluster_setup -d '{"action": "add_node", "host":"10.0.1.12", "port": 5984, "username": "admin", "password":"6zlYkUJnDO7S"}'

curl -X POST -H "Content-Type: application/json" http://admin:[email protected]:5984/_cluster_setup -d '{"action": "finish_cluster"}'

At which point if i try and create a database I get a 500 and the database is created anyway. (Which appears to be apache/couchdb#603). The database doesn't appear on the other nodes and the other nodes all report themselves as being the only member of their cluster.

Your Environment

I'm deploying to azure ubuntu server vms'.

cloud-init

#cloud-config
apt_update: true
apt_upgrade: true
disk_setup:
    /dev/sdc:
         table_type: 'gpt'
         layout: true
         overwrite: false
fs_setup:
    - label: None
      filesystem: ext4
      device: /dev/sdc1
      partition: 'auto'
mounts:
- [/dev/sdc1, /var/lib/couchdb,"auto","defaults,nofail", "0", "0"]
runcmd:
 - echo "deb https://apache.bintray.com/couchdb-deb xenial main" | tee -a /etc/apt/sources.list
 - curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | apt-key add -
 - apt-get update
# - COUCHDB_PASSWORD=6zlYkUJnDO7S
 - echo "couchdb couchdb/mode select standalone" | debconf-set-selections
 - echo "couchdb couchdb/mode seen true" | debconf-set-selections
 - echo "couchdb couchdb/nodename string couchdb@couchdb-1-1" | debconf-set-selections
 - echo "couchdb couchdb/nodename seen true" | debconf-set-selections
 - echo "couchdb couchdb/cookie string 8bea6c29be97492ba1923a9687c034fc" | debconf-set-selections
 - echo "couchdb couchdb/cookie seen true" | debconf-set-selections
 - echo "couchdb couchdb/bindaddress string 0.0.0.0" | debconf-set-selections
 - echo "couchdb couchdb/bindaddress seen true" | debconf-set-selections
 #- echo "couchdb couchdb/adminpass password ${COUCHDB_PASSWORD}" | debconf-set-selections
 #- echo "couchdb couchdb/adminpass_again password ${COUCHDB_PASSWORD}" | debconf-set-selections
 #- echo "couchdb couchdb/adminpass seen true" | debconf-set-selections
 #- echo "couchdb couchdb/adminpass_again seen true" | debconf-set-selections
 - DEBIAN_FRONTEND=noninteractive apt-get install -y couchdb

I stopped setting the admin details as it seems to leave me out of sync with the cluster setup instructions.

All nics on the subnet should be able to access any port on the same subnet.

direction                   = "Inbound"
  access                      = "Allow"
  protocol                    = "Tcp"
  destination_port_range      = "*"
  source_port_range           = "*"
  source_address_prefix       = "10.0.1.0/24"
  destination_address_prefix  = "*"

Snap package is not available in the Snap Store

Snap package is not available in the Snap Store.

Expected Behavior

Snap package should be available in the Snap Store, as described in the documentation.

Current Behavior

Snap Store screenshot

$ sudo snap install couchdb
error: snap "couchdb" not found

Possible Solution

Upload couchdb snap again.

Steps to Reproduce (for bugs)

  1. Go to https://snapcraft.io/search?category=&q=couchdb

OR

  1. Type in the terminal:
$ sudo snap install couchdb

Context

Installation through snap is the easiest way to run couchdb on some GNU/Linux distributions.

Your Environment

Irrelevant. This is not because of my environment.

Update packages for 3.0.0

  • remove dependency on Python (couchup is gone) and other python packages
  • debian buster: change dep for SM to 60
    • retain dependency on 1.8.5 for arm64

Latest snap update destroyed all databases

Expected Behavior

Snaps are updated automatically. One would expect that its data is preserved by the update operation.

Current Behavior

All databases were destroyed by the snap refresh operation during the night.

$ snap changes
Identifiant  État  Descendance          Prêt                 Résumé
116          Done  today at 05:21 CEST  today at 05:21 CEST  Actualiser automatiquement le paquet Snap "couchdb"

I'm unable to read the full log of operations, as snap logs couchdb -n=all stops after the first server shutdown. This might be an issue with snap itself.

Steps to Reproduce (for bugs)

I was unable to reproduce this bug, as previous snap versions are not listed.

Context

This bug triggered itself without any action due to the auto-refresh policy of snap.
This is not a critical problem for me, my data is safe thanks to replication. But I believe this is an important issue that might affect several people.

Your Environment

  • Version used: snap 2.3.1
  • Operating System and version: desktop Ubuntu 19.04

Can't create views on Ubuntu

I just installed CouchDB via snap on a fresh Ubuntu 17.04 VM. I tried to create views on a db with >5k documents which shouldn't be an issue but ran into a lot of timeouts.

After a while, I tried to create the view on an empty database which didn't work either, and finally ran the verification, says Views don't work.

This is the syslog:

Sep 12 16:45:26 bsr-couchdb kernel: [ 2503.848130] audit: type=1400 audit(1505234726.242:41): apparmor="DENIED" operation="capable" profile="snap.couchdb.server" pid=2160 comm="beam" capability=35  capname="wake_alarm"
Sep 12 16:45:26 bsr-couchdb kernel: [ 2504.508119] audit: type=1400 audit(1505234726.902:42): apparmor="DENIED" operation="exec" profile="snap.couchdb.server" name="/bin/df" pid=2216 comm="sh" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
Sep 12 16:46:12 bsr-couchdb kernel: [ 2550.225799] audit: type=1326 audit(1505234772.618:43): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=2234 comm="couchjs" exe="/snap/couchdb/1/rel/couchdb/bin/couchjs" sig=31 arch=c000003e syscall=141 compat=0 ip=0x7f43259cdd27 code=0x0
Sep 12 16:49:12 bsr-couchdb kernel: [ 2729.624138] audit: type=1326 audit(1505234952.018:44): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=2268 comm="couchjs" exe="/snap/couchdb/1/rel/couchdb/bin/couchjs" sig=31 arch=c000003e syscall=141 compat=0 ip=0x7f877badfd27 code=0x0

Expected Behavior

Views should be created.

Current Behavior

screen shot 2017-09-12 at 18 40 15

Steps to Reproduce (for bugs)

  1. sudo snap install couchdb
  2. Setup single-node system
  3. Verify

Context

Can't use CouchDB without views.

Your Environment

  • Version used: 2.0.0
  • Operating System and version (desktop or mobile): Ubuntu 17.04

Couchdb Snap package stuck at couchdb 3.1.1

Expected Behavior

Installing couchdb through snap packages following instructions at https://docs.couchdb.org/en/stable/install/snap.html install latest couchdb version (currently 3.3.2)

Current Behavior

Current latest snap package install CouchDB 3.1.1 and has not been updated in https://snapcraft.io/couchdb for two and a half years

Possible Solution

Build and publish updated snap package for couchdb 3.3.2

Steps to Reproduce (for bugs)

  1. starting from a fresh Debian 12 system
  2. apt install snapd
  3. snap install core
  4. snap install couchdb
  5. snap set couchdb admin=StrongAdminPassw0rd
  6. snap start couchdb
  7. curl http://127.0.0.1:5984/ {"couchdb":"Welcome","version":"3.2.1","git_sha":"244d428af","uuid":"f7b83554fa2eb43778963d18a1f92211","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}

Context

I was trying to install couchdb as a snap package on Debian 12 as there is currently no deb package for this version.

Your Environment

Debian 12, trying to install CouchDB 3.3.2

Add support for Debian 10 (buster)

Should be straightforward. Same approach as #8 , but the automation scripting needs to be updated.

Also need support over in apache/couchdb-ci.

Create RPMs for Nouveau and extend CouchDB RPM to optionally include Nouveau

The next version of CouchDB (3.4.0) will include a new component for full text search called Nouveau. Nouveau is a Java project that integrates with the rest of CouchDB which is written in Erlang.

We’d like the following scenarios to be handled:

  • A user installs the regular Apache-CouchDB-3.4.0.rpm (the real name might be different) via yum install couchdb. They are not interested in Nouveau, so nothing changes for them. However, Nouveau binaries are installed on the system (this is partially already handled: https://github.com/apache/couchdb-pkg/blob/main/rpm/SPECS/couchdb.spec.in#L99-L103)
    • Same as before, but user IS interested in Nouveau, they can run yum install couchdb-nouveau on the same server and get Apache-CouchDB-Nouveau-3.4.0.rpm installed on the same system and now the following happens:
      • the installation of Nouveau creates a new config file in the CouchDB conf.d dir at /opt/couchdb/etc/local.d/nouveau.ini
      • the installation calls the /_node/_local/_config/_reload endpoint to activate the new config file, or prompts to restart CouchDB, or directly restarts CouchDB.
  • A user wants to run Nouveau on a separate server, so the Apache-CouchDB-Nouveau-3.4.0.rpm installation should not try to augment the local.d config dir and reload CouchDB config, as it has no access to it.

We have this working for the Debian packages, look there for inspiration: https://github.com/apache/couchdb-pkg/tree/main/debian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.