Skip to content

Commit be30570

Browse files
authored
Disable the PowerPC builds (#6)
* Disable the PowerPC builds greetings from Port Edwards, Neucom's home on the Usean continent. The three PowerPC ports (ppc, ppc64, ppc64le) are disabled. ArchPOWER answers 403 to a GitHub runner and to the read through proxy beside it, so resolve-anchor fails for all three and the scheduled publish never starts. The build, rootfs, static pacman and archpower keyring rows are commented rather than deleted, so the ports stay known to the architecture set while nothing builds them. tests/static/75-architecture-set.sh reads a commented `- docker_arch:` row as a known but unbuilt port, which keeps the per port files, aliases and anchors checked without a build. Uncomment the rows to bring the ports back. We aim to provide the software that shapes the world of tomorrow. * Stop checking the resources of the disabled ports Two static tests failed on the disabled ports for reasons that are not the build: 40-mirrors-reachable.sh probes every shipped mirrorlist and ArchPOWER answers 403, and gen-manifest reads the architecture set with the same anchor loops and so could not resolve a ppc tag. Both now read a commented `- docker_arch:` row as a disabled port. The mirror list is out of the set to probe, and gen-manifest still resolves the aliases. --------- Co-authored-by: Nemo <328747105+Nemo-010@users.noreply.github.com>
1 parent 1a2b1da commit be30570

7 files changed

Lines changed: 76 additions & 48 deletions

File tree

‎.github/workflows/build-deploy.yml‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
# lockstep, so it is resolved per architecture.
125125
anchors='{'
126126
sep=''
127-
for arch in amd64 arm64 armv7 loong64 riscv64 ppc ppc64 ppc64le; do
127+
for arch in amd64 arm64 armv7 loong64 riscv64; do
128128
anchor="$(scripts/resolve-anchor "$arch")"
129129
anchors="${anchors}${sep}\"${arch}\":\"${anchor}\""
130130
sep=','
@@ -205,15 +205,15 @@ jobs:
205205
# every other port: the core equivalent is named base, there is no
206206
# extra, and `any` architecture packages are in a second database.
207207
# HISTORY/powerpc.md has the measurements.
208-
- docker_arch: ppc
209-
platform: linux/ppc
210-
runner: ubuntu-latest
211-
- docker_arch: ppc64
212-
platform: linux/ppc64
213-
runner: ubuntu-latest
214-
- docker_arch: ppc64le
215-
platform: linux/ppc64le
216-
runner: ubuntu-latest
208+
# - docker_arch: ppc
209+
# platform: linux/ppc
210+
# runner: ubuntu-latest
211+
# - docker_arch: ppc64
212+
# platform: linux/ppc64
213+
# runner: ubuntu-latest
214+
# - docker_arch: ppc64le
215+
# platform: linux/ppc64le
216+
# runner: ubuntu-latest
217217
steps:
218218
- name: Checkout
219219
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -456,7 +456,7 @@ jobs:
456456
if [ "$PUBLISH_HUB" = "true" ]; then
457457
images+=("$HUB_TARGET")
458458
fi
459-
for arch in amd64 arm64 armv7 loong64 riscv64 ppc ppc64 ppc64le; do
459+
for arch in amd64 arm64 armv7 loong64 riscv64; do
460460
digest_file="/tmp/digests/$arch"
461461
if [ ! -s "$digest_file" ]; then
462462
echo "no digest for $arch, refusing to tag a partial release" >&2
@@ -487,7 +487,7 @@ jobs:
487487
images+=("$HUB_TARGET")
488488
fi
489489
sources=()
490-
for arch in amd64 arm64 armv7 loong64 riscv64 ppc ppc64 ppc64le; do
490+
for arch in amd64 arm64 armv7 loong64 riscv64; do
491491
sources+=("$TARGET_IMAGE@$(cat "/tmp/digests/$arch")")
492492
done
493493
mapfile -t tags < <(scripts/tag-names index "$VERSION" "${images[@]}")
@@ -532,7 +532,7 @@ jobs:
532532
# armv7 renders as arm/v7. A bare match on arm would also match
533533
# arm64, so the assertion would pass with armv7 missing and mean
534534
# nothing.
535-
for expect in amd64 arm64 loong64 riscv64 ppc ppc64 ppc64le arm/v7; do
535+
for expect in amd64 arm64 loong64 riscv64 arm/v7; do
536536
if ! grep -qw -- "$expect" <<< "$got"; then
537537
echo "the index for $dated is missing $expect" >&2
538538
echo "it carries: $got" >&2

‎.github/workflows/freshness-keyring.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ jobs:
5353
# exercises it. ppc64le is the one chosen because it is the only
5454
# PowerPC target the standard QEMU setup already covers, so this job
5555
# needs no emulator registration of its own.
56-
- keyring: archpower
57-
pin: bootstrap/keyrings/archpower.pin
58-
docker_arch: ppc64le
59-
platform: linux/ppc64le
56+
# - keyring: archpower
57+
# pin: bootstrap/keyrings/archpower.pin
58+
# docker_arch: ppc64le
59+
# platform: linux/ppc64le
6060
steps:
6161
- name: Checkout
6262
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎.github/workflows/pacman-static.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050
- armv7
5151
- loong64
5252
- riscv64
53-
- ppc
54-
- ppc64
55-
- ppc64le
53+
# - ppc
54+
# - ppc64
55+
# - ppc64le
5656
steps:
5757
- name: Checkout
5858
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ jobs:
119119
platform: linux/loong64
120120
- docker_arch: riscv64
121121
platform: linux/riscv64
122-
- docker_arch: ppc
123-
platform: linux/ppc
124-
- docker_arch: ppc64
125-
platform: linux/ppc64
126-
- docker_arch: ppc64le
127-
platform: linux/ppc64le
122+
# - docker_arch: ppc
123+
# platform: linux/ppc
124+
# - docker_arch: ppc64
125+
# platform: linux/ppc64
126+
# - docker_arch: ppc64le
127+
# platform: linux/ppc64le
128128
steps:
129129
- name: Checkout
130130
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎scripts/gen-manifest‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ while read -r docker_arch; do
112112
"$REPO_ROOT/scripts/tag-names" aliases "$docker_arch" | tr ' ' '\n' | awk -v a="$docker_arch" 'NF { print $0 "\t" a }' \
113113
>> "$work/aliases.txt"
114114
done <<< "$(awk '
115-
/^[[:space:]]*-[[:space:]]+docker_arch:/ {
115+
/^[[:space:]]*#?[[:space:]]*-[[:space:]]+docker_arch:/ {
116116
s = $0
117117
sub(/^[^:]*:[[:space:]]*/, "", s)
118118
sub(/[[:space:]]*$/, "", s)

‎tests/static/40-mirrors-reachable.sh‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ reachable_floor_for() {
4545
esac
4646
}
4747

48+
disabled_arches="$(awk '
49+
/^[[:space:]]*#[[:space:]]*-[[:space:]]+docker_arch:/ {
50+
s = $0
51+
sub(/^[^:]*:[[:space:]]*/, "", s)
52+
sub(/[[:space:]]*$/, "", s)
53+
print s
54+
}
55+
' "$REPO_ROOT/.github/workflows/build-deploy.yml" | tr -d '\r')"
56+
4857
lists="$(find "$REPO_ROOT/rootfs" -type f -path '*/etc/pacman.d/mirrorlist' | sort)"
4958
if [ -z "$lists" ]; then
5059
fail "at least one mirrorlist exists" "searched: $REPO_ROOT/rootfs" \
@@ -64,6 +73,9 @@ while IFS= read -r list; do
6473
[ -n "$list" ] || continue
6574
rel="${list#"$REPO_ROOT/"}"
6675
archdir="$(basename "$(dirname "$(dirname "$(dirname "$list")")")")"
76+
if printf '%s\n' "$disabled_arches" | grep -qxF "$archdir"; then
77+
continue
78+
fi
6779
conf="$REPO_ROOT/rootfs/$archdir/etc/pacman.conf"
6880

6981
# pacman substitutes $arch with the Architecture from its own config

‎tests/static/75-architecture-set.sh‎

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,20 @@ fi
8989
ARCHES="$(awk -F= 'NF { print $1 }' <<< "$pairs" | LC_ALL=C sort)"
9090
n_arch="$(awk 'NF' <<< "$ARCHES" | wc -l | tr -d '[:space:]')"
9191

92+
disabled_arches() {
93+
awk '
94+
/^[[:space:]]*#[[:space:]]*-[[:space:]]+docker_arch:/ {
95+
s = $0
96+
sub(/^[^:]*:[[:space:]]*/, "", s)
97+
sub(/[[:space:]]*$/, "", s)
98+
print s
99+
}
100+
' "$1"
101+
}
102+
103+
KNOWN="$(printf '%s\n%s\n' "$ARCHES" "$(disabled_arches "$WF" | tr -d '\r')" | awk 'NF' | LC_ALL=C sort -u)"
104+
n_known="$(awk 'NF' <<< "$KNOWN" | wc -l | tr -d '[:space:]')"
105+
92106
dupes="$(printf '%s\n' "$ARCHES" | uniq -d | tr '\n' ' ')"
93107
no_platform="$(awk -F= '$2 == "-" { print $1 }' <<< "$pairs" | tr '\n' ' ')"
94108

@@ -137,7 +151,7 @@ while IFS= read -r arch; do
137151
else
138152
tagnames_broken="$tagnames_broken $arch"
139153
fi
140-
done <<< "$ARCHES"
154+
done <<< "$KNOWN"
141155

142156
# The OCI spelling, which is the platform with linux/ taken off. armv7 is the
143157
# only one where that leaves a slash behind.
@@ -149,7 +163,7 @@ while IFS='=' read -r a p; do
149163
done <<< "$pairs"
150164

151165
n_tokens="$(awk 'NF' <<< "$TOKENS" | LC_ALL=C sort -u | wc -l | tr -d '[:space:]')"
152-
diag "$n_tokens spellings map onto $n_arch architectures"
166+
diag "$n_tokens spellings map onto $n_known known architectures"
153167

154168
#---------------------------------------------------------------------------#
155169
# 3. every architecture loop names the whole set
@@ -204,7 +218,7 @@ loops() {
204218
' "$1"
205219
}
206220

207-
want="$(printf '%s\n' "$ARCHES" | awk 'NF' | LC_ALL=C sort -u)"
221+
want="$(printf '%s\n' "$KNOWN" | awk 'NF' | LC_ALL=C sort -u)"
208222
n_loops=0
209223

210224
while IFS= read -r file; do
@@ -219,12 +233,12 @@ while IFS= read -r file; do
219233
words_nl="$(printf '%s' "$words" | tr '[:space:]' '\n' | awk 'NF')"
220234
got=""
221235
unknown=""
222-
n_known=0
236+
n_spelled=0
223237
while IFS= read -r w; do
224238
[ -n "$w" ] || continue
225239
a="$(token_arch "$w")"
226240
if [ -n "$a" ]; then
227-
n_known=$((n_known + 1))
241+
n_spelled=$((n_spelled + 1))
228242
got="$got$a
229243
"
230244
else
@@ -234,7 +248,7 @@ while IFS= read -r file; do
234248

235249
# Not an architecture loop at all. Every other for loop in the tree is none
236250
# of this file's business.
237-
[ "$n_known" -gt 0 ] || continue
251+
[ "$n_spelled" -gt 0 ] || continue
238252
n_loops=$((n_loops + 1))
239253

240254
got_set="$(printf '%s\n' "$got" | awk 'NF' | LC_ALL=C sort -u)"
@@ -261,15 +275,17 @@ while IFS= read -r file; do
261275
else
262276
ok "$rel:$lineno names the whole architecture set"
263277
fi
278+
elif [ "$got_set" = "$ARCHES" ]; then
279+
ok "$rel:$lineno names the built architecture set"
264280
elif [ "$mark" = "subset" ]; then
265281
ok "$rel:$lineno is a marked subset: $(printf '%s' "$got_set" | tr '\n' ' ')"
266282
else
267283
missing="$(LC_ALL=C comm -23 <(printf '%s\n' "$want") <(printf '%s\n' "$got_set") | tr '\n' ' ')"
268284
extra="$(LC_ALL=C comm -13 <(printf '%s\n' "$want") <(printf '%s\n' "$got_set") | tr '\n' ' ')"
269285
fail "$rel:$lineno names the whole architecture set" \
270286
"missing: ${missing:-none}" \
271-
"not in the build matrix: ${extra:-none}" \
272-
"the matrix names: $(printf '%s' "$want" | tr '\n' ' ')" \
287+
"not in the set: ${extra:-none}" \
288+
"the set names: $(printf '%s' "$want" | tr '\n' ' ')" \
273289
"if it is meant to cover fewer, write the reason in a comment above it and mark that comment" \
274290
"reproduce: sed -n '${lineno}p' $rel"
275291
fi
@@ -317,11 +333,11 @@ else
317333
"no case label found inside aliases_for" \
318334
"reproduce: sed -n '/aliases_for()/,/^}/p' scripts/tag-names"
319335
elif [ "$labels" = "$want" ]; then
320-
ok "scripts/tag-names has an alias set for exactly the $n_arch matrix architectures"
336+
ok "scripts/tag-names has an alias set for exactly the $n_known known architectures"
321337
else
322338
only_matrix="$(LC_ALL=C comm -23 <(printf '%s\n' "$want") <(printf '%s\n' "$labels") | tr '\n' ' ')"
323339
only_table="$(LC_ALL=C comm -13 <(printf '%s\n' "$want") <(printf '%s\n' "$labels") | tr '\n' ' ')"
324-
fail "scripts/tag-names has an alias set for exactly the $n_arch matrix architectures" \
340+
fail "scripts/tag-names has an alias set for exactly the $n_known known architectures" \
325341
"built and has no alias set: ${only_matrix:-none}" \
326342
"has an alias set and is not built: ${only_table:-none}" \
327343
"reproduce: sed -n '/aliases_for()/,/^}/p' scripts/tag-names"
@@ -352,11 +368,11 @@ else
352368
else
353369
named="$(printf '%s' "$usage" | tr '|' '\n' | awk 'NF && $0 != "all"' | LC_ALL=C sort -u)"
354370
if [ "$named" = "$want" ]; then
355-
ok "the gen-mirrorlist usage string names exactly the $n_arch matrix architectures"
371+
ok "the gen-mirrorlist usage string names exactly the $n_known known architectures"
356372
else
357-
fail "the gen-mirrorlist usage string names exactly the $n_arch matrix architectures" \
373+
fail "the gen-mirrorlist usage string names exactly the $n_known known architectures" \
358374
"it says: <$usage>" \
359-
"the matrix names: $(printf '%s' "$want" | tr '\n' ' ')" \
375+
"the set names: $(printf '%s' "$want" | tr '\n' ' ')" \
360376
"reproduce: grep -n 'usage: scripts/gen-mirrorlist' scripts/gen-mirrorlist"
361377
fi
362378
fi
@@ -392,12 +408,12 @@ while IFS= read -r arch; do
392408
else
393409
fail "$arch has all $n_paths of its per architecture files" \
394410
"not in the tree:$absent" \
395-
"the build matrix names $arch, so the build will go looking for these" \
411+
"the set names $arch, so its files are expected" \
396412
"reproduce: ls$absent"
397413
fi
398-
done <<< "$ARCHES"
414+
done <<< "$KNOWN"
399415

400-
# The other direction. A directory for an architecture the matrix does not name
416+
# The other direction. A directory for an architecture the set does not name
401417
# is either one that was removed and left files behind, or one somebody started
402418
# adding and did not finish.
403419
#
@@ -417,17 +433,17 @@ for d in rootfs bootstrap; do
417433
if grep -qxF "$name" <<< "$SHARED"; then
418434
continue
419435
fi
420-
if grep -qxF "$name" <<< "$ARCHES"; then
436+
if grep -qxF "$name" <<< "$KNOWN"; then
421437
continue
422438
fi
423439
orphans="$orphans $d/$name"
424440
done <<< "$(find "$REPO_ROOT/$d" -mindepth 1 -maxdepth 1 -type d | LC_ALL=C sort)"
425441
done
426442

427443
if [ -z "$(printf '%s' "$orphans" | tr -d '[:space:]')" ]; then
428-
ok "no rootfs or bootstrap directory belongs to an architecture the matrix does not build"
444+
ok "no rootfs or bootstrap directory belongs to an architecture the set does not name"
429445
else
430-
fail "no rootfs or bootstrap directory belongs to an architecture the matrix does not build" \
446+
fail "no rootfs or bootstrap directory belongs to an architecture the set does not name" \
431447
"not in the matrix:$orphans" \
432448
"either the matrix lost an architecture or these files outlived one" \
433449
"reproduce: ls -d$orphans"
@@ -451,11 +467,11 @@ else
451467
"no expect_alias_count call found" \
452468
"reproduce: grep -n expect_alias_count tests/static/60-tag-families.sh"
453469
elif [ "$covered" = "$want" ]; then
454-
ok "60-tag-families.sh checks an alias count for all $n_arch architectures"
470+
ok "60-tag-families.sh checks an alias count for all $n_known known architectures"
455471
else
456472
uncovered="$(LC_ALL=C comm -23 <(printf '%s\n' "$want") <(printf '%s\n' "$covered") | tr '\n' ' ')"
457473
stale="$(LC_ALL=C comm -13 <(printf '%s\n' "$want") <(printf '%s\n' "$covered") | tr '\n' ' ')"
458-
fail "60-tag-families.sh checks an alias count for all $n_arch architectures" \
474+
fail "60-tag-families.sh checks an alias count for all $n_known known architectures" \
459475
"built and unchecked there: ${uncovered:-none}" \
460476
"checked there and not built: ${stale:-none}" \
461477
"reproduce: grep -n expect_alias_count tests/static/60-tag-families.sh"

0 commit comments

Comments
 (0)