Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 781908 - net-fs/s3fs: update the ssl REQUIRED_USE logic
Summary: net-fs/s3fs: update the ssl REQUIRED_USE logic
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Juraj Variny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-10 07:56 UTC by Joonas Niilola
Modified: 2021-04-10 07:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2021-04-10 07:56:06 UTC
Hey, 

we are trying to avoid using REQUIRED_USE as much as possible, since it provides a bad user experience. In Gentoo the common way to "select" a compatible ssl/tls implemention is just to prioritize them by reading USE flags. You've probably seen constructs like these:
ssl? (
	gnutls? ( net-libs/gnutls:= )
	!gnutls? (
		!libressl? ( dev-libs/openssl:0= )
		libressl? ( dev-libs/libressl:= )
	)
)

This is correct. No REQUIRED_USE needed here. I'd like to suggest something similar to be done with s3fs. 

Since it _requires_ an ssl/tls implementation to be enabled, the "+openssl" itself is bogus. That flag isn't even globally recognized, we use simple "ssl" to implicate there's ssl available (which often means openssl), 
  https://packages.gentoo.org/useflags/ssl
  https://packages.gentoo.org/useflags/search?q=openssl

So here's my suggestion:
Depchain goes nss > gnutls > openssl. 
if 'nss' is enabled, always prefer that.
if '-nss +gnutls', use gnutls.
if '-nss -gnutls', use openssl.

Then I'd personally pair "nettle" with "gnutls", but since it's an independent configure option, we can leave the 
REQUIRED_USE="nettle? ( gnutls !nss )" in place.

This way you also drop the "openssl" flag, and if other tls implementations are disabled, default to it.