-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix installing from a readonly copy of synapse #866
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
# Run the sytests. | ||
|
||
set -ex | ||
set -e | ||
|
||
cd "$(dirname $0)/.." | ||
|
||
|
@@ -26,10 +26,10 @@ if [ -n "$MULTI_POSTGRES" ] || [ -n "$POSTGRES" ]; then | |
# Start the database | ||
su -c 'eatmydata /usr/lib/postgresql/*/bin/pg_ctl -w -D $PGDATA start' postgres | ||
|
||
su -c psql postgres <<< "show config_file" | ||
su -c psql postgres <<< "show max_connections" | ||
su -c psql postgres <<< "show full_page_writes" | ||
su -c psql postgres <<< "show fsync" | ||
#su -c psql postgres <<< "show config_file" | ||
#su -c psql postgres <<< "show max_connections" | ||
#su -c psql postgres <<< "show full_page_writes" | ||
#su -c psql postgres <<< "show fsync" | ||
fi | ||
|
||
# Now create the databases | ||
|
@@ -110,6 +110,24 @@ elif [ -n "$POSTGRES" ]; then | |
|
||
fi | ||
|
||
# default value for SYNAPSE_SOURCE | ||
: ${SYNAPSE_SOURCE:=/src} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neat, did not know this about bash. (https://wiki.bash-hackers.org/syntax/pe#assign_a_default_value if anyone else doesn't know what this does) |
||
|
||
# if we're running against a source directory, turn it into a tarball. pip | ||
# will then unpack it to a temporary location, and build it. (As of pip 20.1, | ||
# it will otherwise try to build it in-tree, which means writing changes to the | ||
# source volume outside the container. | ||
richvdh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# | ||
if [ -d "$SYNAPSE_SOURCE" ]; then | ||
echo "Creating tarball from synapse source" | ||
tar -C "$SYNAPSE_SOURCE" -czf /tmp/synapse.tar.gz \ | ||
synapse scripts setup.py README.rst synctl MANIFEST.in | ||
SYNAPSE_SOURCE="/tmp/synapse.tar.gz" | ||
elif [ ! -r "$SYNAPSE_SOURCE" ]; then | ||
echo "Unable to read synapse source at $SYNAPSE_SOURCE" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -n "$OFFLINE" ]; then | ||
# if we're in offline mode, just put synapse into the virtualenv, and | ||
# hope that the deps are up-to-date. | ||
|
@@ -118,11 +136,11 @@ if [ -n "$OFFLINE" ]; then | |
# (https://github.com/pypa/pip/issues/5402 possibly) where pip wants | ||
# to reinstall any requirements for the build system, even if they are | ||
# already installed. | ||
/venv/bin/pip install --no-index --no-use-pep517 /src | ||
/venv/bin/pip install --no-index --no-use-pep517 "$SYNAPSE_SOURCE" | ||
else | ||
# We've already created the virtualenv, but lets double check we have all | ||
# deps. | ||
/venv/bin/pip install -q --upgrade --no-cache-dir /src[redis] | ||
/venv/bin/pip install -q --upgrade --no-cache-dir "$SYNAPSE_SOURCE"[redis] | ||
/venv/bin/pip install -q --upgrade --no-cache-dir \ | ||
lxml psycopg2 coverage codecov tap.py coverage_enable_subprocess | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove these if they're not useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 0165ef9