Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed hardcoded versions #5538

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/axel/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ WORKDIR /tmp/axel
ARG name
ARG version
RUN <<EOF
curl --silent --show-error --location --fail https://github.com/axel-download-accelerator/axel/releases/download/v2.17.11/axel-2.17.11.tar.gz \
curl --silent --show-error --location --fail https://github.com/axel-download-accelerator/axel/releases/download/v${version}/axel-${version}.tar.gz \
| tar --extract --gzip --strip-components=1
./configure --prefix="${prefix}"
make LDFLAGS=-static -j$(nproc)
Expand Down
2 changes: 1 addition & 1 deletion tools/cosign/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG TARGETPLATFORM
# renovate: datasource=github-releases depName=sigstore/cosign
# renovate: datasource=github-releases depName=sigstore/cosign extractVersion=^v(?<version>.+?)$
ARG COSIGN_VERSION=2.2.3
COPY checksums.txt .
RUN <<EOF
Expand Down
14 changes: 0 additions & 14 deletions tools/git/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ ARG name
ARG version
RUN <<EOF
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/git/git .
if test "${version}" == "2.43.1"; then
cat <<EOP | patch -p0
--- imap-send.c.orig
+++ imap-send.c
@@ -28,6 +28,7 @@
#include "run-command.h"
#include "parse-options.h"
#include "setup.h"
+#include "strbuf.h"
#if defined(NO_OPENSSL) && !defined(HAVE_OPENSSL_CSPRNG)
typedef void *SSL;
#endif
EOP
fi
export CFLAGS="${CFLAGS} -static"
make configure
./configure --prefix="${prefix}"
Expand Down
28 changes: 13 additions & 15 deletions tools/kubeadm/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@ curl --silent --show-error --location --fail --output "${prefix}/bin/kubeadm" \
"https://storage.googleapis.com/kubernetes-release/release/v${version}/bin/linux/${alt_arch}/kubeadm"
chmod +x "${prefix}/bin/kubeadm"

if test "$(echo -e "1.26.0-beta.0\n${version}" | sort -V | head -n 1)" == "1.26.0-beta.0"; then
echo "Verifying keyless signature for kubeadm"
curl --silent --show-error --location --fail --output "/tmp/kubeadm.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubeadm.sig"
curl --silent --show-error --location --fail --output "/tmp/kubeadm.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubeadm.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubeadm" \
--signature "/tmp/kubeadm.sig" \
--certificate "/tmp/kubeadm.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubeadm.sig" \
"/tmp/kubeadm.cert"
fi
echo "Verifying keyless signature for kubeadm"
curl --silent --show-error --location --fail --output "/tmp/kubeadm.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubeadm.sig"
curl --silent --show-error --location --fail --output "/tmp/kubeadm.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubeadm.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubeadm" \
--signature "/tmp/kubeadm.sig" \
--certificate "/tmp/kubeadm.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubeadm.sig" \
"/tmp/kubeadm.cert"

"${prefix}/bin/kubeadm" completion bash >"${prefix}/share/bash-completion/completions/kubeadm"
"${prefix}/bin/kubeadm" completion zsh >"${prefix}/share/zsh/vendor-completions/_kubeadm"
Expand Down
58 changes: 26 additions & 32 deletions tools/kubectl/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,36 @@ RUN <<EOF
curl --silent --show-error --location --fail --output "${prefix}/bin/kubectl" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl"
chmod +x "${prefix}/bin/kubectl"

if test "$(echo -e "1.26.0-beta.0\n${version}" | sort -V | head -n 1)" == "1.26.0-beta.0"; then
echo "Verifying keyless signature for kubectl"
curl --silent --show-error --location --fail --output "/tmp/kubectl.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl.sig"
curl --silent --show-error --location --fail --output "/tmp/kubectl.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubectl" \
--signature "/tmp/kubectl.sig" \
--certificate "/tmp/kubectl.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubectl.sig" \
"/tmp/kubectl.cert"
fi
echo "Verifying keyless signature for kubectl"
curl --silent --show-error --location --fail --output "/tmp/kubectl.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl.sig"
curl --silent --show-error --location --fail --output "/tmp/kubectl.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubectl" \
--signature "/tmp/kubectl.sig" \
--certificate "/tmp/kubectl.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubectl.sig" \
"/tmp/kubectl.cert"

curl --silent --show-error --location --fail --output "${prefix}/bin/kubectl-convert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl-convert"
chmod +x "${prefix}/bin/kubectl-convert"

if test "$(echo -e "1.26.0-beta.0\n${version}" | sort -V | head -n 1)" == "1.26.0-beta.0"; then
echo "Verifying keyless signature for kubectl-convert"
curl --silent --show-error --location --fail --output "/tmp/kubectl-convert.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl-convert.sig"
curl --silent --show-error --location --fail --output "/tmp/kubectl-convert.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl-convert.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubectl-convert" \
--signature "/tmp/kubectl-convert.sig" \
--certificate "/tmp/kubectl-convert.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubectl-convert.sig" \
"/tmp/kubectl-convert.cert"
fi
echo "Verifying keyless signature for kubectl-convert"
curl --silent --show-error --location --fail --output "/tmp/kubectl-convert.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl-convert.sig"
curl --silent --show-error --location --fail --output "/tmp/kubectl-convert.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubectl-convert.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubectl-convert" \
--signature "/tmp/kubectl-convert.sig" \
--certificate "/tmp/kubectl-convert.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubectl-convert.sig" \
"/tmp/kubectl-convert.cert"

"${prefix}/bin/kubectl" completion bash >"${prefix}/share/bash-completion/completions/kubectl"
"${prefix}/bin/kubectl" completion zsh >"${prefix}/share/zsh/vendor-completions/_kubectl"
Expand Down
28 changes: 13 additions & 15 deletions tools/kubelet/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ curl --silent --show-error --location --fail --output "${prefix}/bin/kubelet" \
"https://storage.googleapis.com/kubernetes-release/release/v${version}/bin/linux/${alt_arch}/kubelet"
chmod +x "${prefix}/bin/kubelet"

if test "$(echo -e "1.26.0-beta.0\n${version}" | sort -V | head -n 1)" == "1.26.0-beta.0"; then
echo "Verifying keyless signature for kubelet"
curl --silent --show-error --location --fail --output "/tmp/kubelet.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubelet.sig"
curl --silent --show-error --location --fail --output "/tmp/kubelet.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubelet.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubelet" \
--signature "/tmp/kubelet.sig" \
--certificate "/tmp/kubelet.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubelet.sig" \
"/tmp/kubelet.cert"
fi
echo "Verifying keyless signature for kubelet"
curl --silent --show-error --location --fail --output "/tmp/kubelet.sig" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubelet.sig"
curl --silent --show-error --location --fail --output "/tmp/kubelet.cert" \
"https://dl.k8s.io/release/v${version}/bin/linux/${alt_arch}/kubelet.cert"
COSIGN_EXPERIMENTAL=1 cosign verify-blob "${prefix}/bin/kubelet" \
--signature "/tmp/kubelet.sig" \
--certificate "/tmp/kubelet.cert" \
--certificate-oidc-issuer https://accounts.google.com \
--certificate-identity krel-staging@k8s-releng-prod.iam.gserviceaccount.com
rm -f \
"/tmp/kubelet.sig" \
"/tmp/kubelet.cert"
EOF
2 changes: 1 addition & 1 deletion tools/musl/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /tmp/musl
ARG name
ARG version
RUN <<EOF
curl --silent --show-error --location --fail https://musl.libc.org/releases/musl-1.2.5.tar.gz \
curl --silent --show-error --location --fail https://musl.libc.org/releases/musl-${version}.tar.gz \
| tar --extract --gzip --strip-components=1 --no-same-owner
# install to lib/x86_64-linux-musl?
./configure --prefix="${prefix}"
Expand Down
2 changes: 1 addition & 1 deletion tools/nvm/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ ARG version
RUN <<EOF
export NVM_DIR="${prefix}/opt/nvm"
mkdir -p "${NVM_DIR}"
curl --silent --show-error --location --fail https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
curl --silent --show-error --location --fail https://raw.githubusercontent.com/nvm-sh/nvm/v${version}/install.sh | bash
EOF
1 change: 1 addition & 0 deletions tools/nvm/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
name: nvm
version: "0.39.7"
binary: "false"
check: "" # No version parameter
platforms:
- linux/amd64
Expand Down
6 changes: 3 additions & 3 deletions tools/tailspin/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ cargo build --release --target "${arch}-unknown-linux-gnu"
cp "target/${arch}-unknown-linux-gnu/release/tspin" "${prefix}/bin/"

curl --silent --show-error --location --fail --output "${prefix}/share/bash-completion/completions/tspin" \
--url "https://github.com/bensadeh/tailspin/raw/2.1.0/completions/tspin.bash"
--url "https://github.com/bensadeh/tailspin/raw/${version}/completions/tspin.bash"
curl --silent --show-error --location --fail --output "${prefix}/share/fish/vendor_completions.d/tspin.fish" \
--url "https://github.com/bensadeh/tailspin/raw/2.1.0/completions/tspin.fish"
--url "https://github.com/bensadeh/tailspin/raw/${version}/completions/tspin.fish"
curl --silent --show-error --location --fail --output "${prefix}/share/zsh/vendor-completions/_tspin" \
--url "https://github.com/bensadeh/tailspin/raw/2.1.0/completions/tspin.zsh"
--url "https://github.com/bensadeh/tailspin/raw/${version}/completions/tspin.zsh"
EOF
Loading