Skip to content

Commit 9380055

Browse files
authored
fix(packaging): let gateway auto-detect package driver (#1236)
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 49e59b1 commit 9380055

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

crates/openshell-driver-vm/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,17 @@ The VM guest's serial console is appended to `<state-dir>/<sandbox-id>/console.l
182182
183183
On Linux amd64 and arm64, `install-dev.sh` installs the Debian package from the
184184
selected `OPENSHELL_VERSION` release tag. That package includes
185-
`openshell-gateway` and `openshell-driver-vm`.
185+
`openshell-gateway` and `openshell-driver-vm`, but leaves
186+
`OPENSHELL_DRIVERS` unset so the gateway uses its normal runtime
187+
auto-detection. Set `OPENSHELL_DRIVERS=vm` to force the VM driver.
186188
187189
On Apple Silicon macOS, `install-dev.sh` stages the generated `openshell.rb`
188190
formula from the selected release in the `nvidia/openshell` Homebrew tap.
189191
Homebrew installs `openshell`, `openshell-gateway`, and
190192
`openshell-driver-vm`, ad-hoc signs the driver with the Hypervisor entitlement
191-
in `post_install`, and owns the `brew services` gateway lifecycle.
193+
in `post_install`, and owns the `brew services` gateway lifecycle. The service
194+
also leaves `OPENSHELL_DRIVERS` unset so driver choice remains automatic unless
195+
the user explicitly overrides it.
192196
193197
## Relationship to `openshell-vm`
194198

deploy/deb/openshell-gateway.service

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Environment=OPENSHELL_SERVER_PORT=17670
1212
Environment=OPENSHELL_DISABLE_TLS=true
1313
Environment=OPENSHELL_DISABLE_GATEWAY_AUTH=true
1414
Environment=OPENSHELL_DB_URL=sqlite:%S/openshell/gateway/openshell.db
15-
Environment=OPENSHELL_DRIVERS=vm
1615
Environment=OPENSHELL_GRPC_ENDPOINT=http://127.0.0.1:17670
1716
Environment=OPENSHELL_SSH_GATEWAY_HOST=127.0.0.1
1817
Environment=OPENSHELL_SSH_GATEWAY_PORT=17670

python/openshell/release_formula_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pathlib import Path
99

1010

11-
def test_generate_homebrew_formula_uses_tagged_macos_driver_asset(
11+
def test_generate_homebrew_formula_uses_tagged_macos_driver_asset_without_default_driver(
1212
tmp_path: Path,
1313
) -> None:
1414
release_dir = tmp_path / "release"
@@ -51,6 +51,7 @@ def test_generate_homebrew_formula_uses_tagged_macos_driver_asset(
5151
"v0.0.10/openshell-driver-vm-aarch64-apple-darwin.tar.gz"
5252
) in formula
5353
assert 'sha256 "' + "b" * 64 + '"' in formula
54+
assert "OPENSHELL_DRIVERS" not in formula
5455
assert 'OPENSHELL_DRIVER_DIR: "#{opt_libexec}"' in formula
5556
assert "entitlements.atomic_write" in formula
5657
assert "brew services restart openshell" in formula

tasks/scripts/release.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ def post_install
293293
OPENSHELL_DISABLE_TLS: "true",
294294
OPENSHELL_DISABLE_GATEWAY_AUTH: "true",
295295
OPENSHELL_DB_URL: "sqlite:#{{var}}/openshell/gateway/openshell.db",
296-
OPENSHELL_DRIVERS: "vm",
297296
OPENSHELL_GRPC_ENDPOINT: "http://127.0.0.1:{LOCAL_GATEWAY_PORT}",
298297
OPENSHELL_SSH_GATEWAY_HOST: "127.0.0.1",
299298
OPENSHELL_SSH_GATEWAY_PORT: "{LOCAL_GATEWAY_PORT}",

0 commit comments

Comments
 (0)