superconfigure icon indicating copy to clipboard operation
superconfigure copied to clipboard

Request: Add OpenSSH

Open supriyo-biswas opened this issue 1 year ago • 4 comments

If possible, I would like to have OpenSSH provided as a cosmopolitan binary through this project.

Thanks!

supriyo-biswas avatar Apr 16 '24 00:04 supriyo-biswas

I've tried to do it before. We have some of the necessary dependencies buildable already (OpenSSL), but IIRC the OpenSSH build system is a bit complicated, and I remember it was making some config assumptions that made builds a bit difficult.

If you can provide a build config of OpenSSH that targets linux and uses minimal OS/ASM features, that would be a good starting point to try a port.

ahgamut avatar Apr 16 '24 00:04 ahgamut

https://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssh.html mentions a whole load of dependencies, but if you are willing to forego Kerberos/GSSAPI support and limiting yourself to building just the client, this is comparatively easier.

As a point of reference, a separate project of mine, https://github.com/supriyo-biswas/static-builds/blob/master/build-openssh.sh#L5 builds static OpenSSH Linux binaries with the same approach as above.

supriyo-biswas avatar Apr 16 '24 15:04 supriyo-biswas

the build issue with openssh is partially the directories it expects to access at runtime: things like /var/run or /var/empty won't usually be there on Windows, and I'm not sure what the polyfills for those are.

ahgamut avatar Apr 16 '24 16:04 ahgamut

experimental OpenSSH build available here: https://github.com/ahgamut/superconfigure/releases/download/z0.0.38/web.zip

I just got it to build, I am not sure how many features are necessary or how many patches need to be added to make it work as expected.

ahgamut avatar Apr 20 '24 15:04 ahgamut