-
Notifications
You must be signed in to change notification settings - Fork 600
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
Add a .gemspec
file and fix dependency issues
#45
Conversation
50d01c3
to
2f95192
Compare
Only sorta related, but is it explained somewhere why we don't follow the conventional Ruby gem file structure ( |
My guess is to make it easier to |
First, thank you to take time to do a PR. We have many comments regarding this PR.
I checked your Github profile and I know that you are a "ruby guru", and we assumed that you probably know more about Ruby stuff than evil-winrm team... but anyway, we prefer to fit evil-winrm needs than fit Ruby standards or Ruby best practices. Bear that in mind. Cheers. |
Can you run that |
Updated. |
I checked your changes. Great about the most of them... but, I tested the gem building and the installation in another different Parrot Security machine and got the same result. This time I used Do you remember what I told about setting readline as a hard dependency? I still think is not a good idea. What can we do? just remove it as dependency I guess... |
I'm curious what Also try without the With
|
I did some tests... git cloned your fork on gemspec branch (where these changes are). I did what you said.... tried to install, then adding debug and surprisingly... another diferent error arised It seems that the I tested it just letting As you can see, it got installed and the autocomplete worked! I see the warning while building regarding the removal of |
Still have pending to test it in another vm using kali without readline... |
Tested in Kali which have a ruby compiled without the readline stuff. These are the results of the test after cloning your forked repo (gemspec branch). Similar problems like in parrot but instead of arising in gem installing, it was later trying to use it. As you can see, I have installed stringio 3.0.1 and the gemfile is restricting it to 0.x versions due to the The final problem arised. This kali has not readline... and it seems is not as simple as a "gem install" to get it. Is the reason we didn't add it before as a dependency. You know more ruby than us, for sure... and correct me if I'm wrong, but as far as I know, the readline feature is not a gem... is like a feature that needs to be added during ruby compilation. That is the reason why we recommend to the users which don't have it to read the notes about it in our Readme, here and follow any of the recommended methods to make it working (for me, the first shown there is always the easier). So I think definitely that readline should not be there as a dependency. Thoughts? |
Let's bump the version requirements for fileutils and stringio to match what is available on rubygems.org. It looks like you're still installing the gem with |
Updated the version requires for fileutils and stringio. Under ruby-2.6 (the oldest ruby I have installed), this is the complete output of building and installing the gem:
and here is the same output under ruby-3.1.1 (the newest ruby I have installed):
|
But doing that on versions is "bread for today hunger for tomorrow"... tomorrow if a new stringio major version appears... it will fail again. I insist, is not good idea to use |
The problem is that you used the
|
Ok, let me some time to test this... now I'm busy as hell! but I'll do the tests without the |
Thank you! I was confused why |
Hmmm.... interesting... it worked on parrot Now on kali without the readline. I mean with a ruby not including readline support... let's see: Building ok... now using it to check if autocomplete feature is working... It seems autocomplete is not working. Warning is shown and pressing "tab" is not completing... So my question is... if adding it as dependency is not making it to work.... why to add it? As I said, I saw readline more like a feature compiled on ruby that as a gem that you can install. The message while building the gem is clear. And this is the proof. Now what? |
Hmm, looks like the ruby-core developers hollowed out the readline gem and moved on the Long-term, I would highly recommend replacing the |
It installs, but I don't have a Windows system with Remote Management enabled to test it.
I also noticed that |
I'll take time to answer due to vacation period I don't know if the completion could be done in other way. If you want to research ... I'll get back to you with the results probably tomorrow. Now answering on phone. I need my laptop to start my windoze VM with WinRM enabled . |
OK I can remove It occurred to me that all of the other |
Double checking the error, readline and readline-ext are being loaded, it's just that libreadline or the readline C extensions do not support |
Not sure what you mean... my Parrot is not a default parrot, I did what evil-winrm's Readme file say about remote path completion: https://github.com/Hackplayers/evil-winrm#remote-path-completion So in all my tests the remote path completion for that parrot are working... even before your PR. So the right test is to try it in a clean Parrot or in a Kali. Same result for both, it is not working because ruby has not readline support. I know that removing the dependencies you added will not fix the problem, but at least we are not adding unneeded dependencies. The point is to add the scrictly necessary dependencies. |
Alternative workarounds are: A. Depend on Your call. |
To be honest not sure about how to do A and I think B makes no sense if finally Reline has problems with completion. We have here some options now about this PR.
|
* Metadata was copied from the evil-winrm 3.3 release: https://rubygems.org/gems/evil-winrm/versions/3.3 * Added `bin/evil-winrm` which simply loads/executes `evil-winrm.rb`.
* This file is typically only committed to Git for web applications that must be deployed to a server, to ensure that the deployed app has the exact same dependency versions as the developer's copy of the app.
I have removed the two |
Ok, I've checked it and tested it and I think everything is ok. We'll accept it soon. |
.gemspec
file based on the gem metadata of evil-win-3.3. Also added additional project metadata (changelog_uri
andsource_code_uri
).~> X.Y, >= X.Y.Z
. This silences warnings fromgem build evil-winrm.gemspec
.libreadline
support, theReadline
module will actually point to theReline
module provided by the new reline gem.reline
is a pure-Ruby alternative to GNU readline, but does not support all ofReadline
's methods (ex:quoting_detection_proc
). This ensures thatReadline
always points to the actualReadline
; although you should consider switching toreline
to avoid anyreadline
compilation issues.Gemfile
to pull dependencies in from theevil-winrm.gemspec
file.Gemfile.lock
file, as it's typically only committed to Git for web applications, not for CLI utils.