Skip to content

Commit 12187a5

Browse files
committed
verify: fail if we try to use debian "sid" as distro name
We should never build packages for "sid", which is a codename for "unstable", and instead use the codename that it's currently referring to (codename of next stable release). Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 5f157eb commit 12187a5

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

install-containerd-helpers

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,9 @@ function install_debian_containerd() {
5353

5454
curl -fsSL "${REPO_URL}/gpg" | apt-key add -
5555

56-
if [[ ${DIST_VERSION} == "sid" ]]; then
57-
# Debian "sid" is not an actual distro version. Sid represents the "unstable"
58-
# channel ("next stable in-progress"). Currently, it is equivalent to "bullseye",
59-
# but once "bullseye" is stable, it becomes "bookworm", "trixy", etc (see the
60-
# list of Debian releases at https://wiki.debian.org/DebianReleases).
61-
#
62-
# FIXME: this override should not be hard-coded, but instead we should try to
63-
# get this name from information in /var/lib/apt/lists/. Also see
64-
# https://github.com/docker/containerd-packaging/pull/219 for details.
65-
DIST_VERSION='bullseye'
56+
if [ "${DIST_VERSION}" = "sid" ]; then
57+
echo 'Debian sid ("unstable") cannot be used for packaging: replace with the actual codename'
58+
exit 1
6659
fi
6760
ARCH=$(dpkg --print-architecture)
6861

verify

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ function verify_deb() {
4040

4141
DIST_ID=$(source /etc/os-release; echo "$ID")
4242
DIST_VERSION=$(lsb_release -sc)
43+
if [ "${DIST_VERSION}" = "sid" ]; then
44+
echo 'Debian sid ("unstable") cannot be used for packaging: replace with the actual codename'
45+
exit 1
46+
fi
4347

4448
install_debian_containerd
4549

0 commit comments

Comments
 (0)