saltstack-formulas / salt-formula

Yes, Salt can Salt itself!

Home Page:http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

vin01 opened this issue · comments

commented

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!

Thanks for the report, @vin01.

@aboe76 @javierbertoli Any ideas about this?

@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.

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

@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

commented

@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.

commented

@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?