feat: portable, root-free installer refactor (dependency-free)#240
feat: portable, root-free installer refactor (dependency-free)#240FNGarvin wants to merge 1 commit intorunpod:mainfrom
Conversation
Reviewer's GuideRefactors the installer to be dependency-free, support non-root/user-space installs with dynamic install directory detection and URL fallbacks, and adds an automated Alpine-based integration test matrix in CI to validate both root and non-root installation and core CLI workflows. Sequence diagram for root-free installer execution flowsequenceDiagram
actor User
participant Shell as install_sh
participant Brew as try_brew_install
participant Env as detect_install_dir
participant Sys as check_system_requirements
participant Ver as fetch_latest_version
participant Url as download_url_constructor
participant Dl as download_and_install_cli
User->>Shell: execute install.sh
Shell->>Brew: try_brew_install
alt macOS_with_Homebrew_success
Brew-->>Shell: runpodctl installed via Homebrew
Shell-->>User: exit 0
else not_macOS_or_Homebrew_failed
Brew-->>Shell: fallback to binary install
Shell->>Env: detect_install_dir
Env-->>Shell: INSTALL_DIR (root_or_user_space)
Shell->>Sys: check_system_requirements
Sys-->>Shell: verify wget tar grep sed
Shell->>Ver: fetch_latest_version
Ver-->>Shell: VERSION
Shell->>Url: download_url_constructor
Url-->>Shell: DOWNLOAD_URLS
loop try_each_download_url
Shell->>Dl: download_and_install_cli
alt url_download_and_extract_success
Dl-->>Shell: cli_installed_to_INSTALL_DIR
else url_failed
Dl-->>Shell: try_next_url
end
end
Shell-->>User: report_success_or_failure
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
hey, thanks for putting this together — the non-root install support and removing the a few things that are blocking us from merging this as-is:
we've created two separate issues to track the features you're proposing:
if you'd like to continue working on this, we'd suggest splitting the installer changes and the CI test suite into separate PRs based on current main. that would make review much easier. but no pressure at all — we're happy to pick these up ourselves too. thanks again for the contribution! 🙏 |
|
Merged into #249 |
PR: Feature: Root-Free & Portable Installer
Description
This PR refactors the
install.shscript to be entirely dependency-free and support non-privileged installation paths by default.Key Changes
/usr/local/binfor all users.$HOME.$PATH(prioritizing~/.local/bin,~/bin, and~/.bin).~/.local/binonly if no preferred paths are found, with automated$PATHguidance.sudofor system-wide installation if desired.jq. Version extraction and URL construction now use portable, POSIX-compliantgrepandsedlogic. I'd humbly claim that by the time you already require curl, tar, and bash, it's not a stretch to requiresedandgrep.Integration Notes
There's a review of the PR by Sourcery with diagrams and stuff here that you can peruse if you like.
Also, it looks like someone else is hacking on the brew stuff atm, so I didn't want to tamper with it. But there might be an issue w/ cask vs formula in the install line. Just FYI, I'm not sure.
Cheers!