Skip to content

Add SCP install fallback for remote servers without curl/wget#10215

Open
alokedesai wants to merge 1 commit intomasterfrom
aloke/wget
Open

Add SCP install fallback for remote servers without curl/wget#10215
alokedesai wants to merge 1 commit intomasterfrom
aloke/wget

Conversation

@alokedesai
Copy link
Copy Markdown
Member

This change implements an SCP install fallback for the remote server setup. This allows the installation to succeed even if the remote server doesn't have curl or wget installed.

  • The install script now checks for curl and wget and falls back to an error if neither is available.
  • If the install script fails due to missing HTTP clients, the Rust code detects this and uploads the tarball via SCP.
  • The install script is then re-invoked with the uploaded tarball path as an argument, allowing it to extract and install the server.
  • Added shell-words as a dependency.

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@alokedesai

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds curl/wget detection plus an SCP upload fallback for remote server installs on hosts without HTTP clients.

Concerns

  • The SCP extraction path is passed as a quoted $HOME/~ value and then moved literally, so the new no-curl/no-wget fallback can fail after uploading the tarball.
  • The local fallback download is not covered by a timeout, which can leave setup stuck if local curl stalls.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment on lines +49 to +50
# SCP fallback: tarball already uploaded by the client.
mv "$1" "$tmpdir/oz.tar.gz"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] The fallback argument can be $HOME/... or ~/..., but quoted positional parameters are not expanded by mv "$1", so the SCP path can fail after upload. Expand the argument before moving it.

Suggested change
# SCP fallback: tarball already uploaded by the client.
mv "$1" "$tmpdir/oz.tar.gz"
# SCP fallback: tarball already uploaded by the client.
tarball_src="$1"
tarball_src="${tarball_src/#\$HOME/$HOME}"
tarball_src="${tarball_src/#\~/$HOME}"
mv "$tarball_src" "$tmpdir/oz.tar.gz"

.stderr(Stdio::piped())
.kill_on_drop(true)
.output()
.await
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This local curl has no timeout, so a stalled CDN connection can keep the install future pending indefinitely even though SCP_INSTALL_TIMEOUT covers the later steps. Wrap the download in a timeout or pass curl timeout flags and return an install error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant