{"id":51380868,"url":"https://github.com/psumbera/solaris-codex","last_synced_at":"2026-07-03T16:06:16.531Z","repository":{"id":355620708,"uuid":"1218176435","full_name":"psumbera/solaris-codex","owner":"psumbera","description":"Build scripts to build codex for Solaris 11.4 (i386)","archived":false,"fork":false,"pushed_at":"2026-06-19T06:26:55.000Z","size":220,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T08:24:10.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psumbera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/cargo-git-sources.toml","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T15:57:22.000Z","updated_at":"2026-06-19T06:26:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/psumbera/solaris-codex","commit_stats":null,"previous_names":["psumbera/solaris-codex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/psumbera/solaris-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psumbera%2Fsolaris-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psumbera%2Fsolaris-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psumbera%2Fsolaris-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psumbera%2Fsolaris-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psumbera","download_url":"https://codeload.github.com/psumbera/solaris-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psumbera%2Fsolaris-codex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35092258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-03T16:06:15.832Z","updated_at":"2026-07-03T16:06:16.520Z","avatar_url":"https://github.com/psumbera.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solaris-codex\n\nStandalone Solaris build wrapper for Codex and its native dependencies.\n\nThis repo fetches and builds pinned versions of:\n\n1. `gn`\n2. `v8-solaris` (`librusty_v8.a` + `src_binding.rs`)\n3. `codex`\n\nCurrent support status:\n\n- Solaris/x86 only for now\n- `uname -p` must report `i386`\n- SPARC is not supported in this wrapper\n\nThe wrapper keeps its own build state under:\n\n- `build/downloads`\n- `build/toolchains`\n- `build/src`\n- `build/install`\n- `support/src_binding_prebuilt.rs`\n\n## Normal Use\n\n```sh\ncd solaris-codex\nbash build-codex.sh\n```\n\n`build-codex.sh` is the main entry point. It:\n\n1. checks that the host is Solaris/x86\n2. downloads the pinned Rust toolchain into `build/toolchains`\n3. fetches the pinned GN, V8, and Codex sources into `build/src`\n4. vendors the Rust crate dependencies needed for V8 and Codex\n5. installs the pinned `bindgen-cli` helper needed by the V8 GN build\n6. builds and installs `gn`\n7. builds and installs `v8-solaris`\n8. builds and installs `codex`\n\nInstalled artifacts end up in:\n\n- `build/install/gn/bin/gn`\n- `build/install/v8/lib/librusty_v8.a`\n- `build/install/v8/share/src_binding.rs`\n- `build/install/codex/bin/codex`\n\nQuick verification:\n\n```sh\nbuild/install/gn/bin/gn --version\nls -l build/install/v8/lib/librusty_v8.a\nbuild/install/codex/bin/codex --version\n```\n\n## Notes\n\n- Rust is downloaded only once into `build/toolchains`.\n- The wrapper uses the official Solaris Rust standalone installer target\n  `x86_64-pc-solaris`.\n- The pinned Codex source is the upstream `openai/codex` release tag\n  `rust-v0.142.0`, built from its `codex-rs/` workspace.\n- Set `SOLARIS_CODEX_PROXY_SETUP=/path/to/proxy.sh` if your host needs an\n  environment hook before downloads.\n- The codex build clears inherited Solaris `LD_*` hardening variables because\n  they broke the final Rust link with Solaris `ld`.\n\n## Solaris-specific Codex Workarounds\n\nThe wrapper builds upstream Codex mostly as-is, but Solaris still needs a small\npatch series under `patches/codex/` before vendoring:\n\n- `0001-process-hardening-enable-solaris-runtime-hardening.patch` adds Solaris\n  to the existing Unix runtime hardening path so Codex clears `LD_*` at startup\n  and disables core dumps the same way it already does on the BSD targets.\n- `0002-tui-disable-unsupported-clipboard-backends-on-solaris.patch` disables\n  native clipboard image and text paths that have no maintained Solaris backend\n  and leaves the SSH and OSC 52 text-copy path available.\n- `0004-config-host-name-use-solaris-ai-canonname-fallback.patch` supplies the\n  Solaris `AI_CANONNAME` value that the Rust `libc` crate does not expose.\n- `0005-state-use-rollback-journal-on-solaris.patch` keeps Codex state\n  databases off SQLite WAL mode on Solaris, avoiding `-shm` mmap failures on\n  NFS-backed homes.\n- `0006-arg0-tolerate-solaris-stale-temp-cleanup.patch` keeps stale arg0 temp\n  cleanup best-effort when Solaris/NFS reports non-empty directory races during\n  startup.\n- `0007-app-server-daemon-use-fcntl-locks-on-solaris.patch` replaces\n  unsupported `flock(2)` daemon lifecycle locks with Solaris `fcntl(2)` locks.\n- `0008-http-client-honor-no-proxy-before-system-proxy.patch` makes\n  exec-server HTTP requests honor `NO_PROXY`/`no_proxy` hosts before reqwest's\n  system proxy lookup.\n- `0010-exec-server-drain-fs-helper-output-concurrently.patch` keeps large\n  filesystem-helper responses from blocking on a full stdout pipe.\n\nBefore vendoring, `patch_tui_solaris_terminal_input()` keeps the TUI off\nterminal capability probes that stalled some Solaris PTYs, replaces the\nunreliable default `crossterm::event::EventStream` path with a Solaris input\nreader, prefers an ASCII-safe presentation on older terminals, and redraws the\nonboarding flow so the actionable step stays visible on smaller PTYs.\n\nAfter `cargo vendor`, `build-codex.sh` still applies the remaining Solaris\nvendored-crate rewrites in place:\n\n- `patch_vendored_nix_termios()`\n- `patch_vendored_tree_sitter_endian()`\n- `patch_vendored_fslock()`\n- `patch_vendored_onig_sys_alloca()`\n- `patch_vendored_mio_event_ports()`\n\nThose helpers remain scripted because they also update vendored crate\n`.cargo-checksum.json`, which makes static patch files awkward to maintain.\nThe mio event-ports rewrite applies the upstream proposal from\n`https://github.com/tokio-rs/mio/pull/1962`, refreshed against the `mio 1.2.0`\ncrate version locked by Codex.\n\n## Maintainer Notes\n\n### Updating pinned refs\n\nPinned upstream refs live in `versions.sh`:\n\n- `GN_GIT_URL`\n- `GN_GIT_REF`\n- `V8_GIT_URL`\n- `V8_GIT_REF`\n- `CODEX_GIT_URL`\n- `CODEX_GIT_REF`\n\nYou can override any of these temporarily with environment variables, but the\nnormal published workflow is still just:\n\n```sh\nbash build-codex.sh\n```\n\nThe wrapper intentionally does not hardcode host-local absolute paths so the\nrepository can be published on GitHub and reused on another Solaris system.\n\nIf you are refreshing this wrapper for a newer Codex pin, review the\n`patches/codex/*.patch` series first. Those are the versioned upstream-source\nSolaris workarounds and are the most likely places to need source-shape\nupdates. After that, check the remaining `patch_vendored_*` helpers in\n`build-codex.sh`, because those still patch vendored crates and refresh\n`.cargo-checksum.json`.\n\nIf you want to warm all fetches and vendored crates ahead of time, you can use:\n\n```sh\nbash prepare-sources.sh\n```\n\n- The wrapper keeps patch files in `patches/`.\n- The V8 patch set still applies against the fetched `rusty_v8` source tree and\n  its vendored dependencies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsumbera%2Fsolaris-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsumbera%2Fsolaris-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsumbera%2Fsolaris-codex/lists"}