2

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?

Jaglan Beta
  • 94
  • 1
  • 5
  • From the question you linked, you can also see that git-http-fetch is installed with regular git installation - it's just not in the path. – eis Jan 18 '19 at 07:29
  • 1
    Does this answer your question? [How to see if git binary is using openssl or gnutls?](https://stackoverflow.com/questions/36939033/how-to-see-if-git-binary-is-using-openssl-or-gnutls) – eis Feb 19 '21 at 12:08

1 Answers1

0

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

Jaglan Beta
  • 94
  • 1
  • 5