summaryrefslogtreecommitdiff
path: root/server/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'server/pkg')
-rwxr-xr-xserver/pkg/create-user-db30
-rwxr-xr-xserver/pkg/generate_wheels.sh2
-rwxr-xr-xserver/pkg/pip_install_requirements.sh4
-rw-r--r--server/pkg/requirements-latest.pip3
-rw-r--r--server/pkg/requirements.pip7
5 files changed, 23 insertions, 23 deletions
diff --git a/server/pkg/create-user-db b/server/pkg/create-user-db
index 54856643..5e48d4de 100755
--- a/server/pkg/create-user-db
+++ b/server/pkg/create-user-db
@@ -25,6 +25,9 @@ from leap.soledad.common.couch import list_users_dbs
from leap.soledad.server import load_configuration
+BYPASS_AUTH = os.environ.get('SOLEDAD_BYPASS_AUTH', False)
+
+
description = """
Creates a user database.
This is meant to be used by Soledad Server.
@@ -40,16 +43,23 @@ NETRC_PATH = CONF['soledad-server']['admin_netrc']
def url_for_db(dbname):
- if not os.path.exists(NETRC_PATH):
- print ('netrc not found in %s' % NETRC_PATH)
- sys.exit(1)
- parsed_netrc = netrc.netrc(NETRC_PATH)
- host, (login, _, password) = parsed_netrc.hosts.items()[0]
- url = ('http://%(login)s:%(password)s@%(host)s:5984/%(dbname)s' % {
- 'login': login,
- 'password': password,
- 'host': host,
- 'dbname': dbname})
+ if BYPASS_AUTH:
+ login = ''
+ password = ''
+ host = 'localhost'
+ url = 'http://localhost:5984/%(dbname)s' % {
+ 'dbname': dbname}
+ else:
+ if not os.path.exists(NETRC_PATH):
+ print ('netrc not found in %s' % NETRC_PATH)
+ sys.exit(1)
+ parsed_netrc = netrc.netrc(NETRC_PATH)
+ host, (login, _, password) = parsed_netrc.hosts.items()[0]
+ url = ('http://%(login)s:%(password)s@%(host)s:5984/%(dbname)s' % {
+ 'login': login,
+ 'password': password,
+ 'host': host,
+ 'dbname': dbname})
return url
diff --git a/server/pkg/generate_wheels.sh b/server/pkg/generate_wheels.sh
index e29c327e..a13e2c7a 100755
--- a/server/pkg/generate_wheels.sh
+++ b/server/pkg/generate_wheels.sh
@@ -7,7 +7,7 @@ if [ "$WHEELHOUSE" = "" ]; then
fi
pip wheel --wheel-dir $WHEELHOUSE pip
-pip wheel --wheel-dir $WHEELHOUSE --allow-external u1db --allow-unverified u1db --allow-external dirspec --allow-unverified dirspec -r pkg/requirements.pip
+pip wheel --wheel-dir $WHEELHOUSE -r pkg/requirements.pip
if [ -f pkg/requirements-testing.pip ]; then
pip wheel --wheel-dir $WHEELHOUSE -r pkg/requirements-testing.pip
fi
diff --git a/server/pkg/pip_install_requirements.sh b/server/pkg/pip_install_requirements.sh
index d0479365..f4b5f67a 100755
--- a/server/pkg/pip_install_requirements.sh
+++ b/server/pkg/pip_install_requirements.sh
@@ -4,7 +4,7 @@
# Use at your own risk.
# See $usage for help
-insecure_packages="u1db dirspec"
+insecure_packages=""
leap_wheelhouse=https://lizard.leap.se/wheels
show_help() {
@@ -80,5 +80,5 @@ insecure_flags=`return_insecure_flags`
packages=`return_packages`
pip install -U wheel
-pip install $install_options pip
+pip install -U pip
pip install $install_options $insecure_flags $packages
diff --git a/server/pkg/requirements-latest.pip b/server/pkg/requirements-latest.pip
index a629aa57..46a7ccba 100644
--- a/server/pkg/requirements-latest.pip
+++ b/server/pkg/requirements-latest.pip
@@ -1,8 +1,5 @@
--index-url https://pypi.python.org/simple/
---allow-external u1db --allow-unverified u1db
---allow-external dirspec --allow-unverified dirspec
-
-e 'git+https://github.com/pixelated-project/leap_pycommon.git@develop#egg=leap.common'
-e '../common'
-e .
diff --git a/server/pkg/requirements.pip b/server/pkg/requirements.pip
index f9cce08e..2d845f24 100644
--- a/server/pkg/requirements.pip
+++ b/server/pkg/requirements.pip
@@ -1,13 +1,6 @@
configparser
-u1db
-routes
PyOpenSSL
twisted>=12.3.0
#pinned for wheezy compatibility
Beaker==1.6.3 #wheezy
couchdb==0.8 #wheezy
-
-# XXX -- fix me!
-# oauth is not strictly needed by us, but we need it until u1db adds it to its
-# release as a dep.
-oauth