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

Improve cross platform support for bosh cli #1292

Closed
0x1mason opened this issue Jun 7, 2016 · 4 comments
Closed

Improve cross platform support for bosh cli #1292

0x1mason opened this issue Jun 7, 2016 · 4 comments

Comments

@0x1mason
Copy link

0x1mason commented Jun 7, 2016

I've made some changes to my local install to bosh cli overall cross platform support. The main issue is differing behavior of tar across platforms. By replacing calls to tar with Ruby code, I've been able to standardize behavior and reduce code paths. E.g., special handling for BSD vs GNU tar is no longer required. The most significant impact of the change is that bosh cli now works on Windows without hassle.

I'd like to submit my code for consideration. I am not suggesting bosh cli add "official" Windows support. Rather, I hope you'll consider the PR as a Rubification of existing archive handling logic that reduces external dependencies and provides better XP experience.

@0x1mason 0x1mason closed this as completed Jun 7, 2016
@0x1mason 0x1mason reopened this Jun 7, 2016
@dpb587-pivotal
Copy link
Contributor

Hi @0x1mason - glad to hear you were able to get CLI working locally on Windows! Windows support has come up a couple times over the years, but it hasn't been a high priority.

I think the CLI has some planned enhancements which may make the changes difficult to merge right now, but, community-wise, you could still push your changes to a branch in case others are interested in trying out the CLI on Windows in the meantime. I'd also personally be curious to see what kinds of changes you found were required.

Thanks for raising an issue to discuss this!

@0x1mason
Copy link
Author

Thanks. I'll do that. It'll take me a bit--swamped at work and I need to jump thru some more hoops to get the lawyers to sign the CLA.

The heart of the changes were removing tar and using ruby instead. There is existing platform-specific handling for differences between BSD and GNU tar. My changes make all that unnecessary. . So you can think of this as a "make it work the same way for everyone regardless of OS" change. It's basically just a drop-in for the tar invocations.

@0x1mason
Copy link
Author

I have tar on Windows. It works great from the command line. The sys calls from Ruby, not so much.

@dpb587-pivotal
Copy link
Contributor

Closing - we won't be making further changes to ruby CLI in favor of continuing development of our go-based bosh-cli. There is currently an open issue about enabling builds for Windows if you want to follow that there - cloudfoundry/bosh-cli#53.

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

No branches or pull requests

2 participants