Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643304 - net-misc/iputils-20171016_pre: libressl logic is wrongly implemented
Summary: net-misc/iputils-20171016_pre: libressl logic is wrongly implemented
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-03 19:06 UTC by Toralf Förster
Modified: 2018-04-11 11:57 UTC (History)
4 users (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 Toralf Förster gentoo-dev 2018-01-03 19:06:54 UTC
it should be rather something like :

libressl? ( dev-libs/libressl[static-libs(+)] )
openssl? ( !libressl ( dev-libs/openssl:0[static-libs(+)] )

and matching logic in the configure flags and REQUIRED_USE fixes

as given on #gentoo-dev and https://wiki.gentoo.org/wiki/Project:LibreSSL has suggestions for USE flag stuff
Comment 1 Mart Raudsepp gentoo-dev 2018-01-03 19:18:51 UTC
The whole thing could really use doing without REQUIRED_USE exactly-one-of trouble. Maybe design how older mesa did - https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/mesa/mesa-13.0.6.ebuild?id=eafb362ed66f981ebd20b5a13c7737cb54f6a062#n106
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-02-10 12:25:22 UTC
Patches are welcome. To be honest, I have no idea what crypto implementation should be preferred in order to get rid of REQUIRED_USE...
Comment 3 Wolfgang Müller 2018-03-05 20:01:10 UTC
Since patches are welcome, will whoever write the patch just choose one default implementation to use or is there a cleaner way around this? It seems that deciding on any default is always tied to lots of stress, so I somehow don't think anyone will ever provide patches for this. I was - in fact - going to try and provide one, but better to ask before my patch is shot down by someone whose preferred default implementation does not align with mine.

As a libressl user, I would like to see this fixed soon, and I am definitely ready to provide help - given that anything I provide is actually taken into consideration.
Comment 4 Larry the Git Cow gentoo-dev 2018-04-11 07:28:01 UTC
The bug has been referenced in the following commit(s):

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

commit e7b28e2545c9e3fb8f68f32899f10187f2da5b25
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2018-04-11 04:40:48 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-04-11 07:27:54 +0000

    net-misc/iputils: fix ipv6 dependency logic and drop REQUIRED_USE
    
    This revision bump adjusts the logic for OpenSSL  and LibreSSL ensuring
    that the libressl flag is not dependent on the openssl flag being set.
    
    Also, this revision bump removes the requirement for REQUIRED_USE and
    defaults to dev-libs/openssl if no user flags are set. OpenSSL was
    chosen as it is the current default provider for a stage3.  Should the
    libressl project decide to build a stage3 this can also be easily
    adjusted in profiles without ebuild modifications.
    
    Bug: https://bugs.gentoo.org/643304
    Package-Manager: Portage-2.3.28, Repoman-2.3.9
    Closes: https://github.com/gentoo/gentoo/pull/7937

 net-misc/iputils/iputils-20171016_pre-r1.ebuild | 179 ++++++++++++++++++++++++
 1 file changed, 179 insertions(+)}
Comment 5 Marek Bartosiewicz 2018-04-11 09:06:25 UTC
Fails for me, I have openssl USE flag set:

emerge -pvuDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] net-misc/iputils-20171016_pre-r1::gentoo [20171016_pre::gentoo] USE="arping caps filecaps ipv6 ssl -SECURITY_HAZARD -clockdiff -doc -gcrypt -idn -libressl -nettle -rarpd -rdisc -static -tftpd -tracepath -traceroute (-openssl%*)" 0 KiB

And during emerge:

>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-misc/iputils-20171016_pre-r1/work/iputils-67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf ...
 * ERROR: net-misc/iputils-20171016_pre-r1::gentoo failed (configure phase):
 *   USE Flag 'openssl' not in IUSE for net-misc/iputils-20171016_pre-r1
 *
 * Call stack:
 *          ebuild.sh, line  124:  Called src_configure
 *        environment, line 2453:  Called usex 'openssl'
 *   phase-helpers.sh, line  208:  Called use 'openssl'
 *   phase-helpers.sh, line  247:  Called die
 * The specific snippet of code:
 *                              die "USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}"
 *
 * If you need support, post the output of `emerge --info '=net-misc/iputils-20171016_pre-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/iputils-20171016_pre-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/iputils-20171016_pre-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/iputils-20171016_pre-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/iputils-20171016_pre-r1/work/iputils-67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf'
 * S: '/var/tmp/portage/net-misc/iputils-20171016_pre-r1/work/iputils-67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf'
Comment 6 Mart Raudsepp gentoo-dev 2018-04-11 09:08:02 UTC
Lets adjust the actual configuration part as well please...

>>> Configuring source in /tmp/portage/net-misc/iputils-20171016_pre-r1/work/iputils-67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf ...
 * ERROR: net-misc/iputils-20171016_pre-r1::gentoo failed (configure phase):
 *   USE Flag 'openssl' not in IUSE for net-misc/iputils-20171016_pre-r1


I think changing USE_CRYPTO=$(usex openssl) to USE_CRYPTO=$(usex ssl) or USE_CRYPTO=yes might be sufficient, maybe moved to the end of the 3 for being more clear. That's because iputils Makefile actually checks the USE flags in order by itself, thus if USE=gcrypt is set, only that will be picked, if USE=nettle is set, that will be picked (if gcrypt wasn't already), otherwise openssl/libressl is picked if USE_CRYPTO is set but not the others.  Re-checking that logic appreciated (and maybe conversion to use meson instead too..)
Comment 7 Marek Bartosiewicz 2018-04-11 09:42:35 UTC
Emerges OK with USE_CRYPTO=$(usex ssl).
Comment 8 Larry the Git Cow gentoo-dev 2018-04-11 11:40:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84a612ae902ed90b13887a252b9ed81c57c15712

commit 84a612ae902ed90b13887a252b9ed81c57c15712
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-04-11 11:40:22 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-04-11 11:40:22 +0000

    net-misc/iputils: Fix IUSE
    
    ...and update live ebuild with recent changes.
    
    Closes: https://bugs.gentoo.org/643304
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 net-misc/iputils/iputils-20171016_pre-r1.ebuild | 20 +++++++++++---------
 net-misc/iputils/iputils-99999999.ebuild        | 25 ++++++++++++++-----------
 2 files changed, 25 insertions(+), 20 deletions(-)