fix(pkgbuild): honour CARGO_TARGET_DIR in install path
Some checks failed
Build and publish packages / build-and-publish (push) Failing after 14m14s
Some checks failed
Build and publish packages / build-and-publish (push) Failing after 14m14s
The act_runner exports CARGO_TARGET_DIR=/cache/target for cache
persistence, but the three Rust-app PKGBUILDs hardcoded
target/release/<bin>. Run 87 compiled 8 min then failed at
install stage. Use ${CARGO_TARGET_DIR:-target} so both CI and
local makepkg work.
This commit is contained in:
parent
cc5cf1c1e1
commit
5fc1781262
@ -1,5 +1,11 @@
|
|||||||
# Decisions
|
# Decisions
|
||||||
|
|
||||||
|
## 2026-04-23 – Rust PKGBUILDs honour CARGO_TARGET_DIR
|
||||||
|
- **Who**: Dominik, ClaudeCode
|
||||||
|
- **Why**: The act_runner container sets `CARGO_TARGET_DIR=/cache/target` (for cross-build cache persistence), but `moongreet-git`/`moonlock-git`/`moonset-git` `package()` hardcoded `target/release/<bin>`. Run 87 compiled for 8 min and then failed at `install: cannot stat 'target/release/moongreet'` because the binary actually lived in `/cache/target/release/`. Silent until today because earlier builds pre-date the env var.
|
||||||
|
- **Tradeoffs**: None meaningful — the fallback `${CARGO_TARGET_DIR:-target}` preserves local `makepkg` builds (no env var → still reads from `./target/`).
|
||||||
|
- **How**: Patched `install -Dm755` in all three Rust-app PKGBUILDs to use `"${CARGO_TARGET_DIR:-target}/release/<bin>"`.
|
||||||
|
|
||||||
## 2026-04-23 – Single-threaded, low-priority build in CI to keep the Gitea host alive
|
## 2026-04-23 – Single-threaded, low-priority build in CI to keep the Gitea host alive
|
||||||
- **Who**: Dominik, ClaudeCode
|
- **Who**: Dominik, ClaudeCode
|
||||||
- **Why**: The act_runner container shares CPU/RAM/I/O with the Gitea host (network-host mode, no resource limits). Parallel Rust builds OOM-kill or thrash the host: run 86 (2026-04-23, moongreet-git 0.8.3.r1) stopped mid-compile at `Compiling gio v0.22.2` with no error, and gitea HTTPS was unreachable for ~11 min. Same pattern on 2026-04-20. Runner-side resource limits would be better, but require host-side config changes; a pipeline-side fix is portable and low-risk.
|
- **Why**: The act_runner container shares CPU/RAM/I/O with the Gitea host (network-host mode, no resource limits). Parallel Rust builds OOM-kill or thrash the host: run 86 (2026-04-23, moongreet-git 0.8.3.r1) stopped mid-compile at `Compiling gio v0.22.2` with no error, and gitea HTTPS was unreachable for ~11 min. Same pattern on 2026-04-20. Runner-side resource limits would be better, but require host-side config changes; a pipeline-side fix is portable and low-risk.
|
||||||
|
|||||||
@ -40,7 +40,7 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir/greetd-moongreet"
|
cd "$srcdir/greetd-moongreet"
|
||||||
install -Dm755 target/release/moongreet "$pkgdir/usr/bin/moongreet"
|
install -Dm755 "${CARGO_TARGET_DIR:-target}/release/moongreet" "$pkgdir/usr/bin/moongreet"
|
||||||
|
|
||||||
# Greeter config
|
# Greeter config
|
||||||
install -Dm644 config/moongreet.toml "$pkgdir/etc/moongreet/moongreet.toml"
|
install -Dm644 config/moongreet.toml "$pkgdir/etc/moongreet/moongreet.toml"
|
||||||
|
|||||||
@ -46,7 +46,7 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir/moonlock"
|
cd "$srcdir/moonlock"
|
||||||
install -Dm755 target/release/moonlock "$pkgdir/usr/bin/moonlock"
|
install -Dm755 "${CARGO_TARGET_DIR:-target}/release/moonlock" "$pkgdir/usr/bin/moonlock"
|
||||||
|
|
||||||
# PAM configuration
|
# PAM configuration
|
||||||
install -Dm644 config/moonlock-pam "$pkgdir/etc/pam.d/moonlock"
|
install -Dm644 config/moonlock-pam "$pkgdir/etc/pam.d/moonlock"
|
||||||
|
|||||||
@ -38,7 +38,7 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir/moonset"
|
cd "$srcdir/moonset"
|
||||||
install -Dm755 target/release/moonset "$pkgdir/usr/bin/moonset"
|
install -Dm755 "${CARGO_TARGET_DIR:-target}/release/moonset" "$pkgdir/usr/bin/moonset"
|
||||||
|
|
||||||
# Example config
|
# Example config
|
||||||
install -Dm644 config/moonset.toml "$pkgdir/etc/moonset/moonset.toml.example"
|
install -Dm644 config/moonset.toml "$pkgdir/etc/moonset/moonset.toml.example"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user