From b4fe79f8a38a4727511dad7b7c9c84fa55217940 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 26 Jul 2019 13:30:23 +0100 Subject: [PATCH 1/2] Fix debian packages for sid being called buster. I don't know why the sid images return buster as its codename in `lsb_release` but it does, so lets just grab the codename from the distro we pass into dockerfile --- docker/Dockerfile-dhvirtualenv | 5 +++++ docker/build_debian.sh | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile-dhvirtualenv b/docker/Dockerfile-dhvirtualenv index 0117ab8bcc07..ac9ebcfd88c2 100644 --- a/docker/Dockerfile-dhvirtualenv +++ b/docker/Dockerfile-dhvirtualenv @@ -42,6 +42,11 @@ RUN cd dh-virtualenv-1.1 && dpkg-buildpackage -us -uc -b ### FROM ${distro} +# Get the distro we want to pull from as a dynamic build variable +# (We need to define it in each build stage) +ARG distro="" +ENV distro ${distro} + # Install the build dependencies # # NB: keep this list in sync with the list of build-deps in debian/control diff --git a/docker/build_debian.sh b/docker/build_debian.sh index 6ed2b398986d..f312f0715fd1 100644 --- a/docker/build_debian.sh +++ b/docker/build_debian.sh @@ -4,7 +4,8 @@ set -ex -DIST=`lsb_release -c -s` +# Get the codename from distro env +DIST=`cut -d ':' -f2 <<< $distro` # we get a read-only copy of the source: make a writeable copy cp -aT /synapse/source /synapse/build From a8e69df1ce846e3df5739f71b15fb7a5b0c66f64 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 26 Jul 2019 13:32:01 +0100 Subject: [PATCH 2/2] Newsfile --- changelog.d/5775.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5775.bugfix diff --git a/changelog.d/5775.bugfix b/changelog.d/5775.bugfix new file mode 100644 index 000000000000..b124897d802c --- /dev/null +++ b/changelog.d/5775.bugfix @@ -0,0 +1 @@ +Fix debian packaging scripts to correctly build sid packages.