bots-garden/razorbillpublic Fork
⑂ 284b684
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

release.sh: clear message when dist/ is not writable (left by a run with sudo)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-26T18:30:36+01:00 Browse files
284b684 parent: 486bcbd
modified docs/en/how-to/build-on-the-mac.md +1 -0
@@ -61,6 +61,7 @@ The script never overwrites or removes an `rzb` launcher it did not write.
6161 | --- | --- |
6262 | The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
6363 | `Operation not permitted` or `can't write output file` under `.build/xcode` | A build ran with `sudo` and left files owned by root. Run `sudo chown -R "$(whoami)" .build`, then build again without `sudo` (`scripts/install.sh` asks for it itself, only to copy). |
64+| `release.sh`: `tar: Failed to open 'dist/…tar.gz'` or `dist/… is not writable` | An earlier `release.sh` ran with `sudo` and left `dist/` owned by root. Run `sudo chown -R "$(whoami)" dist .build`, then run `scripts/release.sh` again without `sudo`. |
6465 | A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
6566 | `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
6667
@@ -61,6 +61,7 @@ The script never overwrites or removes an `rzb` launcher it did not write.
61 | --- | --- |61 | --- | --- |
62 | The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |62 | The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
63 | `Operation not permitted` or `can't write output file` under `.build/xcode` | A build ran with `sudo` and left files owned by root. Run `sudo chown -R "$(whoami)" .build`, then build again without `sudo` (`scripts/install.sh` asks for it itself, only to copy). |63 | `Operation not permitted` or `can't write output file` under `.build/xcode` | A build ran with `sudo` and left files owned by root. Run `sudo chown -R "$(whoami)" .build`, then build again without `sudo` (`scripts/install.sh` asks for it itself, only to copy). |
64+| `release.sh`: `tar: Failed to open 'dist/…tar.gz'` or `dist/… is not writable` | An earlier `release.sh` ran with `sudo` and left `dist/` owned by root. Run `sudo chown -R "$(whoami)" dist .build`, then run `scripts/release.sh` again without `sudo`. |
64 | A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |65 | A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
65 | `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |66 | `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
66 67
modified docs/fr/how-to/compiler-sur-le-mac.md +1 -0
@@ -61,6 +61,7 @@ Le script n'écrase ni ne supprime jamais un lanceur `rzb` qu'il n'a pas écrit.
6161 | --- | --- |
6262 | La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
6363 | `Operation not permitted` ou `can't write output file` sous `.build/xcode` | Une compilation a tourné avec `sudo` et laissé des fichiers appartenant à root. Lancez `sudo chown -R "$(whoami)" .build`, puis recompilez sans `sudo` (`scripts/install.sh` le demande lui-même, seulement pour la copie). |
64+| `release.sh` : `tar: Failed to open 'dist/…tar.gz'` ou `dist/… is not writable` | Un `release.sh` précédent a tourné avec `sudo` et laissé `dist/` à root. Lancez `sudo chown -R "$(whoami)" dist .build`, puis relancez `scripts/release.sh` sans `sudo`. |
6465 | Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
6566 | `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
6667
@@ -61,6 +61,7 @@ Le script n'écrase ni ne supprime jamais un lanceur `rzb` qu'il n'a pas écrit.
61 | --- | --- |61 | --- | --- |
62 | La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |62 | La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
63 | `Operation not permitted` ou `can't write output file` sous `.build/xcode` | Une compilation a tourné avec `sudo` et laissé des fichiers appartenant à root. Lancez `sudo chown -R "$(whoami)" .build`, puis recompilez sans `sudo` (`scripts/install.sh` le demande lui-même, seulement pour la copie). |63 | `Operation not permitted` ou `can't write output file` sous `.build/xcode` | Une compilation a tourné avec `sudo` et laissé des fichiers appartenant à root. Lancez `sudo chown -R "$(whoami)" .build`, puis recompilez sans `sudo` (`scripts/install.sh` le demande lui-même, seulement pour la copie). |
64+| `release.sh` : `tar: Failed to open 'dist/…tar.gz'` ou `dist/… is not writable` | Un `release.sh` précédent a tourné avec `sudo` et laissé `dist/` à root. Lancez `sudo chown -R "$(whoami)" dist .build`, puis relancez `scripts/release.sh` sans `sudo`. |
64 | Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |65 | Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
65 | `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |66 | `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
66 67
modified scripts/release.sh +6 -0
@@ -83,6 +83,12 @@ EOF
8383
8484 mkdir -p dist
8585 archive="dist/${name}.tar.gz"
86+# A dist/ left by an earlier run under sudo is root-owned: tar would only say "Failed to open".
87+for target in dist "$archive" "$archive.sha256"; do
88+ if [[ -e "$target" && ! -w "$target" ]]; then
89+ fail "$target is not writable (left by a run with sudo?): sudo chown -R \"\$(whoami)\" dist .build"
90+ fi
91+done
8692 # No AppleDouble (._*) files from extended attributes in the archive (macOS tar).
8793 COPYFILE_DISABLE=1 tar -C "$staging" -czf "$archive" "$name"
8894 (cd dist && shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256")
@@ -83,6 +83,12 @@ EOF
83 83
84 mkdir -p dist84 mkdir -p dist
85 archive="dist/${name}.tar.gz"85 archive="dist/${name}.tar.gz"
86+# A dist/ left by an earlier run under sudo is root-owned: tar would only say "Failed to open".
87+for target in dist "$archive" "$archive.sha256"; do
88+ if [[ -e "$target" && ! -w "$target" ]]; then
89+ fail "$target is not writable (left by a run with sudo?): sudo chown -R \"\$(whoami)\" dist .build"
90+ fi
91+done
86 # No AppleDouble (._*) files from extended attributes in the archive (macOS tar).92 # No AppleDouble (._*) files from extended attributes in the archive (macOS tar).
87 COPYFILE_DISABLE=1 tar -C "$staging" -czf "$archive" "$name"93 COPYFILE_DISABLE=1 tar -C "$staging" -czf "$archive" "$name"
88 (cd dist && shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256")94 (cd dist && shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256")