Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 569112 - ssl-cert.eclass add libressl support.
Summary: ssl-cert.eclass add libressl support.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LibreSSL
URL:
Whiteboard:
Keywords: NeedPatch
: 579786 (view as bug list)
Depends on:
Blocks: libressl-support 562324
  Show dependency tree
 
Reported: 2015-12-22 07:28 UTC by Nick Wallingford
Modified: 2016-06-23 12:25 UTC (History)
4 users (show)

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


Attachments
add libressl support (ssl-cert.eclass.diff,505 bytes, patch)
2016-01-10 19:52 UTC, Nick Wallingford
Details | Diff
libressl dropped -rand option from openssl genrsa command (ssl-cert.eclass.patch,1.06 KB, patch)
2016-01-25 05:27 UTC, maurerpe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Wallingford 2015-12-22 07:28:13 UTC
ssl-cert.eclass depends on dev-libs/openssl. It has no provisions for dev-libs/libressl.

If a user tries to install eg www-servers/apache with USE="ssl libressl" it will fail, because the apache-2 eclass will try to pull in libressl and ssl-cert.eclass, and ssl-cert.eclass will try to pull in openssl. They can't both be installed.

A workaround is to install all of apache's dependencies manually, then install apache with --nodeps. All the ssl-cert eclass funcs appear to run correctly using libressl's executable, so installation succeeds despite not having the required dependencies installed.

Reproducible: Always
Comment 1 Nick Wallingford 2016-01-10 19:52:52 UTC
Created attachment 422512 [details, diff]
add libressl support
Comment 2 Manuel Rüger (RETIRED) gentoo-dev 2016-01-11 01:58:28 UTC
CC'ing libressl maintainers. They might be interested.
Comment 3 maurerpe 2016-01-25 05:27:01 UTC
Created attachment 423850 [details, diff]
libressl dropped -rand option from openssl genrsa command

The libressl version of the 'openssl genrsa' command does not support the -rand argument, causing the eclass to fail when generating rsa keys.  The argument was dropped because libressl guarantees randomness without needing a seed file.

The attached patch uses the output of 'openssl version' to detect libressl.  If present, the -rand argument is dropped.  The use of the openssl version command was chosen over use flag detection because we need to know the installed and active openssl version regardless of useflag settings.

This patch also adds the libressl use flag to packages that reference the eclass.  This allows explicit selection of openssl vs libressl.
Comment 4 timofonic 2016-03-03 10:25:51 UTC
Are the patches merged?
Comment 5 Joe Kappus 2016-04-13 15:51:52 UTC
(In reply to timofonic from comment #4)
> Are the patches merged?

Does the bug look like it's marked fixed?
Comment 6 Anthony Basile gentoo-dev 2016-04-13 15:59:10 UTC
(In reply to maurerpe from comment #3)
> Created attachment 423850 [details, diff] [details, diff]
> libressl dropped -rand option from openssl genrsa command
> 
> The libressl version of the 'openssl genrsa' command does not support the
> -rand argument, causing the eclass to fail when generating rsa keys.  The
> argument was dropped because libressl guarantees randomness without needing
> a seed file.
> 
> The attached patch uses the output of 'openssl version' to detect libressl. 
> If present, the -rand argument is dropped.  The use of the openssl version
> command was chosen over use flag detection because we need to know the
> installed and active openssl version regardless of useflag settings.
> 
> This patch also adds the libressl use flag to packages that reference the
> eclass.  This allows explicit selection of openssl vs libressl.

I'll take a look.  Your patch looks complete, but I'm wondering whether or not openssl or libressl should have slots operators.  Ebuilds that inherit it will wind up depending on openssl and libressl and we would like consistent slot dependency.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-13 18:24:24 UTC
Yes, this needs a slot dep, or at the very least a way to tell the eclass that the ebuild will handle the openssl dep on it's own.
Comment 8 Anthony Basile gentoo-dev 2016-04-13 23:17:43 UTC
(In reply to Robin Johnson from comment #7)
> Yes, this needs a slot dep, or at the very least a way to tell the eclass
> that the ebuild will handle the openssl dep on it's own.

okay after talking with the openssl folks, it looks like they want :0= on all openssl deps.  i'll add it.
Comment 9 Anthony Basile gentoo-dev 2016-04-16 19:04:57 UTC
(In reply to Anthony Basile from comment #8)
> (In reply to Robin Johnson from comment #7)
> > Yes, this needs a slot dep, or at the very least a way to tell the eclass
> > that the ebuild will handle the openssl dep on it's own.
> 
> okay after talking with the openssl folks, it looks like they want :0= on
> all openssl deps.  i'll add it.

okay done.  please tests and reopen if anything is broken.
Comment 10 Ian Moone 2016-04-17 02:56:55 UTC
With this commit (https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/ssl-cert.eclass?id=7a4d6bd5fcb25d8381bc08e20ad6a5c1c80ad78f), the mail-mta/postfix and net-mail/dovecot is still trying to install openssl as dependency.
Comment 11 Joe Kappus 2016-04-17 03:37:17 UTC
No good for me either on samba.
Comment 12 Anthony Basile gentoo-dev 2016-04-17 07:11:07 UTC
(In reply to Joe Kappus from comment #11)
> No good for me either on samba.

there was some disagreement with other devs about how this should be done so i reverted temporarily.  i'll commit again later and post here when i have.
Comment 13 Pacho Ramos gentoo-dev 2016-06-14 10:15:47 UTC
Looks like finally this was fixed with:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e21b7de461c1ea87cca4423a57dbc6d355611c9b
Comment 14 Anthony Basile gentoo-dev 2016-06-14 11:39:57 UTC
(In reply to Pacho Ramos from comment #13)
> Looks like finally this was fixed with:
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=e21b7de461c1ea87cca4423a57dbc6d355611c9b

it was, i forgot to close this.  thanks pacho :)
Comment 15 Tony Vroon (RETIRED) gentoo-dev 2016-06-23 12:25:19 UTC
*** Bug 579786 has been marked as a duplicate of this bug. ***