docs(migrations): files asset declaration + why the index cannot adopt it yet - #419
Merged
Conversation
…dopt it yet
libxpkg 0.0.47 and xlings 2026.7.27.0 add `type = "files"`, so a recipe can
finally say "this payload file goes to that path in the subos" and have
xlings place it, switch it with the release, and remove it on uninstall.
Before this, `includedir` could only express "this directory becomes sysroot
include", and the index grew seven separate ways of writing files instead.
The document leads with the constraint rather than the capability, because
the constraint decides what anyone should do this week: the index is shared
by every client version, and an older xlings hard-fails on an unknown node
kind --
error: unsupported registration node kind 'files'
nothing was changed
-- which is measured, not assumed. xim-pkgindex has no client version floor,
so there is no way to serve an old client an old recipe. Migrating any recipe
today would stop every un-upgraded user from installing that package. Three
release conditions are listed before migration may begin.
Also records the migration order by risk (A-G), and corrects a claim carried
in an earlier comment: glibc's skip-if-exists policy is *not* about letting
host headers win. The destination is `<subos>/usr/include` while the sandbox
binds host `/usr` at `/usr`, and gcc injects `--sysroot=<subos>`, so host
headers never reach that directory. What the policy actually protects against
is package-versus-package collision -- which is why glibc still needs a
cross-package conflict rule before it can move.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
纯文档,不改任何 recipe。
为什么是文档而不是迁移
我原本要迁 openssl(B 类,独占目录,最安全的一个)。实测后停手了:
索引由所有版本的客户端共用,而
xim-pkgindex没有min_xlings之类的客户端版本下限 —— 没有办法给老客户端发老 recipe。所以本 PR 只落文档,并把放行条件写死:xlings 发布并经过采纳周期 → 索引引入版本下限(或明确弃用低版本)→ 逐包迁移并在隔离 HOME 实测。
文档内容
type = "files"的用法与两端必须相对的硬约束(payload 跨 subos 共享 + 引用计数)usr/etc/share/;拒绝绝对路径、../、bin/、lib/一处更正
文档里更正了我先前的一个说法:glibc 的 skip-if-exists 不是为了"host 头文件优先"。
sysroot.install_headers的目标是<subos>/usr/include,而 sandbox 把 host 的/usr挂在/usr—— 两个不同目录,host 从不往前者放东西;gcc 又注入--sysroot=<subos>,只看前者。真正起作用的是包与包之间的碰撞。结论不变(glibc 仍是最后迁),但理由变了:不是 host 优先,而是缺跨包冲突策略。
上游