Bug 283006 - devel/libgit2: SSH option does nothing
Summary: devel/libgit2: SSH option does nothing
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-27 16:25 UTC by James TD Smith
Modified: 2024-11-30 07:12 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mfechner)


Attachments
Patch for libgit2 Makefile (1.11 KB, patch)
2024-11-27 16:25 UTC, James TD Smith
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James TD Smith 2024-11-27 16:25:29 UTC
Created attachment 255494 [details]
Patch for libgit2 Makefile

After some upgrades, noticed that my Salt masters using gitfs and git_pillar were unable to fetch anything from the remote repositories I had configured. After fixing some breakage in Salt due to changes in pygit2 I found I was left with an error indicating that libgit2 was missing SSH support. I tested it outside of Salt with a small Python script and got the same result. This was surprising as I knew I had the SSH support enabled in the port (and it's on by default), checking the installed libgit2 I found it wasn't linked against libssh2. 

Dug into it some more, the option to enable SSH support was getting passed to CMake during the port build but wasn't having any effect. Looking at the README for libssh2, the USE_SSH option is now a choice of libssh2, extern, ON (equivalent to libssh2) or OFF, so setting it with '-DUSE_SSH:BOOL=ON' wasn't working. Also noticed that the THREADSAFE option isn't present in the CMakefile any more and just produces an error during the build. 

Patch to correct handling for the SSH option and remove the unused THREADSAFE option is attached.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-11-30 07:11:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8508c0c84909ecd568597548e7706c7d7a85a9eb

commit 8508c0c84909ecd568597548e7706c7d7a85a9eb
Author:     James TD Smith <ahktenzero@mohorovi.cc>
AuthorDate: 2024-11-25 21:19:10 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-11-30 07:00:01 +0000

    devel/libgit2: Fix handling for SSH option

    Needs to be specified as USE_SSH=libssh2. Also remove the THREADSAFE
    option, this is no longer relevant.

    PR:             283006

 devel/libgit2/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2024-11-30 07:12:10 UTC
(In reply to James TD Smith from comment #0)
Thanks a lot!