GNOME Bugzilla – Bug 755989
configure: Add --enable-libssh2 switch and make it independent of Curl
Last modified: 2018-11-03 13:41:08 UTC
Right now, libssh2 autoconfiguration is tied to Curl's. However, libssh2 is a library generic enough (and SSH support a common enough use case) to move it out of the Curl configure block and let it exist independently. Furthermore, it should be possible to explicitely enable/disable it with an --enable-libssh2 switch.
Created attachment 312575 [details] [review] Patch for Curl-independent libssh2 configuration
This still applies to git master. Can this go into 1.9.2 or 1.10?
Comment on attachment 312575 [details] [review] Patch for Curl-independent libssh2 configuration But why? There's nothing else that uses libssh2 ? Note also that you left the AM_CONDITIONAL(USE_SSH2, false) at the end intact.
True. The reasoning behind this is that curl *may* use libssh2, but libssh2 does not depend on curl and is not related to it in any way. The nested libssh2 check in curl is in my opinion a too strong coupling. It just a bit cleaner to factor out libssh2. And, the reason why I added a configure switch for libssh2 was that in Yocto, you want to make sure that optional features are switched on/off explicitely through an OpenEmbedded feature called "packageconfig". The way the libssh2 check currently works is that it enables ssh2 support in Curl if libssh2 is present. This can lead to indeterministic cross compilation builds. Example: Given the same build flags and the same build machine, a gst-plugins-bad build on setup A produces a different result than setup B - because something else just happened to build libssh2 earlier. For this reason, in Yocto, by default, dependency-less GStreamer plugins are enabled, and the others disabled, unless their dependencies are part of openembedded-core. See this for example: http://git.openembedded.org/openembedded-core/tree/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
I second the call for a way to have a determinstic dependency. The proposed patch defaults to "autodetect" so the out of box experience is identical, but for distributions who want to control what gets built this is essential.
I'm fine with adding a switch to explicitly disable/enable libssh use within the curl plugin. I will accept a patch that does this within the context of the curl check. I am not going to accept the current patch that puts the ssh check somewhere completely different just because it is theoretically conceivable that in future something else might also use the same lib. We can fix that when the time comes. Until then it's just confusing to have related checks elsewhere.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/308.