How to see if git binary is built against openssl or gnutls when git-http-fetch is not installed?

400 Views Asked by At

I need to check if the installed version of git on a number of systems is built against gnutls or openssl. A method to do this can be found here but relies on having binary git-http-fetch installed against which "ldd git-http-fetch" can be run. For example, I see this on Ubuntu 16.04 with git 2.7.4. I can provide the argument http-fetch to git to access the same function, but this doesn't help since I want to use ldd to probe which shared objects will be linked. I could simply run a git transaction with strace and then grep for libraries actually loaded, but this requires a test endpoint and seems unwieldy.

How can I install this additional binary? Alternatively, how can I adapt the instructions from the previous question in the absence of this binary?

1

There are 1 best solutions below

0
On

First - search for which package on Ubuntu provides git-http-fetch

https://packages.ubuntu.com/search?suite=xenial&arch=any&mode=exactfilename&searchon=contents&keywords=git-http-fetch

Somewhat to my surprise, the answer is the git package does, but the file is buried in /usr/lib/git-core/git-http-fetch and /usr/lib/git-core is not in my PATH.

So the following command resolves my issue.

ldd /usr/lib/git-core/git-http-fetch | grep gnutls

Note on Ubuntu 16.04 and earlier watch out for problems with the git-all package which I mistakenly assumed might help. There is a bug which means this won't install properly. See https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164