Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to sftp-server binary found in path #3183

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arixmkii
Copy link

Lima allows to override majority of its dependencies (binaries) via $PATH configuration. sftp-server is one prominent exception. sshocker library will not try to resolve path unsell OpensshSftpServerBinary param is set to non empty string and will always fallback only to well known candidates.

This adds code in Lima to check if the binary could be found in path and in this case will instruct sshocker to use it.

Implementing this will allow to use Lima with an OS flavor agnostic bundle of dependencies if configured via $PATH variable.

@arixmkii arixmkii mentioned this pull request Jan 31, 2025
@@ -64,6 +65,10 @@ func (a *HostAgent) setupMount(m limayaml.Mount) (*mount, error) {
Readonly: !(*m.Writable),
SSHFSAdditionalArgs: []string{"-o", sshfsOptions},
}
serverPath, err := exec.LookPath("sftp-server")
Copy link
Member

Choose a reason for hiding this comment

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

This logic should be rather implemented in sshocker

Copy link
Member

Choose a reason for hiding this comment

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

Also curious to know what distro needs this

Copy link
Author

Choose a reason for hiding this comment

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

Also curious to know what distro needs this

It is from Windows experiment, where I put all "userland" dependencies into "_output/bin/bundle" #909 (comment) I'm exploring how feasible is it to just provide all the dependencies with Lima bundled.

This logic should be rather implemented in sshocker

I will create PR in sshocker then. Will keep this for now as a draft for references.

@arixmkii arixmkii marked this pull request as draft January 31, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants