Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ src/b64url/
src/bear/
src/certifi/
src/config/
src/couch/priv/couch_js/config.h
src/couch/priv/couch_js/**/config.h
src/couch/priv/couchjs
src/couch/priv/couchspawnkillable
src/couch/priv/couch_ejson_compare/couch_ejson_compare.d
src/couch/priv/couch_js/http.d
src/couch/priv/couch_js/main.d
src/couch/priv/couch_js/utf8.d
src/couch/priv/couch_js/util.d
src/couch/priv/couch_js/**/*.d
src/couch/priv/icu_driver/couch_icu_driver.d
src/mango/src/mango_cursor_text.nocompile
src/docs/
Expand Down
55 changes: 55 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,61 @@ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.


for share/server/60/esprima.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.

We still need to place a copy of these upstream dependencies untouched into an Apache repository, as @janl said on IRC. If we made modifications, we should track those in a branch in that repo as well. If we can't solve the build problem now (how to generate these files from those repos), please open a new ticket and mention Jan and Garren in it so we can look at fixing that for the future.

I want to be sure that if these libraries change in the future, we can easily absorb the fixes and improvements into our code, especially if they're security-related patches.

@davisp can help you with the repo importation into Apache, he's done it recently for part of the 4.0 libraries.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestions, @wohali I created #2372 for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wohali @jiangphcn Yap, will do that in a few minute after I finish testing this PR.

Based on https://github.com/jquery/esprima

BSD License

Copyright JS Foundation and other contributors, https://js.foundation/

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



share/server/60/escodegen.js
Based on https://github.com/estools/escodegen

BSD License

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


for src/fauxton/assets/less/bootstrap/font-awesome/*
for share/www/css/*

Expand Down
8 changes: 8 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ This product also includes the following third-party components:

Copyright (c) 2015 Twitter, Inc.

* esprima.js (https://github.com/jquery/esprima)

Copyright JS Foundation and other contributors, https://js.foundation/

* escodegen.js (https://github.com/estools/escodegen)

Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors.

* hyper

Copyright (c) 2014 Game Analytics ApS
23 changes: 23 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ERLANG_MD5="false"
SKIP_DEPS=0

COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)"
SM_VSN="1.8.5"

. ${rootdir}/version.mk
COUCHDB_VERSION=${vsn_major}.${vsn_minor}.${vsn_patch}
Expand All @@ -50,6 +51,7 @@ Options:
--disable-docs do not build any documentation or manpages
--erlang-md5 use erlang for md5 hash operations
--dev alias for --with-curl --disable-docs --disable-fauxton
--spidermonkey-version VSN specify the version of SpiderMonkey to use (defaults to $SM_VSN)
--skip-deps do not update erlang dependencies
--rebar=PATH use rebar by specified path (version >=2.6.0 && <3.0 required)
EOF
Expand Down Expand Up @@ -140,6 +142,24 @@ parse_opts() {
printf 'ERROR: "--user" requires a non-empty argument.\n' >&2
exit 1
;;

--spidermonkey-version)
if [ -n "$2" ]; then
eval SM_VSN=$2
shift 2
continue
else
printf 'ERROR: "--spidermonkey-version" requires a non-empty argument.\n' >&2
exit 1
fi
;;
--spidermonkey-version=?*)
eval SM_VSN=${1#*=}
;;
--spidermonkey-version=)
printf 'ERROR: "--spidermonkey-version" requires a non-empty argument.\n' >&2
exit 1
;;
--) # End of options
shift
break
Expand Down Expand Up @@ -180,6 +200,7 @@ cat > rel/couchdb.config << EOF
{log_file, "$LOG_FILE"}.
{fauxton_root, "./share/www"}.
{user, "$COUCHDB_USER"}.
{spidermonkey_version, "$SM_VSN"}.
{node_name, "-name [email protected]"}.
{cluster_port, 5984}.
{backend_port, 5986}.
Expand All @@ -206,12 +227,14 @@ with_fauxton = $WITH_FAUXTON
with_docs = $WITH_DOCS

user = $COUCHDB_USER
spidermonkey_version = $SM_VSN
EOF

cat > $rootdir/config.erl << EOF
{with_curl, $WITH_CURL}.
{with_proper, $WITH_PROPER}.
{erlang_md5, $ERLANG_MD5}.
{spidermonkey_version, "$SM_VSN"}.
EOF

install_local_rebar() {
Expand Down
8 changes: 7 additions & 1 deletion configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
-DisableDocs request build process skip building documentation (default false)
-SkipDeps do not update Erlang dependencies (default false)
-CouchDBUser USER set the username to run as (defaults to current user)
-SpiderMonkeyVersion VSN select the version of SpiderMonkey to use (defaults to 1.8.5)

Installation directories:
-Prefix PREFIX install architecture-independent files in PREFIX
Expand Down Expand Up @@ -49,6 +50,8 @@ Param(
[ValidateNotNullOrEmpty()]
[string]$CouchDBUser = [Environment]::UserName, # set the username to run as (defaults to current user)
[ValidateNotNullOrEmpty()]
[string]$SpiderMonkeyVersion = "1.8.5", # select the version of SpiderMonkey to use (default 1.8.5)
[ValidateNotNullOrEmpty()]
[string]$Prefix = "C:\Program Files\Apache\CouchDB", # install architecture-independent file location (default C:\Program Files\Apache\CouchDB)
[ValidateNotNullOrEmpty()]
[string]$ExecPrefix = $Prefix, # install architecture-dependent file location (default C:\Program Files\Apache\CouchDB)
Expand Down Expand Up @@ -133,6 +136,7 @@ $CouchDBConfig = @"
{log_file, ""}.
{fauxton_root, "./share/www"}.
{user, "$CouchDBUser"}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
{node_name, "-name couchdb@localhost"}.
{cluster_port, 5984}.
{backend_port, 5986}.
Expand All @@ -144,7 +148,7 @@ $InstallMk = @"
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Expand Down Expand Up @@ -175,12 +179,14 @@ with_fauxton = $BuildFauxton
with_docs = $BuildDocs

user = $CouchDBUser
spidermonkey_version = $SpiderMonkeyVersion
"@
$InstallMk | Out-File "$rootdir\install.mk" -encoding ascii

$lowercurl = "$WithCurl".ToLower()
$ConfigERL = @"
{with_curl, $lowercurl}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing both configure and configure.ps1.

"@
$ConfigERL | Out-File "$rootdir\config.erl" -encoding ascii

Expand Down
1 change: 1 addition & 0 deletions share/server/60/escodegen.js

Large diffs are not rendered by default.

Loading