diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-07-14 14:41:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-14 14:41:40 +0100 |
commit | c82eb02d6423a51852115bbda647fe12e86af673 (patch) | |
tree | 7aee4cdab02e37837407e9041f5d2694c3c175ea | |
parent | Make GHA config more efficient (#10383) (diff) | |
download | synapse-c82eb02d6423a51852115bbda647fe12e86af673.tar.xz |
Set section for prerelease debs (#10391)
This is part of fixing #6116: we want to put RC debs into a different place than release debs, so reprepro has to be able to tell them apart.
-rw-r--r-- | changelog.d/10391.misc | 1 | ||||
-rw-r--r-- | docker/build_debian.sh | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/changelog.d/10391.misc b/changelog.d/10391.misc new file mode 100644 index 0000000000..3f191b520a --- /dev/null +++ b/changelog.d/10391.misc @@ -0,0 +1 @@ +When building Debian packages for prerelease versions, set the Section accordingly. diff --git a/docker/build_debian.sh b/docker/build_debian.sh index f426d2b77b..f572ed9aa0 100644 --- a/docker/build_debian.sh +++ b/docker/build_debian.sh @@ -15,6 +15,20 @@ cd /synapse/build dch -M -l "+$DIST" "build for $DIST" dch -M -r "" --force-distribution --distribution "$DIST" +# if this is a prerelease, set the Section accordingly. +# +# When the package is later added to the package repo, reprepro will use the +# Section to determine which "component" it should go into (see +# https://manpages.debian.org/stretch/reprepro/reprepro.1.en.html#GUESSING) + +DEB_VERSION=`dpkg-parsechangelog -SVersion` +case $DEB_VERSION in + *rc*|*a*|*b*|*c*) + sed -ie '/^Section:/c\Section: prerelease' debian/control + ;; +esac + + dpkg-buildpackage -us -uc ls -l .. |