Merge pull request #117094 from helsinki-systems/drop/spidermonkey_1_8_5

spidermonkey_1_8_5: drop
master
ajs124 2021-05-07 18:55:49 +02:00 committed by GitHub
commit cd609e7a1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 297 deletions

View File

@ -4,24 +4,17 @@ with lib;
let
cfg = config.services.couchdb;
useVersion2 = strings.versionAtLeast (strings.getVersion cfg.package) "2.0";
configFile = pkgs.writeText "couchdb.ini" (
''
[couchdb]
database_dir = ${cfg.databaseDir}
uri_file = ${cfg.uriFile}
view_index_dir = ${cfg.viewIndexDir}
'' + (if cfg.adminPass != null then
''
'' + (optionalString (cfg.adminPass != null) ''
[admins]
${cfg.adminUser} = ${cfg.adminPass}
'' else
"") + (if useVersion2 then
''
'' + ''
[chttpd]
'' else
''
[httpd]
'') +
''
port = ${toString cfg.port}
@ -30,8 +23,7 @@ let
[log]
file = ${cfg.logFile}
'');
executable = if useVersion2 then "${cfg.package}/bin/couchdb"
else ''${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} -a ${cfg.configFile}'';
executable = "${cfg.package}/bin/couchdb";
in {
@ -177,8 +169,7 @@ in {
environment.systemPackages = [ cfg.package ];
services.couchdb.configFile = mkDefault
(if useVersion2 then "/var/lib/couchdb/local.ini" else "/var/lib/couchdb/couchdb.ini");
services.couchdb.configFile = mkDefault "/var/lib/couchdb/local.ini";
systemd.tmpfiles.rules = [
"d '${dirOf cfg.uriFile}' - ${cfg.user} ${cfg.group} - -"
@ -195,7 +186,7 @@ in {
touch ${cfg.configFile}
'';
environment = mkIf useVersion2 {
environment = {
# we are actually specifying 4 configuration files:
# 1. the preinstalled default.ini
# 2. the module configuration

View File

@ -24,8 +24,6 @@ with lib;
};
nodes = {
couchdb1 = makeNode pkgs.couchdb testuser testpass;
couchdb2 = makeNode pkgs.couchdb2 testuser testpass;
couchdb3 = makeNode pkgs.couchdb3 testuser testpass;
};
@ -41,42 +39,6 @@ with lib;
in ''
start_all()
couchdb1.wait_for_unit("couchdb.service")
couchdb1.wait_until_succeeds(
"${curlJqCheck "" "GET" "" ".couchdb" "Welcome"}"
)
couchdb1.wait_until_succeeds(
"${curlJqCheck "" "GET" "_all_dbs" ". | length" "2"}"
)
couchdb1.succeed("${curlJqCheck testlogin "PUT" "foo" ".ok" "true"}")
couchdb1.succeed(
"${curlJqCheck "" "GET" "_all_dbs" ". | length" "3"}"
)
couchdb1.succeed(
"${curlJqCheck testlogin "DELETE" "foo" ".ok" "true"}"
)
couchdb1.succeed(
"${curlJqCheck "" "GET" "_all_dbs" ". | length" "2"}"
)
couchdb2.wait_for_unit("couchdb.service")
couchdb2.wait_until_succeeds(
"${curlJqCheck "" "GET" "" ".couchdb" "Welcome"}"
)
couchdb2.wait_until_succeeds(
"${curlJqCheck "" "GET" "_all_dbs" ". | length" "0"}"
)
couchdb2.succeed("${curlJqCheck testlogin "PUT" "foo" ".ok" "true"}")
couchdb2.succeed(
"${curlJqCheck "" "GET" "_all_dbs" ". | length" "1"}"
)
couchdb2.succeed(
"${curlJqCheck testlogin "DELETE" "foo" ".ok" "true"}"
)
couchdb2.succeed(
"${curlJqCheck "" "GET" "_all_dbs" ". | length" "0"}"
)
couchdb3.wait_for_unit("couchdb.service")
couchdb3.wait_until_succeeds(
"${curlJqCheck testlogin "GET" "" ".couchdb" "Welcome"}"

View File

@ -1,79 +0,0 @@
{ stdenv, lib, autoconf213, fetchurl, fetchpatch, pkg-config, nspr, perl, python2, zip }:
stdenv.mkDerivation {
pname = "spidermonkey";
version = "1.8.5";
src = fetchurl {
url = "mirror://mozilla/js/js185-1.0.0.tar.gz";
sha256 = "5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687";
};
propagatedBuildInputs = [ nspr ];
nativeBuildInputs = [ pkg-config ] ++ lib.optional stdenv.isAarch32 autoconf213;
buildInputs = [ perl python2 zip ];
postUnpack = "sourceRoot=\${sourceRoot}/js/src";
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr"
export LIBXUL_DIST=$out
${lib.optionalString stdenv.isAarch32 "autoreconf --verbose --force"}
'';
patches = [
(fetchpatch {
name = "gcc6.patch";
url = "https://sources.debian.org/data/main/m/mozjs/1.8.5-1.0.0+dfsg-6/debian/patches/fix-811665.patch";
sha256 = "1q8477xqxiy5d8376k5902l45gd0qkd4nxmhl8vr6rr1pxfcny99";
})
] ++ lib.optionals stdenv.isAarch32 [
# Explained below in configureFlags for ARM
./1.8.5-findvanilla.patch
# Fix for hard float flags.
./1.8.5-arm-flags.patch
];
patchFlags = [ "-p3" ];
# fixes build on gcc8
postPatch = ''
substituteInPlace ./methodjit/MethodJIT.cpp \
--replace 'asm volatile' 'asm'
'';
# On the Sheevaplug, ARM, its nanojit thing segfaults in japi-tests in
# "make check". Disabling tracejit makes it work, but then it needs the
# patch findvanilla.patch do disable a checker about allocator safety. In case
# of polkit, which is what matters most, it does not override the allocator
# so the failure of that test does not matter much.
configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [
"--with-cpu-arch=armv5t"
"--disable-tracejit" ];
# hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393
preBuild = ''
touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}
${if stdenv.isAarch32 then "rm -r jit-test/tests/jaeger/bug563000" else ""}
'';
enableParallelBuilding = true;
doCheck = true;
preCheck = ''
rm jit-test/tests/sunspider/check-date-format-tofte.js # https://bugzil.la/600522
'';
meta = with lib; {
description = "Mozilla's JavaScript engine written in C/C++";
homepage = "https://developer.mozilla.org/en/SpiderMonkey";
# TODO: MPL/GPL/LGPL tri-license.
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
broken = stdenv.isAarch64; # 2018-08-21, broken since 2017-03-08
};
}

View File

@ -1,57 +0,0 @@
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5
, coreutils, bash, makeWrapper, python3 }:
stdenv.mkDerivation rec {
pname = "couchdb";
version = "2.3.1";
# when updating this, please consider bumping the OTP version
# in all-packages.nix
src = fetchurl {
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
sha256 = "0z926hjqyhxhyr65kqxwpmp80nyfqbig6d9dy8dqflpb87n8rss3";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ erlang icu openssl spidermonkey_1_8_5 (python3.withPackages(ps: with ps; [ requests ]))];
patches = [ ./jsapi.patch ];
postPatch = ''
substituteInPlace src/couch/rebar.config.script --replace '-DHAVE_CURL -I/usr/local/include' "-DHAVE_CURL -I/usr/local/include $NIX_CFLAGS_COMPILE"
patch bin/rebar <<EOF
1c1
< #!/usr/bin/env escript
---
> #!${coreutils}/bin/env escript
EOF
'';
# Configure a username. The build system would use "couchdb" as
# default if none is provided. Note that it is unclear where this
# username is actually used in the build, as any choice seems to be
# working.
configurePhase = ''
./configure -u nobody
'';
buildPhase = ''
make release
'';
installPhase = ''
mkdir -p $out
cp -r rel/couchdb/* $out
wrapProgram $out/bin/couchdb --suffix PATH : ${bash}/bin
'';
meta = with lib; {
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
homepage = "http://couchdb.apache.org";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ ];
};
}

View File

@ -1,39 +0,0 @@
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5, curl, help2man
, sphinx, which, file, pkg-config, getopt }:
stdenv.mkDerivation rec {
pname = "couchdb";
version = "1.7.1";
src = fetchurl {
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
sha256 = "1b9cbdrmh1i71mrwvhm17v4cf7lckpil1vvq7lpmxyn6zfk0l84i";
};
nativeBuildInputs = [ help2man which file pkg-config sphinx ];
buildInputs = [ erlang icu openssl spidermonkey_1_8_5 curl ];
postInstall = ''
substituteInPlace $out/bin/couchdb --replace getopt "${getopt}/bin/getopt"
'';
/*
Versions of SpiderMonkey after the js185-1.0.0 release remove the optional
enforcement of preventing anonymous functions in a statement context. This
will most likely break your existing JavaScript code as well as render all
example code invalid.
If you wish to ignore this error pass --enable-js-trunk to ./configure.
*/
configureFlags = [
"--enable-js-trunk"
];
meta = with lib; {
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
homepage = "http://couchdb.apache.org";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ ];
};
}

View File

@ -1,60 +0,0 @@
diff -ru couch_js/http.c couch_js-patched/http.c
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c 2016-09-12 11:28:51.000000000 +0200
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/http.c 2017-02-10 10:52:33.025854045 +0100
@@ -15,7 +15,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <jsapi.h>
+#include <js/jsapi.h>
#include "config.h"
#include "utf8.h"
#include "util.h"
diff -ru couch_js/main.c couch_js-patched/main.c
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/main.c 2016-09-12 11:28:51.000000000 +0200
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/main.c 2017-02-10 10:52:33.001854154 +0100
@@ -20,7 +20,7 @@
#include <unistd.h>
#endif
-#include <jsapi.h>
+#include <js/jsapi.h>
#include "config.h"
#include "http.h"
#include "utf8.h"
diff -ru couch_js/utf8.c couch_js-patched/utf8.c
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/utf8.c 2016-09-12 11:28:51.000000000 +0200
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/utf8.c 2017-02-10 10:52:33.009854117 +0100
@@ -10,7 +10,7 @@
// License for the specific language governing permissions and limitations under
// the License.
-#include <jsapi.h>
+#include <js/jsapi.h>
#include "config.h"
static int
diff -ru couch_js/util.c couch_js-patched/util.c
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.c 2016-09-12 11:28:51.000000000 +0200
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.c 2017-02-10 10:52:33.017854081 +0100
@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <string.h>
-#include <jsapi.h>
+#include <js/jsapi.h>
#include "help.h"
#include "util.h"
diff -ru couch_js/util.h couch_js-patched/util.h
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.h 2016-09-12 11:28:51.000000000 +0200
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.h 2017-02-10 10:52:32.988854212 +0100
@@ -13,7 +13,7 @@
#ifndef COUCHJS_UTIL_H
#define COUCHJS_UTIL_H
-#include <jsapi.h>
+#include <js/jsapi.h>
typedef struct {
int no_eval;

View File

@ -121,6 +121,8 @@ mapAliases ({
conntrack_tools = conntrack-tools; # added 2018-05
cool-old-term = cool-retro-term; # added 2015-01-31
coprthr = throw "coprthr has been removed."; # added 2019-12-08
couchdb = throw "couchdb was removed from nixpkgs, use couchdb3 instead"; # added 2021-03-03
couchdb2 = throw "couchdb2 was removed from nixpkgs, use couchdb3 instead"; # added 2021-03-03
corebird = throw "corebird was deprecated 2019-10-02: See https://www.patreon.com/posts/corebirds-future-18921328. Please use Cawbird as replacement.";
coredumper = throw "coredumper has been removed: abandoned by upstream."; # added 2019-11-16
cpp_ethereum = throw "cpp_ethereum has been removed; abandoned upstream."; # added 2020-11-30
@ -746,6 +748,7 @@ mapAliases ({
speedtest_cli = speedtest-cli; # added 2015-02-17
spice_gtk = spice-gtk; # added 2018-02-25
spice_protocol = spice-protocol; # added 2018-02-25
spidermonkey_1_8_5 = throw "spidermonkey_1_8_5 has been removed, because it is based on Firefox 4.0 from 2011."; # added 2021-05-03
spidermonkey_38 = throw "spidermonkey_38 has been removed. Please use spidermonkey_78 instead."; # added 2021-03-21
spidermonkey_52 = throw "spidermonkey_52 has been removed. Please use spidermonkey_78 instead."; # added 2019-10-16
spidermonkey_60 = throw "spidermonkey_60 has been removed. Please use spidermonkey_78 instead."; # added 2021-03-21

View File

@ -12201,7 +12201,6 @@ in
sparkleshare = callPackage ../applications/version-management/sparkleshare { };
spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { };
spidermonkey_68 = callPackage ../development/interpreters/spidermonkey/68.nix { };
spidermonkey_78 = callPackage ../development/interpreters/spidermonkey/78.nix { };
@ -18601,15 +18600,6 @@ in
clickhouse-cli = with python3Packages; toPythonApplication clickhouse-cli;
couchdb = callPackage ../servers/http/couchdb {
sphinx = python27Packages.sphinx;
erlang = erlangR19;
};
couchdb2 = callPackage ../servers/http/couchdb/2.0.0.nix {
erlang = erlangR21;
};
couchdb3 = callPackage ../servers/http/couchdb/3.nix {
erlang = erlangR22;
};