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

libssh-dev installed instead of libssh2-1-dev? #423

Open
vin01 opened this issue Jul 26, 2019 · 6 comments
Open

libssh-dev installed instead of libssh2-1-dev? #423

vin01 opened this issue Jul 26, 2019 · 6 comments

Comments

@vin01
Copy link

vin01 commented Jul 26, 2019

Hi Team!

Currently, the formula does not seem to support SSH auth for gitfs. I am not sure if this is intentional as I can see libssh-dev is being installed here as a dependency since libgit2 needs it to be able to support SSH. However, it does not work because lbigit2 needs libssh2..

I also noticed this issue where migration to libssh was being discussed but apparently, it has been a while now without any updates on this.

In my fork I am using libssh2-1-dev and it works as expected.

I will like to know why libssh-dev is being used in the formula instead of libssh2-1-dev and if it makes sense, I will be happy to send a PR to fix the same.

Thanks!

@myii
Copy link
Member

myii commented Jul 28, 2019

Thanks for the report, @vin01.

@aboe76 @javierbertoli Any ideas about this?

@aboe76
Copy link
Member

aboe76 commented Jul 28, 2019

@vin01
It depends the formula can be used in different way, using distro packages it should work as long as the distro supports libgit2 most distro's have libssh2-1 as a depency

installing from git is trickier because of tracking al depencies, if you want to fix the git build with a PR to include libssh2-1-devel I'm all for it, having a functional gitfs with pygit2 because that's what saltstack is preferring according to the docs.

@vineet-kum
Copy link

Thanks for your quick responses @aboe76 @myii

I had to choose installation from git to be able to use specific versions because of issues like this one which will be fixed in the next release.

@aboe76 Since you mentioned libssh2-1-devel, just to clarify, is libssh-dev just intended as a placeholder currently to indicate that libssh must be installed as a pre-requisite and can I just replace it with libssh2-1-dev which will work on Debian based systems? (I am using Ubuntu)

I did a quick check on CentOS 7 and Fedora 29 and it looks like libssh2 is already installed.

Package libssh2-1.4.3-12.el7_6.2.x86_64 already installed and latest version

@aboe76
Copy link
Member

aboe76 commented Jul 29, 2019

@vineet-kum I was just checking the page on libgit2 on debian and saw the depency.

see:
https://packages.debian.org/sid/libgit2-27

and checking the dsc file for libgit2: http://cdn-fastly.deb.debian.org/debian/pool/main/libg/libgit2/libgit2_0.27.7+dfsg.1-0.2.dsc

Build-Depends: debhelper (>= 11~), python-minimal (>= 2.4.0), pkg-config, cmake, libz-dev, libmbedtls-dev, libssh2-1-dev, libhttp-parser-dev, libkrb5-dev

@vin01
Copy link
Author

vin01 commented Jul 29, 2019

@aboe76 Thanks once again! That is correct. With package based installation, it is perfectly fine and all dependencies are taken care of however with installation from git or let's say from source is what gets tricky. adding libssh2-1-dev instead of libssh-dev will fix it for Debian based systems for installations from source.

@vin01
Copy link
Author

vin01 commented Aug 5, 2019

@aboe76 Just to follow up on this and make a decision. I think other than libssh2-1-dev, other core dependencies are not what breaks the core functionality of gitfs usage as http/https remotes work well. Only issue I ran into so far was with ssh remotes.
However of course other distributions may run into other problems but I think we can handle them separately perhaps?

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

4 participants