You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2021/01/18 19:31:57 UTC

[couchdb] branch 3.x-devcontainer updated: Allow setting SM_VSN in environment, and use that in Dockerfile

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch 3.x-devcontainer
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x-devcontainer by this push:
     new 6f753af  Allow setting SM_VSN in environment, and use that in Dockerfile
6f753af is described below

commit 6f753af236e97a70b0fc7723628a2fe61ac8e519
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Mon Jan 18 14:30:18 2021 -0500

    Allow setting SM_VSN in environment, and use that in Dockerfile
    
    This enables the container environment to automatically default to
    SpiderMonkey 60, which is the version we want to use for the
    Debian Buster OS on which the container image is based.
---
 .devcontainer/Dockerfile | 6 ++++--
 configure                | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 6394908..04a117c 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,17 +1,19 @@
 ARG ELIXIR_VERSION
 FROM elixir:${ELIXIR_VERSION}
 
+# Install SpiderMonkey 60 and tell CouchDB to use it in configure
+ENV SM_VSN=60
+
 # Use NodeSource binaries for Node.js (Fauxton dependency)
 RUN set -ex; \
     curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -; \
     echo "deb https://deb.nodesource.com/node_10.x buster main" | tee /etc/apt/sources.list.d/nodesource.list; \
     echo "deb-src https://deb.nodesource.com/node_10.x buster main" | tee -a /etc/apt/sources.list.d/nodesource.list
 
-# Using SM 60 here so be sure to set --spidermonkey-version 60 in configure
 RUN set -ex; \
     apt-get update; \
     apt-get install -y --no-install-recommends \
-        libmozjs-60-dev \
+        libmozjs-${SM_VSN}-dev \
         libicu-dev \
         python3-venv \
         python3-pip \
diff --git a/configure b/configure
index a341259..b902fe2 100755
--- a/configure
+++ b/configure
@@ -29,7 +29,7 @@ ERLANG_MD5="false"
 SKIP_DEPS=0
 
 COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)"
-SM_VSN="1.8.5"
+SM_VSN=${SM_VSN:-"1.8.5"}
 ARCH="$(uname -m)"
 
 . ${rootdir}/version.mk