From e6027562e2a1964bcaa0163f1615ab72bfc6630b Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 15 May 2020 19:26:54 +0100 Subject: remove `builtins.buffer` code from storage code this is no longer needed on python 3 --- scripts-dev/convert_server_keys.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'scripts-dev') diff --git a/scripts-dev/convert_server_keys.py b/scripts-dev/convert_server_keys.py index 06b4c1e2ff..961dc59f11 100644 --- a/scripts-dev/convert_server_keys.py +++ b/scripts-dev/convert_server_keys.py @@ -3,8 +3,6 @@ import json import sys import time -import six - import psycopg2 import yaml from canonicaljson import encode_canonical_json @@ -12,10 +10,7 @@ from signedjson.key import read_signing_keys from signedjson.sign import sign_json from unpaddedbase64 import encode_base64 -if six.PY2: - db_type = six.moves.builtins.buffer -else: - db_type = memoryview +db_binary_type = memoryview def select_v1_keys(connection): @@ -72,7 +67,7 @@ def rows_v2(server, json): valid_until = json["valid_until_ts"] key_json = encode_canonical_json(json) for key_id in json["verify_keys"]: - yield (server, key_id, "-", valid_until, valid_until, db_type(key_json)) + yield (server, key_id, "-", valid_until, valid_until, db_binary_type(key_json)) def main(): -- cgit 1.5.1 From 1fc8914f767f5f80d7263d8db96d73bf0310a39c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 19 May 2020 13:48:41 +0100 Subject: update dh-virtualenv (#7526) --- changelog.d/7526.misc | 1 + debian/build_virtualenv | 1 - debian/changelog | 4 +--- docker/Dockerfile-dhvirtualenv | 15 ++++++++------- scripts-dev/build_debian_packages | 1 + 5 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 changelog.d/7526.misc (limited to 'scripts-dev') diff --git a/changelog.d/7526.misc b/changelog.d/7526.misc new file mode 100644 index 0000000000..c739312c4c --- /dev/null +++ b/changelog.d/7526.misc @@ -0,0 +1 @@ +Update the version of dh-virtualenv we use to build debs, and add focal to the list of target distributions. diff --git a/debian/build_virtualenv b/debian/build_virtualenv index d892fd5c9d..4c9aabcac3 100755 --- a/debian/build_virtualenv +++ b/debian/build_virtualenv @@ -36,7 +36,6 @@ esac dh_virtualenv \ --install-suffix "matrix-synapse" \ --builtin-venv \ - --setuptools \ --python "$SNAKE" \ --upgrade-pip \ --preinstall="lxml" \ diff --git a/debian/changelog b/debian/changelog index 8641571986..2db94ee609 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,16 +1,14 @@ -<<<<<<< HEAD matrix-synapse-py3 (1.12.3ubuntu1) UNRELEASED; urgency=medium * Add information about .well-known files to Debian installation scripts. -- Patrick Cloke Mon, 06 Apr 2020 10:10:38 -0400 -======= + matrix-synapse-py3 (1.12.4) stable; urgency=medium * New synapse release 1.12.4. -- Synapse Packaging team Thu, 23 Apr 2020 10:58:14 -0400 ->>>>>>> master matrix-synapse-py3 (1.12.3) stable; urgency=medium diff --git a/docker/Dockerfile-dhvirtualenv b/docker/Dockerfile-dhvirtualenv index ac9ebcfd88..579724685c 100644 --- a/docker/Dockerfile-dhvirtualenv +++ b/docker/Dockerfile-dhvirtualenv @@ -27,15 +27,16 @@ RUN env DEBIAN_FRONTEND=noninteractive apt-get install \ wget # fetch and unpack the package -RUN wget -q -O /dh-virtuenv-1.1.tar.gz https://github.com/spotify/dh-virtualenv/archive/1.1.tar.gz -RUN tar xvf /dh-virtuenv-1.1.tar.gz +RUN mkdir /dh-virtualenv +RUN wget -q -O /dh-virtualenv.tar.gz https://github.com/matrix-org/dh-virtualenv/archive/matrixorg-20200519.tar.gz +RUN tar -xv --strip-components=1 -C /dh-virtualenv -f /dh-virtualenv.tar.gz # install its build deps -RUN cd dh-virtualenv-1.1/ \ - && env DEBIAN_FRONTEND=noninteractive mk-build-deps -ri -t "apt-get -yqq --no-install-recommends" +RUN cd /dh-virtualenv \ + && env DEBIAN_FRONTEND=noninteractive mk-build-deps -ri -t "apt-get -y --no-install-recommends" # build it -RUN cd dh-virtualenv-1.1 && dpkg-buildpackage -us -uc -b +RUN cd /dh-virtualenv && dpkg-buildpackage -us -uc -b ### ### Stage 1 @@ -68,12 +69,12 @@ RUN apt-get update -qq -o Acquire::Languages=none \ sqlite3 \ libpq-dev -COPY --from=builder /dh-virtualenv_1.1-1_all.deb / +COPY --from=builder /dh-virtualenv_1.2~dev-1_all.deb / # install dhvirtualenv. Update the apt cache again first, in case we got a # cached cache from docker the first time. RUN apt-get update -qq -o Acquire::Languages=none \ - && apt-get install -yq /dh-virtualenv_1.1-1_all.deb + && apt-get install -yq /dh-virtualenv_1.2~dev-1_all.deb WORKDIR /synapse/source ENTRYPOINT ["bash","/synapse/source/docker/build_debian.sh"] diff --git a/scripts-dev/build_debian_packages b/scripts-dev/build_debian_packages index 84eaec6a95..ae2145d717 100755 --- a/scripts-dev/build_debian_packages +++ b/scripts-dev/build_debian_packages @@ -27,6 +27,7 @@ DISTS = ( "ubuntu:cosmic", "ubuntu:disco", "ubuntu:eoan", + "ubuntu:focal", ) DESC = '''\ -- cgit 1.5.1 From b2b86990705de8a099093ec141ad83e09f182034 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 20 May 2020 10:08:46 -0400 Subject: Remove Ubuntu Cosmic and Disco which are both EOL. (#7539) --- changelog.d/7539.misc | 1 + scripts-dev/build_debian_packages | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 changelog.d/7539.misc (limited to 'scripts-dev') diff --git a/changelog.d/7539.misc b/changelog.d/7539.misc new file mode 100644 index 0000000000..93c030875a --- /dev/null +++ b/changelog.d/7539.misc @@ -0,0 +1 @@ +Remove Ubuntu Cosmic and Disco from the list of distributions which we provide `.deb`s for, due to end-of-life. diff --git a/scripts-dev/build_debian_packages b/scripts-dev/build_debian_packages index ae2145d717..e6f4bd1dca 100755 --- a/scripts-dev/build_debian_packages +++ b/scripts-dev/build_debian_packages @@ -24,8 +24,6 @@ DISTS = ( "debian:sid", "ubuntu:xenial", "ubuntu:bionic", - "ubuntu:cosmic", - "ubuntu:disco", "ubuntu:eoan", "ubuntu:focal", ) -- cgit 1.5.1 From 86d814cdde3589af6fd2ad22acea614f4b409274 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 3 Jun 2020 17:01:43 +0100 Subject: Check the changelog number in check-newsfragment (#7623) --- changelog.d/7623.misc | 1 + scripts-dev/check-newsfragment | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 changelog.d/7623.misc (limited to 'scripts-dev') diff --git a/changelog.d/7623.misc b/changelog.d/7623.misc new file mode 100644 index 0000000000..34a6f6a6a2 --- /dev/null +++ b/changelog.d/7623.misc @@ -0,0 +1 @@ +Update CI scripts to check the number in the newsfile fragment. diff --git a/scripts-dev/check-newsfragment b/scripts-dev/check-newsfragment index 0ec5075e79..98a618f6b2 100755 --- a/scripts-dev/check-newsfragment +++ b/scripts-dev/check-newsfragment @@ -7,7 +7,9 @@ set -e # make sure that origin/develop is up to date git remote set-branches --add origin develop -git fetch origin develop +git fetch -q origin develop + +pr="$BUILDKITE_PULL_REQUEST" # if there are changes in the debian directory, check that the debian changelog # has been updated @@ -20,20 +22,30 @@ fi # if there are changes *outside* the debian directory, check that the # newsfragments have been updated. -if git diff --name-only FETCH_HEAD... | grep -qv '^debian/'; then - tox -e check-newsfragment +if ! git diff --name-only FETCH_HEAD... | grep -qv '^debian/'; then + exit 0 fi +tox -qe check-newsfragment + echo echo "--------------------------" echo -# check that any new newsfiles on this branch end with a full stop. +matched=0 for f in `git diff --name-only FETCH_HEAD... -- changelog.d`; do + # check that any modified newsfiles on this branch end with a full stop. lastchar=`tr -d '\n' < $f | tail -c 1` if [ $lastchar != '.' -a $lastchar != '!' ]; then echo -e "\e[31mERROR: newsfragment $f does not end with a '.' or '!'\e[39m" >&2 exit 1 fi + + # see if this newsfile corresponds to the right PR + [[ -n "$pr" && "$f" == changelog.d/"$pr".* ]] && matched=1 done +if [[ -n "$pr" && "$matched" -eq 0 ]]; then + echo -e "\e[31mERROR: Did not find a news fragment with the right number: expected changelog.d/$pr.*.\e[39m" >&2 + exit 1 +fi -- cgit 1.5.1