diff --git a/conf/python_source.src b/conf/python_source.src new file mode 100644 index 0000000..4d05e76 --- /dev/null +++ b/conf/python_source.src @@ -0,0 +1,2 @@ +SOURCE_URL=https://github.com/matrix-org/synapse/archive/v0.26.0.tar.gz +SOURCE_SUM=234dd5fa44895e855d11fbf50de9184d057977b10b296f594d2c3758f693eff3 diff --git a/scripts/_common.sh b/scripts/_common.sh index f7216cc..e69de29 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,3 +0,0 @@ -#!/bin/bash - -src_sum="234dd5fa44895e855d11fbf50de9184d057977b10b296f594d2c3758f693eff3" diff --git a/scripts/install b/scripts/install index 496d05a..3747d9d 100644 --- a/scripts/install +++ b/scripts/install @@ -158,7 +158,12 @@ else pip install --upgrade pip pip install --upgrade setuptools pip install --upgrade cffi ndg-httpsclient psycopg2 lxml - wget -nv -O synapse_source.tar.gz https://github.com/matrix-org/synapse/archive/v$upstream_version.tar.gz + + # Download and check the checksum for the synapse source + src_url=$(grep 'SOURCE_URL=' "$YNH_CWD/../conf/python_source.src" | cut -d= -f2-) + src_sum=$(grep 'SOURCE_SUM=' "$YNH_CWD/../conf/python_source.src" | cut -d= -f2-) + + wget -nv -O synapse_source.tar.gz "$src_url" echo "${src_sum} synapse_source.tar.gz" | sha256sum -c --status \ || ynh_die "Corrupt source" pip install --upgrade synapse_source.tar.gz