Better defaults for LIBSSH2_SYS_USE_PKG_CONFIG
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 566
- Forks
- 163
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 2
Description
The current situation with LIBSSH2_SYS_USE_PKG_CONFIG appears to me like this:
- It's off by default, causing libssh2-sys to use its shipped libssh
- None of this is documented, and the code comments only refer to #88 which does not give a criterion for which versions of libssh are OK
- Distributions regularly patch it out again (Debian, ) or set the environment variable (nixOS, Linux from scratch, FreeBSD).
The OpenSUSE patch gives an indication that libssh 1.6.0 is the libssh version with which things work out of the box. - At least on Debian sid, the default behavior results in linker errors like shown in https://github.com/alexcrichton/ssh2-rs/issues/171, without direct indication of what's wrong
I don't quite understand either the original problem that led to the workaround, nor the source of the error that I've seen, but the old workaround appears to me to cause a lot of trouble for a thing that may not yet be completely over yet but is a thing of the past for some users.
From my layman's assessment of the situation, a good way forward would be to test for pkg_config::probe_library("libssh2")?.version to be sufficiently new, and bypass any custom build configuration in that case, eventually removing the custom builds when older libssh2 versions fall out of support anyway. (OpenSUSE might appreciate a notification in that case, as they haves something bootstrap-related tied to LIBSSH2_SYS_USE_PKG_CONFIG, so they might rely on the shipped libssh, which won't be possible once the ? in the suggested check is active and doesn't fall back to the shipped one).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current handling of LIBSSH2_SYS_USE_PKG_CONFIG and the pkg_config::probe_library("libssh2") call. Read the history around issue #88 and compare the Debian, NixOS, Linux From Scratch, FreeBSD, and OpenSUSE behavior. Done requires an agreed default and version policy, with the fallback and resulting behavior documented and verified for supported libssh2 versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100