|
|
aa0848 |
From be021c2328550a9d5b987cb206eda5df90b45acd Mon Sep 17 00:00:00 2001
|
|
|
aa0848 |
From: Evgeny Vereshchagin <evvers@ya.ru>
|
|
|
aa0848 |
Date: Sun, 26 Dec 2021 01:11:00 +0000
|
|
|
aa0848 |
Subject: [PATCH] ci: replace apt-key with signed-by
|
|
|
aa0848 |
|
|
|
aa0848 |
to limit the scope of the key to apt.llvm.org only.
|
|
|
aa0848 |
|
|
|
aa0848 |
This is mostly inspired by https://blog.cloudflare.com/dont-use-apt-key/
|
|
|
aa0848 |
|
|
|
aa0848 |
(cherry picked from commit bfa6bd1be098adc4710e1819b9cd34d65b3855da)
|
|
|
aa0848 |
|
|
|
aa0848 |
Related: #2013213
|
|
|
aa0848 |
---
|
|
|
aa0848 |
.github/workflows/build_test.sh | 7 ++++---
|
|
|
aa0848 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
aa0848 |
|
|
|
aa0848 |
diff --git a/.github/workflows/build_test.sh b/.github/workflows/build_test.sh
|
|
|
aa0848 |
index 5b18784461..549e59b2c9 100755
|
|
|
aa0848 |
--- a/.github/workflows/build_test.sh
|
|
|
aa0848 |
+++ b/.github/workflows/build_test.sh
|
|
|
aa0848 |
@@ -80,9 +80,10 @@ if [[ "$COMPILER" == clang ]]; then
|
|
|
aa0848 |
# llvm package if available in such cases to avoid that.
|
|
|
aa0848 |
if ! apt show --quiet "llvm-$COMPILER_VERSION" &>/dev/null; then
|
|
|
aa0848 |
# Latest LLVM stack deb packages provided by https://apt.llvm.org/
|
|
|
aa0848 |
- # Following snippet was borrowed from https://apt.llvm.org/llvm.sh
|
|
|
aa0848 |
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
|
|
aa0848 |
- add-apt-repository -y "deb http://apt.llvm.org/$RELEASE/ llvm-toolchain-$RELEASE-$COMPILER_VERSION main"
|
|
|
aa0848 |
+ # Following snippet was partly borrowed from https://apt.llvm.org/llvm.sh
|
|
|
aa0848 |
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --yes --dearmor --output /usr/share/keyrings/apt-llvm-org.gpg
|
|
|
aa0848 |
+ printf "deb [signed-by=/usr/share/keyrings/apt-llvm-org.gpg] http://apt.llvm.org/%s/ llvm-toolchain-%s-%s main\n" \
|
|
|
aa0848 |
+ "$RELEASE" "$RELEASE" "$COMPILER_VERSION" >/etc/apt/sources.list.d/llvm-toolchain.list
|
|
|
aa0848 |
PACKAGES+=("clang-$COMPILER_VERSION" "lldb-$COMPILER_VERSION" "lld-$COMPILER_VERSION" "clangd-$COMPILER_VERSION")
|
|
|
aa0848 |
fi
|
|
|
aa0848 |
elif [[ "$COMPILER" == gcc ]]; then
|