Skip to content

Commit 3bb23bd

Browse files
committed
fix(asio): symlink-free windows archive + CN mirrors
Upstream's tag archives (tar.gz AND zip) both contain the POSIX symlinks asio/include -> ../include and asio/src -> ../src, so switching encodings could not fix the Windows extraction failure (tar.exe cannot materialize them; job exits 127 right after download). Upstream publishes no symlink-free asset for 1.38.x (no GitHub release assets; SourceForge stops at 1.36.0). Windows now uses a repackaged variant of the upstream tag tarball with only those two symlink entries removed (tar --delete + gzip -n -9; all 1544 regular files byte-identical, provenance in xlings-res/asio README), hosted at github.com/xlings-res/asio (GLOBAL) and gitcode.com/mcpp-res/asio (CN). Linux/macOS keep the canonical upstream tarball as GLOBAL and gain a byte-identical CN mirror on mcpp-res. All hosted assets sha256-verified after upload. Verified locally with pinned mcpp 0.0.94: descriptor lints + xpkg parse pass, and the asio member test passes cold (6/6).
1 parent 8da9ade commit 3bb23bd

2 files changed

Lines changed: 51 additions & 28 deletions

File tree

.agents/docs/2026-07-17-add-asio-plan.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,28 @@ consumer contract and requires its own compatibility evidence.
3232
- License: Boost Software License 1.0 (`BSL-1.0`), confirmed from upstream
3333
`COPYING` and `LICENSE_1_0.txt` at the tag.
3434
- Linux/macOS archive: tag tarball, SHA-256
35-
`2827b229972be80cdb14e5497962fa393d1adf036b5869e2b9c99f644daadacc`.
36-
- Windows archive: the same tag's ZIP encoding, SHA-256
37-
`c4557a5a07ff8aa9c37bd141b7d1a6ba2b1bad5557d97762ad27aaf0091c665b`.
38-
39-
Two independent downloads of each archive encoding produced the same
40-
platform-specific SHA-256. Both archives are wrapped in
41-
`asio-asio-1-38-1/`, and their public entry header is
42-
`asio-asio-1-38-1/include/asio.hpp`. Therefore `*/include` is the required
35+
`2827b229972be80cdb14e5497962fa393d1adf036b5869e2b9c99f644daadacc`,
36+
CN-mirrored byte-identically at
37+
`https://gitcode.com/mcpp-res/asio/releases/download/1.38.1/asio-1.38.1.tar.gz`.
38+
- Windows archive: `asio-1.38.1-nosymlinks.tar.gz`, SHA-256
39+
`77f74094bb12cd867a6edbf5736bbed816c6ce0906e880de8573097a81714d89`, hosted at
40+
`https://github.com/xlings-res/asio/releases/download/1.38.1/` (GLOBAL) and
41+
`https://gitcode.com/mcpp-res/asio/releases/download/1.38.1/` (CN).
42+
43+
Two independent downloads of the upstream tarball produced the same SHA-256.
44+
All archives are wrapped in `asio-asio-1-38-1/`, and their public entry header
45+
is `asio-asio-1-38-1/include/asio.hpp`. Therefore `*/include` is the required
4346
consumer include root.
4447

45-
The tag tarball also contains `asio/include -> ../include` and
46-
`asio/src -> ../src` POSIX symlinks. The Windows xlings extraction path exited
47-
with code 127 immediately after downloading that tarball. The Windows entry
48-
therefore uses GitHub's ZIP encoding of the same tagged commit, following the
49-
repository's existing platform-specific archive pattern.
48+
Both upstream tag archive encodings (tar.gz and zip) contain
49+
`asio/include -> ../include` and `asio/src -> ../src` POSIX symlink entries.
50+
The Windows extraction path (`tar.exe` via xlings) cannot materialize them, so
51+
both encodings fail on the Windows runner, and upstream publishes no
52+
symlink-free asset for 1.38.x (GitHub has no release assets; SourceForge stops
53+
at 1.36.0). The Windows entry therefore uses a repackaged variant of the
54+
upstream tag tarball with only those two symlink entries removed
55+
(`tar --delete` + `gzip -n -9`); all 1544 regular files are byte-identical to
56+
upstream. Provenance is documented in the `xlings-res/asio` repository README.
5057

5158
The upstream tag is annotated but not cryptographically signed. Reproducibility
5259
is enforced by the descriptor's pinned archive digest.
@@ -60,8 +67,8 @@ so the package uses an inline Form B descriptor at
6067
- namespace: `compat`;
6168
- full package name: `compat.asio`;
6269
- published version: bare version `1.38.1`;
63-
- platforms: Linux and macOS use the tag tarball; Windows uses the tag ZIP to
64-
avoid the tarball's POSIX symlink extraction failure;
70+
- platforms: Linux and macOS use the tag tarball; Windows uses the repackaged
71+
symlink-free tarball to avoid the POSIX symlink extraction failure;
6572
- include root: `*/include`;
6673
- build target: a generated C anchor provides the buildable library target
6774
required by the current package resolver;
@@ -90,13 +97,16 @@ workflow pin (`MCPP_VERSION = "0.0.94"`).
9097

9198
## 4. URL and mirror decision
9299

93-
No authorized, byte-identical `mcpp-res` CN asset is available for this
94-
contribution. The descriptor therefore uses the plain canonical upstream URL,
95-
which is the current repository's supported fallback. It does not fabricate a
96-
CN entry or alias the upstream URL as a CN mirror.
100+
Linux/macOS keep the canonical upstream GitHub tarball as GLOBAL; a
101+
byte-identical copy of that tarball is uploaded to
102+
`gitcode.com/mcpp-res/asio` as the CN mirror (same SHA-256, verified after
103+
upload).
97104

98-
A maintainer may add a legitimate CN mirror later by uploading the exact same
99-
bytes for each platform archive and retaining its pinned SHA-256.
105+
Windows cannot use either upstream tag archive encoding (both carry the POSIX
106+
symlinks), so its GLOBAL asset is the repackaged symlink-free tarball hosted
107+
in the ecosystem's resource org `github.com/xlings-res/asio`, with a
108+
byte-identical CN copy on `gitcode.com/mcpp-res/asio`. Both hosts were
109+
sha256-verified after upload against the descriptor's pinned digest.
100110

101111
## 5. Consumer and test design
102112

pkgs/c/compat.asio.lua

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,36 @@ package = {
1313
xpm = {
1414
linux = {
1515
["1.38.1"] = {
16-
url = "https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-38-1.tar.gz",
16+
url = {
17+
GLOBAL = "https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-38-1.tar.gz",
18+
CN = "https://gitcode.com/mcpp-res/asio/releases/download/1.38.1/asio-1.38.1.tar.gz",
19+
},
1720
sha256 = "2827b229972be80cdb14e5497962fa393d1adf036b5869e2b9c99f644daadacc",
1821
},
1922
},
2023
macosx = {
2124
["1.38.1"] = {
22-
url = "https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-38-1.tar.gz",
25+
url = {
26+
GLOBAL = "https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-38-1.tar.gz",
27+
CN = "https://gitcode.com/mcpp-res/asio/releases/download/1.38.1/asio-1.38.1.tar.gz",
28+
},
2329
sha256 = "2827b229972be80cdb14e5497962fa393d1adf036b5869e2b9c99f644daadacc",
2430
},
2531
},
2632
windows = {
2733
["1.38.1"] = {
28-
-- The tag tarball contains two POSIX symlinks. xlings cannot
29-
-- materialize them on the Windows runner, so use GitHub's ZIP
30-
-- encoding of the same tagged commit on this platform.
31-
url = "https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-38-1.zip",
32-
sha256 = "c4557a5a07ff8aa9c37bd141b7d1a6ba2b1bad5557d97762ad27aaf0091c665b",
34+
-- Upstream's tag archives (tar.gz AND zip) both carry two POSIX
35+
-- symlinks (asio/include -> ../include, asio/src -> ../src) that
36+
-- tar.exe cannot materialize on the Windows runner, and upstream
37+
-- publishes no symlink-free asset for 1.38.x. This asset is the
38+
-- upstream tag tarball with only those two symlink entries
39+
-- removed (tar --delete); all 1544 regular files are
40+
-- byte-identical to upstream. Provenance: xlings-res/asio README.
41+
url = {
42+
GLOBAL = "https://github.com/xlings-res/asio/releases/download/1.38.1/asio-1.38.1-nosymlinks.tar.gz",
43+
CN = "https://gitcode.com/mcpp-res/asio/releases/download/1.38.1/asio-1.38.1-nosymlinks.tar.gz",
44+
},
45+
sha256 = "77f74094bb12cd867a6edbf5736bbed816c6ce0906e880de8573097a81714d89",
3346
},
3447
},
3548
},

0 commit comments

Comments
 (0)