Skip to content

Commit

Permalink
Fixed builds #2213
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jan 3, 2024
1 parent d2d21b1 commit df8da1f
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 59 deletions.
32 changes: 16 additions & 16 deletions @template/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ARG version
#check-github-release-asset "foo/bar" "${version}" "foo-${version}-linux-amd64.tar.gz"
#check-download ""
#curl --silent --location --fail "" \
#| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner
#| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner
#EOF

# executable
Expand All @@ -57,9 +57,9 @@ ARG version
#
#check-github-release-asset "foo/bar" "${version}" "foo-${version}-linux-amd64.tar.gz"
#check-download ""
#curl --silent --location --fail --output "${prefix}${target}/bin/foo" \
#curl --silent --location --fail --output "${prefix}/bin/foo" \
# ""
#chmod +x "${prefix}${target}/bin/foo"
#chmod +x "${prefix}/bin/foo"
#EOF

# zip
Expand All @@ -84,7 +84,7 @@ ARG version
#url=""
#filename="$(basename "${url}")"
#curl --silent --location --fail --remote-name "${url}"
#unzip -q -o -d "${prefix}${target}/bin" "${filename}"
#unzip -q -o -d "${prefix}/bin" "${filename}"
#EOF

# go
Expand All @@ -99,7 +99,7 @@ ARG version
#check-clone "https://github.com/foo/bar" "v${version}"
#git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/foo/bar .
#make
#cp foo "${prefix}${target}/bin/"
#cp foo "${prefix}/bin/"
#EOF

# rust
Expand All @@ -112,11 +112,11 @@ ARG version
#EOF
#WORKDIR /tmp/github.com/foo/bar
#RUN <<EOF
#source "${target}/etc/profile.d/cargo.sh"
#source "/etc/profile.d/cargo.sh"
#git clone -q --config advice.detachedHead=false --depth 1 --branch "${version}" https://github.com/foo/bar .
#export RUSTFLAGS='-C target-feature=+crt-static'
#cargo build --release --target "${arch}-unknown-linux-gnu"
#cp "target/${arch}-unknown-linux-gnu/release/foo" "${prefix}${target}/bin/"
#cp "target/${arch}-unknown-linux-gnu/release/foo" "${prefix}/bin/"
#EOF

# python
Expand All @@ -130,20 +130,20 @@ ARG version
# python-is-python3
#EOF
#RUN <<EOF
#shiv --output-file "${prefix}${target}/bin/foo" --console-script foo "foo==${version}"
#shiv --output-file "${prefix}/bin/foo" --console-script foo "foo==${version}"
#EOF

# node
#COPY --link --from=nodejs / /
#COPY --link --from=npm / /
#WORKDIR ${prefix}${target}/libexec/foo
#WORKDIR ${prefix}/libexec/foo
#ARG name
#ARG version
#RUN <<EOF
#npm install \
# --omit=dev \
# "foo@${version}"
#ln --symbolic --relative --force "${prefix}${target}/libexec/foo/node_modules/.bin/foo" "${prefix}${target}/bin/"
#ln --symbolic --relative --force "${prefix}/libexec/foo/node_modules/.bin/foo" "${prefix}/bin/"
#EOF

# c
Expand All @@ -159,20 +159,20 @@ ARG version
#WORKDIR /tmp/foo
#RUN <<EOF
##git clone -q --config advice.detachedHead=false --depth 1 --branch "${version}" https://github.com/foo/bar .
#./configure --prefix="${prefix}${target}"
#./configure --prefix="${prefix}"
#make LDFLAGS=-static
#make install
#rm -f "${prefix}${target}/man"
#rm -f "${prefix}/man"
#EOF

# foo
#RUN <<EOF
#touch "${prefix}${target}/foo"
#touch "${prefix}/foo"
#EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
4 changes: 2 additions & 2 deletions tools/huber/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ARG version
#EOF
RUN <<EOF
check-github-release-asset "innobead/huber" "v${version}" "huber-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/huber" \
curl --silent --location --fail --output "${prefix}/bin/huber" \
"https://github.com/innobead/huber/releases/download/v${version}/huber-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/huber"
chmod +x "${prefix}/bin/huber"
EOF
2 changes: 1 addition & 1 deletion tools/qemu/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}"
EOF
WORKDIR /tmp/qemu/build
RUN <<EOF
../configure --prefix="${prefix}${target}" --static --enable-tools --disable-user --disable-gio --target-list="${TARGETS}"
../configure --prefix="${prefix}" --static --enable-tools --disable-user --disable-gio --target-list="${TARGETS}"
make
EOF
RUN make install
2 changes: 1 addition & 1 deletion tools/vale/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ echo " Using ${arch_suffix}"

check-github-release-asset "errata-ai/vale" "v${version}" "vale_${version}_Linux_${arch_suffix}.tar.gz"
curl --silent --location --fail "https://github.com/errata-ai/vale/releases/download/v${version}/vale_${version}_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
vale
EOF
6 changes: 3 additions & 3 deletions tools/vault/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version

COPY <<vault.sh ${prefix}${target}/share/bash-completion/completions/
complete -C ${target}/bin/vault vault
COPY <<vault.sh ${prefix}/share/bash-completion/completions/
complete -C /bin/vault vault
vault.sh

RUN <<EOF
curl --silent --location --fail --remote-name "https://releases.hashicorp.com/vault/${version}/vault_${version}_linux_${alt_arch}.zip"
unzip -q -o -d "${prefix}${target}/bin" "vault_${version}_linux_${alt_arch}.zip"
unzip -q -o -d "${prefix}/bin" "vault_${version}_linux_${alt_arch}.zip"
rm "vault_${version}_linux_${alt_arch}.zip"
EOF
10 changes: 5 additions & 5 deletions tools/vcluster/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ ARG name
ARG version
RUN <<EOF
check-github-release-asset "loft-sh/vcluster" "v${version}" "vcluster-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/vcluster" \
curl --silent --location --fail --output "${prefix}/bin/vcluster" \
"https://github.com/loft-sh/vcluster/releases/download/v${version}/vcluster-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/vcluster"
chmod +x "${prefix}/bin/vcluster"

"${prefix}${target}/bin/vcluster" completion bash >"${prefix}${target}/share/bash-completion/completions/vcluster"
"${prefix}${target}/bin/vcluster" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/vcluster.fish"
"${prefix}${target}/bin/vcluster" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_vcluster"
"${prefix}/bin/vcluster" completion bash >"${prefix}/share/bash-completion/completions/vcluster"
"${prefix}/bin/vcluster" completion fish >"${prefix}/share/fish/vendor_completions.d/vcluster.fish"
"${prefix}/bin/vcluster" completion zsh >"${prefix}/share/zsh/vendor-completions/_vcluster"
EOF
4 changes: 2 additions & 2 deletions tools/vendir/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG name
ARG version
RUN <<EOF
check-github-release-asset "carvel-dev/vendir" "v${version}" "vendir-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/vendir" \
curl --silent --location --fail --output "${prefix}/bin/vendir" \
"https://github.com/carvel-dev/vendir/releases/download/v${version}/vendir-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/vendir"
chmod +x "${prefix}/bin/vendir"
EOF
10 changes: 5 additions & 5 deletions tools/venom/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ ARG name
ARG version
RUN <<EOF
check-github-release-asset "ovh/venom" "v${version}" "venom.linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/venom" \
curl --silent --location --fail --output "${prefix}/bin/venom" \
"https://github.com/ovh/venom/releases/download/v${version}/venom.linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/venom"
chmod +x "${prefix}/bin/venom"

"${prefix}${target}/bin/venom" completion bash >"${prefix}${target}/share/bash-completion/completions/venom"
"${prefix}${target}/bin/venom" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/venom.fish"
"${prefix}${target}/bin/venom" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_venom"
"${prefix}/bin/venom" completion bash >"${prefix}/share/bash-completion/completions/venom"
"${prefix}/bin/venom" completion fish >"${prefix}/share/fish/vendor_completions.d/venom.fish"
"${prefix}/bin/venom" completion zsh >"${prefix}/share/zsh/vendor-completions/_venom"
EOF
8 changes: 4 additions & 4 deletions tools/vexctl/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ RUN <<EOF
check-clone https://github.com/openvex/vexctl "v${version}"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/openvex/vexctl .
make vex
cp vexctl "${prefix}${target}/bin/"
cp vexctl "${prefix}/bin/"

"${prefix}${target}/bin/vexctl" completion bash >"${prefix}${target}/share/bash-completion/completions/vexctl"
"${prefix}${target}/bin/vexctl" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/vexctl.fish"
"${prefix}${target}/bin/vexctl" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_vexctl"
"${prefix}/bin/vexctl" completion bash >"${prefix}/share/bash-completion/completions/vexctl"
"${prefix}/bin/vexctl" completion fish >"${prefix}/share/fish/vendor_completions.d/vexctl.fish"
"${prefix}/bin/vexctl" completion zsh >"${prefix}/share/zsh/vendor-completions/_vexctl"
EOF
2 changes: 1 addition & 1 deletion tools/vexy/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ apt-get -y install --no-install-recommends \
python-is-python3
EOF
RUN <<EOF
shiv --output-file "${prefix}${target}/bin/vexy" --console-script vexy "vexy==${version}"
shiv --output-file "${prefix}/bin/vexy" --console-script vexy "vexy==${version}"
EOF
10 changes: 5 additions & 5 deletions tools/vgrep/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ case "${alt_arch}" in
;;
esac
check-github-release-asset "vrothberg/vgrep" "v${version}" "vgrep_${version}_Linux_${arch_suffix}"
curl --silent --location --fail --output "${prefix}${target}/bin/vgrep" \
curl --silent --location --fail --output "${prefix}/bin/vgrep" \
"https://github.com/vrothberg/vgrep/releases/download/v${version}/vgrep_${version}_Linux_${arch_suffix}"
chmod +x "${prefix}${target}/bin/vgrep"
chmod +x "${prefix}/bin/vgrep"
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
14 changes: 7 additions & 7 deletions tools/vhs/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ check-github-release-asset "charmbracelet/vhs" "v${version}" "vhs_${version}_Lin

echo "### Downloading and installing vhs ${version}"
curl --silent --location --fail "https://github.com/charmbracelet/vhs/releases/download/v${version}/vhs_${version}_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
vhs \
manpages \
completions
mv "${prefix}${target}/bin/manpages/vhs.1.gz" "${prefix}${target}/share/man/man1/"
mv "${prefix}${target}/bin/completions/vhs.bash" "${prefix}${target}/share/bash-completion/completions/vhs"
mv "${prefix}${target}/bin/completions/vhs.fish" "${prefix}${target}/share/fish/vendor_completions.d/vhs.fish"
mv "${prefix}${target}/bin/completions/vhs.zsh" "${prefix}${target}/share/zsh/vendor-completions/_vhs"
mv "${prefix}/bin/manpages/vhs.1.gz" "${prefix}/share/man/man1/"
mv "${prefix}/bin/completions/vhs.bash" "${prefix}/share/bash-completion/completions/vhs"
mv "${prefix}/bin/completions/vhs.fish" "${prefix}/share/fish/vendor_completions.d/vhs.fish"
mv "${prefix}/bin/completions/vhs.zsh" "${prefix}/share/zsh/vendor-completions/_vhs"
rmdir \
"${prefix}${target}/bin/manpages" \
"${prefix}${target}/bin/completions"
"${prefix}/bin/manpages" \
"${prefix}/bin/completions"
EOF
4 changes: 2 additions & 2 deletions tools/vland/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
curl --silent --location --fail --output "${prefix}${target}/bin/vland" \
curl --silent --location --fail --output "${prefix}/bin/vland" \
"https://github.com/parke/vland/raw/${version}/vland"
chmod +x "${prefix}${target}/bin/vland"
chmod +x "${prefix}/bin/vland"
EOF
8 changes: 4 additions & 4 deletions tools/vscode-cli/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ echo " Using ${arch_suffix}"
check-download "https://update.code.visualstudio.com/${version}/cli-linux-${arch_suffix}/stable"

curl --silent --location --fail "https://update.code.visualstudio.com/${version}/cli-linux-${arch_suffix}/stable" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
2 changes: 1 addition & 1 deletion tools/vulnerability-operator/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ COSIGN_EXPERIMENTAL=1 cosign verify-blob "vulnerability-operator_${version}_linu
--certificate-github-workflow-trigger workflow_dispatch

echo "### Extracting vulnerability-operator ${version}"
tar --extract --gzip --file "vulnerability-operator_${version}_linux_${alt_arch}.tar.gz" --directory="${prefix}${target}/bin/" --no-same-owner \
tar --extract --gzip --file "vulnerability-operator_${version}_linux_${alt_arch}.tar.gz" --directory="${prefix}/bin/" --no-same-owner \
vulnerability-operator
EOF

0 comments on commit df8da1f

Please sign in to comment.