Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 724354 - dev-libs/json-c: Support rdrand via CPU_FLAGS_X86_RDRAND
Summary: dev-libs/json-c: Support rdrand via CPU_FLAGS_X86_RDRAND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jakov Smolić
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-05-20 16:10 UTC by Sam James
Modified: 2020-07-24 12:03 UTC (History)
2 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 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-20 16:10:04 UTC
json-c supports using rdrand, perhaps the ebuild should support this: https://github.com/json-c/json-c/blob/master/README.md#cmake-options-

I think it should be done via the CPU_FLAGS_X86_RDRAND USE flag.
Comment 1 Jakov Smolić archtester gentoo-dev 2020-05-20 16:46:06 UTC
Yeah, we can put this as an option. I'll add that in the ebuilds
Comment 2 Larry the Git Cow gentoo-dev 2020-07-05 08:24:28 UTC
The bug has been closed via the following commit(s):

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

commit 890e5a5b16a05ab916b03de876383b488cba6de9
Author:     Jakov Smolic <jakov.smolic@sartura.hr>
AuthorDate: 2020-05-20 17:05:20 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-07-05 08:24:15 +0000

    dev-libs/json-c: add USE flag to enable rdrand support
    
    Closes: https://bugs.gentoo.org/724354
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
    Closes: https://github.com/gentoo/gentoo/pull/15895
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-libs/json-c/json-c-0.14-r3.ebuild | 3 ++-
 dev-libs/json-c/json-c-9999.ebuild    | 3 ++-
 dev-libs/json-c/metadata.xml          | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)
Comment 3 Joonas Niilola gentoo-dev 2020-07-06 06:09:53 UTC
It's not actually fixed, since it's a local USE flag and not USE_EXPAND like it correctly should be. 

I'd suggest you to continue discussion on https://github.com/mgorny/cpuid2cpuflags/issues/1 or open a new one to get it included upstream. Currently, there are other packages who locally declare this USE flag too, so they would benefit from upstream support as well.

https://packages.gentoo.org/packages/dev-haskell/cryptonite
https://packages.gentoo.org/packages/dev-libs/json-c

See also 
https://github.com/gentoo/gentoo/pull/15895#pullrequestreview-430207084
Comment 4 Larry the Git Cow gentoo-dev 2020-07-13 17:18:10 UTC
The bug has been referenced in the following commit(s):

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

commit 62e39b27ae92110cf8eeeedc59ddef439c38fb8e
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-07-13 17:17:12 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-07-13 17:18:05 +0000

    app-portage/cpuid2cpuflags: Bump to v11
    
    Now with rdrand flag support.
    
    Bug: https://bugs.gentoo.org/724354
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 app-portage/cpuid2cpuflags/Manifest                |  1 +
 .../cpuid2cpuflags/cpuid2cpuflags-11.ebuild        | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-07-24 12:03:44 UTC
The bug has been closed via the following commit(s):

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

commit 7faeb8c0bc3d122a4e4facc2d922246d9b9ef2c9
Author:     Francisco Blas (klondike) Izquierdo Riera <klondike@gentoo.org>
AuthorDate: 2020-07-13 17:22:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-07-24 12:03:32 +0000

    dev-libs/json-c: Change USE to cpu_flags_x86_rdrand
    
    Closes: https://bugs.gentoo.org/724354
    Package-Manager: Portage-2.3.99, Repoman-2.3.23
    Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/16686
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-libs/json-c/json-c-0.14-r3.ebuild | 4 ++--
 dev-libs/json-c/json-c-9999.ebuild    | 4 ++--
 dev-libs/json-c/metadata.xml          | 3 ---
 3 files changed, 4 insertions(+), 7 deletions(-)