summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Girol <symphorien@users.noreply.github.com>2022-05-01 19:31:23 +0000
committerGitHub <noreply@github.com>2022-05-01 19:31:23 +0000
commitff1867232d6852344e0a26cdf17aa76d67eb1c1c (patch)
treecb18511b5b978626c806f5110e8bc9ae38dc92d9
parentimagemagick: 7.1.0-31 -> 7.1.0-32 (diff)
parentcouchdb3: 3.2.1 -> 3.2.2 (diff)
downloadnixpkgs-ff1867232d6852344e0a26cdf17aa76d67eb1c1c.tar.gz
Merge pull request #170999 from lostnet/backport-170393-to-release-21.11
[Backport release-21.11] couchdb3: 3.2.1 -> 3.2.2
-rw-r--r--nixos/modules/services/databases/couchdb.nix6
-rw-r--r--pkgs/servers/http/couchdb/3.nix12
2 files changed, 12 insertions, 6 deletions
diff --git a/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index 16dd64f2373e..391dceb5bdb3 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/nixos/modules/services/databases/couchdb.nix
@@ -183,6 +183,11 @@ in {
preStart = ''
touch ${cfg.configFile}
+ if ! test -e ${cfg.databaseDir}/.erlang.cookie; then
+ touch ${cfg.databaseDir}/.erlang.cookie
+ chmod 600 ${cfg.databaseDir}/.erlang.cookie
+ dd if=/dev/random bs=16 count=1 | base64 > ${cfg.databaseDir}/.erlang.cookie
+ fi
'';
environment = {
@@ -192,6 +197,7 @@ in {
# 3. the extraConfig from the module options
# 4. the locally writable config file, which couchdb itself writes to
ERL_FLAGS= ''-couch_ini ${cfg.package}/etc/default.ini ${configFile} ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} ${cfg.configFile}'';
+ HOME =''${cfg.databaseDir}'';
};
serviceConfig = {
diff --git a/pkgs/servers/http/couchdb/3.nix b/pkgs/servers/http/couchdb/3.nix
index 076edfb8453a..7f02d5fb858c 100644
--- a/pkgs/servers/http/couchdb/3.nix
+++ b/pkgs/servers/http/couchdb/3.nix
@@ -1,26 +1,26 @@
-{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_78
+{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_91
, coreutils, bash, makeWrapper, python3, nixosTests }:
stdenv.mkDerivation rec {
pname = "couchdb";
- version = "3.2.1";
+ version = "3.2.2";
# when updating this, please consider bumping the erlang/OTP version
# in all-packages.nix
src = fetchurl {
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
- sha256 = "1y5cfic88drlr9qiwyj2p8xc9m9hcbvw77j5lwbp0cav78f2vphi";
+ sha256 = "sha256-acn9b4ATNVf2igLpLdpypP1kbWRvQp9Fu4Mpow+C8g4=";
};
- buildInputs = [ erlang icu openssl spidermonkey_78 (python3.withPackages(ps: with ps; [ requests ]))];
+ buildInputs = [ erlang icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))];
postPatch = ''
- substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-78' "${spidermonkey_78.dev}/include/mozjs-78"
+ substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91"
patchShebangs bin/rebar
'';
dontAddPrefix= "True";
- configureFlags = ["--spidermonkey-version=78"];
+ configureFlags = ["--spidermonkey-version=91"];
buildFlags = ["release"];
installPhase = ''