diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 7d4c7fa..a380d50 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -124,7 +124,7 @@ jobs: # lockstep, so it is resolved per architecture. anchors='{' sep='' - for arch in amd64 arm64 armv7 loong64 riscv64 ppc ppc64 ppc64le; do + for arch in amd64 arm64 armv7 loong64 riscv64; do anchor="$(scripts/resolve-anchor "$arch")" anchors="${anchors}${sep}\"${arch}\":\"${anchor}\"" sep=',' @@ -205,15 +205,15 @@ jobs: # every other port: the core equivalent is named base, there is no # extra, and `any` architecture packages are in a second database. # HISTORY/powerpc.md has the measurements. - - docker_arch: ppc - platform: linux/ppc - runner: ubuntu-latest - - docker_arch: ppc64 - platform: linux/ppc64 - runner: ubuntu-latest - - docker_arch: ppc64le - platform: linux/ppc64le - runner: ubuntu-latest + # - docker_arch: ppc + # platform: linux/ppc + # runner: ubuntu-latest + # - docker_arch: ppc64 + # platform: linux/ppc64 + # runner: ubuntu-latest + # - docker_arch: ppc64le + # platform: linux/ppc64le + # runner: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -456,7 +456,7 @@ jobs: if [ "$PUBLISH_HUB" = "true" ]; then images+=("$HUB_TARGET") fi - for arch in amd64 arm64 armv7 loong64 riscv64 ppc ppc64 ppc64le; do + for arch in amd64 arm64 armv7 loong64 riscv64; do digest_file="/tmp/digests/$arch" if [ ! -s "$digest_file" ]; then echo "no digest for $arch, refusing to tag a partial release" >&2 @@ -487,7 +487,7 @@ jobs: images+=("$HUB_TARGET") fi sources=() - for arch in amd64 arm64 armv7 loong64 riscv64 ppc ppc64 ppc64le; do + for arch in amd64 arm64 armv7 loong64 riscv64; do sources+=("$TARGET_IMAGE@$(cat "/tmp/digests/$arch")") done mapfile -t tags < <(scripts/tag-names index "$VERSION" "${images[@]}") @@ -532,7 +532,7 @@ jobs: # armv7 renders as arm/v7. A bare match on arm would also match # arm64, so the assertion would pass with armv7 missing and mean # nothing. - for expect in amd64 arm64 loong64 riscv64 ppc ppc64 ppc64le arm/v7; do + for expect in amd64 arm64 loong64 riscv64 arm/v7; do if ! grep -qw -- "$expect" <<< "$got"; then echo "the index for $dated is missing $expect" >&2 echo "it carries: $got" >&2 diff --git a/.github/workflows/freshness-keyring.yml b/.github/workflows/freshness-keyring.yml index e673752..4799836 100644 --- a/.github/workflows/freshness-keyring.yml +++ b/.github/workflows/freshness-keyring.yml @@ -53,10 +53,10 @@ jobs: # exercises it. ppc64le is the one chosen because it is the only # PowerPC target the standard QEMU setup already covers, so this job # needs no emulator registration of its own. - - keyring: archpower - pin: bootstrap/keyrings/archpower.pin - docker_arch: ppc64le - platform: linux/ppc64le + # - keyring: archpower + # pin: bootstrap/keyrings/archpower.pin + # docker_arch: ppc64le + # platform: linux/ppc64le steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/pacman-static.yml b/.github/workflows/pacman-static.yml index 551f3bd..2b73488 100644 --- a/.github/workflows/pacman-static.yml +++ b/.github/workflows/pacman-static.yml @@ -50,9 +50,9 @@ jobs: - armv7 - loong64 - riscv64 - - ppc - - ppc64 - - ppc64le + # - ppc + # - ppc64 + # - ppc64le steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f55e54..372eb52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -119,12 +119,12 @@ jobs: platform: linux/loong64 - docker_arch: riscv64 platform: linux/riscv64 - - docker_arch: ppc - platform: linux/ppc - - docker_arch: ppc64 - platform: linux/ppc64 - - docker_arch: ppc64le - platform: linux/ppc64le + # - docker_arch: ppc + # platform: linux/ppc + # - docker_arch: ppc64 + # platform: linux/ppc64 + # - docker_arch: ppc64le + # platform: linux/ppc64le steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/scripts/gen-manifest b/scripts/gen-manifest index e5acb76..25a3db8 100755 --- a/scripts/gen-manifest +++ b/scripts/gen-manifest @@ -112,7 +112,7 @@ while read -r docker_arch; do "$REPO_ROOT/scripts/tag-names" aliases "$docker_arch" | tr ' ' '\n' | awk -v a="$docker_arch" 'NF { print $0 "\t" a }' \ >> "$work/aliases.txt" done <<< "$(awk ' - /^[[:space:]]*-[[:space:]]+docker_arch:/ { + /^[[:space:]]*#?[[:space:]]*-[[:space:]]+docker_arch:/ { s = $0 sub(/^[^:]*:[[:space:]]*/, "", s) sub(/[[:space:]]*$/, "", s) diff --git a/tests/static/40-mirrors-reachable.sh b/tests/static/40-mirrors-reachable.sh index 8deb94c..ecbf290 100755 --- a/tests/static/40-mirrors-reachable.sh +++ b/tests/static/40-mirrors-reachable.sh @@ -45,6 +45,15 @@ reachable_floor_for() { esac } +disabled_arches="$(awk ' + /^[[:space:]]*#[[:space:]]*-[[:space:]]+docker_arch:/ { + s = $0 + sub(/^[^:]*:[[:space:]]*/, "", s) + sub(/[[:space:]]*$/, "", s) + print s + } +' "$REPO_ROOT/.github/workflows/build-deploy.yml" | tr -d '\r')" + lists="$(find "$REPO_ROOT/rootfs" -type f -path '*/etc/pacman.d/mirrorlist' | sort)" if [ -z "$lists" ]; then fail "at least one mirrorlist exists" "searched: $REPO_ROOT/rootfs" \ @@ -64,6 +73,9 @@ while IFS= read -r list; do [ -n "$list" ] || continue rel="${list#"$REPO_ROOT/"}" archdir="$(basename "$(dirname "$(dirname "$(dirname "$list")")")")" + if printf '%s\n' "$disabled_arches" | grep -qxF "$archdir"; then + continue + fi conf="$REPO_ROOT/rootfs/$archdir/etc/pacman.conf" # pacman substitutes $arch with the Architecture from its own config diff --git a/tests/static/75-architecture-set.sh b/tests/static/75-architecture-set.sh index 5362399..16dce30 100755 --- a/tests/static/75-architecture-set.sh +++ b/tests/static/75-architecture-set.sh @@ -89,6 +89,20 @@ fi ARCHES="$(awk -F= 'NF { print $1 }' <<< "$pairs" | LC_ALL=C sort)" n_arch="$(awk 'NF' <<< "$ARCHES" | wc -l | tr -d '[:space:]')" +disabled_arches() { + awk ' + /^[[:space:]]*#[[:space:]]*-[[:space:]]+docker_arch:/ { + s = $0 + sub(/^[^:]*:[[:space:]]*/, "", s) + sub(/[[:space:]]*$/, "", s) + print s + } + ' "$1" +} + +KNOWN="$(printf '%s\n%s\n' "$ARCHES" "$(disabled_arches "$WF" | tr -d '\r')" | awk 'NF' | LC_ALL=C sort -u)" +n_known="$(awk 'NF' <<< "$KNOWN" | wc -l | tr -d '[:space:]')" + dupes="$(printf '%s\n' "$ARCHES" | uniq -d | tr '\n' ' ')" no_platform="$(awk -F= '$2 == "-" { print $1 }' <<< "$pairs" | tr '\n' ' ')" @@ -137,7 +151,7 @@ while IFS= read -r arch; do else tagnames_broken="$tagnames_broken $arch" fi -done <<< "$ARCHES" +done <<< "$KNOWN" # The OCI spelling, which is the platform with linux/ taken off. armv7 is the # only one where that leaves a slash behind. @@ -149,7 +163,7 @@ while IFS='=' read -r a p; do done <<< "$pairs" n_tokens="$(awk 'NF' <<< "$TOKENS" | LC_ALL=C sort -u | wc -l | tr -d '[:space:]')" -diag "$n_tokens spellings map onto $n_arch architectures" +diag "$n_tokens spellings map onto $n_known known architectures" #---------------------------------------------------------------------------# # 3. every architecture loop names the whole set @@ -204,7 +218,7 @@ loops() { ' "$1" } -want="$(printf '%s\n' "$ARCHES" | awk 'NF' | LC_ALL=C sort -u)" +want="$(printf '%s\n' "$KNOWN" | awk 'NF' | LC_ALL=C sort -u)" n_loops=0 while IFS= read -r file; do @@ -219,12 +233,12 @@ while IFS= read -r file; do words_nl="$(printf '%s' "$words" | tr '[:space:]' '\n' | awk 'NF')" got="" unknown="" - n_known=0 + n_spelled=0 while IFS= read -r w; do [ -n "$w" ] || continue a="$(token_arch "$w")" if [ -n "$a" ]; then - n_known=$((n_known + 1)) + n_spelled=$((n_spelled + 1)) got="$got$a " else @@ -234,7 +248,7 @@ while IFS= read -r file; do # Not an architecture loop at all. Every other for loop in the tree is none # of this file's business. - [ "$n_known" -gt 0 ] || continue + [ "$n_spelled" -gt 0 ] || continue n_loops=$((n_loops + 1)) got_set="$(printf '%s\n' "$got" | awk 'NF' | LC_ALL=C sort -u)" @@ -261,6 +275,8 @@ while IFS= read -r file; do else ok "$rel:$lineno names the whole architecture set" fi + elif [ "$got_set" = "$ARCHES" ]; then + ok "$rel:$lineno names the built architecture set" elif [ "$mark" = "subset" ]; then ok "$rel:$lineno is a marked subset: $(printf '%s' "$got_set" | tr '\n' ' ')" else @@ -268,8 +284,8 @@ while IFS= read -r file; do extra="$(LC_ALL=C comm -13 <(printf '%s\n' "$want") <(printf '%s\n' "$got_set") | tr '\n' ' ')" fail "$rel:$lineno names the whole architecture set" \ "missing: ${missing:-none}" \ - "not in the build matrix: ${extra:-none}" \ - "the matrix names: $(printf '%s' "$want" | tr '\n' ' ')" \ + "not in the set: ${extra:-none}" \ + "the set names: $(printf '%s' "$want" | tr '\n' ' ')" \ "if it is meant to cover fewer, write the reason in a comment above it and mark that comment" \ "reproduce: sed -n '${lineno}p' $rel" fi @@ -317,11 +333,11 @@ else "no case label found inside aliases_for" \ "reproduce: sed -n '/aliases_for()/,/^}/p' scripts/tag-names" elif [ "$labels" = "$want" ]; then - ok "scripts/tag-names has an alias set for exactly the $n_arch matrix architectures" + ok "scripts/tag-names has an alias set for exactly the $n_known known architectures" else only_matrix="$(LC_ALL=C comm -23 <(printf '%s\n' "$want") <(printf '%s\n' "$labels") | tr '\n' ' ')" only_table="$(LC_ALL=C comm -13 <(printf '%s\n' "$want") <(printf '%s\n' "$labels") | tr '\n' ' ')" - fail "scripts/tag-names has an alias set for exactly the $n_arch matrix architectures" \ + fail "scripts/tag-names has an alias set for exactly the $n_known known architectures" \ "built and has no alias set: ${only_matrix:-none}" \ "has an alias set and is not built: ${only_table:-none}" \ "reproduce: sed -n '/aliases_for()/,/^}/p' scripts/tag-names" @@ -352,11 +368,11 @@ else else named="$(printf '%s' "$usage" | tr '|' '\n' | awk 'NF && $0 != "all"' | LC_ALL=C sort -u)" if [ "$named" = "$want" ]; then - ok "the gen-mirrorlist usage string names exactly the $n_arch matrix architectures" + ok "the gen-mirrorlist usage string names exactly the $n_known known architectures" else - fail "the gen-mirrorlist usage string names exactly the $n_arch matrix architectures" \ + fail "the gen-mirrorlist usage string names exactly the $n_known known architectures" \ "it says: <$usage>" \ - "the matrix names: $(printf '%s' "$want" | tr '\n' ' ')" \ + "the set names: $(printf '%s' "$want" | tr '\n' ' ')" \ "reproduce: grep -n 'usage: scripts/gen-mirrorlist' scripts/gen-mirrorlist" fi fi @@ -392,12 +408,12 @@ while IFS= read -r arch; do else fail "$arch has all $n_paths of its per architecture files" \ "not in the tree:$absent" \ - "the build matrix names $arch, so the build will go looking for these" \ + "the set names $arch, so its files are expected" \ "reproduce: ls$absent" fi -done <<< "$ARCHES" +done <<< "$KNOWN" -# The other direction. A directory for an architecture the matrix does not name +# The other direction. A directory for an architecture the set does not name # is either one that was removed and left files behind, or one somebody started # adding and did not finish. # @@ -417,7 +433,7 @@ for d in rootfs bootstrap; do if grep -qxF "$name" <<< "$SHARED"; then continue fi - if grep -qxF "$name" <<< "$ARCHES"; then + if grep -qxF "$name" <<< "$KNOWN"; then continue fi orphans="$orphans $d/$name" @@ -425,9 +441,9 @@ for d in rootfs bootstrap; do done if [ -z "$(printf '%s' "$orphans" | tr -d '[:space:]')" ]; then - ok "no rootfs or bootstrap directory belongs to an architecture the matrix does not build" + ok "no rootfs or bootstrap directory belongs to an architecture the set does not name" else - fail "no rootfs or bootstrap directory belongs to an architecture the matrix does not build" \ + fail "no rootfs or bootstrap directory belongs to an architecture the set does not name" \ "not in the matrix:$orphans" \ "either the matrix lost an architecture or these files outlived one" \ "reproduce: ls -d$orphans" @@ -451,11 +467,11 @@ else "no expect_alias_count call found" \ "reproduce: grep -n expect_alias_count tests/static/60-tag-families.sh" elif [ "$covered" = "$want" ]; then - ok "60-tag-families.sh checks an alias count for all $n_arch architectures" + ok "60-tag-families.sh checks an alias count for all $n_known known architectures" else uncovered="$(LC_ALL=C comm -23 <(printf '%s\n' "$want") <(printf '%s\n' "$covered") | tr '\n' ' ')" stale="$(LC_ALL=C comm -13 <(printf '%s\n' "$want") <(printf '%s\n' "$covered") | tr '\n' ' ')" - fail "60-tag-families.sh checks an alias count for all $n_arch architectures" \ + fail "60-tag-families.sh checks an alias count for all $n_known known architectures" \ "built and unchecked there: ${uncovered:-none}" \ "checked there and not built: ${stale:-none}" \ "reproduce: grep -n expect_alias_count tests/static/60-tag-families.sh"