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: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-04-10 07:56 UTC by Joonas Niilola
Modified: 2023-05-27 07:49 UTC (History)
0 users

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.
Comment 1 Larry the Git Cow gentoo-dev 2023-05-27 07:49:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8765e3d0ba2ac52728ada06e260f92e9a3a1d687

commit 8765e3d0ba2ac52728ada06e260f92e9a3a1d687
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2023-05-22 13:41:42 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-05-27 07:49:20 +0000

    net-fs/s3fs: add 1.92
    
    - update the ssl REQUIRED_USE logic as suggested in #781908
    - remove hardcoded -D_FORTIFY_SOURCE=2 flag
    - remove unused test USE flag
    
    Closes: https://bugs.gentoo.org/781908
    Bug: https://bugs.gentoo.org/895676
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/31126
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-fs/s3fs/Manifest         |  1 +
 net-fs/s3fs/metadata.xml     |  2 +-
 net-fs/s3fs/s3fs-1.92.ebuild | 67 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 1 deletion(-)