Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Better defaults for LIBSSH2_SYS_USE_PKG_CONFIG

Aperta
#173 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
build-system

Direzione di ricerca

Iniziate individuando la gestione attuale di LIBSSH2_SYS_USE_PKG_CONFIG e la chiamata pkg_config::probe_library("libssh2"). Leggete la cronologia relativa all’issue #88 e confrontate il comportamento su Debian, NixOS, Linux From Scratch, FreeBSD e OpenSUSE. L’attività è completata quando sono stati concordati un valore predefinito e una policy delle versioni, e il fallback e il comportamento risultante sono documentati e verificati per le versioni supportate di libssh2.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug enhancement

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

Lingua principale
Rust
Stelle
571
Fork
166
Merge medio
1g 18h
PR unite (30g)
5

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-lang/ssh2-rs

Tutte le issue di rust-lang/ssh2-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.