Skip to content

[release/4.154.x] Backport Alpine CDN bootstrap fix - #5459

Merged
mattleibow merged 1 commit into
release/4.154.xfrom
mattleibow-alpine-bootstrap-4-154-backport
Oct 28, 2026
Merged

mattleibow merged 1 commit into
release/4.154.xfrom
mattleibow-alpine-bootstrap-4-154-backport

Conversation

@mattleibow

@mattleibow mattleibow commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Clean git cherry-pick -x of 48e2083 (#5414) onto release/4.154.x, with no adaptation. The same obsolete GitLab bootstrap endpoint remains on this servicing branch. All ten Alpine Docker jobs in the reported 4.150.6 package build 3118571 timed out connecting to that endpoint before compilation; subsequent missing-output publication errors were secondary.

Use the official Alpine CDN's exact apk-tools-static-2.14.6-r3.apk, verify SHA-256 before extracting sbin/apk.static, and bound curl connection/transfer timeouts. Preserve signed target-sysroot installs and the existing CA path. Include only the original directly related bootstrap documentation.

Scope: scripts/infra/native/linux/docker/alpine/Dockerfile and documentation/dev/building-linux.md; 27 insertions, 8 deletions. No native source, submodule, dependency-feed, milestone, pipeline redesign, or test-infrastructure changes.

Related issues

Related to #5414 (main fix).

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — bootstrap/build-only; no public API or application behavior changes.

Testing

Local validation on macOS:

  • git diff --check origin/release/4.154.x...HEAD — passed.
  • git diff 48e2083869ab2b154b2058c32682391d1c77e403 HEAD -- scripts/infra/native/linux/docker/alpine/Dockerfile documentation/dev/building-linux.md — passed, empty output; both files exactly match the main fix.
  • python3 - (inline bootstrap validation harness) — passed: joins Dockerfile continuation lines and runs bash -n -c on all four RUN instructions; reads pins from the Dockerfile; downloads the pinned archive with the Dockerfile's curl flags; verifies via sha256sum -c -; extracts via tar -xzf ... -C ... sbin/apk.static; confirms the extracted file is a statically linked x86-64 ELF; rejects an all-zero checksum and a nonexistent package (HTTP 404, nonzero curl status); asserts verification precedes extraction/execution and no unsigned-install option was introduced. Temporary files were removed. The harness initially had a continuation-parsing error and assumed curl's HTTP-error exit code was always 22; these harness assumptions were corrected before the successful run (local curl returns 56 for HTTP 404).
  • docker info --format '{{.OSType}}/{{.Architecture}}' — failed: Docker daemon unavailable at the configured Colima socket. No Alpine Docker image build, Linux execution of apk.static, signed sysroot-install execution, or full native build was run locally. Those remain CI validation.

No new tests were added: this is an exact two-file servicing backport of the already-reviewed bootstrap fix, with direct download/failure-path checks rather than new test infrastructure. The managed test solution was not run because no managed/native-library code changed and it does not exercise Docker bootstrap. No native downloads or source builds were invoked.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Added or updated accurate source /// documentation and regenerated bindings when applicable
  • Native change? Companion mono/skia PR linked above and bindings regenerated

[Native/Alpine] Bootstrap from a pinned Alpine CDN package (#5414)

Context: #4013
Context: https://dev.azure.com/dnceng/internal/_build/results?buildId=3112792
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1645006
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1645300

Remove the GitLab generic-package endpoint from Alpine cross-image
bootstrap. October 22 public and internal builds failed before native
compilation while connecting to gitlab.alpinelinux.org:443. One internal
x64 download spent approximately 852 seconds exhausting six attempts.
The same main commit had downloaded and checksum-verified the artifact
successfully on October 20. DNS resolved during investigation, but HTTPS
connections also timed out from the developer machine, including forced
IPv4; this was not confined to 1ES. The exact server or routing fault
remains unconfirmed.

The earlier retry fix in #4013 handled transient GitLab HTTP 500 responses,
but retries cannot repair sustained endpoint unavailability. Use Alpine's
reachable package-distribution CDN instead of its GitLab package registry.
Replace the standalone apk.static 2.12.14 download with the exact
apk-tools-static-2.14.6-r3.apk archive from the existing v3.21/main/x86_64
repository, and pin its SHA-256 before extracting sbin/apk.static.
The x86_64 executable runs on the cross-build host; APK_ARCH continues to
select the target sysroot rather than the bootstrap tool architecture.

Retain curl's HTTP failure detection and five retries, adding a 20-second
connection timeout and 120-second transfer limit per attempt. Preserve
signed fontconfig-dev installation and the explicit Azure Linux CA-bundle
path. Missing artifacts and checksum mismatches stop the build; do not
probe alternate tools or bypass verification. Document updating the exact
package version and archive checksum together. These pins constrain the
bootstrap artifact, not the versions resolved from Alpine's package feeds.

Validation independently verified the embedded executable's Alpine
RSA-SHA256 signature, exercised signed fontconfig-dev installation for
x64, arm, arm64, riscv64 and loongarch64, and rejected both a wrong checksum
and an unavailable package. Public build 1645300 tested head d96d97a
through its PR merge ref and passed the ten Alpine native jobs, covering
those five architectures with and without nodeps. Its x64 image log shows
an actual archive download and successful checksum verification, not a
cached bootstrap layer. The overall run failed in the non-Alpine Linux
x86 job; the Alpine results do not imply a green pipeline.

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot App <[email protected]>
(cherry picked from commit 48e2083)
@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 5459

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5459"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-5459/packages --name skiasharp-pr-5459
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-5459

@github-actions

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5459

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 66 slower · 🟢 20 faster

  • 🔴 MatrixMapPointsBenchmark.MapPoint(Points: 4096) · Windows · 27.45 µs → 78.50 µs (+186%)
  • 🔴 MatrixMapPointsBenchmark.MapPoint(Points: 256) · Windows · 1.75 µs → 4.91 µs (+180%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 4096) · Linux · 2.05 µs → 3.20 µs (+56%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 256) · Linux · 177.1 ns → 258.9 ns (+46%)
  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 11.68 µs → 17.02 µs (+46%)
  • …and 81 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26526.4)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.05 µs 3.20 µs 🔴 +56%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 177.1 ns 258.9 ns 🔴 +46%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 78.52 µs 109.36 µs 🔴 +39%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 201.37 µs 264.40 µs 🔴 +31%
ColorMathBenchmark.ToColor(Colors: 4096) 11.20 µs 14.28 µs 🔴 +28%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 760.62 µs 948.19 µs 🔴 +25%
ColorParseBenchmark.Parse(Iterations: 1000) 59.79 µs 74.26 µs 🔴 +24%
PathBoundsBenchmark.TightBounds(Points: 64) 824.3 ns 1.02 µs 🔴 +24%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.60 ms 1.98 ms 🔴 +23%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.30 ms 7.74 ms 🔴 +23%
CanvasDrawBenchmark.Draw(Shapes: 64) 3.42 ms 4.18 ms 🔴 +22%
CanvasDrawBenchmark.Draw(Shapes: 512) 27.26 ms 33.30 ms 🔴 +22%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 291.49 µs 355.17 µs 🔴 +22%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.09 ms 1.33 ms 🔴 +21%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 208.39 µs 251.88 µs 🔴 +21%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 3.30 ms 3.96 ms 🔴 +20%
ColorMathBenchmark.ToColorF(Colors: 4096) 10.94 µs 13.12 µs 🔴 +20%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 146.97 µs 175.61 µs 🔴 +19%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 61.95 µs 73.99 µs 🔴 +19%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 571.97 µs 680.31 µs 🔴 +19%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.23 ms 2.64 ms 🔴 +18%
MatrixOpsBenchmark.Concat(Count: 4096) 188.14 µs 221.36 µs 🔴 +18%
PathBoundsBenchmark.TightBounds(Points: 1024) 9.13 µs 10.70 µs 🔴 +17%
ColorMathBenchmark.PreMultiply(Colors: 4096) 11.26 µs 13.07 µs 🔴 +16%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 3.99 µs 4.62 µs 🔴 +16%
…and 9 more

Windows

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26526.4)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 27.45 µs 78.50 µs 🔴 +186%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.75 µs 4.91 µs 🔴 +180%
ColorMathBenchmark.ToColor(Colors: 4096) 11.68 µs 17.02 µs 🔴 +46%
MatrixMapPointsBenchmark.MapRect(Points: 256) 11.18 µs 7.96 µs 🟢 -29%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 129.47 µs 166.74 µs 🔴 +29%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 8.03 µs 10.25 µs 🔴 +28%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 174.98 µs 128.28 µs 🟢 -27%
MatrixOpsBenchmark.Concat(Count: 4096) 225.36 µs 282.71 µs 🔴 +25%
ColorMathBenchmark.ToColorF(Colors: 4096) 17.34 µs 13.30 µs 🟢 -23%
RuntimeEffectShaderBenchmark.DrawFrame 968.86 µs 1.17 ms 🔴 +21%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 217.5 ns 176.5 ns 🟢 -19%
MatrixMapPointsBenchmark.MapVector(Points: 256) 7.45 µs 8.77 µs 🔴 +18%
PathBoundsBenchmark.TightBounds(Points: 1024) 17.08 µs 20.00 µs 🔴 +17%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.47 ms 2.88 ms 🔴 +16%
CanvasDrawBenchmark.Draw(Shapes: 512) 19.72 ms 22.84 ms 🔴 +16%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 120.83 µs 139.69 µs 🔴 +16%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.70 µs 2.29 µs 🟢 -15%
PathBoundsBenchmark.TightBounds(Points: 64) 1.65 µs 1.90 µs 🔴 +15%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 112.55 µs 128.99 µs 🔴 +15%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 857.06 µs 739.51 µs 🟢 -14%
MatrixOpsBenchmark.Invert(Count: 4096) 122.90 µs 136.49 µs 🔴 +11%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.20 ms 2.89 ms 🟢 -10%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 2.33 ms 2.13 ms 🟢 -8%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 10.91 ms 10.13 ms 🟢 -7%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 319.88 µs 338.95 µs 🔴 +6%
…and 3 more

macOS

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26526.4)

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 905.45 µs 656.64 µs 🟢 -27%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.84 µs 2.32 µs 🔴 +26%
ColorParseBenchmark.Parse(Iterations: 1000) 70.52 µs 88.76 µs 🔴 +26%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 157.3 ns 197.0 ns 🔴 +25%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.75 ms 1.40 ms 🟢 -20%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.80 µs 6.94 µs 🔴 +20%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.00 ms 2.43 ms 🟢 -19%
MatrixOpsBenchmark.Invert(Count: 4096) 91.48 µs 75.96 µs 🟢 -17%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 745.08 µs 621.15 µs 🟢 -17%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.12 ms 936.55 µs 🟢 -16%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 21.14 µs 24.23 µs 🔴 +15%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.25 µs 1.41 µs 🔴 +13%
MatrixMapPointsBenchmark.MapRect(Points: 256) 3.68 µs 3.23 µs 🟢 -12%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.89 ms 1.67 ms 🟢 -12%
MatrixMapPointsBenchmark.MapVector(Points: 256) 2.78 µs 3.05 µs 🔴 +10%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 231.18 µs 253.51 µs 🔴 +10%
MatrixOpsBenchmark.Concat(Count: 4096) 128.88 µs 140.36 µs 🔴 +9%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.62 ms 1.48 ms 🟢 -9%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 44.08 µs 47.79 µs 🔴 +8%
ColorMathBenchmark.ToColor(Colors: 4096) 21.89 µs 20.15 µs 🟢 -8%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.97 µs 7.49 µs 🔴 +8%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 8.51 µs 9.07 µs 🔴 +7%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 78.49 µs 83.68 µs 🔴 +7%
ColorMathBenchmark.PreMultiply(Colors: 4096) 9.96 µs 10.56 µs 🔴 +6%

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow merged commit 76960ec into release/4.154.x Oct 28, 2026
112 checks passed
@mattleibow
mattleibow deleted the mattleibow-alpine-bootstrap-4-154-backport branch October 28, 2026 01:49
@github-actions github-actions Bot added this to the 4.154.1 milestone Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant