-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from infosiftr/reproducible-rootfs
Adjust tarball creation to be reproducible
- Loading branch information
Showing
64 changed files
with
751 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
# see also "hack-unstable.sh" | ||
jq ' | ||
.matrix.include += [ | ||
.matrix.include[] | ||
| select(.name | test(" [(].+[)]") | not) # ignore any existing munged builds | ||
| select(.os | startswith("windows-") | not) | ||
| select(.meta.froms | any(startswith("debian:") or startswith("alpine:"))) | ||
| .name += " (unstable)" | ||
| .runs.prepare += ([ | ||
"./hack-unstable.sh " + (.meta.entries[].directory | @sh), | ||
"if git diff --exit-code; then exit 1; fi", # trust, but verify (if hack-unstable did not modify anything, we want to bail quickly) | ||
empty | ||
] | map("\n" + .) | add) | ||
| .runs.pull = "" # pulling images does not make sense here (we just changed them) | ||
] | ||
' "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# this isn't used for the official published images anymore, but is included for backwards compatibility | ||
# see https://github.com/docker-library/bashbrew/issues/51 | ||
FROM scratch | ||
ADD busybox.tar.xz / | ||
ADD busybox.tar.gz / | ||
CMD ["sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,8 @@ Maintainers: Tianon Gravi <[email protected]> (@tianon), | |
Joseph Ferguson <[email protected]> (@yosifkit) | ||
GitRepo: $gitHubUrl.git | ||
GitCommit: $selfCommit | ||
Builder: oci-import | ||
File: index.json | ||
EOH | ||
for arch in "${arches[@]}"; do | ||
commit="${archCommits[$arch]}" | ||
|
@@ -97,6 +99,7 @@ for version; do | |
fi | ||
versionAliases+=( latest ) | ||
|
||
actualArches=() | ||
declare -A archLatestDir=() | ||
for variant in "${variants[@]}"; do | ||
dir="$version/$variant" | ||
|
@@ -107,25 +110,31 @@ for version; do | |
variantArches=() | ||
for arch in "${arches[@]}"; do | ||
archCommit="${archCommits[$arch]}" | ||
if wget --quiet --spider -O /dev/null -o /dev/null "$rawGitUrl/$archCommit/$dir/busybox.tar.xz"; then | ||
if wget --quiet --spider -O /dev/null -o /dev/null "$rawGitUrl/$archCommit/$dir/$arch/rootfs.tar.gz"; then | ||
variantArches+=( "$arch" ) | ||
: "${archLatestDir[$arch]:=$dir}" # record the first supported directory per architecture for "latest" and friends | ||
if [ -z "${archLatestDir[$arch]:-}" ]; then | ||
# record the first supported directory per architecture for "latest" and friends | ||
archLatestDir["$arch"]="$dir/$arch" | ||
actualArches+=( "$arch" ) | ||
fi | ||
fi | ||
done | ||
|
||
if _tags "${variantAliases[@]}"; then | ||
if [ "${#variantArches[@]}" -gt 0 ] && _tags "${variantAliases[@]}"; then | ||
cat <<-EOE | ||
Architectures: $(join ', ' "${variantArches[@]}") | ||
Directory: $dir | ||
EOE | ||
for arch in "${variantArches[@]}"; do | ||
echo "$arch-Directory: $dir/$arch" | ||
done | ||
fi | ||
done | ||
|
||
if _tags "${versionAliases[@]}"; then | ||
if [ "${#actualArches[@]}" -gt 0 ] && _tags "${versionAliases[@]}"; then | ||
cat <<-EOE | ||
Architectures: $(join ', ' "${arches[@]}") | ||
Architectures: $(join ', ' "${actualArches[@]}") | ||
EOE | ||
for arch in "${arches[@]}"; do | ||
for arch in "${actualArches[@]}"; do | ||
archDir="${archLatestDir[$arch]}" | ||
cat <<-EOA | ||
${arch}-Directory: $archDir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
if [ "$#" -eq 0 ]; then | ||
set -- */*/ | ||
fi | ||
|
||
set -x | ||
|
||
# This is used to modify "Dockerfile.builder" for architectures that are not (yet) supported by stable releases (notably, riscv64). | ||
sed -ri \ | ||
-e 's/^(FROM debian:)[^ -]+/\1unstable/g' \ | ||
-e 's/^(FROM alpine:)[^ -]+/\1edge/g' \ | ||
"${@/%//Dockerfile.builder}" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.