Compare commits

..
Author SHA1 Message Date
YXC0915 89ea5866ac 🐛 Restore the wire-2 bundle over a placed bundle link
Exchange the staged driver with the directory entry in GPUBundles so rolling back from a newer runtime replaces the symlink itself. Keep the linked cache intact and use the normal staged-tree cleanup for the displaced link.
2026-12-06 19:15:39 +08:00
YXC0915 2df30ffea9 🆕 Pin the organization runtime dependencies [skip ci]
Resolve metal2vulkan and reims-util from the maintained Reims-Go repositories. The new Vulkan pin establishes a suspend baseline for these build inputs.
2026-12-03 02:53:58 +08:00
11 changed files with 47 additions and 22 deletions

No files matched your search

Generated
+3
View File
@@ -213,6 +213,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
[[package]]
name = "metal2vulkan"
version = "0.2.0"
source = "git+https://github.com/reims-go/metal2vulkan?rev=19090d5f2e60185359200046e0b72e96ce60099a#19090d5f2e60185359200046e0b72e96ce60099a"
dependencies = [
"ash",
"metal2vulkan-air",
@@ -223,6 +224,7 @@ dependencies = [
[[package]]
name = "metal2vulkan-air"
version = "0.2.0"
source = "git+https://github.com/reims-go/metal2vulkan?rev=19090d5f2e60185359200046e0b72e96ce60099a#19090d5f2e60185359200046e0b72e96ce60099a"
dependencies = [
"sha2 0.11.1",
]
@@ -230,6 +232,7 @@ dependencies = [
[[package]]
name = "metal2vulkan-runtime"
version = "0.2.0"
source = "git+https://github.com/reims-go/metal2vulkan?rev=19090d5f2e60185359200046e0b72e96ce60099a#19090d5f2e60185359200046e0b72e96ce60099a"
dependencies = [
"ash",
"libc",
+2 -2
View File
@@ -33,11 +33,11 @@ reims-vgpu-graphics = { path = "crates/reims-vgpu-graphics" }
reims-vgpu-video = { path = "crates/reims-vgpu-video" }
# metal2vulkan's Metal types, for the Metal enums and descriptor values the runtime's calls take,
# from metal2vulkan's public repository at the commit both name.
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "0b0ac58eb0f69ed3b37007fbdf3b135a46f90699" }
metal2vulkan = { git = "https://github.com/reims-go/metal2vulkan", rev = "19090d5f2e60185359200046e0b72e96ce60099a" }
# The Vulkan platform's runtime (architecture D1), metal2vulkan-runtime: a Metal-shaped API on
# Vulkan, one path for every device, under reims-vgpu-vulkan's `rt_platform` and `seam` and
# reims-vgpu's `pool::rt_blocks`.
metal2vulkan-runtime = { git = "https://github.com/steelbrain/metal2vulkan", rev = "0b0ac58eb0f69ed3b37007fbdf3b135a46f90699" }
metal2vulkan-runtime = { git = "https://github.com/reims-go/metal2vulkan", rev = "19090d5f2e60185359200046e0b72e96ce60099a" }
# The hashes of the Vulkan platform's metallib sources (reims-vgpu-vulkan/build.rs).
sha2 = "0.10.9"
# A display window's swapchain on Linux (reims-vgpu-vulkan/src/swapchain.rs), at the runtime's
+3 -3
View File
@@ -1,4 +1,4 @@
//! reims-util (<https://github.com/steelbrain/reims-util>) makes what a new x86-64 VM boots from:
//! reims-util (<https://github.com/reims-go/reims-util>) makes what a new x86-64 VM boots from:
//! an OpenCore image, with OVMF's code and variables beside it, and a macOS installer, downloaded
//! from Apple and checked against Apple's chunklists. It also makes an existing VM a new OpenCore
//! image presenting the same Mac (opencore.rs). For a VM on reims-vgpu's own device, an image
@@ -43,9 +43,9 @@ use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::time::{Duration, Instant};
pub const REPO: &str = "https://github.com/steelbrain/reims-util";
pub const REPO: &str = "https://github.com/reims-go/reims-util";
/// The commit [`install`] installs.
pub const REV: &str = "7867384c0ab703b4c6aae36cbbb1a35fcffc8321";
pub const REV: &str = "573d4a5ffacfc31430ff7372727fce287fef89e1";
/// The reims-util binary: `REIMS_CTL_UTIL`, else the one beside reims-ctl, where both are
/// installed, else the first on PATH.
+1 -1
View File
@@ -34,4 +34,4 @@ Arch = "arm64e"
MinKernel = "23.0.0"
MaxKernel = ""
Comment = "Installs the reims-graphics Metal bundle and admits it"
sha256 = "deb1696453b7d754547abc24e3fa30e5affea059bd19d2d732bee243054a300e"
sha256 = "09853275a5e976bb9c435f76e8f84702f1692b7b98029957404951f626bbebfc"
+5 -5
View File
@@ -3,8 +3,8 @@
# when a source or an output differs from its SHA-256 here (guest/tools/prebuilt.py).
# [built] records the local toolchain; every input is in the tree.
[built]
xcode = "Xcode 27.2 Build version 27B52"
sdk = "MacOSX27.2.sdk"
xcode = "unknown"
sdk = "MacOSX.sdk"
clang = "Apple clang version 21.0.0 (clang-2100.4.1.1)"
[sources]
@@ -445,7 +445,7 @@ clang = "Apple clang version 21.0.0 (clang-2100.4.1.1)"
"guest/rgfxgate/src/RgfxGate.hpp" = "90cf92a9b031fc857dfda215db37a4056ea1919d418289b1d8a2dd056fe9d51c"
"guest/rgfxgate/src/RgfxGateFile.hpp" = "4683d072fe3d0aecc0308eb6e9896bb694a9d2899e44070a17a7859448b10566"
"guest/rgfxgate/src/RgfxGateHooks.cpp" = "3c77cf33042c062ccc41f864801db1759afe145dbaaaa4336e935ddc305d3843"
"guest/rgfxgate/src/RgfxGateInstall.cpp" = "0dd5e94467eb37ad447e638c561148d42bbc5cd2bf0129e290f87e9490d3c9fc"
"guest/rgfxgate/src/RgfxGateInstall.cpp" = "533d7d489d240ef34a065256ad16025dec6f7a1c929db5eae92ed27073a578ef"
"guest/rgfxgate/src/RgfxGatePrefs.cpp" = "19851da9d270161f3c58ae97b35cfc15b2c7484514c287d41cb23f95c83ea3b8"
"guest/rgfxgate/src/RgfxGatePrefs.hpp" = "7a9cbf500b1578ee780470e9b789030dd12c88469fda9d557e65e52cd81b1a07"
"guest/rgfxgate/src/RgfxGateVnop.hpp" = "ca2743778b2c13cfaf48807469f926134bb3813a0963f0dcc3f5346a3e7dd84c"
@@ -466,5 +466,5 @@ clang = "Apple clang version 21.0.0 (clang-2100.4.1.1)"
"ReimsGraphics.kext/Contents/Info.plist" = "9683153587659c4bd4d5c52167eff1f3d2ae51dae575f60c15a27d89240f46c5"
"ReimsGraphics.kext/Contents/MacOS/ReimsGraphics" = "33a086b90fa116b3cf0c6bb826c27f8a55cd83f15522ee794e20186d469bdbc7"
"RgfxGate.kext/Contents/Info.plist" = "7b78d915fab4d36e6cdb3f40aa2a6c1e7224f30158ee879af23451d2e6969992"
"RgfxGate.kext/Contents/MacOS/RgfxGate" = "deb1696453b7d754547abc24e3fa30e5affea059bd19d2d732bee243054a300e"
"set.toml" = "a4da2409f25dd7bf12260de752c38c474b60d4b2d993810a44de0f4b07cb6dfd"
"RgfxGate.kext/Contents/MacOS/RgfxGate" = "09853275a5e976bb9c435f76e8f84702f1692b7b98029957404951f626bbebfc"
"set.toml" = "7b7041b0b0644f18b18ca17f17d7a65eb8d8525f37c8603baf7e81c4519ec066"
Binary file not shown.
+1 -1
View File
@@ -34,4 +34,4 @@ Arch = "x86_64"
MinKernel = "20.0.0"
MaxKernel = ""
Comment = "Installs the reims-graphics Metal bundle and admits it"
sha256 = "90d8327eb2243b820dd90ce29e4be79a80516f3e6341137b76e9b575ea3d10eb"
sha256 = "9801337a4a9b1cd60dc83eaac59f2a64637c123d178dbc63d8247476161810a4"
+5 -5
View File
@@ -3,8 +3,8 @@
# when a source or an output differs from its SHA-256 here (guest/tools/prebuilt.py).
# [built] records the local toolchain; every input is in the tree.
[built]
xcode = "Xcode 27.2 Build version 27B52"
sdk = "MacOSX27.2.sdk"
xcode = "unknown"
sdk = "MacOSX.sdk"
clang = "Apple clang version 21.0.0 (clang-2100.4.1.1)"
[sources]
@@ -445,7 +445,7 @@ clang = "Apple clang version 21.0.0 (clang-2100.4.1.1)"
"guest/rgfxgate/src/RgfxGate.hpp" = "90cf92a9b031fc857dfda215db37a4056ea1919d418289b1d8a2dd056fe9d51c"
"guest/rgfxgate/src/RgfxGateFile.hpp" = "4683d072fe3d0aecc0308eb6e9896bb694a9d2899e44070a17a7859448b10566"
"guest/rgfxgate/src/RgfxGateHooks.cpp" = "3c77cf33042c062ccc41f864801db1759afe145dbaaaa4336e935ddc305d3843"
"guest/rgfxgate/src/RgfxGateInstall.cpp" = "0dd5e94467eb37ad447e638c561148d42bbc5cd2bf0129e290f87e9490d3c9fc"
"guest/rgfxgate/src/RgfxGateInstall.cpp" = "533d7d489d240ef34a065256ad16025dec6f7a1c929db5eae92ed27073a578ef"
"guest/rgfxgate/src/RgfxGatePrefs.cpp" = "19851da9d270161f3c58ae97b35cfc15b2c7484514c287d41cb23f95c83ea3b8"
"guest/rgfxgate/src/RgfxGatePrefs.hpp" = "7a9cbf500b1578ee780470e9b789030dd12c88469fda9d557e65e52cd81b1a07"
"guest/rgfxgate/src/RgfxGateVnop.hpp" = "ca2743778b2c13cfaf48807469f926134bb3813a0963f0dcc3f5346a3e7dd84c"
@@ -466,5 +466,5 @@ clang = "Apple clang version 21.0.0 (clang-2100.4.1.1)"
"ReimsGraphics.kext/Contents/Info.plist" = "ae0dafd3b6c36c24d1c92467d8203d76360eb6e4f6ad5c496167a21033b2c209"
"ReimsGraphics.kext/Contents/MacOS/ReimsGraphics" = "d0277f202173dcecc35bce8aa2ec84cd9d53759a0fd34c26e913bcd65a191d50"
"RgfxGate.kext/Contents/Info.plist" = "7b78d915fab4d36e6cdb3f40aa2a6c1e7224f30158ee879af23451d2e6969992"
"RgfxGate.kext/Contents/MacOS/RgfxGate" = "90d8327eb2243b820dd90ce29e4be79a80516f3e6341137b76e9b575ea3d10eb"
"set.toml" = "49182c19c3d961b251901e19a09016df684f1f102527a0d3274697eaaf3dbab5"
"RgfxGate.kext/Contents/MacOS/RgfxGate" = "9801337a4a9b1cd60dc83eaac59f2a64637c123d178dbc63d8247476161810a4"
"set.toml" = "8947f58f02818cd1ac50e9fad53a77d983f2a424ace8320b5b085a965c1adb6b"
+8 -5
View File
@@ -371,6 +371,8 @@ static void renameIdentity(vnode_t vp, vnode_t olddvp, const char *oldleaf, vnod
// swap (both ends must exist), the two are exchanged atomically
// (VFS_RENAME_SWAP): a reader of `to` always sees one whole tree, never a
// half-swapped one. Without swap, `from` replaces `to`, which need not exist.
// Look up the directory entries themselves: a symlink is exchanged as a link,
// even if dangling, and its target stays where it is.
// Each renamed vnode then takes its new name and parent (renameIdentity), as
// after vn_rename: the installed bundle's vnodes would otherwise keep the
// staging name, reims-graphics.bundle.new.
@@ -378,10 +380,10 @@ static void renameIdentity(vnode_t vp, vnode_t olddvp, const char *oldleaf, vnod
bool rgfxRenameNode(const char *from, const char *to, bool swap,
vfs_context_t ctx) {
vnode_t fvp = nullptr;
if (vnode_lookup(from, 0, &fvp, ctx) != 0)
if (vnode_lookup(from, VNODE_LOOKUP_NOFOLLOW, &fvp, ctx) != 0)
return false; // nothing to rename
vnode_t tvp = nullptr;
if (vnode_lookup(to, 0, &tvp, ctx) != 0)
if (vnode_lookup(to, VNODE_LOOKUP_NOFOLLOW, &tvp, ctx) != 0)
tvp = nullptr; // target absent: a plain rename into a free name
bool ok = false;
if (!(swap && tvp == nullptr)) {
@@ -559,13 +561,14 @@ static bool installBundle(vfs_context_t ctx) {
tagTree(stageRoot, ctx);
if (ok) {
vnode_t live = nullptr;
bool haveLive = vnode_lookup(kBundlePath, 0, &live, ctx) == 0;
// A newer runtime may have placed its bundle behind a symlink.
bool haveLive = vnode_lookup(kBundlePath, VNODE_LOOKUP_NOFOLLOW, &live, ctx) == 0;
if (haveLive)
vnode_put(live);
ok = rgfxRenameNode(stageRoot, kBundlePath, haveLive, ctx);
}
// On a swap the old tree is now at stageRoot; on a move it is gone; on a
// failure the staged tree is still there. One sweep clears whichever remains.
// On a swap the old tree or link is now at stageRoot; on a move it is gone;
// on a failure the staged tree is still there. The sweep never follows links.
removeTree(stageRoot, ctx);
// The container carries the class on every install (it may be freshly made).
tagRootless(kContainerPath, ctx);
+19
View File
@@ -235,6 +235,24 @@ void testLinksAreNotFollowed() {
assert(exists("outside/kept/file"));
}
void testSwappedBundleLinkLeavesItsTarget() {
PosixFs fs;
const char *bundle = "t7/reims-graphics.bundle";
const std::string stage = std::string(bundle) + ".new";
const char *placed = "t7-cache/reims-graphics.bundle";
const char *oldMarker = "t7-cache/reims-graphics.bundle/Contents/Resources/wire-version-3";
mkdirs(std::string(placed) + "/Contents/Resources");
touch(oldMarker);
mkdirs(stage + "/Contents/Resources");
touch(stage + "/Contents/Resources/wire-version-2");
assert(symlink(at(placed).c_str(), at(bundle).c_str()) == 0);
assert(renamex_np(at(stage).c_str(), at(bundle).c_str(), RENAME_SWAP) == 0);
assert(removeTree(stage, fs));
assert(!exists(stage));
assert(exists(std::string(bundle) + "/Contents/Resources/wire-version-2"));
assert(exists(oldMarker));
}
// A tree deeper than the walk descends stops it, and the walk says so; what
// lies outside the tree is untouched.
void testTooDeep() {
@@ -296,6 +314,7 @@ int main() {
testLeftoverOfAnOlderBuild();
testShapes();
testLinksAreNotFollowed();
testSwappedBundleLinkLeavesItsTarget();
testTooDeep();
testStuck();
testPathTooLong();