Skip to content

Commit 339fbaf

Browse files
Harden kafka_consumer CI librdkafka install with SHA256 verification (#23375)
* Harden kafka_consumer CI librdkafka install with SHA256 verification * Fix up
1 parent e51b03a commit 339fbaf

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.ddev/ci/scripts/kafka_consumer/linux/32_install_kerberos.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ sudo apt update
66
sudo apt install -y --no-install-recommends build-essential libkrb5-dev libzstd-dev wget software-properties-common lsb-release gcc make python3 python3-pip python3-dev libsasl2-modules-gssapi-mit krb5-user
77

88
# Install librdkafka from source since no binaries are available for the distribution we use on the CI:
9-
git clone https://github.com/confluentinc/librdkafka
10-
cd librdkafka
11-
git checkout v2.13.2
9+
LIBRDKAFKA_VERSION="v2.13.2"
10+
LIBRDKAFKA_SHA256="14972092e4115f6e99f798a7cb420cbf6daa0c73502b3c52ae42fb5b418eea8f"
11+
LIBRDKAFKA_TARBALL="${LIBRDKAFKA_VERSION}.tar.gz"
12+
13+
wget "https://github.com/confluentinc/librdkafka/archive/refs/tags/${LIBRDKAFKA_TARBALL}"
14+
echo "${LIBRDKAFKA_SHA256} ${LIBRDKAFKA_TARBALL}" | sha256sum -c -
15+
tar -xzf "${LIBRDKAFKA_TARBALL}"
16+
cd "librdkafka-${LIBRDKAFKA_VERSION#v}"
1217
sudo ./configure --install-deps --prefix=/usr
1318
make
1419
sudo make install

0 commit comments

Comments
 (0)