https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From 6f53bd36a40da4c71486e3b79f6e32d53d6eea5d Mon Sep 17 00:00:00 2001
|
|
From: Euan Kemp <euank@euank.com>
|
|
Date: Thu, 3 Feb 2022 23:50:40 -0800
|
|
Subject: [PATCH 2/2] scrips/download: strip downloading, just package CRD
|
|
|
|
The CRD packaging is a complicated set of commands, so let's reuse it.
|
|
---
|
|
scripts/download | 10 ++--------
|
|
1 file changed, 2 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/scripts/download b/scripts/download
|
|
index 5effc0562a..82361803ee 100755
|
|
--- a/scripts/download
|
|
+++ b/scripts/download
|
|
@@ -24,12 +24,6 @@ rm -rf ${CONTAINERD_DIR}
|
|
mkdir -p ${CHARTS_DIR}
|
|
mkdir -p ${DATA_DIR}
|
|
|
|
-curl --compressed -sfL https://github.com/k3s-io/k3s-root/releases/download/${VERSION_ROOT}/k3s-root-${ARCH}.tar | tar xf - --exclude=bin/socat
|
|
-
|
|
-git clone --single-branch --branch=${VERSION_RUNC} --depth=1 https://github.com/opencontainers/runc ${RUNC_DIR}
|
|
-
|
|
-git clone --single-branch --branch=${VERSION_CONTAINERD} --depth=1 https://github.com/k3s-io/containerd ${CONTAINERD_DIR}
|
|
-
|
|
setup_tmp() {
|
|
TMP_DIR=$(mktemp -d --tmpdir=${CHARTS_DIR})
|
|
cleanup() {
|
|
@@ -44,8 +38,8 @@ setup_tmp() {
|
|
|
|
download_and_package_traefik () {
|
|
echo "Downloading Traefik Helm chart from ${TRAEFIK_URL}"
|
|
- curl -sfL ${TRAEFIK_URL} -o ${TMP_DIR}/${TRAEFIK_FILE}
|
|
- code=$?
|
|
+ # nixpkgs: copy in our known traefik chart instead
|
|
+ cp $TRAEFIK_CHART_FILE ${TMP_DIR}/${TRAEFIK_FILE}
|
|
|
|
if [ $code -ne 0 ]; then
|
|
echo "Error: Failed to download Traefik Helm chart!"
|
|
--
|
|
2.34.1
|
|
|